	.file	"202596.c"
	.intel_syntax noprefix
	.text
	.globl	host_mem
	.bss
	.align 32
	.type	host_mem, @object
	.size	host_mem, 512
host_mem:
	.zero	512
	.text
	.type	load_packet, @function
load_packet:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	DWORD PTR -44[rbp], esi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	eax, DWORD PTR -44[rbp]
	add	eax, 1
	mov	DWORD PTR -16[rbp], eax
	mov	WORD PTR -18[rbp], 0
	mov	rax, QWORD PTR -8[rbp]
	mov	ecx, eax
	mov	eax, DWORD PTR -44[rbp]
	lea	rdx, [rax+rax]
	lea	rax, host_mem[rip]
	mov	WORD PTR [rdx+rax], cx
	mov	DWORD PTR -12[rbp], 0
	jmp	.L2
.L5:
	mov	edx, DWORD PTR -12[rbp]
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sal	eax, 8
	mov	edx, eax
	movzx	eax, WORD PTR -18[rbp]
	sar	ax, 8
	or	eax, edx
	mov	WORD PTR -18[rbp], ax
	mov	eax, DWORD PTR -12[rbp]
	and	eax, 1
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR -16[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -16[rbp], edx
	mov	eax, eax
	lea	rcx, [rax+rax]
	lea	rdx, host_mem[rip]
	movzx	eax, WORD PTR -18[rbp]
	mov	WORD PTR [rcx+rdx], ax
	cmp	DWORD PTR -16[rbp], 255
	jbe	.L4
	mov	DWORD PTR -16[rbp], 0
.L4:
	mov	WORD PTR -18[rbp], 0
.L3:
	add	DWORD PTR -12[rbp], 1
.L2:
	mov	eax, DWORD PTR -12[rbp]
	cmp	QWORD PTR -8[rbp], rax
	ja	.L5
	mov	rax, QWORD PTR -8[rbp]
	and	eax, 1
	test	rax, rax
	je	.L7
	movzx	eax, WORD PTR -18[rbp]
	sar	ax, 8
	mov	ecx, eax
	mov	eax, DWORD PTR -16[rbp]
	lea	rdx, [rax+rax]
	lea	rax, host_mem[rip]
	mov	WORD PTR [rdx+rax], cx
.L7:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	load_packet, .-load_packet
	.section	.rodata
.LC0:
	.string	"w"
.LC1:
	.string	"host_mem"
.LC2:
	.string	"Hello World\n"
.LC3:
	.string	"The quick red fox\n"
	.align 8
.LC4:
	.string	"All good men should come to the aid\n"
.LC5:
	.string	"%4.4x\n"
	.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, 16
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	esi, 0
	lea	rdi, .LC2[rip]
	call	load_packet
	mov	esi, 30
	lea	rdi, .LC3[rip]
	call	load_packet
	mov	esi, 60
	lea	rdi, .LC4[rip]
	call	load_packet
	cmp	QWORD PTR -8[rbp], 0
	je	.L9
	mov	DWORD PTR -12[rbp], 0
	jmp	.L10
.L11:
	mov	eax, DWORD PTR -12[rbp]
	lea	rdx, [rax+rax]
	lea	rax, host_mem[rip]
	movzx	eax, WORD PTR [rdx+rax]
	movsx	edx, ax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -12[rbp], 1
.L10:
	cmp	DWORD PTR -12[rbp], 255
	jbe	.L11
.L9:
	mov	eax, 0
	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	"202596.c"
	.text
	.comm	host_mem,512,4
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	load_packet, %function
load_packet:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	strlen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-28]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	mov	r3, #0
	strh	r3, [fp, #-18]	@ movhi
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r1, .L8
	ldr	r3, [fp, #-28]
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L2
.L5:
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldrsh	r3, [fp, #-18]
	asr	r3, r3, #8
	lsl	r3, r3, #16
	asr	r3, r3, #16
	orr	r3, r2, r3
	strh	r3, [fp, #-18]	@ movhi
	ldr	r3, [fp, #-12]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-16]
	add	r2, r3, #1
	str	r2, [fp, #-16]
	ldr	r2, .L8
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r2, [fp, #-18]	@ movhi
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-16]
	cmp	r3, #255
	bls	.L4
	mov	r3, #0
	str	r3, [fp, #-16]
.L4:
	mov	r3, #0
	strh	r3, [fp, #-18]	@ movhi
.L3:
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L2:
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L5
	ldr	r3, [fp, #-8]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L7
	ldrsh	r3, [fp, #-18]
	asr	r3, r3, #8
	lsl	r3, r3, #16
	asr	r2, r3, #16
	ldr	r1, .L8
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #1
	add	r3, r1, r3
	strh	r2, [r3]	@ movhi
.L7:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	host_mem
	.size	load_packet, .-load_packet
	.section	.rodata
	.align	2
.LC0:
	.ascii	"w\000"
	.align	2
.LC1:
	.ascii	"host_mem\000"
	.align	2
.LC2:
	.ascii	"Hello World\012\000"
	.align	2
.LC3:
	.ascii	"The quick red fox\012\000"
	.align	2
.LC4:
	.ascii	"All good men should come to the aid\012\000"
	.align	2
.LC5:
	.ascii	"%4.4x\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r1, .L15
	ldr	r0, .L15+4
	bl	fopen
	str	r0, [fp, #-8]
	mov	r1, #0
	ldr	r0, .L15+8
	bl	load_packet
	mov	r1, #30
	ldr	r0, .L15+12
	bl	load_packet
	mov	r1, #60
	ldr	r0, .L15+16
	bl	load_packet
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L11
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L12
.L13:
	ldr	r2, .L15+20
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrsh	r3, [r3]
	mov	r2, r3
	ldr	r1, .L15+24
	ldr	r0, [fp, #-8]
	bl	fprintf
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L12:
	ldr	r3, [fp, #-12]
	cmp	r3, #255
	bls	.L13
.L11:
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	host_mem
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
