	.file	"644118.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Failed to read tcp header data from log file"
	.align 8
.LC1:
	.string	"Failed to read data from log file"
	.align 8
.LC2:
	.string	"Failed to write data to output file"
	.align 8
.LC3:
	.string	"Failed to read ip header data from log file"
	.text
	.globl	extract_data
	.type	extract_data, @function
extract_data:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 72
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	QWORD PTR -104[rbp], rdi
	mov	QWORD PTR -112[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -88[rbp], 0
	jmp	.L2
.L11:
	mov	rax, rsp
	mov	rbx, rax
	movzx	eax, BYTE PTR -60[rbp]
	and	eax, 15
	sal	eax, 2
	mov	BYTE PTR -94[rbp], al
	movzx	eax, BYTE PTR -58[rbp]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	movzx	eax, BYTE PTR -57[rbp]
	movzx	eax, al
	or	eax, edx
	mov	WORD PTR -92[rbp], ax
	movzx	edx, BYTE PTR -94[rbp]
	mov	rax, QWORD PTR -88[rbp]
	add	rax, rdx
	lea	rcx, 12[rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rdx, QWORD PTR -104[rbp]
	lea	rax, -60[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 1
	je	.L3
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L4
.L3:
	movzx	eax, BYTE PTR -60[rbp]
	movzx	eax, al
	sar	eax, 2
	and	eax, 60
	mov	BYTE PTR -93[rbp], al
	movzx	edx, BYTE PTR -94[rbp]
	mov	rax, QWORD PTR -88[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -93[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	movzx	edx, BYTE PTR -94[rbp]
	movzx	eax, WORD PTR -92[rbp]
	sub	eax, edx
	movzx	edx, BYTE PTR -93[rbp]
	sub	eax, edx
	mov	WORD PTR -90[rbp], ax
	movzx	eax, WORD PTR -90[rbp]
	movzx	edx, ax
	sub	rdx, 1
	mov	QWORD PTR -80[rbp], rdx
	movzx	edx, ax
	mov	r12, rdx
	mov	r13d, 0
	movzx	edx, ax
	mov	r14, rdx
	mov	r15d, 0
	movzx	eax, ax
	mov	edx, 16
	sub	rdx, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L5:
	cmp	rsp, rdx
	je	.L6
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L5
.L6:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L7
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L7:
	mov	rax, rsp
	add	rax, 0
	mov	QWORD PTR -72[rbp], rax
	movzx	edx, WORD PTR -90[rbp]
	mov	rcx, QWORD PTR -104[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	movzx	edx, WORD PTR -90[rbp]
	cmp	rax, rdx
	je	.L8
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 3
	jmp	.L4
.L8:
	movzx	edx, WORD PTR -90[rbp]
	mov	rcx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	movzx	edx, WORD PTR -90[rbp]
	cmp	rax, rdx
	je	.L9
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 4
	jmp	.L4
.L9:
	movzx	eax, WORD PTR -92[rbp]
	add	QWORD PTR -88[rbp], rax
	mov	rcx, QWORD PTR -88[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	call	fseek@PLT
	mov	rsp, rbx
	jmp	.L2
.L4:
	mov	rsp, rbx
	jmp	.L13
.L2:
	mov	rdx, QWORD PTR -104[rbp]
	lea	rax, -60[rbp]
	mov	rcx, rdx
	mov	edx, 4
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	cmp	rax, 4
	je	.L11
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	jne	.L12
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L13
.L12:
	mov	eax, 0
.L13:
	mov	rbx, QWORD PTR -56[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	extract_data, .-extract_data
	.section	.rodata
	.align 8
.LC4:
	.string	"Usage: extract <log file> <output file>"
.LC5:
	.string	"rb"
.LC6:
	.string	"Failed to open log file"
.LC7:
	.string	"wb"
	.align 8
.LC8:
	.string	"Failed to open/create output file"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 3
	je	.L16
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L17
.L16:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L18
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L17
.L18:
	mov	rax, QWORD PTR -32[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L19
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, 3
	jmp	.L17
.L19:
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	extract_data
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"644118.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Failed to read tcp header data from log file\000"
	.align	2
.LC1:
	.ascii	"Failed to read data from log file\000"
	.align	2
.LC2:
	.ascii	"Failed to write data to output file\000"
	.align	2
.LC3:
	.ascii	"Failed to read ip header data from log file\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	extract_data
	.syntax unified
	.arm
	.fpu softvfp
	.type	extract_data, %function
extract_data:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-32]
	b	.L2
.L8:
	mov	r3, sp
	mov	r4, r3
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	and	r3, r3, #15
	and	r3, r3, #255
	lsl	r3, r3, #2
	strb	r3, [fp, #-38]
	ldrb	r3, [fp, #-18]	@ zero_extendqisi2
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	lsl	r3, r3, #16
	asr	r3, r3, #16
	orr	r3, r2, r3
	lsl	r3, r3, #16
	asr	r3, r3, #16
	strh	r3, [fp, #-36]	@ movhi
	ldrb	r2, [fp, #-38]	@ zero_extendqisi2
	ldr	r3, [fp, #-32]
	add	r3, r2, r3
	add	r3, r3, #12
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	fseek
	sub	r0, fp, #20
	ldr	r3, [fp, #-48]
	mov	r2, #1
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #1
	beq	.L3
	ldr	r0, .L12+4
	bl	perror
	mov	r3, #2
	b	.L4
.L3:
	ldrb	r3, [fp, #-20]	@ zero_extendqisi2
	asr	r3, r3, #2
	and	r3, r3, #255
	and	r3, r3, #60
	strb	r3, [fp, #-37]
	ldrb	r2, [fp, #-38]	@ zero_extendqisi2
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	add	r3, r2, r3
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	fseek
	ldrb	r3, [fp, #-38]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	ldrh	r2, [fp, #-36]	@ movhi
	sub	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldrb	r3, [fp, #-37]	@ zero_extendqisi2
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	sub	r3, r2, r3
	strh	r3, [fp, #-34]	@ movhi
	ldrh	ip, [fp, #-34]
	mov	r3, ip
	sub	r3, r3, #1
	str	r3, [fp, #-28]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #3
	orr	r3, r3, r0, lsr #29
	lsl	r2, r0, #3
	mov	r3, ip
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #0
	str	r3, [fp, #-24]
	ldrh	r2, [fp, #-34]
	ldr	r3, [fp, #-48]
	mov	r1, #1
	ldr	r0, [fp, #-24]
	bl	fread
	mov	r2, r0
	ldrh	r3, [fp, #-34]
	cmp	r2, r3
	beq	.L5
	ldr	r0, .L12+8
	bl	perror
	mov	r3, #3
	b	.L4
.L5:
	ldrh	r2, [fp, #-34]
	ldr	r3, [fp, #-52]
	mov	r1, #1
	ldr	r0, [fp, #-24]
	bl	fwrite
	mov	r2, r0
	ldrh	r3, [fp, #-34]
	cmp	r2, r3
	beq	.L6
	ldr	r0, .L12+12
	bl	perror
	mov	r3, #4
	b	.L4
.L6:
	ldrh	r3, [fp, #-36]
	ldr	r2, [fp, #-32]
	add	r3, r2, r3
	str	r3, [fp, #-32]
	mov	r2, #0
	ldr	r1, [fp, #-32]
	ldr	r0, [fp, #-48]
	bl	fseek
	mov	sp, r4
	b	.L2
.L4:
	mov	sp, r4
	b	.L10
.L2:
	sub	r0, fp, #20
	ldr	r3, [fp, #-48]
	mov	r2, #4
	mov	r1, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #4
	beq	.L8
	ldr	r0, [fp, #-48]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L9
	ldr	r0, .L12+16
	bl	perror
	mov	r3, #1
	b	.L10
.L9:
	mov	r3, #0
.L10:
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC4
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	extract_data, .-extract_data
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Usage: extract <log file> <output file>\000"
	.align	2
.LC6:
	.ascii	"rb\000"
	.align	2
.LC7:
	.ascii	"Failed to open log file\000"
	.align	2
.LC8:
	.ascii	"wb\000"
	.align	2
.LC9:
	.ascii	"Failed to open/create output file\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r3, [fp, #-16]
	cmp	r3, #3
	beq	.L15
	ldr	r0, .L19
	bl	perror
	mov	r3, #1
	b	.L16
.L15:
	ldr	r3, [fp, #-20]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L19+4
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L17
	ldr	r0, .L19+8
	bl	perror
	mov	r3, #2
	b	.L16
.L17:
	ldr	r3, [fp, #-20]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L19+12
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L18
	ldr	r0, .L19+16
	bl	perror
	mov	r3, #3
	b	.L16
.L18:
	ldr	r1, [fp, #-8]
	ldr	r0, [fp, #-12]
	bl	extract_data
	mov	r3, r0
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
