	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ymfpci_download_image
_snd_ymfpci_download_image:             ## @snd_ymfpci_download_image
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_YDSXGR_NATIVEDACOUTVOL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	xorl	%edx, %edx
	callq	_snd_ymfpci_writel
	movq	%rbx, %rdi
	callq	_snd_ymfpci_disable_dsp
	movq	_YDSXGR_MODE@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	movl	$65536, %edx                    ## imm = 0x10000
	callq	_snd_ymfpci_writel
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_snd_ymfpci_writel
	movq	_YDSXGR_MAPOFREC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_snd_ymfpci_writel
	movq	_YDSXGR_MAPOFEFFECT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_snd_ymfpci_writel
	movq	_YDSXGR_PLAYCTRLBASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_snd_ymfpci_writel
	movq	_YDSXGR_RECCTRLBASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_snd_ymfpci_writel
	movq	_YDSXGR_EFFCTRLBASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_snd_ymfpci_writel
	movq	_YDSXGR_GLOBALCTRL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_snd_ymfpci_readw
	movl	(%r14), %esi
	andl	$-8, %eax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_snd_ymfpci_writew
	movq	_YDSXG_DSPLENGTH@GOTPCREL(%rip), %r14
	cmpl	$4, (%r14)
	jl	LBB0_3
## %bb.1:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movq	(%rax), %r12
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_YDSXGR_DSPINSTRAM@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	addq	%rbx, %r13
	movl	(%r12,%rbx), %edi
	callq	_le32_to_cpu
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_snd_ymfpci_writel
	incq	%r15
	movl	(%r14), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jl	LBB0_2
LBB0_3:
	movq	_YDSXG_CTRLLENGTH@GOTPCREL(%rip), %r12
	cmpl	$4, (%r12)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jl	LBB0_6
## %bb.4:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	_YDSXGR_CTRLINSTRAM@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	addq	%rbx, %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx), %edi
	callq	_le32_to_cpu
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_snd_ymfpci_writel
	incq	%r15
	movl	(%r12), %eax
	leal	3(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$2, %ecx
	movslq	%ecx, %rax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jl	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_snd_ymfpci_enable_dsp          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_YDSXGR_NATIVEDACOUTVOL,8,3     ## @YDSXGR_NATIVEDACOUTVOL
	.comm	_YDSXGR_MODE,8,3                ## @YDSXGR_MODE
	.comm	_YDSXGR_MAPOFREC,8,3            ## @YDSXGR_MAPOFREC
	.comm	_YDSXGR_MAPOFEFFECT,8,3         ## @YDSXGR_MAPOFEFFECT
	.comm	_YDSXGR_PLAYCTRLBASE,8,3        ## @YDSXGR_PLAYCTRLBASE
	.comm	_YDSXGR_RECCTRLBASE,8,3         ## @YDSXGR_RECCTRLBASE
	.comm	_YDSXGR_EFFCTRLBASE,8,3         ## @YDSXGR_EFFCTRLBASE
	.comm	_YDSXGR_GLOBALCTRL,4,2          ## @YDSXGR_GLOBALCTRL
	.comm	_YDSXG_DSPLENGTH,4,2            ## @YDSXG_DSPLENGTH
	.comm	_YDSXGR_DSPINSTRAM,8,3          ## @YDSXGR_DSPINSTRAM
	.comm	_YDSXG_CTRLLENGTH,4,2           ## @YDSXG_CTRLLENGTH
	.comm	_YDSXGR_CTRLINSTRAM,8,3         ## @YDSXGR_CTRLINSTRAM
	.no_dead_strip	_snd_ymfpci_download_image
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ymfpci_download_image
_snd_ymfpci_download_image:             ; @snd_ymfpci_download_image
	.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
Lloh0:
	adrp	x8, _YDSXGR_NATIVEDACOUTVOL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _YDSXGR_NATIVEDACOUTVOL@GOTPAGEOFF]
Lloh2:
	ldr	x1, [x8]
	mov	w2, #0
	bl	_snd_ymfpci_writel
	mov	x0, x19
	bl	_snd_ymfpci_disable_dsp
Lloh3:
	adrp	x20, _YDSXGR_MODE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _YDSXGR_MODE@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #65536
	bl	_snd_ymfpci_writel
	ldr	x1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ymfpci_writel
Lloh5:
	adrp	x8, _YDSXGR_MAPOFREC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _YDSXGR_MAPOFREC@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ymfpci_writel
