	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lwip_standard_chksum
_lwip_standard_chksum:                  ## @lwip_standard_chksum
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%ecx, %ecx
	cmpl	$2, %esi
	jl	LBB0_1
## %bb.2:
	movl	%esi, %r8d
	subl	$3, %r8d
	cmovbl	%ecx, %r8d
	incl	%r8d
	cmpl	$14, %r8d
	jae	LBB0_4
## %bb.3:
	movq	%rdi, %rax
	jmp	LBB0_7
LBB0_1:
	movq	%rdi, %rax
	jmp	LBB0_8
LBB0_4:
	shrl	%r8d
	incl	%r8d
	movl	%r8d, %edx
	andl	$-8, %edx
	leaq	(%rdi,%rdx,8), %rax
	subl	%edx, %esi
	subl	%edx, %esi
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movups	(%rdi,%rcx,8), %xmm2
	movups	16(%rdi,%rcx,8), %xmm3
	movups	32(%rdi,%rcx,8), %xmm4
	movups	48(%rdi,%rcx,8), %xmm5
	movaps	%xmm2, %xmm6
	shufps	$136, %xmm3, %xmm6              ## xmm6 = xmm6[0,2],xmm3[0,2]
	movaps	%xmm4, %xmm7
	shufps	$136, %xmm5, %xmm7              ## xmm7 = xmm7[0,2],xmm5[0,2]
	shufps	$221, %xmm3, %xmm2              ## xmm2 = xmm2[1,3],xmm3[1,3]
	shufps	$221, %xmm5, %xmm4              ## xmm4 = xmm4[1,3],xmm5[1,3]
	pslld	$8, %xmm6
	por	%xmm2, %xmm6
	paddd	%xmm6, %xmm0
	pslld	$8, %xmm7
	por	%xmm4, %xmm7
	paddd	%xmm7, %xmm1
	addq	$8, %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_5
## %bb.6:
	paddd	%xmm0, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ecx
	cmpq	%r8, %rdx
	je	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%esi, %edx
	movl	(%rax), %esi
	shll	$8, %esi
	orl	4(%rax), %esi
	addl	%esi, %ecx
	addq	$8, %rax
	leal	-2(%rdx), %esi
	cmpl	$3, %edx
	ja	LBB0_7
LBB0_8:
	cmpl	$1, %esi
	jne	LBB0_10
## %bb.9:
	movl	(%rax), %eax
	shll	$8, %eax
	addl	%eax, %ecx
LBB0_10:
	movl	%ecx, %eax
	sarl	$16, %eax
	movzwl	%cx, %ecx
	addl	%eax, %ecx
	movl	%ecx, %eax
	sarl	$16, %eax
	movzwl	%cx, %edi
	addl	%eax, %edi
	cmpl	$65536, %ecx                    ## imm = 0x10000
	cmovbl	%ecx, %edi
	popq	%rbp
	jmp	_htons                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_lwip_standard_chksum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lwip_standard_chksum
_lwip_standard_chksum:                  ; @lwip_standard_chksum
	.cfi_startproc
; %bb.0:
	cmp	w1, #2
	b.lt	LBB0_3
; %bb.1:
	subs	w8, w1, #3
	csel	w8, wzr, w8, lo
	add	w8, w8, #1
	cmp	w8, #30
	b.hs	LBB0_4
; %bb.2:
	mov	w11, #0
	mov	x8, x0
	b	LBB0_7
LBB0_3:
	mov	w11, #0
	mov	x8, x0
	b	LBB0_8
LBB0_4:
	lsr	w8, w8, #1
	add	w9, w8, #1
	and	x10, x9, #0xfffffff0
	add	x8, x0, x10, lsl #3
	sub	w1, w1, w10, lsl #1
	add	x11, x0, #64
	movi.2d	v0, #0000000000000000
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x11, #64
	ld2.4s	{ v4, v5 }, [x13]
	sub	x13, x11, #32
	ld2.4s	{ v6, v7 }, [x13]
	mov	x13, x11
	ld2.4s	{ v16, v17 }, [x13], #32
	ld2.4s	{ v18, v19 }, [x13]
	shl.4s	v20, v4, #8
	shl.4s	v21, v6, #8
	shl.4s	v22, v16, #8
	shl.4s	v23, v18, #8
	orr.16b	v4, v20, v5
	orr.16b	v5, v21, v7
	orr.16b	v6, v22, v17
	orr.16b	v7, v23, v19
	add.4s	v0, v4, v0
	add.4s	v1, v5, v1
	add.4s	v2, v6, v2
	add.4s	v3, v7, v3
	add	x11, x11, #128
	subs	x12, x12, #16
	b.ne	LBB0_5
; %bb.6:
	add.4s	v0, v1, v0
	add.4s	v0, v2, v0
	add.4s	v0, v3, v0
	addv.4s	s0, v0
	fmov	w11, s0
	cmp	x10, x9
	b.eq	LBB0_8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w9, w10, [x8], #8
	orr	w9, w10, w9, lsl #8
	mov	x10, x1
	add	w11, w9, w11
	sub	w1, w1, #2
	cmp	w10, #3
	b.hi	LBB0_7
LBB0_8:
	cmp	w1, #1
	b.ne	LBB0_10
; %bb.9:
	ldr	w8, [x8]
	add	w11, w11, w8, lsl #8
LBB0_10:
	asr	w8, w11, #16
	add	w8, w8, w11, uxth
	asr	w9, w8, #16
	add	w9, w9, w8, uxth
	cmp	w8, #16, lsl #12                ; =65536
	csel	w0, w8, w9, lo
	b	_htons
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_lwip_standard_chksum
.subsections_via_symbols
