	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function twl4030_madc_wait_conversion_ready
_twl4030_madc_wait_conversion_ready:    ## @twl4030_madc_wait_conversion_ready
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movl	%esi, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	addq	%rbx, %r12
	leaq	-44(%rbp), %r13
	movq	_TWL4030_MADC_BUSY@GOTPCREL(%rip), %r14
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%r12, %rsi
	callq	_time_after
	testl	%eax, %eax
	jne	LBB0_6
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_TWL4030_MODULE_MADC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_twl_i2c_read_u8
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-44(%rbp), %eax
	testl	%eax, (%r14)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_TWL4030_MADC_EOC_SW@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
	jmp	LBB0_7
LBB0_6:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_2:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_7:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_TWL4030_MODULE_MADC,4,2        ## @TWL4030_MODULE_MADC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to read status register 0x%X\n"

	.comm	_TWL4030_MADC_BUSY,4,2          ## @TWL4030_MADC_BUSY
	.comm	_TWL4030_MADC_EOC_SW,4,2        ## @TWL4030_MADC_EOC_SW
L_.str.1:                               ## @.str.1
	.asciz	"conversion timeout!\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_twl4030_madc_wait_conversion_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function twl4030_madc_wait_conversion_ready
_twl4030_madc_wait_conversion_ready:    ; @twl4030_madc_wait_conversion_ready
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x2
	mov	x20, x0
Lloh0:
	adrp	x23, _jiffies@GOTPAGE
Lloh1:
	ldr	x23, [x23, _jiffies@GOTPAGEOFF]
	ldr	x21, [x23]
	mov	x0, x1
	bl	_msecs_to_jiffies
	add	x21, x0, x21
Lloh2:
	adrp	x24, _TWL4030_MODULE_MADC@GOTPAGE
Lloh3:
	ldr	x24, [x24, _TWL4030_MODULE_MADC@GOTPAGEOFF]
Lloh4:
	adrp	x25, _TWL4030_MADC_BUSY@GOTPAGE
Lloh5:
	ldr	x25, [x25, _TWL4030_MADC_BUSY@GOTPAGEOFF]
Lloh6:
	adrp	x26, _TWL4030_MADC_EOC_SW@GOTPAGE
Lloh7:
	ldr	x26, [x26, _TWL4030_MADC_EOC_SW@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #500
	mov	w1, #2000
	bl	_usleep_range
	ldr	x0, [x23]
	mov	x1, x21
	bl	_time_after
	cbnz	w0, LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	add	x1, sp, #12
	mov	x2, x19
	bl	_twl_i2c_read_u8
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [sp, #12]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_1
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh10:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_7
LBB0_6:
	ldr	w0, [x20]
	str	x19, [sp]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_TWL4030_MODULE_MADC,4,2        ; @TWL4030_MODULE_MADC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to read status register 0x%X\n"

	.comm	_TWL4030_MADC_BUSY,4,2          ; @TWL4030_MADC_BUSY
	.comm	_TWL4030_MADC_EOC_SW,4,2        ; @TWL4030_MADC_EOC_SW
l_.str.1:                               ; @.str.1
	.asciz	"conversion timeout!\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_twl4030_madc_wait_conversion_ready
.subsections_via_symbols
