	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rgbbalance_ctrl_to_reg_value
_rgbbalance_ctrl_to_reg_value:          ## @rgbbalance_ctrl_to_reg_value
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_PAC7302_RGB_BALANCE_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subl	%ecx, %edi
	imull	$1000, %edi, %eax               ## imm = 0x3E8
	movq	_PAC7302_RGB_BALANCE_MAX@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	subl	%ecx, %esi
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	imull	%ecx, %ecx
	shll	$6, %ecx
	imulq	$1125899907, %rcx, %rcx         ## imm = 0x431BDE83
	shrq	$50, %rcx
	shll	$5, %eax
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	shrq	$38, %rax
	addl	%ecx, %eax
	addl	$32, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAC7302_RGB_BALANCE_MIN,4,2    ## @PAC7302_RGB_BALANCE_MIN
	.comm	_PAC7302_RGB_BALANCE_MAX,4,2    ## @PAC7302_RGB_BALANCE_MAX
	.no_dead_strip	_rgbbalance_ctrl_to_reg_value
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rgbbalance_ctrl_to_reg_value
_rgbbalance_ctrl_to_reg_value:          ; @rgbbalance_ctrl_to_reg_value
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _PAC7302_RGB_BALANCE_MIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAC7302_RGB_BALANCE_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w0, w8
	mov	w10, #1000
	mul	w9, w9, w10
Lloh3:
	adrp	x10, _PAC7302_RGB_BALANCE_MAX@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PAC7302_RGB_BALANCE_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	sub	w8, w10, w8
	udiv	w8, w9, w8
	mul	w9, w8, w8
	lsl	w9, w9, #6
	mov	w10, #56963
	movk	w10, #17179, lsl #16
	umull	x9, w9, w10
	lsr	x9, x9, #50
	lsl	w8, w8, #5
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	umull	x8, w8, w10
	lsr	x8, x8, #38
	add	w8, w8, w9
	add	w0, w8, #32
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PAC7302_RGB_BALANCE_MIN,4,2    ; @PAC7302_RGB_BALANCE_MIN
	.comm	_PAC7302_RGB_BALANCE_MAX,4,2    ; @PAC7302_RGB_BALANCE_MAX
	.no_dead_strip	_rgbbalance_ctrl_to_reg_value
.subsections_via_symbols
