	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function em28xx_is_ac97_ready
_em28xx_is_ac97_ready:                  ## @em28xx_is_ac97_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_EM28XX_AC97_XFER_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r15, %rbx
	movq	%rbx, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_EM28XX_R43_AC97BUSY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_em28xx_read_reg
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %al
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$5, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	jne	LBB0_2
LBB0_6:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_4:
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_EM28XX_AC97_XFER_TIMEOUT,4,2   ## @EM28XX_AC97_XFER_TIMEOUT
	.comm	_EM28XX_R43_AC97BUSY,4,2        ## @EM28XX_R43_AC97BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"AC97 command still being executed: not handled properly!\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_em28xx_is_ac97_ready
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function em28xx_is_ac97_ready
_em28xx_is_ac97_ready:                  ; @em28xx_is_ac97_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
	mov	x19, x0
Lloh0:
	adrp	x8, _jiffies@GOTPAGE
Lloh1:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x20, [x8]
Lloh3:
	adrp	x8, _EM28XX_AC97_XFER_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EM28XX_AC97_XFER_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	add	x20, x0, x20
	mov	x0, x20
	bl	_time_is_after_jiffies
	cbz	x0, LBB0_5
; %bb.1:
Lloh6:
	adrp	x21, _EM28XX_R43_AC97BUSY@GOTPAGE
Lloh7:
	ldr	x21, [x21, _EM28XX_R43_AC97BUSY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_em28xx_read_reg
	tbnz	w0, #31, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	tbz	w0, #0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #5
	bl	_msleep
	mov	x0, x20
	bl	_time_is_after_jiffies
	cbnz	x0, LBB0_2
LBB0_5:
	ldr	x0, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_EM28XX_AC97_XFER_TIMEOUT,4,2   ; @EM28XX_AC97_XFER_TIMEOUT
	.comm	_EM28XX_R43_AC97BUSY,4,2        ; @EM28XX_R43_AC97BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"AC97 command still being executed: not handled properly!\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_em28xx_is_ac97_ready
.subsections_via_symbols
