	.file	"675628.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	edi, -1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
.LC0:
	.string	"%d.%d.%d.%d"
	.text
	.globl	addr_string
	.type	addr_string, @function
addr_string:
.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	edi, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	ecx, DWORD PTR 4[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR [rax]
	lea	rax, -16[rbp]
	mov	r9d, edi
	mov	r8d, esi
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	asprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	sub	rdx, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	addr_string, .-addr_string
	.section	.rodata
	.align 8
.LC1:
	.string	"Sorry, 127.0.0.0/8 is a blocked subnet."
	.align 8
.LC2:
	.string	"Sorry, 54.0.0.0/8 is a blocked subnet."
	.align 8
.LC3:
	.string	"Sorry, 0.0.0.0/8 is blocked subnet."
	.text
	.globl	filter
	.type	filter, @function
filter:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 127
	jne	.L6
	lea	rdi, .LC1[rip]
	call	error
.L6:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	cmp	eax, 54
	jne	.L7
	lea	rdi, .LC2[rip]
	call	error
.L7:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L8
	lea	rdi, .LC3[rip]
	call	error
.L8:
	mov	eax, 1
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	filter, .-filter
	.section	.rodata
.LC4:
	.string	"NIH Proxy"
	.align 8
.LC5:
	.string	"Specify an HTTP server to connect to"
	.align 8
.LC6:
	.string	"DNS is too hard; just provide an IP address"
.LC7:
	.string	".\n"
.LC8:
	.string	"Invalid IP address"
.LC9:
	.string	"Invalid host\n"
.LC10:
	.string	"Connecting to %s\n"
.LC11:
	.string	"GET / HTTP/1.1\nHost: %s\n\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.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	DWORD PTR -116[rbp], edi
	mov	QWORD PTR -128[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR stdout[rip]
	mov	esi, 0
	mov	rdi, rax
	call	setbuf@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -32[rbp]
	mov	esi, 20
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -32[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -80[rbp], rax
	mov	DWORD PTR -100[rbp], 0
	jmp	.L11
.L14:
	cmp	QWORD PTR -80[rbp], 0
	jne	.L12
	lea	rdi, .LC8[rip]
	call	error
.L12:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	mov	DWORD PTR -64[rbp+rax*4], edx
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	mov	eax, DWORD PTR -64[rbp+rax*4]
	cmp	eax, 256
	jbe	.L13
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 13
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	edi, -1
	call	exit@PLT
.L13:
	lea	rsi, .LC7[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -80[rbp], rax
	add	DWORD PTR -100[rbp], 1
.L11:
	cmp	DWORD PTR -100[rbp], 3
	jle	.L14
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	filter
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	addr_string
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -96[rbp], 0
	mov	DWORD PTR -100[rbp], 0
	jmp	.L15
.L16:
	sal	DWORD PTR -96[rbp], 8
	mov	eax, DWORD PTR -100[rbp]
	cdqe
	mov	edx, DWORD PTR -64[rbp+rax*4]
	mov	eax, DWORD PTR -96[rbp]
	or	eax, edx
	mov	DWORD PTR -96[rbp], eax
	add	DWORD PTR -100[rbp], 1
.L15:
	cmp	DWORD PTR -100[rbp], 3
	jle	.L16
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -88[rbp], eax
	mov	WORD PTR -48[rbp], 2
	mov	edi, 80
	call	htons@PLT
	mov	WORD PTR -46[rbp], ax
	mov	eax, DWORD PTR -96[rbp]
	mov	edi, eax
	call	htonl@PLT
	mov	DWORD PTR -44[rbp], eax
	mov	edi, 5
	call	alarm@PLT
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	esi, 1
	mov	edi, 256
	call	calloc@PLT
	mov	QWORD PTR -72[rbp], rax
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	addr_string
	mov	rdx, rax
	mov	rax, QWORD PTR -72[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -92[rbp], 0
	jmp	.L17
.L20:
	mov	rcx, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR -88[rbp]
	mov	edx, 255
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	jle	.L23
	mov	eax, DWORD PTR -84[rbp]
	add	DWORD PTR -92[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -72[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rdx, QWORD PTR stdout[rip]
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	cmp	DWORD PTR -84[rbp], 254
	jle	.L24
.L17:
	cmp	DWORD PTR -92[rbp], 10239
	jle	.L20
	jmp	.L19
.L23:
	nop
	jmp	.L19
.L24:
	nop
.L19:
	mov	eax, DWORD PTR -88[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.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	"675628.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	puts
	mvn	r0, #0
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"%d.%d.%d.%d\000"
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	addr_string
	.syntax unified
	.arm
	.fpu softvfp
	.type	addr_string, %function
addr_string:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-16]
	ldr	ip, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-16]
	ldr	r2, [r2, #12]
	sub	r0, fp, #12
	str	r2, [sp, #4]
	str	r3, [sp]
	mov	r3, ip
	mov	r2, r1
	ldr	r1, .L5+4
	bl	asprintf
	ldr	r3, [fp, #-12]
	ldr	r2, .L5
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC1
	.word	.LC0
	.size	addr_string, .-addr_string
	.section	.rodata
	.align	2
.LC2:
	.ascii	"Sorry, 127.0.0.0/8 is a blocked subnet.\000"
	.align	2
.LC3:
	.ascii	"Sorry, 54.0.0.0/8 is a blocked subnet.\000"
	.align	2
.LC4:
	.ascii	"Sorry, 0.0.0.0/8 is blocked subnet.\000"
	.text
	.align	2
	.global	filter
	.syntax unified
	.arm
	.fpu softvfp
	.type	filter, %function
filter:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #127
	bne	.L8
	ldr	r0, .L12
	bl	error
.L8:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #54
	bne	.L9
	ldr	r0, .L12+4
	bl	error
.L9:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L12+8
	bl	error
.L10:
	mov	r3, #1
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	filter, .-filter
	.section	.rodata
	.align	2
.LC5:
	.ascii	"NIH Proxy\000"
	.align	2
.LC6:
	.ascii	"Specify an HTTP server to connect to\000"
	.align	2
.LC7:
	.ascii	"DNS is too hard; just provide an IP address\000"
	.align	2
.LC8:
	.ascii	".\012\000"
	.align	2
.LC9:
	.ascii	"Invalid IP address\000"
	.align	2
.LC10:
	.ascii	"Invalid host\012\000"
	.align	2
.LC11:
	.ascii	"Connecting to %s\012\000"
	.align	2
.LC12:
	.ascii	"GET / HTTP/1.1\012Host: %s\012\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	setbuf
	ldr	r0, .L29+8
	bl	puts
	ldr	r0, .L29+12
	bl	puts
	ldr	r0, .L29+16
	bl	puts
	ldr	r3, .L29+20
	ldr	r2, [r3]
	sub	r3, fp, #28
	mov	r1, #20
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #28
	ldr	r1, .L29+24
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-84]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L15
.L18:
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L16
	ldr	r0, .L29+28
	bl	error
.L16:
	ldr	r0, [fp, #-84]
	bl	atoi
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	str	r2, [r3, #-56]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-56]
	cmp	r3, #256
	bls	.L17
	ldr	r3, .L29+32
	ldr	r3, [r3]
	mov	r2, #13
	mov	r1, #1
	ldr	r0, .L29+36
	bl	fwrite
	mvn	r0, #0
	bl	exit
.L17:
	ldr	r1, .L29+24
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L15:
	ldr	r3, [fp, #-88]
	cmp	r3, #3
	ble	.L18
	sub	r3, fp, #60
	mov	r0, r3
	bl	filter
	sub	r3, fp, #60
	mov	r0, r3
	bl	addr_string
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L29+40
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-80]
	mov	r3, #0
	str	r3, [fp, #-88]
	b	.L19
.L20:
	ldr	r3, [fp, #-80]
	lsl	r3, r3, #8
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-88]
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-56]
	ldr	r3, [fp, #-80]
	orr	r3, r2, r3
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-88]
	add	r3, r3, #1
	str	r3, [fp, #-88]
.L19:
	ldr	r3, [fp, #-88]
	cmp	r3, #3
	ble	.L20
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-72]
	mov	r3, #2
	strh	r3, [fp, #-44]	@ movhi
	mov	r0, #80
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-42]	@ movhi
	ldr	r3, [fp, #-80]
	mov	r0, r3
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-40]
	mov	r0, #5
	bl	alarm
	sub	r3, fp, #44
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-72]
	bl	connect
	mov	r1, #1
	mov	r0, #256
	bl	calloc
	mov	r3, r0
	str	r3, [fp, #-68]
	sub	r3, fp, #60
	mov	r0, r3
	bl	addr_string
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L29+44
	ldr	r0, [fp, #-68]
	bl	sprintf
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	mov	r2, r3
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-72]
	bl	write
	mov	r3, #0
	str	r3, [fp, #-76]
	b	.L21
.L24:
	mov	r2, #255
	ldr	r1, [fp, #-68]
	ldr	r0, [fp, #-72]
	bl	read
	str	r0, [fp, #-64]
	ldr	r3, [fp, #-64]
	cmp	r3, #0
	ble	.L27
	ldr	r2, [fp, #-76]
	ldr	r3, [fp, #-64]
	add	r3, r2, r3
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-64]
	ldr	r2, [fp, #-68]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-68]
	bl	fputs
	ldr	r3, [fp, #-64]
	cmp	r3, #254
	ble	.L28
.L21:
	ldr	r3, [fp, #-76]
	cmp	r3, #10240
	blt	.L24
	b	.L23
.L27:
	nop
	b	.L23
.L28:
	nop
.L23:
	ldr	r0, [fp, #-72]
	bl	close
	mov	r3, #0
	ldr	r2, .L29
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L26
	bl	__stack_chk_fail
.L26:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L30:
	.align	2
.L29:
	.word	.LC13
	.word	stdout
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stdin
	.word	.LC8
	.word	.LC9
	.word	stderr
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
