	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ad1843_set_gain                ## -- Begin function ad1843_set_gain
	.p2align	4, 0x90
_ad1843_set_gain:                       ## @ad1843_set_gain
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rdi, %r15
	movq	_ad1843_gain@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %r13
	movq	8(%r13), %rdx
	movb	(%rdx), %cl
	movl	$-1, %esi
	shll	%cl, %esi
	movq	24(%r13), %rax
	notl	%esi
	movzwl	%si, %ebx
	movl	%ebx, %r14d
	andl	%r12d, %r14d
	shrl	$8, %r12d
	andl	%ebx, %r12d
	movq	32(%r13), %rsi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%r9d, %r9d
	testl	%r12d, %r12d
	sete	%r9b
	xorl	%ecx, %ecx
	testl	%r14d, %r14d
	sete	%cl
	movl	16(%r13), %r8d
	movq	%r15, %rdi
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	movl	$2, %esi
	movq	%rax, %rdx
	callq	_ad1843_write_multi
	movq	%r15, %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	8(%r13), %rdx
LBB0_2:
	movl	%ebx, %ecx
	subl	%r14d, %ecx
	subl	%r12d, %ebx
	testq	%rsi, %rsi
	cmovel	%r14d, %ecx
	cmovel	%r12d, %ebx
	movl	(%r13), %r8d
	movq	%r15, %rdi
	movl	$2, %esi
	movl	%ebx, %r9d
	callq	_ad1843_write_multi
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ad1843_get_gain                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ad1843_gain,8,3                ## @ad1843_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ad1843_set_gain                ; -- Begin function ad1843_set_gain
	.p2align	2
_ad1843_set_gain:                       ; @ad1843_set_gain
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x8, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x9, _ad1843_gain@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ad1843_gain@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x21, [x9, w1, sxtw #3]
	ldr	x2, [x21, #8]
	ldr	w9, [x2]
	mov	w10, #-1
	lsl	w9, w10, w9
	mvn	w9, w9
	and	w24, w9, #0xffff
	and	w22, w24, w8
	and	w23, w24, w8, lsr #8
	ldp	x8, x25, [x21, #24]
	cbz	x8, LBB0_2
; %bb.1:
	cmp	w23, #0
	cset	w5, eq
	cmp	w22, #0
	cset	w3, eq
	ldr	w4, [x21, #16]
	mov	x0, x20
	mov	w1, #2
	mov	x2, x8
	bl	_ad1843_write_multi
	ldr	x2, [x21, #8]
LBB0_2:
	sub	w8, w24, w22
	sub	w9, w24, w23
	cmp	x25, #0
	csel	w3, w22, w8, eq
	csel	w5, w23, w9, eq
	ldr	w4, [x21]
	mov	x0, x20
	mov	w1, #2
	bl	_ad1843_write_multi
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_ad1843_get_gain
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ad1843_gain,8,3                ; @ad1843_gain
.subsections_via_symbols
