	.file	"821191.c"
	.intel_syntax noprefix
	.text
	.globl	header
	.section	.rodata
	.align 8
.LC0:
	.string	"HTTP/1.1 200 OK\r\nDate: Fri, 31 Dec 1999 23:59:59 GMT\r\nServer: osi/1.0.2 (linux)\r\nContent-Length: %d\r\nLast-Modified: Sat, 20 Nov 2004 07:16:26 GMT\r\nAccept-Ranges: bytes\r\nContent-Type: application/json\r\nConnection: close\r\n\r\n"
	.section	.data.rel.local,"aw"
	.align 8
	.type	header, @object
	.size	header, 8
header:
	.quad	.LC0
	.section	.rodata
	.align 8
.LC1:
	.string	"{\"msg\":\"Error querying sysinfo\"}"
	.align 8
.LC3:
	.string	"{\"uptime\":%ld,\"totalram\":%ld,\"freeram\":%ld,\"totalswap\":%ld,\"freeswap\":%ld,\"loads\":[%f, %f, %f]}"
	.text
	.globl	web
	.type	web, @function
web:
.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, 928
	mov	DWORD PTR -916[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -896[rbp]
	mov	rdi, rax
	call	sysinfo@PLT
	mov	DWORD PTR -900[rbp], eax
	cmp	DWORD PTR -900[rbp], 0
	je	.L2
	lea	rax, -528[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -872[rbp]
	test	rax, rax
	js	.L4
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rax
	jmp	.L5
.L4:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rdx
	addss	xmm0, xmm0
.L5:
	movss	xmm1, DWORD PTR .LC2[rip]
	divss	xmm0, xmm1
	pxor	xmm2, xmm2
	cvtss2sd	xmm2, xmm0
	mov	rax, QWORD PTR -880[rbp]
	test	rax, rax
	js	.L6
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rax
	jmp	.L7
.L6:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rdx
	addss	xmm0, xmm0
.L7:
	movss	xmm1, DWORD PTR .LC2[rip]
	divss	xmm0, xmm1
	pxor	xmm3, xmm3
	cvtss2sd	xmm3, xmm0
	mov	rax, QWORD PTR -888[rbp]
	test	rax, rax
	js	.L8
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rax
	jmp	.L9
.L8:
	mov	rdx, rax
	shr	rdx
	and	eax, 1
	or	rdx, rax
	pxor	xmm0, xmm0
	cvtsi2ss	xmm0, rdx
	addss	xmm0, xmm0
.L9:
	movss	xmm1, DWORD PTR .LC2[rip]
	divss	xmm0, xmm1
	pxor	xmm4, xmm4
	cvtss2sd	xmm4, xmm0
	movq	rsi, xmm4
	mov	rdi, QWORD PTR -824[rbp]
	mov	r9, QWORD PTR -832[rbp]
	mov	r8, QWORD PTR -856[rbp]
	mov	rcx, QWORD PTR -864[rbp]
	mov	rdx, QWORD PTR -896[rbp]
	lea	rax, -528[rbp]
	sub	rsp, 8
	push	rdi
	movapd	xmm1, xmm3
	movq	xmm0, rsi
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 3
	call	sprintf@PLT
	add	rsp, 16
.L3:
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR header[rip]
	lea	rax, -784[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -784[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -784[rbp]
	mov	eax, DWORD PTR -916[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rax, -528[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -528[rbp]
	mov	eax, DWORD PTR -916[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edi, 1
	call	sleep@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	web, .-web
	.section	.rodata
.LC4:
	.string	"please give a port :)"
.LC5:
	.string	"socket create error"
.LC6:
	.string	"set reuseaddr failed"
.LC7:
	.string	"invalid port :("
.LC8:
	.string	"*"
.LC9:
	.string	"Listening on %s:%d\n"
.LC10:
	.string	"bind error"
.LC11:
	.string	"listen error"
	.align 8
.LC12:
	.string	"ohnx's system information HTTP server v1.0.2"
.LC13:
	.string	"accept error"
.LC14:
	.string	"request from: %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 80
	mov	DWORD PTR -68[rbp], edi
	mov	QWORD PTR -80[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -52[rbp], 1
	cmp	DWORD PTR -68[rbp], 1
	jg	.L12
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L26
.L12:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -44[rbp], eax
	cmp	DWORD PTR -44[rbp], 0
	jns	.L14
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L26
.L14:
	lea	rdx, -52[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L15
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L26
.L15:
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	js	.L16
	cmp	DWORD PTR -40[rbp], 65535
	jle	.L17
.L16:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L26
.L17:
	cmp	DWORD PTR -68[rbp], 2
	jle	.L18
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR 16[rax]
	jmp	.L19
.L18:
	lea	rax, .LC8[rip]
.L19:
	mov	edx, DWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	WORD PTR serv_addr.1[rip], 2
	cmp	DWORD PTR -68[rbp], 2
	jle	.L20
	mov	rax, QWORD PTR -80[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inet_addr@PLT
	jmp	.L21
.L20:
	mov	edi, 0
	call	htonl@PLT
.L21:
	mov	DWORD PTR serv_addr.1[rip+4], eax
	mov	eax, DWORD PTR -40[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR serv_addr.1[rip+2], ax
	mov	eax, DWORD PTR -44[rbp]
	mov	edx, 16
	lea	rsi, serv_addr.1[rip]
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L22
	lea	rdi, .LC10[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L26
.L22:
	mov	eax, DWORD PTR -44[rbp]
	mov	esi, 64
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L23
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L26
.L23:
	mov	rax, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
.L25:
	mov	DWORD PTR -48[rbp], 16
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -44[rbp]
	lea	rsi, cli_addr.0[rip]
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L24
	lea	rdi, .LC13[rip]
	call	puts@PLT
.L24:
	lea	rax, -32[rbp]
	mov	ecx, 16
	mov	rdx, rax
	lea	rsi, cli_addr.0[rip+4]
	mov	edi, 2
	call	inet_ntop@PLT
	lea	rax, -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	web
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L25
.L26:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	serv_addr.1
	.comm	serv_addr.1,16,16
	.local	cli_addr.0
	.comm	cli_addr.0,16,16
	.section	.rodata
	.align 4
.LC2:
	.long	1199570944
	.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	"821191.c"
	.text
	.global	header
	.section	.rodata
	.align	2
.LC0:
	.ascii	"HTTP/1.1 200 OK\015\012Date: Fri, 31 Dec 1999 23:59"
	.ascii	":59 GMT\015\012Server: osi/1.0.2 (linux)\015\012Con"
	.ascii	"tent-Length: %d\015\012Last-Modified: Sat, 20 Nov 2"
	.ascii	"004 07:16:26 GMT\015\012Accept-Ranges: bytes\015\012"
	.ascii	"Content-Type: application/json\015\012Connection: c"
	.ascii	"lose\015\012\015\012\000"
	.data
	.align	2
	.type	header, %object
	.size	header, 4
header:
	.word	.LC0
	.section	.rodata
	.align	2
.LC1:
	.ascii	"{\"msg\":\"Error querying sysinfo\"}\000"
	.global	__aeabi_ui2f
	.global	__aeabi_fdiv
	.global	__aeabi_f2d
	.align	2
.LC2:
	.ascii	"{\"uptime\":%ld,\"totalram\":%ld,\"freeram\":%ld,\""
	.ascii	"totalswap\":%ld,\"freeswap\":%ld,\"loads\":[%f, %f,"
	.ascii	" %f]}\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	web
	.syntax unified
	.arm
	.fpu softvfp
	.type	web, %function
web:
	@ args = 0, pretend = 0, frame = 856
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #900
	str	r0, [fp, #-880]
	ldr	r3, .L5
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	sub	r3, fp, #872
	mov	r0, r3
	bl	sysinfo
	str	r0, [fp, #-876]
	ldr	r3, [fp, #-876]
	cmp	r3, #0
	beq	.L2
	sub	r3, fp, #552
	ldr	r1, .L5+4
	mov	r0, r3
	bl	sprintf
	b	.L3
.L2:
	ldr	r3, [fp, #-872]
	str	r3, [fp, #-884]
	ldr	r1, [fp, #-856]
	str	r1, [fp, #-888]
	ldr	r8, [fp, #-852]
	ldr	r9, [fp, #-840]
	ldr	r10, [fp, #-836]
	ldr	r3, [fp, #-868]
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	ldr	r1, .L5+8
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r4, r0
	mov	r5, r1
	ldr	r3, [fp, #-864]
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	ldr	r1, .L5+8
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r6, r0
	mov	r7, r1
	ldr	r3, [fp, #-860]
	mov	r0, r3
	bl	__aeabi_ui2f
	mov	r3, r0
	ldr	r1, .L5+8
	mov	r0, r3
	bl	__aeabi_fdiv
	mov	r3, r0
	mov	r0, r3
	bl	__aeabi_f2d
	mov	r2, r0
	mov	r3, r1
	sub	r0, fp, #552
	str	r2, [sp, #32]
	str	r3, [sp, #36]
	str	r6, [sp, #24]
	str	r7, [sp, #28]
	str	r4, [sp, #16]
	str	r5, [sp, #20]
	str	r10, [sp, #8]
	str	r9, [sp, #4]
	str	r8, [sp]
	ldr	r3, [fp, #-888]
	ldr	r2, [fp, #-884]
	ldr	r1, .L5+12
	bl	sprintf
.L3:
	ldr	r3, .L5+16
	ldr	r4, [r3]
	sub	r3, fp, #552
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #808
	mov	r1, r4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #808
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #808
	mov	r1, r3
	ldr	r0, [fp, #-880]
	bl	write
	sub	r3, fp, #552
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #552
	mov	r1, r3
	ldr	r0, [fp, #-880]
	bl	write
	mov	r0, #1
	bl	sleep
	nop
	ldr	r3, .L5
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	.align	2
.L5:
	.word	.LC3
	.word	.LC1
	.word	1199570944
	.word	.LC2
	.word	header
	.size	web, .-web
	.section	.rodata
	.align	2
.LC4:
	.ascii	"please give a port :)\000"
	.align	2
.LC5:
	.ascii	"socket create error\000"
	.align	2
.LC6:
	.ascii	"set reuseaddr failed\000"
	.align	2
.LC7:
	.ascii	"invalid port :(\000"
	.align	2
.LC8:
	.ascii	"*\000"
	.align	2
.LC9:
	.ascii	"Listening on %s:%d\012\000"
	.align	2
.LC10:
	.ascii	"bind error\000"
	.align	2
.LC11:
	.ascii	"listen error\000"
	.align	2
.LC12:
	.ascii	"ohnx's system information HTTP server v1.0.2\000"
	.align	2
.LC13:
	.ascii	"accept error\000"
	.align	2
.LC14:
	.ascii	"request from: %s\012\000"
	.align	2
.LC15:
	.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, #56
	str	r0, [fp, #-48]
	str	r1, [fp, #-52]
	ldr	r3, .L24
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-44]
	ldr	r3, [fp, #-48]
	cmp	r3, #1
	bgt	.L8
	ldr	r0, .L24+4
	bl	puts
	mvn	r3, #0
	b	.L22
.L8:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L24+8
	bl	puts
	mvn	r3, #0
	b	.L22
.L10:
	sub	r3, fp, #44
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-36]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L24+12
	bl	printf
	mvn	r3, #0
	b	.L22
.L11:
	ldr	r3, [fp, #-52]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	blt	.L12
	ldr	r3, [fp, #-32]
	cmp	r3, #65536
	blt	.L13
.L12:
	ldr	r0, .L24+16
	bl	puts
	mvn	r3, #0
	b	.L22
.L13:
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	ble	.L14
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #8]
	b	.L15
.L14:
	ldr	r3, .L24+20
.L15:
	ldr	r2, [fp, #-32]
	mov	r1, r3
	ldr	r0, .L24+24
	bl	printf
	ldr	r3, .L24+28
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-48]
	cmp	r3, #2
	ble	.L16
	ldr	r3, [fp, #-52]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	b	.L17
.L16:
	mov	r0, #0
	bl	htonl
	mov	r3, r0
.L17:
	ldr	r2, .L24+28
	str	r3, [r2, #4]
	ldr	r3, [fp, #-32]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L24+28
	strh	r2, [r3, #2]	@ movhi
	mov	r2, #16
	ldr	r1, .L24+28
	ldr	r0, [fp, #-36]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L24+32
	bl	puts
	mvn	r3, #0
	b	.L22
.L18:
	mov	r1, #64
	ldr	r0, [fp, #-36]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L19
	ldr	r0, .L24+36
	bl	puts
	mvn	r3, #0
	b	.L22
.L19:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	ldr	r1, .L24+40
	mov	r0, r3
	bl	sprintf
.L21:
	mov	r3, #16
	str	r3, [fp, #-40]
	sub	r3, fp, #40
	mov	r2, r3
	ldr	r1, .L24+44
	ldr	r0, [fp, #-36]
	bl	accept
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L24+48
	bl	puts
.L20:
	sub	r2, fp, #24
	mov	r3, #16
	ldr	r1, .L24+52
	mov	r0, #2
	bl	inet_ntop
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, .L24+56
	bl	printf
	ldr	r0, [fp, #-28]
	bl	web
	ldr	r0, [fp, #-28]
	bl	close
	b	.L21
.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	.LC15
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	serv_addr.6738
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	cli_addr.6737
	.word	.LC13
	.word	cli_addr.6737+4
	.word	.LC14
	.size	main, .-main
	.local	serv_addr.6738
	.comm	serv_addr.6738,16,4
	.local	cli_addr.6737
	.comm	cli_addr.6737,16,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
