	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sps30_do_meas
_sps30_do_meas:                         ## @sps30_do_meas
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rax
	movq	_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	_SPS30_START_MEAS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_sps30_do_cmd
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.2:
	movq	_MEASURING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
LBB0_3:
	movq	_SPS30_READ_DATA_READY_FLAG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-112(%rbp), %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_sps30_do_cmd
	testl	%eax, %eax
	je	LBB0_6
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_23
## %bb.22:
	movl	%r13d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$1, -108(%rbp)
	jne	LBB0_7
LBB0_16:
	movq	_SPS30_READ_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(,%r14,4), %ecx
	leaq	-112(%rbp), %r15
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_sps30_do_cmd
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_21
## %bb.17:
	testl	%r14d, %r14d
	jle	LBB0_18
## %bb.19:
	movl	%r14d, %r14d
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	movq	-120(%rbp), %r12                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_sps30_float_to_int_clamped
	movl	%eax, (%r12,%rbx,4)
	incq	%rbx
	addq	$16, %r15
	cmpq	%rbx, %r14
	jne	LBB0_20
	jmp	LBB0_21
LBB0_7:
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep_interruptible
	movl	(%rbx), %esi
	leaq	-112(%rbp), %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_sps30_do_cmd
	testl	%eax, %eax
	jne	LBB0_4
## %bb.8:
	cmpl	$1, -108(%rbp)
	je	LBB0_16
## %bb.9:
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep_interruptible
	movl	(%rbx), %esi
	leaq	-112(%rbp), %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_sps30_do_cmd
	testl	%eax, %eax
	jne	LBB0_4
## %bb.10:
	cmpl	$1, -108(%rbp)
	je	LBB0_16
## %bb.11:
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep_interruptible
	movl	(%rbx), %esi
	leaq	-112(%rbp), %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_sps30_do_cmd
	testl	%eax, %eax
	jne	LBB0_4
## %bb.12:
	cmpl	$1, -108(%rbp)
	je	LBB0_16
## %bb.13:
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep_interruptible
	movl	(%rbx), %esi
	leaq	-112(%rbp), %rdx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_sps30_do_cmd
	testl	%eax, %eax
	jne	LBB0_4
## %bb.14:
	cmpl	$1, -108(%rbp)
	je	LBB0_16
## %bb.15:
	movl	$300, %edi                      ## imm = 0x12C
	callq	_msleep_interruptible
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_18:
	xorl	%r13d, %r13d
	jmp	LBB0_21
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RESET,8,3                      ## @RESET
	.comm	_SPS30_START_MEAS,4,2           ## @SPS30_START_MEAS
	.comm	_MEASURING,8,3                  ## @MEASURING
	.comm	_SPS30_READ_DATA_READY_FLAG,4,2 ## @SPS30_READ_DATA_READY_FLAG
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_SPS30_READ_DATA,4,2            ## @SPS30_READ_DATA
	.no_dead_strip	_sps30_do_meas
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sps30_do_meas
_sps30_do_meas:                         ; @sps30_do_meas
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _RESET@GOTPAGE
Lloh4:
	ldr	x9, [x9, _RESET@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _SPS30_START_MEAS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SPS30_START_MEAS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	mov	w3, #0
	bl	_sps30_do_cmd
	cbnz	w0, LBB0_6
; %bb.2:
Lloh9:
	adrp	x8, _MEASURING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MEASURING@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	x8, [x21]
LBB0_3:
Lloh12:
	adrp	x22, _SPS30_READ_DATA_READY_FLAG@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SPS30_READ_DATA_READY_FLAG@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #2
	bl	_sps30_do_cmd
	cbz	w0, LBB0_8
LBB0_4:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.7:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_8:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_14
LBB0_9:
Lloh19:
	adrp	x8, _SPS30_READ_DATA@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SPS30_READ_DATA@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	lsl	w3, w20, #2
	add	x2, sp, #8
	mov	x0, x21
	bl	_sps30_do_cmd
	cbnz	w0, LBB0_6
; %bb.10:
	cmp	w20, #1
	b.lt	LBB0_13
; %bb.11:
	mov	w21, w20
	add	x20, sp, #8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_sps30_float_to_int_clamped
	str	w0, [x19], #4
	add	x20, x20, #16
	subs	x21, x21, #1
	b.ne	LBB0_12
LBB0_13:
	mov	w0, #0
	b	LBB0_6
LBB0_14:
	mov	w0, #300
	bl	_msleep_interruptible
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #2
	bl	_sps30_do_cmd
	cbnz	w0, LBB0_4
; %bb.15:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.eq	LBB0_9
; %bb.16:
	mov	w0, #300
	bl	_msleep_interruptible
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #2
	bl	_sps30_do_cmd
	cbnz	w0, LBB0_4
; %bb.17:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.eq	LBB0_9
; %bb.18:
	mov	w0, #300
	bl	_msleep_interruptible
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #2
	bl	_sps30_do_cmd
	cbnz	w0, LBB0_4
; %bb.19:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.eq	LBB0_9
; %bb.20:
	mov	w0, #300
	bl	_msleep_interruptible
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x21
	mov	w3, #2
	bl	_sps30_do_cmd
	cbnz	w0, LBB0_4
; %bb.21:
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.eq	LBB0_9
; %bb.22:
	mov	w0, #300
	bl	_msleep_interruptible
Lloh22:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_5
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_RESET,8,3                      ; @RESET
	.comm	_SPS30_START_MEAS,4,2           ; @SPS30_START_MEAS
	.comm	_MEASURING,8,3                  ; @MEASURING
	.comm	_SPS30_READ_DATA_READY_FLAG,4,2 ; @SPS30_READ_DATA_READY_FLAG
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_SPS30_READ_DATA,4,2            ; @SPS30_READ_DATA
	.no_dead_strip	_sps30_do_meas
.subsections_via_symbols
