	.file	"extr_Virtual.c_NnBuildTcpPacket.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	NnBuildTcpPacket
	.type	NnBuildTcpPacket, @function
NnBuildTcpPacket:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r9
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	r13d, DWORD PTR TCP_HEADER_SIZE[rip]
	mov	QWORD PTR 16[rsp], rsi
	lea	edi, 72[r13]
	add	edi, DWORD PTR [rbx]
	mov	QWORD PTR 24[rsp], rdx
	mov	QWORD PTR 32[rsp], rcx
	call	Malloc@PLT
	cmp	QWORD PTR 136[rsp], 0
	mov	rbp, rax
	lea	r12, 160[rax]
	jne	.L2
	movsx	rsi, r13d
	mov	QWORD PTR 8[rsp], rsi
.L3:
	mov	rax, QWORD PTR 16[rsp]
	mov	r13, rsi
	add	r13, QWORD PTR [rbx]
	mov	QWORD PTR 40[rsp], rsi
	mov	QWORD PTR 16[rbp], 0
	mov	rdi, r13
	mov	QWORD PTR 32[rbp], rax
	mov	rax, QWORD PTR 32[rsp]
	mov	QWORD PTR 24[rbp], rax
	mov	eax, DWORD PTR IP_PROTO_TCP[rip]
	mov	DWORD PTR 8[rbp], eax
	call	Endian16@PLT
	mov	rdi, QWORD PTR 24[rsp]
	mov	QWORD PTR 0[rbp], rax
	call	Endian16@PLT
	mov	rdi, r15
	mov	QWORD PTR 224[rbp], rax
	call	Endian16@PLT
	mov	rdi, r14
	mov	QWORD PTR 216[rbp], rax
	call	Endian32@PLT
	mov	rdi, QWORD PTR 112[rsp]
	mov	QWORD PTR 208[rbp], rax
	call	Endian32@PLT
	mov	rsi, QWORD PTR 40[rsp]
	mov	rdi, r12
	mov	QWORD PTR 192[rbp], 0
	mov	QWORD PTR 200[rbp], rax
	test	rsi, rsi
	lea	rax, 3[rsi]
	cmovs	rsi, rax
	sar	rsi, 2
	call	TCP_SET_HEADER_SIZE@PLT
	mov	rax, QWORD PTR 120[rsp]
	mov	rdi, QWORD PTR 128[rsp]
	mov	DWORD PTR 160[rbp], eax
	call	Endian16@PLT
	cmp	QWORD PTR 136[rsp], 0
	mov	QWORD PTR 168[rbp], 0
	mov	QWORD PTR 184[rbp], rax
	mov	QWORD PTR 176[rbp], 0
	jne	.L10
.L4:
	mov	rax, QWORD PTR 8[rsp]
	mov	edx, DWORD PTR [rbx]
	mov	rsi, QWORD PTR 8[rbx]
	lea	rdi, [r12+rax*4]
	call	Copy@PLT
	lea	rsi, 12[r13]
	mov	rdi, rbp
	call	IpChecksum@PLT
	mov	rsi, r13
	mov	rdi, r12
	mov	QWORD PTR 168[rbp], rax
	call	NewBufFromMemory@PLT
	mov	rdi, rbp
	mov	r12, rax
	call	Free@PLT
	mov	rdi, rbx
	call	FreeBuf@PLT
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, QWORD PTR 136[rsp]
	call	Endian16@PLT
	movsx	rsi, r13d
	mov	QWORD PTR tcp_mss_option.1984[rip+8], rax
	lea	rax, 32[rsi]
	mov	QWORD PTR 8[rsp], rax
	mov	rsi, rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	movsx	rax, DWORD PTR TCP_HEADER_SIZE[rip]
	mov	edx, 32
	lea	rsi, tcp_mss_option.1984[rip]
	lea	rdi, [r12+rax*4]
	call	Copy@PLT
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	NnBuildTcpPacket, .-NnBuildTcpPacket
	.data
	.align 32
	.type	tcp_mss_option.1984, @object
	.size	tcp_mss_option.1984, 32
