	.file	"72014041.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"((http)://)?([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3})(:([0-9]{1,5}))?(\\S+)?"
.LC1:
	.string	"Failed to parse URL: %s\n"
	.text
	.globl	parseUrl
	.type	parseUrl, @function
parseUrl:
.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, 432
	mov	QWORD PTR -424[rbp], rdi
	mov	QWORD PTR -432[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -400[rbp]
	mov	edx, 3
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	regcomp@PLT
	mov	DWORD PTR -404[rbp], eax
	cmp	DWORD PTR -404[rbp], 0
	je	.L2
	lea	rdx, -272[rbp]
	lea	rsi, -400[rbp]
	mov	eax, DWORD PTR -404[rbp]
	mov	ecx, 256
	mov	edi, eax
	call	regerror@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -272[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L5
.L2:
	lea	rdx, -336[rbp]
	mov	rsi, QWORD PTR -424[rbp]
	lea	rax, -400[rbp]
	mov	r8d, 0
	mov	rcx, rdx
	mov	edx, 7
	mov	rdi, rax
	call	regexec@PLT
	mov	DWORD PTR -404[rbp], eax
	cmp	DWORD PTR -404[rbp], 0
	je	.L4
	lea	rdx, -272[rbp]
	lea	rsi, -400[rbp]
	mov	eax, DWORD PTR -404[rbp]
	mov	ecx, 256
	mov	edi, eax
	call	regerror@PLT
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -272[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L5
.L4:
	mov	rax, QWORD PTR -432[rbp]
	mov	edx, 96
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -316[rbp]
	mov	edx, DWORD PTR -320[rbp]
	sub	eax, edx
	cdqe
	mov	edx, DWORD PTR -320[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -424[rbp]
	lea	rsi, [rcx+rdx]
	mov	rdx, QWORD PTR -432[rbp]
	lea	rcx, 16[rdx]
	mov	rdx, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	eax, DWORD PTR -308[rbp]
	mov	edx, DWORD PTR -312[rbp]
	sub	eax, edx
	movsx	rdx, eax
	mov	eax, DWORD PTR -312[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -424[rbp]
	add	rcx, rax
	mov	rax, QWORD PTR -432[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -292[rbp]
	mov	edx, DWORD PTR -296[rbp]
	sub	eax, edx
	cdqe
	mov	edx, DWORD PTR -296[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -424[rbp]
	lea	rsi, [rcx+rdx]
	mov	rdx, QWORD PTR -432[rbp]
	lea	rcx, 24[rdx]
	mov	rdx, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	eax, DWORD PTR -284[rbp]
	mov	edx, DWORD PTR -288[rbp]
	sub	eax, edx
	cdqe
	mov	edx, DWORD PTR -288[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -424[rbp]
	lea	rsi, [rcx+rdx]
	mov	rdx, QWORD PTR -432[rbp]
	lea	rcx, 32[rdx]
	mov	rdx, rax
	mov	rdi, rcx
	call	memcpy@PLT
	lea	rax, -400[rbp]
	mov	rdi, rax
	call	regfree@PLT
	mov	eax, 0
.L5:
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	parseUrl, .-parseUrl
	.section	.rodata
.LC2:
	.string	"GET %s HTTP/1.1\r\n"
.LC3:
	.string	"simple-http-client/0.1 ceba"
.LC4:
	.string	"User-Agent: %s\r\n"
.LC5:
	.string	"Host: %s\r\n"
.LC6:
	.string	"\r\n"
	.text
	.globl	genRequestHeader
	.type	genRequestHeader, @function
genRequestHeader:
.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	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	lea	rdx, 32[rax]
	mov	eax, DWORD PTR -4[rbp]
	movsx	rcx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rcx
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	lea	rdx, .LC3[rip]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -4[rbp], eax
	mov	rax, QWORD PTR -24[rbp]
	mov	edx, DWORD PTR -4[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -32[rbp]
	add	rcx, rdx
	mov	rdx, rax
	lea	rsi, .LC5[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	add	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	genRequestHeader, .-genRequestHeader
	.section	.rodata
.LC7:
	.string	"please input the url.\n"
.LC8:
	.string	"%d"
.LC9:
	.string	"Connecting to %s:%d..."
.LC10:
	.string	"Create socket failed.\n"
.LC11:
	.string	"Connect failed\n"
.LC12:
	.string	"Success."
.LC13:
	.string	"send failed"
	.align 8
.LC14:
	.string	"HTTP request sent, awaiting response..."
.LC15:
	.string	"Recv failed."
.LC16:
	.string	"\r\n\r\n"
.LC17:
	.string	"HTTP parse failed."
.LC18:
	.string	"%s %d %[^\n]"
.LC19:
	.string	"%d %s\n"
.LC20:
	.string	"index.html"
.LC21:
	.string	"save-%s"
.LC22:
	.string	"w"
.LC23:
	.string	"File \"%s\" saved.\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 304
	mov	DWORD PTR -292[rbp], edi
	mov	QWORD PTR -304[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -292[rbp], 1
	jg	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC7[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L24
.L10:
	mov	rax, QWORD PTR -304[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -208[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parseUrl
	test	eax, eax
	je	.L12
	mov	eax, -1
	jmp	.L24
.L12:
	movzx	eax, BYTE PTR -184[rbp]
	test	al, al
	je	.L13
	lea	rax, -208[rbp]
	lea	rdx, 96[rax]
	lea	rax, -208[rbp]
	add	rax, 24
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	jmp	.L14
.L13:
	mov	DWORD PTR -112[rbp], 80
.L14:
	movzx	eax, BYTE PTR -176[rbp]
	test	al, al
	jne	.L15
	mov	BYTE PTR -176[rbp], 47
.L15:
	mov	WORD PTR -224[rbp], 2
	lea	rax, -208[rbp]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -220[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -222[rbp], ax
	mov	edx, DWORD PTR -112[rbp]
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -284[rbp], eax
	cmp	DWORD PTR -284[rbp], -1
	jne	.L16
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 22
	mov	esi, 1
	lea	rdi, .LC10[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L24
.L16:
	lea	rcx, -224[rbp]
	mov	eax, DWORD PTR -284[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L17
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L24
.L17:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	edi, 500
	call	malloc@PLT
	mov	QWORD PTR -272[rbp], rax
	mov	rdx, QWORD PTR -272[rbp]
	lea	rax, -208[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	genRequestHeader
	mov	DWORD PTR -280[rbp], eax
	mov	eax, DWORD PTR -280[rbp]
	movsx	rdx, eax
	mov	rsi, QWORD PTR -272[rbp]
	mov	eax, DWORD PTR -284[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	test	rax, rax
	jns	.L18
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 11
	mov	esi, 1
	lea	rdi, .LC13[rip]
	call	fwrite@PLT
	mov	eax, 1
	jmp	.L24
.L18:
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 2000
	call	malloc@PLT
	mov	QWORD PTR -264[rbp], rax
	mov	rsi, QWORD PTR -264[rbp]
	mov	eax, DWORD PTR -284[rbp]
	mov	ecx, 0
	mov	edx, 2000
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -276[rbp], eax
	cmp	DWORD PTR -276[rbp], 0
	jns	.L19
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 12
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L24
.L19:
	mov	rax, QWORD PTR -264[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strstr@PLT
	mov	QWORD PTR -256[rbp], rax
	cmp	QWORD PTR -256[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC17[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L24
.L20:
	mov	rax, QWORD PTR -264[rbp]
	mov	QWORD PTR -248[rbp], rax
	lea	rsi, -96[rbp]
	lea	rcx, -288[rbp]
	lea	rdx, -106[rbp]
	mov	rax, QWORD PTR -248[rbp]
	mov	r8, rsi
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	mov	eax, DWORD PTR -288[rbp]
	lea	rdx, -96[rbp]
	mov	esi, eax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 4
	mov	rdi, rax
	call	puts@PLT
	mov	eax, DWORD PTR -288[rbp]
	cmp	eax, 200
	jne	.L21
	lea	rax, -208[rbp]
	add	rax, 32
	mov	esi, 47
	mov	rdi, rax
	call	strrchr@PLT
	add	rax, 1
	mov	QWORD PTR -240[rbp], rax
	mov	rax, QWORD PTR -240[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	je	.L22
	mov	rax, QWORD PTR -240[rbp]
	jmp	.L23
.L22:
	lea	rax, .LC20[rip]
.L23:
	lea	rcx, -64[rbp]
	mov	rdx, rax
	lea	rsi, .LC21[rip]
	mov	rdi, rcx
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -64[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -232[rbp], rax
	mov	rax, QWORD PTR -256[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -232[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	fputs@PLT
	lea	rax, -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L21:
	mov	rax, QWORD PTR -272[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -264[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 0
.L24:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L25
	call	__stack_chk_fail@PLT
.L25:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.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	"72014041.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"((http)://)?([0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]"
	.ascii	"{1,3})(:([0-9]{1,5}))?(\\S+)?\000"
	.align	2
.LC1:
	.ascii	"Failed to parse URL: %s\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	parseUrl
	.syntax unified
	.arm
	.fpu softvfp
	.type	parseUrl, %function
parseUrl:
	@ args = 0, pretend = 0, frame = 360
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #368
	str	r0, [fp, #-360]
	str	r1, [fp, #-364]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #352
	mov	r2, #3
	ldr	r1, .L7+4
	mov	r0, r3
	bl	regcomp
	str	r0, [fp, #-356]
	ldr	r3, [fp, #-356]
	cmp	r3, #0
	beq	.L2
	sub	r2, fp, #264
	sub	r1, fp, #352
	mov	r3, #256
	ldr	r0, [fp, #-356]
	bl	regerror
	ldr	r3, .L7+8
	ldr	r3, [r3]
	sub	r2, fp, #264
	ldr	r1, .L7+12
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L5
.L2:
	sub	r3, fp, #320
	sub	r0, fp, #352
	mov	r2, #0
	str	r2, [sp]
	mov	r2, #7
	ldr	r1, [fp, #-360]
	bl	regexec
	str	r0, [fp, #-356]
	ldr	r3, [fp, #-356]
	cmp	r3, #0
	beq	.L4
	sub	r2, fp, #264
	sub	r1, fp, #352
	mov	r3, #256
	ldr	r0, [fp, #-356]
	bl	regerror
	ldr	r3, .L7+8
	ldr	r3, [r3]
	sub	r2, fp, #264
	ldr	r1, .L7+12
	mov	r0, r3
	bl	fprintf
	mvn	r3, #0
	b	.L5
.L4:
	mov	r2, #96
	mov	r1, #0
	ldr	r0, [fp, #-364]
	bl	memset
	ldr	r3, [fp, #-364]
	add	r0, r3, #16
	ldr	r3, [fp, #-304]
	mov	r2, r3
	ldr	r3, [fp, #-360]
	add	r1, r3, r2
	ldr	r2, [fp, #-300]
	ldr	r3, [fp, #-304]
	sub	r3, r2, r3
	mov	r2, r3
	bl	memcpy
	ldr	r0, [fp, #-364]
	ldr	r3, [fp, #-296]
	mov	r2, r3
	ldr	r3, [fp, #-360]
	add	r1, r3, r2
	ldr	r2, [fp, #-292]
	ldr	r3, [fp, #-296]
	sub	r3, r2, r3
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-364]
	add	r0, r3, #24
	ldr	r3, [fp, #-280]
	mov	r2, r3
	ldr	r3, [fp, #-360]
	add	r1, r3, r2
	ldr	r2, [fp, #-276]
	ldr	r3, [fp, #-280]
	sub	r3, r2, r3
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-364]
	add	r0, r3, #32
	ldr	r3, [fp, #-272]
	mov	r2, r3
	ldr	r3, [fp, #-360]
	add	r1, r3, r2
	ldr	r2, [fp, #-268]
	ldr	r3, [fp, #-272]
	sub	r3, r2, r3
	mov	r2, r3
	bl	memcpy
	sub	r3, fp, #352
	mov	r0, r3
	bl	regfree
	mov	r3, #0
.L5:
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC2
	.word	.LC0
	.word	stderr
	.word	.LC1
	.size	parseUrl, .-parseUrl
	.section	.rodata
	.align	2
.LC3:
	.ascii	"GET %s HTTP/1.1\015\012\000"
	.align	2
.LC4:
	.ascii	"simple-http-client/0.1 ceba\000"
	.align	2
.LC5:
	.ascii	"User-Agent: %s\015\012\000"
	.align	2
.LC6:
	.ascii	"Host: %s\015\012\000"
	.align	2
.LC7:
	.ascii	"\015\012\000"
	.text
	.align	2
	.global	genRequestHeader
	.syntax unified
	.arm
	.fpu softvfp
	.type	genRequestHeader, %function
genRequestHeader:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r0, r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #32
	mov	r2, r3
	ldr	r1, .L11
	bl	sprintf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, .L11+4
	ldr	r1, .L11+8
	mov	r0, r3
	bl	sprintf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	ldr	r1, .L11+12
	mov	r0, r3
	bl	sprintf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	ldr	r1, .L11+16
	mov	r0, r3
	bl	sprintf
	mov	r2, r0
	ldr	r3, [fp, #-8]
	add	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	genRequestHeader, .-genRequestHeader
	.section	.rodata
	.align	2
.LC8:
	.ascii	"please input the url.\012\000"
	.align	2
.LC9:
	.ascii	"%d\000"
	.align	2
.LC10:
	.ascii	"Connecting to %s:%d...\000"
	.align	2
.LC11:
	.ascii	"Create socket failed.\012\000"
	.align	2
.LC12:
	.ascii	"Connect failed\012\000"
	.align	2
.LC13:
	.ascii	"Success.\000"
	.align	2
.LC14:
	.ascii	"send failed\000"
	.align	2
.LC15:
	.ascii	"HTTP request sent, awaiting response...\000"
	.align	2
.LC16:
	.ascii	"Recv failed.\000"
	.align	2
.LC17:
	.ascii	"\015\012\015\012\000"
	.align	2
.LC18:
	.ascii	"HTTP parse failed.\000"
	.align	2
.LC19:
	.ascii	"%s %d %[^\012]\000"
	.align	2
.LC20:
	.ascii	"%d %s\012\000"
	.align	2
.LC21:
	.ascii	"index.html\000"
	.align	2
.LC22:
	.ascii	"save-%s\000"
	.align	2
.LC23:
	.ascii	"w\000"
	.align	2
.LC24:
	.ascii	"File \"%s\" saved.\012\000"
	.align	2
.LC25:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 264
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	str	r0, [fp, #-264]
	str	r1, [fp, #-268]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-264]
	cmp	r3, #1
	bgt	.L14
	ldr	r3, .L30+4
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L30+8
	bl	fwrite
	mvn	r3, #0
	b	.L28
.L14:
	ldr	r3, [fp, #-268]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #204
	mov	r1, r2
	mov	r0, r3
	bl	parseUrl
	mov	r3, r0
	cmp	r3, #0
	beq	.L16
	mvn	r3, #0
	b	.L28
.L16:
	ldrb	r3, [fp, #-180]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L17
	sub	r3, fp, #204
	add	r2, r3, #96
	sub	r3, fp, #204
	add	r3, r3, #24
	ldr	r1, .L30+12
	mov	r0, r3
	bl	__isoc99_sscanf
	b	.L18
.L17:
	mov	r3, #80
	str	r3, [fp, #-108]
.L18:
	ldrb	r3, [fp, #-172]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L19
	mov	r3, #47
	strb	r3, [fp, #-172]
.L19:
	mov	r3, #2
	strh	r3, [fp, #-220]	@ movhi
	sub	r3, fp, #204
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-216]
	ldr	r3, [fp, #-108]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-218]	@ movhi
	ldr	r2, [fp, #-108]
	sub	r3, fp, #204
	mov	r1, r3
	ldr	r0, .L30+16
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-256]
	ldr	r3, [fp, #-256]
	cmn	r3, #1
	bne	.L20
	ldr	r3, .L30+4
	ldr	r3, [r3]
	mov	r2, #22
	mov	r1, #1
	ldr	r0, .L30+20
	bl	fwrite
	mvn	r3, #0
	b	.L28
.L20:
	sub	r3, fp, #220
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-256]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L30+24
	bl	perror
	mvn	r3, #0
	b	.L28
.L21:
	ldr	r0, .L30+28
	bl	puts
	mov	r0, #500
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-252]
	sub	r3, fp, #204
	ldr	r1, [fp, #-252]
	mov	r0, r3
	bl	genRequestHeader
	str	r0, [fp, #-248]
	ldr	r2, [fp, #-248]
	mov	r3, #0
	ldr	r1, [fp, #-252]
	ldr	r0, [fp, #-256]
	bl	send
	mov	r3, r0
	cmp	r3, #0
	bge	.L22
	ldr	r3, .L30+4
	ldr	r3, [r3]
	mov	r2, #11
	mov	r1, #1
	ldr	r0, .L30+32
	bl	fwrite
	mov	r3, #1
	b	.L28
.L22:
	ldr	r0, .L30+36
	bl	printf
	mov	r0, #2000
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-244]
	mov	r3, #0
	mov	r2, #2000
	ldr	r1, [fp, #-244]
	ldr	r0, [fp, #-256]
	bl	recv
	str	r0, [fp, #-240]
	ldr	r3, [fp, #-240]
	cmp	r3, #0
	bge	.L23
	ldr	r3, .L30+4
	ldr	r3, [r3]
	mov	r2, #12
	mov	r1, #1
	ldr	r0, .L30+40
	bl	fwrite
	mvn	r3, #0
	b	.L28
.L23:
	ldr	r1, .L30+44
	ldr	r0, [fp, #-244]
	bl	strstr
	str	r0, [fp, #-236]
	ldr	r3, [fp, #-236]
	cmp	r3, #0
	bne	.L24
	ldr	r3, .L30+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L30+48
	bl	fwrite
	mvn	r3, #0
	b	.L28
.L24:
	ldr	r3, [fp, #-244]
	str	r3, [fp, #-232]
	sub	r1, fp, #260
	sub	r2, fp, #104
	sub	r3, fp, #92
	str	r3, [sp]
	mov	r3, r1
	ldr	r1, .L30+52
	ldr	r0, [fp, #-232]
	bl	__isoc99_sscanf
	ldr	r3, [fp, #-260]
	sub	r2, fp, #92
	mov	r1, r3
	ldr	r0, .L30+56
	bl	printf
	ldr	r3, [fp, #-236]
	add	r3, r3, #4
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-260]
	cmp	r3, #200
	bne	.L25
	sub	r3, fp, #204
	add	r3, r3, #32
	mov	r1, #47
	mov	r0, r3
	bl	strrchr
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-228]
	ldr	r3, [fp, #-228]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L26
	ldr	r3, [fp, #-228]
	b	.L27
.L26:
	ldr	r3, .L30+60
.L27:
	sub	r0, fp, #60
	mov	r2, r3
	ldr	r1, .L30+64
	bl	sprintf
	sub	r3, fp, #60
	ldr	r1, .L30+68
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-224]
	ldr	r3, [fp, #-236]
	add	r3, r3, #4
	ldr	r1, [fp, #-224]
	mov	r0, r3
	bl	fputs
	sub	r3, fp, #60
	mov	r1, r3
	ldr	r0, .L30+72
	bl	printf
	ldr	r0, [fp, #-224]
	bl	fclose
.L25:
	ldr	r0, [fp, #-252]
	bl	free
	ldr	r0, [fp, #-244]
	bl	free
	mov	r3, #0
.L28:
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC25
	.word	stderr
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
