	.file	"231394598.c"
	.intel_syntax noprefix
	.text
	.globl	chksum
	.type	chksum, @function
chksum:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -8[rbp], 0
	cmp	QWORD PTR -32[rbp], 0
	jne	.L2
	mov	eax, 0
	jmp	.L3
.L2:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L4
.L5:
	mov	edx, DWORD PTR -4[rbp]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	add	DWORD PTR -8[rbp], eax
	add	DWORD PTR -4[rbp], 2
.L4:
	mov	eax, DWORD PTR -4[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	sub	rdx, 1
	cmp	rax, rdx
	jb	.L5
	mov	rax, QWORD PTR -32[rbp]
	and	eax, 1
	test	rax, rax
	je	.L6
	mov	rax, QWORD PTR -32[rbp]
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movzx	eax, al
	add	DWORD PTR -8[rbp], eax
.L6:
	mov	eax, DWORD PTR -8[rbp]
	shr	eax, 16
	mov	edx, eax
	mov	eax, DWORD PTR -8[rbp]
	add	eax, edx
	not	eax
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	chksum, .-chksum
	.globl	mk_ping_pkt
	.type	mk_ping_pkt, @function
mk_ping_pkt:
.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, 48
	mov	rax, rdi
	mov	rcx, rsi
	mov	rdx, rcx
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, 8
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR [rax], 8
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 1[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	WORD PTR 2[rax], 0
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	add	rcx, 8
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	rdx, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	chksum
	mov	rdx, QWORD PTR -24[rbp]
	mov	WORD PTR 2[rdx], ax
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	mk_ping_pkt, .-mk_ping_pkt
	.globl	mk_ip_pkt
	.type	mk_ip_pkt, @function
mk_ip_pkt:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	esi, edx
	mov	rax, rcx
	mov	rcx, r8
	mov	rdx, rcx
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	eax, esi
	mov	BYTE PTR -52[rbp], al
	mov	rax, QWORD PTR -72[rbp]
	add	rax, 20
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, 20
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -24[rbp]
	movzx	edx, BYTE PTR [rax]
	and	edx, 15
	or	edx, 64
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	movzx	edx, BYTE PTR [rax]
	and	edx, -16
	or	edx, 5
	mov	BYTE PTR [rax], dl
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 1[rax], 0
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	WORD PTR 2[rdx], ax
	mov	edi, 9999
	call	htons@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	WORD PTR 4[rdx], ax
	mov	rax, QWORD PTR -24[rbp]
	mov	WORD PTR 6[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	BYTE PTR 8[rax], 64
	mov	rax, QWORD PTR -24[rbp]
	movzx	edx, BYTE PTR -52[rbp]
	mov	BYTE PTR 9[rax], dl
	mov	rax, QWORD PTR -24[rbp]
	mov	WORD PTR 10[rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	inet_addr@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 12[rax], edx
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	inet_addr@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 16[rax], edx
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 20
	mov	rdi, rax
	call	chksum
	mov	rdx, QWORD PTR -24[rbp]
	mov	WORD PTR 10[rdx], ax
	mov	rdx, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR -80[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	add	rcx, 20
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	mk_ip_pkt, .-mk_ip_pkt
	.section	.rodata
.LC0:
	.string	"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx"
	.text
	.globl	mk_eth_frm
	.type	mk_eth_frm, @function
mk_eth_frm:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	QWORD PTR -64[rbp], rdx
	mov	QWORD PTR -56[rbp], rcx
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 14
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -56[rbp]
	add	rax, 14
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	edi, 2048
	call	htons@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	WORD PTR 12[rdx], ax
	mov	rax, QWORD PTR -24[rbp]
	lea	rdi, 11[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, 10[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	r9, 9[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	r8, 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 7[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 6[rax]
	mov	rax, QWORD PTR -40[rbp]
	push	rdi
	push	rsi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	add	rsp, 16
	mov	rax, QWORD PTR -24[rbp]
	lea	rdi, 5[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	r9, 3[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	r8, 2[rax]
	mov	rax, QWORD PTR -24[rbp]
	lea	rcx, 1[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -48[rbp]
	push	rdi
	push	rsi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	add	rsp, 16
	mov	rdx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	add	rcx, 14
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	mk_eth_frm, .-mk_eth_frm
	.section	.rodata
	.align 8
.LC1:
	.string	"[-] Error! Cannot create raw socket"
	.align 8
.LC2:
	.string	"[-] Error! Cannot set IP_HDRINCL"
	.align 8
.LC3:
	.string	"[-] Error! Cannot send spoofed packet"
	.align 8
.LC4:
	.string	"[+] Spoofed IP packet sent successfully!"
	.text
	.globl	snd_pkt
	.type	snd_pkt, @function
snd_pkt:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	rcx, rdx
	mov	rax, rsi
	mov	rdx, rdi
	mov	rdx, rcx
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -40[rbp], 1
	mov	WORD PTR -32[rbp], 2
	mov	WORD PTR -30[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	mov	eax, 0
	call	inet_addr@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	QWORD PTR -24[rbp], 0
	mov	edx, 255
	mov	esi, 3
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L14
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L18
.L14:
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 3
	mov	esi, 0
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L16
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L18
.L16:
	mov	rdx, QWORD PTR -72[rbp]
	mov	rsi, QWORD PTR -80[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r9d, 16
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	test	rax, rax
	jns	.L17
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L18
.L17:
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, 0
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	snd_pkt, .-snd_pkt
	.section	.rodata
	.align 8
.LC5:
	.string	"[-] Error! Cannot get interface index"
	.align 8
.LC6:
	.string	"[-] Error! Cannot send spoofed frame"
	.align 8
.LC7:
	.string	"[+] Spoofed Ethernet frame sent successfully!"
	.text
	.globl	snd_frm
	.type	snd_frm, @function
snd_frm:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -104[rbp], rdi
	mov	QWORD PTR -112[rbp], rsi
	mov	QWORD PTR -128[rbp], rdx
	mov	QWORD PTR -120[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	mov	edi, 2048
	call	htons@PLT
	movzx	eax, ax
	mov	edx, eax
	mov	esi, 3
	mov	edi, 17
	call	socket@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	jns	.L21
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L25
.L21:
	mov	rax, QWORD PTR -104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -104[rbp]
	lea	rax, -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 35123
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	jns	.L23
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L25
.L23:
	mov	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -76[rbp], eax
	mov	BYTE PTR -69[rbp], 6
	lea	rax, -80[rbp]
	lea	r8, 15[rax]
	lea	rax, -80[rbp]
	lea	rdi, 14[rax]
	lea	rax, -80[rbp]
	lea	rcx, 13[rax]
	lea	rax, -80[rbp]
	lea	rdx, 12[rax]
	mov	rax, QWORD PTR -112[rbp]
	lea	rsi, -80[rbp]
	add	rsi, 17
	push	rsi
	lea	rsi, -80[rbp]
	add	rsi, 16
	push	rsi
	mov	r9, r8
	mov	r8, rdi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	add	rsp, 16
	mov	rdx, QWORD PTR -120[rbp]
	mov	rsi, QWORD PTR -128[rbp]
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -84[rbp]
	mov	r9d, 20
	mov	r8, rcx
	mov	ecx, 0
	mov	edi, eax
	call	sendto@PLT
	test	rax, rax
	jns	.L24
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L25
.L24:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, 0
.L25:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	snd_frm, .-snd_frm
	.section	.rodata
.LC8:
	.string	"type"
.LC9:
	.string	"src-ip"
.LC10:
	.string	"dst-ip"
.LC11:
	.string	"src-mac"
.LC12:
	.string	"dst-mac"
.LC13:
	.string	"payload"
.LC14:
	.string	"help"
	.align 8
.LC15:
	.ascii	"+--------"
	.string	"------------------------------------------+\n|      PURDUE Univ. CS528 - Network Security       |\n|       Lab 1: Packet Sniffing and Spoofing        |\n|  Task 2: Spoof Ping packets and Ethernet frames  |\n+--------------------------------------------------+\n"
.LC16:
	.string	"ethernet"
.LC17:
	.string	"ping"
.LC18:
	.string	"all"
	.align 8
.LC19:
	.ascii	"Usage: %s <"
	.string	"attributes> \n\t--type\t\tSpoofed packet type (ethernet, ping, all)\n\t--payload\tPacket payload\n\t--src-ip\tSource IP address\n\t--dst-ip\tDestination IP address\n\t--src-mac\tSource MAC address\n\t--dst-mac\tDestination MAC address\n\t--help\t\tDisplay this message and exit\n\n"
.LC20:
	.string	"a:b:c:d:e:h"
.LC21:
	.string	"eth14"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 376
	.cfi_offset 3, -24
	mov	DWORD PTR -372[rbp], edi
	mov	QWORD PTR -384[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	lea	rax, .LC8[rip]
	mov	QWORD PTR -288[rbp], rax
	mov	DWORD PTR -280[rbp], 1
	mov	QWORD PTR -272[rbp], 0
	mov	DWORD PTR -264[rbp], 97
	lea	rax, .LC9[rip]
	mov	QWORD PTR -256[rbp], rax
	mov	DWORD PTR -248[rbp], 1
	mov	QWORD PTR -240[rbp], 0
	mov	DWORD PTR -232[rbp], 98
	lea	rax, .LC10[rip]
	mov	QWORD PTR -224[rbp], rax
	mov	DWORD PTR -216[rbp], 1
	mov	QWORD PTR -208[rbp], 0
	mov	DWORD PTR -200[rbp], 99
	lea	rax, .LC11[rip]
	mov	QWORD PTR -192[rbp], rax
	mov	DWORD PTR -184[rbp], 1
	mov	QWORD PTR -176[rbp], 0
	mov	DWORD PTR -168[rbp], 100
	lea	rax, .LC12[rip]
	mov	QWORD PTR -160[rbp], rax
	mov	DWORD PTR -152[rbp], 1
	mov	QWORD PTR -144[rbp], 0
	mov	DWORD PTR -136[rbp], 101
	lea	rax, .LC13[rip]
	mov	QWORD PTR -128[rbp], rax
	mov	DWORD PTR -120[rbp], 1
	mov	QWORD PTR -112[rbp], 0
	mov	DWORD PTR -104[rbp], 112
	lea	rax, .LC14[rip]
	mov	QWORD PTR -96[rbp], rax
	mov	DWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	DWORD PTR -72[rbp], 104
	mov	QWORD PTR -64[rbp], 0
	mov	DWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	DWORD PTR -40[rbp], 0
	mov	QWORD PTR -344[rbp], 0
	mov	QWORD PTR -336[rbp], 0
	mov	QWORD PTR -328[rbp], 0
	mov	QWORD PTR -320[rbp], 0
	mov	QWORD PTR -312[rbp], 0
	mov	DWORD PTR -356[rbp], 0
	mov	QWORD PTR -304[rbp], 0
	mov	QWORD PTR -296[rbp], 0
	lea	rdi, .LC15[rip]
	call	puts@PLT
	jmp	.L28
.L42:
	mov	eax, DWORD PTR -348[rbp]
	sub	eax, 97
	cmp	eax, 15
	ja	.L29
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L31[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L31[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L31:
	.long	.L36-.L31
	.long	.L35-.L31
	.long	.L34-.L31
	.long	.L33-.L31
	.long	.L32-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L29-.L31
	.long	.L30-.L31
	.text
.L36:
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L37
	mov	DWORD PTR -352[rbp], 0
	jmp	.L28
.L37:
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L39
	mov	DWORD PTR -352[rbp], 1
	jmp	.L28
.L39:
	mov	rax, QWORD PTR optarg[rip]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L40
	mov	DWORD PTR -352[rbp], 2
	jmp	.L28
.L40:
	mov	DWORD PTR -352[rbp], 3
	jmp	.L28
.L35:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -344[rbp], rax
	jmp	.L28
.L34:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -336[rbp], rax
	jmp	.L28
.L33:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -328[rbp], rax
	jmp	.L28
.L32:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -320[rbp], rax
	jmp	.L28
.L30:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -304[rbp], rax
	mov	rax, QWORD PTR optarg[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -296[rbp], rax
	jmp	.L28
.L29:
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L54
.L28:
	lea	rcx, -356[rbp]
	lea	rdx, -288[rbp]
	mov	rsi, QWORD PTR -384[rbp]
	mov	eax, DWORD PTR -372[rbp]
	mov	r8, rcx
	mov	rcx, rdx
	lea	rdx, .LC20[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -348[rbp], eax
	cmp	DWORD PTR -348[rbp], -1
	jne	.L42
	mov	rax, QWORD PTR -304[rbp]
	test	rax, rax
	jne	.L43
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L54
.L43:
	cmp	DWORD PTR -352[rbp], 2
	je	.L44
	cmp	DWORD PTR -352[rbp], 2
	jg	.L45
	cmp	DWORD PTR -352[rbp], 0
	je	.L46
	cmp	DWORD PTR -352[rbp], 1
	je	.L47
	jmp	.L45
.L44:
	cmp	QWORD PTR -328[rbp], 0
	je	.L48
	cmp	QWORD PTR -320[rbp], 0
	je	.L48
	cmp	QWORD PTR -328[rbp], 0
	je	.L48
	cmp	QWORD PTR -320[rbp], 0
	jne	.L49
.L48:
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L54
.L49:
	mov	rdx, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	mk_ping_pkt
	mov	rcx, rax
	mov	rbx, rdx
	mov	rsi, QWORD PTR -336[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	r8, rdx
	mov	edx, 1
	mov	rdi, rax
	call	mk_ip_pkt
	mov	rsi, QWORD PTR -320[rbp]
	mov	rdi, QWORD PTR -328[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	call	mk_eth_frm
	mov	rsi, QWORD PTR -320[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rdi, .LC21[rip]
	call	snd_frm
	jmp	.L54
.L47:
	cmp	QWORD PTR -344[rbp], 0
	je	.L50
	cmp	QWORD PTR -336[rbp], 0
	jne	.L51
.L50:
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L54
.L51:
	mov	rdx, QWORD PTR -304[rbp]
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rdx
	mov	rsi, rax
	call	mk_ping_pkt
	mov	rcx, rax
	mov	rbx, rdx
	mov	rsi, QWORD PTR -336[rbp]
	mov	rax, QWORD PTR -344[rbp]
	mov	r8, rdx
	mov	edx, 1
	mov	rdi, rax
	call	mk_ip_pkt
	mov	rcx, rax
	mov	rbx, rdx
	mov	rax, QWORD PTR -336[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	snd_pkt
	jmp	.L54
.L46:
	cmp	QWORD PTR -328[rbp], 0
	je	.L52
	cmp	QWORD PTR -320[rbp], 0
	jne	.L53
.L52:
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L54
.L53:
	mov	rax, QWORD PTR -304[rbp]
	mov	rdx, QWORD PTR -296[rbp]
	mov	rsi, QWORD PTR -320[rbp]
	mov	rdi, QWORD PTR -328[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	call	mk_eth_frm
	mov	rsi, QWORD PTR -320[rbp]
	mov	rcx, rdx
	mov	rdx, rax
	lea	rdi, .LC21[rip]
	call	snd_frm
	jmp	.L54
.L45:
	mov	rax, QWORD PTR -384[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L54:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L55
	call	__stack_chk_fail@PLT
.L55:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.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	"231394598.c"
	.section	.rodata
	.align	2
.LC0:
	.ascii	"type\000"
	.align	2
.LC1:
	.ascii	"src-ip\000"
	.align	2
.LC2:
	.ascii	"dst-ip\000"
	.align	2
.LC3:
	.ascii	"src-mac\000"
	.align	2
.LC4:
	.ascii	"dst-mac\000"
	.align	2
.LC5:
	.ascii	"payload\000"
	.align	2
.LC6:
	.ascii	"help\000"
	.text
	.align	2
	.global	chksum
	.syntax unified
	.arm
	.fpu softvfp
	.type	chksum, %function
chksum:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L3
.L2:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L4
.L5:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldrh	r3, [r3]
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	str	r3, [fp, #-8]
.L4:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	bcc	.L5
	ldr	r3, [fp, #-20]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-12]
.L6:
	ldr	r3, [fp, #-12]
	lsr	r3, r3, #16
	lsl	r3, r3, #16
	lsr	r2, r3, #16
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	add	r3, r2, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mvn	r3, r3
	lsl	r3, r3, #16
	lsr	r3, r3, #16
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	chksum, .-chksum
	.align	2
	.global	mk_ping_pkt
	.syntax unified
	.arm
	.fpu softvfp
	.type	mk_ping_pkt, %function
mk_ping_pkt:
	@ 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, #-24]
	sub	r3, fp, #32
	stm	r3, {r1, r2}
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	mov	r2, #8
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-12]
	add	r3, r3, #8
	ldr	r1, [fp, #-32]
	ldr	r2, [fp, #-28]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	mov	r1, r2
	mov	r0, r3
	bl	chksum
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-24]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-24]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	mk_ping_pkt, .-mk_ping_pkt
	.align	2
	.global	mk_ip_pkt
	.syntax unified
	.arm
	.fpu softvfp
	.type	mk_ip_pkt, %function
mk_ip_pkt:
	@ args = 8, 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, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	strb	r3, [fp, #-33]
	ldr	r3, [fp, #8]
	add	r3, r3, #20
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #8]
	add	r3, r3, #20
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldrb	r3, [r2]
	bic	r3, r3, #176
	orr	r3, r3, #64
	strb	r3, [r2]
	ldr	r2, [fp, #-16]
	ldrb	r3, [r2]
	bic	r3, r3, #10
	orr	r3, r3, #5
	strb	r3, [r2]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strb	r2, [r3, #1]
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	strh	r2, [r3, #2]	@ movhi
	ldr	r0, .L11
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	strh	r2, [r3, #4]	@ movhi
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strh	r2, [r3, #6]	@ movhi
	ldr	r3, [fp, #-16]
	mov	r2, #64
	strb	r2, [r3, #8]
	ldr	r3, [fp, #-16]
	ldrb	r2, [fp, #-33]
	strb	r2, [r3, #9]
	ldr	r3, [fp, #-16]
	mov	r2, #0
	strh	r2, [r3, #10]	@ movhi
	ldr	r0, [fp, #-28]
	bl	inet_addr
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #12]
	ldr	r0, [fp, #-32]
	bl	inet_addr
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-12]
	mov	r1, #20
	mov	r0, r3
	bl	chksum
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	strh	r2, [r3, #10]	@ movhi
	ldr	r3, [fp, #-12]
	add	r3, r3, #20
	ldr	r1, [fp, #4]
	ldr	r2, [fp, #8]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-24]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	9999
	.size	mk_ip_pkt, .-mk_ip_pkt
	.section	.rodata
	.align	2
.LC8:
	.ascii	"%hhx:%hhx:%hhx:%hhx:%hhx:%hhx\000"
	.text
	.align	2
	.global	mk_eth_frm
	.syntax unified
	.arm
	.fpu softvfp
	.type	mk_eth_frm, %function
mk_eth_frm:
	@ args = 12, pretend = 8, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #8
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	str	r3, [fp, #8]
	ldr	r3, [fp, #12]
	add	r3, r3, #14
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #12]
	add	r3, r3, #14
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-16]
	mov	r0, #2048
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-16]
	and	r1, r2, #255
	mov	r0, #0
	orr	r1, r0, r1
	strb	r1, [r3, #12]
	lsr	r2, r2, #8
	lsl	r2, r2, #16
	lsr	r2, r2, #16
	mov	r1, #0
	orr	r2, r1, r2
	strb	r2, [r3, #13]
	ldr	r3, [fp, #-16]
	add	ip, r3, #6
	ldr	r3, [fp, #-16]
	add	lr, r3, #7
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r2, [fp, #-16]
	add	r2, r2, #9
	ldr	r1, [fp, #-16]
	add	r1, r1, #10
	ldr	r0, [fp, #-16]
	add	r0, r0, #11
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, lr
	mov	r2, ip
	ldr	r1, .L15
	ldr	r0, [fp, #-28]
	bl	__isoc99_sscanf
	ldr	ip, [fp, #-16]
	ldr	r3, [fp, #-16]
	add	lr, r3, #1
	ldr	r3, [fp, #-16]
	add	r3, r3, #2
	ldr	r2, [fp, #-16]
	add	r2, r2, #3
	ldr	r1, [fp, #-16]
	add	r1, r1, #4
	ldr	r0, [fp, #-16]
	add	r0, r0, #5
	str	r0, [sp, #12]
	str	r1, [sp, #8]
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, lr
	mov	r2, ip
	ldr	r1, .L15
	ldr	r0, [fp, #-32]
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-12]
	add	r3, r3, #14
	ldr	r1, [fp, #8]
	ldr	r2, [fp, #12]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	mov	r2, r3
	sub	r3, fp, #12
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	ldr	r0, [fp, #-24]
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #8
	bx	lr
.L16:
	.align	2
.L15:
	.word	.LC8
	.size	mk_eth_frm, .-mk_eth_frm
	.section	.rodata
	.align	2
.LC10:
	.ascii	"[-] Error! Cannot create raw socket\000"
	.align	2
.LC11:
	.ascii	"[-] Error! Cannot set IP_HDRINCL\000"
	.align	2
.LC12:
	.ascii	"[-] Error! Cannot send spoofed packet\000"
	.align	2
.LC13:
	.ascii	"[+] Spoofed IP packet sent successfully!\000"
	.align	2
.LC9:
	.ascii	"\000\000\000\000\000\000\000\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	snd_pkt
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_pkt, %function
snd_pkt:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	str	r0, [fp, #-40]
	sub	r3, fp, #48
	stm	r3, {r1, r2}
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r3, #0
	strh	r3, [fp, #-22]	@ movhi
	ldr	r0, [fp, #-40]
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r2, .L24+4
	sub	r3, fp, #16
	ldm	r2, {r0, r1}
	stm	r3, {r0, r1}
	mov	r2, #255
	mov	r1, #3
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L24+8
	bl	perror
	mvn	r3, #0
	b	.L22
.L18:
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #3
	mov	r1, #0
	ldr	r0, [fp, #-28]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L24+12
	bl	perror
	mvn	r3, #0
	b	.L22
.L20:
	ldr	r1, [fp, #-48]
	ldr	r2, [fp, #-44]
	mov	r3, #16
	str	r3, [sp, #4]
	sub	r3, fp, #24
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-28]
	bl	sendto
	mov	r3, r0
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L24+16
	bl	perror
	mvn	r3, #0
	b	.L22
.L21:
	ldr	r0, .L24+20
	bl	puts
	mov	r3, #0
.L22:
	ldr	r2, .L24
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L23
	bl	__stack_chk_fail
.L23:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	.LC14
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	snd_pkt, .-snd_pkt
	.section	.rodata
	.align	2
.LC15:
	.ascii	"[-] Error! Cannot get interface index\000"
	.align	2
.LC16:
	.ascii	"[-] Error! Cannot send spoofed frame\000"
	.align	2
.LC17:
	.ascii	"[+] Spoofed Ethernet frame sent successfully!\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	snd_frm
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_frm, %function
snd_frm:
	@ args = 0, pretend = 0, frame = 80
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	sub	r1, fp, #84
	stm	r1, {r2, r3}
	ldr	r3, .L33
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	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, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	bge	.L27
	ldr	r0, .L33+4
	bl	perror
	mvn	r3, #0
	b	.L31
.L27:
	ldr	r0, [fp, #-72]
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #40
	ldr	r1, [fp, #-72]
	mov	r0, r3
	bl	strncpy
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L33+8
	ldr	r0, [fp, #-64]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	bge	.L29
	ldr	r0, .L33+12
	bl	perror
	mvn	r3, #0
	b	.L31
.L29:
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-56]
	mov	r3, #6
	strb	r3, [fp, #-49]
	sub	r3, fp, #60
	add	r1, r3, #13
	sub	r3, fp, #60
	add	r2, r3, #12
	sub	r3, fp, #60
	add	r3, r3, #17
	str	r3, [sp, #12]
	sub	r3, fp, #60
	add	r3, r3, #16
	str	r3, [sp, #8]
	sub	r3, fp, #60
	add	r3, r3, #15
	str	r3, [sp, #4]
	sub	r3, fp, #60
	add	r3, r3, #14
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L33+16
	ldr	r0, [fp, #-76]
	bl	__isoc99_sscanf
	ldr	r1, [fp, #-84]
	ldr	r2, [fp, #-80]
	mov	r3, #20
	str	r3, [sp, #4]
	sub	r3, fp, #60
	str	r3, [sp]
	mov	r3, #0
	ldr	r0, [fp, #-64]
	bl	sendto
	mov	r3, r0
	cmp	r3, #0
	bge	.L30
	ldr	r0, .L33+20
	bl	perror
	mvn	r3, #0
	b	.L31
.L30:
	ldr	r0, .L33+24
	bl	puts
	mov	r3, #0
.L31:
	ldr	r2, .L33
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L32
	bl	__stack_chk_fail
.L32:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L34:
	.align	2
.L33:
	.word	.LC18
	.word	.LC10
	.word	35123
	.word	.LC15
	.word	.LC8
	.word	.LC16
	.word	.LC17
	.size	snd_frm, .-snd_frm
	.section	.rodata
	.align	2
.LC20:
	.ascii	"+--------------------------------------------------"
	.ascii	"+\012|      PURDUE Univ. CS528 - Network Security  "
	.ascii	"     |\012|       Lab 1: Packet Sniffing and Spoofi"
	.ascii	"ng        |\012|  Task 2: Spoof Ping packets and Et"
	.ascii	"hernet frames  |\012+------------------------------"
	.ascii	"--------------------+\012\000"
	.align	2
.LC21:
	.ascii	"ethernet\000"
	.align	2
.LC22:
	.ascii	"ping\000"
	.align	2
.LC23:
	.ascii	"all\000"
	.align	2
.LC24:
	.ascii	"Usage: %s <attributes> \012\011--type\011\011Spoofe"
	.ascii	"d packet type (ethernet, ping, all)\012\011--payloa"
	.ascii	"d\011Packet payload\012\011--src-ip\011Source IP ad"
	.ascii	"dress\012\011--dst-ip\011Destination IP address\012"
	.ascii	"\011--src-mac\011Source MAC address\012\011--dst-ma"
	.ascii	"c\011Destination MAC address\012\011--help\011\011D"
	.ascii	"isplay this message and exit\012\012\000"
	.align	2
.LC25:
	.ascii	"a:b:c:d:e:h\000"
	.align	2
.LC26:
	.ascii	"eth14\000"
	.align	2
.LC19:
	.word	.LC0
	.word	1
	.word	0
	.word	97
	.word	.LC1
	.word	1
	.word	0
	.word	98
	.word	.LC2
	.word	1
	.word	0
	.word	99
	.word	.LC3
	.word	1
	.word	0
	.word	100
	.word	.LC4
	.word	1
	.word	0
	.word	101
	.word	.LC5
	.word	1
	.word	0
	.word	112
	.word	.LC6
	.word	0
	.word	0
	.word	104
	.word	0
	.word	0
	.word	0
	.word	0
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 232
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #240
	str	r0, [fp, #-232]
	str	r1, [fp, #-236]
	ldr	r3, .L64
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r2, .L64+4
	sub	r3, fp, #136
	mov	r1, r2
	mov	r2, #128
	mov	r0, r3
	bl	memcpy
	mov	r3, #0
	str	r3, [fp, #-220]
	mov	r3, #0
	str	r3, [fp, #-216]
	mov	r3, #0
	str	r3, [fp, #-212]
	mov	r3, #0
	str	r3, [fp, #-208]
	mov	r3, #0
	str	r3, [fp, #-200]
	mov	r3, #0
	str	r3, [fp, #-224]
	mov	r3, #0
	str	r3, [fp, #-192]
	mov	r3, #0
	str	r3, [fp, #-188]
	ldr	r0, .L64+8
	bl	puts
	b	.L36
.L50:
	ldr	r3, [fp, #-196]
	sub	r3, r3, #97
	cmp	r3, #15
	ldrls	pc, [pc, r3, asl #2]
	b	.L37
.L39:
	.word	.L44
	.word	.L43
	.word	.L42
	.word	.L41
	.word	.L40
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L37
	.word	.L38
.L44:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	ldr	r1, .L64+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L45
	mov	r3, #0
	str	r3, [fp, #-204]
	b	.L36
.L45:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	ldr	r1, .L64+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L47
	mov	r3, #1
	str	r3, [fp, #-204]
	b	.L36
.L47:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	ldr	r1, .L64+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
	mov	r3, #2
	str	r3, [fp, #-204]
	b	.L36
.L48:
	mov	r3, #3
	str	r3, [fp, #-204]
	b	.L36
.L43:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	str	r3, [fp, #-220]
	b	.L36
.L42:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	str	r3, [fp, #-216]
	b	.L36
.L41:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	str	r3, [fp, #-212]
	b	.L36
.L40:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	str	r3, [fp, #-208]
	b	.L36
.L38:
	ldr	r3, .L64+12
	ldr	r3, [r3]
	str	r3, [fp, #-192]
	ldr	r3, .L64+12
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-188]
	b	.L36
.L37:
	ldr	r3, [fp, #-236]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+28
	bl	printf
	mvn	r3, #0
	b	.L62
.L36:
	sub	r2, fp, #136
	sub	r3, fp, #224
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, .L64+32
	ldr	r1, [fp, #-236]
	ldr	r0, [fp, #-232]
	bl	getopt_long
	str	r0, [fp, #-196]
	ldr	r3, [fp, #-196]
	cmn	r3, #1
	bne	.L50
	ldr	r3, [fp, #-192]
	cmp	r3, #0
	bne	.L51
	ldr	r3, [fp, #-236]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+28
	bl	printf
	mvn	r3, #0
	b	.L62
.L51:
	ldr	r3, [fp, #-204]
	cmp	r3, #2
	beq	.L52
	ldr	r3, [fp, #-204]
	cmp	r3, #2
	bgt	.L53
	ldr	r3, [fp, #-204]
	cmp	r3, #0
	beq	.L54
	ldr	r3, [fp, #-204]
	cmp	r3, #1
	beq	.L55
	b	.L53
.L52:
	ldr	r3, [fp, #-212]
	cmp	r3, #0
	beq	.L56
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	beq	.L56
	ldr	r3, [fp, #-212]
	cmp	r3, #0
	beq	.L56
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	bne	.L57
.L56:
	ldr	r3, [fp, #-236]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+28
	bl	printf
	mvn	r3, #0
	b	.L62
.L57:
	sub	r0, fp, #184
	sub	r3, fp, #192
	ldm	r3, {r1, r2}
	bl	mk_ping_pkt
	sub	ip, fp, #176
	mov	r2, sp
	sub	r3, fp, #184
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	mov	r3, #1
	ldr	r2, [fp, #-216]
	ldr	r1, [fp, #-220]
	mov	r0, ip
	bl	mk_ip_pkt
	sub	r0, fp, #168
	ldr	r3, [fp, #-172]
	str	r3, [sp]
	ldr	r3, [fp, #-176]
	ldr	r2, [fp, #-208]
	ldr	r1, [fp, #-212]
	bl	mk_eth_frm
	sub	r3, fp, #168
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-208]
	ldr	r0, .L64+36
	bl	snd_frm
	mov	r3, r0
	b	.L62
.L55:
	ldr	r3, [fp, #-220]
	cmp	r3, #0
	beq	.L58
	ldr	r3, [fp, #-216]
	cmp	r3, #0
	bne	.L59
.L58:
	ldr	r3, [fp, #-236]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+28
	bl	printf
	mvn	r3, #0
	b	.L62
.L59:
	sub	r0, fp, #160
	sub	r3, fp, #192
	ldm	r3, {r1, r2}
	bl	mk_ping_pkt
	sub	ip, fp, #152
	mov	r2, sp
	sub	r3, fp, #160
	ldm	r3, {r0, r1}
	stm	r2, {r0, r1}
	mov	r3, #1
	ldr	r2, [fp, #-216]
	ldr	r1, [fp, #-220]
	mov	r0, ip
	bl	mk_ip_pkt
	sub	r3, fp, #152
	ldm	r3, {r1, r2}
	ldr	r0, [fp, #-216]
	bl	snd_pkt
	mov	r3, r0
	b	.L62
.L54:
	ldr	r3, [fp, #-212]
	cmp	r3, #0
	beq	.L60
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	bne	.L61
.L60:
	ldr	r3, [fp, #-236]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+28
	bl	printf
	mvn	r3, #0
	b	.L62
.L61:
	sub	r0, fp, #144
	ldr	r3, [fp, #-188]
	str	r3, [sp]
	ldr	r3, [fp, #-192]
	ldr	r2, [fp, #-208]
	ldr	r1, [fp, #-212]
	bl	mk_eth_frm
	sub	r3, fp, #144
	ldm	r3, {r2, r3}
	ldr	r1, [fp, #-208]
	ldr	r0, .L64+36
	bl	snd_frm
	mov	r3, r0
	b	.L62
.L53:
	ldr	r3, [fp, #-236]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L64+28
	bl	printf
	mov	r3, #0
.L62:
	ldr	r2, .L64
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L63
	bl	__stack_chk_fail
.L63:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L65:
	.align	2
.L64:
	.word	.LC27
	.word	.LC19
	.word	.LC20
	.word	optarg
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
