	.file	"514562.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"localhost"
.LC1:
	.string	"no host: %s\n"
.LC2:
	.string	"tcp"
.LC3:
	.string	"daytime"
.LC4:
	.string	"no daytime service\n"
.LC5:
	.string	"daytime port is %d\n"
.LC6:
	.string	"oops: getdate"
.LC7:
	.string	"read %d bytes: %s"
	.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, 224
	mov	DWORD PTR -212[rbp], edi
	mov	QWORD PTR -224[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -212[rbp], 1
	jne	.L2
	lea	rax, .LC0[rip]
	mov	QWORD PTR -184[rbp], rax
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -184[rbp], rax
.L3:
	mov	rax, QWORD PTR -184[rbp]
	mov	rdi, rax
	call	gethostbyname@PLT
	mov	QWORD PTR -176[rbp], rax
	cmp	QWORD PTR -176[rbp], 0
	jne	.L4
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -184[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rsi, .LC2[rip]
	lea	rdi, .LC3[rip]
	call	getservbyname@PLT
	mov	QWORD PTR -168[rbp], rax
	cmp	QWORD PTR -168[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR 16[rax]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -196[rbp], eax
	mov	WORD PTR -160[rbp], 2
	mov	rax, QWORD PTR -168[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	WORD PTR -158[rbp], ax
	mov	rax, QWORD PTR -176[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rax, QWORD PTR [rax]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -156[rbp], eax
	mov	DWORD PTR -192[rbp], 16
	mov	edx, DWORD PTR -192[rbp]
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	mov	DWORD PTR -188[rbp], eax
	cmp	DWORD PTR -188[rbp], -1
	jne	.L6
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rcx, -144[rbp]
	mov	eax, DWORD PTR -196[rbp]
	mov	edx, 128
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -188[rbp], eax
	mov	eax, DWORD PTR -188[rbp]
	cdqe
	mov	BYTE PTR -144[rbp+rax], 0
	lea	rdx, -144[rbp]
	mov	eax, DWORD PTR -188[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -196[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.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	"514562.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"localhost\000"
	.align	2
.LC1:
	.ascii	"no host: %s\012\000"
	.align	2
.LC2:
	.ascii	"tcp\000"
	.align	2
.LC3:
	.ascii	"daytime\000"
	.align	2
.LC4:
	.ascii	"no daytime service\012\000"
	.align	2
.LC5:
	.ascii	"daytime port is %d\012\000"
	.align	2
.LC6:
	.ascii	"oops: getdate\000"
	.align	2
.LC7:
	.ascii	"read %d bytes: %s\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #184
	str	r0, [fp, #-184]
	str	r1, [fp, #-188]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-184]
	cmp	r3, #1
	bne	.L2
	ldr	r3, .L8+4
	str	r3, [fp, #-176]
	b	.L3
.L2:
	ldr	r3, [fp, #-188]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-176]
.L3:
	ldr	r0, [fp, #-176]
	bl	gethostbyname
	str	r0, [fp, #-172]
	ldr	r3, [fp, #-172]
	cmp	r3, #0
	bne	.L4
	ldr	r3, .L8+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-176]
	ldr	r1, .L8+12
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L4:
	ldr	r1, .L8+16
	ldr	r0, .L8+20
	bl	getservbyname
	str	r0, [fp, #-168]
	ldr	r3, [fp, #-168]
	cmp	r3, #0
	bne	.L5
	ldr	r3, .L8+8
	ldr	r3, [r3]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L8+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-168]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L8+28
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-164]
	mov	r3, #2
	strh	r3, [fp, #-152]	@ movhi
	ldr	r3, [fp, #-168]
	ldr	r3, [r3, #8]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-150]	@ movhi
	ldr	r3, [fp, #-172]
	ldr	r3, [r3, #16]
	ldr	r3, [r3]
	ldr	r3, [r3]
	str	r3, [fp, #-148]
	mov	r3, #16
	str	r3, [fp, #-160]
	ldr	r2, [fp, #-160]
	sub	r3, fp, #152
	mov	r1, r3
	ldr	r0, [fp, #-164]
	bl	connect
	str	r0, [fp, #-156]
	ldr	r3, [fp, #-156]
	cmn	r3, #1
	bne	.L6
	ldr	r0, .L8+32
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #136
	mov	r2, #128
	mov	r1, r3
	ldr	r0, [fp, #-164]
	bl	read
	str	r0, [fp, #-156]
	sub	r2, fp, #136
	ldr	r3, [fp, #-156]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #136
	mov	r2, r3
	ldr	r1, [fp, #-156]
	ldr	r0, .L8+36
	bl	printf
	ldr	r0, [fp, #-164]
	bl	close
	mov	r0, #0
	bl	exit
.L9:
	.align	2
.L8:
	.word	.LC8
	.word	.LC0
	.word	stderr
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
