	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sx9500_irq_thread_handler
_sx9500_irq_thread_handler:             ## @sx9500_irq_thread_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rsi, %rdi
	callq	_iio_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	16(%rbx), %edi
	movq	_SX9500_REG_IRQ_SRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	-20(%rbp), %eax
	movq	_SX9500_CLOSE_IRQ@GOTPCREL(%rip), %rcx
	movq	_SX9500_FAR_IRQ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_sx9500_push_events
	movl	-20(%rbp), %eax
LBB0_4:
	movq	_SX9500_CONVDONE_IRQ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	addq	$4, %rdi
	callq	_complete
	jmp	LBB0_6
LBB0_1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SX9500_REG_IRQ_SRC,4,2         ## @SX9500_REG_IRQ_SRC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c transfer error in irq\n"

	.comm	_SX9500_CLOSE_IRQ,4,2           ## @SX9500_CLOSE_IRQ
	.comm	_SX9500_FAR_IRQ,4,2             ## @SX9500_FAR_IRQ
	.comm	_SX9500_CONVDONE_IRQ,4,2        ## @SX9500_CONVDONE_IRQ
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_sx9500_irq_thread_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sx9500_irq_thread_handler
_sx9500_irq_thread_handler:             ; @sx9500_irq_thread_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x0, x1
	bl	_iio_priv
	mov	x19, x0
	bl	_mutex_lock
	ldr	w0, [x19, #16]
Lloh0:
	adrp	x8, _SX9500_REG_IRQ_SRC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SX9500_REG_IRQ_SRC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _SX9500_CLOSE_IRQ@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SX9500_CLOSE_IRQ@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _SX9500_FAR_IRQ@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SX9500_FAR_IRQ@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_sx9500_push_events
	ldr	w8, [sp, #12]
LBB0_3:
Lloh9:
	adrp	x9, _SX9500_CONVDONE_IRQ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SX9500_CONVDONE_IRQ@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	add	x0, x19, #4
	bl	_complete
	b	LBB0_6
LBB0_5:
	ldr	x0, [x19, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
Lloh14:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_SX9500_REG_IRQ_SRC,4,2         ; @SX9500_REG_IRQ_SRC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c transfer error in irq\n"

	.comm	_SX9500_CLOSE_IRQ,4,2           ; @SX9500_CLOSE_IRQ
	.comm	_SX9500_FAR_IRQ,4,2             ; @SX9500_FAR_IRQ
	.comm	_SX9500_CONVDONE_IRQ,4,2        ; @SX9500_CONVDONE_IRQ
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_sx9500_irq_thread_handler
.subsections_via_symbols
