	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si2165_wait_init_done
_si2165_wait_init_done:                 ## @si2165_wait_init_done
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	$0, -28(%rbp)
	movq	_REG_INIT_DONE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	callq	_si2165_readreg8
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	xorl	%ebx, %ebx
	cmpl	$1, -28(%rbp)
	je	LBB0_10
## %bb.2:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$50000, %esi                    ## imm = 0xC350
	callq	_usleep_range
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_si2165_readreg8
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	cmpl	$1, -28(%rbp)
	je	LBB0_10
## %bb.4:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$50000, %esi                    ## imm = 0xC350
	callq	_usleep_range
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_si2165_readreg8
	testl	%eax, %eax
	js	LBB0_9
## %bb.5:
	cmpl	$1, -28(%rbp)
	je	LBB0_10
## %bb.6:
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$50000, %esi                    ## imm = 0xC350
	callq	_usleep_range
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_INIT_DONE,4,2              ## @REG_INIT_DONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"init_done was not set\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si2165_wait_init_done
_si2165_wait_init_done:                 ; @si2165_wait_init_done
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x20, _REG_INIT_DONE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _REG_INIT_DONE@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_si2165_readreg8
	tbnz	w0, #31, LBB0_7
; %bb.1:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.2:
	mov	w0, #1000
	mov	w1, #50000
	bl	_usleep_range
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_si2165_readreg8
	tbnz	w0, #31, LBB0_7
; %bb.3:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.4:
	mov	w0, #1000
	mov	w1, #50000
	bl	_usleep_range
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_si2165_readreg8
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_8
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	mov	w0, #1000
	mov	w1, #50000
	bl	_usleep_range
	ldr	x0, [x19]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_INIT_DONE,4,2              ; @REG_INIT_DONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"init_done was not set\n"

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