	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ip_checksum                    ## -- Begin function ip_checksum
	.p2align	4, 0x90
_ip_checksum:                           ## @ip_checksum
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_AF_INET@GOTPCREL(%rip), %rax
	movq	(%rax), %r10
	testl	%edx, %edx
	jle	LBB0_1
## %bb.2:
	movl	%edx, %r11d
	leaq	-1(%r11), %rax
	movq	%rax, %r14
	shrq	%r14
	incq	%r14
	cmpq	$2, %rax
	jae	LBB0_16
## %bb.3:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	testb	$1, %r14b
	jne	LBB0_6
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_16:
	movq	%r10, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %r15
	andq	$-2, %r15
	xorl	%eax, %eax
	movl	$1, %r12d
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	movzwl	%ax, %eax
	addl	%ebx, %eax
	addl	%r13d, %eax
	addq	$4, %r12
	addq	$-2, %r15
	je	LBB0_4
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	-4(%rsi,%r12,4), %ebx
	shll	$8, %ebx
	movl	$0, %r13d
	cmpq	%r11, %r12
	jae	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movzbl	(%rsi,%r12,4), %r13d
LBB0_19:                                ##   in Loop: Header=BB0_17 Depth=1
	movzwl	%bx, %ebx
	addl	%eax, %ebx
	addl	%r13d, %ebx
	movl	4(%rsi,%r12,4), %eax
	shll	$8, %eax
	leaq	2(%r12), %r10
	xorl	%r13d, %r13d
	cmpq	%r11, %r10
	jae	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movzbl	8(%rsi,%r12,4), %r13d
	jmp	LBB0_21
LBB0_4:
	decq	%r12
	movq	-48(%rbp), %r10                 ## 8-byte Reload
	testb	$1, %r14b
	je	LBB0_9
LBB0_6:
	movl	(%rsi,%r12,4), %ebx
	shll	$8, %ebx
	movzwl	%bx, %ebx
	orq	$1, %r12
	xorl	%r14d, %r14d
	cmpq	%r11, %r12
	jae	LBB0_8
## %bb.7:
	movzbl	(%rsi,%r12,4), %r14d
LBB0_8:
	addl	%eax, %ebx
	addl	%r14d, %ebx
	movl	%ebx, %eax
LBB0_9:
	cmpq	%rdi, %r10
	movl	$4, %edi
	movl	$16, %r10d
	cmoveq	%rdi, %r10
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx,%rdi,4), %ebx
	shll	$8, %ebx
	movzwl	%bx, %ebx
	movzbl	4(%rcx,%rdi,4), %esi
	addl	%esi, %eax
	addl	%ebx, %eax
	addq	$2, %rdi
	cmpq	%r10, %rdi
	jb	LBB0_10
## %bb.11:
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r8,%rcx,4), %esi
	shll	$8, %esi
	movzwl	%si, %esi
	movzbl	4(%r8,%rcx,4), %edi
	addl	%edi, %eax
	addl	%esi, %eax
	addq	$2, %rcx
	cmpq	%r10, %rcx
	jb	LBB0_12
## %bb.13:
	addl	%edx, %r9d
	addl	%eax, %r9d
	cmpl	$65536, %r9d                    ## imm = 0x10000
	jb	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%r9d, %eax
	sarl	$16, %eax
	movzwl	%r9w, %r9d
	addl	%eax, %r9d
	cmpl	$65535, %r9d                    ## imm = 0xFFFF
	ja	LBB0_14
LBB0_15:
	notl	%r9d
	movslq	%r9d, %rax
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF_INET,8,3                    ## @AF_INET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ip_checksum                    ; -- Begin function ip_checksum
	.p2align	2
_ip_checksum:                           ; @ip_checksum
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _AF_INET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_INET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x8]
	cmp	w2, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x10, #0
	mov	w8, #0
	mov	w11, w2
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x12, x1, x10, lsl #2
	ldrb	w12, [x12, #4]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w13, [x1, x10, lsl #2]
	ubfiz	w13, w13, #8, #8
	add	w8, w13, w8
	add	w8, w8, w12
	add	x10, x10, #2
	cmp	x10, x11
	b.hs	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x12, x10, #1
	cmp	x12, x11
	b.lo	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w12, #0
	b	LBB0_3
LBB0_6:
	mov	w8, #0
LBB0_7:
	mov	x10, #0
	mov	w11, #16
	mov	w12, #4
	cmp	x9, x0
	csel	x9, x12, x11, eq
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x11, x3, x10, lsl #2
	ldr	w12, [x11]
	ubfiz	w12, w12, #8, #8
	ldrb	w11, [x11, #4]
	add	w8, w11, w8
	add	w8, w8, w12
	add	x10, x10, #2
	cmp	x10, x9
	b.lo	LBB0_8
; %bb.9:
	mov	x10, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add	x11, x4, x10, lsl #2
	ldr	w12, [x11]
	ubfiz	w12, w12, #8, #8
	ldrb	w11, [x11, #4]
	add	w8, w11, w8
	add	w8, w8, w12
	add	x10, x10, #2
	cmp	x10, x9
	b.lo	LBB0_10
; %bb.11:
	add	w9, w5, w2
	add	w8, w9, w8
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AF_INET,8,3                    ; @AF_INET
.subsections_via_symbols
