	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sscape_midi_put
_sscape_midi_put:                       ## @sscape_midi_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, %r14
	callq	_snd_kcontrol_chip
	movq	(%rax), %rdi
	callq	_get_card_soundscape
	movq	%rax, %rbx
	leaq	4(%rax), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movl	8(%rbx), %edi
	callq	_set_host_mode_unsafe
	movzbl	(%rbx), %eax
	movq	(%r14), %rcx
	movl	(%rcx), %ecx
	andl	$127, %ecx
	xorl	%r12d, %r12d
	cmpl	%eax, %ecx
	je	LBB0_5
## %bb.1:
	movl	8(%rbx), %edi
	movq	_CMD_SET_MIDI_VOL@GOTPCREL(%rip), %rax
	movzbl	(%rax), %esi
	movl	$100, %edx
	callq	_host_write_ctrl_unsafe
	xorl	%r12d, %r12d
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	8(%rbx), %edi
	movq	(%r14), %rax
	movl	(%rax), %esi
	andl	$127, %esi
	movl	$100, %edx
	callq	_host_write_ctrl_unsafe
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	8(%rbx), %edi
	movq	_CMD_XXX_MIDI_VOL@GOTPCREL(%rip), %rax
	movzbl	(%rax), %esi
	movl	$100, %edx
	callq	_host_write_ctrl_unsafe
	xorl	%r12d, %r12d
	testq	%rax, %rax
	setne	%r12b
LBB0_4:
	movq	(%r14), %rax
	movb	(%rax), %al
	andb	$127, %al
	movb	%al, (%rbx)
LBB0_5:
	movl	8(%rbx), %edi
	callq	_set_midi_mode_unsafe
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CMD_SET_MIDI_VOL,1,0           ## @CMD_SET_MIDI_VOL
	.comm	_CMD_XXX_MIDI_VOL,1,0           ## @CMD_XXX_MIDI_VOL
	.no_dead_strip	_sscape_midi_put
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sscape_midi_put
_sscape_midi_put:                       ; @sscape_midi_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
	bl	_snd_kcontrol_chip
	ldr	x0, [x0]
	bl	_get_card_soundscape
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w0, [x20, #8]
	bl	_set_host_mode_unsafe
	ldrb	w8, [x20]
	ldr	x9, [x21]
	ldr	w9, [x9]
	and	w9, w9, #0x7f
	cmp	w9, w8
	b.ne	LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_7
LBB0_2:
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x8, _CMD_SET_MIDI_VOL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_SET_MIDI_VOL@GOTPAGEOFF]
	ldrb	w1, [x8]
	mov	w2, #100
	bl	_host_write_ctrl_unsafe
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w0, [x20, #8]
	ldr	x8, [x21]
	ldr	w8, [x8]
	and	w1, w8, #0x7f
	mov	w2, #100
	bl	_host_write_ctrl_unsafe
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x20, #8]
Lloh2:
	adrp	x8, _CMD_XXX_MIDI_VOL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CMD_XXX_MIDI_VOL@GOTPAGEOFF]
	ldrb	w1, [x8]
	mov	w2, #100
	bl	_host_write_ctrl_unsafe
	cmp	x0, #0
	cset	w22, ne
	b	LBB0_6
LBB0_5:
	mov	w22, #0
LBB0_6:
	ldr	x8, [x21]
	ldrb	w8, [x8]
	and	w8, w8, #0x7f
	strb	w8, [x20]
LBB0_7:
	ldr	w0, [x20, #8]
	bl	_set_midi_mode_unsafe
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_CMD_SET_MIDI_VOL,1,0           ; @CMD_SET_MIDI_VOL
	.comm	_CMD_XXX_MIDI_VOL,1,0           ; @CMD_XXX_MIDI_VOL
	.no_dead_strip	_sscape_midi_put
.subsections_via_symbols
