	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsl2550_calculate_lux
_tsl2550_calculate_lux:                 ## @tsl2550_calculate_lux
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_count_lut@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rdi,4), %edi
	movl	(%rax,%rsi,4), %eax
	movl	%edi, %ecx
	subl	%eax, %ecx
	jge	LBB0_1
## %bb.5:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_1:
	testl	%edi, %edi
	je	LBB0_2
## %bb.3:
	shll	$7, %eax
	cltd
	idivl	%edi
	cltq
	movq	_ratio_lut@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	imull	(%rdx,%rax,4), %ecx
	leal	255(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$8, %edx
	jmp	LBB0_4
LBB0_2:
	xorl	%edx, %edx
LBB0_4:
	movq	_TSL2550_MAX_LUX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %edx
	cmovbl	%edx, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_count_lut,8,3                  ## @count_lut
	.comm	_ratio_lut,8,3                  ## @ratio_lut
	.comm	_TSL2550_MAX_LUX,4,2            ## @TSL2550_MAX_LUX
	.no_dead_strip	_tsl2550_calculate_lux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsl2550_calculate_lux
_tsl2550_calculate_lux:                 ; @tsl2550_calculate_lux
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _count_lut@GOTPAGE
Lloh1:
	ldr	x8, [x8, _count_lut@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w9, [x8, x0, lsl #2]
	ldr	w10, [x8, x1, lsl #2]
	subs	w8, w9, w10
	b.ge	LBB0_2
; %bb.1:
	mov	w0, #0
	ret
LBB0_2:
	cbz	w9, LBB0_4
; %bb.3:
	lsl	w10, w10, #7
	sdiv	w9, w10, w9
Lloh3:
	adrp	x10, _ratio_lut@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ratio_lut@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	ldr	w9, [x10, w9, sxtw #2]
	mul	w8, w9, w8
	add	w9, w8, #255
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #8
	b	LBB0_5
LBB0_4:
	mov	w8, #0
LBB0_5:
Lloh6:
	adrp	x9, _TSL2550_MAX_LUX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TSL2550_MAX_LUX@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w0, w8, w9, lo
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_count_lut,8,3                  ; @count_lut
	.comm	_ratio_lut,8,3                  ; @ratio_lut
	.comm	_TSL2550_MAX_LUX,4,2            ; @TSL2550_MAX_LUX
	.no_dead_strip	_tsl2550_calculate_lux
.subsections_via_symbols
