	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltr501_trigger_handler
_ltr501_trigger_handler:                ## @ltr501_trigger_handler
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rsi), %r15
	movq	%r15, %rdi
	callq	_iio_priv
	movq	%rax, %r14
	leaq	-80(%rbp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	4(%r15), %esi
	xorl	%edi, %edi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	4(%r15), %esi
	movl	$1, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
LBB0_2:
	movq	_LTR501_STATUS_ALS_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_3:
	movl	4(%r15), %esi
	movl	$2, %edi
	callq	_test_bit
	xorl	%ebx, %ebx
	movq	_LTR501_STATUS_PS_RDY@GOTPCREL(%rip), %r12
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r12), %ebx
LBB0_5:
	orl	%r13d, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_ltr501_drdy
	testl	%eax, %eax
	js	LBB0_17
## %bb.6:
	movq	_LTR501_STATUS_ALS_RDY@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.8:
	movl	(%r14), %edi
	movq	_LTR501_ALS_DATA1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-88(%rbp), %rdx
	movl	$8, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_18
## %bb.9:
	movl	4(%r15), %esi
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movl	-84(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, -80(%rbp)
	movl	$1, %r13d
LBB0_11:
	movl	4(%r15), %esi
	movl	$1, %edi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	-88(%rbp), %edi
	callq	_le16_to_cpu
	movl	%r13d, %ecx
	incl	%r13d
	movl	%eax, -80(%rbp,%rcx,4)
LBB0_13:
	testl	%ebx, (%r12)
	jne	LBB0_14
	jmp	LBB0_16
LBB0_7:
	xorl	%r13d, %r13d
	testl	%ebx, (%r12)
	je	LBB0_16
LBB0_14:
	movl	(%r14), %edi
	movq	_LTR501_PS_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-92(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_17
## %bb.15:
	movq	_LTR501_PS_DATA_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	-92(%rbp), %eax
	movl	%r13d, %ecx
	movl	%eax, -80(%rbp,%rcx,4)
LBB0_16:
	movq	%r15, %rdi
	callq	_iio_get_time_ns
	leaq	-80(%rbp), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_iio_push_to_buffers_with_timestamp
LBB0_17:
	movl	(%r15), %edi
	callq	_iio_trigger_notify_done
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_20
## %bb.19:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LTR501_STATUS_ALS_RDY,4,2      ## @LTR501_STATUS_ALS_RDY
	.comm	_LTR501_STATUS_PS_RDY,4,2       ## @LTR501_STATUS_PS_RDY
	.comm	_LTR501_ALS_DATA1,4,2           ## @LTR501_ALS_DATA1
	.comm	_LTR501_PS_DATA,4,2             ## @LTR501_PS_DATA
	.comm	_LTR501_PS_DATA_MASK,4,2        ## @LTR501_PS_DATA_MASK
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_ltr501_trigger_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltr501_trigger_handler
_ltr501_trigger_handler:                ; @ltr501_trigger_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x19, [x1]
	mov	x0, x19
	bl	_iio_priv
	mov	x20, x0
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w1, [x19, #4]
	mov	w0, #0
	bl	_test_bit
Lloh3:
	adrp	x23, _LTR501_STATUS_ALS_RDY@GOTPAGE
Lloh4:
	ldr	x23, [x23, _LTR501_STATUS_ALS_RDY@GOTPAGEOFF]
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x19, #4]
	mov	w0, #1
	bl	_test_bit
	cbz	x0, LBB0_9
LBB0_2:
	ldr	w21, [x23]
LBB0_3:
	ldr	w1, [x19, #4]
	mov	w0, #2
	bl	_test_bit
Lloh5:
	adrp	x22, _LTR501_STATUS_PS_RDY@GOTPAGE
Lloh6:
	ldr	x22, [x22, _LTR501_STATUS_PS_RDY@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w21, w8, w21
	mov	x0, x20
	mov	x1, x21
	bl	_ltr501_drdy
	tbnz	w0, #31, LBB0_17
; %bb.4:
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_8
; %bb.5:
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _LTR501_ALS_DATA1@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LTR501_ALS_DATA1@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	w3, #8
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_18
; %bb.6:
	ldr	w1, [x19, #4]
	mov	w0, #0
	bl	_test_bit
	cbz	x0, LBB0_10
; %bb.7:
	ldr	w0, [sp, #20]
	bl	_le16_to_cpu
	str	w0, [sp, #24]
	mov	w23, #1
	b	LBB0_11
LBB0_8:
	mov	w23, #0
	b	LBB0_13
LBB0_9:
	mov	w21, #0
	b	LBB0_3
LBB0_10:
	mov	w23, #0
LBB0_11:
	ldr	w1, [x19, #4]
	mov	w0, #1
	bl	_test_bit
	cbz	x0, LBB0_13
; %bb.12:
	ldr	w0, [sp, #16]
	bl	_le16_to_cpu
	add	x8, sp, #24
	str	w0, [x8, w23, uxtw #2]
	add	w23, w23, #1
LBB0_13:
	ldr	w8, [x22]
	tst	w8, w21
	b.eq	LBB0_16
; %bb.14:
	ldr	w0, [x20]
Lloh10:
	adrp	x8, _LTR501_PS_DATA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LTR501_PS_DATA@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w3, #2
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_17
; %bb.15:
Lloh13:
	adrp	x8, _LTR501_PS_DATA_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LTR501_PS_DATA_MASK@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh15:
	ldr	w8, [x8]
	and	w8, w8, w9
	add	x9, sp, #24
	str	w8, [x9, w23, uxtw #2]
LBB0_16:
	mov	x0, x19
	bl	_iio_get_time_ns
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x19
	bl	_iio_push_to_buffers_with_timestamp
LBB0_17:
	ldr	w0, [x19]
	bl	_iio_trigger_notify_done
Lloh16:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
LBB0_18:
	ldr	x8, [sp, #56]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_LTR501_STATUS_ALS_RDY,4,2      ; @LTR501_STATUS_ALS_RDY
	.comm	_LTR501_STATUS_PS_RDY,4,2       ; @LTR501_STATUS_PS_RDY
	.comm	_LTR501_ALS_DATA1,4,2           ; @LTR501_ALS_DATA1
	.comm	_LTR501_PS_DATA,4,2             ; @LTR501_PS_DATA
	.comm	_LTR501_PS_DATA_MASK,4,2        ; @LTR501_PS_DATA_MASK
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_ltr501_trigger_handler
.subsections_via_symbols
