	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9960_read_event
_apds9960_read_event:                   ## @apds9960_read_event
	.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	%r9, %r14
	movl	%r8d, %ebx
	movl	%ecx, %r12d
	movq	%rsi, %r13
	callq	_iio_priv
	movq	%rax, %r15
	movq	_IIO_EV_INFO_VALUE@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_1
## %bb.2:
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movl	%r12d, %esi
	callq	_apds9960_get_thres_reg
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movq	(%r13), %rax
	movq	_IIO_PROXIMITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movl	(%r15), %edi
	movl	-44(%rbp), %esi
	movq	%r14, %rdx
	callq	_regmap_read
	testl	%eax, %eax
	jns	LBB0_8
	jmp	LBB0_9
LBB0_5:
	movq	_IIO_INTENSITY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.6:
	movl	(%r15), %edi
	movl	-44(%rbp), %esi
	leaq	-48(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	js	LBB0_9
## %bb.7:
	movl	-48(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, (%r14)
LBB0_8:
	movq	16(%rbp), %rax
	movl	$0, (%rax)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IIO_EV_INFO_VALUE,4,2          ## @IIO_EV_INFO_VALUE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IIO_PROXIMITY,8,3              ## @IIO_PROXIMITY
	.comm	_IIO_INTENSITY,8,3              ## @IIO_INTENSITY
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_apds9960_read_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds9960_read_event
_apds9960_read_event:                   ; @apds9960_read_event
	.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, x6
	mov	x20, x5
	mov	x24, x4
	mov	x23, x3
	mov	x22, x1
	bl	_iio_priv
Lloh0:
	adrp	x8, _IIO_EV_INFO_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IIO_EV_INFO_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w24
	b.ne	LBB0_8
; %bb.1:
	mov	x21, x0
	add	x2, sp, #12
	mov	x0, x22
	mov	x1, x23
	bl	_apds9960_get_thres_reg
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _IIO_PROXIMITY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IIO_PROXIMITY@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	w0, [x21]
	ldr	w1, [sp, #12]
	mov	x2, x20
	bl	_regmap_read
	tbz	w0, #31, LBB0_7
	b	LBB0_9
LBB0_4:
Lloh6:
	adrp	x9, _IIO_INTENSITY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IIO_INTENSITY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.5:
	ldr	w0, [x21]
	ldr	w1, [sp, #12]
	add	x2, sp, #8
	mov	w3, #2
	bl	_regmap_bulk_read
	tbnz	w0, #31, LBB0_9
; %bb.6:
	ldr	w0, [sp, #8]
	bl	_le16_to_cpu
	str	w0, [x20]
LBB0_7:
	str	wzr, [x19]
Lloh9:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_IIO_EV_INFO_VALUE,4,2          ; @IIO_EV_INFO_VALUE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IIO_PROXIMITY,8,3              ; @IIO_PROXIMITY
	.comm	_IIO_INTENSITY,8,3              ; @IIO_INTENSITY
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_apds9960_read_event
.subsections_via_symbols
