	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk3310_irq_event_handler
_stk3310_irq_event_handler:             ## @stk3310_irq_event_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rsi, %rdi
	callq	_iio_priv
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	24(%r15), %edi
	leaq	-28(%rbp), %rsi
	callq	_regmap_field_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_IIO_PROXIMITY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_IIO_EV_TYPE_THRESH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	cmpl	$0, -28(%rbp)
	jne	LBB0_3
## %bb.4:
	movq	_IIO_EV_DIR_RISING@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_3:
	movq	_IIO_EV_DIR_FALLING@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %ecx
	movl	$1, %esi
	callq	_IIO_UNMOD_EVENT_CODE
	movl	20(%r15), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_iio_push_event
	movl	16(%r15), %edi
	xorl	%esi, %esi
	callq	_regmap_field_write
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	movq	8(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"register read failed\n"

	.comm	_IIO_PROXIMITY,4,2              ## @IIO_PROXIMITY
	.comm	_IIO_EV_TYPE_THRESH,4,2         ## @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_FALLING,4,2         ## @IIO_EV_DIR_FALLING
	.comm	_IIO_EV_DIR_RISING,4,2          ## @IIO_EV_DIR_RISING
L_.str.1:                               ## @.str.1
	.asciz	"failed to reset interrupts\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_stk3310_irq_event_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk3310_irq_event_handler
_stk3310_irq_event_handler:             ; @stk3310_irq_event_handler
	.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	x20, x1
	mov	x0, x1
	bl	_iio_priv
	mov	x19, x0
	bl	_mutex_lock
	ldr	w0, [x19, #24]
	add	x1, sp, #12
	bl	_regmap_field_read
	tbnz	w0, #31, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _IIO_PROXIMITY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_PROXIMITY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _IIO_EV_TYPE_THRESH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IIO_EV_TYPE_THRESH@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _IIO_EV_DIR_FALLING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IIO_EV_DIR_FALLING@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh8:
	adrp	x10, _IIO_EV_DIR_RISING@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IIO_EV_DIR_RISING@GOTPAGEOFF]
	cmp	w9, #0
	csel	x8, x10, x8, eq
	ldr	w3, [x8]
	mov	w1, #1
	bl	_IIO_UNMOD_EVENT_CODE
	mov	x1, x0
	ldr	w2, [x19, #20]
	mov	x0, x20
	bl	_iio_push_event
	ldr	w0, [x19, #16]
	mov	w1, #0
	bl	_regmap_field_write
	tbz	w0, #31, LBB0_3
; %bb.2:
	ldr	x0, [x19, #8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_3:
	mov	x0, x19
	bl	_mutex_unlock
Lloh12:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	b	LBB0_5
LBB0_4:
	mov	x21, x0
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x21
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"register read failed\n"

	.comm	_IIO_PROXIMITY,4,2              ; @IIO_PROXIMITY
	.comm	_IIO_EV_TYPE_THRESH,4,2         ; @IIO_EV_TYPE_THRESH
	.comm	_IIO_EV_DIR_FALLING,4,2         ; @IIO_EV_DIR_FALLING
	.comm	_IIO_EV_DIR_RISING,4,2          ; @IIO_EV_DIR_RISING
l_.str.1:                               ; @.str.1
	.asciz	"failed to reset interrupts\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_stk3310_irq_event_handler
.subsections_via_symbols
