	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltr501_init
_ltr501_init:                           ## @ltr501_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	movq	_LTR501_ALS_CONTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movq	24(%rbx), %rax
	movl	(%rax), %eax
	orl	-12(%rbp), %eax
	movl	%eax, (%rbx)
	movl	16(%rbx), %edi
	movq	_LTR501_PS_CONTR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movq	_LTR501_CONTR_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	-12(%rbp), %eax
	movl	%eax, 4(%rbx)
	movq	_IIO_INTENSITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	12(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_ltr501_read_intr_prst
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movq	_IIO_PROXIMITY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	8(%rbx), %rdx
	movq	%rbx, %rdi
	callq	_ltr501_read_intr_prst
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ltr501_write_contr
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LTR501_ALS_CONTR,4,2           ## @LTR501_ALS_CONTR
	.comm	_LTR501_PS_CONTR,4,2            ## @LTR501_PS_CONTR
	.comm	_LTR501_CONTR_ACTIVE,4,2        ## @LTR501_CONTR_ACTIVE
	.comm	_IIO_INTENSITY,4,2              ## @IIO_INTENSITY
	.comm	_IIO_PROXIMITY,4,2              ## @IIO_PROXIMITY
	.no_dead_strip	_ltr501_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltr501_init
_ltr501_init:                           ; @ltr501_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _LTR501_ALS_CONTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LTR501_ALS_CONTR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x8, _LTR501_PS_CONTR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LTR501_PS_CONTR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w8, [sp, #12]
Lloh6:
	adrp	x9, _LTR501_CONTR_ACTIVE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LTR501_CONTR_ACTIVE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19, #4]
Lloh9:
	adrp	x8, _IIO_INTENSITY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_INTENSITY@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, x19, #12
	mov	x0, x19
	bl	_ltr501_read_intr_prst
	tbnz	w0, #31, LBB0_5
; %bb.3:
Lloh12:
	adrp	x8, _IIO_PROXIMITY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IIO_PROXIMITY@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, x19, #8
	mov	x0, x19
	bl	_ltr501_read_intr_prst
	tbnz	w0, #31, LBB0_5
; %bb.4:
	ldp	w1, w2, [x19]
	mov	x0, x19
	bl	_ltr501_write_contr
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_LTR501_ALS_CONTR,4,2           ; @LTR501_ALS_CONTR
	.comm	_LTR501_PS_CONTR,4,2            ; @LTR501_PS_CONTR
	.comm	_LTR501_CONTR_ACTIVE,4,2        ; @LTR501_CONTR_ACTIVE
	.comm	_IIO_INTENSITY,4,2              ; @IIO_INTENSITY
	.comm	_IIO_PROXIMITY,4,2              ; @IIO_PROXIMITY
	.no_dead_strip	_ltr501_init
.subsections_via_symbols
