	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cx24113_set_gain_settings
_cx24113_set_gain_settings:             ## @cx24113_set_gain_settings
	.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
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	$29, %esi
	callq	_cx24113_readreg
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	$31, %esi
	callq	_cx24113_readreg
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_cx24113_readreg
	movl	%eax, %r14d
	movq	(%rbx), %r12
	movq	8(%rbx), %rcx
	xorl	%r15d, %r15d
	cmpq	%r13, %r12
	setle	%r15b
	leaq	L_.str(%rip), %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	movq	%r15, %r8
	callq	_dprintk
	xorl	%eax, %eax
	cmpq	%r15, 8(%rbx)
	je	LBB0_5
## %bb.1:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	andl	$63, %esi
	andl	$243, %r14d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	orl	$15, %eax
	movzbl	%al, %edx
	cmpq	%r13, %r12
	movq	%r14, %rdi
	jg	LBB0_3
## %bb.2:
	movq	_VGA_7@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leal	(,%rcx,8), %eax
	orl	%ecx, %eax
	movq	_RFVGA_0@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_VGA_6@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	movq	_VGA_2@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_RFVGA_2@GOTPCREL(%rip), %rcx
LBB0_4:
	movl	(%rcx), %ecx
	shll	$2, %ecx
	movslq	%ecx, %r14
	orq	%rdi, %r14
	movslq	%eax, %r12
	orq	%rsi, %r12
	movq	%r15, 8(%rbx)
	movq	%rbx, %rdi
	movl	$29, %esi
	callq	_cx24113_writereg
	movq	%rbx, %rdi
	movl	$31, %esi
	movq	%r12, %rdx
	callq	_cx24113_writereg
	movq	%rbx, %rdi
	movl	$32, %esi
	movq	%r14, %rdx
	callq	_cx24113_writereg
	movl	$1, %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"power estimation: %d, thres: %d, gain_level: %d/%d\n"

	.comm	_RFVGA_0,4,2                    ## @RFVGA_0
	.comm	_VGA_7,4,2                      ## @VGA_7
	.comm	_RFVGA_2,4,2                    ## @RFVGA_2
	.comm	_VGA_6,4,2                      ## @VGA_6
	.comm	_VGA_2,4,2                      ## @VGA_2
	.no_dead_strip	_cx24113_set_gain_settings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cx24113_set_gain_settings
_cx24113_set_gain_settings:             ; @cx24113_set_gain_settings
	.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	x21, x1
	mov	x19, x0
	mov	w1, #29
	bl	_cx24113_readreg
	mov	x22, x0
	mov	x0, x19
	mov	w1, #31
	bl	_cx24113_readreg
	mov	x23, x0
	mov	x0, x19
	mov	w1, #32
	bl	_cx24113_readreg
	mov	x25, x0
	ldp	x24, x3, [x19]
	cmp	x24, x21
	cset	w20, le
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x24
	mov	x4, x20
	bl	_dprintk
	ldr	x8, [x19, #8]
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_6
LBB0_2:
	and	w8, w23, #0x3f
	mov	w9, #243
	and	w9, w25, w9
	and	w10, w22, #0xf0
	orr	w2, w10, #0xf
	cmp	x24, x21
	b.gt	LBB0_4
; %bb.3:
Lloh2:
	adrp	x10, _VGA_7@GOTPAGE
Lloh3:
	ldr	x10, [x10, _VGA_7@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	orr	w10, w10, w10, lsl #3
Lloh5:
	adrp	x11, _RFVGA_0@GOTPAGE
Lloh6:
	ldr	x11, [x11, _RFVGA_0@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh7:
	adrp	x10, _VGA_6@GOTPAGE
Lloh8:
	ldr	x10, [x10, _VGA_6@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
Lloh10:
	adrp	x11, _VGA_2@GOTPAGE
Lloh11:
	ldr	x11, [x11, _VGA_2@GOTPAGEOFF]
Lloh12:
	ldr	w11, [x11]
	orr	w10, w11, w10, lsl #3
Lloh13:
	adrp	x11, _RFVGA_2@GOTPAGE
Lloh14:
	ldr	x11, [x11, _RFVGA_2@GOTPAGEOFF]
LBB0_5:
	ldr	w11, [x11]
	lsl	w11, w11, #2
	sxtw	x11, w11
	orr	x21, x11, x9
	sxtw	x9, w10
	orr	x22, x9, x8
	str	x20, [x19, #8]
	mov	x0, x19
	mov	w1, #29
	bl	_cx24113_writereg
	mov	x0, x19
	mov	w1, #31
	mov	x2, x22
	bl	_cx24113_writereg
	mov	x0, x19
	mov	w1, #32
	mov	x2, x21
	bl	_cx24113_writereg
	mov	w0, #1
LBB0_6:
	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
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"power estimation: %d, thres: %d, gain_level: %d/%d\n"

	.comm	_RFVGA_0,4,2                    ; @RFVGA_0
	.comm	_VGA_7,4,2                      ; @VGA_7
	.comm	_RFVGA_2,4,2                    ; @RFVGA_2
	.comm	_VGA_6,4,2                      ; @VGA_6
	.comm	_VGA_2,4,2                      ; @VGA_2
	.no_dead_strip	_cx24113_set_gain_settings
.subsections_via_symbols
