	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function imx274_set_digital_gain
_imx274_set_digital_gain:               ## @imx274_set_digital_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
	movq	%rdi, %rbx
	bsfl	%esi, %edi
	cmovel	%esi, %edi
	xorl	%esi, %esi
	movl	$3, %edx
	callq	_clamp
	movq	_IMX274_DIGITAL_GAIN_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_IMX274_MASK_LSB_4_BITS@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	%rbx, %rdi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_imx274_write_reg               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_IMX274_DIGITAL_GAIN_REG,4,2    ## @IMX274_DIGITAL_GAIN_REG
	.comm	_IMX274_MASK_LSB_4_BITS,4,2     ## @IMX274_MASK_LSB_4_BITS
	.no_dead_strip	_imx274_set_digital_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function imx274_set_digital_gain
_imx274_set_digital_gain:               ; @imx274_set_digital_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, x0
	rbit	w8, w1
	clz	w8, w8
	cmp	w1, #0
	csel	w0, wzr, w8, eq
	mov	w1, #0
	mov	w2, #3
	bl	_clamp
Lloh0:
	adrp	x8, _IMX274_DIGITAL_GAIN_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IMX274_DIGITAL_GAIN_REG@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IMX274_MASK_LSB_4_BITS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IMX274_MASK_LSB_4_BITS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w8, [x9]
	and	w2, w8, w0
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_imx274_write_reg
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IMX274_DIGITAL_GAIN_REG,4,2    ; @IMX274_DIGITAL_GAIN_REG
	.comm	_IMX274_MASK_LSB_4_BITS,4,2     ; @IMX274_MASK_LSB_4_BITS
	.no_dead_strip	_imx274_set_digital_gain
.subsections_via_symbols
