	.file	"extr_namei_msdos.c_msdos_create.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	msdos_create, @function
msdos_create:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	mov	r13, rsi
	push	r12
	.cfi_offset 12, -48
	mov	r12, rdi
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -56
	mov	r14, QWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MSDOS_NAME[rip]
	mov	rcx, rsp
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L18:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L18
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L19
.L4:
	mov	rdi, r14
	mov	QWORD PTR -88[rbp], rsp
	call	MSDOS_SB@PLT
	mov	rdi, rax
	call	mutex_lock@PLT
	mov	rdi, r14
	call	MSDOS_SB@PLT
	mov	esi, DWORD PTR 8[r13]
	mov	rdi, QWORD PTR 0[r13]
	mov	rdx, rsp
	lea	rcx, 4[rax]
	call	msdos_format_name@PLT
	mov	r15d, eax
	test	eax, eax
	jne	.L5
	mov	rax, QWORD PTR 0[r13]
	cmp	BYTE PTR [rax], 46
	jne	.L6
	xor	r15d, r15d
	cmp	BYTE PTR [rsp], 46
	setne	r15b
.L6:
	lea	rbx, -68[rbp]
	mov	rsi, QWORD PTR -88[rbp]
	mov	rdi, r12
	mov	rdx, rbx
	call	fat_scan@PLT
	test	eax, eax
	je	.L20
	mov	rdi, r12
	call	current_time@PLT
	sub	rsp, 8
	mov	rsi, QWORD PTR -88[rbp]
	mov	ecx, r15d
	push	rbx
	lea	r9, -72[rbp]
	xor	edx, edx
	xor	r8d, r8d
	mov	rdi, r12
	mov	DWORD PTR -72[rbp], eax
	mov	QWORD PTR -96[rbp], r9
	call	msdos_add_entry@PLT
	mov	r15d, eax
	pop	rax
	pop	rdx
	test	r15d, r15d
	jne	.L5
	mov	edx, DWORD PTR -64[rbp]
	mov	esi, DWORD PTR -60[rbp]
	mov	rdi, r14
	call	fat_build_inode@PLT
	mov	edi, DWORD PTR -68[rbp]
	mov	rbx, rax
	call	brelse@PLT
	mov	rdi, rbx
	call	IS_ERR@PLT
	mov	r9, QWORD PTR -96[rbp]
	test	rax, rax
	jne	.L21
	mov	rsi, r9
	mov	edx, DWORD PTR S_ATIME[rip]
	mov	rdi, rbx
	or	edx, DWORD PTR S_CTIME[rip]
	or	edx, DWORD PTR S_MTIME[rip]
	call	fat_truncate_time@PLT
	mov	rsi, rbx
	mov	rdi, r13
	call	d_instantiate@PLT
	mov	rdi, r14
	call	MSDOS_SB@PLT
	mov	rdi, rax
	call	mutex_unlock@PLT
.L10:
	mov	rdx, rbx
	mov	rsi, r12
	mov	rdi, r14
	call	fat_flush_inodes@PLT
	mov	r15d, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, r14
	call	MSDOS_SB@PLT
	mov	rdi, rax
	call	mutex_unlock@PLT
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L22
	lea	rsp, -40[rbp]
	mov	eax, r15d
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	edi, DWORD PTR -68[rbp]
	xor	ebx, ebx
	call	brelse@PLT
	mov	r15d, DWORD PTR EINVAL[rip]
	neg	r15d
.L8:
	mov	rdi, r14
	call	MSDOS_SB@PLT
	mov	rdi, rax
	call	mutex_unlock@PLT
	test	r15d, r15d
	je	.L10
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdi, rbx
	call	PTR_ERR@PLT
	mov	r15d, eax
	jmp	.L8
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	msdos_create, .-msdos_create
	.comm	S_MTIME,4,4
	.comm	S_CTIME,4,4
	.comm	S_ATIME,4,4
	.comm	MSDOS_NAME,4,4
	.comm	EINVAL,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_namei_msdos.c_msdos_create.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	msdos_create, %function
msdos_create:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #44
	mov	r6, r1
	ldr	r3, .L16
	ldr	r7, [r0]
	ldr	r3, [r3]
	mov	r5, r0
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	ldr	r3, .L16+4
	mov	r0, r7
	ldr	r3, [r3]
	str	r3, [fp, #-40]
	mov	r3,#0
	bl	MSDOS_SB
	bl	mutex_lock
	ldm	r6, {r4, r8}
	mov	r0, r7
	bl	MSDOS_SB
	mov	r3, r0
	add	r9, sp, #16
	mov	r0, r4
	mov	r1, r8
	mov	r2, r9
	add	r3, r3, #4
	bl	msdos_format_name
	subs	r4, r0, #0
	bne	.L2
	ldr	r3, [r6]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #46
	beq	.L12
.L3:
	mov	r1, r9
	mov	r0, r5
	sub	r2, fp, #52
	bl	fat_scan
	subs	r8, r0, #0
	beq	.L13
	mov	r0, r5
	bl	current_time
	mov	r2, #0
	mov	ip, r0
	sub	r3, fp, #52
	sub	r10, fp, #56
	str	r3, [sp, #8]
	mov	r1, r9
	mov	r3, r4
	mov	r0, r5
	stm	sp, {r2, r10}
	str	ip, [fp, #-56]
	bl	msdos_add_entry
	subs	r4, r0, #0
	bne	.L2
	ldr	r2, [fp, #-48]
	ldr	r1, [fp, #-44]
	mov	r0, r7
	bl	fat_build_inode
	mov	r8, r0
	ldr	r0, [fp, #-52]
	bl	brelse
	mov	r0, r8
	bl	IS_ERR
	cmp	r0, #0
	bne	.L14
	ldr	r3, .L16+8
	ldr	r1, .L16+12
	ldr	r2, .L16+16
	ldr	r1, [r1]
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r1
	orr	r2, r3, r2
	mov	r1, r10
	mov	r0, r8
	bl	fat_truncate_time
	mov	r1, r8
	mov	r0, r6
	bl	d_instantiate
	mov	r0, r7
	bl	MSDOS_SB
	bl	mutex_unlock
.L7:
	mov	r2, r8
	mov	r1, r5
	mov	r0, r7
	bl	fat_flush_inodes
	mov	r4, r0
	b	.L1
.L2:
	mov	r0, r7
	bl	MSDOS_SB
	bl	mutex_unlock
.L1:
	ldr	r3, .L16+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r4
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L13:
	ldr	r0, [fp, #-52]
	bl	brelse
	ldr	r3, .L16+20
	ldr	r0, [r3]
	rsb	r4, r0, #0
.L5:
	mov	r0, r7
	bl	MSDOS_SB
	bl	mutex_unlock
	cmp	r4, #0
	beq	.L7
	b	.L1
.L12:
	ldrb	r0, [r9]	@ zero_extendqisi2
	subs	r4, r0, #46
	movne	r4, #1
	b	.L3
.L14:
	mov	r0, r8
	bl	PTR_ERR
	mov	r4, r0
	b	.L5
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	MSDOS_NAME
	.word	.LC0
	.word	S_ATIME
	.word	S_CTIME
	.word	S_MTIME
	.word	EINVAL
	.size	msdos_create, .-msdos_create
	.comm	S_MTIME,4,4
	.comm	S_CTIME,4,4
	.comm	S_ATIME,4,4
	.comm	MSDOS_NAME,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
