	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pasemi_smb_waitready
_pasemi_smb_waitready:                  ## @pasemi_smb_waitready
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_REG_SMSTA@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_reg_read
	movl	%eax, %ebx
	movq	_SMSTA_XEN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.1:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.2:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.3:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.4:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.5:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.6:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.7:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.8:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.9:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	jne	LBB0_11
## %bb.10:
	movl	$1, %edi
	callq	_msleep
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_read
	movl	%eax, %ebx
	movl	(%r12), %edx
	testl	%eax, %edx
	je	LBB0_14
LBB0_11:
	movq	_SMSTA_MTN@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
LBB0_15:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_16:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_12:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_reg_write
	xorl	%eax, %eax
LBB0_13:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_SMSTA_MTN@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_15
## %bb.17:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_warn
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_reg_write
	movq	_ETIME@GOTPCREL(%rip), %rcx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_SMSTA,4,2                  ## @REG_SMSTA
	.comm	_SMSTA_XEN,4,2                  ## @SMSTA_XEN
	.comm	_SMSTA_MTN,4,2                  ## @SMSTA_MTN
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout, status 0x%08x\n"

	.comm	_ETIME,4,2                      ## @ETIME
	.no_dead_strip	_pasemi_smb_waitready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pasemi_smb_waitready
_pasemi_smb_waitready:                  ; @pasemi_smb_waitready
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x20, _REG_SMSTA@GOTPAGE
Lloh1:
	ldr	x20, [x20, _REG_SMSTA@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_reg_read
Lloh2:
	adrp	x21, _SMSTA_XEN@GOTPAGE
Lloh3:
	ldr	x21, [x21, _SMSTA_XEN@GOTPAGEOFF]
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.1:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.2:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.3:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.4:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.5:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.6:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.7:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.8:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.9:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	tst	w2, w0
	b.ne	LBB0_12
; %bb.10:
	mov	w0, #1
	bl	_msleep
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_read
	ldr	w2, [x21]
	mov	x20, x0
	tst	w2, w0
	b.eq	LBB0_17
; %bb.11:
	mov	x0, x20
Lloh4:
	adrp	x20, _REG_SMSTA@GOTPAGE
Lloh5:
	ldr	x20, [x20, _REG_SMSTA@GOTPAGEOFF]
LBB0_12:
Lloh6:
	adrp	x8, _SMSTA_MTN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SMSTA_MTN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_15
LBB0_13:
Lloh9:
	adrp	x8, _ENXIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_15:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_reg_write
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_17:
Lloh11:
	adrp	x8, _SMSTA_MTN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SMSTA_MTN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w20
Lloh14:
	adrp	x8, _REG_SMSTA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _REG_SMSTA@GOTPAGEOFF]
	b.ne	LBB0_13
; %bb.18:
	ldr	x0, [x19]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x21, x8
	mov	x2, x20
	bl	_dev_warn
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_reg_write
Lloh18:
	adrp	x8, _ETIME@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_SMSTA,4,2                  ; @REG_SMSTA
	.comm	_SMSTA_XEN,4,2                  ; @SMSTA_XEN
	.comm	_SMSTA_MTN,4,2                  ; @SMSTA_MTN
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout, status 0x%08x\n"

	.comm	_ETIME,4,2                      ; @ETIME
	.no_dead_strip	_pasemi_smb_waitready
.subsections_via_symbols
