	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wait_i2c_result
_wait_i2c_result:                       ## @wait_i2c_result
	.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
	testl	%edx, %edx
	jle	LBB0_4
## %bb.1:
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_REG_I2C_R@GOTPCREL(%rip), %r12
	movq	_STAT_SEQ_RUNNING@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	(%r12), %rdi
	addq	(%rax), %rdi
	callq	_ioread32
	testl	%eax, (%r13)
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$500, %edi                      ## imm = 0x1F4
	movl	$750, %esi                      ## imm = 0x2EE
	callq	_usleep_range
	decl	%ebx
	jne	LBB0_2
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %ecx
	xorl	%eax, %eax
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movl	%ecx, (%r14)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_I2C_R,8,3                  ## @REG_I2C_R
	.comm	_STAT_SEQ_RUNNING,4,2           ## @STAT_SEQ_RUNNING
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_wait_i2c_result
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wait_i2c_result
_wait_i2c_result:                       ; @wait_i2c_result
	.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
	cmp	w2, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _REG_I2C_R@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_I2C_R@GOTPAGEOFF]
Lloh2:
	adrp	x23, _STAT_SEQ_RUNNING@GOTPAGE
Lloh3:
	ldr	x23, [x23, _STAT_SEQ_RUNNING@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	ldr	w9, [x23]
	tst	w9, w0
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #500
	mov	w1, #750
	bl	_usleep_range
	subs	w20, w20, #1
	b.ne	LBB0_2
LBB0_4:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_5:
	cbz	x19, LBB0_7
; %bb.6:
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_I2C_R,8,3                  ; @REG_I2C_R
	.comm	_STAT_SEQ_RUNNING,4,2           ; @STAT_SEQ_RUNNING
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_wait_i2c_result
.subsections_via_symbols
