	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checksum_tcpudp                ## -- Begin function checksum_tcpudp
	.p2align	4, 0x90
_checksum_tcpudp:                       ## @checksum_tcpudp
	.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	%rdx, %rbx
	xorl	%r14d, %r14d
	cmpl	$2, %ecx
	jl	LBB0_11
## %bb.1:
	movl	%ecx, %r10d
	subl	$3, %r10d
	cmovbl	%r14d, %r10d
	incl	%r10d
	cmpl	$6, %r10d
	jb	LBB0_9
## %bb.2:
	shrl	%r10d
	incl	%r10d
	movl	%r10d, %r8d
	andl	$-4, %r8d
	leaq	-4(%r8), %rax
	movq	%rax, %r9
	shrq	$2, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%r9, %rax
	andq	$-2, %rax
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rsi,%rdx,8), %xmm2
	movdqu	16(%rsi,%rdx,8), %xmm3
	movdqu	32(%rsi,%rdx,8), %xmm4
	movdqu	48(%rsi,%rdx,8), %xmm5
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm0, %xmm2
	pshufd	$232, %xmm3, %xmm3              ## xmm3 = xmm3[0,2,2,3]
	paddd	%xmm1, %xmm3
	pshufd	$232, %xmm4, %xmm0              ## xmm0 = xmm4[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm5, %xmm1              ## xmm1 = xmm5[0,2,2,3]
	paddd	%xmm3, %xmm1
	addq	$8, %rdx
	addq	$-2, %rax
	jne	LBB0_5
	jmp	LBB0_6
LBB0_3:
	pxor	%xmm0, %xmm0
	xorl	%edx, %edx
	pxor	%xmm1, %xmm1
LBB0_6:
	leal	(%r8,%r8), %eax
	testb	$1, %r9b
	je	LBB0_8
## %bb.7:
	movdqu	(%rsi,%rdx,8), %xmm2
	movdqu	16(%rsi,%rdx,8), %xmm3
	pshufd	$232, %xmm2, %xmm2              ## xmm2 = xmm2[0,2,2,3]
	paddd	%xmm2, %xmm0
	pshufd	$232, %xmm3, %xmm2              ## xmm2 = xmm3[0,2,2,3]
	paddd	%xmm2, %xmm1
LBB0_8:
	paddd	%xmm1, %xmm0
	subl	%eax, %ecx
	leaq	(%rsi,%r8,8), %rsi
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %r14d
	cmpq	%r10, %r8
	je	LBB0_11
LBB0_9:
	movl	%ecx, %eax
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	addl	(%rsi), %r14d
	addq	$8, %rsi
	leal	-2(%rax), %ecx
	cmpl	$3, %eax
	movl	%ecx, %eax
	ja	LBB0_10
LBB0_11:
	movl	(%rdi), %edx
	movl	4(%rdi), %eax
	cmpl	$1, %ecx
	jne	LBB0_13
## %bb.12:
	addl	(%rsi), %r14d
LBB0_13:
	movl	%edx, %r15d
	shrl	$16, %r15d
	movzwl	%dx, %r12d
	movl	%eax, %r13d
	shrl	$16, %r13d
	movzwl	%ax, %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%rdi), %edi
	callq	_htons
	addl	%r15d, %ebx
	addl	%r12d, %ebx
	addl	%r13d, %ebx
	addl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	addl	%r14d, %ebx
	addl	%eax, %ebx
	cmpl	$65536, %ebx                    ## imm = 0x10000
	jb	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %eax
	sarl	$16, %eax
	movzwl	%bx, %ebx
	addl	%eax, %ebx
	cmpl	$65535, %ebx                    ## imm = 0xFFFF
	ja	LBB0_14
LBB0_15:
	notl	%ebx
	movslq	%ebx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_checksum_tcpudp                ; -- Begin function checksum_tcpudp
	.p2align	2
_checksum_tcpudp:                       ; @checksum_tcpudp
	.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, x2
	cmp	w3, #2
	b.lt	LBB0_3
; %bb.1:
	subs	w8, w3, #3
	csel	w8, wzr, w8, lo
	add	w8, w8, #1
	cmp	w8, #14
	b.hs	LBB0_4
; %bb.2:
	mov	w20, #0
	mov	x8, x1
	b	LBB0_7
LBB0_3:
	mov	w20, #0
	mov	x8, x1
	b	LBB0_9
LBB0_4:
	lsr	w8, w8, #1
	add	w9, w8, #1
	and	x10, x9, #0xfffffff8
	sub	w3, w3, w10, lsl #1
	add	x8, x1, x10, lsl #3
	movi.2d	v0, #0000000000000000
	add	x11, x1, #32
	mov	x12, x10
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x11, #-32]
	ldp	q6, q7, [x11], #64
	xtn.2s	v4, v4
	xtn.2s	v5, v5
	xtn.2s	v6, v6
	xtn.2s	v7, v7
	add.2s	v0, v0, v4
	add.2s	v1, v1, v5
	add.2s	v2, v2, v6
	add.2s	v3, v3, v7
	subs	x12, x12, #8
	b.ne	LBB0_5
; %bb.6:
	add.2s	v0, v1, v0
	add.2s	v0, v2, v0
	add.2s	v0, v3, v0
	addp.2s	v0, v0, v0
	fmov	w20, s0
	cmp	x10, x9
	b.eq	LBB0_9
LBB0_7:
	mov	x9, x3
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x8], #8
	add	w20, w20, w10
	sub	w3, w9, #2
	cmp	w9, #3
	mov	x9, x3
	b.hi	LBB0_8
LBB0_9:
	ldp	w22, w21, [x0]
	cmp	w3, #1
	b.ne	LBB0_11
; %bb.10:
	ldr	w8, [x8]
	add	w20, w20, w8
LBB0_11:
	ldr	w0, [x0, #8]
	bl	_htons
	add	w8, w19, w22, lsr #16
	add	w8, w8, w22, uxth
	add	w8, w8, w21, lsr #16
	add	w8, w8, w21, uxth
	add	w8, w8, w20
	add	w8, w8, w0
	cmp	w8, #16, lsl #12                ; =65536
	b.lo	LBB0_13
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	asr	w9, w8, #16
	add	w8, w9, w8, uxth
	lsr	w9, w8, #16
	cbnz	w9, LBB0_12
LBB0_13:
	mvn	w8, w8
	sxtw	x0, w8
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
