	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m032_set_gain
_mt9m032_set_gain:                      ## @mt9m032_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	callq	_v4l2_get_subdevdata
	movl	%ebx, %edx
	shrl	$31, %edx
	addl	%ebx, %edx
	sarl	%edx
	xorl	%esi, %esi
	cmpl	$63, %ebx
	setge	%sil
	cmovll	%ebx, %edx
	movq	_MT9M032_GAIN_DIGITAL_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	$51, %edi
	movq	_MT9M032_GAIN_DIGITAL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	movq	_MT9M032_GAIN_AMUL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_MT9M032_GAIN_ANALOG_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edx
	orl	%esi, %edx
	orl	%edi, %edx
	movq	_MT9M032_GAIN_ALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mt9m032_write                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MT9M032_GAIN_DIGITAL_MASK,4,2  ## @MT9M032_GAIN_DIGITAL_MASK
	.comm	_MT9M032_GAIN_DIGITAL_SHIFT,4,2 ## @MT9M032_GAIN_DIGITAL_SHIFT
	.comm	_MT9M032_GAIN_AMUL_SHIFT,4,2    ## @MT9M032_GAIN_AMUL_SHIFT
	.comm	_MT9M032_GAIN_ANALOG_MASK,4,2   ## @MT9M032_GAIN_ANALOG_MASK
	.comm	_MT9M032_GAIN_ALL,4,2           ## @MT9M032_GAIN_ALL
	.no_dead_strip	_mt9m032_set_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m032_set_gain
_mt9m032_set_gain:                      ; @mt9m032_set_gain
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_v4l2_get_subdevdata
	cmp	w19, #62
	cset	w8, gt
	cmp	w19, #0
	cinc	w9, w19, lt
	asr	w9, w9, #1
Lloh0:
	adrp	x10, _MT9M032_GAIN_DIGITAL_MASK@GOTPAGE
Lloh1:
	ldr	x10, [x10, _MT9M032_GAIN_DIGITAL_MASK@GOTPAGEOFF]
	cmp	w19, #63
	csel	w9, w19, w9, lt
Lloh2:
	ldr	w10, [x10]
	mov	w11, #51
	and	w10, w10, w11
Lloh3:
	adrp	x11, _MT9M032_GAIN_DIGITAL_SHIFT@GOTPAGE
Lloh4:
	ldr	x11, [x11, _MT9M032_GAIN_DIGITAL_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	lsl	w10, w10, w11
Lloh6:
	adrp	x11, _MT9M032_GAIN_AMUL_SHIFT@GOTPAGE
Lloh7:
	ldr	x11, [x11, _MT9M032_GAIN_AMUL_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	lsl	w8, w8, w11
	orr	w8, w8, w10
Lloh9:
	adrp	x10, _MT9M032_GAIN_ANALOG_MASK@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MT9M032_GAIN_ANALOG_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	and	w9, w10, w9
	orr	w2, w8, w9
Lloh12:
	adrp	x8, _MT9M032_GAIN_ALL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MT9M032_GAIN_ALL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mt9m032_write
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT9M032_GAIN_DIGITAL_MASK,4,2  ; @MT9M032_GAIN_DIGITAL_MASK
	.comm	_MT9M032_GAIN_DIGITAL_SHIFT,4,2 ; @MT9M032_GAIN_DIGITAL_SHIFT
	.comm	_MT9M032_GAIN_AMUL_SHIFT,4,2    ; @MT9M032_GAIN_AMUL_SHIFT
	.comm	_MT9M032_GAIN_ANALOG_MASK,4,2   ; @MT9M032_GAIN_ANALOG_MASK
	.comm	_MT9M032_GAIN_ALL,4,2           ; @MT9M032_GAIN_ALL
	.no_dead_strip	_mt9m032_set_gain
.subsections_via_symbols
