	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_sensor_setup_trigger       ## -- Begin function hid_sensor_setup_trigger
	.p2align	4, 0x90
_hid_sensor_setup_trigger:              ## @hid_sensor_setup_trigger
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rdi, %r15
	movl	8(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	callq	_iio_trigger_alloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movl	(%r15), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_iio_trigger_set_drvdata
	movq	_hid_sensor_trigger_ops@GOTPCREL(%rip), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_iio_trigger_register
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_7
LBB0_1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, 16(%r14)
	movq	%rbx, %rdi
	callq	_iio_trigger_get
	movl	%eax, 4(%r15)
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_hid_sensor_setup_batch_mode
	movq	%r15, %rdi
	callq	_pm_runtime_set_active
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_iio_trigger_unregister
LBB0_7:
	movq	%rbx, %rdi
	callq	_iio_trigger_free
LBB0_8:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_iio_device_set_drvdata
	leaq	8(%r14), %rdi
	movq	_hid_sensor_set_power_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	movq	(%r14), %rdi
	movl	$1, %esi
	callq	_pm_suspend_ignore_children
	movq	(%r14), %rdi
	movl	$3000, %esi                     ## imm = 0xBB8
	callq	_pm_runtime_set_autosuspend_delay
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-dev%d"

L_.str.1:                               ## @.str.1
	.asciz	"Trigger Allocate Failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_hid_sensor_trigger_ops,4,2     ## @hid_sensor_trigger_ops
L_.str.2:                               ## @.str.2
	.asciz	"Trigger Register Failed\n"

	.comm	_hid_sensor_set_power_work,4,2  ## @hid_sensor_set_power_work
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hid_sensor_setup_trigger       ; -- Begin function hid_sensor_setup_trigger
	.p2align	2
_hid_sensor_setup_trigger:              ; @hid_sensor_setup_trigger
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x21, x0
	ldr	w2, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_iio_trigger_alloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	w8, [x21]
	str	w8, [x0, #8]
	mov	x1, x19
	bl	_iio_trigger_set_drvdata
Lloh2:
	adrp	x8, _hid_sensor_trigger_ops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hid_sensor_trigger_ops@GOTPAGEOFF]
	str	x8, [x20]
	mov	x0, x20
	bl	_iio_trigger_register
	cbz	w0, LBB0_4
; %bb.2:
	mov	x22, x0
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_dev_err
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_4:
	str	x20, [x19, #16]
	mov	x0, x20
	bl	_iio_trigger_get
	str	w0, [x21, #4]
	mov	x0, x21
	mov	x1, x19
	bl	_hid_sensor_setup_batch_mode
	mov	x0, x21
	bl	_pm_runtime_set_active
	mov	x22, x0
	cbz	w0, LBB0_8
; %bb.5:
	mov	x0, x20
	bl	_iio_trigger_unregister
LBB0_6:
	mov	x0, x20
	bl	_iio_trigger_free
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x21
	mov	x1, x19
	bl	_iio_device_set_drvdata
	add	x0, x19, #8
Lloh11:
	adrp	x8, _hid_sensor_set_power_work@GOTPAGE
Lloh12:
	ldr	x8, [x8, _hid_sensor_set_power_work@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_INIT_WORK
	ldr	x0, [x19]
	mov	w1, #1
	bl	_pm_suspend_ignore_children
	ldr	x0, [x19]
	mov	w1, #3000
	bl	_pm_runtime_set_autosuspend_delay
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-dev%d"

l_.str.1:                               ; @.str.1
	.asciz	"Trigger Allocate Failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_hid_sensor_trigger_ops,4,2     ; @hid_sensor_trigger_ops
l_.str.2:                               ; @.str.2
	.asciz	"Trigger Register Failed\n"

	.comm	_hid_sensor_set_power_work,4,2  ; @hid_sensor_set_power_work
.subsections_via_symbols
