	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_quota_convert                  ## -- Begin function quota_convert
	.p2align	4, 0x90
_quota_convert:                         ## @quota_convert
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_O_RDWR@GOTPCREL(%rip), %r15
	notl	%eax
	testl	%eax, (%r15)
	jne	LBB0_2
## %bb.1:
	movq	%rdi, %r13
	cmpl	$-1, 4(%rdi)
	je	LBB0_2
## %bb.4:
	movl	%esi, %ebx
	cmpl	$64, %esi
	je	LBB0_6
## %bb.5:
	cmpl	$32, %ebx
	jne	LBB0_7
LBB0_6:
	cmpl	%ebx, 8(%r13)
	jne	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_2:
	movq	_EBADF@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_31:
	movl	$-1, %eax
LBB0_32:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r13, %rdi
	callq	_quota_maxid
	movl	%eax, %r12d
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r14
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	16(%r13), %r12
	movq	%r12, 16(%rax)
	movups	(%r13), %xmm0
	movups	%xmm0, (%rax)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	incq	%rsi
	movq	16(%r13), %rcx
	movl	8(%r13), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_snprintf
	movq	16(%r13), %rdi
	movq	%r12, %rsi
	callq	_rename
	testq	%rax, %rax
	js	LBB0_11
## %bb.12:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	16(%r13), %rdi
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	js	LBB0_30
## %bb.13:
	movl	%eax, %r15d
	movl	%ebx, 8(%r14)
	cmpl	$64, %ebx
	jne	LBB0_15
## %bb.14:
	leaq	-88(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	-64(%rbp), %edi
	movq	_Q_DQHDR64_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edx
	callq	_memcpy
	movq	_Q_DQHDR64_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_htobe32
	movq	%rax, -72(%rbp)
	movl	$32, %edi
	callq	_htobe32
	movq	%rax, -80(%rbp)
	movl	$4, %edi
	callq	_htobe32
	movq	%rax, -88(%rbp)
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_write
	cmpl	$32, %eax
	jne	LBB0_30
LBB0_15:
	movq	_QUOTAGROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getgrnam
	xorl	%ebx, %ebx
	movl	$0, %edx
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	(%rax), %edx
LBB0_17:
	movl	%r15d, %edi
	xorl	%esi, %esi
	callq	_fchown
	movl	%r15d, %edi
	movl	$416, %esi                      ## imm = 0x1A0
	callq	_fchmod
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	js	LBB0_28
## %bb.18:
	leal	1(%rax), %r12d
	xorl	%ebx, %ebx
	leaq	-56(%rbp), %r15
	jmp	LBB0_19
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_25:                                ##   in Loop: Header=BB0_19 Depth=1
	incl	%ebx
	cmpl	%ebx, %r12d
	je	LBB0_26
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_quota_read
	testq	%rax, %rax
	js	LBB0_27
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movl	8(%r14), %eax
	cmpl	$64, %eax
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpl	$32, %eax
	jne	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_quota_write32
	jmp	LBB0_25
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_quota_write64
	jmp	LBB0_25
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_11:
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_31
LBB0_26:
	movl	%r12d, %ebx
LBB0_27:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_28:
	cmpl	%eax, %ebx
	jge	LBB0_33
## %bb.29:
	movq	16(%r14), %r12
LBB0_30:
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movq	16(%r13), %rsi
	movq	%r12, %rdi
	callq	_rename
	movq	%r14, %rdi
	callq	_quota_close
	movl	%ebx, (%r15)
	jmp	LBB0_31
LBB0_33:
	movl	4(%r13), %eax
	movl	4(%r14), %ecx
	movl	%ecx, 4(%r13)
	movl	%eax, 4(%r14)
	movl	8(%r14), %eax
	movl	%eax, 8(%r13)
	movq	%r14, %rdi
	callq	_quota_close
	xorl	%eax, %eax
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_EBADF,4,2                      ## @EBADF
	.comm	_errno,4,2                      ## @errno
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MAXPATHLEN,8,3                 ## @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s_%d.orig"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_Q_DQHDR64_MAGIC,4,2            ## @Q_DQHDR64_MAGIC
	.comm	_Q_DQHDR64_VERSION,4,2          ## @Q_DQHDR64_VERSION
	.comm	_QUOTAGROUP,4,2                 ## @QUOTAGROUP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_quota_convert                  ; -- Begin function quota_convert
	.p2align	2
_quota_convert:                         ; @quota_convert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	w8, [x0]
Lloh0:
	adrp	x24, _O_RDWR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _O_RDWR@GOTPAGEOFF]
	ldr	w9, [x24]
	bics	wzr, w9, w8
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #4]
	cmn	w8, #1
	b.eq	LBB0_6
; %bb.2:
	mov	x23, x1
	cmp	w1, #64
	b.eq	LBB0_4
; %bb.3:
	cmp	w23, #32
	b.ne	LBB0_5
