	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpr0521_set_gain
_rpr0521_set_gain:                      ## @rpr0521_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
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_rpr0521_gain@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	movslq	%esi, %rax
	leaq	(%rax,%rax,2), %r9
	movl	(%r8,%r9,8), %r11d
	testl	%r11d, %r11d
	jle	LBB0_5
## %bb.1:
	movq	16(%r8,%r9,8), %rsi
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rax
	cmpq	%rax, %r11
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, (%rsi,%rax,8)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ecx, 4(%rsi,%rax,8)
	jne	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	%r10d, %eax
	negl	%eax
	testl	%r10d, %r10d
	jle	LBB0_7
## %bb.6:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_7:
	movl	(%rdi), %edi
	movl	12(%r8,%r9,8), %esi
	movl	8(%r8,%r9,8), %edx
	movb	4(%r8,%r9,8), %cl
	shll	%cl, %eax
	movl	%eax, %ecx
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_rpr0521_gain,8,3               ## @rpr0521_gain
	.no_dead_strip	_rpr0521_set_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpr0521_set_gain
_rpr0521_set_gain:                      ; @rpr0521_set_gain
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x8]
Lloh3:
	adrp	x8, _rpr0521_gain@GOTPAGE
Lloh4:
	ldr	x8, [x8, _rpr0521_gain@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x8]
	sxtw	x10, w1
	mov	w8, #24
	smull	x8, w1, w8
	ldr	w12, [x9, x8]
	cmp	w12, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x8, #0
	mov	w13, #24
	madd	x13, x10, x13, x9
	ldr	x13, [x13, #16]
	add	x13, x13, #4
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	add	x13, x13, #8
	cmp	x12, x8
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w14, [x13, #-4]
	cmp	w14, w2
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w14, [x13]
	cmp	w14, w3
	b.ne	LBB0_2
	b	LBB0_7
LBB0_5:
	neg	w8, w11
	cmp	w11, #0
	b.le	LBB0_7
; %bb.6:
	mov	x0, x8
	ret
LBB0_7:
	ldr	w0, [x0]
	mov	w11, #24
	mul	x10, x10, x11
	add	x9, x9, x10
	ldp	w2, w1, [x9, #8]
	ldr	w9, [x9, #4]
	lsl	w3, w8, w9
	b	_regmap_update_bits
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_rpr0521_gain,8,3               ; @rpr0521_gain
	.no_dead_strip	_rpr0521_set_gain
.subsections_via_symbols
