	.file	"85635.c"
	.intel_syntax noprefix
	.text
	.globl	get_in_addr
	.type	get_in_addr, @function
get_in_addr:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, WORD PTR [rax]
	cmp	ax, 2
	jne	.L2
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 4
	jmp	.L3
.L2:
	mov	rax, QWORD PTR -8[rbp]
	add	rax, 8
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_in_addr, .-get_in_addr
	.section	.rodata
.LC0:
	.string	"usage: client hostname\n"
.LC1:
	.string	"9034"
.LC2:
	.string	"getaddrinfo: %s\n"
.LC3:
	.string	"client: socket"
.LC4:
	.string	"client: connect"
.LC5:
	.string	"client: failed to connect\n"
.LC6:
	.string	"client: connecting to %s\n"
.LC7:
	.string	"recv"
.LC8:
	.string	"client: received '%s'\n"
	.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, 256
	mov	DWORD PTR -244[rbp], edi
	mov	QWORD PTR -256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -244[rbp], 2
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 23
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	lea	rax, -208[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -204[rbp], 0
	mov	DWORD PTR -200[rbp], 1
	mov	rax, QWORD PTR -256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -232[rbp]
	lea	rdx, -208[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	getaddrinfo@PLT
	mov	DWORD PTR -236[rbp], eax
	cmp	DWORD PTR -236[rbp], 0
	je	.L6
	mov	eax, DWORD PTR -236[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	rax, QWORD PTR -232[rbp]
	mov	QWORD PTR -224[rbp], rax
	jmp	.L7
.L12:
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -240[rbp], eax
	cmp	DWORD PTR -240[rbp], -1
	jne	.L8
	lea	rdi, .LC3[rip]
	call	perror@PLT
	jmp	.L9
.L8:
	mov	rax, QWORD PTR -224[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -224[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -240[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L18
	lea	rdi, .LC4[rip]
	call	perror@PLT
	nop
.L9:
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -224[rbp], rax
.L7:
	cmp	QWORD PTR -224[rbp], 0
	jne	.L12
	jmp	.L11
.L18:
	nop
.L11:
	cmp	QWORD PTR -224[rbp], 0
	jne	.L13
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 26
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	eax, 2
	jmp	.L16
.L13:
	mov	rax, QWORD PTR -224[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	get_in_addr
	mov	rsi, rax
	mov	rax, QWORD PTR -224[rbp]
	mov	eax, DWORD PTR 4[rax]
	lea	rdx, -160[rbp]
	mov	ecx, 46
	mov	edi, eax
	call	inet_ntop@PLT
	lea	rax, -160[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -232[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	lea	rsi, -112[rbp]
	mov	eax, DWORD PTR -240[rbp]
	mov	ecx, 0
	mov	edx, 99
	mov	edi, eax
	call	recv@PLT
	mov	QWORD PTR -216[rbp], rax
	cmp	QWORD PTR -216[rbp], -1
	jne	.L15
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	lea	rdx, -112[rbp]
	mov	rax, QWORD PTR -216[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -112[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -240[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L16:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	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	"85635.c"
	.text
	.align	2
	.global	get_in_addr
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_in_addr, %function
get_in_addr:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldrh	r3, [r3]
	cmp	r3, #2
	bne	.L2
	ldr	r3, [fp, #-8]
	add	r3, r3, #4
	b	.L3
.L2:
	ldr	r3, [fp, #-8]
	add	r3, r3, #8
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	get_in_addr, .-get_in_addr
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: client hostname\012\000"
	.align	2
.LC1:
	.ascii	"9034\000"
	.align	2
.LC2:
	.ascii	"getaddrinfo: %s\012\000"
	.align	2
.LC3:
	.ascii	"client: socket\000"
	.align	2
.LC4:
	.ascii	"client: connect\000"
	.align	2
.LC5:
	.ascii	"client: failed to connect\012\000"
	.align	2
.LC6:
	.ascii	"client: connecting to %s\012\000"
	.align	2
.LC7:
	.ascii	"recv\000"
	.align	2
.LC8:
	.ascii	"client: received '%s'\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 216
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #220
	str	r0, [fp, #-224]
	str	r1, [fp, #-228]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-224]
	cmp	r3, #2
	beq	.L5
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #23
	mov	r1, #1
	ldr	r0, .L19+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L5:
	sub	r3, fp, #196
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-192]
	mov	r3, #1
	str	r3, [fp, #-188]
	ldr	r3, [fp, #-228]
	add	r3, r3, #4
	ldr	r0, [r3]
	sub	r3, fp, #216
	sub	r2, fp, #196
	ldr	r1, .L19+12
	bl	getaddrinfo
	str	r0, [fp, #-204]
	ldr	r3, [fp, #-204]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L19+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-204]
	bl	gai_strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L19+16
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L6:
	ldr	r3, [fp, #-216]
	str	r3, [fp, #-208]
	b	.L7
.L12:
	ldr	r3, [fp, #-208]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-208]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-208]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-212]
	ldr	r3, [fp, #-212]
	cmn	r3, #1
	bne	.L8
	ldr	r0, .L19+20
	bl	perror
	b	.L9
.L8:
	ldr	r3, [fp, #-208]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-208]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-212]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L18
	ldr	r0, .L19+24
	bl	perror
	nop
.L9:
	ldr	r3, [fp, #-208]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-208]
.L7:
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	bne	.L12
	b	.L11
.L18:
	nop
.L11:
	ldr	r3, [fp, #-208]
	cmp	r3, #0
	bne	.L13
	ldr	r3, .L19+4
	ldr	r3, [r3]
	mov	r2, #26
	mov	r1, #1
	ldr	r0, .L19+28
	bl	fwrite
	mov	r3, #2
	b	.L16
.L13:
	ldr	r3, [fp, #-208]
	ldr	r4, [r3, #4]
	ldr	r3, [fp, #-208]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	get_in_addr
	mov	r1, r0
	sub	r2, fp, #164
	mov	r3, #46
	mov	r0, r4
	bl	inet_ntop
	sub	r3, fp, #164
	mov	r1, r3
	ldr	r0, .L19+32
	bl	printf
	ldr	r3, [fp, #-216]
	mov	r0, r3
	bl	freeaddrinfo
	sub	r1, fp, #116
	mov	r3, #0
	mov	r2, #99
	ldr	r0, [fp, #-212]
	bl	recv
	str	r0, [fp, #-200]
	ldr	r3, [fp, #-200]
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L19+36
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	sub	r2, fp, #116
	ldr	r3, [fp, #-200]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #116
	mov	r1, r3
	ldr	r0, .L19+40
	bl	printf
	ldr	r0, [fp, #-212]
	bl	close
	mov	r3, #0
.L16:
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC9
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
