	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9960_read_gesture_fifo
_apds9960_read_gesture_fifo:            ## @apds9960_read_gesture_fifo
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	$1, (%rbx)
	movq	%rbx, %rdi
	callq	_apds9660_fifo_is_empty
	testq	%rax, %rax
	jle	LBB0_4
## %bb.1:
	leaq	8(%rbx), %r15
	movq	_APDS9960_REG_GFIFO_BASE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%rbx), %edi
	movl	(%r12), %esi
	movq	%r15, %rdx
	movl	$4, %ecx
	callq	_regmap_bulk_read
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_iio_push_to_buffers
	movq	%rbx, %rdi
	callq	_apds9660_fifo_is_empty
	testq	%rax, %rax
	jg	LBB0_2
LBB0_4:
	movl	$0, (%rbx)
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_APDS9960_REG_GFIFO_BASE,4,2    ## @APDS9960_REG_GFIFO_BASE
	.no_dead_strip	_apds9960_read_gesture_fifo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds9960_read_gesture_fifo
_apds9960_read_gesture_fifo:            ; @apds9960_read_gesture_fifo
	.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
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	mov	w8, #1
	mov	x21, x20
	str	w8, [x21], #8
	mov	x0, x20
	bl	_apds9660_fifo_is_empty
	cmp	x0, #1
	b.lt	LBB0_4
; %bb.1:
Lloh0:
	adrp	x22, _APDS9960_REG_GFIFO_BASE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _APDS9960_REG_GFIFO_BASE@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #16]
	ldr	w1, [x22]
	mov	x2, x21
	mov	w3, #4
	bl	_regmap_bulk_read
	cbnz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w1, w0, [x20, #8]
	bl	_iio_push_to_buffers
	mov	x0, x20
	bl	_apds9660_fifo_is_empty
	cmp	x0, #0
	b.gt	LBB0_2
LBB0_4:
	str	wzr, [x20]
	mov	x0, x19
	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
	b	_mutex_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_APDS9960_REG_GFIFO_BASE,4,2    ; @APDS9960_REG_GFIFO_BASE
	.no_dead_strip	_apds9960_read_gesture_fifo
.subsections_via_symbols
