	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_ac97_input
_set_ac97_input:                        ## @set_ac97_input
	.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	%rdi, %r13
	movl	(%rdi), %r15d
	movq	_EM28XX_AMUX_VIDEO2@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_2
## %bb.1:
	movq	_EM28XX_AMUX_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_2:
	movq	_inputs@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	movl	$2056, %r14d                    ## imm = 0x808
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpl	(%rax,%rbx,8), %r15d
	movl	4(%rax,%rbx,8), %esi
	movl	$32768, %edx                    ## imm = 0x8000
	cmovel	%r14d, %edx
	movq	%r13, %rdi
	callq	_em28xx_write_ac97
	testl	%eax, %eax
	jns	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r13), %rdi
	movq	(%r12), %rax
	movl	4(%rax,%rbx,8), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EM28XX_AMUX_VIDEO2,4,2         ## @EM28XX_AMUX_VIDEO2
	.comm	_EM28XX_AMUX_VIDEO,4,2          ## @EM28XX_AMUX_VIDEO
	.comm	_inputs,8,3                     ## @inputs
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't setup AC97 register %d\n"

	.no_dead_strip	_set_ac97_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_ac97_input
_set_ac97_input:                        ; @set_ac97_input
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _EM28XX_AMUX_VIDEO2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EM28XX_AMUX_VIDEO2@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _EM28XX_AMUX_VIDEO@GOTPAGE
Lloh4:
	ldr	x10, [x10, _EM28XX_AMUX_VIDEO@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w9
	csel	w21, w10, w8, eq
Lloh6:
	adrp	x22, _inputs@GOTPAGE
Lloh7:
	ldr	x22, [x22, _inputs@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x23, #0
	mov	x24, #0
	mov	w25, #32768
	mov	w26, #2056
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	add	x23, x23, #8
	cmp	x24, w0, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	add	x8, x8, x23
	ldp	w9, w1, [x8]
	cmp	w21, w9
	csel	w2, w26, w25, eq
	mov	x0, x19
	bl	_em28xx_write_ac97
	tbz	w0, #31, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x0, [x19, #8]
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w2, [x8, #4]
	mov	x1, x20
	bl	_dev_warn
	b	LBB0_2
LBB0_5:
	mov	w0, #0
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EM28XX_AMUX_VIDEO2,4,2         ; @EM28XX_AMUX_VIDEO2
	.comm	_EM28XX_AMUX_VIDEO,4,2          ; @EM28XX_AMUX_VIDEO
	.comm	_inputs,8,3                     ; @inputs
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't setup AC97 register %d\n"

	.no_dead_strip	_set_ac97_input
.subsections_via_symbols
