	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_conversion_complete_polled
_wait_conversion_complete_polled:       ## @wait_conversion_complete_polled
	.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	8(%rdi), %r14
	movq	_AK8975_MAX_CONVERSION_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_6
## %bb.1:
	movq	%rdi, %r15
	movq	_AK8975_CONVERSION_DONE_POLL_TIME@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_ST1@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	callq	_msleep
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	(%r13), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r14, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	jne	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_AK8975_CONVERSION_DONE_POLL_TIME@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	subq	%rdi, %r12
	jne	LBB0_2
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AK8975_MAX_CONVERSION_TIMEOUT,8,3 ## @AK8975_MAX_CONVERSION_TIMEOUT
	.comm	_AK8975_CONVERSION_DONE_POLL_TIME,8,3 ## @AK8975_CONVERSION_DONE_POLL_TIME
	.comm	_ST1,8,3                        ## @ST1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error in reading ST1\n"

L_.str.1:                               ## @.str.1
	.asciz	"Conversion timeout happened\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_wait_conversion_complete_polled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_conversion_complete_polled
_wait_conversion_complete_polled:       ; @wait_conversion_complete_polled
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _AK8975_MAX_CONVERSION_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AK8975_MAX_CONVERSION_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	cbz	x22, LBB0_5
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x23, _AK8975_CONVERSION_DONE_POLL_TIME@GOTPAGE
Lloh4:
	ldr	x23, [x23, _AK8975_CONVERSION_DONE_POLL_TIME@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh5:
	adrp	x24, _ST1@GOTPAGE
Lloh6:
	ldr	x24, [x24, _ST1@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_msleep
	ldr	x8, [x20]
	ldr	x8, [x8]
	ldr	x9, [x24]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x19
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w21, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x23]
	subs	x22, x22, x0
	b.ne	LBB0_2
LBB0_5:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_AK8975_MAX_CONVERSION_TIMEOUT,8,3 ; @AK8975_MAX_CONVERSION_TIMEOUT
	.comm	_AK8975_CONVERSION_DONE_POLL_TIME,8,3 ; @AK8975_CONVERSION_DONE_POLL_TIME
	.comm	_ST1,8,3                        ; @ST1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error in reading ST1\n"

l_.str.1:                               ; @.str.1
	.asciz	"Conversion timeout happened\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_wait_conversion_complete_polled
.subsections_via_symbols
