	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function et8ek8_set_gain
_et8ek8_set_gain:                       ## @et8ek8_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_v4l2_get_subdevdata
	movq	%rax, %r14
	movq	_et8ek8_gain_table@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %r12d
	movl	4(%rax,%rbx,8), %r15d
	movq	_ET8EK8_REG_8BIT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r12d, %ecx
	sarl	$8, %ecx
	movq	%r14, %rdi
	movl	$4682, %edx                     ## imm = 0x124A
	callq	_et8ek8_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movl	(%rbx), %esi
	movzbl	%r12b, %ecx
	movq	%r14, %rdi
	movl	$4681, %edx                     ## imm = 0x1249
	callq	_et8ek8_i2c_write_reg
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movl	(%rbx), %esi
	movl	%r15d, %ecx
	sarl	$8, %ecx
	movq	%r14, %rdi
	movl	$4685, %edx                     ## imm = 0x124D
	callq	_et8ek8_i2c_write_reg
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%rbx), %esi
	movzbl	%r15b, %ecx
	movq	%r14, %rdi
	movl	$4684, %edx                     ## imm = 0x124C
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_et8ek8_i2c_write_reg           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_et8ek8_gain_table,8,3          ## @et8ek8_gain_table
	.comm	_ET8EK8_REG_8BIT,4,2            ## @ET8EK8_REG_8BIT
	.no_dead_strip	_et8ek8_set_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function et8ek8_set_gain
_et8ek8_set_gain:                       ; @et8ek8_set_gain
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	bl	_v4l2_get_subdevdata
	mov	x19, x0
Lloh0:
	adrp	x8, _et8ek8_gain_table@GOTPAGE
Lloh1:
	ldr	x8, [x8, _et8ek8_gain_table@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x8, x8, x20, lsl #3
	ldp	w22, w20, [x8]
Lloh3:
	adrp	x21, _ET8EK8_REG_8BIT@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ET8EK8_REG_8BIT@GOTPAGEOFF]
	ldr	w1, [x21]
	asr	w3, w22, #8
	mov	w2, #4682
	bl	_et8ek8_i2c_write_reg
	cbnz	w0, LBB0_3
; %bb.1:
	ldr	w1, [x21]
	and	w3, w22, #0xff
	mov	x0, x19
	mov	w2, #4681
	bl	_et8ek8_i2c_write_reg
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w1, [x21]
	asr	w3, w20, #8
	mov	x0, x19
	mov	w2, #4685
	bl	_et8ek8_i2c_write_reg
	cbz	w0, LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w1, [x21]
	and	w3, w20, #0xff
	mov	x0, x19
	mov	w2, #4684
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_et8ek8_i2c_write_reg
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_et8ek8_gain_table,8,3          ; @et8ek8_gain_table
	.comm	_ET8EK8_REG_8BIT,4,2            ; @ET8EK8_REG_8BIT
	.no_dead_strip	_et8ek8_set_gain
.subsections_via_symbols
