	.file	"extr_quotafile.c_quota_convert.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s_%d.orig"
	.text
	.p2align 4
	.globl	quota_convert
	.type	quota_convert, @function
quota_convert:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 64
	.cfi_def_cfa_offset 112
	mov	edx, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR O_RDWR[rip]
	and	edx, eax
	cmp	eax, edx
	jne	.L2
	cmp	DWORD PTR 4[rdi], -1
	mov	r12, rdi
	je	.L2
	lea	eax, -32[rsi]
	mov	ebx, esi
	and	eax, -33
	jne	.L5
	cmp	DWORD PTR 8[rdi], esi
	je	.L5
	call	quota_maxid@PLT
	mov	esi, 24
	mov	edi, 1
	mov	r14d, eax
	call	calloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L31
	movdqu	xmm0, XMMWORD PTR [r12]
	lea	rdx, .LC0[rip]
	movups	XMMWORD PTR [rax], xmm0
	mov	rdi, QWORD PTR 16[r12]
	mov	r8d, DWORD PTR 8[r12]
	mov	QWORD PTR 16[rax], rdi
	mov	rax, QWORD PTR MAXPATHLEN[rip]
	mov	rcx, QWORD PTR 16[r12]
	lea	rsi, 1[rax]
	call	snprintf@PLT
	mov	rsi, QWORD PTR 16[rbp]
	mov	rdi, QWORD PTR 16[r12]
	call	rename@PLT
	test	rax, rax
	js	.L32
	mov	rdi, QWORD PTR 16[r12]
	mov	esi, DWORD PTR O_RDWR[rip]
	xor	edx, edx
	or	esi, DWORD PTR O_CREAT[rip]
	or	esi, DWORD PTR O_TRUNC[rip]
	or	esi, DWORD PTR O_CLOEXEC[rip]
	call	open@PLT
	mov	DWORD PTR 4[rbp], eax
	test	eax, eax
	js	.L29
	mov	DWORD PTR 8[rbp], ebx
	cmp	ebx, 64
	je	.L33
.L11:
	mov	edi, DWORD PTR QUOTAGROUP[rip]
	call	getgrnam@PLT
	xor	edx, edx
	test	rax, rax
	je	.L12
	mov	edx, DWORD PTR [rax]
.L12:
	mov	edi, DWORD PTR 4[rbp]
	xor	esi, esi
	call	fchown@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	esi, 416
	call	fchmod@PLT
	test	r14d, r14d
	js	.L13
	xor	ebx, ebx
	lea	r13, 12[rsp]
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L34:
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR errno[rip], eax
.L18:
	add	ebx, 1
	cmp	r14d, ebx
	jl	.L13
.L19:
	mov	edx, ebx
	mov	rsi, r13
	mov	rdi, r12
	call	quota_read@PLT
	test	rax, rax
	js	.L14
	mov	eax, DWORD PTR 8[rbp]
	cmp	eax, 32
	je	.L15
	cmp	eax, 64
	jne	.L34
	mov	edx, ebx
	mov	rsi, r13
	mov	rdi, rbp
	add	ebx, 1
	call	quota_write64@PLT
	cmp	r14d, ebx
	jge	.L19
	.p2align 4,,10
	.p2align 3
.L13:
	mov	eax, DWORD PTR 4[r12]
	mov	edx, DWORD PTR 4[rbp]
	mov	rdi, rbp
	mov	DWORD PTR 4[r12], edx
	mov	DWORD PTR 4[rbp], eax
	mov	eax, DWORD PTR 8[rbp]
	mov	DWORD PTR 8[r12], eax
	call	quota_close@PLT
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L35
	add	rsp, 64
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	edx, ebx
	mov	rsi, r13
	mov	rdi, rbp
	call	quota_write32@PLT
	jmp	.L18
	.p2align 4,,10
	.p2align 3
.L14:
	cmp	r14d, ebx
	jle	.L13
