	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sethue
_sethue:                                ## @sethue
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_SENSOR_OV767x@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_fixp_sin16
	movl	%eax, %r12d
	shll	$7, %eax
	movslq	%eax, %r15
	imulq	$-2147418109, %r15, %rax        ## imm = 0x80010003
	shrq	$32, %rax
	addl	%eax, %r15d
	movl	%r15d, %eax
	shrl	$31, %eax
	sarl	$14, %r15d
	addl	%eax, %r15d
	movl	%ebx, %edi
	callq	_fixp_cos16
	shll	$7, %eax
	movslq	%eax, %rbx
	imulq	$-2147418109, %rbx, %rax        ## imm = 0x80010003
	shrq	$32, %rax
	addl	%eax, %ebx
	movl	%ebx, %eax
	shrl	$31, %eax
	sarl	$14, %ebx
	addl	%eax, %ebx
	movq	%r14, %rdi
	movl	$171, %esi
	callq	_sccb_reg_read
	cmpl	$-256, %r12d
	jg	LBB0_3
## %bb.2:
	orl	$2, %eax
	movq	%r14, %rdi
	movl	$171, %esi
	movl	%eax, %edx
	callq	_sccb_reg_write
	negl	%r15d
	jmp	LBB0_4
LBB0_3:
	andl	$-3, %eax
	movq	%r14, %rdi
	movl	$171, %esi
	movl	%eax, %edx
	callq	_sccb_reg_write
LBB0_4:
	movq	%r14, %rdi
	movl	$169, %esi
	movl	%ebx, %edx
	callq	_sccb_reg_write
	movq	%r14, %rdi
	movl	$170, %esi
	movl	%r15d, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sccb_reg_write                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SENSOR_OV767x,8,3              ## @SENSOR_OV767x
	.no_dead_strip	_sethue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sethue
_sethue:                                ; @sethue
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _SENSOR_OV767x@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SENSOR_OV767x@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x21, x1
	mov	x19, x0
	mov	x0, x1
	bl	_fixp_sin16
	mov	x22, x0
	lsl	w8, w0, #7
	mov	w23, #3
	movk	w23, #32769, lsl #16
	smull	x9, w8, w23
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #14
	add	w20, w9, w8, lsr #31
	mov	x0, x21
	bl	_fixp_cos16
	lsl	w8, w0, #7
	smull	x9, w8, w23
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #14
	add	w21, w9, w8, lsr #31
	mov	x0, x19
	mov	w1, #171
	bl	_sccb_reg_read
	cmn	w22, #256
	b.gt	LBB0_4
; %bb.3:
	orr	w2, w0, #0x2
	mov	x0, x19
	mov	w1, #171
	bl	_sccb_reg_write
	neg	w20, w20
	b	LBB0_5
LBB0_4:
	and	w2, w0, #0xfffffffd
	mov	x0, x19
	mov	w1, #171
	bl	_sccb_reg_write
LBB0_5:
	mov	x0, x19
	mov	w1, #169
	mov	x2, x21
	bl	_sccb_reg_write
	mov	x0, x19
	mov	w1, #170
	mov	x2, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_sccb_reg_write
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SENSOR_OV767x,8,3              ; @SENSOR_OV767x
	.no_dead_strip	_sethue
.subsections_via_symbols
