	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ltr501_read_thresh
_ltr501_read_thresh:                    ## @ltr501_read_thresh
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movl	%ecx, %r15d
	movq	%rsi, %rbx
	callq	_iio_priv
	movl	(%rbx), %ecx
	cmpl	$128, %ecx
	je	LBB0_9
## %bb.1:
	cmpl	$129, %ecx
	jne	LBB0_15
## %bb.2:
	cmpl	$131, %r15d
	je	LBB0_8
## %bb.3:
	cmpl	$130, %r15d
	jne	LBB0_15
## %bb.4:
	movl	(%rax), %edi
	movq	_LTR501_ALS_THRESH_UP@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	cmpl	$131, %r15d
	je	LBB0_14
## %bb.10:
	cmpl	$130, %r15d
	jne	LBB0_15
## %bb.11:
	movl	(%rax), %edi
	movq	_LTR501_PS_THRESH_UP@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_8:
	movl	(%rax), %edi
	movq	_LTR501_ALS_THRESH_LOW@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_16
## %bb.6:
	movq	_LTR501_ALS_THRESH_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_14:
	movl	(%rax), %edi
	movq	_LTR501_PS_THRESH_LOW@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %esi
	leaq	-28(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_16
## %bb.13:
	movq	_LTR501_PS_THRESH_MASK@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	andl	-28(%rbp), %eax
	movl	%eax, (%r14)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LTR501_ALS_THRESH_UP,4,2       ## @LTR501_ALS_THRESH_UP
	.comm	_LTR501_ALS_THRESH_MASK,4,2     ## @LTR501_ALS_THRESH_MASK
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_LTR501_ALS_THRESH_LOW,4,2      ## @LTR501_ALS_THRESH_LOW
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_LTR501_PS_THRESH_UP,4,2        ## @LTR501_PS_THRESH_UP
	.comm	_LTR501_PS_THRESH_MASK,4,2      ## @LTR501_PS_THRESH_MASK
	.comm	_LTR501_PS_THRESH_LOW,4,2       ## @LTR501_PS_THRESH_LOW
	.no_dead_strip	_ltr501_read_thresh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ltr501_read_thresh
_ltr501_read_thresh:                    ; @ltr501_read_thresh
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x5
	mov	x20, x3
	mov	x21, x1
	bl	_iio_priv
	ldr	w8, [x21]
	cmp	w8, #128
	b.eq	LBB0_5
; %bb.1:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.2:
	cmp	w20, #131
	b.eq	LBB0_9
; %bb.3:
	cmp	w20, #130
	b.ne	LBB0_8
; %bb.4:
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _LTR501_ALS_THRESH_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LTR501_ALS_THRESH_UP@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	cmp	w20, #131
	b.eq	LBB0_12
; %bb.6:
	cmp	w20, #130
	b.ne	LBB0_8
; %bb.7:
	ldr	w0, [x0]
Lloh2:
	adrp	x8, _LTR501_PS_THRESH_UP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LTR501_PS_THRESH_UP@GOTPAGEOFF]
	b	LBB0_13
LBB0_8:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_9:
	ldr	w0, [x0]
Lloh7:
	adrp	x8, _LTR501_ALS_THRESH_LOW@GOTPAGE
Lloh8:
	ldr	x8, [x8, _LTR501_ALS_THRESH_LOW@GOTPAGEOFF]
LBB0_10:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w3, #2
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_16
; %bb.11:
	ldr	w8, [sp, #12]
Lloh9:
	adrp	x9, _LTR501_ALS_THRESH_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _LTR501_ALS_THRESH_MASK@GOTPAGEOFF]
	b	LBB0_15
LBB0_12:
	ldr	w0, [x0]
Lloh11:
	adrp	x8, _LTR501_PS_THRESH_LOW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LTR501_PS_THRESH_LOW@GOTPAGEOFF]
LBB0_13:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	w3, #2
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_16
; %bb.14:
	ldr	w8, [sp, #12]
Lloh13:
	adrp	x9, _LTR501_PS_THRESH_MASK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _LTR501_PS_THRESH_MASK@GOTPAGEOFF]
LBB0_15:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19]
Lloh15:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
LBB0_16:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_LTR501_ALS_THRESH_UP,4,2       ; @LTR501_ALS_THRESH_UP
	.comm	_LTR501_ALS_THRESH_MASK,4,2     ; @LTR501_ALS_THRESH_MASK
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_LTR501_ALS_THRESH_LOW,4,2      ; @LTR501_ALS_THRESH_LOW
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_LTR501_PS_THRESH_UP,4,2        ; @LTR501_PS_THRESH_UP
	.comm	_LTR501_PS_THRESH_MASK,4,2      ; @LTR501_PS_THRESH_MASK
	.comm	_LTR501_PS_THRESH_LOW,4,2       ; @LTR501_PS_THRESH_LOW
	.no_dead_strip	_ltr501_read_thresh
.subsections_via_symbols
