	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioc3_tcpudp_checksum
_ioc3_tcpudp_checksum:                  ## @ioc3_tcpudp_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_eth_hdr
	movq	%rax, %r12
	movq	(%rax), %rbx
	movq	_ETH_P_IP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htons
	cltq
	cmpq	%rax, %rbx
	jne	LBB0_6
## %bb.1:
	movq	_ETH_HLEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %r13
	movl	(%r12,%r13), %ebx
	movq	_IP_MF@GOTPCREL(%rip), %rax
	movq	_IP_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_htons
	testl	%ebx, %eax
	jne	LBB0_6
## %bb.2:
	movl	4(%r12,%r13), %edi
	movq	_IPPROTO_TCP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	je	LBB0_4
## %bb.3:
	movq	_IPPROTO_UDP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edi
	jne	LBB0_6
LBB0_4:
	movl	12(%r12,%r13), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	addl	8(%r12,%r13), %r15d
	callq	_htons
	movl	16(%r12,%r13), %edi
	movl	20(%r12,%r13), %edx
	movzwl	%di, %r8d
	sarl	$16, %edi
	movzwl	%dx, %esi
	movl	4(%r12), %ecx
	addl	(%r12), %ecx
	addl	8(%r12), %ecx
	addl	12(%r12), %ecx
	addl	16(%r12), %ecx
	addl	20(%r12), %ecx
	sarl	$16, %edx
	addl	24(%r12), %ecx
	movzwl	%cx, %ebx
	sarl	$16, %ecx
	addl	%ebx, %ecx
	movzwl	%cx, %ebx
	sarl	$16, %ecx
	addl	%ebx, %ecx
	xorl	$65535, %ecx                    ## imm = 0xFFFF
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	shll	$2, %ebx
	subl	%ebx, %r15d
	addl	%eax, %r15d
	addl	%edi, %r15d
	addl	%r8d, %r15d
	addl	%edx, %r15d
	addl	%esi, %r15d
	addl	%ecx, %r15d
	movslq	-48(%rbp), %rcx                 ## 4-byte Folded Reload
	leaq	(%r12,%rcx), %rax
	xorl	%edx, %edx
	testb	$1, %cl
	sete	%dl
	leaq	1(%r12,%rcx), %rcx
	movq	%rax, %rsi
	cmoveq	%rcx, %rsi
	cmoveq	%rax, %rcx
	movzbl	2(%rdx,%rax), %edi
	subq	%rdx, %rax
	movzbl	(%rcx), %ecx
	shll	$8, %ecx
	movzbl	(%rsi), %edx
	orl	%ecx, %edx
	xorl	$65535, %edx                    ## imm = 0xFFFF
	addl	%r15d, %edx
	movzbl	3(%rax), %eax
	shll	$8, %eax
	orl	%eax, %edi
	xorl	$65535, %edi                    ## imm = 0xFFFF
	addl	%edx, %edi
	movzwl	%di, %eax
	sarl	$16, %edi
	addl	%eax, %edi
	movzwl	%di, %eax
	sarl	$16, %edi
	addl	%eax, %edi
	cmpl	$65535, %edi                    ## imm = 0xFFFF
	jne	LBB0_6
## %bb.5:
	movq	_CHECKSUM_UNNECESSARY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_P_IP,4,2                   ## @ETH_P_IP
	.comm	_ETH_HLEN,4,2                   ## @ETH_HLEN
	.comm	_IP_MF,4,2                      ## @IP_MF
	.comm	_IP_OFFSET,4,2                  ## @IP_OFFSET
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_IPPROTO_UDP,4,2                ## @IPPROTO_UDP
	.comm	_CHECKSUM_UNNECESSARY,4,2       ## @CHECKSUM_UNNECESSARY
	.no_dead_strip	_ioc3_tcpudp_checksum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioc3_tcpudp_checksum
_ioc3_tcpudp_checksum:                  ; @ioc3_tcpudp_checksum
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_eth_hdr
	mov	x21, x0
	ldr	x23, [x0]
Lloh0:
	adrp	x8, _ETH_P_IP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_P_IP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_htons
	cmp	x23, w0, sxtw
	b.ne	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _ETH_HLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ETH_HLEN@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	add	x23, x21, x8
Lloh6:
	adrp	x8, _IP_MF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IP_MF@GOTPAGEOFF]
	ldr	w24, [x23]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _IP_OFFSET@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IP_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_htons
	tst	w0, w24
	b.ne	LBB0_5
; %bb.2:
	ldr	w0, [x23, #4]
Lloh12:
	adrp	x8, _IPPROTO_TCP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IPPROTO_TCP@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _IPPROTO_UDP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IPPROTO_UDP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.ne	LBB0_5
; %bb.3:
	ldp	w24, w25, [x23, #8]
	bl	_htons
	ldp	w8, w9, [x23, #16]
	ldp	w10, w11, [x21]
	ldp	w12, w13, [x21, #8]
	add	w10, w11, w10
	add	w10, w10, w12
	ldp	w11, w12, [x21, #16]
	add	w10, w10, w13
	add	w10, w10, w11
	ldr	w11, [x21, #24]
	add	w10, w10, w12
	add	w10, w10, w11
	asr	w11, w10, #16
	add	w10, w11, w10, uxth
	asr	w11, w10, #16
	add	w10, w11, w10, uxth
	eor	w10, w10, #0xffff
	add	w11, w24, w22
	sub	w11, w11, w25, lsl #2
	add	w11, w11, w0
	add	w11, w11, w8, asr #16
	add	w8, w11, w8, uxth
	add	w8, w8, w9, asr #16
	add	w8, w8, w9, uxth
	add	x9, x21, w20, sxtw
	tst	w20, #0x1
	cinc	x11, x9, eq
	cinc	x12, x9, ne
	mov	w13, #2
	cinc	x14, x13, ne
	cinc	x13, x13, eq
	ldrb	w12, [x12]
	ldrb	w11, [x11]
	bfi	w11, w12, #8, #8
	eor	w11, w11, #0xffff
	ldrb	w12, [x9, x14]
	add	w8, w8, w10
	add	w8, w11, w8
	ldrb	w9, [x9, x13]
	bfi	w9, w12, #8, #8
	eor	w9, w9, #0xffff
	add	w8, w8, w9
	asr	w9, w8, #16
	add	w8, w9, w8, uxth
	asr	w9, w8, #16
	add	w8, w9, w8, uxth
	mov	w9, #65535
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
Lloh18:
	adrp	x8, _CHECKSUM_UNNECESSARY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CHECKSUM_UNNECESSARY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_P_IP,4,2                   ; @ETH_P_IP
	.comm	_ETH_HLEN,4,2                   ; @ETH_HLEN
	.comm	_IP_MF,4,2                      ; @IP_MF
	.comm	_IP_OFFSET,4,2                  ; @IP_OFFSET
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_IPPROTO_UDP,4,2                ; @IPPROTO_UDP
	.comm	_CHECKSUM_UNNECESSARY,4,2       ; @CHECKSUM_UNNECESSARY
	.no_dead_strip	_ioc3_tcpudp_checksum
.subsections_via_symbols
