	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sensor_set_brightness
_sensor_set_brightness:                 ## @sensor_set_brightness
	.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	$4, %edi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_PDEBUG
	cmpq	$0, 16(%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	$5, %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_BRT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	%r14w, %edx
	shrl	$8, %edx
	movq	%r15, %rdi
LBB0_5:
	callq	_i2c_w
	testl	%eax, %eax
	js	LBB0_11
LBB0_6:
	movw	%r14w, 4(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_12
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
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
LBB0_8:
	movzwl	%r14w, %edx
	shrl	$8, %edx
	movq	%r15, %rdi
	movl	$10, %esi
	jmp	LBB0_5
LBB0_9:
	cmpl	$0, 8(%r15)
	jne	LBB0_6
	jmp	LBB0_4
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_8
	.long	L0_0_set_4
	.long	L0_0_set_9
	.long	L0_0_set_4
	.long	L0_0_set_4
	.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_BRT,4,2             ## @OV7610_REG_BRT
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported with this sensor"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sensor_set_brightness
_sensor_set_brightness:                 ; @sensor_set_brightness
	.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	w8, w1
	str	x8, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #4
	bl	_PDEBUG
	ldr	x8, [x19, #16]
	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, #5
	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_BRT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OV7610_REG_BRT@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, #8
	mov	x0, x19
	mov	w1, #10
	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:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_5
	b	LBB0_4
	.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
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_12-LBB0_4)>>2
	.byte	(LBB0_4-LBB0_4)>>2
	.byte	(LBB0_4-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_BRT,4,2             ; @OV7610_REG_BRT
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported with this sensor"

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