	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdspm_write_in_gain
_hdspm_write_in_gain:                   ## @hdspm_write_in_gain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $esi killed $esi def $rsi
	movq	_HDSPM_MIXER_CHANNELS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$-1, %eax
	cmpl	%esi, %r8d
	jbe	LBB0_3
## %bb.1:
	cmpl	%edx, %r8d
	jbe	LBB0_3
## %bb.2:
	movq	_HDSPM_MADI_mixerBase@GOTPCREL(%rip), %r8
	movl	%esi, %r9d
	shll	$7, %esi
	addl	%edx, %esi
	shlq	$2, %rsi
	addq	(%r8), %rsi
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax,%r9,8), %rax
	movl	%edx, %edx
	movw	%cx, (%rax,%rdx,2)
	movzwl	%cx, %edx
	callq	_hdspm_write
	xorl	%eax, %eax
LBB0_3:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDSPM_MIXER_CHANNELS,4,2       ## @HDSPM_MIXER_CHANNELS
	.comm	_HDSPM_MADI_mixerBase,8,3       ## @HDSPM_MADI_mixerBase
	.no_dead_strip	_hdspm_write_in_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdspm_write_in_gain
_hdspm_write_in_gain:                   ; @hdspm_write_in_gain
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _HDSPM_MIXER_CHANNELS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDSPM_MIXER_CHANNELS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	ccmp	w8, w2, #0, hi
	b.hi	LBB0_2
; %bb.1:
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh3:
	adrp	x8, _HDSPM_MADI_mixerBase@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDSPM_MADI_mixerBase@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	w9, w2, w1, lsl #7
	add	x8, x8, w9, uxtw #2
	ldr	x9, [x0]
	ldr	x9, [x9]
	ldr	x9, [x9, w1, uxtw #3]
	strh	w3, [x9, w2, uxtw #1]
	mov	x1, x8
	mov	x2, x3
	bl	_hdspm_write
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HDSPM_MIXER_CHANNELS,4,2       ; @HDSPM_MIXER_CHANNELS
	.comm	_HDSPM_MADI_mixerBase,8,3       ; @HDSPM_MADI_mixerBase
	.no_dead_strip	_hdspm_write_in_gain
.subsections_via_symbols
