	.file	"100139920.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage : %s <IP> <port>\n"
.LC1:
	.string	"connect() error!"
	.text
	.globl	main
	.type	main, @function
main:
.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -84[rbp], 3
	je	.L2
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -72[rbp], eax
	lea	rax, -64[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -64[rbp], 2
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	inet_addr@PLT
	mov	DWORD PTR -60[rbp], eax
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -62[rbp], ax
	lea	rcx, -64[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	error_handling
.L3:
	call	fork@PLT
	mov	DWORD PTR -68[rbp], eax
	cmp	DWORD PTR -68[rbp], 0
	jne	.L4
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	write_routine
	jmp	.L5
.L4:
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	read_routine
.L5:
	mov	eax, DWORD PTR -72[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC2:
	.string	"message from server: %s"
	.text
	.globl	read_routine
	.type	read_routine, @function
read_routine:
.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	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
.L11:
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 30
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	je	.L13
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -32[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L11
.L13:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	read_routine, .-read_routine
	.section	.rodata
.LC3:
	.string	"q\n"
.LC4:
	.string	"Q\n"
	.text
	.globl	write_routine
	.type	write_routine, @function
write_routine:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
.L18:
	mov	rdx, QWORD PTR stdin[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 30
	mov	rdi, rax
	call	fgets@PLT
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L15
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L16
.L15:
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, 1
	mov	edi, eax
	call	shutdown@PLT
	jmp	.L19
.L16:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	jmp	.L18
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	write_routine, .-write_routine
	.globl	error_handling
	.type	error_handling, @function
error_handling:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rdx, QWORD PTR stderr[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	fputs@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE9:
	.size	error_handling, .-error_handling
	.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	"100139920.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage : %s <IP> <port>\012\000"
	.align	2
.LC1:
	.ascii	"connect() error!\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 72
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-72]
	str	r1, [fp, #-76]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-72]
	cmp	r3, #3
	beq	.L2
	ldr	r3, [fp, #-76]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L8+4
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-64]
	sub	r3, fp, #56
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-56]	@ movhi
	ldr	r3, [fp, #-76]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	inet_addr
	mov	r3, r0
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-76]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-54]	@ movhi
	sub	r3, fp, #56
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L8+8
	bl	error_handling
.L3:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-60]
	ldr	r3, [fp, #-60]
	cmp	r3, #0
	bne	.L4
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	write_routine
	b	.L5
.L4:
	sub	r3, fp, #40
	mov	r1, r3
	ldr	r0, [fp, #-64]
	bl	read_routine
.L5:
	ldr	r0, [fp, #-64]
	bl	close
	mov	r3, #0
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	main, .-main
	.section	.rodata
	.align	2
.LC3:
	.ascii	"message from server: %s\000"
	.text
	.align	2
	.global	read_routine
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_routine, %function
read_routine:
	@ 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]
.L13:
	mov	r2, #30
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	read
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r1, [fp, #-20]
	ldr	r0, .L16
	bl	printf
	b	.L13
.L15:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC3
	.size	read_routine, .-read_routine
	.section	.rodata
	.align	2
.LC4:
	.ascii	"q\012\000"
	.align	2
.LC5:
	.ascii	"Q\012\000"
	.text
	.align	2
	.global	write_routine
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_routine, %function
write_routine:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
.L22:
	ldr	r3, .L24
	ldr	r3, [r3]
	mov	r2, r3
	mov	r1, #30
	ldr	r0, [fp, #-12]
	bl	fgets
	ldr	r1, .L24+4
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	ldr	r1, .L24+8
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
.L19:
	mov	r1, #1
	ldr	r0, [fp, #-8]
	bl	shutdown
	b	.L23
.L20:
	ldr	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	write
	b	.L22
.L23:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L25:
	.align	2
.L24:
	.word	stdin
	.word	.LC4
	.word	.LC5
	.size	write_routine, .-write_routine
	.align	2
	.global	error_handling
	.syntax unified
	.arm
	.fpu softvfp
	.type	error_handling, %function
error_handling:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, .L27
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	fputs
	ldr	r3, .L27
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	mov	r0, #1
	bl	exit
.L28:
	.align	2
.L27:
	.word	stderr
	.size	error_handling, .-error_handling
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
