	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_korg1212_Send1212Command
_snd_korg1212_Send1212Command:          ## @snd_korg1212_Send1212Command
	.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	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	cmpl	$0, 16(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rcx, %r13
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	_K1212_CMDRET_Success@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_stateName@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rdi), %rcx
	movl	(%rax,%rcx,4), %ecx
	leaq	L_.str.1(%rip), %rdi
	callq	_K1212_DEBUG_PRINTK
	movq	_MAX_COMMAND_RETRIES@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_3
## %bb.4:
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	movq	_MAX_COMMAND_RETRIES@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r12
	jge	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_writel
	movl	28(%rbx), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_writel
	movl	24(%rbx), %esi
	movl	%r13d, %edi
	callq	_writel
	movl	20(%rbx), %esi
	movl	%r14d, %edi
	callq	_writel
	movl	16(%rbx), %esi
	movl	%r15d, %edi
	callq	_writel
	movq	_K1212_DB_RebootCard@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_K1212_DB_BootFromDSPPage4@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_K1212_DB_StartDSPDownload@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_COMMAND_ACK_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
	movl	12(%rbx), %edi
	callq	_readl
	movq	_COMMAND_ACK_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r15d, %eax
	movq	_DOORBELL_VAL_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.11:
	leaq	L_.str.2(%rip), %rdi
	callq	_K1212_DEBUG_PRINTK_VERBOSE
LBB0_8:
	movq	_K1212_CMDRET_Success@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_1:
	movq	_K1212_CMDRET_CardUninitialized@GOTPCREL(%rip), %rbx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_16
LBB0_3:
	xorl	%r12d, %r12d
LBB0_13:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_14:
	addl	%r12d, 8(%rbx)
	movq	_MAX_COMMAND_RETRIES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r12
	jl	LBB0_17
## %bb.15:
	movq	_K1212_CMDRET_NoAckFromCard@GOTPCREL(%rip), %rbx
	leaq	L_.str.3(%rip), %rdi
LBB0_16:
	callq	_K1212_DEBUG_PRINTK_VERBOSE
	movl	(%rbx), %eax
LBB0_17:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_K1212_CMDRET_Success,4,2       ## @K1212_CMDRET_Success
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"K1212_DEBUG: CardUninitialized\n"

	.comm	_K1212_CMDRET_CardUninitialized,4,2 ## @K1212_CMDRET_CardUninitialized
L_.str.1:                               ## @.str.1
	.asciz	"K1212_DEBUG: Card <- 0x%08x 0x%08x [%s]\n"

	.comm	_stateName,8,3                  ## @stateName
	.comm	_MAX_COMMAND_RETRIES,8,3        ## @MAX_COMMAND_RETRIES
	.comm	_K1212_DB_RebootCard,4,2        ## @K1212_DB_RebootCard
	.comm	_K1212_DB_BootFromDSPPage4,4,2  ## @K1212_DB_BootFromDSPPage4
	.comm	_K1212_DB_StartDSPDownload,4,2  ## @K1212_DB_StartDSPDownload
	.comm	_COMMAND_ACK_DELAY,4,2          ## @COMMAND_ACK_DELAY
	.comm	_COMMAND_ACK_MASK,4,2           ## @COMMAND_ACK_MASK
	.comm	_DOORBELL_VAL_MASK,4,2          ## @DOORBELL_VAL_MASK
L_.str.2:                               ## @.str.2
	.asciz	"K1212_DEBUG: Card <- Success\n"

L_.str.3:                               ## @.str.3
	.asciz	"K1212_DEBUG: Card <- NoAckFromCard\n"

	.comm	_K1212_CMDRET_NoAckFromCard,4,2 ## @K1212_CMDRET_NoAckFromCard
	.no_dead_strip	_snd_korg1212_Send1212Command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_korg1212_Send1212Command