.L29:
.L10:
	endbr64
	mov	rsi, QWORD PTR 16[r12]
	mov	rdi, QWORD PTR 16[rbp]
	mov	ebx, DWORD PTR errno[rip]
	call	rename@PLT
	mov	rdi, rbp
	call	quota_close@PLT
	mov	DWORD PTR errno[rip], ebx
	mov	eax, -1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L33:
	lea	r13, 16[rsp]
	xor	esi, esi
	mov	edx, 32
	mov	rdi, r13
	call	memset@PLT
	mov	esi, DWORD PTR Q_DQHDR64_MAGIC[rip]
	mov	edi, DWORD PTR 40[rsp]
	mov	edx, 4
	call	memcpy@PLT
	mov	edi, DWORD PTR Q_DQHDR64_VERSION[rip]
	call	htobe32@PLT
	mov	edi, 32
	mov	QWORD PTR 32[rsp], rax
	call	htobe32@PLT
	mov	edi, 4
	mov	QWORD PTR 24[rsp], rax
	call	htobe32@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	edx, 32
	mov	rsi, r13
	mov	QWORD PTR 16[rsp], rax
	call	write@PLT
	cmp	eax, 32
	je	.L11
	jmp	.L29
.L2:
	mov	eax, DWORD PTR EBADF[rip]
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
	jmp	.L1
.L5:
	mov	eax, DWORD PTR EINVAL[rip]
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
	jmp	.L1
.L31:
	mov	eax, DWORD PTR ENOMEM[rip]
	mov	DWORD PTR errno[rip], eax
	mov	eax, -1
	jmp	.L1
.L32:
	mov	rdi, rbp
	call	free@PLT
	mov	eax, -1
	jmp	.L1
.L35:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	quota_convert, .-quota_convert
	.comm	errno,4,4
	.comm	Q_DQHDR64_VERSION,4,4
	.comm	Q_DQHDR64_MAGIC,4,4
	.comm	QUOTAGROUP,4,4
	.comm	O_TRUNC,4,4
	.comm	O_RDWR,4,4
	.comm	O_CREAT,4,4
	.comm	O_CLOEXEC,4,4
	.comm	MAXPATHLEN,8,8
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EBADF,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_quotafile.c_quota_convert.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s_%d.orig\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	quota_convert
	.syntax unified
	.arm
	.fpu softvfp
	.type	quota_convert, %function
