	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_korg1212_control_volume_put
_snd_korg1212_control_volume_put:       ## @snd_korg1212_control_volume_put
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_snd_kcontrol_chip
	movq	%rax, %r14
	movq	%rax, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irq
	movslq	(%rbx), %rax
	movq	(%r15), %rcx
	movl	(%rcx), %edi
	movq	_k1212MinVolume@GOTPCREL(%rip), %r9
	xorl	%r15d, %r15d
	movq	_k1212MaxVolume@GOTPCREL(%rip), %r8
	cmpl	(%r9), %edi
	jl	LBB0_4
## %bb.1:
	cmpl	(%r8), %edi
	jl	LBB0_4
## %bb.2:
	movq	16(%r14), %rbx
	movq	(%rbx), %rbx
	movl	(%rbx,%rax,4), %edx
	movl	%edx, %esi
	negl	%esi
	cmovsl	%edx, %esi
	cmpl	%esi, %edi
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rdx
	movl	%edi, %esi
	negl	%esi
	cmpq	$0, (%rdx,%rax,8)
	cmovlel	%edi, %esi
	movl	%esi, (%rbx,%rax,4)
	movl	$1, %r15d
LBB0_4:
	cmpl	$8, %eax
	jl	LBB0_9
## %bb.5:
	movl	4(%rcx), %ecx
	cmpl	(%r9), %ecx
	jl	LBB0_9
## %bb.6:
	cmpl	(%r8), %ecx
	jl	LBB0_9
## %bb.7:
	movl	%eax, %eax
	movq	16(%r14), %rdx
	movq	(%rdx), %rdx
	movl	4(%rdx,%rax,4), %esi
	movl	%esi, %edi
	negl	%edi
	cmovsl	%esi, %edi
	cmpl	%edi, %ecx
	je	LBB0_9
## %bb.8:
	movq	(%r14), %rsi
	movl	%ecx, %edi
	negl	%edi
	cmpq	$0, 8(%rsi,%rax,8)
	cmovlel	%ecx, %edi
	movl	%edi, 4(%rdx,%rax,4)
	movl	$1, %r15d
LBB0_9:
	movq	%r12, %rdi
	callq	_spin_unlock_irq
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_k1212MinVolume,4,2             ## @k1212MinVolume
	.comm	_k1212MaxVolume,4,2             ## @k1212MaxVolume
	.no_dead_strip	_snd_korg1212_control_volume_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_korg1212_control_volume_put
_snd_korg1212_control_volume_put:       ; @snd_korg1212_control_volume_put
	.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	x21, x1
	mov	x22, x0
	bl	_snd_kcontrol_chip
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_spin_lock_irq
	ldrsw	x8, [x22]
	ldr	x9, [x21]
	ldr	w12, [x9]
Lloh0:
	adrp	x10, _k1212MinVolume@GOTPAGE
Lloh1:
	ldr	x10, [x10, _k1212MinVolume@GOTPAGEOFF]
	ldr	w13, [x10]
Lloh2:
	adrp	x11, _k1212MaxVolume@GOTPAGE
Lloh3:
	ldr	x11, [x11, _k1212MaxVolume@GOTPAGEOFF]
	ldr	w14, [x11]
	cmp	w12, w13
	ccmp	w12, w14, #8, ge
	b.lt	LBB0_2
; %bb.1:
	ldr	x13, [x20, #16]
	ldr	x13, [x13]
	ldr	w14, [x13, x8, lsl #2]
	cmp	w14, #0
	cneg	w14, w14, mi
	cmp	w12, w14
	b.ne	LBB0_3
LBB0_2:
	mov	w21, #0
	cmp	w8, #8
	b.ge	LBB0_4
	b	LBB0_7
LBB0_3:
	ldr	x14, [x20]
	ldr	x14, [x14, x8, lsl #3]
	cmp	x14, #0
	cneg	w12, w12, gt
	str	w12, [x13, x8, lsl #2]
	mov	w21, #1
	cmp	w8, #8
	b.lt	LBB0_7
LBB0_4:
	ldr	w9, [x9, #4]
	ldr	w10, [x10]
	ldr	w11, [x11]
	cmp	w9, w10
	ccmp	w9, w11, #8, ge
	b.lt	LBB0_7
; %bb.5:
	and	x10, x8, #0xffffffff
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
	add	x10, x10, #1
	ldr	w11, [x8, x10, lsl #2]
	cmp	w11, #0
	cneg	w11, w11, mi
	cmp	w9, w11
	b.eq	LBB0_7
; %bb.6:
	ldr	x11, [x20]
	ldr	x11, [x11, x10, lsl #3]
	cmp	x11, #0
	cneg	w9, w9, gt
	str	w9, [x8, x10, lsl #2]
	mov	w21, #1
LBB0_7:
	mov	x0, x19
	bl	_spin_unlock_irq
	mov	x0, x21
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_k1212MinVolume,4,2             ; @k1212MinVolume
	.comm	_k1212MaxVolume,4,2             ; @k1212MaxVolume
	.no_dead_strip	_snd_korg1212_control_volume_put
.subsections_via_symbols
