	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_madc_threaded_irq_handler
_twl4030_madc_threaded_irq_handler:     ## @twl4030_madc_threaded_irq_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rsi, %rdi
	callq	_mutex_lock
	movq	_TWL4030_MODULE_MADC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	24(%r15), %edx
	leaq	-44(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	je	LBB0_7
## %bb.1:
	movl	16(%r15), %edi
	movl	24(%r15), %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_7:
	movl	(%rbx), %edi
	movl	20(%r15), %edx
	leaq	-48(%rbp), %rsi
	callq	_twl_i2c_read_u8
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	16(%r15), %edi
	movl	20(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	callq	_dev_err
	movq	_TWL4030_MADC_NUM_METHODS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.3:
	movl	$32, %ebx
	xorl	%r12d, %r12d
	movq	_twl4030_conversion_methods@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movslq	%eax, %rcx
	addq	$40, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_21
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r14
	cmpq	$0, -16(%r14,%rbx)
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r13), %rax
	movq	-24(%r14,%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	(%r14,%rbx), %edx
	movl	-4(%r14,%rbx), %ecx
	movl	-8(%r14,%rbx), %r8d
	movq	%r15, %rdi
	callq	_twl4030_madc_read_channels
	movl	$0, -32(%r14,%rbx)
	movq	$0, -16(%r14,%rbx)
	movq	_TWL4030_MADC_NUM_METHODS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_9:
	movl	-48(%rbp), %ecx
	notl	%ecx
	andl	-44(%rbp), %ecx
	movl	%ecx, -44(%rbp)
	movq	_TWL4030_MADC_NUM_METHODS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_21
## %bb.10:
	xorl	%r13d, %r13d
	leaq	L_.str.2(%rip), %r14
	xorl	%ebx, %ebx
	btl	%ebx, %ecx
	jae	LBB0_15
	.p2align	4, 0x90
LBB0_12:
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_twl4030_madc_disable_irq
	testl	%eax, %eax
	jns	LBB0_14
## %bb.13:
	movl	16(%r15), %edi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_dev_dbg
LBB0_14:
	movq	8(%r15), %rax
	movl	$1, (%rax,%r13)
	movl	(%r12), %eax
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_16
## %bb.22:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	-44(%rbp), %ecx
	addq	$40, %r13
	btl	%ebx, %ecx
	jb	LBB0_12
	jmp	LBB0_15
LBB0_16:
	testl	%eax, %eax
	jle	LBB0_21
## %bb.17:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_18 Depth=1
	incq	%r13
	movslq	%eax, %rcx
	addq	$40, %rbx
	cmpq	%rcx, %r13
	jge	LBB0_21
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r14
	cmpl	$0, (%r14,%rbx)
	je	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	_twl4030_conversion_methods@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r14,%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	32(%r14,%rbx), %edx
	movl	28(%r14,%rbx), %ecx
	movl	24(%r14,%rbx), %r8d
	movq	%r15, %rdi
	callq	_twl4030_madc_read_channels
	movl	$0, (%r14,%rbx)
	movq	$0, 16(%r14,%rbx)
	movl	(%r12), %eax
	jmp	LBB0_20
LBB0_21:
	movq	%r15, %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	_TWL4030_MODULE_MADC,4,2        ## @TWL4030_MODULE_MADC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to read isr register 0x%X\n"

L_.str.1:                               ## @.str.1
	.asciz	"unable to read imr register 0x%X\n"

	.comm	_TWL4030_MADC_NUM_METHODS,4,2   ## @TWL4030_MADC_NUM_METHODS
L_.str.2:                               ## @.str.2
	.asciz	"Disable interrupt failed %d\n"

	.comm	_twl4030_conversion_methods,8,3 ## @twl4030_conversion_methods
	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_twl4030_madc_threaded_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_madc_threaded_irq_handler
_twl4030_madc_threaded_irq_handler:     ; @twl4030_madc_threaded_irq_handler
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x0, x1
	bl	_mutex_lock
Lloh0:
	adrp	x20, _TWL4030_MODULE_MADC@GOTPAGE
Lloh1:
	ldr	x20, [x20, _TWL4030_MODULE_MADC@GOTPAGEOFF]
	ldr	w0, [x20]
	ldr	w2, [x19, #24]
	add	x1, sp, #12
	bl	_twl_i2c_read_u8
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #16]
	ldr	w2, [x19, #24]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:
	ldr	w0, [x20]
	ldr	w2, [x19, #20]
	add	x1, sp, #8
	bl	_twl_i2c_read_u8
	cbz	w0, LBB0_9
; %bb.3:
	ldp	w0, w2, [x19, #16]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_4:
	bl	_dev_err
Lloh6:
	adrp	x20, _TWL4030_MADC_NUM_METHODS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _TWL4030_MADC_NUM_METHODS@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.5:
	mov	x21, #0
	mov	x22, #0
Lloh8:
	adrp	x23, _twl4030_conversion_methods@GOTPAGE
Lloh9:
	ldr	x23, [x23, _twl4030_conversion_methods@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	add	x21, x21, #40
	cmp	x22, w8, sxtw
	b.ge	LBB0_21
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	add	x24, x9, x21
	ldr	x9, [x24, #16]
	cbz	x9, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x23]
	ldr	x9, [x24, #8]
	ldr	w1, [x8, x9, lsl #2]
	ldp	w3, w2, [x24, #28]
	ldr	w4, [x24, #24]
	mov	x0, x19
	bl	_twl4030_madc_read_channels
	str	wzr, [x24]
	str	xzr, [x24, #16]
	ldr	w8, [x20]
	b	LBB0_6
LBB0_9:
	ldp	w8, w9, [sp, #8]
	bic	w9, w9, w8
	str	w9, [sp, #12]
Lloh10:
	adrp	x22, _TWL4030_MADC_NUM_METHODS@GOTPAGE
Lloh11:
	ldr	x22, [x22, _TWL4030_MADC_NUM_METHODS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.10:
	mov	x23, #0
	mov	x20, #0
	mov	w24, #1
Lloh12:
	adrp	x21, l_.str.2@PAGE
Lloh13:
	add	x21, x21, l_.str.2@PAGEOFF
	lsr	w9, w9, w20
	tbz	w9, #0, LBB0_14
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_twl4030_madc_disable_irq
	tbz	w0, #31, LBB0_13
; %bb.12:
	ldr	w0, [x19, #16]
	mov	x1, x21
	mov	x2, x20
	bl	_dev_dbg
LBB0_13:
	ldr	x8, [x19, #8]
	str	w24, [x8, x23]
	ldr	w8, [x22]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w9, [sp, #12]
	add	x23, x23, #40
	lsr	w9, w9, w20
	tbnz	w9, #0, LBB0_11
	b	LBB0_14
LBB0_16:
	cmp	w8, #1
	b.lt	LBB0_21
; %bb.17:
	mov	x20, #0
	mov	x21, #0
Lloh14:
	adrp	x23, _twl4030_conversion_methods@GOTPAGE
Lloh15:
	ldr	x23, [x23, _twl4030_conversion_methods@GOTPAGEOFF]
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x21, x21, #1
	add	x20, x20, #40
	cmp	x21, w8, sxtw
	b.ge	LBB0_21
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	w10, [x9, x20]
	cbz	w10, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x8, [x23]
	add	x24, x9, x20
	ldr	x9, [x24, #8]
	ldr	w1, [x8, x9, lsl #2]
	ldp	w3, w2, [x24, #28]
	ldr	w4, [x24, #24]
	mov	x0, x19
	bl	_twl4030_madc_read_channels
	str	wzr, [x24]
	str	xzr, [x24, #16]
	ldr	w8, [x22]
	b	LBB0_18
LBB0_21:
	mov	x0, x19
	bl	_mutex_unlock
Lloh16:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_TWL4030_MODULE_MADC,4,2        ; @TWL4030_MODULE_MADC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to read isr register 0x%X\n"

l_.str.1:                               ; @.str.1
	.asciz	"unable to read imr register 0x%X\n"

	.comm	_TWL4030_MADC_NUM_METHODS,4,2   ; @TWL4030_MADC_NUM_METHODS
l_.str.2:                               ; @.str.2
	.asciz	"Disable interrupt failed %d\n"

	.comm	_twl4030_conversion_methods,8,3 ; @twl4030_conversion_methods
	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_twl4030_madc_threaded_irq_handler
.subsections_via_symbols
