	.file	"194145.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"the_stack_data/194145.c"
.LC1:
	.string	"gateway"
	.align 8
.LC2:
	.string	"route -n | grep %s  | grep 'UG[ \t]' | awk '{print $2}'"
.LC3:
	.string	"r"
	.text
	.globl	GetGatewayForInterface
	.type	GetGatewayForInterface, @function
GetGatewayForInterface:
.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, 1312
	mov	QWORD PTR -1288[rbp], rdi
	mov	QWORD PTR -1296[rbp], rsi
	mov	QWORD PTR -1304[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -1296[rbp], 0
	jne	.L2
	lea	rcx, __PRETTY_FUNCTION__.0[rip]
	mov	edx, 8
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	__assert_fail@PLT
.L2:
	mov	QWORD PTR -1008[rbp], 0
	mov	QWORD PTR -1000[rbp], 0
	lea	rdx, -992[rbp]
	mov	eax, 0
	mov	ecx, 123
	mov	rdi, rdx
	rep stosq
	mov	QWORD PTR -1264[rbp], 0
	mov	QWORD PTR -1256[rbp], 0
	mov	QWORD PTR -1248[rbp], 0
	mov	QWORD PTR -1240[rbp], 0
	mov	QWORD PTR -1232[rbp], 0
	mov	QWORD PTR -1224[rbp], 0
	mov	QWORD PTR -1216[rbp], 0
	mov	QWORD PTR -1208[rbp], 0
	mov	QWORD PTR -1200[rbp], 0
	mov	QWORD PTR -1192[rbp], 0
	mov	QWORD PTR -1184[rbp], 0
	mov	QWORD PTR -1176[rbp], 0
	mov	QWORD PTR -1168[rbp], 0
	mov	QWORD PTR -1160[rbp], 0
	mov	QWORD PTR -1152[rbp], 0
	mov	QWORD PTR -1144[rbp], 0
	mov	QWORD PTR -1136[rbp], 0
	mov	QWORD PTR -1128[rbp], 0
	mov	QWORD PTR -1120[rbp], 0
	mov	QWORD PTR -1112[rbp], 0
	mov	QWORD PTR -1104[rbp], 0
	mov	QWORD PTR -1096[rbp], 0
	mov	QWORD PTR -1088[rbp], 0
	mov	QWORD PTR -1080[rbp], 0
	mov	QWORD PTR -1072[rbp], 0
	mov	QWORD PTR -1064[rbp], 0
	mov	QWORD PTR -1056[rbp], 0
	mov	QWORD PTR -1048[rbp], 0
	mov	QWORD PTR -1040[rbp], 0
	mov	QWORD PTR -1032[rbp], 0
	mov	QWORD PTR -1024[rbp], 0
	mov	QWORD PTR -1016[rbp], 0
	mov	rdx, QWORD PTR -1288[rbp]
	lea	rax, -1008[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1008[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	popen@PLT
	mov	QWORD PTR -1272[rbp], rax
	cmp	QWORD PTR -1272[rbp], 0
	jne	.L3
	mov	eax, 0
	jmp	.L7
.L3:
	mov	rdx, QWORD PTR -1272[rbp]
	lea	rax, -1264[rbp]
	mov	esi, 256
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L5
	mov	eax, 0
	jmp	.L7
.L5:
	mov	rax, QWORD PTR -1272[rbp]
	mov	rdi, rax
	call	pclose@PLT
	lea	rax, -1264[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	movzx	eax, BYTE PTR -1264[rbp+rax]
	cmp	al, 10
	jne	.L6
	lea	rax, -1264[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	mov	BYTE PTR -1264[rbp+rax], 0
.L6:
	mov	rdx, QWORD PTR -1304[rbp]
	lea	rcx, -1264[rbp]
	mov	rax, QWORD PTR -1296[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	rax, QWORD PTR -1296[rbp]
.L7:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	GetGatewayForInterface, .-GetGatewayForInterface
	.section	.rodata
.LC4:
	.string	"Usage: %s <ifname>\n"
.LC5:
	.string	"No Gateway for %s\n"
.LC6:
	.string	"Gateway: %s\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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	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
	cmp	DWORD PTR -52[rbp], 1
	jg	.L10
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L13
.L10:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -48[rbp]
	mov	edx, 32
	mov	rsi, rcx
	mov	rdi, rax
	call	GetGatewayForInterface
	test	rax, rax
	jne	.L12
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L13
.L12:
	lea	rax, -48[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L13:
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 16
	.type	__PRETTY_FUNCTION__.0, @object
	.size	__PRETTY_FUNCTION__.0, 23
__PRETTY_FUNCTION__.0:
	.string	"GetGatewayForInterface"
	.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	"194145.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"the_stack_data/194145.c\000"
	.align	2
.LC1:
	.ascii	"gateway\000"
	.align	2
.LC2:
	.ascii	"route -n | grep %s  | grep 'UG[ \011]' | awk '{prin"
	.ascii	"t $2}'\000"
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	GetGatewayForInterface
	.syntax unified
	.arm
	.fpu softvfp
	.type	GetGatewayForInterface, %function
GetGatewayForInterface:
	@ args = 0, pretend = 0, frame = 1280
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1280
	str	r0, [fp, #-1272]
	str	r1, [fp, #-1276]
	str	r2, [fp, #-1280]
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1276]
	cmp	r3, #0
	bne	.L2
	ldr	r3, .L9+4
	mov	r2, #8
	ldr	r1, .L9+8
	ldr	r0, .L9+12
	bl	__assert_fail
.L2:
	mov	r3, #0
	str	r3, [fp, #-1008]
	sub	r3, fp, #1004
	mov	r2, #996
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-1264]
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #252
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1008
	ldr	r2, [fp, #-1272]
	ldr	r1, .L9+16
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1008
	ldr	r1, .L9+20
	mov	r0, r3
	bl	popen
	str	r0, [fp, #-1268]
	ldr	r3, [fp, #-1268]
	cmp	r3, #0
	bne	.L3
	mov	r3, #0
	b	.L7
.L3:
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1268]
	mov	r1, #256
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L5
	mov	r3, #0
	b	.L7
.L5:
	ldr	r0, [fp, #-1268]
	bl	pclose
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-1260]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L6
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-1260]
.L6:
	sub	r3, fp, #1248
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, [fp, #-1280]
	mov	r1, r3
	ldr	r0, [fp, #-1276]
	bl	strncpy
	ldr	r3, [fp, #-1276]
.L7:
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC4
	.word	__PRETTY_FUNCTION__.4797
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.size	GetGatewayForInterface, .-GetGatewayForInterface
	.section	.rodata
	.align	2
.LC5:
	.ascii	"Usage: %s <ifname>\012\000"
	.align	2
.LC6:
	.ascii	"No Gateway for %s\012\000"
	.align	2
.LC7:
	.ascii	"Gateway: %s\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-40]
	sub	r3, fp, #36
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	str	r2, [r3, #20]
	str	r2, [r3, #24]
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bgt	.L12
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17+4
	bl	printf
	mvn	r3, #0
	b	.L15
.L12:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r1, fp, #40
	mov	r2, #32
	mov	r0, r3
	bl	GetGatewayForInterface
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17+8
	bl	printf
	mvn	r3, #0
	b	.L15
.L14:
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, .L17+12
	bl	printf
	mov	r3, #0
.L15:
	ldr	r2, .L17
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC8
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
	.type	__PRETTY_FUNCTION__.4797, %object
	.size	__PRETTY_FUNCTION__.4797, 23
__PRETTY_FUNCTION__.4797:
	.ascii	"GetGatewayForInterface\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
