	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm8333_irq_thread
_lm8333_irq_thread:                     ## @lm8333_irq_thread
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_LM8333_READ_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_lm8333_read8
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movq	_LM8333_ERROR_IRQ@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_6
## %bb.3:
	movq	_LM8333_READ_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_lm8333_read8
	movl	%eax, %r15d
	movq	_LM8333_ERROR_KEYOVR@GOTPCREL(%rip), %rax
	movq	_LM8333_ERROR_FIFOOVR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_5
## %bb.4:
	movq	%rsp, %rbx
	movq	_LM8333_FIFO_TRANSFER_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	movq	_LM8333_FIFO_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r14, %rdi
	callq	_lm8333_read_block
	movq	%rbx, %rsp
LBB0_5:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_6:
	movq	_LM8333_KEYPAD_IRQ@GOTPCREL(%rip), %rax
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rbx
	testl	%r12d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_lm8333_key_handler
	jmp	LBB0_8
LBB0_1:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rbx
LBB0_8:
	movl	(%rbx), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_LM8333_READ_INT,4,2            ## @LM8333_READ_INT
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_LM8333_ERROR_IRQ,4,2           ## @LM8333_ERROR_IRQ
	.comm	_LM8333_READ_ERROR,4,2          ## @LM8333_READ_ERROR
	.comm	_LM8333_ERROR_KEYOVR,4,2        ## @LM8333_ERROR_KEYOVR
	.comm	_LM8333_ERROR_FIFOOVR,4,2       ## @LM8333_ERROR_FIFOOVR
	.comm	_LM8333_FIFO_TRANSFER_SIZE,4,2  ## @LM8333_FIFO_TRANSFER_SIZE
	.comm	_LM8333_FIFO_READ,4,2           ## @LM8333_FIFO_READ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Got error %02x\n"

	.comm	_LM8333_KEYPAD_IRQ,4,2          ## @LM8333_KEYPAD_IRQ
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_lm8333_irq_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm8333_irq_thread
_lm8333_irq_thread:                     ; @lm8333_irq_thread
	.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
	sub	sp, sp, #16
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _LM8333_READ_INT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LM8333_READ_INT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lm8333_read8
	cbz	w0, LBB0_8
; %bb.1:
	mov	x20, x0
Lloh6:
	adrp	x8, _LM8333_ERROR_IRQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LM8333_ERROR_IRQ@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.2:
Lloh9:
	adrp	x8, _LM8333_READ_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _LM8333_READ_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_lm8333_read8
	mov	x21, x0
Lloh12:
	adrp	x8, _LM8333_ERROR_KEYOVR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _LM8333_ERROR_KEYOVR@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _LM8333_ERROR_FIFOOVR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _LM8333_ERROR_FIFOOVR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	mov	x22, sp
Lloh18:
	adrp	x12, _LM8333_FIFO_TRANSFER_SIZE@GOTPAGE
Lloh19:
	ldr	x12, [x12, _LM8333_FIFO_TRANSFER_SIZE@GOTPAGEOFF]
	ldr	w8, [x12]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh20:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh21:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x3, x9, x8
	mov	sp, x3
Lloh22:
	adrp	x8, _LM8333_FIFO_READ@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LM8333_FIFO_READ@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w2, [x12]
	mov	x0, x19
	bl	_lm8333_read_block
	mov	sp, x22
LBB0_4:
	ldr	x0, [x19]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_5:
Lloh27:
	adrp	x8, _LM8333_KEYPAD_IRQ@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LM8333_KEYPAD_IRQ@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_lm8333_key_handler
LBB0_7:
Lloh30:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh32:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldur	x8, [x29, #-40]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #32
	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_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_LM8333_READ_INT,4,2            ; @LM8333_READ_INT
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_LM8333_ERROR_IRQ,4,2           ; @LM8333_ERROR_IRQ
	.comm	_LM8333_READ_ERROR,4,2          ; @LM8333_READ_ERROR
	.comm	_LM8333_ERROR_KEYOVR,4,2        ; @LM8333_ERROR_KEYOVR
	.comm	_LM8333_ERROR_FIFOOVR,4,2       ; @LM8333_ERROR_FIFOOVR
	.comm	_LM8333_FIFO_TRANSFER_SIZE,4,2  ; @LM8333_FIFO_TRANSFER_SIZE
	.comm	_LM8333_FIFO_READ,4,2           ; @LM8333_FIFO_READ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Got error %02x\n"

	.comm	_LM8333_KEYPAD_IRQ,4,2          ; @LM8333_KEYPAD_IRQ
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_lm8333_irq_thread
.subsections_via_symbols
