	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ac97_proc_read
_snd_ac97_proc_read:                    ## @snd_ac97_proc_read
	.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	%rsi, %r15
	movq	(%rdi), %rbx
	leaq	4(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	$-192, %eax
	andl	(%rbx), %eax
	movq	_AC97_ID_AD1881@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_8
## %bb.1:
	movq	24(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	_AC97_AD_SERIAL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$28672, %edx                    ## imm = 0x7000
	callq	_snd_ac97_update_bits
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_snd_ac97_proc_read_main
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_snd_iprintf
	movq	24(%rbx), %rax
LBB0_3:
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.4:
	movq	_AC97_AD_SERIAL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	4(%rcx), %ecx
	orl	4(%rax), %ecx
	movq	%rbx, %rdi
	movl	$28672, %edx                    ## imm = 0x7000
	callq	_snd_ac97_update_bits
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_snd_ac97_proc_read_main
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_snd_iprintf
	movq	24(%rbx), %rax
LBB0_5:
	cmpq	$0, 16(%rax)
	je	LBB0_7
## %bb.6:
	movq	_AC97_AD_SERIAL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movl	8(%rcx), %ecx
	orl	8(%rax), %ecx
	movq	%rbx, %rdi
	movl	$28672, %edx                    ## imm = 0x7000
	callq	_snd_ac97_update_bits
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$2, %edx
	callq	_snd_ac97_proc_read_main
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_snd_iprintf
LBB0_7:
	movq	_AC97_AD_SERIAL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$28672, %edx                    ## imm = 0x7000
	movl	$28672, %ecx                    ## imm = 0x7000
	callq	_snd_ac97_update_bits
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_snd_iprintf
	movq	8(%rbx), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movl	8(%rax), %r8d
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_snd_iprintf
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	movl	4(%rax), %ecx
	movl	8(%rax), %r8d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_snd_iprintf
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_snd_ac97_proc_read_main
LBB0_9:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_ID_AD1881,4,2             ## @AC97_ID_AD1881
	.comm	_AC97_AD_SERIAL_CFG,4,2         ## @AC97_AD_SERIAL_CFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n\n"

L_.str.1:                               ## @.str.1
	.asciz	"\nAD18XX configuration\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unchained        : 0x%04x,0x%04x,0x%04x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Chained          : 0x%04x,0x%04x,0x%04x\n"

	.no_dead_strip	_snd_ac97_proc_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ac97_proc_read
_snd_ac97_proc_read:                    ; @snd_ac97_proc_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	ldr	x21, [x0]
	add	x19, x21, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21]
	mov	w9, #-192
	and	w8, w8, w9
Lloh0:
	adrp	x9, _AC97_ID_AD1881@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AC97_ID_AD1881@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.1:
	ldr	x8, [x21, #24]
	ldr	x9, [x8]
Lloh3:
	adrp	x22, _AC97_AD_SERIAL_CFG@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AC97_AD_SERIAL_CFG@GOTPAGEOFF]
	cbz	x9, LBB0_3
; %bb.2:
	ldr	w1, [x22]
	ldp	x8, x9, [x21, #8]
	ldr	w8, [x8]
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x21
	mov	w2, #28672
	bl	_snd_ac97_update_bits
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_snd_ac97_proc_read_main
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_snd_iprintf
	ldr	x8, [x21, #24]
LBB0_3:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.4:
	ldr	w1, [x22]
	ldp	x8, x9, [x21, #8]
	ldr	w8, [x8, #4]
	ldr	w9, [x9, #4]
	orr	w3, w9, w8
	mov	x0, x21
	mov	w2, #28672
	bl	_snd_ac97_update_bits
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_snd_ac97_proc_read_main
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_snd_iprintf
	ldr	x8, [x21, #24]
LBB0_5:
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w1, [x22]
	ldp	x8, x9, [x21, #8]
	ldr	w8, [x8, #8]
	ldr	w9, [x9, #8]
	orr	w3, w9, w8
	mov	x0, x21
	mov	w2, #28672
	bl	_snd_ac97_update_bits
	mov	x0, x21
	mov	x1, x20
	mov	w2, #2
	bl	_snd_ac97_proc_read_main
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_snd_iprintf
LBB0_7:
	ldr	w1, [x22]
	mov	x0, x21
	mov	w2, #28672
	mov	w3, #28672
	bl	_snd_ac97_update_bits
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_snd_iprintf
	ldr	x8, [x21, #8]
	ldp	w9, w10, [x8]
	ldr	w8, [x8, #8]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_snd_iprintf
	ldr	x8, [x21, #16]
	ldp	w9, w10, [x8]
	ldr	w8, [x8, #8]
	stp	x10, x8, [sp, #8]
	str	x9, [sp]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_snd_iprintf
	b	LBB0_9
LBB0_8:
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_snd_ac97_proc_read_main
LBB0_9:
	mov	x0, x19
	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
	add	sp, sp, #80
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_ID_AD1881,4,2             ; @AC97_ID_AD1881
	.comm	_AC97_AD_SERIAL_CFG,4,2         ; @AC97_AD_SERIAL_CFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n\n"

l_.str.1:                               ; @.str.1
	.asciz	"\nAD18XX configuration\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unchained        : 0x%04x,0x%04x,0x%04x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Chained          : 0x%04x,0x%04x,0x%04x\n"

	.no_dead_strip	_snd_ac97_proc_read
.subsections_via_symbols
