	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pms7003_calc_checksum
_pms7003_calc_checksum:                 ## @pms7003_calc_checksum
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_PMS7003_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movzbl	%cl, %eax
                                        ## kill: def $ecx killed $ecx killed $rcx
	sarl	$8, %ecx
	movslq	%ecx, %rcx
	addq	%rcx, %rax
	movslq	(%rdi), %rsi
	movl	%esi, %ecx
	sarl	$8, %ecx
	movslq	%ecx, %rcx
	addq	%rsi, %rax
	addq	%rcx, %rax
	movq	_PMS7003_CHECKSUM_LENGTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%ecx, %esi
	testl	%esi, %esi
	jle	LBB0_12
## %bb.1:
	movq	8(%rdi), %rcx
	movl	%esi, %edx
	cmpl	$4, %esi
	jae	LBB0_3
## %bb.2:
	xorl	%esi, %esi
	jmp	LBB0_11
LBB0_3:
	movl	%edx, %esi
	andl	$-4, %esi
	movq	%rax, %xmm0
	leaq	-4(%rsi), %rdi
	movq	%rdi, %rax
	shrq	$2, %rax
	incq	%rax
	movl	%eax, %r8d
	andl	$3, %r8d
	cmpq	$12, %rdi
	jae	LBB0_5
## %bb.4:
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	jmp	LBB0_7
LBB0_5:
	andq	$-4, %rax
	pxor	%xmm1, %xmm1
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rdi,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rcx,%rdi,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	32(%rcx,%rdi,8), %xmm1
	movdqu	48(%rcx,%rdi,8), %xmm3
	movdqu	64(%rcx,%rdi,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	80(%rcx,%rdi,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	96(%rcx,%rdi,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	112(%rcx,%rdi,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rdi
	addq	$-4, %rax
	jne	LBB0_6
LBB0_7:
	testq	%r8, %r8
	je	LBB0_10
## %bb.8:
	leaq	(%rcx,%rdi,8), %rax
	addq	$16, %rax
	shlq	$5, %r8
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rax,%rdi), %xmm2
	paddq	%xmm2, %xmm0
	movdqu	(%rax,%rdi), %xmm2
	paddq	%xmm2, %xmm1
	addq	$32, %rdi
	cmpq	%rdi, %r8
	jne	LBB0_9
LBB0_10:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rax
	cmpq	%rdx, %rsi
	je	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	addq	(%rcx,%rsi,8), %rax
	incq	%rsi
	cmpq	%rsi, %rdx
	jne	LBB0_11
LBB0_12:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PMS7003_MAGIC,4,2              ## @PMS7003_MAGIC
	.comm	_PMS7003_CHECKSUM_LENGTH,4,2    ## @PMS7003_CHECKSUM_LENGTH
	.no_dead_strip	_pms7003_calc_checksum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pms7003_calc_checksum
_pms7003_calc_checksum:                 ; @pms7003_calc_checksum
	.cfi_startproc
; %bb.0:
	mov	x8, x0
Lloh0:
	adrp	x9, _PMS7003_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PMS7003_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	x10, x9
	sbfx	x10, x10, #8, #24
	add	x9, x10, w9, uxtb
	ldrsw	x10, [x0]
	asr	w11, w10, #8
	add	x9, x9, x10
	add	x0, x9, w11, sxtw
Lloh3:
	adrp	x9, _PMS7003_CHECKSUM_LENGTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PMS7003_CHECKSUM_LENGTH@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w9, w10, w9
	cmp	w9, #1
	b.lt	LBB0_8
; %bb.1:
	ldr	x8, [x8, #8]
	cmp	w9, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x10, #0
	b	LBB0_6
LBB0_3:
	and	x10, x9, #0xfffffff8
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.d	v1[0], x0
	add	x11, x8, #32
	mov	x12, x10
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	add.2d	v1, v4, v1
	add.2d	v0, v5, v0
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	subs	x12, x12, #8
	b.ne	LBB0_4
; %bb.5:
	add.2d	v0, v0, v1
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x0, d0
	cmp	x10, x9
	b.eq	LBB0_8
LBB0_6:
	add	x8, x8, x10, lsl #3
	sub	x9, x9, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8], #8
	add	x0, x10, x0
	subs	x9, x9, #1
	b.ne	LBB0_7
LBB0_8:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PMS7003_MAGIC,4,2              ; @PMS7003_MAGIC
	.comm	_PMS7003_CHECKSUM_LENGTH,4,2    ; @PMS7003_CHECKSUM_LENGTH
	.no_dead_strip	_pms7003_calc_checksum
.subsections_via_symbols