Lloh8:
	adrp	x8, _YDSXGR_MAPOFEFFECT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _YDSXGR_MAPOFEFFECT@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ymfpci_writel
Lloh11:
	adrp	x8, _YDSXGR_PLAYCTRLBASE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _YDSXGR_PLAYCTRLBASE@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ymfpci_writel
Lloh14:
	adrp	x8, _YDSXGR_RECCTRLBASE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _YDSXGR_RECCTRLBASE@GOTPAGEOFF]
Lloh16:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ymfpci_writel
Lloh17:
	adrp	x8, _YDSXGR_EFFCTRLBASE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _YDSXGR_EFFCTRLBASE@GOTPAGEOFF]
Lloh19:
	ldr	x1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_snd_ymfpci_writel
Lloh20:
	adrp	x20, _YDSXGR_GLOBALCTRL@GOTPAGE
Lloh21:
	ldr	x20, [x20, _YDSXGR_GLOBALCTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_snd_ymfpci_readw
	ldr	w1, [x20]
	and	w2, w0, #0xfffffff8
	mov	x0, x19
	bl	_snd_ymfpci_writew
Lloh22:
	adrp	x21, _YDSXG_DSPLENGTH@GOTPAGE
Lloh23:
	ldr	x21, [x21, _YDSXG_DSPLENGTH@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #4
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
	mov	x23, #0
	ldr	x8, [x19, #8]
	ldr	x24, [x8]
Lloh24:
	adrp	x25, _YDSXGR_DSPINSTRAM@GOTPAGE
Lloh25:
	ldr	x25, [x25, _YDSXGR_DSPINSTRAM@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x20, x22, x8
	ldr	w0, [x24, x22]
	bl	_le32_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ymfpci_writel
	add	x23, x23, #1
	ldr	w8, [x21]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	add	x22, x22, #4
	cmp	x23, w8, sxtw
	b.lt	LBB0_2
LBB0_3:
Lloh26:
	adrp	x21, _YDSXG_CTRLLENGTH@GOTPAGE
Lloh27:
	ldr	x21, [x21, _YDSXG_CTRLLENGTH@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #4
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
	mov	x23, #0
	ldr	x8, [x19]
	ldr	x24, [x8]
Lloh28:
	adrp	x25, _YDSXGR_CTRLINSTRAM@GOTPAGE
Lloh29:
	ldr	x25, [x25, _YDSXGR_CTRLINSTRAM@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	add	x20, x22, x8
	ldr	w0, [x24, x22]
	bl	_le32_to_cpu
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_snd_ymfpci_writel
	add	x23, x23, #1
	ldr	w8, [x21]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #2
	add	x22, x22, #4
	cmp	x23, w8, sxtw
	b.lt	LBB0_5
LBB0_6:
	mov	x0, x19
	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
	b	_snd_ymfpci_enable_dsp
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_YDSXGR_NATIVEDACOUTVOL,8,3     ; @YDSXGR_NATIVEDACOUTVOL
	.comm	_YDSXGR_MODE,8,3                ; @YDSXGR_MODE
	.comm	_YDSXGR_MAPOFREC,8,3            ; @YDSXGR_MAPOFREC
	.comm	_YDSXGR_MAPOFEFFECT,8,3         ; @YDSXGR_MAPOFEFFECT
	.comm	_YDSXGR_PLAYCTRLBASE,8,3        ; @YDSXGR_PLAYCTRLBASE
	.comm	_YDSXGR_RECCTRLBASE,8,3         ; @YDSXGR_RECCTRLBASE
	.comm	_YDSXGR_EFFCTRLBASE,8,3         ; @YDSXGR_EFFCTRLBASE
	.comm	_YDSXGR_GLOBALCTRL,4,2          ; @YDSXGR_GLOBALCTRL
	.comm	_YDSXG_DSPLENGTH,4,2            ; @YDSXG_DSPLENGTH
	.comm	_YDSXGR_DSPINSTRAM,8,3          ; @YDSXGR_DSPINSTRAM
	.comm	_YDSXG_CTRLLENGTH,4,2           ; @YDSXG_CTRLLENGTH
	.comm	_YDSXGR_CTRLINSTRAM,8,3         ; @YDSXGR_CTRLINSTRAM
	.no_dead_strip	_snd_ymfpci_download_image
.subsections_via_symbols
