	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ali_reset_5451
_snd_ali_reset_5451:                    ## @snd_ali_reset_5451
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	leaq	-36(%rbp), %r15
	movq	%r14, %rdi
	movl	$124, %esi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movl	$134217728, %edx                ## imm = 0x8000000
	orl	-36(%rbp), %edx
	movq	%r14, %rdi
	movl	$124, %esi
	callq	_pci_write_config_dword
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_udelay
	movq	%r14, %rdi
	movl	$124, %esi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movl	$-134217729, %edx               ## imm = 0xF7FFFFFF
	andl	-36(%rbp), %edx
	movq	%r14, %rdi
	movl	$124, %esi
	callq	_pci_write_config_dword
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_udelay
LBB0_2:
	movq	(%r12), %r14
	leaq	-36(%rbp), %r15
	movq	%r14, %rdi
	movl	$68, %esi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movl	$786432, %edx                   ## imm = 0xC0000
	orl	-36(%rbp), %edx
	movq	%r14, %rdi
	movl	$68, %esi
	callq	_pci_write_config_dword
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_udelay
	movq	%r14, %rdi
	movl	$68, %esi
	movq	%r15, %rdx
	callq	_pci_read_config_dword
	movl	$-262145, %edx                  ## imm = 0xFFFBFFFF
	andl	-36(%rbp), %edx
	movq	%r14, %rdi
	movl	$68, %esi
	callq	_pci_write_config_dword
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_udelay
	movw	$-200, %bx
	movq	_AC97_POWERDOWN@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_snd_ali_codec_peek
                                        ## kill: def $ax killed $ax def $eax
	notl	%eax
	testb	$15, %al
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_udelay
	incw	%bx
	jne	LBB0_3
LBB0_5:
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_POWERDOWN,4,2             ## @AC97_POWERDOWN
	.no_dead_strip	_snd_ali_reset_5451
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ali_reset_5451
_snd_ali_reset_5451:                    ; @snd_ali_reset_5451
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_2
; %bb.1:
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #124
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x8000000
	mov	x0, x20
	mov	w1, #124
	bl	_pci_write_config_dword
	mov	w0, #5000
	bl	_udelay
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #124
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	and	w2, w8, #0xf7ffffff
	mov	x0, x20
	mov	w1, #124
	bl	_pci_write_config_dword
	mov	w0, #5000
	bl	_udelay
LBB0_2:
	ldr	x20, [x19]
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #68
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	orr	w2, w8, #0xc0000
	mov	x0, x20
	mov	w1, #68
	bl	_pci_write_config_dword
	mov	w0, #500
	bl	_udelay
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #68
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	and	w2, w8, #0xfffbffff
	mov	x0, x20
	mov	w1, #68
	bl	_pci_write_config_dword
	mov	w0, #5000
	bl	_udelay
	mov	w21, #199
Lloh0:
	adrp	x20, _AC97_POWERDOWN@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AC97_POWERDOWN@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x20]
	mov	x0, x19
	mov	w1, #0
	bl	_snd_ali_codec_peek
	mvn	w8, w0
	tst	w8, #0xf
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #5000
	bl	_udelay
	sub	w8, w21, #1
	tst	w21, #0xffff
	mov	x21, x8
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_POWERDOWN,4,2             ; @AC97_POWERDOWN
	.no_dead_strip	_snd_ali_reset_5451
.subsections_via_symbols
