	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sensor_set_contrast
_sensor_set_contrast:                   ## @sensor_set_contrast
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpq	$0, 8(%r15)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_ov51x_stop
	testq	%rax, %rax
	js	LBB0_13
LBB0_2:
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_7
## %bb.3:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_4:
	movq	_OV7610_REG_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r14w, %edx
	shrl	$8, %edx
	movq	%r15, %rdi
	jmp	LBB0_5
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movl	$3, %edi
	xorl	%eax, %eax
	callq	_PDEBUG
	movq	_EPERM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_8:
	movzwl	%r14w, %edx
	shrl	$9, %edx
	movq	%r15, %rdi
	movl	$11, %esi
	jmp	LBB0_5
LBB0_9:
	movl	%r14d, %eax
	shrq	$12, %rax
	leaq	L___const.sensor_set_contrast.ctab(%rip), %rcx
	movzbl	(%rax,%rcx), %edx
	movq	%r15, %rdi
	movl	$100, %esi
LBB0_5:
	callq	_i2c_w
	testl	%eax, %eax
	js	LBB0_6
LBB0_11:
	movw	%r14w, 4(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	_OV7610_REG_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r14w, %edx
	shrl	$12, %edx
	movq	%r15, %rdi
	movl	$15, %ecx
	callq	_i2c_w_mask
	testl	%eax, %eax
	jns	LBB0_11
LBB0_6:
	movl	%eax, %ebx
LBB0_12:
	movq	%r15, %rdi
	callq	_ov51x_restart
	testq	%rax, %rax
	jns	LBB0_14
LBB0_13:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_4
	.long	L0_0_set_10
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_OV7610_REG_CNT,4,2             ## @OV7610_REG_CNT
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @__const.sensor_set_contrast.ctab
L___const.sensor_set_contrast.ctab:
	.ascii	"\001\005\t\021\02557W[\245\247\307\311\317\357\377"

	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported with this sensor"

	.comm	_EPERM,4,2                      ## @EPERM
	.no_dead_strip	_sensor_set_contrast
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sensor_set_contrast
_sensor_set_contrast:                   ; @sensor_set_contrast
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	mov	w21, w1
	str	x21, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	bl	_PDEBUG
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_ov51x_stop
	tbnz	x0, #63, LBB0_10
LBB0_2:
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.3:
Lloh2:
	adrp	x9, lJTI0_0@PAGE
Lloh3:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_4
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_4:
Lloh4:
	adrp	x8, _OV7610_REG_CNT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OV7610_REG_CNT@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	lsr	w2, w20, #8
	mov	x0, x19
	bl	_i2c_w
	tbnz	w0, #31, LBB0_8
LBB0_5:
	mov	w21, #0
	strh	w20, [x19, #4]
	b	LBB0_9
LBB0_6:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #3
	bl	_PDEBUG
Lloh9:
	adrp	x8, _EPERM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_7:
	lsr	w2, w20, #9
	mov	x0, x19
	mov	w1, #11
	bl	_i2c_w
	tbz	w0, #31, LBB0_5
LBB0_8:
	mov	x21, x0
LBB0_9:
	mov	x0, x19
	bl	_ov51x_restart
	tbz	x0, #63, LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _EIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_12:
	lsr	x8, x21, #12
Lloh15:
	adrp	x9, l___const.sensor_set_contrast.ctab@PAGE
Lloh16:
	add	x9, x9, l___const.sensor_set_contrast.ctab@PAGEOFF
	ldrb	w2, [x9, x8]
	mov	x0, x19
	mov	w1, #100
	bl	_i2c_w
	tbz	w0, #31, LBB0_5
	b	LBB0_8
LBB0_13:
Lloh17:
	adrp	x8, _OV7610_REG_CNT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OV7610_REG_CNT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	lsr	w2, w20, #12
	mov	x0, x19
	mov	w3, #15
	bl	_i2c_w_mask
	tbz	w0, #31, LBB0_5
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_12-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_13-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_OV7610_REG_CNT,4,2             ; @OV7610_REG_CNT
	.section	__TEXT,__literal16,16byte_literals
l___const.sensor_set_contrast.ctab:     ; @__const.sensor_set_contrast.ctab
	.ascii	"\001\005\t\021\02557W[\245\247\307\311\317\357\377"

	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported with this sensor"

	.comm	_EPERM,4,2                      ; @EPERM
	.no_dead_strip	_sensor_set_contrast
.subsections_via_symbols
