	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_sensors_allocate_trigger    ## -- Begin function st_sensors_allocate_trigger
	.p2align	4, 0x90
_st_sensors_allocate_trigger:           ## @st_sensors_allocate_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	%rsi, %rbx
	movq	%rdi, %r14
	callq	_iio_priv
	movq	%rax, %r12
	movl	8(%r14), %esi
	leaq	L_.str(%rip), %rdi
	callq	_iio_trigger_alloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_iio_trigger_set_drvdata
	movq	8(%r12), %rax
	movq	%rbx, 8(%rax)
	movl	40(%r12), %ecx
	movl	%ecx, 4(%rax)
	movl	16(%r12), %edi
	callq	_irq_get_irq_data
	movl	%eax, %edi
	callq	_irqd_get_trigger_type
	movq	%rax, %r15
	addq	$-128, %rax
	cmpq	$3, %rax
	ja	LBB0_7
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movq	24(%r12), %rax
	movl	12(%rax), %esi
	testl	%esi, %esi
	je	LBB0_11
## %bb.4:
	movl	8(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	callq	_st_sensors_write_data_with_mask
	testl	%eax, %eax
	js	LBB0_26
## %bb.5:
	leaq	4(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_12
LBB0_6:
	addq	$4, %r14
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_7:
	leaq	4(%r14), %rdi
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_9
LBB0_8:
	leaq	4(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_info
LBB0_9:
	movl	$128, %r15d
	movl	$1, (%r12)
	jmp	LBB0_16
LBB0_10:
	leaq	4(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_info
	movl	$130, %eax
	jmp	LBB0_15
LBB0_11:
	leaq	4(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	cmpq	$131, %r15
	movl	$128, %eax
	cmoveq	%rax, %r15
	movl	$130, %eax
	cmpq	$129, %r15
	je	LBB0_15
LBB0_12:
	cmpq	$131, %r15
	je	LBB0_14
## %bb.13:
	movq	%r15, %rax
	cmpq	$128, %r15
	jne	LBB0_15
LBB0_14:
	movl	$1, (%r12)
	jmp	LBB0_16
LBB0_15:
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	movq	%rax, %r15
LBB0_16:
	cmpq	$0, 32(%r12)
	je	LBB0_19
## %bb.17:
	movq	24(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_19
## %bb.18:
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	orq	(%rax), %r15
LBB0_19:
	movl	16(%r12), %edi
	movq	_st_sensors_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_st_sensors_irq_thread@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	8(%r12), %r9
	movl	(%r9), %r8d
	movq	%r15, %rcx
	callq	_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_22
## %bb.20:
	movl	%eax, %ebx
	addq	$4, %r14
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_21:
	movq	8(%r12), %rdi
	callq	_iio_trigger_free
	jmp	LBB0_24
LBB0_22:
	movq	8(%r12), %rdi
	callq	_iio_trigger_register
	testl	%eax, %eax
	js	LBB0_25
## %bb.23:
	movq	8(%r12), %rdi
	callq	_iio_trigger_get
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_24:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	%eax, %ebx
	addq	$4, %r14
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	16(%r12), %edi
	movq	8(%r12), %rsi
	callq	_free_irq
	jmp	LBB0_21
LBB0_26:
	movl	%eax, %ebx
	jmp	LBB0_21
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_3
	.long	L0_0_set_10
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s-trigger"

L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate iio trigger.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"falling/low specified for IRQ but hardware supports only rising/high: will request rising/high\n"

L_.str.3:                               ## @.str.3
	.asciz	"interrupts on the falling edge or active low level\n"

L_.str.4:                               ## @.str.4
	.asciz	"interrupts on the rising edge\n"

L_.str.5:                               ## @.str.5
	.asciz	"interrupts active high level\n"

L_.str.6:                               ## @.str.6
	.asciz	"unsupported IRQ trigger specified (%lx), enforce rising edge\n"

	.comm	_IRQF_ONESHOT,8,3               ## @IRQF_ONESHOT
	.comm	_IRQF_SHARED,8,3                ## @IRQF_SHARED
	.comm	_st_sensors_irq_handler,4,2     ## @st_sensors_irq_handler
	.comm	_st_sensors_irq_thread,4,2      ## @st_sensors_irq_thread
L_.str.7:                               ## @.str.7
	.asciz	"failed to request trigger IRQ.\n"

L_.str.8:                               ## @.str.8
	.asciz	"failed to register iio trigger.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_st_sensors_allocate_trigger    ; -- Begin function st_sensors_allocate_trigger
	.p2align	2
_st_sensors_allocate_trigger:           ; @st_sensors_allocate_trigger
	.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	x21, x1
	mov	x20, x0
	bl	_iio_priv
	mov	x19, x0
	ldr	w1, [x20, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_iio_trigger_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x1, x20
	bl	_iio_trigger_set_drvdata
	ldr	x8, [x19, #8]
	str	x21, [x8, #8]
	ldr	w9, [x19, #40]
	str	w9, [x8, #4]
	ldr	w0, [x19, #16]
	bl	_irq_get_irq_data
	bl	_irqd_get_trigger_type
	mov	x21, x0
	sub	x8, x0, #128
	cmp	x8, #3
	b.hi	LBB0_7
; %bb.2:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	ldr	x8, [x19, #24]
	ldr	w1, [x8, #12]
	cbz	w1, LBB0_10
; %bb.4:
	ldr	w2, [x8, #8]
	mov	x0, x20
	mov	w3, #1
	bl	_st_sensors_write_data_with_mask
	tbnz	w0, #31, LBB0_25
; %bb.5:
	add	x0, x20, #4
Lloh4:
	adrp	x1, l_.str.3@PAGE
Lloh5:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_info
	b	LBB0_12
LBB0_6:
	add	x0, x20, #4
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_23
LBB0_7:
	add	x0, x20, #4
	str	x21, [sp]
Lloh11:
	adrp	x1, l_.str.6@PAGE
Lloh12:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_err
	mov	w21, #128
	b	LBB0_14
LBB0_8:
	add	x0, x20, #4
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_info
	mov	w21, #128
	b	LBB0_14
LBB0_9:
	add	x0, x20, #4
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_info
	b	LBB0_11
LBB0_10:
	add	x0, x20, #4
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	w8, #128
	cmp	x21, #131
	csel	x21, x8, x21, eq
	cmp	x21, #129
	b.ne	LBB0_12
LBB0_11:
	mov	w21, #130
	b	LBB0_15
LBB0_12:
	cmp	x21, #131
	b.eq	LBB0_14
; %bb.13:
	cmp	x21, #128
	b.ne	LBB0_15
LBB0_14:
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_16
	b	LBB0_18
LBB0_15:
Lloh19:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	orr	x21, x8, x21
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_18
LBB0_16:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.17:
Lloh22:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	orr	x21, x8, x21
LBB0_18:
	ldr	w0, [x19, #16]
Lloh25:
	adrp	x8, _st_sensors_irq_handler@GOTPAGE
Lloh26:
	ldr	x8, [x8, _st_sensors_irq_handler@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _st_sensors_irq_thread@GOTPAGE
Lloh29:
	ldr	x8, [x8, _st_sensors_irq_thread@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	x5, [x19, #8]
	ldr	w4, [x5]
	mov	x3, x21
	bl	_request_threaded_irq
	cbz	w0, LBB0_21
; %bb.19:
	mov	x22, x0
	add	x0, x20, #4
Lloh31:
	adrp	x1, l_.str.7@PAGE
Lloh32:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
LBB0_20:
	ldr	x0, [x19, #8]
	bl	_iio_trigger_free
	b	LBB0_23
LBB0_21:
	ldr	x0, [x19, #8]
	bl	_iio_trigger_register
	tbnz	w0, #31, LBB0_24
; %bb.22:
	ldr	x0, [x19, #8]
	bl	_iio_trigger_get
	mov	w22, #0
	str	w0, [x20]
LBB0_23:
	mov	x0, x22
	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
LBB0_24:
	mov	x22, x0
	add	x0, x20, #4
Lloh33:
	adrp	x1, l_.str.8@PAGE
Lloh34:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19, #16]
	ldr	x1, [x19, #8]
	bl	_free_irq
	b	LBB0_20
LBB0_25:
	mov	x22, x0
	b	LBB0_20
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s-trigger"

l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate iio trigger.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"falling/low specified for IRQ but hardware supports only rising/high: will request rising/high\n"

l_.str.3:                               ; @.str.3
	.asciz	"interrupts on the falling edge or active low level\n"

l_.str.4:                               ; @.str.4
	.asciz	"interrupts on the rising edge\n"

l_.str.5:                               ; @.str.5
	.asciz	"interrupts active high level\n"

l_.str.6:                               ; @.str.6
	.asciz	"unsupported IRQ trigger specified (%lx), enforce rising edge\n"

	.comm	_IRQF_ONESHOT,8,3               ; @IRQF_ONESHOT
	.comm	_IRQF_SHARED,8,3                ; @IRQF_SHARED
	.comm	_st_sensors_irq_handler,4,2     ; @st_sensors_irq_handler
	.comm	_st_sensors_irq_thread,4,2      ; @st_sensors_irq_thread
l_.str.7:                               ; @.str.7
	.asciz	"failed to request trigger IRQ.\n"

l_.str.8:                               ; @.str.8
	.asciz	"failed to register iio trigger.\n"

.subsections_via_symbols
