	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_fm_ready                  ## -- Begin function wait_fm_ready
	.p2align	4, 0x90
_wait_fm_ready:                         ## @wait_fm_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_ICODE_FUNCTIONAL_SIMULATOR@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	movq	_jiffies@GOTPCREL(%rip), %r12
	addq	(%r12), %rbx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_get_firmware_state
	cmpl	$160, %eax
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	jne	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1950, %edi                     ## imm = 0x79E
	movl	$2050, %esi                     ## imm = 0x802
	callq	_usleep_range
	jmp	LBB0_2
LBB0_4:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ICODE_FUNCTIONAL_SIMULATOR,8,3 ## @ICODE_FUNCTIONAL_SIMULATOR
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wait_fm_ready                  ; -- Begin function wait_fm_ready
	.p2align	2
_wait_fm_ready:                         ; @wait_fm_ready
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _ICODE_FUNCTIONAL_SIMULATOR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ICODE_FUNCTIONAL_SIMULATOR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	x0, x1
	bl	_msecs_to_jiffies
	mov	x20, x0
Lloh3:
	adrp	x21, _jiffies@GOTPAGE
Lloh4:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x22, [x21]
	mov	x0, x19
	bl	_get_firmware_state
	cmp	w0, #160
	b.eq	LBB0_5
; %bb.2:
	add	x20, x22, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	mov	x1, x20
	bl	_time_after
	cbnz	x0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1950
	mov	w1, #2050
	bl	_usleep_range
	mov	x0, x19
	bl	_get_firmware_state
	cmp	w0, #160
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
LBB0_6:
	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_7:
Lloh5:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ICODE_FUNCTIONAL_SIMULATOR,8,3 ; @ICODE_FUNCTIONAL_SIMULATOR
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
