	.file	"extr_check.c_rename_file.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"Cannot rename FAT32 root dir\n"
.LC1:
	.string	"New name: "
	.text
	.p2align 4
	.type	rename_file, @function
rename_file:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	rbp, .LC1[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 64
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR 16[rdi]
	mov	rbx, rsp
	test	eax, eax
	je	.L34
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, rbp
	call	printf@PLT
	mov	edi, DWORD PTR stdout[rip]
	call	fflush@PLT
	mov	edx, DWORD PTR stdin[rip]
	mov	esi, 45
	mov	rdi, rbx
	call	fgets@PLT
	test	rax, rax
	je	.L4
	mov	esi, 10
	mov	rdi, rbx
	call	strchr@PLT
	test	rax, rax
	je	.L5
	mov	BYTE PTR [rax], 0
.L5:
	mov	rax, rbx
.L6:
	mov	ecx, DWORD PTR [rax]
	add	rax, 4
	lea	edx, -16843009[rcx]
	not	ecx
	and	edx, ecx
	and	edx, -2139062144
	je	.L6
	mov	ecx, edx
	shr	ecx, 16
	test	edx, 32896
	cmove	edx, ecx
	lea	rcx, 2[rax]
	cmove	rax, rcx
	mov	esi, edx
	add	sil, dl
	sbb	rax, 3
	cmp	rax, rbx
	jnb	.L8
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L10:
	sub	rax, 1
	cmp	rax, rbx
	jb	.L9
.L8:
	movzx	edx, BYTE PTR [rax]
	cmp	dl, 32
	je	.L10
	cmp	dl, 9
	je	.L10
.L9:
	mov	BYTE PTR 1[rax], 0
	movzx	eax, BYTE PTR [rsp]
	mov	rdi, rbx
	cmp	al, 9
	je	.L27
	cmp	al, 32
	jne	.L11
	.p2align 4,,10
	.p2align 3
.L27:
	movzx	eax, BYTE PTR 1[rdi]
	add	rdi, 1
	cmp	al, 32
	je	.L27
	cmp	al, 9
	je	.L27
.L11:
	mov	rsi, QWORD PTR 8[r12]
	call	file_cvt@PLT
	test	rax, rax
	je	.L4
	mov	edx, DWORD PTR [r12]
	mov	eax, DWORD PTR FAT_NO_83NAME[rip]
	mov	rsi, QWORD PTR MSDOS_NAME[rip]
	mov	edi, DWORD PTR 16[r12]
	test	edx, eax
	jne	.L35
	mov	rdx, QWORD PTR 8[r12]
	call	fs_write@PLT
	cmp	QWORD PTR 24[r12], 0
	jne	.L36
.L1:
	mov	rax, QWORD PTR 56[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L37
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L35:
	.cfi_restore_state
	not	eax
	add	rsi, 2
	and	eax, edx
	mov	rdx, r12
	mov	DWORD PTR [r12], eax
	mov	eax, DWORD PTR ATTR_DIR[rip]
	or	eax, DWORD PTR ATTR_VOLUME[rip]
	not	eax
	and	DWORD PTR 4[r12], eax
	call	fs_write@PLT
	cmp	QWORD PTR 24[r12], 0
	je	.L1
.L36:
	mov	rdx, QWORD PTR 8[r12]
	mov	esi, DWORD PTR 16[r12]
	mov	edi, DWORD PTR 20[r12]
	call	lfn_fix_checksum@PLT
	jmp	.L1
.L34:
	lea	rdi, .LC0[rip]
	call	printf@PLT
	jmp	.L1
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	rename_file, .-rename_file
	.comm	stdout,4,4
	.comm	stdin,4,4
	.comm	MSDOS_NAME,8,8
	.comm	FAT_NO_83NAME,4,4
	.comm	ATTR_VOLUME,4,4
	.comm	ATTR_DIR,4,4
	.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_check.c_rename_file.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Cannot rename FAT32 root dir\012\000"
	.align	2
.LC1:
	.ascii	"New name: \000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	rename_file, %function
rename_file:
	@ args = 0, pretend = 0, frame = 56
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, [r0, #12]
	ldr	r2, .L34
	sub	sp, sp, #60
	cmp	r3, #0
	ldr	r2, [r2]
	str	r2, [sp, #52]
	mov	r2,#0
	beq	.L28
	mov	r8, r0
	mov	r9, #0
	ldr	r7, .L34+4
	ldr	r6, .L34+8
	ldr	r5, .L34+12
	add	r4, sp, #4
.L4:
	mov	r0, r5
	bl	printf
	ldr	r0, [r7]
	bl	fflush
	mov	r1, #45
	mov	r0, r4
	ldr	r2, [r6]
	bl	fgets
	cmp	r0, #0
	beq	.L4
	mov	r1, #10
	mov	r0, r4
	bl	strchr
	cmp	r0, #0
	strbne	r9, [r0]
	mov	r0, r4
	bl	strlen
	adds	r0, r4, r0
	bcc	.L6
	b	.L7
.L8:
	sub	r0, r0, #1
	cmp	r0, r4
	bcc	.L7
.L6:
	ldrb	r3, [r0]	@ zero_extendqisi2
	cmp	r3, #9
	cmpne	r3, #32
	beq	.L8
.L7:
	ldrb	r3, [sp, #4]	@ zero_extendqisi2
	strb	r9, [r0, #1]
	cmp	r3, #32
	cmpne	r3, #9
	mov	r0, r4
	bne	.L9
.L10:
	ldrb	r3, [r0, #1]!	@ zero_extendqisi2
	cmp	r3, #9
	cmpne	r3, #32
	beq	.L10
.L9:
	ldr	r1, [r8, #8]
	bl	file_cvt
	cmp	r0, #0
	beq	.L4
	ldr	r2, .L34+16
	ldr	r3, [r8]
	ldr	r2, [r2]
	ldr	r1, .L34+20
	tst	r3, r2
	ldr	r1, [r1]
	ldr	r0, [r8, #12]
	bne	.L31
	ldr	r2, [r8, #8]
	bl	fs_write
	ldr	r3, [r8, #20]
	cmp	r3, #0
	bne	.L32
.L1:
	ldr	r3, .L34
	ldr	r2, [r3]
	ldr	r3, [sp, #52]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L33
	add	sp, sp, #60
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L31:
	ldr	ip, .L34+24
	ldr	lr, .L34+28
	ldr	ip, [ip]
	ldr	lr, [lr]
	bic	r3, r3, r2
	ldr	r2, [r8, #4]
	orr	ip, ip, lr
	str	r3, [r8]
	bic	r3, r2, ip
	str	r3, [r8, #4]
	mov	r2, r8
	add	r1, r1, #2
	bl	fs_write
	ldr	r3, [r8, #20]
	cmp	r3, #0
	beq	.L1
.L32:
	ldr	r2, [r8, #8]
	ldr	r1, [r8, #12]
	ldr	r0, [r8, #16]
	bl	lfn_fix_checksum
	b	.L1
.L28:
	ldr	r0, .L34+32
	bl	printf
	b	.L1
.L33:
	bl	__stack_chk_fail
.L35:
	.align	2
.L34:
	.word	.LC2
	.word	stdout
	.word	stdin
	.word	.LC1
	.word	FAT_NO_83NAME
	.word	MSDOS_NAME
	.word	ATTR_DIR
	.word	ATTR_VOLUME
	.word	.LC0
	.size	rename_file, .-rename_file
	.comm	stdout,4,4
	.comm	stdin,4,4
	.comm	MSDOS_NAME,4,4
	.comm	FAT_NO_83NAME,4,4
	.comm	ATTR_VOLUME,4,4
	.comm	ATTR_DIR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