tcp_mss_option.1984:
	.long	2
	.long	4
	.long	0
	.long	0
	.long	1
	.long	1
	.long	1
	.long	0
	.comm	TCP_HEADER_SIZE,4,4
	.comm	IP_PROTO_TCP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_Virtual.c_NnBuildTcpPacket.c"
	.text
	.align	2
	.global	NnBuildTcpPacket
	.syntax unified
	.arm
	.fpu softvfp
	.type	NnBuildTcpPacket, %function
NnBuildTcpPacket:
	@ args = 24, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	fp, .L14
	sub	sp, sp, #12
	ldr	r9, [fp]
	mov	r5, r0
	ldr	r0, [r0]
	str	r1, [sp]
	add	r1, r9, #52
	add	r0, r1, r0
	str	r3, [sp, #4]
	mov	r8, r2
	bl	Malloc
	ldr	r3, [sp, #68]
	mov	r4, r0
	cmp	r3, #0
	add	r7, r0, #80
	bne	.L12
.L2:
	mov	r10, #0
	ldr	r3, [sp]
	ldr	r2, .L14+4
	ldr	r6, [r5]
	ldr	r2, [r2]
	str	r3, [r4, #16]
	ldr	r3, [sp, #4]
	add	r6, r9, r6
	str	r3, [r4, #12]
	str	r2, [r4, #4]
	mov	r0, r6
	str	r10, [r4, #8]
	bl	Endian16
	mov	r2, r0
	mov	r0, r8
	str	r2, [r4]
	bl	Endian16
	mov	r2, r0
	ldr	r0, [sp, #48]
	str	r2, [r4, #112]
	bl	Endian16
	mov	r2, r0
	ldr	r0, [sp, #52]
	str	r2, [r4, #108]
	bl	Endian32
	mov	r2, r0
	ldr	r0, [sp, #56]
	str	r2, [r4, #104]
	bl	Endian32
	cmp	r9, r10
	add	r1, r9, #3
	movge	r1, r9
	str	r0, [r4, #100]
	asr	r1, r1, #2
	mov	r0, r7
	str	r10, [r4, #96]
	bl	TCP_SET_HEADER_SIZE
	ldr	r3, [sp, #60]
	ldr	r0, [sp, #64]
	str	r3, [r4, #80]
	bl	Endian16
	ldr	r3, [sp, #68]
	str	r10, [r4, #84]
	cmp	r3, r10
	str	r10, [r4, #88]
	str	r0, [r4, #92]
	bne	.L13
.L3:
	ldr	r2, [r5]
	ldr	r1, [r5, #4]
	add	r0, r7, r9, lsl #2
	bl	Copy
	add	r1, r6, #12
	mov	r0, r4
	bl	IpChecksum
	mov	r1, r6
	str	r0, [r4, #84]
	mov	r0, r7
	bl	NewBufFromMemory
	mov	r3, r0
	mov	r0, r4
	mov	r4, r3
	bl	Free
	mov	r0, r5
	bl	FreeBuf
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r0, r3
	bl	Endian16
	ldr	r3, .L14+8
	add	r9, r9, #32
	str	r0, [r3, #8]
	b	.L2
.L13:
	ldr	r0, [fp]
	mov	r2, #32
	ldr	r1, .L14+8
	add	r0, r7, r0, lsl #2
	bl	Copy
	b	.L3
.L15:
	.align	2
.L14:
	.word	TCP_HEADER_SIZE
	.word	IP_PROTO_TCP
	.word	.LANCHOR0
	.size	NnBuildTcpPacket, .-NnBuildTcpPacket
	.comm	TCP_HEADER_SIZE,4,4
	.comm	IP_PROTO_TCP,4,4
	.data
	.align	2
	.set	.LANCHOR0,. + 0
	.type	tcp_mss_option.4268, %object
	.size	tcp_mss_option.4268, 32
tcp_mss_option.4268:
	.word	2
	.word	4
	.word	0
	.word	0
	.word	1
	.word	1
	.word	1
	.word	0
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
