	.file	"580114.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"listener: socket"
.LC1:
	.string	"setsockopt"
.LC2:
	.string	"SO_BINDTODEVICE"
	.align 8
.LC3:
	.string	"listener: Waiting to recvfrom..."
	.align 8
.LC4:
	.string	"listener: got packet %lu bytes\n"
	.align 8
.LC5:
	.string	"Correct destination MAC address"
	.align 8
.LC6:
	.string	"Wrong destination MAC: %x:%x:%x:%x:%x:%x\n"
.LC7:
	.string	"Source IP: %s\n My IP: %s\n"
.LC8:
	.string	"but I sent it :("
.LC9:
	.string	"\tData:"
.LC10:
	.string	"%02x:"
	.text
	.globl	main
	.type	main, @function
main:
.LFB36:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1392
	mov	DWORD PTR -1380[rbp], edi
	mov	QWORD PTR -1392[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1380[rbp], 1
	jle	.L2
	mov	rax, QWORD PTR -1392[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1104[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	jmp	.L3
.L2:
	lea	rax, -1104[rbp]
	mov	DWORD PTR [rax], 812151909
	mov	BYTE PTR 4[rax], 0
.L3:
	lea	rax, -1040[rbp]
	mov	QWORD PTR -1360[rbp], rax
	lea	rax, -1040[rbp]
	add	rax, 14
	mov	QWORD PTR -1352[rbp], rax
	lea	rax, -1040[rbp]
	add	rax, 34
	mov	QWORD PTR -1344[rbp], rax
	lea	rax, -1280[rbp]
	mov	edx, 40
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	edi, 2048
	call	htons@PLT
	movzx	eax, ax
	mov	edx, eax
	mov	esi, 3
	mov	edi, 17
	call	socket@PLT
	mov	DWORD PTR -1368[rbp], eax
	cmp	DWORD PTR -1368[rbp], -1
	jne	.L4
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	eax, -1
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	jmp	.L15
.L4:
	lea	rcx, -1104[rbp]
	lea	rax, -1328[rbp]
	mov	edx, 15
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	lea	rdx, -1328[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	esi, 35091
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	movzx	eax, WORD PTR -1312[rbp]
	or	ah, 1
	mov	WORD PTR -1312[rbp], ax
	lea	rdx, -1328[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	esi, 35092
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	lea	rdx, -1376[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	cmp	eax, -1
	jne	.L6
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -1368[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rdx, -1104[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	r8d, 15
	mov	rcx, rdx
	mov	edx, 25
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	cmp	eax, -1
	jne	.L16
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -1368[rbp]
	mov	edi, eax
	mov	eax, 0
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	nop
.L7:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	r9d, 0
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recvfrom@PLT
	mov	QWORD PTR -1336[rbp], rax
	mov	rax, QWORD PTR -1336[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L8
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 1[rax]
	cmp	al, 19
	jne	.L8
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 2[rax]
	cmp	al, 32
	jne	.L8
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 3[rax]
	cmp	al, -3
	jne	.L8
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 4[rax]
	cmp	al, -11
	jne	.L8
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 5[rax]
	cmp	al, 48
	jne	.L8
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -1232[rbp]
	mov	rdx, QWORD PTR -1352[rbp]
	mov	edx, DWORD PTR 12[rdx]
	mov	DWORD PTR 4[rax], edx
	lea	rax, -1232[rbp]
	lea	rsi, 4[rax]
	lea	rax, -1088[rbp]
	mov	ecx, 46
	mov	rdx, rax
	mov	edi, 2
	call	inet_ntop@PLT
	lea	rcx, -1104[rbp]
	lea	rax, -1280[rbp]
	mov	edx, 15
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	lea	rdx, -1280[rbp]
	mov	eax, DWORD PTR -1368[rbp]
	mov	esi, 35093
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L9
	jmp	.L10
.L8:
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 5[rax]
	movzx	esi, al
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 4[rax]
	movzx	r8d, al
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 3[rax]
	movzx	edi, al
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	ecx, al
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR 1[rax]
	movzx	edx, al
	mov	rax, QWORD PTR -1360[rbp]
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	sub	rsp, 8
	push	rsi
	mov	r9d, r8d
	mov	r8d, edi
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	add	rsp, 16
	mov	DWORD PTR -1364[rbp], -1
	jmp	.L11
.L9:
	lea	rax, -1280[rbp]
	add	rax, 16
	mov	eax, DWORD PTR 4[rax]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rdx, rax
	lea	rax, -1088[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1280[rbp]
	add	rax, 16
	mov	eax, DWORD PTR 4[rax]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rdx, rax
	lea	rax, -1088[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L10
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	DWORD PTR -1364[rbp], -1
	jmp	.L11
.L10:
	mov	rax, QWORD PTR -1344[rbp]
	movzx	eax, WORD PTR 4[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	eax, ax
	sub	eax, 8
	mov	DWORD PTR -1364[rbp], eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1372[rbp], 0
	jmp	.L12
.L13:
	mov	eax, DWORD PTR -1372[rbp]
	cdqe
	movzx	eax, BYTE PTR -1040[rbp+rax]
	movzx	eax, al
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -1372[rbp], 1
.L12:
	mov	eax, DWORD PTR -1372[rbp]
	cdqe
	cmp	QWORD PTR -1336[rbp], rax
	jg	.L13
	mov	edi, 10
	call	putchar@PLT
.L11:
	jmp	.L7
.L15:
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE36:
	.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	"580114.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"eth0\000"
	.align	2
.LC1:
	.ascii	"listener: socket\000"
	.align	2
.LC2:
	.ascii	"setsockopt\000"
	.align	2
.LC3:
	.ascii	"SO_BINDTODEVICE\000"
	.align	2
.LC4:
	.ascii	"listener: Waiting to recvfrom...\000"
	.align	2
.LC5:
	.ascii	"listener: got packet %lu bytes\012\000"
	.align	2
.LC6:
	.ascii	"Correct destination MAC address\000"
	.align	2
.LC7:
	.ascii	"Wrong destination MAC: %x:%x:%x:%x:%x:%x\012\000"
	.align	2
.LC8:
	.ascii	"Source IP: %s\012 My IP: %s\012\000"
	.align	2
.LC9:
	.ascii	"but I sent it :(\000"
	.align	2
.LC10:
	.ascii	"\011Data:\000"
	.align	2
.LC11:
	.ascii	"%02x:\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1328
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1344
	str	r0, [fp, #-1328]
	str	r1, [fp, #-1332]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1328]
	cmp	r3, #1
	ble	.L2
	ldr	r3, [fp, #-1332]
	add	r3, r3, #4
	ldr	r2, [r3]
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcpy
	b	.L3
.L2:
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L17+4
	ldm	r2, {r0, r1}
	str	r0, [r3]
	add	r3, r3, #4
	strb	r1, [r3]
.L3:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-1312]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #14
	str	r3, [fp, #-1308]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #34
	str	r3, [fp, #-1304]
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r0, #2048
	bl	htons
	mov	r3, r0
	mov	r2, r3
	mov	r1, #3
	mov	r0, #17
	bl	socket
	str	r0, [fp, #-1300]
	ldr	r3, [fp, #-1300]
	cmn	r3, #1
	bne	.L4
	ldr	r0, .L17+8
	bl	perror
	mvn	r3, #0
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	b	.L15
.L4:
	sub	r1, fp, #1088
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #15
	mov	r0, r3
	bl	strncpy
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L17+12
	ldr	r0, [fp, #-1300]
	bl	ioctl
	sub	r3, fp, #4
	sub	r3, r3, #1280
	sub	r3, r3, #4
	ldrsh	r3, [r3, #16]
	orr	r3, r3, #256
	lsl	r3, r3, #16
	asr	r2, r3, #16
	sub	r3, fp, #4
	sub	r3, r3, #1280
	sub	r3, r3, #4
	strh	r2, [r3, #16]	@ movhi
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L17+16
	ldr	r0, [fp, #-1300]
	bl	ioctl
	sub	r3, fp, #1312
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-1300]
	bl	setsockopt
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L17+20
	bl	perror
	ldr	r0, [fp, #-1300]
	bl	close
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #1088
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #15
	str	r2, [sp]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, [fp, #-1300]
	bl	setsockopt
	mov	r3, r0
	cmn	r3, #1
	bne	.L16
	ldr	r0, .L17+24
	bl	perror
	ldr	r0, [fp, #-1300]
	bl	close
	mov	r0, #1
	bl	exit
.L16:
	nop
.L7:
	ldr	r0, .L17+28
	bl	puts
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	str	r3, [sp, #4]
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1300]
	bl	recvfrom
	str	r0, [fp, #-1296]
	ldr	r1, [fp, #-1296]
	ldr	r0, .L17+32
	bl	printf
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L8
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	cmp	r3, #19
	bne	.L8
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	cmp	r3, #32
	bne	.L8
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	cmp	r3, #253
	bne	.L8
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	cmp	r3, #245
	bne	.L8
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	cmp	r3, #48
	bne	.L8
	ldr	r0, .L17+36
	bl	puts
	sub	r3, fp, #1216
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1308]
	ldr	r2, [r2, #12]
	str	r2, [r3, #4]
	sub	r3, fp, #1216
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r1, r3, #4
	sub	r2, fp, #1072
	sub	r2, r2, #4
	sub	r2, r2, #4
	mov	r3, #46
	mov	r0, #2
	bl	inet_ntop
	sub	r1, fp, #1088
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #15
	mov	r0, r3
	bl	strncpy
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L17+40
	ldr	r0, [fp, #-1300]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L9
	b	.L10
.L8:
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #1]	@ zero_extendqisi2
	mov	ip, r3
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	lr, r3
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #4]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r3, [fp, #-1312]
	ldrb	r3, [r3, #5]	@ zero_extendqisi2
	str	r3, [sp, #8]
	str	r1, [sp, #4]
	str	r2, [sp]
	mov	r3, lr
	mov	r2, ip
	mov	r1, r0
	ldr	r0, .L17+44
	bl	printf
	mvn	r3, #0
	str	r3, [fp, #-1292]
	b	.L11
.L9:
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #16
	ldr	r0, [r3, #4]
	bl	inet_ntoa
	mov	r2, r0
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L17+48
	bl	printf
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #16
	ldr	r0, [r3, #4]
	bl	inet_ntoa
	mov	r2, r0
	sub	r3, fp, #1072
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L17+52
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-1292]
	b	.L11
.L10:
	ldr	r3, [fp, #-1304]
	ldrh	r3, [r3, #4]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	sub	r3, r3, #8
	str	r3, [fp, #-1292]
	ldr	r0, .L17+56
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-1316]
	b	.L12
.L13:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1316]
	add	r3, r3, r2
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L17+60
	bl	printf
	ldr	r3, [fp, #-1316]
	add	r3, r3, #1
	str	r3, [fp, #-1316]
.L12:
	ldr	r2, [fp, #-1316]
	ldr	r3, [fp, #-1296]
	cmp	r2, r3
	blt	.L13
	mov	r0, #10
	bl	putchar
.L11:
	b	.L7
.L15:
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC12
	.word	.LC0
	.word	.LC1
	.word	35091
	.word	35092
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	35093
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
