	.file	"518671.c"
	.intel_syntax noprefix
	.text
	.globl	ident
	.bss
	.align 8
	.type	ident, @object
	.size	ident, 8
ident:
	.zero	8
	.globl	ident_len
	.align 4
	.type	ident_len, @object
	.size	ident_len, 4
ident_len:
	.zero	4
	.section	.rodata
.LC0:
	.string	"reply too big"
.LC1:
	.string	" : USERID : UNIX : "
	.text
	.globl	reply
	.type	reply, @function
reply:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -120[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	QWORD PTR -120[rbp], 0
	jne	.L2
	mov	eax, 0
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -120[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -104[rbp], eax
	mov	rax, QWORD PTR -120[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -96[rbp], 5
	mov	QWORD PTR -88[rbp], 0
	lea	rdx, -96[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	r8d, 16
	mov	rcx, rdx
	mov	edx, 20
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	DWORD PTR -108[rbp], 0
	jmp	.L4
.L7:
	mov	eax, 64
	sub	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	lea	rcx, -80[rbp]
	add	rcx, rax
	mov	eax, DWORD PTR -104[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -100[rbp], eax
	cmp	DWORD PTR -100[rbp], 0
	jg	.L5
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L11
.L5:
	mov	eax, DWORD PTR -100[rbp]
	add	DWORD PTR -108[rbp], eax
	mov	eax, DWORD PTR -100[rbp]
	sub	eax, 1
	cdqe
	movzx	eax, BYTE PTR -80[rbp+rax]
	cmp	al, 10
	je	.L13
.L4:
	cmp	DWORD PTR -108[rbp], 63
	jle	.L7
	jmp	.L6
.L13:
	nop
.L6:
	cmp	DWORD PTR -108[rbp], 63
	jle	.L8
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L11
.L8:
	cmp	DWORD PTR -108[rbp], 2
	jg	.L9
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L11
.L9:
	mov	edx, DWORD PTR ident_len[rip]
	mov	eax, DWORD PTR -108[rbp]
	add	eax, edx
	cmp	eax, 45
	jle	.L10
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	jmp	.L11
.L10:
	sub	DWORD PTR -108[rbp], 2
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	lea	rdx, -80[rbp]
	add	rax, rdx
	mov	edx, 19
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	memcpy@PLT
	add	DWORD PTR -108[rbp], 19
	mov	eax, DWORD PTR ident_len[rip]
	movsx	rdx, eax
	mov	rax, QWORD PTR ident[rip]
	mov	ecx, DWORD PTR -108[rbp]
	movsx	rcx, ecx
	lea	rsi, -80[rbp]
	add	rcx, rsi
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	eax, DWORD PTR ident_len[rip]
	add	DWORD PTR -108[rbp], eax
	mov	eax, DWORD PTR -108[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -108[rbp], edx
	cdqe
	mov	BYTE PTR -80[rbp+rax], 13
	mov	eax, DWORD PTR -108[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -108[rbp], edx
	cdqe
	mov	BYTE PTR -80[rbp+rax], 10
	mov	eax, DWORD PTR -108[rbp]
	cdqe
	mov	BYTE PTR -80[rbp+rax], 0
	mov	eax, DWORD PTR -108[rbp]
	movsx	rdx, eax
	lea	rcx, -80[rbp]
	mov	eax, DWORD PTR -104[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -104[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L11:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	reply, .-reply
	.section	.rodata
.LC2:
	.string	"IDENT"
.LC3:
	.string	"root"
.LC4:
	.string	"Using ident %s\n"
.LC5:
	.string	"Failed to create socket"
.LC6:
	.string	"Failed to bind to socket"
.LC7:
	.string	"Failed to start listening"
.LC8:
	.string	"Failed to configure threads"
	.align 8
.LC9:
	.string	"Failed to accept() a connection"
	.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, 144
	mov	DWORD PTR -132[rbp], edi
	mov	QWORD PTR -144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -132[rbp], 2
	jne	.L15
	mov	rax, QWORD PTR -144[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR ident[rip], rax
	jmp	.L16
.L15:
	lea	rdi, .LC2[rip]
	call	getenv@PLT
	mov	QWORD PTR ident[rip], rax
	mov	rax, QWORD PTR ident[rip]
	test	rax, rax
	jne	.L16
	lea	rax, .LC3[rip]
	mov	QWORD PTR ident[rip], rax
.L16:
	mov	rax, QWORD PTR ident[rip]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR ident_len[rip], eax
	mov	rax, QWORD PTR ident[rip]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edx, 0
	mov	esi, 1
	mov	edi, 10
	call	socket@PLT
	mov	DWORD PTR -120[rbp], eax
	cmp	DWORD PTR -120[rbp], 0
	jns	.L17
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	mov	WORD PTR -96[rbp], 10
	mov	rax, QWORD PTR in6addr_any[rip]
	mov	rdx, QWORD PTR in6addr_any[rip+8]
	mov	QWORD PTR -88[rbp], rax
	mov	QWORD PTR -80[rbp], rdx
	mov	edi, 113
	call	htons@PLT
	mov	WORD PTR -94[rbp], ax
	lea	rcx, -96[rbp]
	mov	eax, DWORD PTR -120[rbp]
	mov	edx, 28
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L18
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	mov	eax, DWORD PTR -120[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L19
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	pthread_attr_init@PLT
	test	eax, eax
	je	.L20
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	test	eax, eax
	je	.L21
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L21:
	mov	edi, 65534
	call	setgid@PLT
	mov	edi, 65534
	call	setuid@PLT
.L25:
	mov	eax, DWORD PTR -120[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -116[rbp], eax
	cmp	DWORD PTR -116[rbp], 0
	jns	.L22
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	mov	edi, 4
	call	malloc@PLT
	mov	QWORD PTR -104[rbp], rax
	cmp	QWORD PTR -104[rbp], 0
	jne	.L23
	mov	eax, DWORD PTR -116[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L24
.L23:
	mov	rax, QWORD PTR -104[rbp]
	mov	edx, DWORD PTR -116[rbp]
	mov	DWORD PTR [rax], edx
	mov	rdx, QWORD PTR -104[rbp]
	lea	rsi, -64[rbp]
	lea	rax, -112[rbp]
	mov	rcx, rdx
	lea	rdx, reply[rip]
	mov	rdi, rax
	call	pthread_create@PLT
.L24:
	jmp	.L25
	.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	"518671.c"
	.text
	.comm	ident,4,4
	.comm	ident_len,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"reply too big\000"
	.align	2
.LC1:
	.ascii	" : USERID : UNIX : \000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	reply
	.syntax unified
	.arm
	.fpu softvfp
	.type	reply, %function
reply:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #104
	str	r0, [fp, #-96]
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-96]
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L11
.L2:
	ldr	r3, [fp, #-96]
	ldr	r3, [r3]
	str	r3, [fp, #-88]
	ldr	r0, [fp, #-96]
	bl	free
	mov	r3, #5
	str	r3, [fp, #-80]
	mov	r3, #0
	str	r3, [fp, #-76]
	sub	r3, fp, #80
	mov	r2, #8
	str	r2, [sp]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, [fp, #-88]
	bl	setsockopt
	mov	r3, #0
	str	r3, [fp, #-92]
	b	.L4
.L7:
	ldr	r3, [fp, #-92]
	sub	r2, fp, #72
	add	r1, r2, r3
	ldr	r3, [fp, #-92]
	rsb	r3, r3, #64
	mov	r2, r3
	ldr	r0, [fp, #-88]
	bl	read
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bgt	.L5
	ldr	r0, [fp, #-88]
	bl	close
	mov	r3, #0
	b	.L11
.L5:
	ldr	r2, [fp, #-92]
	ldr	r3, [fp, #-84]
	add	r3, r2, r3
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-84]
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-68]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L13
.L4:
	ldr	r3, [fp, #-92]
	cmp	r3, #63
	ble	.L7
	b	.L6
.L13:
	nop
.L6:
	ldr	r3, [fp, #-92]
	cmp	r3, #63
	ble	.L8
	ldr	r0, [fp, #-88]
	bl	close
	mov	r3, #0
	b	.L11
.L8:
	ldr	r3, [fp, #-92]
	cmp	r3, #2
	bgt	.L9
	ldr	r0, [fp, #-88]
	bl	close
	mov	r3, #0
	b	.L11
.L9:
	ldr	r3, .L14+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-92]
	add	r3, r2, r3
	cmp	r3, #45
	ble	.L10
	ldr	r0, .L14+8
	bl	puts
	ldr	r0, [fp, #-88]
	bl	close
	mov	r3, #0
	b	.L11
.L10:
	ldr	r3, [fp, #-92]
	sub	r3, r3, #2
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	sub	r2, fp, #72
	add	r3, r2, r3
	mov	r2, #19
	ldr	r1, .L14+12
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-92]
	add	r3, r3, #19
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	sub	r2, fp, #72
	add	r3, r2, r3
	ldr	r2, .L14+16
	ldr	r1, [r2]
	ldr	r2, .L14+4
	ldr	r2, [r2]
	mov	r0, r3
	bl	memcpy
	ldr	r3, .L14+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-92]
	add	r3, r2, r3
	str	r3, [fp, #-92]
	ldr	r3, [fp, #-92]
	add	r2, r3, #1
	str	r2, [fp, #-92]
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #13
	strb	r2, [r3, #-68]
	ldr	r3, [fp, #-92]
	add	r2, r3, #1
	str	r2, [fp, #-92]
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #10
	strb	r2, [r3, #-68]
	sub	r2, fp, #72
	ldr	r3, [fp, #-92]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r2, [fp, #-92]
	sub	r3, fp, #72
	mov	r1, r3
	ldr	r0, [fp, #-88]
	bl	write
	ldr	r0, [fp, #-88]
	bl	close
	mov	r3, #0
.L11:
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L12
	bl	__stack_chk_fail
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.word	ident_len
	.word	.LC0
	.word	.LC1
	.word	ident
	.size	reply, .-reply
	.section	.rodata
	.align	2
.LC3:
	.ascii	"IDENT\000"
	.align	2
.LC4:
	.ascii	"root\000"
	.align	2
.LC5:
	.ascii	"Using ident %s\012\000"
	.align	2
.LC6:
	.ascii	"Failed to create socket\000"
	.align	2
.LC7:
	.ascii	"Failed to bind to socket\000"
	.align	2
.LC8:
	.ascii	"Failed to start listening\000"
	.align	2
.LC9:
	.ascii	"Failed to configure threads\000"
	.align	2
.LC10:
	.ascii	"Failed to accept() a connection\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-96]
	str	r1, [fp, #-100]
	ldr	r3, .L29
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-96]
	cmp	r3, #2
	bne	.L17
	ldr	r3, [fp, #-100]
	ldr	r3, [r3, #4]
	ldr	r2, .L29+4
	str	r3, [r2]
	b	.L18
.L17:
	ldr	r0, .L29+8
	bl	getenv
	mov	r3, r0
	ldr	r2, .L29+4
	str	r3, [r2]
	ldr	r3, .L29+4
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L18
	ldr	r3, .L29+4
	ldr	r2, .L29+12
	str	r2, [r3]
.L18:
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r3, .L29+16
	str	r2, [r3]
	ldr	r3, .L29+4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L29+20
	bl	printf
	mov	r2, #0
	mov	r1, #1
	mov	r0, #10
	bl	socket
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bge	.L19
	ldr	r0, .L29+24
	bl	perror
	mov	r0, #1
	bl	exit
.L19:
	mov	r3, #10
	strh	r3, [fp, #-72]	@ movhi
	ldr	r3, .L29+28
	sub	ip, fp, #64
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	mov	r0, #113
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-70]	@ movhi
	sub	r3, fp, #72
	mov	r2, #28
	mov	r1, r3
	ldr	r0, [fp, #-84]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L20
	ldr	r0, .L29+32
	bl	perror
	mov	r0, #1
	bl	exit
.L20:
	mov	r1, #5
	ldr	r0, [fp, #-84]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L29+36
	bl	perror
	mov	r0, #1
	bl	exit
.L21:
	sub	r3, fp, #44
	mov	r0, r3
	bl	pthread_attr_init
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	ldr	r0, .L29+40
	bl	perror
	mov	r0, #1
	bl	exit
.L22:
	sub	r3, fp, #44
	mov	r1, #1
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	ldr	r0, .L29+40
	bl	perror
	mov	r0, #1
	bl	exit
.L23:
	ldr	r0, .L29+44
	bl	setgid
	ldr	r0, .L29+44
	bl	setuid
.L27:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-84]
	bl	accept
	str	r0, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bge	.L24
	ldr	r0, .L29+48
	bl	perror
	mov	r0, #1
	bl	exit
.L24:
	mov	r0, #4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L25
	ldr	r0, [fp, #-80]
	bl	close
	b	.L26
.L25:
	ldr	r3, [fp, #-76]
	ldr	r2, [fp, #-80]
	str	r2, [r3]
	sub	r1, fp, #44
	sub	r0, fp, #88
	ldr	r3, [fp, #-76]
	ldr	r2, .L29+52
	bl	pthread_create
.L26:
	b	.L27
.L30:
	.align	2
.L29:
	.word	.LC11
	.word	ident
	.word	.LC3
	.word	.LC4
	.word	ident_len
	.word	.LC5
	.word	.LC6
	.word	in6addr_any
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	65534
	.word	.LC10
	.word	reply
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
