	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function patch_ad1881_chained
_patch_ad1881_chained:                  ## @patch_ad1881_chained
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdi, %r14
	movq	8(%rdi), %rcx
	movslq	%edx, %rax
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_2
## %bb.1:
	movl	%edx, %r15d
	movq	16(%r14), %rdx
	cmpq	$0, (%rdx,%rax,8)
	je	LBB0_3
LBB0_2:
	movl	$-1, %r15d
LBB0_3:
	movslq	%ebx, %rax
	cmpq	$0, (%rcx,%rax,8)
	jne	LBB0_5
## %bb.4:
	movq	16(%r14), %rdx
	cmpq	$0, (%rdx,%rax,8)
	je	LBB0_6
LBB0_5:
	movl	$-1, %ebx
LBB0_6:
	testl	%r15d, %ebx
	js	LBB0_14
## %bb.7:
	movq	_AC97_AD_SERIAL_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%esi, %r12
	movq	(%rcx,%r12,8), %rcx
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$28672, %edx                    ## imm = 0x7000
	callq	_snd_ac97_update_bits
	movq	_AC97_AD_CODEC_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_snd_ac97_write_cache
	movq	(%r14), %rax
	movl	$2, (%rax,%r12,4)
	testl	%r15d, %r15d
	js	LBB0_11
## %bb.8:
	testl	%ebx, %ebx
	js	LBB0_12
## %bb.9:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	$6, %edx
	callq	_patch_ad1881_chained1
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movl	%ebx, %r15d
	jmp	LBB0_12
LBB0_11:
	movl	%ebx, %r15d
	testl	%ebx, %ebx
	js	LBB0_14
LBB0_12:
	movq	%r14, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_patch_ad1881_chained1          ## TAILCALL
LBB0_13:
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	$6, %edx
	callq	_patch_ad1881_chained1
	testq	%rax, %rax
	jne	LBB0_12
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AC97_AD_SERIAL_CFG,4,2         ## @AC97_AD_SERIAL_CFG
	.comm	_AC97_AD_CODEC_CFG,4,2          ## @AC97_AD_CODEC_CFG
	.no_dead_strip	_patch_ad1881_chained
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function patch_ad1881_chained
_patch_ad1881_chained:                  ; @patch_ad1881_chained
	.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	x21, x3
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x9, [x8, w2, sxtw #3]
	cbnz	x9, LBB0_2
; %bb.1:
	mov	x20, x2
	sxtw	x9, w20
	ldr	x10, [x19, #16]
	ldr	x9, [x10, x9, lsl #3]
	cbz	x9, LBB0_3
LBB0_2:
	mov	w20, #-1
LBB0_3:
	ldr	x9, [x8, w21, sxtw #3]
	cbnz	x9, LBB0_5
; %bb.4:
	sxtw	x9, w21
	ldr	x10, [x19, #16]
	ldr	x9, [x10, x9, lsl #3]
	cbz	x9, LBB0_6
LBB0_5:
	mov	w21, #-1
LBB0_6:
	tst	w21, w20
	b.lt	LBB0_14
; %bb.7:
Lloh0:
	adrp	x9, _AC97_AD_SERIAL_CFG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AC97_AD_SERIAL_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	ldr	x3, [x8, w22, sxtw #3]
	mov	x0, x19
	mov	w2, #28672
	bl	_snd_ac97_update_bits
Lloh3:
	adrp	x8, _AC97_AD_CODEC_CFG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AC97_AD_CODEC_CFG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w23, #2
	mov	x0, x19
	mov	w2, #2
	bl	_snd_ac97_write_cache
	ldr	x8, [x19]
	str	w23, [x8, w22, sxtw #2]
	tbnz	w20, #31, LBB0_11
; %bb.8:
	tbnz	w21, #31, LBB0_12
; %bb.9:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #6
	bl	_patch_ad1881_chained1
	cbz	x0, LBB0_13
; %bb.10:
	mov	x20, x21
	b	LBB0_12
LBB0_11:
	mov	x20, x21
	tbnz	w21, #31, LBB0_14
LBB0_12:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_patch_ad1881_chained1
LBB0_13:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #6
	bl	_patch_ad1881_chained1
	cbnz	x0, LBB0_12
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AC97_AD_SERIAL_CFG,4,2         ; @AC97_AD_SERIAL_CFG
	.comm	_AC97_AD_CODEC_CFG,4,2          ; @AC97_AD_CODEC_CFG
	.no_dead_strip	_patch_ad1881_chained
.subsections_via_symbols
