	.file	"629853.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Accepting connections ..."
.LC1:
	.string	"received from %s at PORT %d\n"
	.text
	.globl	socketServer
	.type	socketServer, @function
socketServer:
.LFB6:
	.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, 184
	.cfi_offset 3, -24
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -172[rbp], eax
	lea	rax, -160[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -160[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -156[rbp], eax
	mov	edi, 8000
	call	htons@PLT
	mov	WORD PTR -158[rbp], ax
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -172[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	eax, DWORD PTR -172[rbp]
	mov	esi, 20
	mov	edi, eax
	call	listen@PLT
	lea	rdi, .LC0[rip]
	call	puts@PLT
.L4:
	mov	DWORD PTR -180[rbp], 16
	lea	rdx, -180[rbp]
	lea	rcx, -144[rbp]
	mov	eax, DWORD PTR -172[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -168[rbp], eax
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -168[rbp]
	mov	edx, 80
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -164[rbp], eax
	movzx	eax, WORD PTR -142[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	lea	rax, -128[rbp]
	lea	rdx, -144[rbp]
	lea	rsi, 4[rdx]
	mov	ecx, 16
	mov	rdx, rax
	mov	edi, 2
	call	inet_ntop@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -176[rbp], 0
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -176[rbp]
	cdqe
	movzx	eax, BYTE PTR -112[rbp+rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	edx, eax
	mov	eax, DWORD PTR -176[rbp]
	cdqe
	mov	BYTE PTR -112[rbp+rax], dl
	add	DWORD PTR -176[rbp], 1
.L2:
	mov	eax, DWORD PTR -176[rbp]
	cmp	eax, DWORD PTR -164[rbp]
	jl	.L3
	mov	eax, DWORD PTR -164[rbp]
	movsx	rdx, eax
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -168[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -168[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L4
	.cfi_endproc
.LFE6:
	.size	socketServer, .-socketServer
	.section	.rodata
.LC2:
	.string	"usage: ./client 2 message\n"
.LC3:
	.string	"127.0.0.1"
.LC4:
	.string	"Response from server:"
	.text
	.globl	socketClient
	.type	socketClient, @function
socketClient:
.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -132[rbp], 2
	jg	.L7
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	rax, QWORD PTR -144[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -120[rbp], rax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -128[rbp], eax
	lea	rax, -112[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -112[rbp], 2
	lea	rax, -112[rbp]
	add	rax, 4
	mov	rdx, rax
	lea	rsi, .LC3[rip]
	mov	edi, 2
	call	inet_pton@PLT
	mov	edi, 8000
	call	htons@PLT
	mov	WORD PTR -110[rbp], ax
	lea	rcx, -112[rbp]
	mov	eax, DWORD PTR -128[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR -128[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -128[rbp]
	mov	edx, 80
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -124[rbp], eax
	lea	rdi, .LC4[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -124[rbp]
	movsx	rdx, eax
	lea	rax, -96[rbp]
	mov	rsi, rax
	mov	edi, 1
	call	write@PLT
	mov	eax, DWORD PTR -128[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	socketClient, .-socketClient
	.section	.rodata
	.align 8
.LC5:
	.string	"specfiy which function that you want to call"
.LC6:
	.string	"1"
.LC7:
	.string	"2"
	.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	cmp	DWORD PTR -20[rbp], 1
	jg	.L11
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L12
.L11:
	mov	rax, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L13
	mov	eax, 0
	call	socketServer
	jmp	.L14
.L13:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L15
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	socketClient
	jmp	.L14
.L15:
	lea	rdi, .LC5[rip]
	call	puts@PLT
.L14:
	mov	eax, 0
.L12:
	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	"629853.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Accepting connections ...\000"
	.align	2
.LC1:
	.ascii	"received from %s at PORT %d\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	socketServer
	.syntax unified
	.arm
	.fpu softvfp
	.type	socketServer, %function
socketServer:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #156
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-156]
	sub	r3, fp, #144
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-144]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-140]
	mov	r0, #8000
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-142]	@ movhi
	sub	r3, fp, #144
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-156]
	bl	bind
	mov	r1, #20
	ldr	r0, [fp, #-156]
	bl	listen
	ldr	r0, .L6+4
	bl	puts
.L4:
	mov	r3, #16
	str	r3, [fp, #-164]
	sub	r2, fp, #164
	sub	r3, fp, #128
	mov	r1, r3
	ldr	r0, [fp, #-156]
	bl	accept
	str	r0, [fp, #-152]
	sub	r3, fp, #96
	mov	r2, #80
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	read
	str	r0, [fp, #-148]
	sub	r2, fp, #112
	sub	r3, fp, #128
	add	r1, r3, #4
	mov	r3, #16
	mov	r0, #2
	bl	inet_ntop
	mov	r4, r0
	ldrh	r3, [fp, #-126]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L6+8
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-160]
	b	.L2
.L3:
	sub	r2, fp, #96
	ldr	r3, [fp, #-160]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r1, r3, #255
	sub	r2, fp, #96
	ldr	r3, [fp, #-160]
	add	r3, r2, r3
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-160]
	add	r3, r3, #1
	str	r3, [fp, #-160]
.L2:
	ldr	r2, [fp, #-160]
	ldr	r3, [fp, #-148]
	cmp	r2, r3
	blt	.L3
	ldr	r2, [fp, #-148]
	sub	r3, fp, #96
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	write
	ldr	r0, [fp, #-152]
	bl	close
	b	.L4
.L7:
	.align	2
.L6:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	socketServer, .-socketServer
	.section	.rodata
	.align	2
.LC3:
	.ascii	"usage: ./client 2 message\012\000"
	.align	2
.LC4:
	.ascii	"127.0.0.1\000"
	.align	2
.LC5:
	.ascii	"Response from server:\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	socketClient
	.syntax unified
	.arm
	.fpu softvfp
	.type	socketClient, %function
socketClient:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #120
	str	r0, [fp, #-120]
	str	r1, [fp, #-124]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-120]
	cmp	r3, #2
	bgt	.L9
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L12+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-124]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-116]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-112]
	sub	r3, fp, #104
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-104]	@ movhi
	sub	r3, fp, #104
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L12+12
	mov	r0, #2
	bl	inet_pton
	mov	r0, #8000
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-102]	@ movhi
	sub	r3, fp, #104
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	connect
	ldr	r0, [fp, #-116]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-112]
	bl	write
	sub	r3, fp, #88
	mov	r2, #80
	mov	r1, r3
	ldr	r0, [fp, #-112]
	bl	read
	str	r0, [fp, #-108]
	ldr	r0, .L12+16
	bl	puts
	ldr	r2, [fp, #-108]
	sub	r3, fp, #88
	mov	r1, r3
	mov	r0, #1
	bl	write
	ldr	r0, [fp, #-112]
	bl	close
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC6
	.word	stderr
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	socketClient, .-socketClient
	.section	.rodata
	.align	2
.LC7:
	.ascii	"specfiy which function that you want to call\000"
	.align	2
.LC8:
	.ascii	"1\000"
	.align	2
.LC9:
	.ascii	"2\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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]
	ldr	r3, [fp, #-16]
	cmp	r3, #1
	bgt	.L15
	ldr	r0, .L20
	bl	puts
	mov	r3, #1
	b	.L16
.L15:
	ldr	r3, [fp, #-20]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-8]
	ldr	r1, .L20+4
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L17
	bl	socketServer
	b	.L18
.L17:
	ldr	r1, .L20+8
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	socketClient
	b	.L18
.L19:
	ldr	r0, .L20
	bl	puts
.L18:
	mov	r3, #0
.L16:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
