	.file	"896173.c"
	.intel_syntax noprefix
	.text
	.globl	die
	.type	die, @function
die:
.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, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	die, .-die
	.section	.rodata
.LC0:
	.string	"usage: %s <server_ip> <port>\n"
.LC1:
	.string	"getaddrinfo()"
.LC2:
	.string	"socket()"
.LC3:
	.string	"setsockopt()"
.LC4:
	.string	"connect()"
.LC5:
	.string	"select()"
	.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, 400
	mov	DWORD PTR -388[rbp], edi
	mov	QWORD PTR -400[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -380[rbp], 1
	cmp	DWORD PTR -388[rbp], 3
	je	.L3
	mov	rax, QWORD PTR -400[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
.L3:
	lea	rax, -320[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -316[rbp], 0
	mov	DWORD PTR -312[rbp], 1
	mov	DWORD PTR -320[rbp], 0
	mov	DWORD PTR -308[rbp], 0
	mov	rax, QWORD PTR -400[rbp]
	add	rax, 16
	mov	rsi, QWORD PTR [rax]
	mov	rax, QWORD PTR -400[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rcx, -344[rbp]
	lea	rdx, -320[rbp]
	mov	rdi, rax
	call	getaddrinfo@PLT
	test	eax, eax
	je	.L4
	lea	rdi, .LC1[rip]
	call	die
.L4:
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -344[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -344[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -376[rbp], eax
	cmp	DWORD PTR -376[rbp], 0
	jns	.L5
	lea	rdi, .LC2[rip]
	call	die
.L5:
	lea	rdx, -380[rbp]
	mov	eax, DWORD PTR -376[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 3
	mov	esi, 6
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC3[rip]
	call	die
.L6:
	mov	rax, QWORD PTR -344[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -344[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -376[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	connect@PLT
	cmp	eax, -1
	jne	.L7
	lea	rdi, .LC4[rip]
	call	die
.L7:
	mov	eax, DWORD PTR -376[rbp]
	mov	edx, 2048
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	edx, 2048
	mov	esi, 4
	mov	edi, 0
	mov	eax, 0
	call	fcntl@PLT
	mov	edx, 2048
	mov	esi, 4
	mov	edi, 1
	mov	eax, 0
	call	fcntl@PLT
.L14:
	mov	QWORD PTR -336[rbp], 30
	mov	QWORD PTR -328[rbp], 0
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -272[rbp]
	mov	rdi, rdx
#APP
# 70 "the_stack_data/896173.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -372[rbp], edx
	mov	DWORD PTR -368[rbp], eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -144[rbp]
	mov	rdi, rdx
#APP
# 71 "the_stack_data/896173.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -364[rbp], edx
	mov	DWORD PTR -360[rbp], eax
	mov	rax, QWORD PTR -272[rbp]
	or	rax, 1
	mov	QWORD PTR -272[rbp], rax
	mov	eax, DWORD PTR -376[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -376[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -272[rbp+rax*8], rdx
	mov	rax, QWORD PTR -144[rbp]
	or	rax, 2
	mov	QWORD PTR -144[rbp], rax
	mov	eax, DWORD PTR -376[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -376[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -144[rbp+rax*8], rdx
	mov	eax, DWORD PTR -376[rbp]
	lea	edi, 1[rax]
	lea	rdx, -336[rbp]
	lea	rax, -272[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -356[rbp], eax
	mov	eax, DWORD PTR -376[rbp]
	lea	edi, 1[rax]
	lea	rdx, -336[rbp]
	lea	rax, -144[rbp]
	mov	r8, rdx
	mov	ecx, 0
	mov	rdx, rax
	mov	esi, 0
	call	select@PLT
	mov	DWORD PTR -352[rbp], eax
	cmp	DWORD PTR -356[rbp], -1
	je	.L8
	cmp	DWORD PTR -352[rbp], -1
	jne	.L9
.L8:
	lea	rdi, .LC5[rip]
	call	perror@PLT
	jmp	.L10
.L9:
	cmp	DWORD PTR -356[rbp], 0
	je	.L14
	cmp	DWORD PTR -352[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -272[rbp]
	and	eax, 1
	test	rax, rax
	je	.L11
	mov	eax, DWORD PTR -376[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -376[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L11
	mov	edx, 4096
	lea	rsi, buff.0[rip]
	mov	edi, 0
	call	read@PLT
	mov	DWORD PTR -348[rbp], eax
	cmp	DWORD PTR -348[rbp], 0
	jg	.L12
	mov	eax, DWORD PTR -376[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	edi, 0
	call	exit@PLT
.L12:
	mov	eax, DWORD PTR -348[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -376[rbp]
	mov	ecx, 0
	lea	rsi, buff.0[rip]
	mov	edi, eax
	call	send@PLT
.L11:
	mov	eax, DWORD PTR -376[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -376[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L14
	mov	rax, QWORD PTR -144[rbp]
	and	eax, 2
	test	rax, rax
	je	.L14
	mov	eax, DWORD PTR -376[rbp]
	mov	ecx, 0
	mov	edx, 4096
	lea	rsi, buff.0[rip]
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -348[rbp], eax
	cmp	DWORD PTR -348[rbp], 0
	jg	.L13
	mov	eax, DWORD PTR -376[rbp]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	edi, 0
	call	exit@PLT
.L13:
	mov	eax, DWORD PTR -348[rbp]
	cdqe
	mov	rdx, rax
	lea	rsi, buff.0[rip]
	mov	edi, 1
	call	write@PLT
.L10:
	jmp	.L14
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.local	buff.0
	.comm	buff.0,4096,32
	.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	"896173.c"
	.text
	.align	2
	.global	die
	.syntax unified
	.arm
	.fpu softvfp
	.type	die, %function
die:
	@ 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, #1
	bl	exit
	.size	die, .-die
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s <server_ip> <port>\012\000"
	.align	2
.LC1:
	.ascii	"getaddrinfo()\000"
	.align	2
.LC2:
	.ascii	"socket()\000"
	.align	2
.LC3:
	.ascii	"setsockopt()\000"
	.align	2
.LC4:
	.ascii	"connect()\000"
	.align	2
.LC5:
	.ascii	"select()\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 352
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #360
	str	r0, [fp, #-352]
	str	r1, [fp, #-356]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-340]
	ldr	r3, [fp, #-352]
	cmp	r3, #3
	beq	.L3
	ldr	r3, .L20+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-356]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L20+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #296
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-292]
	mov	r3, #1
	str	r3, [fp, #-288]
	mov	r3, #0
	str	r3, [fp, #-296]
	mov	r3, #0
	str	r3, [fp, #-284]
	ldr	r3, [fp, #-356]
	add	r3, r3, #4
	ldr	r0, [r3]
	ldr	r3, [fp, #-356]
	add	r3, r3, #8
	ldr	r1, [r3]
	sub	r3, fp, #344
	sub	r2, fp, #296
	bl	getaddrinfo
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L20+12
	bl	die
.L4:
	ldr	r3, [fp, #-344]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-344]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-344]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-328]
	ldr	r3, [fp, #-328]
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L20+16
	bl	die
.L5:
	sub	r3, fp, #340
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #3
	mov	r1, #6
	ldr	r0, [fp, #-328]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L20+20
	bl	die
.L6:
	ldr	r3, [fp, #-344]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-344]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-328]
	bl	connect
	mov	r3, r0
	cmn	r3, #1
	bne	.L7
	ldr	r0, .L20+24
	bl	die
.L7:
	mov	r2, #2048
	mov	r1, #4
	ldr	r0, [fp, #-328]
	bl	fcntl
	mov	r2, #2048
	mov	r1, #4
	mov	r0, #0
	bl	fcntl
	mov	r2, #2048
	mov	r1, #4
	mov	r0, #1
	bl	fcntl
.L18:
	mov	r3, #30
	str	r3, [fp, #-304]
	mov	r3, #0
	str	r3, [fp, #-300]
	sub	r3, fp, #264
	str	r3, [fp, #-324]
	mov	r3, #0
	str	r3, [fp, #-336]
	b	.L8
.L9:
	ldr	r3, [fp, #-324]
	ldr	r2, [fp, #-336]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-336]
	add	r3, r3, #1
	str	r3, [fp, #-336]
.L8:
	ldr	r3, [fp, #-336]
	cmp	r3, #31
	bls	.L9
	sub	r3, fp, #136
	str	r3, [fp, #-320]
	mov	r3, #0
	str	r3, [fp, #-332]
	b	.L10
.L11:
	ldr	r3, [fp, #-320]
	ldr	r2, [fp, #-332]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-332]
	add	r3, r3, #1
	str	r3, [fp, #-332]
.L10:
	ldr	r3, [fp, #-332]
	cmp	r3, #31
	bls	.L11
	ldr	r3, [fp, #-264]
	orr	r3, r3, #1
	str	r3, [fp, #-264]
	ldr	r3, [fp, #-328]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-260]
	ldr	r3, [fp, #-328]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-260]
	ldr	r3, [fp, #-136]
	orr	r3, r3, #2
	str	r3, [fp, #-136]
	ldr	r3, [fp, #-328]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-132]
	ldr	r3, [fp, #-328]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-132]
	ldr	r3, [fp, #-328]
	add	r0, r3, #1
	sub	r1, fp, #264
	sub	r3, fp, #304
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-316]
	ldr	r3, [fp, #-328]
	add	r0, r3, #1
	sub	r2, fp, #136
	sub	r3, fp, #304
	str	r3, [sp]
	mov	r3, #0
	mov	r1, #0
	bl	select
	str	r0, [fp, #-312]
	ldr	r3, [fp, #-316]
	cmn	r3, #1
	beq	.L12
	ldr	r3, [fp, #-312]
	cmn	r3, #1
	bne	.L13
.L12:
	ldr	r0, .L20+28
	bl	perror
	b	.L14
.L13:
	ldr	r3, [fp, #-316]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-312]
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-264]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-328]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-132]
	ldr	r3, [fp, #-328]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L15
	mov	r2, #4096
	ldr	r1, .L20+32
	mov	r0, #0
	bl	read
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	bgt	.L16
	mov	r1, #2
	ldr	r0, [fp, #-328]
	bl	shutdown
	mov	r0, #0
	bl	exit
.L16:
	ldr	r2, [fp, #-308]
	mov	r3, #0
	ldr	r1, .L20+32
	ldr	r0, [fp, #-328]
	bl	send
.L15:
	ldr	r3, [fp, #-328]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-260]
	ldr	r3, [fp, #-328]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L18
	ldr	r3, [fp, #-136]
	and	r3, r3, #2
	cmp	r3, #0
	beq	.L18
	mov	r3, #0
	mov	r2, #4096
	ldr	r1, .L20+32
	ldr	r0, [fp, #-328]
	bl	recv
	str	r0, [fp, #-308]
	ldr	r3, [fp, #-308]
	cmp	r3, #0
	bgt	.L17
	mov	r1, #2
	ldr	r0, [fp, #-328]
	bl	shutdown
	mov	r0, #0
	bl	exit
.L17:
	ldr	r3, [fp, #-308]
	mov	r2, r3
	ldr	r1, .L20+32
	mov	r0, #1
	bl	write
.L14:
	b	.L18
.L21:
	.align	2
.L20:
	.word	.LC6
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	buff.6732
	.size	main, .-main
	.local	buff.6732
	.comm	buff.6732,4096,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
