	.file	"893901.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"r"
	.text
	.globl	open_profile
	.type	open_profile, @function
open_profile:
.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, 288
	mov	QWORD PTR -280[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -272[rbp]
	movabs	rcx, 8030604640798471029
	mov	QWORD PTR [rax], rcx
	mov	DWORD PTR 8[rax], 1701603686
	mov	WORD PTR 12[rax], 12147
	mov	BYTE PTR 14[rax], 0
	lea	rax, -272[rbp]
	add	rax, 14
	mov	rdx, QWORD PTR -280[rbp]
	mov	esi, 512
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L2
	mov	eax, 0
	jmp	.L5
.L2:
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	movzx	eax, BYTE PTR -272[rbp+rax]
	cmp	al, 10
	jne	.L4
	lea	rax, -272[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	mov	BYTE PTR -272[rbp+rax], 0
.L4:
	lea	rax, -272[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	fopen@PLT
.L5:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	open_profile, .-open_profile
	.section	.rodata
.LC1:
	.string	"w"
.LC2:
	.string	"fdopen failed"
	.align 8
.LC3:
	.string	"sorry, but I was unable to find that profile.\n"
	.text
	.globl	handle_con
	.type	handle_con, @function
handle_con:
.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, 1104
	mov	QWORD PTR -1096[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1096[rbp]
	mov	DWORD PTR -1076[rbp], eax
	mov	eax, DWORD PTR -1076[rbp]
	lea	rsi, .LC0[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -1072[rbp], rax
	mov	eax, DWORD PTR -1076[rbp]
	mov	edi, eax
	call	dup@PLT
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -1064[rbp], rax
	cmp	QWORD PTR -1072[rbp], 0
	je	.L8
	cmp	QWORD PTR -1064[rbp], 0
	jne	.L9
.L8:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 13
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L9:
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	open_profile
	mov	QWORD PTR -1056[rbp], rax
	cmp	QWORD PTR -1056[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -1064[rbp]
	mov	rcx, rax
	mov	edx, 46
	mov	esi, 1
	lea	rdi, .LC3[rip]
	call	fwrite@PLT
	jmp	.L11
.L13:
	mov	rcx, QWORD PTR -1064[rbp]
	mov	rdx, QWORD PTR -1048[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
.L12:
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	mov	edx, 1024
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	jne	.L13
	nop
.L11:
	mov	rax, QWORD PTR -1072[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	handle_con, .-handle_con
	.section	.rodata
.LC4:
	.string	"accept() failed"
	.align 8
.LC5:
	.string	"unable to prepare pthread attrs"
.LC6:
	.string	"pthread_create failed"
	.text
	.globl	main
	.type	main, @function
main:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -84[rbp], 0
.L21:
	mov	eax, DWORD PTR -84[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -80[rbp], eax
	cmp	DWORD PTR -80[rbp], 0
	jns	.L17
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L17:
	lea	rax, -64[rbp]
	mov	rdi, rax
	call	pthread_attr_init@PLT
	test	eax, eax
	jne	.L18
	lea	rax, -64[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	pthread_attr_setdetachstate@PLT
	test	eax, eax
	je	.L19
.L18:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC5[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	eax, DWORD PTR -80[rbp]
	cdqe
	mov	rdx, rax
	lea	rsi, -64[rbp]
	lea	rax, -72[rbp]
	mov	rcx, rdx
	lea	rdx, handle_con[rip]
	mov	rdi, rax
	call	pthread_create@PLT
	mov	DWORD PTR -76[rbp], eax
	cmp	DWORD PTR -76[rbp], 0
	je	.L21
	call	__errno_location@PLT
	mov	edx, DWORD PTR -76[rbp]
	mov	DWORD PTR [rax], edx
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE8:
	.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	"893901.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"user_profiles/\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	open_profile
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_profile, %function
open_profile:
	@ args = 0, pretend = 0, frame = 272
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #272
	str	r0, [fp, #-272]
	ldr	r3, .L7
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #264
	ldr	r2, .L7+4
	mov	ip, r3
	mov	r3, r2
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strh	r3, [ip]	@ movhi
	add	ip, ip, #2
	lsr	r3, r3, #16
	strb	r3, [ip]
	sub	r3, fp, #264
	add	r3, r3, #14
	ldr	r2, [fp, #-272]
	mov	r1, #512
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	mov	r3, #0
	b	.L5
.L2:
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-260]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L4
	sub	r3, fp, #264
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3, #-260]
.L4:
	sub	r3, fp, #264
	ldr	r1, .L7+8
	mov	r0, r3
	bl	fopen
	mov	r3, r0
.L5:
	ldr	r2, .L7
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	open_profile, .-open_profile
	.section	.rodata
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"fdopen failed\000"
	.align	2
.LC5:
	.ascii	"sorry, but I was unable to find that profile.\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_con
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_con, %function
handle_con:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	str	r0, [fp, #-1056]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1056]
	str	r3, [fp, #-1052]
	ldr	r1, .L18+4
	ldr	r0, [fp, #-1052]
	bl	fdopen
	str	r0, [fp, #-1048]
	ldr	r0, [fp, #-1052]
	bl	dup
	mov	r3, r0
	ldr	r1, .L18+8
	mov	r0, r3
	bl	fdopen
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1048]
	cmp	r3, #0
	beq	.L10
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bne	.L11
.L10:
	ldr	r3, .L18+12
	ldr	r3, [r3]
	mov	r2, #13
	mov	r1, #1
	ldr	r0, .L18+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L11:
	ldr	r0, [fp, #-1048]
	bl	open_profile
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bne	.L14
	ldr	r3, [fp, #-1044]
	mov	r2, #46
	mov	r1, #1
	ldr	r0, .L18+20
	bl	fwrite
	b	.L13
.L15:
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-1044]
	ldr	r2, [fp, #-1036]
	mov	r1, #1
	bl	fwrite
.L14:
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-1040]
	mov	r2, #1024
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L15
	nop
.L13:
	ldr	r0, [fp, #-1048]
	bl	fclose
	ldr	r0, [fp, #-1044]
	bl	fclose
	mov	r3, #0
	ldr	r2, .L18
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	.LC6
	.word	.LC1
	.word	.LC3
	.word	stderr
	.word	.LC4
	.word	.LC5
	.size	handle_con, .-handle_con
	.section	.rodata
	.align	2
.LC7:
	.ascii	"accept() failed\000"
	.align	2
.LC8:
	.ascii	"unable to prepare pthread attrs\000"
	.align	2
.LC9:
	.ascii	"pthread_create failed\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #56
	ldr	r3, .L27
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-56]
.L25:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-56]
	bl	accept
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bge	.L21
	ldr	r0, .L27+4
	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
	bne	.L22
	sub	r3, fp, #44
	mov	r1, #1
	mov	r0, r3
	bl	pthread_attr_setdetachstate
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
.L22:
	ldr	r3, .L27+8
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L27+12
	bl	fwrite
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, [fp, #-52]
	sub	r1, fp, #44
	sub	r0, fp, #60
	ldr	r2, .L27+16
	bl	pthread_create
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L25
	bl	__errno_location
	mov	r2, r0
	ldr	r3, [fp, #-48]
	str	r3, [r2]
	ldr	r0, .L27+20
	bl	perror
	mov	r0, #1
	bl	exit
.L28:
	.align	2
.L27:
	.word	.LC10
	.word	.LC7
	.word	stderr
	.word	.LC8
	.word	handle_con
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
