	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function opt3001_read_raw
_opt3001_read_raw:                      ## @opt3001_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, %r13
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	callq	_iio_priv
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_OPT3001_CONFIGURATION_M_CONTINUOUS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	(%r12), %rax
	movq	_IIO_LIGHT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.5:
	movq	%rbx, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpq	$129, %r13
	je	LBB0_8
## %bb.6:
	cmpq	$128, %r13
	jne	LBB0_9
## %bb.7:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_opt3001_get_lux
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_8:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_opt3001_get_int_time
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OPT3001_CONFIGURATION_M_CONTINUOUS,8,3 ## @OPT3001_CONFIGURATION_M_CONTINUOUS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IIO_LIGHT,8,3                  ## @IIO_LIGHT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_opt3001_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function opt3001_read_raw
_opt3001_read_raw:                      ; @opt3001_read_raw
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x4
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	bl	_iio_priv
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _OPT3001_CONFIGURATION_M_CONTINUOUS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OPT3001_CONFIGURATION_M_CONTINUOUS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _IIO_LIGHT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IIO_LIGHT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	mov	x23, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
	cmp	x22, #129
	b.eq	LBB0_8
; %bb.4:
	cmp	x22, #128
	b.ne	LBB0_9
; %bb.5:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	bl	_opt3001_get_lux
	mov	x19, x0
	b	LBB0_10
LBB0_6:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_8:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x19
	bl	_opt3001_get_int_time
	mov	x19, x0
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_10:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_OPT3001_CONFIGURATION_M_CONTINUOUS,8,3 ; @OPT3001_CONFIGURATION_M_CONTINUOUS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IIO_LIGHT,8,3                  ; @IIO_LIGHT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_opt3001_read_raw
.subsections_via_symbols
