	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsl2772_get_prox
_tsl2772_get_prox:                      ## @tsl2772_get_prox
	.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
	callq	_iio_priv
	movq	%rax, %r15
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_tsl2772_read_status
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.1:
	movl	(%r15), %eax
	addl	$-128, %eax
	cmpl	$10, %eax
	ja	LBB0_7
## %bb.2:
	movl	$1365, %ecx                     ## imm = 0x555
	btl	%eax, %ecx
	jae	LBB0_3
## %bb.6:
	movq	_TSL2772_STA_PRX_VALID@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_7
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_3:
	movq	_TSL2772_STA_ADC_VALID@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
LBB0_7:
	movq	_TSL2772_PRX_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TSL2772_PRX_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_tsl2772_read_autoinc_regs
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_9
## %bb.8:
	movl	%ebx, 4(%r15)
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TSL2772_STA_ADC_VALID,4,2      ## @TSL2772_STA_ADC_VALID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TSL2772_STA_PRX_VALID,4,2      ## @TSL2772_STA_PRX_VALID
	.comm	_TSL2772_PRX_LO,4,2             ## @TSL2772_PRX_LO
	.comm	_TSL2772_PRX_HI,4,2             ## @TSL2772_PRX_HI
	.no_dead_strip	_tsl2772_get_prox
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsl2772_get_prox
_tsl2772_get_prox:                      ; @tsl2772_get_prox
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	bl	_iio_priv
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_tsl2772_read_status
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #10
	b.hi	LBB0_6
; %bb.2:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #1365
	tst	w8, w9
	b.eq	LBB0_4
; %bb.3:
Lloh0:
	adrp	x8, _TSL2772_STA_PRX_VALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TSL2772_STA_PRX_VALID@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh2:
	adrp	x8, _TSL2772_STA_ADC_VALID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _TSL2772_STA_ADC_VALID@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_8
LBB0_6:
Lloh4:
	adrp	x8, _TSL2772_PRX_LO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TSL2772_PRX_LO@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _TSL2772_PRX_HI@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TSL2772_PRX_HI@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_tsl2772_read_autoinc_regs
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.7:
	str	w21, [x20, #4]
	b	LBB0_9
LBB0_8:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_TSL2772_STA_ADC_VALID,4,2      ; @TSL2772_STA_ADC_VALID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TSL2772_STA_PRX_VALID,4,2      ; @TSL2772_STA_PRX_VALID
	.comm	_TSL2772_PRX_LO,4,2             ; @TSL2772_PRX_LO
	.comm	_TSL2772_PRX_HI,4,2             ; @TSL2772_PRX_HI
	.no_dead_strip	_tsl2772_get_prox
.subsections_via_symbols
