	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tboot_wait_for_aps
_tboot_wait_for_aps:                    ## @tboot_wait_for_aps
	.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
	movl	%edi, %r15d
	movq	_AP_WAIT_TIMEOUT@GOTPCREL(%rip), %rax
	movq	_HZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	imulq	(%rax), %rbx
	movq	_tboot@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_atomic_read
	testq	%rbx, %rbx
	setne	%cl
	cmpl	%r15d, %eax
	je	LBB0_5
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.2:
	decq	%rbx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_mdelay
	movq	(%r14), %rdi
	callq	_atomic_read
	addq	$-1, %rbx
	setb	%cl
	cmpl	%r15d, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	%cl, %cl
	jne	LBB0_3
LBB0_5:
	testb	%cl, %cl
	je	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_pr_warning
LBB0_7:
	movq	(%r14), %rdi
	callq	_atomic_read
	xorl	%ecx, %ecx
	cmpl	%r15d, %eax
	setne	%cl
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AP_WAIT_TIMEOUT,8,3            ## @AP_WAIT_TIMEOUT
	.comm	_HZ,8,3                         ## @HZ
	.comm	_tboot,8,3                      ## @tboot
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tboot wait for APs timeout\n"

	.no_dead_strip	_tboot_wait_for_aps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tboot_wait_for_aps
_tboot_wait_for_aps:                    ; @tboot_wait_for_aps
	.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	x8, _AP_WAIT_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AP_WAIT_TIMEOUT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _HZ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	x9, [x9]
	mul	x21, x9, x8
Lloh6:
	adrp	x20, _tboot@GOTPAGE
Lloh7:
	ldr	x20, [x20, _tboot@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_atomic_read
	cmp	x21, #0
	cset	w8, ne
	cmp	w0, w19
	ccmp	x21, #0, #4, ne
	b.eq	LBB0_4
; %bb.1:
	sub	x21, x21, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_mdelay
	ldr	x0, [x20]
	bl	_atomic_read
	subs	x21, x21, #1
	cset	w8, hs
	cmp	w0, w19
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w8, #0, LBB0_2
LBB0_4:
	cbz	w8, LBB0_6
; %bb.5:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warning
LBB0_6:
	ldr	x0, [x20]
	bl	_atomic_read
	cmp	w0, w19
	cset	w0, ne
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_AP_WAIT_TIMEOUT,8,3            ; @AP_WAIT_TIMEOUT
	.comm	_HZ,8,3                         ; @HZ
	.comm	_tboot,8,3                      ; @tboot
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tboot wait for APs timeout\n"

	.no_dead_strip	_tboot_wait_for_aps
.subsections_via_symbols
