	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_power_report_state
_set_power_report_state:                ## @set_power_report_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$-1, -36(%rbp)
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %r15d
	movq	16(%r12), %rax
	movl	$-1, %r14d
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:
	testl	%esi, %esi
	jne	LBB0_5
## %bb.6:
	movq	_HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_5:
	movq	_HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM@GOTPCREL(%rip), %rcx
LBB0_7:
	movl	(%rcx), %ecx
	movq	(%r12), %rdi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	callq	_hid_sensor_get_usage_index
	movl	%eax, %ebx
	movl	%eax, -36(%rbp)
LBB0_8:
	movq	8(%r12), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%r12), %rdi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movl	%r15d, %ecx
	callq	_hid_sensor_get_usage_index
	movl	%eax, %r14d
LBB0_10:
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.11:
	movq	16(%r12), %rax
	addl	8(%rax), %ebx
	movl	%ebx, -36(%rbp)
	movq	(%r12), %rdi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	leaq	-36(%rbp), %r8
	movl	$4, %ecx
	callq	_sensor_hub_set_feature
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_16
LBB0_13:
	xorl	%r15d, %r15d
	testl	%r14d, %r14d
	js	LBB0_17
## %bb.14:
	movq	8(%r12), %rax
	addl	8(%rax), %r14d
	movl	%r14d, -40(%rbp)
	movq	(%r12), %rdi
	movl	(%rax), %edx
	movl	4(%rax), %esi
	leaq	-40(%rbp), %r8
	movl	$4, %ecx
	callq	_sensor_hub_set_feature
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %r15d
LBB0_16:
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_hid_err
LBB0_17:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM,4,2 ## @HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM
	.comm	_HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM,4,2 ## @HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM
	.comm	_HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM,4,2 ## @HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM
	.comm	_HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM,4,2 ## @HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Set power state failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"Set report state failed\n"

	.no_dead_strip	_set_power_report_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_power_report_state
_set_power_report_state:                ; @set_power_report_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	mov	w20, #-1
	str	w20, [sp, #12]
Lloh0:
	adrp	x8, _HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM@GOTPAGEOFF]
Lloh2:
	adrp	x9, _HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x8, x9, eq
	ldr	w21, [x8]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
Lloh4:
	adrp	x9, _HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM@GOTPAGE
Lloh5:
	ldr	x9, [x9, _HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM@GOTPAGEOFF]
Lloh6:
	adrp	x10, _HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM@GOTPAGE
Lloh7:
	ldr	x10, [x10, _HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM@GOTPAGEOFF]
	cmp	w1, #0
	csel	x9, x9, x10, eq
	ldr	w3, [x9]
	ldr	x0, [x19]
	ldp	w2, w1, [x8]
	bl	_hid_sensor_get_usage_index
	mov	x20, x0
	str	w0, [sp, #12]
LBB0_2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	x0, [x19]
	ldp	w2, w1, [x8]
	mov	x3, x21
	bl	_hid_sensor_get_usage_index
	mov	x21, x0
	tbz	w20, #31, LBB0_5
	b	LBB0_7
LBB0_4:
	mov	w21, #-1
	tbnz	w20, #31, LBB0_7
LBB0_5:
	ldr	x8, [x19, #16]
	ldp	w1, w9, [x8, #4]
	add	w9, w20, w9
	str	w9, [sp, #12]
	ldr	x0, [x19]
	ldr	w2, [x8]
	add	x4, sp, #12
	mov	w3, #4
	bl	_sensor_hub_set_feature
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_7:
	tbnz	w21, #31, LBB0_11
; %bb.8:
	ldp	x0, x8, [x19]
	ldp	w1, w9, [x8, #4]
	add	w9, w21, w9
	str	w9, [sp, #8]
	ldr	w2, [x8]
	add	x4, sp, #8
	mov	w3, #4
	bl	_sensor_hub_set_feature
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.9:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_10:
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_hid_err
	b	LBB0_12
LBB0_11:
	mov	w20, #0
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM,4,2 ; @HID_USAGE_SENSOR_PROP_POWER_STATE_D0_FULL_POWER_ENUM
	.comm	_HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM,4,2 ; @HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM
	.comm	_HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM,4,2 ; @HID_USAGE_SENSOR_PROP_POWER_STATE_D4_POWER_OFF_ENUM
	.comm	_HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM,4,2 ; @HID_USAGE_SENSOR_PROP_REPORTING_STATE_NO_EVENTS_ENUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Set power state failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"Set report state failed\n"

	.no_dead_strip	_set_power_report_state
.subsections_via_symbols
