	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_korg1212_SetRate
_snd_korg1212_SetRate:                  ## @snd_korg1212_SetRate
	.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
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_snd_korg1212_use_is_exclusive
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	cmpl	$44100, %r14d                   ## imm = 0xAC44
	je	LBB0_4
## %bb.5:
	cmpl	$48000, %r14d                   ## imm = 0xBB80
	jne	LBB0_10
## %bb.6:
	leaq	_snd_korg1212_SetRate.s48(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_4:
	leaq	_snd_korg1212_SetRate.s44(%rip), %rax
LBB0_7:
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, 8(%rbx)
	movl	%r14d, 12(%rbx)
	movq	_INTERCOMMAND_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_udelay
	movq	_K1212_DB_SetClockSourceRate@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ClockSourceSelector@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	8(%rbx), %rcx
	movl	(%rax,%rcx,4), %edx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_snd_korg1212_Send1212Command
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_stateName@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	16(%rbx), %rdx
	movl	(%rcx,%rdx,4), %edx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_K1212_DEBUG_PRINTK
	jmp	LBB0_9
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @snd_korg1212_SetRate.s44
_snd_korg1212_SetRate.s44:
	.long	133                             ## 0x85
	.long	129                             ## 0x81
	.long	131                             ## 0x83

	.p2align	2                               ## @snd_korg1212_SetRate.s48
_snd_korg1212_SetRate.s48:
	.long	132                             ## 0x84
	.long	128                             ## 0x80
	.long	130                             ## 0x82

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INTERCOMMAND_DELAY,4,2         ## @INTERCOMMAND_DELAY
	.comm	_K1212_DB_SetClockSourceRate,4,2 ## @K1212_DB_SetClockSourceRate
	.comm	_ClockSourceSelector,8,3        ## @ClockSourceSelector
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"K1212_DEBUG: Set Clock Source Selector - RC = %d [%s]\n"

	.comm	_stateName,8,3                  ## @stateName
	.no_dead_strip	_snd_korg1212_SetRate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_korg1212_SetRate
_snd_korg1212_SetRate:                  ; @snd_korg1212_SetRate
	.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	x20, x1
	mov	x19, x0
	bl	_snd_korg1212_use_is_exclusive
	cbz	w0, LBB0_4
; %bb.1:
	mov	w8, #44100
	cmp	w20, w8
	b.eq	LBB0_5
; %bb.2:
	mov	w8, #48000
	cmp	w20, w8
	b.ne	LBB0_8
; %bb.3:
Lloh0:
	adrp	x8, _snd_korg1212_SetRate.s48@PAGE
Lloh1:
	add	x8, x8, _snd_korg1212_SetRate.s48@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh4:
	adrp	x8, _snd_korg1212_SetRate.s44@PAGE
Lloh5:
	add	x8, x8, _snd_korg1212_SetRate.s44@PAGEOFF
LBB0_6:
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	stp	w8, w20, [x19, #8]
Lloh6:
	adrp	x8, _INTERCOMMAND_DELAY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _INTERCOMMAND_DELAY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_udelay
Lloh9:
	adrp	x8, _K1212_DB_SetClockSourceRate@GOTPAGE
Lloh10:
	ldr	x8, [x8, _K1212_DB_SetClockSourceRate@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _ClockSourceSelector@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ClockSourceSelector@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldrsw	x9, [x19, #8]
	ldr	w2, [x8, x9, lsl #2]
	mov	x0, x19
	mov	w3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_snd_korg1212_Send1212Command
	cbz	w0, LBB0_10
; %bb.7:
	mov	x1, x0
Lloh15:
	adrp	x8, _stateName@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stateName@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
	ldr	w2, [x8, x9, lsl #2]
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_K1212_DEBUG_PRINTK
	mov	w0, #0
	b	LBB0_10
LBB0_8:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @snd_korg1212_SetRate.s44
_snd_korg1212_SetRate.s44:
	.long	133                             ; 0x85
	.long	129                             ; 0x81
	.long	131                             ; 0x83

	.p2align	2                               ; @snd_korg1212_SetRate.s48
_snd_korg1212_SetRate.s48:
	.long	132                             ; 0x84
	.long	128                             ; 0x80
	.long	130                             ; 0x82

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INTERCOMMAND_DELAY,4,2         ; @INTERCOMMAND_DELAY
	.comm	_K1212_DB_SetClockSourceRate,4,2 ; @K1212_DB_SetClockSourceRate
	.comm	_ClockSourceSelector,8,3        ; @ClockSourceSelector
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"K1212_DEBUG: Set Clock Source Selector - RC = %d [%s]\n"

	.comm	_stateName,8,3                  ; @stateName
	.no_dead_strip	_snd_korg1212_SetRate
.subsections_via_symbols
