	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cm32181_get_lux
_cm32181_get_lux:                       ## @cm32181_get_lux
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	leaq	-44(%rbp), %rsi
	callq	_cm32181_read_als_it
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_CM32181_MLUX_PER_BIT@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_CM32181_MLUX_PER_BIT_BASE_IT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movslq	-44(%rbp), %r12
	movq	_CM32181_REG_ADDR_ALS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	imulq	%r13, %rbx
	movq	%rbx, %rax
	orq	%r12, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r12
	movq	%rax, %rdx
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_13
LBB0_4:
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%r12d
	movl	%eax, %edx
LBB0_6:
	movl	%ecx, %eax
	imulq	%rdx, %rax
	imulq	(%r14), %rax
	movq	_CM32181_CALIBSCALE_RESOLUTION@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_7
## %bb.8:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_9
LBB0_7:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_9:
	movq	_MLUX_PER_LUX@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_10
## %bb.11:
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_12
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_12:
	cmpq	$65535, %rax                    ## imm = 0xFFFF
	movl	$65535, %ecx                    ## imm = 0xFFFF
	cmovbq	%rax, %rcx
LBB0_13:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_CM32181_MLUX_PER_BIT,8,3       ## @CM32181_MLUX_PER_BIT
	.comm	_CM32181_MLUX_PER_BIT_BASE_IT,8,3 ## @CM32181_MLUX_PER_BIT_BASE_IT
	.comm	_CM32181_REG_ADDR_ALS,4,2       ## @CM32181_REG_ADDR_ALS
	.comm	_CM32181_CALIBSCALE_RESOLUTION,8,3 ## @CM32181_CALIBSCALE_RESOLUTION
	.comm	_MLUX_PER_LUX,8,3               ## @MLUX_PER_LUX
	.no_dead_strip	_cm32181_get_lux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cm32181_get_lux
_cm32181_get_lux:                       ; @cm32181_get_lux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	add	x1, sp, #12
	bl	_cm32181_read_als_it
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _CM32181_MLUX_PER_BIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CM32181_MLUX_PER_BIT@GOTPAGEOFF]
Lloh2:
	adrp	x9, _CM32181_MLUX_PER_BIT_BASE_IT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CM32181_MLUX_PER_BIT_BASE_IT@GOTPAGEOFF]
Lloh4:
	ldr	x21, [x8]
Lloh5:
	ldr	x22, [x9]
	ldrsw	x23, [sp, #12]
Lloh6:
	adrp	x8, _CM32181_REG_ADDR_ALS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CM32181_REG_ADDR_ALS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_word_data
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_4
; %bb.2:
	mul	x8, x22, x21
	udiv	x8, x8, x23
	mov	w9, w0
	mul	x8, x8, x9
	ldr	x9, [x19]
	mul	x8, x8, x9
Lloh9:
	adrp	x9, _CM32181_CALIBSCALE_RESOLUTION@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CM32181_CALIBSCALE_RESOLUTION@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _MLUX_PER_LUX@GOTPAGE
Lloh13:
	ldr	x10, [x10, _MLUX_PER_LUX@GOTPAGEOFF]
	udiv	x8, x8, x9
Lloh14:
	ldr	x9, [x10]
	udiv	x8, x8, x9
	mov	w9, #65535
	cmp	x8, x9
	csel	x0, x8, x9, lo
	b	LBB0_4
LBB0_3:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_CM32181_MLUX_PER_BIT,8,3       ; @CM32181_MLUX_PER_BIT
	.comm	_CM32181_MLUX_PER_BIT_BASE_IT,8,3 ; @CM32181_MLUX_PER_BIT_BASE_IT
	.comm	_CM32181_REG_ADDR_ALS,4,2       ; @CM32181_REG_ADDR_ALS
	.comm	_CM32181_CALIBSCALE_RESOLUTION,8,3 ; @CM32181_CALIBSCALE_RESOLUTION
	.comm	_MLUX_PER_LUX,8,3               ; @MLUX_PER_LUX
	.no_dead_strip	_cm32181_get_lux
.subsections_via_symbols
