	.file	"extr_43956.c_ReadName.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ReadName
	.type	ReadName, @function
ReadName:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	edi, 256
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	DWORD PTR [rdx], 1
	call	malloc@PLT
	mov	BYTE PTR [rax], 0
	mov	r13, rax
	movzx	eax, BYTE PTR [rbx]
	test	al, al
	je	.L3
	xor	edx, edx
	xor	edi, edi
	xor	ecx, ecx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L21:
	movzx	edx, BYTE PTR 1[rbx]
	sal	eax, 8
	lea	ebx, -49152[rax+rdx]
	mov	edx, 1
	movsx	rbx, ebx
	add	rbx, r12
.L5:
	movzx	eax, BYTE PTR [rbx]
	test	al, al
	je	.L20
.L2:
	lea	r8, 0[r13+rcx]
	cmp	al, -65
	ja	.L21
	lea	ecx, 1[rdi]
	mov	BYTE PTR [r8], al
	add	rbx, 1
	mov	rdi, rcx
	lea	r8, 0[r13+rcx]
	test	edx, edx
	jne	.L5
	add	DWORD PTR 0[rbp], 1
	movzx	eax, BYTE PTR [rbx]
	test	al, al
	jne	.L2
.L20:
	mov	BYTE PTR [r8], 0
	cmp	edx, 1
	je	.L22
.L3:
	mov	rdi, r13
	lea	rbp, 1[r13]
	lea	rbx, 2[r13]
	xor	r12d, r12d
	call	strlen@PLT
	movsx	rcx, r12d
	cmp	r12d, eax
	jge	.L23
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rax, 0[r13+rcx]
	movzx	edx, BYTE PTR [rax]
	test	dl, dl
	je	.L8
	movzx	esi, dl
	lea	rax, 0[rbp+rcx]
	add	rcx, rbx
	lea	edx, -1[rsi]
	add	rcx, rdx
	.p2align 4,,10
	.p2align 3
.L9:
	movzx	edx, BYTE PTR [rax]
	add	rax, 1
	mov	BYTE PTR -2[rax], dl
	cmp	rcx, rax
	jne	.L9
	add	r12d, esi
	movsx	rax, r12d
	add	rax, r13
.L8:
	mov	BYTE PTR [rax], 46
	mov	rdi, r13
	add	r12d, 1
	call	strlen@PLT
	movsx	rcx, r12d
	cmp	r12d, eax
	jl	.L10
.L23:
	mov	BYTE PTR -1[r13+rcx], 0
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r13
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L22:
	.cfi_restore_state
	add	DWORD PTR 0[rbp], 1
	jmp	.L3
	.cfi_endproc
.LFE0:
	.size	ReadName, .-ReadName
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_43956.c_ReadName.c"
	.text
	.align	2
	.global	ReadName
	.syntax unified
	.arm
	.fpu softvfp
	.type	ReadName, %function
ReadName:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #1
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	str	r3, [r2]
	mov	r0, #256
	mov	r6, r2
	mov	r7, r1
	bl	malloc
	mov	r2, #0
	ldrb	r3, [r4]	@ zero_extendqisi2
	mov	r5, r0
	cmp	r3, r2
	strb	r2, [r0]
	beq	.L3
	mov	r0, r2
	mov	r1, r5
	b	.L2
.L20:
	ldrb	r4, [r4, #1]	@ zero_extendqisi2
	mov	r0, #1
	add	r4, r4, r3, lsl #8
	sub	r4, r4, #49152
	add	r4, r7, r4
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L19
.L2:
	cmp	r3, #191
	bhi	.L20
	cmp	r0, #0
	strb	r3, [r1]
	ldreq	r3, [r6]
	add	r4, r4, #1
	addeq	r3, r3, #1
	streq	r3, [r6]
	ldrb	r3, [r4]	@ zero_extendqisi2
	add	r2, r2, #1
	cmp	r3, #0
	add	r1, r5, r2
	bne	.L2
.L19:
	cmp	r0, #1
	strb	r3, [r1]
	ldreq	r3, [r6]
	addeq	r3, r3, #1
	streq	r3, [r6]
.L3:
	mov	r0, r5
	mov	r4, #0
	bl	strlen
	cmp	r0, r4
	mov	r6, #46
	add	r7, r5, #1
	ble	.L21
.L10:
	ldrb	ip, [r5, r4]	@ zero_extendqisi2
	add	r3, r5, r4
	cmp	ip, #0
	beq	.L8
	add	r3, r7, r4
	add	r1, ip, r3
.L9:
	ldrb	r2, [r3]	@ zero_extendqisi2
	add	r3, r3, #1
	strb	r2, [r3, #-2]
	cmp	r1, r3
	bne	.L9
	add	r4, ip, r4
	add	r3, r5, r4
.L8:
	mov	r0, r5
	strb	r6, [r3]
	bl	strlen
	add	r4, r4, #1
	cmp	r0, r4
	bgt	.L10
.L21:
	mov	r3, #0
	add	r4, r5, r4
	mov	r0, r5
	strb	r3, [r4, #-1]
	pop	{r4, r5, r6, r7, r8, pc}
	.size	ReadName, .-ReadName
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
