	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_fw_wait_ready               ## -- Begin function be_fw_wait_ready
	.p2align	4, 0x90
_be_fw_wait_ready:                      ## @be_fw_wait_ready
	.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	%rdi, %r15
	movq	(%rdi), %r14
	callq	_lancer_chip
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lancer_wait_ready              ## TAILCALL
LBB0_1:
	movl	$-2, %ebx
	movq	_POST_STAGE_ARMFW_RDY@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_be_POST_stage_get
	cmpq	(%r12), %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	addl	$2, %ebx
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_info
	movl	$2000, %edi                     ## imm = 0x7D0
	callq	_msleep_interruptible
	testq	%rax, %rax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$58, %ebx
	jb	LBB0_2
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_dev_err
	movl	$-1, %ebx
	jmp	LBB0_8
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINTR@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
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	_POST_STAGE_ARMFW_RDY,8,3       ## @POST_STAGE_ARMFW_RDY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Waiting for POST, %ds elapsed\n"

L_.str.1:                               ## @.str.1
	.asciz	"Waiting for POST aborted\n"

	.comm	_EINTR,4,2                      ## @EINTR
L_.str.2:                               ## @.str.2
	.asciz	"POST timeout; stage=0x%x\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_fw_wait_ready               ; -- Begin function be_fw_wait_ready
	.p2align	2
_be_fw_wait_ready:                      ; @be_fw_wait_ready
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	ldr	x19, [x0]
	bl	_lancer_chip
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	add	sp, sp, #80
	b	_lancer_wait_ready
LBB0_2:
	mov	w23, #-2
Lloh0:
	adrp	x24, _POST_STAGE_ARMFW_RDY@GOTPAGE
Lloh1:
	ldr	x24, [x24, _POST_STAGE_ARMFW_RDY@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_be_POST_stage_get
	ldr	x8, [x24]
	cmp	x0, x8
	b.eq	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	add	w2, w23, #2
	mov	x0, x19
	mov	x1, x21
	bl	_dev_info
	mov	w0, #2000
	bl	_msleep_interruptible
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #2
	cmp	w23, #58
	b.lo	LBB0_3
; %bb.6:
	str	x22, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w0, #-1
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh8:
	adrp	x8, _EINTR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_POST_STAGE_ARMFW_RDY,8,3       ; @POST_STAGE_ARMFW_RDY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Waiting for POST, %ds elapsed\n"

l_.str.1:                               ; @.str.1
	.asciz	"Waiting for POST aborted\n"

	.comm	_EINTR,4,2                      ; @EINTR
l_.str.2:                               ; @.str.2
	.asciz	"POST timeout; stage=0x%x\n"

.subsections_via_symbols
