	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt9m111_set_global_gain
_mt9m111_set_global_gain:               ## @mt9m111_set_global_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
	cmpl	$253, %ebx
	jl	LBB0_1
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	cmpl	$128, %ebx
	jl	LBB0_4
## %bb.2:
	cmpl	$252, %ebx
	je	LBB0_4
## %bb.3:
	shrl	$2, %ebx
	orl	$1536, %ebx                     ## imm = 0x600
	jmp	LBB0_6
LBB0_4:
	movl	%ebx, %eax
	andl	$-64, %eax
	cmpl	$64, %eax
	jne	LBB0_6
## %bb.5:
	shrl	%ebx
	orl	$512, %ebx                      ## imm = 0x200
LBB0_6:
	movq	_GLOBAL_GAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_reg_write                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GLOBAL_GAIN,4,2                ## @GLOBAL_GAIN
	.no_dead_strip	_mt9m111_set_global_gain
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt9m111_set_global_gain
_mt9m111_set_global_gain:               ; @mt9m111_set_global_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, #253
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	cmp	w19, #128
	b.lt	LBB0_5
; %bb.3:
	cmp	w19, #252
	b.eq	LBB0_5
; %bb.4:
	lsr	w8, w19, #2
	orr	w1, w8, #0x600
	b	LBB0_6
LBB0_5:
	and	w8, w19, #0xffffffc0
	lsr	w9, w19, #1
	orr	w9, w9, #0x200
	cmp	w8, #64
	csel	w1, w19, w9, ne
LBB0_6:
Lloh3:
	adrp	x8, _GLOBAL_GAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GLOBAL_GAIN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_reg_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GLOBAL_GAIN,4,2                ; @GLOBAL_GAIN
	.no_dead_strip	_mt9m111_set_global_gain
.subsections_via_symbols
