	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_korg1212_hw_params
_snd_korg1212_hw_params:                ## @snd_korg1212_hw_params
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_snd_pcm_substream_chip
	movq	%rax, %r12
	movq	_stateName@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %esi
	leaq	L_.str(%rip), %rdi
	callq	_K1212_DEBUG_PRINTK
	leaq	28(%r12), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_SNDRV_PCM_STREAM_PLAYBACK@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	cmpq	%rcx, %rax
	sete	%dl
	movq	8(%r12,%rdx,8), %rdx
	testq	%rdx, %rdx
	jle	LBB0_4
## %bb.1:
	xorl	%esi, %esi
	cmpq	%rcx, %rax
	setne	%sil
	cmpq	%rdx, 8(%r12,%rsi,8)
	jne	LBB0_2
LBB0_4:
	movq	%r14, %rdi
	callq	_params_rate
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_snd_korg1212_SetRate
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	callq	_params_channels
	movl	%eax, 36(%r12)
	movq	_K1212_PERIOD_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_2:
	movq	%r14, %rdi
	callq	_params_rate
	movq	%rax, %r13
	movl	24(%r12), %r12d
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%ebx, %ebx
	cmpl	%r13d, %r12d
	je	LBB0_7
## %bb.3:
	movq	_SNDRV_PCM_HW_PARAM_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	__snd_pcm_hw_param_setempty
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"K1212_DEBUG: snd_korg1212_hw_params [%s]\n"

	.comm	_stateName,8,3                  ## @stateName
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ## @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SNDRV_PCM_HW_PARAM_RATE,4,2    ## @SNDRV_PCM_HW_PARAM_RATE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_K1212_PERIOD_BYTES,4,2         ## @K1212_PERIOD_BYTES
	.no_dead_strip	_snd_korg1212_hw_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_korg1212_hw_params
_snd_korg1212_hw_params:                ; @snd_korg1212_hw_params
	.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, x1
	mov	x22, x0
	bl	_snd_pcm_substream_chip
	mov	x20, x0
Lloh0:
	adrp	x8, _stateName@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stateName@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x0]
	ldr	w1, [x8, x9, lsl #2]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_K1212_DEBUG_PRINTK
	add	x21, x20, #28
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x22]
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SNDRV_PCM_STREAM_PLAYBACK@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	mov	w10, #8
	mov	w11, #16
	cmp	x8, x9
	csel	x10, x11, x10, eq
	ldr	x10, [x20, x10]
	cmp	x10, #1
	b.lt	LBB0_2
; %bb.1:
	mov	w11, #16
	mov	w12, #8
	cmp	x8, x9
	csel	x8, x12, x11, eq
	ldr	x8, [x20, x8]
	cmp	x8, x10
	b.ne	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_params_rate
	mov	x1, x0
	mov	x0, x20
	bl	_snd_korg1212_SetRate
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_params_channels
Lloh8:
	adrp	x8, _K1212_PERIOD_BYTES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _K1212_PERIOD_BYTES@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	stp	w8, w0, [x20, #32]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_params_rate
	mov	x22, x0
	ldr	w20, [x20, #24]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	cmp	w20, w22
	b.ne	LBB0_7
LBB0_5:
	mov	w22, #0
	b	LBB0_8
LBB0_6:
	mov	x22, x0
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _SNDRV_PCM_HW_PARAM_RATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SNDRV_PCM_HW_PARAM_RATE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	__snd_pcm_hw_param_setempty
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_8:
	mov	x0, x22
	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	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"K1212_DEBUG: snd_korg1212_hw_params [%s]\n"

	.comm	_stateName,8,3                  ; @stateName
	.comm	_SNDRV_PCM_STREAM_PLAYBACK,8,3  ; @SNDRV_PCM_STREAM_PLAYBACK
	.comm	_SNDRV_PCM_HW_PARAM_RATE,4,2    ; @SNDRV_PCM_HW_PARAM_RATE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_K1212_PERIOD_BYTES,4,2         ; @K1212_PERIOD_BYTES
	.no_dead_strip	_snd_korg1212_hw_params
.subsections_via_symbols
