	.file	"816581.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"socket"
.LC1:
	.string	"Could not reopen socket"
.LC2:
	.string	"bind"
	.text
	.globl	create_server_socket
	.type	create_server_socket, @function
create_server_socket:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	WORD PTR -32[rbp], 2
	mov	DWORD PTR -28[rbp], 0
	mov	eax, DWORD PTR -52[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	DWORD PTR -40[rbp], 1
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	create_server_socket, .-create_server_socket
	.section	.rodata
.LC3:
	.string	"listen"
.LC4:
	.string	"accept"
.LC5:
	.string	"read"
.LC6:
	.string	"username msg ----- %s"
.LC7:
	.string	"req1 msg----- %s"
.LC8:
	.string	"%ld\n"
.LC9:
	.string	"rep1 msg ---- %s"
.LC10:
	.string	"send req1"
.LC11:
	.string	"req2 msg----- %s"
.LC12:
	.string	"OK"
.LC13:
	.string	"%s\n"
.LC14:
	.string	"NO"
.LC15:
	.string	"status msg ---- %s"
.LC16:
	.string	"send req2"
	.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
	push	rbx
	sub	rsp, 1112
	.cfi_offset 3, -24
	mov	DWORD PTR -1108[rbp], edi
	mov	QWORD PTR -1120[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -1088[rbp], 15
	mov	QWORD PTR -1080[rbp], 97
	mov	QWORD PTR -1072[rbp], 23
	mov	DWORD PTR -1104[rbp], 7800
	mov	eax, DWORD PTR -1104[rbp]
	mov	edi, eax
	call	create_server_socket
	mov	DWORD PTR -1100[rbp], eax
	mov	eax, DWORD PTR -1100[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L8
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -1100[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1096[rbp], eax
	cmp	DWORD PTR -1096[rbp], 0
	jns	.L9
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	lea	rax, -1056[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jg	.L10
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1056[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jg	.L11
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1056[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -1072[rbp]
	pxor	xmm2, xmm2
	cvtsi2sd	xmm2, QWORD PTR -1088[rbp]
	movq	rax, xmm2
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	cvttsd2si	rax, xmm0
	cqo
	idiv	QWORD PTR -1080[rbp]
	mov	QWORD PTR -1064[rbp], rdx
	mov	rdx, QWORD PTR -1064[rbp]
	lea	rax, -1056[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1056[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L12
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L12:
	lea	rax, -1056[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jg	.L13
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1056[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1092[rbp], eax
	lea	rax, -1056[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -1092[rbp]
	movsx	rbx, eax
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR -1072[rbp]
	pxor	xmm3, xmm3
	cvtsi2sd	xmm3, DWORD PTR -1092[rbp]
	movq	rax, xmm3
	movapd	xmm1, xmm0
	movq	xmm0, rax
	call	pow@PLT
	cvttsd2si	rax, xmm0
	cqo
	idiv	QWORD PTR -1080[rbp]
	mov	rax, rdx
	cmp	rbx, rax
	jne	.L14
	lea	rax, -1056[rbp]
	lea	rdx, .LC12[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	jmp	.L15
.L14:
	lea	rax, -1056[rbp]
	lea	rdx, .LC14[rip]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
.L15:
	lea	rax, -1056[rbp]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -1056[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -1096[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	test	rax, rax
	jg	.L16
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L16:
	mov	eax, 0
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"816581.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket\000"
	.align	2
.LC1:
	.ascii	"Could not reopen socket\000"
	.align	2
.LC2:
	.ascii	"bind\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	create_server_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_server_socket, %function
create_server_socket:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L7+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #1
	str	r3, [fp, #-32]
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-28]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L7+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L7+12
	bl	perror
	mov	r0, #1
	bl	exit
.L4:
	ldr	r3, [fp, #-28]
	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	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	create_server_socket, .-create_server_socket
	.section	.rodata
	.align	2
.LC4:
	.ascii	"listen\000"
	.align	2
.LC5:
	.ascii	"accept\000"
	.align	2
.LC6:
	.ascii	"read\000"
	.align	2
.LC7:
	.ascii	"username msg ----- %s\000"
	.align	2
.LC8:
	.ascii	"req1 msg----- %s\000"
	.global	__aeabi_i2d
	.global	__aeabi_d2iz
	.global	__aeabi_idivmod
	.align	2
.LC9:
	.ascii	"%ld\012\000"
	.align	2
.LC10:
	.ascii	"rep1 msg ---- %s\000"
	.align	2
.LC11:
	.ascii	"send req1\000"
	.align	2
.LC12:
	.ascii	"req2 msg----- %s\000"
	.align	2
.LC13:
	.ascii	"OK\000"
	.align	2
.LC14:
	.ascii	"%s\012\000"
	.align	2
.LC15:
	.ascii	"NO\000"
	.align	2
.LC16:
	.ascii	"status msg ---- %s\000"
	.align	2
.LC17:
	.ascii	"send req2\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #1072
	str	r0, [fp, #-1080]
	str	r1, [fp, #-1084]
	ldr	r3, .L21
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #15
	str	r3, [fp, #-1072]
	mov	r3, #97
	str	r3, [fp, #-1068]
	mov	r3, #23
	str	r3, [fp, #-1064]
	ldr	r3, .L21+4
	str	r3, [fp, #-1060]
	ldr	r0, [fp, #-1060]
	bl	create_server_socket
	str	r0, [fp, #-1056]
	mov	r1, #5
	ldr	r0, [fp, #-1056]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	ldr	r0, .L21+8
	bl	perror
	mov	r0, #1
	bl	exit
.L10:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-1056]
	bl	accept
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1052]
	cmp	r3, #0
	bge	.L11
	ldr	r0, .L21+12
	bl	perror
	mov	r0, #1
	bl	exit
.L11:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1052]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bgt	.L12
	ldr	r0, .L21+16
	bl	perror
	mov	r0, #1
	bl	exit
.L12:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+20
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1052]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bgt	.L13
	ldr	r0, .L21+16
	bl	perror
	mov	r0, #1
	bl	exit
.L13:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+24
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, [fp, #-1072]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-1064]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	pow
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	ldr	r1, [fp, #-1068]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	str	r3, [fp, #-1048]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-1048]
	ldr	r1, .L21+28
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+32
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1052]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L14
	ldr	r0, .L21+36
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1052]
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bgt	.L15
	ldr	r0, .L21+16
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+40
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1044]
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r0, [fp, #-1044]
	bl	__aeabi_i2d
	mov	r4, r0
	mov	r5, r1
	ldr	r0, [fp, #-1064]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	mov	r0, r4
	mov	r1, r5
	bl	pow
	mov	r2, r0
	mov	r3, r1
	mov	r0, r2
	mov	r1, r3
	bl	__aeabi_d2iz
	mov	r3, r0
	ldr	r1, [fp, #-1068]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-1044]
	cmp	r3, r2
	bne	.L16
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, .L21+44
	ldr	r1, .L21+48
	mov	r0, r3
	bl	sprintf
	b	.L17
.L16:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, .L21+52
	ldr	r1, .L21+48
	mov	r0, r3
	bl	sprintf
.L17:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L21+56
	bl	printf
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1052]
	bl	write
	mov	r3, r0
	cmp	r3, #0
	bgt	.L18
	ldr	r0, .L21+60
	bl	perror
	mov	r0, #1
	bl	exit
.L18:
	mov	r3, #0
	ldr	r2, .L21
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L20
	bl	__stack_chk_fail
.L20:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L22:
	.align	2
.L21:
	.word	.LC18
	.word	7800
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
