	.file	"164000.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
.LC0:
	.string	"usage %s hostname port\n"
.LC1:
	.string	"ERROR opening socket"
.LC2:
	.string	"ERROR, no such host\n"
.LC3:
	.string	"ERROR connecting"
.LC4:
	.string	"Connected."
.LC5:
	.string	"----------------------"
	.align 8
.LC6:
	.string	"Acceptable commands:\ncreate_child\nexec command(command to be executed by child)\nkill_child\nstop"
.LC7:
	.string	"Give command"
.LC8:
	.string	"ERROR writing to socket"
.LC9:
	.string	"ERROR reading from socket"
.LC10:
	.string	"Server closed connection"
.LC11:
	.string	"Terminating"
	.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, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -324[rbp], 2
	jg	.L3
	mov	rax, QWORD PTR -336[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -308[rbp], eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -304[rbp], eax
	cmp	DWORD PTR -304[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	error
.L4:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 20
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	lea	rax, -288[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -288[rbp], 2
	mov	rax, QWORD PTR -296[rbp]
	mov	eax, DWORD PTR 20[rax]
	movsx	rdx, eax
	mov	rax, QWORD PTR -296[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	lea	rcx, -288[rbp]
	add	rcx, 4
	mov	rsi, rax
	mov	rdi, rcx
	call	memmove@PLT
	mov	eax, DWORD PTR -308[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -286[rbp], ax
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC3[rip]
	call	error
.L6:
	lea	rdi, .LC4[rip]
	call	puts@PLT
.L12:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rax, -272[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 32
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -272[rbp]
	mov	esi, 255
	mov	rdi, rax
	call	fgets@PLT
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], 0
	jns	.L7
	lea	rdi, .LC8[rip]
	call	error
.L7:
	lea	rax, -272[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 32
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rcx, -272[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	edx, 255
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -300[rbp], eax
	cmp	DWORD PTR -300[rbp], 0
	jns	.L8
	lea	rdi, .LC9[rip]
	call	error
	jmp	.L9
.L8:
	cmp	DWORD PTR -300[rbp], 0
	jne	.L10
	lea	rdi, .LC10[rip]
	call	puts@PLT
	jmp	.L9
.L10:
	lea	rax, -272[rbp]
	mov	edx, 11
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L11
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L9
.L11:
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	puts@PLT
	jmp	.L12
.L9:
	mov	eax, DWORD PTR -304[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	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	"164000.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ 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	r0, [fp, #-8]
	bl	perror
	mov	r0, #0
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage %s hostname port\012\000"
	.align	2
.LC1:
	.ascii	"ERROR opening socket\000"
	.align	2
.LC2:
	.ascii	"ERROR, no such host\012\000"
	.align	2
.LC3:
	.ascii	"ERROR connecting\000"
	.align	2
.LC4:
	.ascii	"Connected.\000"
	.align	2
.LC5:
	.ascii	"----------------------\000"
	.align	2
.LC6:
	.ascii	"Acceptable commands:\012create_child\012exec comman"
	.ascii	"d(command to be executed by child)\012kill_child\012"
	.ascii	"stop\000"
	.align	2
.LC7:
	.ascii	"Give command\000"
	.align	2
.LC8:
	.ascii	"ERROR writing to socket\000"
	.align	2
.LC9:
	.ascii	"ERROR reading from socket\000"
	.align	2
.LC10:
	.ascii	"Server closed connection\000"
	.align	2
.LC11:
	.ascii	"Terminating\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 = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #304
	str	r0, [fp, #-304]
	str	r1, [fp, #-308]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-304]
	cmp	r3, #2
	bgt	.L3
	ldr	r3, .L15+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L15+8
	bl	fprintf
	mov	r0, #0
	bl	exit
.L3:
	ldr	r3, [fp, #-308]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-296]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-292]
	ldr	r3, [fp, #-292]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L15+12
	bl	error
.L4:
	ldr	r3, [fp, #-308]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	gethostbyname
	str	r0, [fp, #-288]
	ldr	r3, [fp, #-288]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L15+4
	ldr	r3, [r3]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, .L15+16
	bl	fwrite
	mov	r0, #0
	bl	exit
.L5:
	sub	r3, fp, #280
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #4
	sub	r3, r3, #276
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-288]
	ldr	r3, [r3, #16]
	ldr	r1, [r3]
	ldr	r3, [fp, #-288]
	ldr	r3, [r3, #12]
	mov	r2, r3
	sub	r3, fp, #280
	add	r3, r3, #4
	mov	r0, r3
	bl	memmove
	ldr	r3, [fp, #-296]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #276
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #280
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-292]
	bl	connect
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L15+20
	bl	error
.L6:
	ldr	r0, .L15+24
	bl	puts
.L12:
	ldr	r0, .L15+28
	bl	puts
	ldr	r0, .L15+32
	bl	puts
	ldr	r0, .L15+36
	bl	puts
	ldr	r0, .L15+28
	bl	puts
	sub	r3, fp, #264
	mov	r0, r3
	mov	r3, #256
	mov	r2, r3
	mov	r1, #0
	bl	memset
	ldr	r3, .L15+40
	ldr	r2, [r3]
	sub	r3, fp, #264
	mov	r1, #255
	mov	r0, r3
	bl	fgets
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #264
	mov	r1, r3
	ldr	r0, [fp, #-292]
	bl	write
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L15+44
	bl	error
.L7:
	sub	r3, fp, #264
	mov	r0, r3
	mov	r3, #256
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #264
	mov	r2, #255
	mov	r1, r3
	ldr	r0, [fp, #-292]
	bl	read
	str	r0, [fp, #-284]
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L15+48
	bl	error
	b	.L9
.L8:
	ldr	r3, [fp, #-284]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L15+52
	bl	puts
	b	.L9
.L10:
	sub	r3, fp, #264
	mov	r2, #11
	ldr	r1, .L15+56
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L11
	sub	r3, fp, #264
	mov	r0, r3
	bl	puts
	b	.L9
.L11:
	sub	r3, fp, #264
	mov	r0, r3
	bl	puts
	b	.L12
.L9:
	ldr	r0, [fp, #-292]
	bl	close
	mov	r3, #0
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC12
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stdin
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
