	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdsp_set_ad_gain
_hdsp_set_ad_gain:                      ## @hdsp_set_ad_gain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_HDSP_ADGainMask@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	(%rdi), %edx
	movl	%edx, (%rdi)
	movl	$-1, %eax
	cmpl	$2, %esi
	ja	LBB0_2
## %bb.1:
	movslq	%esi, %rax
	leaq	l_switch.table.hdsp_set_ad_gain(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	orl	(%rax), %edx
	movl	%edx, (%rdi)
	movq	_HDSP_controlRegister@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_hdsp_write
	xorl	%eax, %eax
LBB0_2:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HDSP_ADGainMask,4,2            ## @HDSP_ADGainMask
	.comm	_HDSP_ADGainMinus10dBV,4,2      ## @HDSP_ADGainMinus10dBV
	.comm	_HDSP_ADGainPlus4dBu,4,2        ## @HDSP_ADGainPlus4dBu
	.comm	_HDSP_ADGainLowGain,4,2         ## @HDSP_ADGainLowGain
	.comm	_HDSP_controlRegister,4,2       ## @HDSP_controlRegister
	.no_dead_strip	_hdsp_set_ad_gain
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.hdsp_set_ad_gain
l_switch.table.hdsp_set_ad_gain:
	.quad	_HDSP_ADGainMinus10dBV
	.quad	_HDSP_ADGainPlus4dBu
	.quad	_HDSP_ADGainLowGain

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdsp_set_ad_gain
_hdsp_set_ad_gain:                      ; @hdsp_set_ad_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, _HDSP_ADGainMask@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HDSP_ADGainMask@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0]
	bic	w8, w9, w8
	str	w8, [x0]
	cmp	w1, #2
	b.hi	LBB0_2
; %bb.1:
Lloh3:
	adrp	x9, l_switch.table.hdsp_set_ad_gain@PAGE
Lloh4:
	add	x9, x9, l_switch.table.hdsp_set_ad_gain@PAGEOFF
	ldr	x9, [x9, w1, sxtw #3]
	ldr	w9, [x9]
	orr	w2, w9, w8
	str	w2, [x0]
Lloh5:
	adrp	x8, _HDSP_controlRegister@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDSP_controlRegister@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_hdsp_write
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	w0, #-1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_HDSP_ADGainMask,4,2            ; @HDSP_ADGainMask
	.comm	_HDSP_ADGainMinus10dBV,4,2      ; @HDSP_ADGainMinus10dBV
	.comm	_HDSP_ADGainPlus4dBu,4,2        ; @HDSP_ADGainPlus4dBu
	.comm	_HDSP_ADGainLowGain,4,2         ; @HDSP_ADGainLowGain
	.comm	_HDSP_controlRegister,4,2       ; @HDSP_controlRegister
	.no_dead_strip	_hdsp_set_ad_gain
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.hdsp_set_ad_gain
l_switch.table.hdsp_set_ad_gain:
	.quad	_HDSP_ADGainMinus10dBV
	.quad	_HDSP_ADGainPlus4dBu
	.quad	_HDSP_ADGainLowGain

.subsections_via_symbols
