	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pt_wait
_pt_wait:                               ## @pt_wait
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r13
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	callq	_status_reg
	movl	%eax, %ebx
	testl	%r15d, %eax
	jne	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %ecx
	andl	%r14d, %ecx
	testl	%r14d, %r14d
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_4
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_PT_SPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r12d
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_PT_SPIN_DEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
	incl	%r12d
	jmp	LBB0_1
LBB0_7:
	andl	%ebx, %r14d
	incl	%r12d
	movl	%r14d, %ecx
	jmp	LBB0_8
LBB0_4:
	movq	_PT_SPIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	movq	_STAT_ERR@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_10
## %bb.9:
	xorl	%r15d, %r15d
	cmpl	%eax, %r12d
	jl	LBB0_13
LBB0_10:
	movq	%r13, %rdi
	movl	$7, %esi
	callq	_read_reg
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_read_reg
	movl	%eax, %r14d
	movq	%r13, %rdi
	movl	$2, %esi
	callq	_read_reg
	movl	%r14d, %r15d
	orl	$256, %r15d                     ## imm = 0x100
	movq	_PT_SPIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
                                        ## kill: def $eax killed $eax def $rax
	cmovll	%r14d, %r15d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	testq	%rdx, %rdx
	je	LBB0_12
## %bb.11:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %esi
	subq	$8, %rsp
	leaq	L_.str(%rip), %rdi
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	pushq	%rax
	pushq	%r12
	pushq	%r15
	callq	_printk
	addq	$32, %rsp
LBB0_12:
	shll	$8, %r15d
	addl	%r14d, %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PT_SPIN,4,2                    ## @PT_SPIN
	.comm	_PT_SPIN_DEL,4,2                ## @PT_SPIN_DEL
	.comm	_STAT_ERR,4,2                   ## @STAT_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %s %s: alt=0x%x stat=0x%x err=0x%x loop=%d phase=%d\n"

	.no_dead_strip	_pt_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pt_wait
_pt_wait:                               ; @pt_wait
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x21, x3
	mov	x25, x2
	mov	x26, x1
	mov	x22, x0
	mov	w20, #0
	ldr	x24, [x0, #8]
Lloh0:
	adrp	x27, _PT_SPIN@GOTPAGE
Lloh1:
	ldr	x27, [x27, _PT_SPIN@GOTPAGEOFF]
Lloh2:
	adrp	x28, _PT_SPIN_DEL@GOTPAGE
Lloh3:
	ldr	x28, [x28, _PT_SPIN_DEL@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	bl	_status_reg
	mov	x23, x0
	tst	w0, w26
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	and	w9, w23, w25
	cbz	w25, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cbnz	w9, LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x27]
	cmp	w20, w8
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x28]
	bl	_udelay
	add	w20, w20, #1
	b	LBB0_1
LBB0_6:
	and	w9, w23, w25
	add	w20, w20, #1
	b	LBB0_8
LBB0_7:
	ldr	w8, [x27]
LBB0_8:
Lloh4:
	adrp	x10, _STAT_ERR@GOTPAGE
Lloh5:
	ldr	x10, [x10, _STAT_ERR@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	and	w9, w9, w10
	cmp	w9, #0
	ccmp	w20, w8, #0, eq
	b.lt	LBB0_12
; %bb.9:
	mov	x0, x24
	mov	w1, #7
	bl	_read_reg
	mov	x25, x0
	mov	x0, x24
	mov	w1, #1
	bl	_read_reg
	mov	x26, x0
	mov	x0, x24
	mov	w1, #2
	bl	_read_reg
	ldr	w8, [x27]
	orr	w9, w26, #0x100
	cmp	w20, w8
	csel	w24, w26, w9, lt
	cbz	x21, LBB0_11
; %bb.10:
	ldr	w1, [x22]
	str	w0, [sp]
Lloh7:
	adrp	x0, l_.str@PAGE
Lloh8:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	mov	x3, x19
	mov	x4, x23
	mov	x5, x25
	mov	x6, x24
	mov	x7, x20
	bl	_printk
LBB0_11:
	add	w0, w25, w24, lsl #8
	b	LBB0_13
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PT_SPIN,4,2                    ; @PT_SPIN
	.comm	_PT_SPIN_DEL,4,2                ; @PT_SPIN_DEL
	.comm	_STAT_ERR,4,2                   ; @STAT_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %s %s: alt=0x%x stat=0x%x err=0x%x loop=%d phase=%d\n"

	.no_dead_strip	_pt_wait
.subsections_via_symbols
