	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ac97_reset_wait
_ac97_reset_wait:                       ## @ac97_reset_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %rbx
	movq	_jiffies@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movslq	%esi, %r15
	addq	%rax, %r15
	movq	_AC97_VENDOR_ID1@GOTPCREL(%rip), %r12
	movq	_AC97_VENDOR_ID2@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_AC97_SCAP_DETECT_BY_VENDOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_7
## %bb.2:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	incl	%eax
	cmpw	$2, %ax
	jae	LBB0_11
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_schedule_timeout_uninterruptible
	movq	_jiffies@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_time_after_eq
	testq	%rax, %rax
	je	LBB0_9
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_AC97_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_AC97_EXTENDED_MID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	cmpw	$-1, %ax
	je	LBB0_1
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	andl	$1, %eax
	je	LBB0_1
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_AC97_REC_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$35333, %edx                    ## imm = 0x8A05
	callq	_snd_ac97_write_cache
	movq	_AC97_REC_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_ac97_read
	andl	$32767, %eax                    ## imm = 0x7FFF
	cmpl	$2565, %eax                     ## imm = 0xA05
	jne	LBB0_3
LBB0_11:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_9:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,4,2                    ## @jiffies
	.comm	_AC97_RESET,4,2                 ## @AC97_RESET
	.comm	_AC97_VENDOR_ID1,4,2            ## @AC97_VENDOR_ID1
	.comm	_AC97_VENDOR_ID2,4,2            ## @AC97_VENDOR_ID2
	.comm	_AC97_EXTENDED_MID,4,2          ## @AC97_EXTENDED_MID
	.comm	_AC97_SCAP_DETECT_BY_VENDOR,4,2 ## @AC97_SCAP_DETECT_BY_VENDOR
	.comm	_AC97_REC_GAIN,4,2              ## @AC97_REC_GAIN
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_ac97_reset_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ac97_reset_wait
_ac97_reset_wait:                       ; @ac97_reset_wait
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x20, x0
Lloh0:
	adrp	x22, _jiffies@GOTPAGE
Lloh1:
	ldr	x22, [x22, _jiffies@GOTPAGEOFF]
	ldrsw	x8, [x22]
Lloh2:
	adrp	x23, _AC97_RESET@GOTPAGE
Lloh3:
	ldr	x23, [x23, _AC97_RESET@GOTPAGEOFF]
Lloh4:
	adrp	x24, _AC97_VENDOR_ID1@GOTPAGE
Lloh5:
	ldr	x24, [x24, _AC97_VENDOR_ID1@GOTPAGEOFF]
Lloh6:
	adrp	x25, _AC97_VENDOR_ID2@GOTPAGE
Lloh7:
	ldr	x25, [x25, _AC97_VENDOR_ID2@GOTPAGEOFF]
Lloh8:
	adrp	x26, _AC97_SCAP_DETECT_BY_VENDOR@GOTPAGE
Lloh9:
	ldr	x26, [x26, _AC97_SCAP_DETECT_BY_VENDOR@GOTPAGEOFF]
	add	x21, x8, w1, sxtw
Lloh10:
	adrp	x27, _AC97_REC_GAIN@GOTPAGE
Lloh11:
	ldr	x27, [x27, _AC97_REC_GAIN@GOTPAGEOFF]
Lloh12:
	adrp	x28, _AC97_EXTENDED_MID@GOTPAGE
Lloh13:
	ldr	x28, [x28, _AC97_EXTENDED_MID@GOTPAGEOFF]
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_snd_ac97_read
	and	w8, w0, #0xffff
	cmp	w8, #0
	mov	w9, #65535
	ccmp	w8, w9, #4, ne
	b.ne	LBB0_7
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_schedule_timeout_uninterruptible
	ldr	w1, [x22]
	mov	x0, x21
	bl	_time_after_eq
	cbz	x0, LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x20
	bl	_snd_ac97_read
	ldr	w1, [x24]
	mov	x0, x20
	bl	_snd_ac97_read
	ldr	w1, [x25]
	mov	x0, x20
	bl	_snd_ac97_read
	cbz	w19, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x28]
	mov	x0, x20
	bl	_snd_ac97_read
	mvn	w8, w0
	and	w8, w8, #0xffff
	and	w9, w0, #0x1
	cmp	w8, #0
	ccmp	w9, #0, #4, ne
	b.ne	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x20]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_1
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w1, [x27]
	mov	x0, x20
	mov	w2, #35333
	bl	_snd_ac97_write_cache
	ldr	w1, [x27]
	mov	x0, x20
	bl	_snd_ac97_read
	and	w8, w0, #0x7fff
	cmp	w8, #2565
	b.ne	LBB0_2
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,4,2                    ; @jiffies
	.comm	_AC97_RESET,4,2                 ; @AC97_RESET
	.comm	_AC97_VENDOR_ID1,4,2            ; @AC97_VENDOR_ID1
	.comm	_AC97_VENDOR_ID2,4,2            ; @AC97_VENDOR_ID2
	.comm	_AC97_EXTENDED_MID,4,2          ; @AC97_EXTENDED_MID
	.comm	_AC97_SCAP_DETECT_BY_VENDOR,4,2 ; @AC97_SCAP_DETECT_BY_VENDOR
	.comm	_AC97_REC_GAIN,4,2              ; @AC97_REC_GAIN
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_ac97_reset_wait
.subsections_via_symbols
