	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ac97_volume_put
_ac97_volume_put:                       ## @ac97_volume_put
	.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
	movq	%rsi, %r15
	movq	8(%rdi), %r14
	movl	(%rdi), %ebx
	movl	%ebx, %r13d
	shrl	$24, %r13d
	andl	$1, %r13d
	movzbl	%bl, %r12d
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %edx
	callq	_oxygen_read_ac97
	movl	%eax, %r12d
	testl	$65536, %ebx                    ## imm = 0x10000
	jne	LBB0_2
## %bb.1:
	movl	%r12d, %ebx
	andl	$-32, %ebx
	movq	(%r15), %rax
	movl	(%rax), %eax
	andl	$31, %eax
	movl	$31, %ecx
	jmp	LBB0_3
LBB0_2:
	movl	%r12d, %ecx
	andl	$-7968, %ecx                    ## imm = 0xE0E0
	movq	(%r15), %rdx
	movl	(%rdx), %eax
	movl	4(%rdx), %ebx
	andl	$31, %eax
	shll	$8, %eax
	orl	%ecx, %eax
	andl	$31, %ebx
	movl	$7967, %ecx                     ## imm = 0x1F1F
LBB0_3:
	orl	%eax, %ebx
	xorl	%ecx, %ebx
	cmpl	%r12d, %ebx
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_oxygen_write_ac97
LBB0_5:
	xorl	%r15d, %r15d
	cmpl	%r12d, %ebx
	setne	%r15b
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ac97_volume_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ac97_volume_put
_ac97_volume_put:                       ; @ac97_volume_put
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x1
	ldr	x19, [x0, #8]
	ldr	w24, [x0]
	ubfx	w20, w24, #24, #1
	and	w21, w24, #0xff
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_oxygen_read_ac97
	mov	x22, x0
	tbnz	w24, #16, LBB0_2
; %bb.1:
	and	w9, w22, #0xffffffe0
	ldr	x8, [x23]
	ldr	w8, [x8]
	and	w8, w8, #0x1f
	mov	w10, #31
	b	LBB0_3
LBB0_2:
	mov	w8, #-7968
	and	w8, w22, w8
	ldr	x9, [x23]
	ldp	w10, w9, [x9]
	bfi	w8, w10, #8, #5
	and	w9, w9, #0x1f
	mov	w10, #7967
LBB0_3:
	orr	w8, w8, w9
	eor	w23, w8, w10
	cmp	w23, w22
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x23
	bl	_oxygen_write_ac97
LBB0_5:
	cmp	w23, w22
	cset	w20, ne
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ac97_volume_put
.subsections_via_symbols
