	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9960_read_raw
_apds9960_read_raw:                     ## @apds9960_read_raw
	.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	%r8, %rbx
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %r13
	callq	_iio_priv
	cmpq	$0, 32(%rax)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_2:
	movq	%rax, %r15
	movq	_EINVAL@GOTPCREL(%rip), %rax
	cmpq	$130, %rbx
	je	LBB0_17
## %bb.3:
	cmpq	$132, %rbx
	je	LBB0_14
## %bb.4:
	cmpq	$131, %rbx
	jne	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_apds9960_set_power_state
	movl	(%r13), %eax
	cmpl	$129, %eax
	je	LBB0_10
## %bb.7:
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.8:
	movl	28(%r15), %edi
	movl	4(%r13), %esi
	movq	%r12, %rdx
	callq	_regmap_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.9:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_13
LBB0_14:
	movq	%r12, %rbx
	movq	%r15, %r12
	addq	$24, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpl	$129, (%r13)
	jne	LBB0_16
## %bb.15:
	movl	$0, (%rbx)
	movl	(%r15), %eax
	movl	%eax, (%r14)
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_23
LBB0_17:
	movq	%rax, %r14
	movq	%r12, %rbx
	movq	%r15, %r12
	addq	$24, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r13), %eax
	cmpl	$129, %eax
	je	LBB0_21
## %bb.18:
	cmpl	$128, %eax
	jne	LBB0_22
## %bb.19:
	movq	_apds9960_pxs_gain_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%r15), %rcx
	jmp	LBB0_20
LBB0_16:
	xorl	%ebx, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_10:
	movl	28(%r15), %edi
	movl	4(%r13), %esi
	leaq	-44(%rbp), %rdx
	movl	$2, %ecx
	callq	_regmap_bulk_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.11:
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	-44(%rbp), %edi
	callq	_le16_to_cpu
	movl	%eax, (%r12)
	jmp	LBB0_13
LBB0_12:
	xorl	%ebx, %ebx
	subl	(%r14), %ebx
LBB0_13:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_apds9960_set_power_state
	jmp	LBB0_24
LBB0_21:
	movq	_apds9960_als_gain_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r15), %rcx
LBB0_20:
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%rbx)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_23
LBB0_22:
	xorl	%ebx, %ebx
	subl	(%r14), %ebx
LBB0_23:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_apds9960_pxs_gain_map,8,3      ## @apds9960_pxs_gain_map
	.comm	_apds9960_als_gain_map,8,3      ## @apds9960_als_gain_map
	.no_dead_strip	_apds9960_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds9960_read_raw
_apds9960_read_raw:                     ; @apds9960_read_raw
	.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	x23, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	bl	_iio_priv
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_24
LBB0_2:
	mov	x19, x0
Lloh3:
	adrp	x24, _EINVAL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
	cmp	x23, #130
	b.eq	LBB0_10
; %bb.3:
	cmp	x23, #132
	b.eq	LBB0_8
; %bb.4:
	cmp	x23, #131
	b.ne	LBB0_13
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_apds9960_set_power_state
	ldr	w8, [x21]
	cmp	w8, #129
	b.eq	LBB0_15
; %bb.6:
	cmp	w8, #128
	b.ne	LBB0_17
; %bb.7:
	ldr	w0, [x19, #28]
	ldr	w1, [x21, #4]
	mov	x2, x20
	bl	_regmap_read
Lloh5:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w21, w8, w0, eq
	b	LBB0_18
LBB0_8:
	add	x23, x19, #24
	mov	x0, x23
	bl	_mutex_lock
	ldr	w8, [x21]
	cmp	w8, #129
	b.ne	LBB0_14
; %bb.9:
	str	wzr, [x20]
	ldr	w8, [x19]
	str	w8, [x22]
Lloh8:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
Lloh10:
	ldr	w21, [x8]
	mov	x0, x23
	b	LBB0_23
LBB0_10:
	add	x22, x19, #24
	mov	x0, x22
	bl	_mutex_lock
	ldr	w8, [x21]
	cmp	w8, #129
	b.eq	LBB0_19
; %bb.11:
	cmp	w8, #128
	b.ne	LBB0_21
; %bb.12:
Lloh11:
	adrp	x8, _apds9960_pxs_gain_map@GOTPAGE
Lloh12:
	ldr	x8, [x8, _apds9960_pxs_gain_map@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	b	LBB0_20
LBB0_13:
	ldr	w8, [x24]
	neg	w21, w8
	b	LBB0_24
LBB0_14:
	ldr	w8, [x24]
	neg	w21, w8
	mov	x0, x23
	b	LBB0_23
LBB0_15:
	ldr	w0, [x19, #28]
	ldr	w1, [x21, #4]
	add	x2, sp, #12
	mov	w3, #2
	bl	_regmap_bulk_read
	mov	x21, x0
	cbnz	w0, LBB0_18
; %bb.16:
Lloh14:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh16:
	ldr	w21, [x8]
	ldr	w0, [sp, #12]
	bl	_le16_to_cpu
	str	w0, [x20]
	b	LBB0_18
LBB0_17:
	ldr	w8, [x24]
	neg	w21, w8
LBB0_18:
	mov	x0, x19
	mov	w1, #0
	bl	_apds9960_set_power_state
	b	LBB0_24
LBB0_19:
Lloh17:
	adrp	x8, _apds9960_als_gain_map@GOTPAGE
Lloh18:
	ldr	x8, [x8, _apds9960_als_gain_map@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	x9, [x19, #16]
LBB0_20:
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [x20]
Lloh20:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
	b	LBB0_22
LBB0_21:
	ldr	w8, [x24]
	neg	w21, w8
LBB0_22:
	mov	x0, x22
LBB0_23:
	bl	_mutex_unlock
LBB0_24:
	mov	x0, x21
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_apds9960_pxs_gain_map,8,3      ; @apds9960_pxs_gain_map
	.comm	_apds9960_als_gain_map,8,3      ; @apds9960_als_gain_map
	.no_dead_strip	_apds9960_read_raw
.subsections_via_symbols
