	.file	"218893701.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"socket()"
.LC1:
	.string	"recv() failed:"
.LC2:
	.string	"\nEthernet frame:"
.LC3:
	.string	"Destination MAC (this node): "
.LC4:
	.string	"%02x:"
.LC5:
	.string	"%02x\n"
.LC6:
	.string	"Source MAC: "
	.align 8
.LC7:
	.string	"Ethernet type code (2054 = ARP): %u\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.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	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	edi, 65535
	call	allocate_ustrmem
	mov	QWORD PTR -16[rbp], rax
	mov	edi, 3
	call	htons@PLT
	movzx	eax, ax
	mov	edx, eax
	mov	esi, 3
	mov	edi, 17
	call	socket@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 14
	mov	QWORD PTR -8[rbp], rax
	jmp	.L3
.L5:
	mov	rsi, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -24[rbp]
	mov	ecx, 0
	mov	edx, 65535
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	jns	.L3
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L4
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, 65535
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	jmp	.L3
.L4:
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 12
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 13
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	cmp	eax, 2054
	jne	.L5
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR 6[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	cmp	ax, 2
	jne	.L5
	mov	eax, DWORD PTR -24[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L6
.L7:
	mov	eax, DWORD PTR -28[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L6:
	cmp	DWORD PTR -28[rbp], 4
	jle	.L7
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 5
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -28[rbp], 0
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -28[rbp]
	cdqe
	lea	rdx, 6[rax]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -28[rbp], 1
.L8:
	cmp	DWORD PTR -28[rbp], 4
	jle	.L9
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 11
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 12
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sal	eax, 8
	mov	edx, eax
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 13
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	eax, edx
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC8:
	.string	"ERROR: Cannot allocate memory because len = %i in allocate_ustrmem().\n"
	.align 8
.LC9:
	.string	"ERROR: Cannot allocate memory for array allocate_ustrmem().\n"
	.text
	.globl	allocate_ustrmem
	.type	allocate_ustrmem, @function
allocate_ustrmem:
.LFB7:
	.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
	cmp	DWORD PTR -20[rbp], 0
	jg	.L12
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -20[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	mov	eax, DWORD PTR -20[rbp]
	cdqe
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L13
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -8[rbp]
	jmp	.L15
.L13:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 60
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	allocate_ustrmem, .-allocate_ustrmem
	.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	"218893701.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket()\000"
	.align	2
.LC1:
	.ascii	"recv() failed:\000"
	.align	2
.LC2:
	.ascii	"\012Ethernet frame:\000"
	.align	2
.LC3:
	.ascii	"Destination MAC (this node): \000"
	.align	2
.LC4:
	.ascii	"%02x:\000"
	.align	2
.LC5:
	.ascii	"%02x\012\000"
	.align	2
.LC6:
	.ascii	"Source MAC: \000"
	.align	2
.LC7:
	.ascii	"Ethernet type code (2054 = ARP): %u\012\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r0, .L11
	bl	allocate_ustrmem
	str	r0, [fp, #-20]
	mov	r0, #3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	mov	r1, #3
	mov	r0, #17
	bl	socket
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L11+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	ldr	r3, [fp, #-20]
	add	r3, r3, #14
	str	r3, [fp, #-12]
	b	.L3
.L5:
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	recv
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L3
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L4
	ldr	r2, .L11
	mov	r1, #0
	ldr	r0, [fp, #-20]
	bl	memset
	b	.L3
.L4:
	ldr	r0, .L11+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-20]
	add	r3, r3, #12
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldr	r2, [fp, #-20]
	add	r2, r2, #13
	ldrb	r2, [r2]	@ zero_extendqisi2
	add	r3, r3, r2
	ldr	r2, .L11+12
	cmp	r3, r2
	bne	.L5
	ldr	r3, [fp, #-12]
	ldrh	r3, [r3, #6]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	cmp	r3, #2
	bne	.L5
	ldr	r0, [fp, #-16]
	bl	close
	ldr	r0, .L11+16
	bl	puts
	ldr	r0, .L11+20
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L6
.L7:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L11+24
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L6:
	ldr	r3, [fp, #-24]
	cmp	r3, #4
	ble	.L7
	ldr	r3, [fp, #-20]
	add	r3, r3, #5
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L11+28
	bl	printf
	ldr	r0, .L11+32
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-24]
	b	.L8
.L9:
	ldr	r3, [fp, #-24]
	add	r3, r3, #6
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L11+24
	bl	printf
	ldr	r3, [fp, #-24]
	add	r3, r3, #1
	str	r3, [fp, #-24]
.L8:
	ldr	r3, [fp, #-24]
	cmp	r3, #4
	ble	.L9
	ldr	r3, [fp, #-20]
	add	r3, r3, #11
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L11+28
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #12
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #8
	ldr	r2, [fp, #-20]
	add	r2, r2, #13
	ldrb	r2, [r2]	@ zero_extendqisi2
	add	r3, r3, r2
	mov	r1, r3
	ldr	r0, .L11+36
	bl	printf
	ldr	r0, [fp, #-20]
	bl	free
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	65535
	.word	.LC0
	.word	.LC1
	.word	2054
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
.LC8:
	.ascii	"ERROR: Cannot allocate memory because len = %i in a"
	.ascii	"llocate_ustrmem().\012\000"
	.align	2
.LC9:
	.ascii	"ERROR: Cannot allocate memory for array allocate_us"
	.ascii	"trmem().\012\000"
	.text
	.align	2
	.global	allocate_ustrmem
	.syntax unified
	.arm
	.fpu softvfp
	.type	allocate_ustrmem, %function
allocate_ustrmem:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L14
	ldr	r3, .L18
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, .L18+4
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L14:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-16]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-8]
	bl	memset
	ldr	r3, [fp, #-8]
	b	.L17
.L15:
	ldr	r3, .L18
	ldr	r3, [r3]
	mov	r2, #60
	mov	r1, #1
	ldr	r0, .L18+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	stderr
	.word	.LC8
	.word	.LC9
	.size	allocate_ustrmem, .-allocate_ustrmem
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
