	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stk1160_ac97_setup             ## -- Begin function stk1160_ac97_setup
	.p2align	4, 0x90
_stk1160_ac97_setup:                    ## @stk1160_ac97_setup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_stk1160_has_audio
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rdi
	callq	_stk1160_has_ac97
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_STK1160_AC97CTL_0@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$148, %edx
	callq	_stk1160_write_reg
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$140, %edx
	callq	_stk1160_write_reg
	movq	_STK1160_AC97CTL_1@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	$2, %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_stk1160_write_reg
	movq	(%r14), %rsi
	addq	$3, %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_stk1160_write_reg
	movq	%rbx, %rdi
	movl	$18, %esi
	movl	$34824, %edx                    ## imm = 0x8808
	callq	_stk1160_write_ac97
	movq	%rbx, %rdi
	movl	$16, %esi
	movl	$2056, %edx                     ## imm = 0x808
	callq	_stk1160_write_ac97
	movq	%rbx, %rdi
	movl	$14, %esi
	movl	$8, %edx
	callq	_stk1160_write_ac97
	movq	%rbx, %rdi
	movl	$22, %esi
	movl	$2056, %edx                     ## imm = 0x808
	callq	_stk1160_write_ac97
	movq	%rbx, %rdi
	movl	$26, %esi
	movl	$1028, %edx                     ## imm = 0x404
	callq	_stk1160_write_ac97
	movq	%rbx, %rdi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_stk1160_write_ac97
	movq	%rbx, %rdi
	movl	$28, %esi
	movl	$2056, %edx                     ## imm = 0x808
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_stk1160_write_ac97             ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_stk1160_info                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Device doesn't support audio, skipping AC97 setup."

L_.str.1:                               ## @.str.1
	.asciz	"Device uses internal 8-bit ADC, skipping AC97 setup."

	.comm	_STK1160_AC97CTL_0,8,3          ## @STK1160_AC97CTL_0
	.comm	_STK1160_AC97CTL_1,8,3          ## @STK1160_AC97CTL_1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stk1160_ac97_setup             ; -- Begin function stk1160_ac97_setup
	.p2align	2
_stk1160_ac97_setup:                    ; @stk1160_ac97_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_stk1160_has_audio
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_stk1160_has_ac97
	cbz	w0, LBB0_4
; %bb.2:
Lloh0:
	adrp	x20, _STK1160_AC97CTL_0@GOTPAGE
Lloh1:
	ldr	x20, [x20, _STK1160_AC97CTL_0@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #148
	bl	_stk1160_write_reg
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #140
	bl	_stk1160_write_reg
Lloh2:
	adrp	x20, _STK1160_AC97CTL_1@GOTPAGE
Lloh3:
	ldr	x20, [x20, _STK1160_AC97CTL_1@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x1, x8, #2
	mov	x0, x19
	mov	w2, #1
	bl	_stk1160_write_reg
	ldr	x8, [x20]
	add	x1, x8, #3
	mov	x0, x19
	mov	w2, #0
	bl	_stk1160_write_reg
	mov	x0, x19
	mov	w1, #18
	mov	w2, #34824
	bl	_stk1160_write_ac97
	mov	x0, x19
	mov	w1, #16
	mov	w2, #2056
	bl	_stk1160_write_ac97
	mov	x0, x19
	mov	w1, #14
	mov	w2, #8
	bl	_stk1160_write_ac97
	mov	x0, x19
	mov	w1, #22
	mov	w2, #2056
	bl	_stk1160_write_ac97
	mov	x0, x19
	mov	w1, #26
	mov	w2, #1028
	bl	_stk1160_write_ac97
	mov	x0, x19
	mov	w1, #2
	mov	w2, #0
	bl	_stk1160_write_ac97
	mov	x0, x19
	mov	w1, #28
	mov	w2, #2056
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_stk1160_write_ac97
LBB0_3:
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_stk1160_info
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Device doesn't support audio, skipping AC97 setup."

l_.str.1:                               ; @.str.1
	.asciz	"Device uses internal 8-bit ADC, skipping AC97 setup."

	.comm	_STK1160_AC97CTL_0,8,3          ; @STK1160_AC97CTL_0
	.comm	_STK1160_AC97CTL_1,8,3          ; @STK1160_AC97CTL_1
.subsections_via_symbols
