	.file	"976189.c"
	.intel_syntax noprefix
	.text
	.globl	SocketFD
	.bss
	.align 4
	.type	SocketFD, @object
	.size	SocketFD, 4
SocketFD:
	.zero	4
	.section	.rodata
.LC0:
	.string	"too much data!"
.LC1:
	.string	"error in get_all_buf!"
	.text
	.globl	get_all_buf
	.type	get_all_buf, @function
get_all_buf:
.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	DWORD PTR -1064[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -1052[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	esi, 21531
	mov	edi, eax
	mov	eax, 0
	call	ioctl@PLT
	test	eax, eax
	je	.L2
	mov	eax, 0
	jmp	.L9
.L2:
	mov	eax, DWORD PTR -1052[rbp]
	test	eax, eax
	jne	.L4
	mov	eax, 0
	jmp	.L9
.L4:
	mov	DWORD PTR -1048[rbp], 0
	jmp	.L5
.L7:
	cmp	DWORD PTR -1044[rbp], 0
	jle	.L5
	mov	edx, DWORD PTR -1044[rbp]
	mov	eax, DWORD PTR -1048[rbp]
	add	eax, edx
	cmp	DWORD PTR -1064[rbp], eax
	jnb	.L6
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -1044[rbp]
	movsx	rdx, eax
	mov	ecx, DWORD PTR -1048[rbp]
	mov	rax, QWORD PTR -1072[rbp]
	add	rcx, rax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	eax, DWORD PTR -1044[rbp]
	add	DWORD PTR -1048[rbp], eax
.L5:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	jg	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L7
	cmp	DWORD PTR -1044[rbp], 0
	jns	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	je	.L8
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	je	.L8
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC1[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -1048[rbp]
.L9:
	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	get_all_buf, .-get_all_buf
	.globl	done
	.bss
	.align 4
	.type	done, @object
	.size	done, 4
done:
	.zero	4
	.section	.rodata
.LC2:
	.string	"read! %d\n"
.LC3:
	.string	"%x\n"
.LC4:
	.string	"sum: %d\n"
	.text
	.globl	iter
	.type	iter, @function
iter:
.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	edx, DWORD PTR pos.1[rip]
	mov	eax, 1024
	sub	eax, edx
	mov	edx, eax
	mov	eax, DWORD PTR pos.1[rip]
	cdqe
	lea	rcx, out.0[rip]
	add	rcx, rax
	mov	eax, DWORD PTR SocketFD[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	get_all_buf
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L12
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
.L12:
	mov	edx, DWORD PTR pos.1[rip]
	mov	eax, DWORD PTR -4[rbp]
	add	eax, edx
	mov	DWORD PTR pos.1[rip], eax
	mov	eax, DWORD PTR pos.1[rip]
	cmp	eax, 27
	jle	.L16
	mov	DWORD PTR -8[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	jmp	.L14
.L15:
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, out.0[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -12[rbp]
	cdqe
	lea	rdx, out.0[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	add	DWORD PTR -8[rbp], eax
	add	DWORD PTR -12[rbp], 1
.L14:
	mov	eax, DWORD PTR pos.1[rip]
	cmp	DWORD PTR -12[rbp], eax
	jl	.L15
	mov	eax, DWORD PTR SocketFD[rip]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	eax, DWORD PTR SocketFD[rip]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR done[rip], 1
	mov	eax, DWORD PTR -8[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	call	emscripten_cancel_main_loop@PLT
.L16:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	iter, .-iter
	.section	.rodata
.LC5:
	.string	"hello from main page"
.LC6:
	.string	"cannot create socket"
.LC7:
	.string	"127.0.0.1"
	.align 8
.LC8:
	.string	"error: first parameter is not a valid address family"
	.align 8
.LC9:
	.string	"char string (second parameter does not contain valid ipaddress)"
.LC10:
	.string	"connect failed"
	.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, 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR SocketFD[rip], eax
	mov	eax, DWORD PTR SocketFD[rip]
	cmp	eax, -1
	jne	.L18
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	edi, 8992
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rax, -32[rbp]
	add	rax, 4
	mov	rdx, rax
	lea	rsi, .LC7[rip]
	mov	edi, 2
	call	inet_pton@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L19
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	eax, DWORD PTR SocketFD[rip]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	cmp	DWORD PTR -36[rbp], 0
	jne	.L20
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, DWORD PTR SocketFD[rip]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	mov	eax, DWORD PTR SocketFD[rip]
	lea	rcx, -32[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L22
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, DWORD PTR SocketFD[rip]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	edi, 0
	call	iter
.L22:
	mov	eax, DWORD PTR done[rip]
	test	eax, eax
	je	.L23
	mov	eax, 0
	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
	.local	pos.1
	.comm	pos.1,4,4
	.local	out.0
	.comm	out.0,2048,32
	.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	"976189.c"
	.text
	.comm	SocketFD,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"too much data!\000"
	.align	2
.LC1:
	.ascii	"error in get_all_buf!\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_all_buf
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_all_buf, %function
get_all_buf:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	str	r2, [fp, #-1056]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1040
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L11+4
	ldr	r0, [fp, #-1048]
	bl	ioctl
	mov	r3, r0
	cmp	r3, #0
	beq	.L2
	mov	r3, #0
	b	.L9
.L2:
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bne	.L4
	mov	r3, #0
	b	.L9
.L4:
	mov	r3, #0
	str	r3, [fp, #-1040]
	b	.L5
.L7:
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	ble	.L5
	ldr	r2, [fp, #-1036]
	ldr	r3, [fp, #-1040]
	add	r3, r2, r3
	ldr	r2, [fp, #-1056]
	cmp	r2, r3
	bcs	.L6
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L11+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L6:
	ldr	r2, [fp, #-1052]
	ldr	r3, [fp, #-1040]
	add	r0, r2, r3
	ldr	r2, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	bl	memcpy
	ldr	r3, [fp, #-1036]
	ldr	r2, [fp, #-1040]
	add	r3, r2, r3
	str	r3, [fp, #-1040]
.L5:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1048]
	bl	recv
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bgt	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L7
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bge	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	beq	.L8
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	beq	.L8
	ldr	r3, .L11+8
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L11+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-1040]
.L9:
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC2
	.word	21531
	.word	stderr
	.word	.LC0
	.word	.LC1
	.size	get_all_buf, .-get_all_buf
	.global	done
	.bss
	.align	2
	.type	done, %object
	.size	done, 4
done:
	.space	4
	.section	.rodata
	.align	2
.LC3:
	.ascii	"read! %d\012\000"
	.align	2
.LC4:
	.ascii	"%x\012\000"
	.align	2
.LC5:
	.ascii	"sum: %d\012\000"
	.text
	.align	2
	.global	iter
	.syntax unified
	.arm
	.fpu softvfp
	.type	iter, %function
iter:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	ldr	r3, .L19
	ldr	r0, [r3]
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r3, .L19+8
	add	r1, r2, r3
	ldr	r3, .L19+4
	ldr	r3, [r3]
	rsb	r3, r3, #1024
	mov	r2, r3
	bl	get_all_buf
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L14
	ldr	r1, [fp, #-8]
	ldr	r0, .L19+12
	bl	printf
.L14:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r2, r3
	ldr	r2, .L19+4
	str	r3, [r2]
	ldr	r3, .L19+4
	ldr	r3, [r3]
	cmp	r3, #27
	ble	.L18
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	b	.L16
.L17:
	ldr	r2, .L19+8
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L19+16
	bl	printf
	ldr	r2, .L19+8
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r2, r3
	ldr	r3, [fp, #-12]
	add	r3, r3, r2
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
.L16:
	ldr	r3, .L19+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	blt	.L17
	ldr	r3, .L19
	ldr	r3, [r3]
	mov	r1, #2
	mov	r0, r3
	bl	shutdown
	ldr	r3, .L19
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	ldr	r3, .L19+20
	mov	r2, #1
	str	r2, [r3]
	ldr	r1, [fp, #-12]
	ldr	r0, .L19+24
	bl	printf
	bl	emscripten_cancel_main_loop
.L18:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	SocketFD
	.word	pos.6320
	.word	out.6319
	.word	.LC3
	.word	.LC4
	.word	done
	.word	.LC5
	.size	iter, .-iter
	.section	.rodata
	.align	2
.LC6:
	.ascii	"hello from main page\000"
	.align	2
.LC7:
	.ascii	"cannot create socket\000"
	.align	2
.LC8:
	.ascii	"127.0.0.1\000"
	.align	2
.LC9:
	.ascii	"error: first parameter is not a valid address famil"
	.ascii	"y\000"
	.align	2
.LC10:
	.ascii	"char string (second parameter does not contain vali"
	.ascii	"d ipaddress)\000"
	.align	2
.LC11:
	.ascii	"connect failed\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 = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, .L30+4
	bl	puts
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	mov	r3, r0
	ldr	r2, .L30+8
	str	r3, [r2]
	ldr	r3, .L30+8
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L22
	ldr	r0, .L30+12
	bl	perror
	mov	r0, #1
	bl	exit
.L22:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r0, .L30+16
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L30+20
	mov	r0, #2
	bl	inet_pton
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L23
	ldr	r0, .L30+24
	bl	perror
	ldr	r3, .L30+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L24
	ldr	r0, .L30+28
	bl	perror
	ldr	r3, .L30+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r0, #1
	bl	exit
.L24:
	ldr	r3, .L30+8
	ldr	r3, [r3]
	sub	r1, fp, #24
	mov	r2, #16
	mov	r0, r3
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L26
	ldr	r0, .L30+32
	bl	perror
	ldr	r3, .L30+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	close
	mov	r0, #1
	bl	exit
.L27:
	mov	r0, #0
	bl	iter
.L26:
	ldr	r3, .L30+36
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L27
	mov	r3, #0
	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	.LC12
	.word	.LC6
	.word	SocketFD
	.word	.LC7
	.word	8992
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	done
	.size	main, .-main
	.local	pos.6320
	.comm	pos.6320,4,4
	.local	out.6319
	.comm	out.6319,2048,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
