	.file	"239772.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s INTERFACE IP PORT\n"
.LC1:
	.string	"ERROR invalid port number\n"
	.align 8
.LC2:
	.string	"connecting to host %s on port %u, using interface %s...\n"
	.align 8
.LC3:
	.string	"ERROR socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP) FAILED: %s\n"
	.align 8
.LC4:
	.string	"ERROR ioctl(sockfd, SIOCGIFINDEX, &ifr) FAILED: %s\n"
	.align 8
.LC5:
	.string	"ERROR setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, (void *)&ifr, sizeof(ifr)) FAILED: %s\n"
.LC6:
	.string	"Ready to send data.."
.LC7:
	.string	"Hello.. I am the client"
.LC8:
	.string	"sendto failed"
.LC9:
	.string	"waiting for a reply..."
.LC10:
	.string	"recvfrom failed"
.LC11:
	.string	"got '%s' from %s\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, 1216
	mov	DWORD PTR -1204[rbp], edi
	mov	QWORD PTR -1216[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1204[rbp], 4
	je	.L2
	mov	rax, QWORD PTR -1216[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	QWORD PTR -1176[rbp], 0
	mov	rax, QWORD PTR -1216[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	lea	rcx, -1176[rbp]
	mov	edx, 10
	mov	rsi, rcx
	mov	rdi, rax
	call	strtol@PLT
	mov	WORD PTR -1190[rbp], ax
	mov	rax, QWORD PTR -1176[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -1216[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	movzx	edx, WORD PTR -1190[rbp]
	mov	rax, QWORD PTR -1216[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 17
	mov	esi, 2
	mov	edi, 10
	call	socket@PLT
	mov	DWORD PTR -1184[rbp], eax
	cmp	DWORD PTR -1184[rbp], -1
	jne	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rax, -1136[rbp]
	mov	edx, 40
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -1216[rbp]
	add	rax, 8
	mov	rcx, QWORD PTR [rax]
	lea	rax, -1136[rbp]
	mov	edx, 15
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	lea	rdx, -1136[rbp]
	mov	eax, DWORD PTR -1184[rbp]
	mov	esi, 35123
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	cmp	eax, -1
	jne	.L5
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L5:
	lea	rdx, -1136[rbp]
	mov	eax, DWORD PTR -1184[rbp]
	mov	r8d, 40
	mov	rcx, rdx
	mov	edx, 25
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	cmp	eax, -1
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -1184[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -1168[rbp]
	mov	edx, 28
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -1168[rbp], 10
	movzx	eax, WORD PTR -1190[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1166[rbp], ax
	mov	rax, QWORD PTR -1216[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rdx, -1168[rbp]
	add	rdx, 8
	mov	rsi, rax
	mov	edi, 10
	call	inet_pton@PLT
	mov	DWORD PTR -1188[rbp], 28
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	ecx, DWORD PTR -1188[rbp]
	lea	rdx, -1168[rbp]
	mov	eax, DWORD PTR -1184[rbp]
	mov	r9d, ecx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 24
	lea	rsi, .LC7[rip]
	mov	edi, eax
	call	sendto@PLT
	test	rax, rax
	jns	.L7
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 4
	call	exit@PLT
.L7:
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	DWORD PTR -1180[rbp], 28
	lea	rcx, -1188[rbp]
	lea	rdx, -1168[rbp]
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1184[rbp]
	mov	r9, rcx
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recvfrom@PLT
	test	rax, rax
	jns	.L8
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 4
	call	exit@PLT
.L8:
	lea	rax, -1088[rbp]
	lea	rdx, -1168[rbp]
	lea	rsi, 8[rdx]
	mov	ecx, 46
	mov	rdx, rax
	mov	edi, 10
	call	inet_ntop@PLT
	mov	rdx, rax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1184[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"239772.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s INTERFACE IP PORT\012\000"
	.align	2
.LC1:
	.ascii	"ERROR invalid port number\012\000"
	.align	2
.LC2:
	.ascii	"connecting to host %s on port %u, using interface %"
	.ascii	"s...\012\000"
	.align	2
.LC3:
	.ascii	"ERROR socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP) FAI"
	.ascii	"LED: %s\012\000"
	.align	2
.LC4:
	.ascii	"ERROR ioctl(sockfd, SIOCGIFINDEX, &ifr) FAILED: %s\012"
	.ascii	"\000"
	.align	2
.LC5:
	.ascii	"ERROR setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVIC"
	.ascii	"E, (void *)&ifr, sizeof(ifr)) FAILED: %s\012\000"
	.align	2
.LC6:
	.ascii	"Ready to send data..\000"
	.align	2
.LC7:
	.ascii	"Hello.. I am the client\000"
	.align	2
.LC8:
	.ascii	"sendto failed\000"
	.align	2
.LC9:
	.ascii	"waiting for a reply...\000"
	.align	2
.LC10:
	.ascii	"recvfrom failed\000"
	.align	2
.LC11:
	.ascii	"got '%s' from %s\012\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 = 1168
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1168
	sub	sp, sp, #12
	str	r0, [fp, #-1176]
	str	r1, [fp, #-1180]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1176]
	cmp	r3, #4
	beq	.L2
	ldr	r3, [fp, #-1180]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L11+4
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #0
	str	r3, [fp, #-1160]
	ldr	r3, [fp, #-1180]
	add	r3, r3, #12
	ldr	r0, [r3]
	sub	r3, fp, #1136
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #10
	mov	r1, r3
	bl	strtol
	mov	r2, r0
	sub	r3, fp, #12
	sub	r3, r3, #1152
	sub	r3, r3, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-1160]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L11+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-1180]
	add	r3, r3, #8
	ldr	r1, [r3]
	sub	r3, fp, #12
	sub	r3, r3, #1152
	sub	r3, r3, #2
	ldrh	r2, [r3]
	ldr	r3, [fp, #-1180]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r0, .L11+16
	bl	printf
	mov	r2, #17
	mov	r1, #2
	mov	r0, #10
	bl	socket
	str	r0, [fp, #-1156]
	ldr	r3, [fp, #-1156]
	cmn	r3, #1
	bne	.L4
	ldr	r3, .L11+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L11+20
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L4:
	sub	r3, fp, #1104
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-1180]
	add	r3, r3, #4
	ldr	r1, [r3]
	sub	r3, fp, #1104
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #15
	mov	r0, r3
	bl	strncpy
	sub	r3, fp, #1104
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L11+24
	ldr	r0, [fp, #-1156]
	bl	ioctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L5
	ldr	r3, .L11+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L11+28
	mov	r0, r4
	bl	fprintf
.L5:
	sub	r3, fp, #1104
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #32
	str	r2, [sp]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, [fp, #-1156]
	bl	setsockopt
	mov	r3, r0
	cmn	r3, #1
	bne	.L6
	ldr	r3, .L11+8
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L11+32
	mov	r0, r4
	bl	fprintf
	ldr	r0, [fp, #-1156]
	bl	close
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #1136
	sub	r3, r3, #12
	mov	r2, #28
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #12
	sub	r3, r3, #1136
	mov	r2, #10
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #12
	sub	r3, r3, #1152
	sub	r3, r3, #2
	ldrh	r3, [r3]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #1136
	strh	r2, [r3, #2]	@ movhi
	ldr	r3, [fp, #-1180]
	add	r3, r3, #8
	ldr	r1, [r3]
	sub	r3, fp, #1136
	sub	r3, r3, #12
	add	r3, r3, #8
	mov	r2, r3
	mov	r0, #10
	bl	inet_pton
	mov	r3, #28
	str	r3, [fp, #-1164]
	ldr	r0, .L11+36
	bl	puts
	ldr	r3, [fp, #-1164]
	str	r3, [sp, #4]
	sub	r3, fp, #1136
	sub	r3, r3, #12
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #24
	ldr	r1, .L11+40
	ldr	r0, [fp, #-1156]
	bl	sendto
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L11+44
	bl	perror
	mov	r0, #4
	bl	exit
.L7:
	ldr	r0, .L11+48
	bl	puts
	mov	r3, #28
	str	r3, [fp, #-1152]
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #1152
	sub	r3, r3, #12
	str	r3, [sp, #4]
	sub	r3, fp, #1136
	sub	r3, r3, #12
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1156]
	bl	recvfrom
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L11+52
	bl	perror
	mov	r0, #4
	bl	exit
.L8:
	sub	r2, fp, #1072
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r3, fp, #1136
	sub	r3, r3, #12
	add	r1, r3, #8
	mov	r3, #46
	mov	r0, #10
	bl	inet_ntop
	mov	r2, r0
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L11+56
	bl	printf
	ldr	r0, [fp, #-1156]
	bl	close
	mov	r3, #0
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC12
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	35123
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.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