_snd_korg1212_Send1212Command:          ; @snd_korg1212_Send1212Command
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _K1212_CMDRET_Success@GOTPAGE
Lloh1:
	ldr	x8, [x8, _K1212_CMDRET_Success@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _stateName@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stateName@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	w3, [x8, x9, lsl #2]
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_K1212_DEBUG_PRINTK
Lloh8:
	adrp	x8, _MAX_COMMAND_RETRIES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MAX_COMMAND_RETRIES@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_10
; %bb.2:
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	mov	x27, #0
Lloh11:
	adrp	x20, _K1212_DB_BootFromDSPPage4@GOTPAGE
Lloh12:
	ldr	x20, [x20, _K1212_DB_BootFromDSPPage4@GOTPAGEOFF]
Lloh13:
	adrp	x26, _K1212_DB_StartDSPDownload@GOTPAGE
Lloh14:
	ldr	x26, [x26, _K1212_DB_StartDSPDownload@GOTPAGEOFF]
Lloh15:
	adrp	x28, _COMMAND_ACK_MASK@GOTPAGE
Lloh16:
	ldr	x28, [x28, _COMMAND_ACK_MASK@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
Lloh17:
	adrp	x8, _MAX_COMMAND_RETRIES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MAX_COMMAND_RETRIES@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x27, x8
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #12]
	mov	x0, x21
	bl	_writel
	ldr	w1, [x19, #28]
	mov	x0, x22
	bl	_writel
	ldr	w1, [x19, #24]
	mov	x0, x23
	bl	_writel
	ldr	w1, [x19, #20]
	mov	x0, x24
	bl	_writel
	ldr	w1, [x19, #16]
	mov	x0, x25
	bl	_writel
Lloh20:
	adrp	x8, _K1212_DB_RebootCard@GOTPAGE
Lloh21:
	ldr	x8, [x8, _K1212_DB_RebootCard@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x20]
	ldr	w10, [x26]
	cmp	w8, w25
	ccmp	w9, w25, #4, ne
	ccmp	w10, w25, #4, ne
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh23:
	adrp	x8, _COMMAND_ACK_DELAY@GOTPAGE
Lloh24:
	ldr	x8, [x8, _COMMAND_ACK_DELAY@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_udelay
	ldr	w0, [x19, #12]
	bl	_readl
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh26:
	adrp	x8, _DOORBELL_VAL_MASK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DOORBELL_VAL_MASK@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	eor	w9, w0, w25
	tst	w8, w9
	b.ne	LBB0_3
; %bb.7:
Lloh29:
	adrp	x0, l_.str.2@PAGE
Lloh30:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_K1212_DEBUG_PRINTK_VERBOSE
LBB0_8:
Lloh31:
	adrp	x8, _K1212_CMDRET_Success@GOTPAGE
Lloh32:
	ldr	x8, [x8, _K1212_CMDRET_Success@GOTPAGEOFF]
Lloh33:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_9:
Lloh34:
	adrp	x19, _K1212_CMDRET_CardUninitialized@GOTPAGE
Lloh35:
	ldr	x19, [x19, _K1212_CMDRET_CardUninitialized@GOTPAGEOFF]
Lloh36:
	adrp	x0, l_.str@PAGE
Lloh37:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_14
LBB0_10:
	mov	x27, #0
	b	LBB0_12
LBB0_11:
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
LBB0_12:
	ldr	w8, [x19, #8]
	add	w8, w8, w27
	str	w8, [x19, #8]
Lloh38:
	adrp	x8, _MAX_COMMAND_RETRIES@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MAX_COMMAND_RETRIES@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	cmp	x27, x8
	b.lt	LBB0_15
; %bb.13:
Lloh41:
	adrp	x19, _K1212_CMDRET_NoAckFromCard@GOTPAGE
Lloh42:
	ldr	x19, [x19, _K1212_CMDRET_NoAckFromCard@GOTPAGEOFF]
Lloh43:
	adrp	x0, l_.str.3@PAGE
Lloh44:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_14:
	bl	_K1212_DEBUG_PRINTK_VERBOSE
	ldr	w20, [x19]
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_K1212_CMDRET_Success,4,2       ; @K1212_CMDRET_Success
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"K1212_DEBUG: CardUninitialized\n"

	.comm	_K1212_CMDRET_CardUninitialized,4,2 ; @K1212_CMDRET_CardUninitialized
l_.str.1:                               ; @.str.1
	.asciz	"K1212_DEBUG: Card <- 0x%08x 0x%08x [%s]\n"

	.comm	_stateName,8,3                  ; @stateName
	.comm	_MAX_COMMAND_RETRIES,8,3        ; @MAX_COMMAND_RETRIES
	.comm	_K1212_DB_RebootCard,4,2        ; @K1212_DB_RebootCard
	.comm	_K1212_DB_BootFromDSPPage4,4,2  ; @K1212_DB_BootFromDSPPage4
	.comm	_K1212_DB_StartDSPDownload,4,2  ; @K1212_DB_StartDSPDownload
	.comm	_COMMAND_ACK_DELAY,4,2          ; @COMMAND_ACK_DELAY
	.comm	_COMMAND_ACK_MASK,4,2           ; @COMMAND_ACK_MASK
	.comm	_DOORBELL_VAL_MASK,4,2          ; @DOORBELL_VAL_MASK
l_.str.2:                               ; @.str.2
	.asciz	"K1212_DEBUG: Card <- Success\n"

l_.str.3:                               ; @.str.3
	.asciz	"K1212_DEBUG: Card <- NoAckFromCard\n"

	.comm	_K1212_CMDRET_NoAckFromCard,4,2 ; @K1212_CMDRET_NoAckFromCard
	.no_dead_strip	_snd_korg1212_Send1212Command
.subsections_via_symbols
