	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm8323_irq
_lm8323_irq:                            ## @lm8323_irq
	.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, %rbx
	movq	%rsi, %rdi
	callq	_mutex_lock
	movq	_LM8323_CMD_READ_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %ecx
	callq	_lm8323_read
	cmpl	$1, %eax
	jne	LBB0_18
## %bb.1:
	movl	-44(%rbp), %edi
	testl	%edi, %edi
	je	LBB0_18
## %bb.2:
	movq	_LM8323_NUM_PWMS@GOTPCREL(%rip), %r12
	movq	_INT_PWM1@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	movq	_INT_KEYPAD@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	callq	_likely
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_process_keys
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %eax
	movq	_INT_ROTATOR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_vdbg
	movl	-44(%rbp), %eax
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_INT_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_vdbg
	movq	%rbx, %rdi
	callq	_lm8323_process_error
	movl	-44(%rbp), %eax
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	_INT_NOINIT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	16(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	%rbx, %rdi
	callq	_lm8323_configure
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_3
## %bb.14:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=2
	incq	%r13
	movslq	%eax, %rcx
	addq	$4, %r14
	cmpq	%rcx, %r13
	jge	LBB0_3
LBB0_15:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edx
	movl	%r13d, %ecx
	shll	%cl, %edx
	testl	%edx, -44(%rbp)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	movq	16(%rbx), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_vdbg
	movq	8(%rbx), %rdi
	addq	%r14, %rdi
	callq	_pwm_done
	movl	(%r12), %eax
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_LM8323_CMD_READ_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	leaq	-44(%rbp), %rdx
	movl	$1, %ecx
	callq	_lm8323_read
	cmpl	$1, %eax
	jne	LBB0_18
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %edi
	testl	%edi, %edi
	jne	LBB0_5
LBB0_18:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LM8323_CMD_READ_INT,4,2        ## @LM8323_CMD_READ_INT
	.comm	_INT_KEYPAD,4,2                 ## @INT_KEYPAD
	.comm	_INT_ROTATOR,4,2                ## @INT_ROTATOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rotator fired\n"

	.comm	_INT_ERROR,4,2                  ## @INT_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"error!\n"

	.comm	_INT_NOINIT,4,2                 ## @INT_NOINIT
L_.str.2:                               ## @.str.2
	.asciz	"chip lost config; reinitialising\n"

	.comm	_LM8323_NUM_PWMS,4,2            ## @LM8323_NUM_PWMS
	.comm	_INT_PWM1,4,2                   ## @INT_PWM1
L_.str.3:                               ## @.str.3
	.asciz	"pwm%d engine completed\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm8323_irq
_lm8323_irq:                            ; @lm8323_irq
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x0, x1
	bl	_mutex_lock
Lloh0:
	adrp	x8, _LM8323_CMD_READ_INT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LM8323_CMD_READ_INT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_lm8323_read
	ldr	w8, [sp, #12]
	cmp	w0, #1
	ccmp	w8, #0, #4, eq
	b.ne	LBB0_2
LBB0_1:
	mov	x0, x19
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_2:
Lloh6:
	adrp	x25, _INT_KEYPAD@GOTPAGE
Lloh7:
	ldr	x25, [x25, _INT_KEYPAD@GOTPAGEOFF]
Lloh8:
	adrp	x26, _INT_ROTATOR@GOTPAGE
Lloh9:
	ldr	x26, [x26, _INT_ROTATOR@GOTPAGEOFF]
Lloh10:
	adrp	x20, l_.str.3@PAGE
Lloh11:
	add	x20, x20, l_.str.3@PAGEOFF
Lloh12:
	adrp	x27, _INT_ERROR@GOTPAGE
Lloh13:
	ldr	x27, [x27, _INT_ERROR@GOTPAGEOFF]
Lloh14:
	adrp	x28, _INT_NOINIT@GOTPAGE
Lloh15:
	ldr	x28, [x28, _INT_NOINIT@GOTPAGEOFF]
Lloh16:
	adrp	x21, _LM8323_NUM_PWMS@GOTPAGE
Lloh17:
	ldr	x21, [x21, _LM8323_NUM_PWMS@GOTPAGEOFF]
Lloh18:
	adrp	x22, _INT_PWM1@GOTPAGE
Lloh19:
	ldr	x22, [x22, _INT_PWM1@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh20:
	adrp	x8, _LM8323_CMD_READ_INT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _LM8323_CMD_READ_INT@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	mov	w3, #1
	bl	_lm8323_read
	ldr	w8, [sp, #12]
	cmp	w0, #1
	ccmp	w8, #0, #4, eq
	b.eq	LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	ldr	w9, [x25]
	and	w0, w9, w8
	bl	_likely
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	bl	_process_keys
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #16]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
	ldr	w8, [sp, #12]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #16]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_vdbg
	mov	x0, x19
	bl	_lm8323_process_error
	ldr	w8, [sp, #12]
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x28]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x19, #16]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_lm8323_configure
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, #0
	mov	x24, #0
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	add	x24, x24, #1
	add	x23, x23, #4
	cmp	x24, w8, sxtw
	b.ge	LBB0_3
LBB0_15:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w9, [sp, #12]
	ldr	w10, [x22]
	lsl	w10, w10, w24
	tst	w10, w9
	b.eq	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x0, [x19, #16]
	str	x24, [sp]
	mov	x1, x20
	bl	_dev_vdbg
	ldr	x8, [x19, #8]
	add	x0, x8, x23
	bl	_pwm_done
	ldr	w8, [x21]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_LM8323_CMD_READ_INT,4,2        ; @LM8323_CMD_READ_INT
	.comm	_INT_KEYPAD,4,2                 ; @INT_KEYPAD
	.comm	_INT_ROTATOR,4,2                ; @INT_ROTATOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rotator fired\n"

	.comm	_INT_ERROR,4,2                  ; @INT_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"error!\n"

	.comm	_INT_NOINIT,4,2                 ; @INT_NOINIT
l_.str.2:                               ; @.str.2
	.asciz	"chip lost config; reinitialising\n"

	.comm	_LM8323_NUM_PWMS,4,2            ; @LM8323_NUM_PWMS
	.comm	_INT_PWM1,4,2                   ; @INT_PWM1
l_.str.3:                               ; @.str.3
	.asciz	"pwm%d engine completed\n"

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