	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sgp_read_raw
_sgp_read_raw:                          ## @sgp_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, %r14
	movq	%rcx, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r15
	callq	_iio_priv
	movq	%rax, %r12
	cmpq	$134, %r14
	je	LBB0_7
## %bb.1:
	cmpq	$135, %r14
	jne	LBB0_10
## %bb.2:
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	32(%r12), %eax
	movq	_IAQ_BUFFER_VALID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.3:
	movq	24(%r12), %rax
	movl	(%r15), %ecx
	cmpl	$129, %ecx
	je	LBB0_6
## %bb.4:
	cmpl	$133, %ecx
	je	LBB0_22
## %bb.5:
	cmpl	$132, %ecx
	jne	LBB0_21
LBB0_6:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$0, (%rcx)
	movl	4(%rax), %edi
	callq	_be16_to_cpu
	movl	%eax, (%rbx)
	movq	_IIO_VAL_INT_PLUS_NANO@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_7:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_mutex_lock
	cmpl	$128, (%r15)
	jne	LBB0_13
## %bb.8:
	movl	32(%r12), %eax
	movq	_IAQ_BUFFER_EMPTY@GOTPCREL(%rip), %rcx
	addq	$24, %r13
	cmpl	(%rcx), %eax
	jne	LBB0_18
## %bb.9:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	testl	%ebx, %ebx
	jne	LBB0_24
	jmp	LBB0_14
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_12:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_25
LBB0_13:
	movl	16(%r12), %esi
	addq	$8, %r13
	movq	_SGP_MEASUREMENT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SGP_MEASUREMENT_DURATION_US@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_sgp_read_cmd
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jne	LBB0_24
LBB0_14:
	movl	(%r15), %ecx
	movq	(%r13), %rax
	cmpl	$128, %ecx
	je	LBB0_19
## %bb.15:
	cmpl	$130, %ecx
	je	LBB0_19
## %bb.16:
	cmpl	$131, %ecx
	jne	LBB0_21
## %bb.17:
	movl	4(%rax), %edi
	jmp	LBB0_20
LBB0_18:
	movq	(%r13), %rax
LBB0_19:
	movl	(%rax), %edi
LBB0_20:
	callq	_be16_to_cpu
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_IIO_VAL_INT@GOTPCREL(%rip), %rax
	jmp	LBB0_23
LBB0_21:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_22:
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	$0, (%rcx)
	movl	(%rax), %edi
	callq	_be16_to_cpu
	movl	%eax, (%rbx)
	movq	_IIO_VAL_INT_PLUS_MICRO@GOTPCREL(%rip), %rax
LBB0_23:
	movl	(%rax), %ebx
LBB0_24:
	movq	%r12, %rdi
	callq	_mutex_unlock
LBB0_25:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IAQ_BUFFER_VALID,4,2           ## @IAQ_BUFFER_VALID
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IIO_VAL_INT_PLUS_NANO,4,2      ## @IIO_VAL_INT_PLUS_NANO
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ## @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IAQ_BUFFER_EMPTY,4,2           ## @IAQ_BUFFER_EMPTY
	.comm	_SGP_MEASUREMENT_LEN,4,2        ## @SGP_MEASUREMENT_LEN
	.comm	_SGP_MEASUREMENT_DURATION_US,4,2 ## @SGP_MEASUREMENT_DURATION_US
	.comm	_IIO_VAL_INT,4,2                ## @IIO_VAL_INT
	.no_dead_strip	_sgp_read_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sgp_read_raw
_sgp_read_raw:                          ; @sgp_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	x23, x4
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	bl	_iio_priv
	mov	x19, x0
	cmp	x23, #134
	b.eq	LBB0_7
; %bb.1:
	cmp	x23, #135
	b.ne	LBB0_10
; %bb.2:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x19, #32]
Lloh0:
	adrp	x9, _IAQ_BUFFER_VALID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IAQ_BUFFER_VALID@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.3:
	ldr	x8, [x19, #24]
	ldr	w9, [x21]
	cmp	w9, #129
	b.eq	LBB0_6
; %bb.4:
	cmp	w9, #133
	b.eq	LBB0_22
; %bb.5:
	cmp	w9, #132
	b.ne	LBB0_21
LBB0_6:
	str	wzr, [x20]
	ldr	w0, [x8, #4]
	bl	_be16_to_cpu
	str	w0, [x22]
Lloh3:
	adrp	x8, _IIO_VAL_INT_PLUS_NANO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_NANO@GOTPAGEOFF]
	b	LBB0_23
LBB0_7:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x21]
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.8:
	ldr	w8, [x19, #32]
Lloh5:
	adrp	x9, _IAQ_BUFFER_EMPTY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IAQ_BUFFER_EMPTY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	add	x23, x19, #24
	cmp	w8, w9
	b.ne	LBB0_18
; %bb.9:
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	cbnz	w22, LBB0_24
	b	LBB0_14
LBB0_10:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
	mov	x0, x19
	bl	_mutex_unlock
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_25
LBB0_13:
	ldr	w1, [x19, #16]
	add	x23, x19, #8
Lloh15:
	adrp	x8, _SGP_MEASUREMENT_LEN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SGP_MEASUREMENT_LEN@GOTPAGEOFF]
Lloh17:
	ldr	w3, [x8]
Lloh18:
	adrp	x8, _SGP_MEASUREMENT_DURATION_US@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SGP_MEASUREMENT_DURATION_US@GOTPAGEOFF]
Lloh20:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x2, x23
	bl	_sgp_read_cmd
	mov	x22, x0
	cbnz	w22, LBB0_24
LBB0_14:
	ldr	w9, [x21]
	ldr	x8, [x23]
	cmp	w9, #128
	b.eq	LBB0_19
; %bb.15:
	cmp	w9, #130
	b.eq	LBB0_19
; %bb.16:
	cmp	w9, #131
	b.ne	LBB0_21
; %bb.17:
	ldr	w0, [x8, #4]
	b	LBB0_20
LBB0_18:
	ldr	x8, [x23]
LBB0_19:
	ldr	w0, [x8]
LBB0_20:
	bl	_be16_to_cpu
	str	w0, [x20]
Lloh21:
	adrp	x8, _IIO_VAL_INT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _IIO_VAL_INT@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_24
LBB0_22:
	str	wzr, [x20]
	ldr	w0, [x8]
	bl	_be16_to_cpu
	str	w0, [x22]
Lloh26:
	adrp	x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IIO_VAL_INT_PLUS_MICRO@GOTPAGEOFF]
LBB0_23:
	ldr	w22, [x8]
LBB0_24:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_25:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_IAQ_BUFFER_VALID,4,2           ; @IAQ_BUFFER_VALID
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IIO_VAL_INT_PLUS_NANO,4,2      ; @IIO_VAL_INT_PLUS_NANO
	.comm	_IIO_VAL_INT_PLUS_MICRO,4,2     ; @IIO_VAL_INT_PLUS_MICRO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IAQ_BUFFER_EMPTY,4,2           ; @IAQ_BUFFER_EMPTY
	.comm	_SGP_MEASUREMENT_LEN,4,2        ; @SGP_MEASUREMENT_LEN
	.comm	_SGP_MEASUREMENT_DURATION_US,4,2 ; @SGP_MEASUREMENT_DURATION_US
	.comm	_IIO_VAL_INT,4,2                ; @IIO_VAL_INT
	.no_dead_strip	_sgp_read_raw
.subsections_via_symbols
