	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_korg1212_TriggerPlay
_snd_korg1212_TriggerPlay:              ## @snd_korg1212_TriggerPlay
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_stateName@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	(%rdi), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	8(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	callq	_K1212_DEBUG_PRINTK
	movl	8(%rbx), %ecx
	leal	1(%rcx), %eax
	movl	%eax, 8(%rbx)
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.1:
	movq	_K1212_STATE_PLAYING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_snd_korg1212_setCardState
	movq	_K1212_DB_TriggerPlay@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_snd_korg1212_Send1212Command
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movq	(%r15), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_K1212_DEBUG_PRINTK
LBB0_3:
	movq	_K1212_CMDRET_Success@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %r14d
	setne	%al
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"K1212_DEBUG: TriggerPlay [%s] %d\n"

	.comm	_stateName,8,3                  ## @stateName
	.comm	_K1212_STATE_PLAYING,4,2        ## @K1212_STATE_PLAYING
	.comm	_K1212_DB_TriggerPlay,4,2       ## @K1212_DB_TriggerPlay
L_.str.1:                               ## @.str.1
	.asciz	"K1212_DEBUG: TriggerPlay - RC = %d [%s]\n"

	.comm	_K1212_CMDRET_Success,4,2       ## @K1212_CMDRET_Success
	.no_dead_strip	_snd_korg1212_TriggerPlay
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_korg1212_TriggerPlay
_snd_korg1212_TriggerPlay:              ; @snd_korg1212_TriggerPlay
	.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	x21, _stateName@GOTPAGE
Lloh1:
	ldr	x21, [x21, _stateName@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [x0]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w2, [x0, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_K1212_DEBUG_PRINTK
	ldr	w8, [x19, #8]
	add	w9, w8, #1
	str	w9, [x19, #8]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_5
LBB0_2:
Lloh4:
	adrp	x8, _K1212_STATE_PLAYING@GOTPAGE
Lloh5:
	ldr	x8, [x8, _K1212_STATE_PLAYING@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_snd_korg1212_setCardState
Lloh7:
	adrp	x8, _K1212_DB_TriggerPlay@GOTPAGE
Lloh8:
	ldr	x8, [x8, _K1212_DB_TriggerPlay@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_snd_korg1212_Send1212Command
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	ldr	x9, [x19]
	ldr	w2, [x8, x9, lsl #2]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_K1212_DEBUG_PRINTK
LBB0_4:
Lloh12:
	adrp	x8, _K1212_CMDRET_Success@GOTPAGE
Lloh13:
	ldr	x8, [x8, _K1212_CMDRET_Success@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w20, w8
	cset	w0, ne
LBB0_5:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"K1212_DEBUG: TriggerPlay [%s] %d\n"

	.comm	_stateName,8,3                  ; @stateName
	.comm	_K1212_STATE_PLAYING,4,2        ; @K1212_STATE_PLAYING
	.comm	_K1212_DB_TriggerPlay,4,2       ; @K1212_DB_TriggerPlay
l_.str.1:                               ; @.str.1
	.asciz	"K1212_DEBUG: TriggerPlay - RC = %d [%s]\n"

	.comm	_K1212_CMDRET_Success,4,2       ; @K1212_CMDRET_Success
	.no_dead_strip	_snd_korg1212_TriggerPlay
.subsections_via_symbols
