	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_ecard_init
_snd_emu10k1_ecard_init:                ## @snd_emu10k1_ecard_init
	.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
	movq	%rdi, %r14
	movq	_EC_RAW_RUN_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_EC_DEFAULT_SPDIF0_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_EC_SPDIF0_SELECT
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_EC_DEFAULT_SPDIF1_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_EC_SPDIF1_SELECT
	orl	%ebx, %eax
	movl	%eax, (%r14)
	movq	_HCFG@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_inl
	movq	_HCFG_AUDIOENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_HCFG_CODECFORMAT_I2S@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	8(%r14), %rsi
	movl	%eax, %edi
	callq	_outl
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_inl
	movq	_EC_ADCCAL@GOTPCREL(%rip), %r15
	movq	_EC_LEDN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	orl	(%r15), %esi
	movq	_EC_TRIM_CSN@GOTPCREL(%rip), %r12
	orl	(%r12), %esi
	movq	%r14, %rdi
	callq	_snd_emu10k1_ecard_write
	movq	_EC_DACCAL@GOTPCREL(%rip), %rax
	movl	(%rbx), %esi
	orl	(%rax), %esi
	orl	(%r12), %esi
	movq	%r14, %rdi
	callq	_snd_emu10k1_ecard_write
	movq	%r14, %rdi
	movl	$48000, %esi                    ## imm = 0xBB80
	callq	_snd_emu10k1_wait
	movl	(%rbx), %esi
	orl	(%r15), %esi
	orl	(%r12), %esi
	movq	%r14, %rdi
	callq	_snd_emu10k1_ecard_write
	movl	(%r14), %esi
	movq	%r14, %rdi
	callq	_snd_emu10k1_ecard_write
	movq	_EC_DEFAULT_ADC_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_snd_emu10k1_ecard_setadcgain
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_RAW_RUN_MODE,4,2            ## @EC_RAW_RUN_MODE
	.comm	_EC_DEFAULT_SPDIF0_SEL,4,2      ## @EC_DEFAULT_SPDIF0_SEL
	.comm	_EC_DEFAULT_SPDIF1_SEL,4,2      ## @EC_DEFAULT_SPDIF1_SEL
	.comm	_HCFG,8,3                       ## @HCFG
	.comm	_HCFG_AUDIOENABLE,4,2           ## @HCFG_AUDIOENABLE
	.comm	_HCFG_CODECFORMAT_I2S,4,2       ## @HCFG_CODECFORMAT_I2S
	.comm	_EC_ADCCAL,4,2                  ## @EC_ADCCAL
	.comm	_EC_LEDN,4,2                    ## @EC_LEDN
	.comm	_EC_TRIM_CSN,4,2                ## @EC_TRIM_CSN
	.comm	_EC_DACCAL,4,2                  ## @EC_DACCAL
	.comm	_EC_DEFAULT_ADC_GAIN,4,2        ## @EC_DEFAULT_ADC_GAIN
	.no_dead_strip	_snd_emu10k1_ecard_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_ecard_init
_snd_emu10k1_ecard_init:                ; @snd_emu10k1_ecard_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x0
Lloh0:
	adrp	x8, _EC_RAW_RUN_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EC_RAW_RUN_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _EC_DEFAULT_SPDIF0_SEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EC_DEFAULT_SPDIF0_SEL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_EC_SPDIF0_SELECT
	orr	w20, w0, w20
Lloh6:
	adrp	x8, _EC_DEFAULT_SPDIF1_SEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EC_DEFAULT_SPDIF1_SEL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_EC_SPDIF1_SELECT
	orr	w8, w20, w0
	str	w8, [x19]
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x20, _HCFG@GOTPAGE
Lloh10:
	ldr	x20, [x20, _HCFG@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_inl
Lloh11:
	adrp	x8, _HCFG_AUDIOENABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HCFG_AUDIOENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _HCFG_CODECFORMAT_I2S@GOTPAGE
Lloh15:
	ldr	x9, [x9, _HCFG_CODECFORMAT_I2S@GOTPAGEOFF]
	orr	w8, w8, w0
Lloh16:
	ldr	w9, [x9]
	orr	w0, w8, w9
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_outl
	ldr	x8, [x19, #8]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_inl
Lloh17:
	adrp	x20, _EC_ADCCAL@GOTPAGE
Lloh18:
	ldr	x20, [x20, _EC_ADCCAL@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh19:
	adrp	x21, _EC_LEDN@GOTPAGE
Lloh20:
	ldr	x21, [x21, _EC_LEDN@GOTPAGEOFF]
	ldr	w9, [x21]
	orr	w8, w9, w8
Lloh21:
	adrp	x22, _EC_TRIM_CSN@GOTPAGE
Lloh22:
	ldr	x22, [x22, _EC_TRIM_CSN@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_snd_emu10k1_ecard_write
Lloh23:
	adrp	x8, _EC_DACCAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EC_DACCAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_snd_emu10k1_ecard_write
	mov	x0, x19
	mov	w1, #48000
	bl	_snd_emu10k1_wait
	ldr	w8, [x20]
	ldr	w9, [x21]
	orr	w8, w9, w8
	ldr	w9, [x22]
	orr	w1, w8, w9
	mov	x0, x19
	bl	_snd_emu10k1_ecard_write
	ldr	w1, [x19]
	mov	x0, x19
	bl	_snd_emu10k1_ecard_write
Lloh26:
	adrp	x8, _EC_DEFAULT_ADC_GAIN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EC_DEFAULT_ADC_GAIN@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_emu10k1_ecard_setadcgain
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_RAW_RUN_MODE,4,2            ; @EC_RAW_RUN_MODE
	.comm	_EC_DEFAULT_SPDIF0_SEL,4,2      ; @EC_DEFAULT_SPDIF0_SEL
	.comm	_EC_DEFAULT_SPDIF1_SEL,4,2      ; @EC_DEFAULT_SPDIF1_SEL
	.comm	_HCFG,8,3                       ; @HCFG
	.comm	_HCFG_AUDIOENABLE,4,2           ; @HCFG_AUDIOENABLE
	.comm	_HCFG_CODECFORMAT_I2S,4,2       ; @HCFG_CODECFORMAT_I2S
	.comm	_EC_ADCCAL,4,2                  ; @EC_ADCCAL
	.comm	_EC_LEDN,4,2                    ; @EC_LEDN
	.comm	_EC_TRIM_CSN,4,2                ; @EC_TRIM_CSN
	.comm	_EC_DACCAL,4,2                  ; @EC_DACCAL
	.comm	_EC_DEFAULT_ADC_GAIN,4,2        ; @EC_DEFAULT_ADC_GAIN
	.no_dead_strip	_snd_emu10k1_ecard_init
.subsections_via_symbols