quota_convert:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r9, .L35
	ldr	r2, [r0]
	ldr	r3, [r9]
	sub	sp, sp, #36
	bics	r3, r3, r2
	ldr	r3, .L35+4
	ldr	r3, [r3]
	str	r3, [sp, #28]
	mov	r3,#0
	bne	.L2
	ldr	r3, [r0, #4]
	mov	r6, r0
	cmn	r3, #1
	beq	.L2
	sub	r8, r1, #32
	bics	r8, r8, #32
	mov	r4, r1
	bne	.L5
	ldr	r3, [r0, #8]
	cmp	r3, r1
	beq	.L5
	bl	quota_maxid
	mov	r1, #16
	mov	r7, r0
	mov	r0, #1
	bl	calloc
	subs	r5, r0, #0
	beq	.L30
	ldm	r6, {r0, r1, r2, r3}
	stm	r5, {r0, r1, r2, r3}
	ldr	r1, .L35+8
	str	r2, [sp]
	ldr	r1, [r1]
	mov	r0, r3
	ldr	r2, .L35+12
	add	r1, r1, #1
	bl	snprintf
	ldr	r1, [r5, #12]
	ldr	r0, [r6, #12]
	bl	rename
	cmp	r0, #0
	blt	.L31
	ldr	r1, .L35+16
	ldr	r2, .L35+20
	ldr	r1, [r1]
	ldr	r3, [r9]
	ldr	r0, .L35+24
	ldr	r2, [r2]
	orr	r3, r3, r1
	ldr	r1, [r0]
	orr	r3, r3, r2
	ldr	r0, [r6, #12]
	mov	r2, r8
	orr	r1, r3, r1
	bl	open
	cmp	r0, #0
	str	r0, [r5, #4]
	blt	.L28
	cmp	r4, #64
	str	r4, [r5, #8]
	beq	.L32
.L11:
	ldr	r3, .L35+28
	ldr	r0, [r3]
	bl	getgrnam
	subs	r2, r0, #0
	ldrne	r2, [r2]
	mov	r1, #0
	ldr	r0, [r5, #4]
	bl	fchown
	mov	r1, #416
	ldr	r0, [r5, #4]
	bl	fchmod
	cmp	r7, #0
	blt	.L13
	mov	r4, #0
	ldr	r9, .L35+32
	ldr	r8, .L35+36
	b	.L19
.L33:
	ldr	r3, [r8]
	str	r3, [r9]
.L18:
	add	r4, r4, #1
	cmp	r7, r4
	blt	.L13
.L19:
	mov	r2, r4
	mov	r0, r6
	add	r1, sp, #8
	bl	quota_read
	cmp	r0, #0
	blt	.L14
	ldr	r3, [r5, #8]
	cmp	r3, #32
	beq	.L15
	cmp	r3, #64
	bne	.L33
	mov	r2, r4
	mov	r0, r5
	add	r1, sp, #8
	add	r4, r4, #1
	bl	quota_write64
	cmp	r7, r4
	bge	.L19
.L13:
	ldr	r1, [r6, #4]
	ldmib	r5, {r2, r3}
	mov	r0, r5
	stmib	r6, {r2, r3}
	str	r1, [r5, #4]
	bl	quota_close
	mov	r0, #0
.L1:
	ldr	r3, .L35+4
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L34
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L15:
	mov	r2, r4
	mov	r0, r5
	add	r1, sp, #8
	bl	quota_write32
	b	.L18
.L14:
	cmp	r7, r4
	ble	.L13
.L28:
.L10:
	ldr	r4, .L35+32
	ldr	r1, [r6, #12]
	ldr	r7, [r4]
	ldr	r0, [r5, #12]
	bl	rename
	mov	r0, r5
	bl	quota_close
	mvn	r0, #0
	str	r7, [r4]
	b	.L1
.L32:
	ldr	r3, .L35+40
	mov	r2, #4
	ldr	r1, [r3]
	mov	r0, r8
	str	r8, [sp, #12]
	str	r8, [sp, #16]
	str	r8, [sp, #20]
	str	r8, [sp, #24]
	bl	memcpy
	ldr	r3, .L35+44
	ldr	r0, [r3]
	bl	htobe32
	mov	r3, r0
	mov	r0, #16
	str	r3, [sp, #20]
	bl	htobe32
	mov	r3, r0
	mov	r0, #4
	str	r3, [sp, #16]
	bl	htobe32
	mov	r3, r0
	mov	r2, #16
	ldr	r0, [r5, #4]
	add	r1, sp, #12
	str	r3, [sp, #12]
	bl	write
	cmp	r0, #16
	beq	.L11
	b	.L28
.L2:
	ldr	r2, .L35+48
	ldr	r3, .L35+32
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	b	.L1
.L5:
	ldr	r2, .L35+36
	ldr	r3, .L35+32
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	b	.L1
.L31:
	mov	r0, r5
	bl	free
	mvn	r0, #0
	b	.L1
.L30:
	ldr	r2, .L35+52
	ldr	r3, .L35+32
	ldr	r2, [r2]
	mvn	r0, #0
	str	r2, [r3]
	b	.L1
.L34:
	bl	__stack_chk_fail
.L36:
	.align	2
.L35:
	.word	O_RDWR
	.word	.LC1
	.word	MAXPATHLEN
	.word	.LC0
	.word	O_CREAT
	.word	O_TRUNC
	.word	O_CLOEXEC
	.word	QUOTAGROUP
	.word	errno
	.word	EINVAL
	.word	Q_DQHDR64_MAGIC
	.word	Q_DQHDR64_VERSION
	.word	EBADF
	.word	ENOMEM
	.size	quota_convert, .-quota_convert
	.comm	errno,4,4
	.comm	Q_DQHDR64_VERSION,4,4
	.comm	Q_DQHDR64_MAGIC,4,4
	.comm	QUOTAGROUP,4,4
	.comm	O_TRUNC,4,4
	.comm	O_RDWR,4,4
	.comm	O_CREAT,4,4
	.comm	O_CLOEXEC,4,4
	.comm	MAXPATHLEN,4,4
	.comm	ENOMEM,4,4
	.comm	EINVAL,4,4
	.comm	EBADF,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