LBB0_4:
	ldr	w8, [x19, #8]
	cmp	w8, w23
	b.ne	LBB0_10
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _EBADF@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBADF@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _errno@GOTPAGE
Lloh7:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh8:
	str	w8, [x9]
LBB0_8:
	mov	w0, #-1
LBB0_9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	mov	x0, x19
	bl	_quota_maxid
	mov	x21, x0
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	cbz	x0, LBB0_17
; %bb.11:
	mov	x20, x0
	ldr	q0, [x19]
	str	q0, [x0]
	ldr	x22, [x19, #16]
	str	x22, [x0, #16]
Lloh9:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x1, x8, #1
	ldr	w4, [x19, #8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x22
	mov	x3, x22
	bl	_snprintf
	ldr	x0, [x19, #16]
	mov	x1, x22
	bl	_rename
	tbnz	x0, #63, LBB0_18
; %bb.12:
	ldr	x0, [x19, #16]
	ldr	w8, [x24]
Lloh14:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh20:
	adrp	x9, _O_CLOEXEC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _O_CLOEXEC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #0
	bl	_open
	str	w0, [x20, #4]
	tbnz	w0, #31, LBB0_32
; %bb.13:
	mov	x24, x0
	str	w23, [x20, #8]
	cmp	w23, #64
	b.ne	LBB0_15
; %bb.14:
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w0, [sp, #40]
Lloh23:
	adrp	x8, _Q_DQHDR64_MAGIC@GOTPAGE
Lloh24:
	ldr	x8, [x8, _Q_DQHDR64_MAGIC@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	w2, #4
	bl	_memcpy
Lloh26:
	adrp	x8, _Q_DQHDR64_VERSION@GOTPAGE
Lloh27:
	ldr	x8, [x8, _Q_DQHDR64_VERSION@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_htobe32
	str	x0, [sp, #32]
	mov	w0, #32
	bl	_htobe32
	str	x0, [sp, #24]
	mov	w0, #4
	bl	_htobe32
	str	x0, [sp, #16]
	add	x1, sp, #16
	mov	x0, x24
	mov	w2, #32
	bl	_write
	cmp	w0, #32
	b.ne	LBB0_32
LBB0_15:
Lloh29:
	adrp	x8, _QUOTAGROUP@GOTPAGE
Lloh30:
	ldr	x8, [x8, _QUOTAGROUP@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	bl	_getgrnam
	cbz	x0, LBB0_19
; %bb.16:
	ldr	w2, [x0]
	b	LBB0_20
LBB0_17:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_18:
	mov	x0, x20
	bl	_free
	b	LBB0_8
LBB0_19:
	mov	w2, #0
LBB0_20:
	mov	x0, x24
	mov	w1, #0
	bl	_fchown
	mov	x0, x24
	mov	w1, #416
	bl	_fchmod
	mov	w22, #0
	tbnz	w21, #31, LBB0_30
; %bb.21:
	add	w23, w21, #1
Lloh34:
	adrp	x24, _EINVAL@GOTPAGE
Lloh35:
	ldr	x24, [x24, _EINVAL@GOTPAGEOFF]
Lloh36:
	adrp	x25, _errno@GOTPAGE
Lloh37:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	ldr	w8, [x24]
	str	w8, [x25]
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	w22, w22, #1
	cmp	w23, w22
	b.eq	LBB0_29
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x22
	bl	_quota_read
	tbnz	x0, #63, LBB0_30
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	w8, [x20, #8]
	cmp	w8, #64
	b.eq	LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	cmp	w8, #32
	b.ne	LBB0_22
; %bb.27:                               ;   in Loop: Header=BB0_24 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x22
	bl	_quota_write32
	b	LBB0_23
LBB0_28:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x1, sp, #8
	mov	x0, x20
	mov	x2, x22
	bl	_quota_write64
	b	LBB0_23
LBB0_29:
	mov	x22, x23
LBB0_30:
	cmp	w22, w21
	b.ge	LBB0_33
; %bb.31:
	ldr	x22, [x20, #16]
LBB0_32:
Lloh38:
	adrp	x21, _errno@GOTPAGE
Lloh39:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w23, [x21]
	ldr	x1, [x19, #16]
	mov	x0, x22
	bl	_rename
	mov	x0, x20
	bl	_quota_close
	str	w23, [x21]
	b	LBB0_8
LBB0_33:
	ldr	w8, [x19, #4]
	ldur	d0, [x20, #4]
	str	w8, [x20, #4]
	stur	d0, [x19, #4]
	mov	x0, x20
	bl	_quota_close
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_EBADF,4,2                      ; @EBADF
	.comm	_errno,4,2                      ; @errno
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MAXPATHLEN,8,3                 ; @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s_%d.orig"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_Q_DQHDR64_MAGIC,4,2            ; @Q_DQHDR64_MAGIC
	.comm	_Q_DQHDR64_VERSION,4,2          ; @Q_DQHDR64_VERSION
	.comm	_QUOTAGROUP,4,2                 ; @QUOTAGROUP
.subsections_via_symbols
