	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pd_wait_for
_pd_wait_for:                           ## @pd_wait_for
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	_PD_SPIN@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	movl	$0, %r14d
	jle	LBB0_5
## %bb.1:
	movl	%esi, %ebx
	movl	$1, %eax
	movq	_PD_SPIN_DEL@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edi
	callq	_udelay
	leal	1(%r14), %eax
	cmpl	(%r13), %r14d
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_status_reg
	movl	%eax, %ecx
	notl	%ecx
	testl	%ecx, %ebx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_STAT_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
LBB0_5:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_read_reg
	movl	%eax, %ebx
	shll	$8, %ebx
	movq	%r12, %rdi
	movl	$7, %esi
	callq	_read_reg
	addl	%ebx, %eax
	cmpl	(%r13), %r14d
	movq	_ERR_TMO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	$0, %ebx
	cmovgel	%ecx, %ebx
	orl	%eax, %ebx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.6:
	movq	_STAT_ERR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	andl	%ebx, %ecx
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_pd_print_error
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PD_SPIN,4,2                    ## @PD_SPIN
	.comm	_STAT_BUSY,4,2                  ## @STAT_BUSY
	.comm	_PD_SPIN_DEL,4,2                ## @PD_SPIN_DEL
	.comm	_ERR_TMO,4,2                    ## @ERR_TMO
	.comm	_STAT_ERR,4,2                   ## @STAT_ERR
	.no_dead_strip	_pd_wait_for
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pd_wait_for
_pd_wait_for:                           ; @pd_wait_for
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, _PD_SPIN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PD_SPIN@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, x1
	mov	w8, #1
Lloh2:
	adrp	x24, _STAT_BUSY@GOTPAGE
Lloh3:
	ldr	x24, [x24, _STAT_BUSY@GOTPAGEOFF]
Lloh4:
	adrp	x25, _PD_SPIN_DEL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PD_SPIN_DEL@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x25]
	bl	_udelay
	ldr	w9, [x22]
	add	w8, w23, #1
	cmp	w23, w9
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x23, x8
	mov	x0, x20
	bl	_status_reg
	bics	wzr, w21, w0
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_2
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	mov	x0, x20
	mov	w1, #1
	bl	_read_reg
	mov	x21, x0
	mov	x0, x20
	mov	w1, #7
	bl	_read_reg
	add	w9, w0, w21, lsl #8
	ldr	w10, [x22]
Lloh6:
	adrp	x8, _ERR_TMO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERR_TMO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w23, w10
	csel	w10, wzr, w8, lt
	orr	w21, w10, w9
	cbz	x19, LBB0_9
; %bb.7:
Lloh9:
	adrp	x9, _STAT_ERR@GOTPAGE
Lloh10:
	ldr	x9, [x9, _STAT_ERR@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w8, w21, w8
	cbz	w8, LBB0_9
; %bb.8:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_pd_print_error
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PD_SPIN,4,2                    ; @PD_SPIN
	.comm	_STAT_BUSY,4,2                  ; @STAT_BUSY
	.comm	_PD_SPIN_DEL,4,2                ; @PD_SPIN_DEL
	.comm	_ERR_TMO,4,2                    ; @ERR_TMO
	.comm	_STAT_ERR,4,2                   ; @STAT_ERR
	.no_dead_strip	_pd_wait_for
.subsections_via_symbols
