	.file	"267649.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s host port msg...\n"
.LC1:
	.string	"getaddrinfo: %s\n"
.LC2:
	.string	"Could not connect\n"
	.align 8
.LC3:
	.string	"Ignoring long message in argument %d\n"
.LC4:
	.string	"partial/failed write\n"
.LC5:
	.string	"read"
.LC6:
	.string	"Received %ld bytes: %s\n"
	.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, 624
	mov	DWORD PTR -612[rbp], edi
	mov	QWORD PTR -624[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -612[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR -624[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, 1
	call	exit@PLT
.L2:
	lea	rax, -560[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -556[rbp], 0
	mov	DWORD PTR -552[rbp], 3
	mov	DWORD PTR -560[rbp], 0
	mov	DWORD PTR -548[rbp], 0
	mov	rax, QWORD PTR -624[rbp]
	add	rax, 16
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -624[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -592[rbp]
	lea	rdx, -560[rbp]
	mov	rdi, rax
	call	getaddrinfo@PLT
	mov	DWORD PTR -596[rbp], eax
	cmp	DWORD PTR -596[rbp], 0
	je	.L3
	mov	eax, DWORD PTR -596[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	rax, QWORD PTR -592[rbp]
	mov	QWORD PTR -584[rbp], rax
	jmp	.L4
.L9:
	mov	rax, QWORD PTR -584[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -584[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -584[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -604[rbp], eax
	cmp	DWORD PTR -604[rbp], -1
	je	.L18
	mov	rax, QWORD PTR -584[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -584[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -604[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L19
	mov	eax, DWORD PTR -604[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L6
.L18:
	nop
.L6:
	mov	rax, QWORD PTR -584[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -584[rbp], rax
.L4:
	cmp	QWORD PTR -584[rbp], 0
	jne	.L9
	jmp	.L8
.L19:
	nop
.L8:
	cmp	QWORD PTR -584[rbp], 0
	jne	.L10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 18
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	rax, QWORD PTR -592[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	DWORD PTR -600[rbp], 3
	jmp	.L11
.L16:
	mov	eax, DWORD PTR -600[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -624[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	QWORD PTR -576[rbp], rax
	mov	rax, QWORD PTR -576[rbp]
	add	rax, 1
	cmp	rax, 500
	jbe	.L12
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -600[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	jmp	.L13
.L12:
	mov	eax, DWORD PTR -600[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -624[rbp]
	add	rax, rdx
	mov	rcx, QWORD PTR [rax]
	mov	rdx, QWORD PTR -576[rbp]
	mov	eax, DWORD PTR -604[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	rdx, QWORD PTR -576[rbp]
	cmp	rax, rdx
	je	.L14
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 21
	mov	esi, 1
	lea	rdi, .LC4[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	lea	rcx, -512[rbp]
	mov	eax, DWORD PTR -604[rbp]
	mov	edx, 500
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -568[rbp], rax
	cmp	QWORD PTR -568[rbp], -1
	jne	.L15
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	lea	rdx, -512[rbp]
	mov	rax, QWORD PTR -568[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L13:
	add	DWORD PTR -600[rbp], 1
.L11:
	mov	eax, DWORD PTR -600[rbp]
	cmp	eax, DWORD PTR -612[rbp]
	jl	.L16
	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	"267649.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s host port msg...\012\000"
	.align	2
.LC1:
	.ascii	"getaddrinfo: %s\012\000"
	.align	2
.LC2:
	.ascii	"Could not connect\012\000"
	.align	2
.LC3:
	.ascii	"Ignoring long message in argument %d\012\000"
	.align	2
.LC4:
	.ascii	"partial/failed write\012\000"
	.align	2
.LC5:
	.ascii	"read\000"
	.align	2
.LC6:
	.ascii	"Received %ld bytes: %s\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 576
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #580
	str	r0, [fp, #-584]
	str	r1, [fp, #-588]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-584]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, .L20+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-588]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #548
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-544]
	mov	r3, #3
	str	r3, [fp, #-540]
	mov	r3, #0
	str	r3, [fp, #-548]
	mov	r3, #0
	str	r3, [fp, #-536]
	ldr	r3, [fp, #-588]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r3, [fp, #-588]
	add	r3, r3, #8
	ldr	r1, [r3]
	sub	r3, fp, #576
	sub	r2, fp, #548
	bl	getaddrinfo
	str	r0, [fp, #-560]
	ldr	r3, [fp, #-560]
	cmp	r3, #0
	beq	.L3
	ldr	r3, .L20+4
	ldr	r4, [r3]
	ldr	r0, [fp, #-560]
	bl	gai_strerror
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L20+12
	mov	r0, r4
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	ldr	r3, [fp, #-576]
	str	r3, [fp, #-572]
	b	.L4
.L9:
	ldr	r3, [fp, #-572]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-572]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-572]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-568]
	ldr	r3, [fp, #-568]
	cmn	r3, #1
	beq	.L18
	ldr	r3, [fp, #-572]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-572]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-568]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L19
	ldr	r0, [fp, #-568]
	bl	close
	b	.L6
.L18:
	nop
.L6:
	ldr	r3, [fp, #-572]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-572]
.L4:
	ldr	r3, [fp, #-572]
	cmp	r3, #0
	bne	.L9
	b	.L8
.L19:
	nop
.L8:
	ldr	r3, [fp, #-572]
	cmp	r3, #0
	bne	.L10
	ldr	r3, .L20+4
	ldr	r3, [r3]
	mov	r2, #18
	mov	r1, #1
	ldr	r0, .L20+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L10:
	ldr	r3, [fp, #-576]
	mov	r0, r3
	bl	freeaddrinfo
	mov	r3, #3
	str	r3, [fp, #-564]
	b	.L11
.L16:
	ldr	r3, [fp, #-564]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-588]
	add	r3, r2, r3
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	str	r3, [fp, #-556]
	ldr	r3, [fp, #-556]
	add	r3, r3, #1
	cmp	r3, #500
	bls	.L12
	ldr	r3, .L20+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-564]
	ldr	r1, .L20+20
	mov	r0, r3
	bl	fprintf
	b	.L13
.L12:
	ldr	r3, [fp, #-564]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-588]
	add	r3, r2, r3
	ldr	r3, [r3]
	ldr	r2, [fp, #-556]
	mov	r1, r3
	ldr	r0, [fp, #-568]
	bl	write
	mov	r2, r0
	ldr	r3, [fp, #-556]
	cmp	r2, r3
	beq	.L14
	ldr	r3, .L20+4
	ldr	r3, [r3]
	mov	r2, #21
	mov	r1, #1
	ldr	r0, .L20+24
	bl	fwrite
	mov	r0, #1
	bl	exit
.L14:
	sub	r3, fp, #516
	mov	r2, #500
	mov	r1, r3
	ldr	r0, [fp, #-568]
	bl	read
	str	r0, [fp, #-552]
	ldr	r3, [fp, #-552]
	cmn	r3, #1
	bne	.L15
	ldr	r0, .L20+28
	bl	perror
	mov	r0, #1
	bl	exit
.L15:
	sub	r3, fp, #516
	mov	r2, r3
	ldr	r1, [fp, #-552]
	ldr	r0, .L20+32
	bl	printf
.L13:
	ldr	r3, [fp, #-564]
	add	r3, r3, #1
	str	r3, [fp, #-564]
.L11:
	ldr	r2, [fp, #-564]
	ldr	r3, [fp, #-584]
	cmp	r2, r3
	blt	.L16
	mov	r0, #0
	bl	exit
.L21:
	.align	2
.L20:
	.word	.LC7
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
