	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pms7003_do_cmd
_pms7003_do_cmd:                        ## @pms7003_do_cmd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	movq	_pms7003_cmd_tbl@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%esi, %ecx
	movl	(%rax,%rcx,4), %esi
	movq	_PMS7003_CMD_LENGTH@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_PMS7003_TIMEOUT@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	callq	_serdev_device_write
	cmpl	(%r15), %eax
	jge	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovsl	%eax, %ecx
	movl	%ecx, %eax
	jmp	LBB0_2
LBB0_3:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_wait_for_completion_interruptible_timeout
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	subl	(%rcx), %edx
	testl	%eax, %eax
	cmovel	%edx, %eax
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pms7003_cmd_tbl,8,3            ## @pms7003_cmd_tbl
	.comm	_PMS7003_CMD_LENGTH,4,2         ## @PMS7003_CMD_LENGTH
	.comm	_PMS7003_TIMEOUT,4,2            ## @PMS7003_TIMEOUT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_pms7003_do_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pms7003_do_cmd
_pms7003_do_cmd:                        ; @pms7003_do_cmd
	.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	x19, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x8, _pms7003_cmd_tbl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _pms7003_cmd_tbl@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8, w1, uxtw #2]
Lloh3:
	adrp	x21, _PMS7003_CMD_LENGTH@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PMS7003_CMD_LENGTH@GOTPAGEOFF]
	ldr	w2, [x21]
Lloh5:
	adrp	x20, _PMS7003_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x20, [x20, _PMS7003_TIMEOUT@GOTPAGEOFF]
	ldr	w3, [x20]
	bl	_serdev_device_write
	ldr	w8, [x21]
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.1:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, lt
	b	LBB0_3
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_wait_for_completion_interruptible_timeout
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w8, w0, w8, ne
	cmp	w8, #0
	csel	w0, w8, wzr, lt
LBB0_3:
	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
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_pms7003_cmd_tbl,8,3            ; @pms7003_cmd_tbl
	.comm	_PMS7003_CMD_LENGTH,4,2         ; @PMS7003_CMD_LENGTH
	.comm	_PMS7003_TIMEOUT,4,2            ; @PMS7003_TIMEOUT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_pms7003_do_cmd
.subsections_via_symbols
