	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltr501_calculate_lux
_ltr501_calculate_lux:                  ## @ltr501_calculate_lux
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	imulq	$100, %rsi, %rdi
	addq	%rbx, %rsi
	callq	_DIV_ROUND_UP
	cmpq	$44, %rax
	ja	LBB0_4
## %bb.3:
	movl	$1774, %edi                     ## imm = 0x6EE
	movq	%rbx, %rsi
	movl	$-1105, %edx                    ## imm = 0xFBAF
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	retq
LBB0_4:
	cmpq	$63, %rax
	ja	LBB0_6
## %bb.5:
	movl	$3772, %edi                     ## imm = 0xEBC
	movq	%rbx, %rsi
	movl	$1336, %edx                     ## imm = 0x538
	jmp	LBB0_9
LBB0_6:
	cmpq	$84, %rax
	ja	LBB0_7
## %bb.8:
	movl	$1690, %edi                     ## imm = 0x69A
	movq	%rbx, %rsi
	movl	$169, %edx
LBB0_9:
	movq	%r14, %rcx
	callq	_LTR501_LUX_CONV
LBB0_10:
	shrq	$3, %rax
	movabsq	$2361183241434822607, %rcx      ## imm = 0x20C49BA5E353F7CF
	mulq	%rcx
	movq	%rdx, %rax
	shrq	$4, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ltr501_calculate_lux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltr501_calculate_lux
_ltr501_calculate_lux:                  ; @ltr501_calculate_lux
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_9
; %bb.1:
	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
	mov	x20, x0
	mov	w8, #100
	mul	x0, x1, x8
	add	x1, x1, x20
	bl	_DIV_ROUND_UP
	cmp	x0, #44
	b.hi	LBB0_3
; %bb.2:
	mov	w0, #1774
	mov	x1, x20
	mov	w2, #-1105
	b	LBB0_7
LBB0_3:
	cmp	x0, #63
	b.hi	LBB0_5
; %bb.4:
	mov	w0, #3772
	mov	x1, x20
	mov	w2, #1336
	b	LBB0_7
LBB0_5:
	cmp	x0, #84
	b.hi	LBB0_10
; %bb.6:
	mov	w0, #1690
	mov	x1, x20
	mov	w2, #169
LBB0_7:
	mov	x3, x19
	bl	_LTR501_LUX_CONV
LBB0_8:
	lsr	x8, x0, #3
	mov	x9, #63439
	movk	x9, #58195, lsl #16
	movk	x9, #39845, lsl #32
	movk	x9, #8388, lsl #48
	umulh	x8, x8, x9
	lsr	x0, x8, #4
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
LBB0_9:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	ret
LBB0_10:
	mov	x0, #0
	b	LBB0_8
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ltr501_calculate_lux
.subsections_via_symbols
