	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_quota_open                     ## -- Begin function quota_open
	.p2align	4, 0x90
_quota_open:                            ## @quota_open
	.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	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %r13
	movl	$1, %edi
	movl	$28, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r12
	movl	$-1, (%rax)
	movl	%r14d, 4(%rax)
	movl	20(%rax), %ebx
	movl	4(%r13), %esi
	movl	%ebx, %edi
	movl	$4, %edx
	callq	_strlcpy
	leaq	-48(%rbp), %rsi
	movl	%ebx, %edi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_8
LBB0_2:
	movl	(%r12), %edi
LBB0_3:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	cmpl	$-1, %edi
	je	LBB0_5
## %bb.4:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_close
LBB0_5:
	movq	%r12, %rdi
	callq	_free
	movl	%ebx, (%r14)
LBB0_6:
	xorl	%r12d, %r12d
LBB0_7:
	movq	%r12, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movl	-48(%rbp), %eax
	movl	%eax, 24(%r12)
	movq	_Q_GETQUOTASIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, %esi
	callq	_QCMD
	movl	%eax, %r15d
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%r12, %rcx
	addq	$8, %rcx
	movl	%ebx, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_quotactl
	testq	%rax, %rax
	je	LBB0_7
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	jmp	LBB0_2
LBB0_11:
	movl	16(%r12), %edx
	movq	%r13, %rdi
	movl	%r14d, %esi
	movl	$4, %ecx
	callq	_hasquota
	movl	%eax, %r13d
	movq	%r12, %r14
	addq	$8, %r14
	movl	%ebx, %edi
	movl	%r15d, %esi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_quotactl
	testq	%rax, %rax
	je	LBB0_7
## %bb.12:
	testl	%r13d, %r13d
	je	LBB0_18
## %bb.13:
	movq	_O_ACCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
	andl	%ebx, %esi
	movl	%esi, 12(%r12)
	movl	16(%r12), %edi
	movq	_O_CLOEXEC@GOTPCREL(%rip), %r15
	orl	(%r15), %esi
	xorl	%eax, %eax
	callq	_open
	movl	%eax, (%r12)
	testl	%eax, %eax
	js	LBB0_20
LBB0_14:
	movl	$32, (%r14)
	leaq	-88(%rbp), %rsi
	movl	%eax, %edi
	movl	$32, %edx
	callq	_read
	cmpl	$-1, %eax
	je	LBB0_2
## %bb.15:
	cmpl	$32, %eax
	jne	LBB0_17
## %bb.16:
	movl	-64(%rbp), %edi
	movq	_Q_DQHDR64_MAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_28
LBB0_17:
	movl	$32, (%r14)
	jmp	LBB0_7
LBB0_18:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
LBB0_19:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_2
LBB0_20:
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%ebx
	testl	%ebx, %esi
	jne	LBB0_2
## %bb.21:
	cmpl	$-1, %eax
	jne	LBB0_14
## %bb.22:
	movl	16(%r12), %edi
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_O_TRUNC@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	orl	(%r15), %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
	callq	_open
	movq	%rax, %rdi
	movl	%edi, (%r12)
	testl	%edi, %edi
	js	LBB0_3
## %bb.23:
	movl	$64, 8(%r12)
	leaq	-88(%rbp), %rbx
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movl	-64(%rbp), %edi
	movq	_Q_DQHDR64_MAGIC@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	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	(%r12), %edi
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_write
	cmpl	$32, %eax
	jne	LBB0_33
## %bb.24:
	movq	_QUOTAGROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getgrnam
	movl	(%r12), %edi
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movl	(%rax), %r14d
LBB0_26:
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_fchown
	movl	(%r12), %edi
	movl	$416, %esi                      ## imm = 0x1A0
	callq	_fchmod
	jmp	LBB0_7
LBB0_28:
	movq	-72(%rbp), %rdi
	callq	_be32toh
	movq	_Q_DQHDR64_VERSION@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_32
## %bb.29:
	movq	-80(%rbp), %rdi
	callq	_be32toh
	cmpl	$32, %eax
	jne	LBB0_32
## %bb.30:
	movq	-88(%rbp), %rdi
	callq	_be32toh
	cmpl	$4, %eax
	jne	LBB0_32
## %bb.31:
	movl	$64, (%r14)
	jmp	LBB0_7
LBB0_32:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_19
LBB0_33:
	movl	16(%r12), %edi
	callq	_unlink
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_Q_GETQUOTASIZE,4,2             ## @Q_GETQUOTASIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ufs"

	.comm	_errno,4,2                      ## @errno
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_O_ACCMODE,4,2                  ## @O_ACCMODE
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_Q_DQHDR64_MAGIC,8,3            ## @Q_DQHDR64_MAGIC
	.comm	_Q_DQHDR64_VERSION,4,2          ## @Q_DQHDR64_VERSION
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_TRUNC,4,2                    ## @O_TRUNC
	.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_open                     ; -- Begin function quota_open
	.p2align	2
_quota_open:                            ; @quota_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
	mov	w0, #1
	mov	w1, #28
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	mov	w8, #-1
	stp	w8, w20, [x19]
	ldr	w23, [x19, #20]
	ldr	w1, [x22, #4]
	mov	x0, x23
	mov	w2, #4
	bl	_strlcpy
	add	x1, sp, #8
	mov	x0, x23
	bl	_stat
	cbz	x0, LBB0_7
LBB0_2:
	ldr	w0, [x19]
LBB0_3:
Lloh0:
	adrp	x20, _errno@GOTPAGE
Lloh1:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w21, [x20]
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.4:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_close
LBB0_5:
	mov	x0, x19
	bl	_free
	mov	x19, #0
	str	w21, [x20]
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
	ldr	w8, [sp, #8]
	str	w8, [x19, #24]
Lloh2:
	adrp	x8, _Q_GETQUOTASIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _Q_GETQUOTASIZE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_QCMD
	mov	x24, x0
	ldr	w0, [x22]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.8:
	add	x3, x19, #8
	mov	x0, x23
	mov	x1, x24
	mov	w2, #0
	bl	_quotactl
	cbz	x0, LBB0_6
; %bb.9:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	str	wzr, [x8]
	b	LBB0_2
LBB0_10:
	ldr	w2, [x19, #16]
	mov	x0, x22
	mov	x1, x20
	mov	w3, #4
	bl	_hasquota
	mov	x22, x0
	add	x20, x19, #8
	mov	x0, x23
	mov	x1, x24
	mov	w2, #0
	mov	x3, x20
	bl	_quotactl
	cbz	x0, LBB0_6
; %bb.11:
	cbz	w22, LBB0_17
; %bb.12:
Lloh10:
	adrp	x8, _O_ACCMODE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_ACCMODE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w21
	str	w8, [x19, #12]
	ldr	w0, [x19, #16]
Lloh13:
	adrp	x22, _O_CLOEXEC@GOTPAGE
Lloh14:
	ldr	x22, [x22, _O_CLOEXEC@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w1, w9, w8
	bl	_open
	str	w0, [x19]
	tbnz	w0, #31, LBB0_19
LBB0_13:
	mov	w8, #32
	str	w8, [x20]
	add	x1, sp, #16
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	w2, #32
	bl	_read
	cmn	w0, #1
	b.eq	LBB0_2
; %bb.14:
	cmp	w0, #32
	b.ne	LBB0_16
; %bb.15:
	ldr	w0, [sp, #40]
Lloh15:
	adrp	x8, _Q_DQHDR64_MAGIC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _Q_DQHDR64_MAGIC@GOTPAGEOFF]
Lloh17:
	ldr	x1, [x8]
	bl	_strcmp
	cbz	x0, LBB0_25
LBB0_16:
	mov	w8, #32
	str	w8, [x20]
	b	LBB0_6
LBB0_17:
Lloh18:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _errno@GOTPAGE
Lloh21:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh22:
	str	w8, [x9]
	b	LBB0_2
LBB0_19:
Lloh23:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	bics	wzr, w8, w21
	b.ne	LBB0_2
; %bb.20:
	cmn	w0, #1
	b.ne	LBB0_13
; %bb.21:
	ldr	w0, [x19, #16]
Lloh26:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh27:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh29:
	adrp	x9, _O_TRUNC@GOTPAGE
Lloh30:
	ldr	x9, [x9, _O_TRUNC@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x22]
	orr	w1, w8, w9
	str	xzr, [sp]
	bl	_open
	str	w0, [x19]
	tbnz	w0, #31, LBB0_3
; %bb.22:
	mov	w8, #64
	str	w8, [x19, #8]
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #32
	bl	_memset
	ldr	w0, [sp, #40]
Lloh32:
	adrp	x8, _Q_DQHDR64_MAGIC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _Q_DQHDR64_MAGIC@GOTPAGEOFF]
Lloh34:
	ldr	x1, [x8]
	mov	w2, #4
	bl	_memcpy
Lloh35:
	adrp	x8, _Q_DQHDR64_VERSION@GOTPAGE
Lloh36:
	ldr	x8, [x8, _Q_DQHDR64_VERSION@GOTPAGEOFF]
Lloh37:
	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]
	ldr	w0, [x19]
	add	x1, sp, #16
	mov	w2, #32
	bl	_write
	cmp	w0, #32
	b.ne	LBB0_30
; %bb.23:
Lloh38:
	adrp	x8, _QUOTAGROUP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _QUOTAGROUP@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_getgrnam
	mov	x8, x0
	ldr	w0, [x19]
	cbz	x8, LBB0_31
; %bb.24:
	ldr	w2, [x8]
	b	LBB0_32
LBB0_25:
	ldr	x0, [sp, #32]
	bl	_be32toh
Lloh41:
	adrp	x8, _Q_DQHDR64_VERSION@GOTPAGE
Lloh42:
	ldr	x8, [x8, _Q_DQHDR64_VERSION@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.26:
	ldr	x0, [sp, #24]
	bl	_be32toh
	cmp	w0, #32
	b.ne	LBB0_29
; %bb.27:
	ldr	x0, [sp, #16]
	bl	_be32toh
	cmp	w0, #4
	b.ne	LBB0_29
; %bb.28:
	mov	w8, #64
	str	w8, [x20]
	b	LBB0_6
LBB0_29:
Lloh44:
	adrp	x8, _EINVAL@GOTPAGE
Lloh45:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_30:
	ldr	w0, [x19, #16]
	bl	_unlink
	b	LBB0_2
LBB0_31:
	mov	w2, #0
LBB0_32:
	mov	w1, #0
	bl	_fchown
	ldr	w0, [x19]
	mov	w1, #416
	bl	_fchmod
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_Q_GETQUOTASIZE,4,2             ; @Q_GETQUOTASIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ufs"

	.comm	_errno,4,2                      ; @errno
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_O_ACCMODE,4,2                  ; @O_ACCMODE
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_Q_DQHDR64_MAGIC,8,3            ; @Q_DQHDR64_MAGIC
	.comm	_Q_DQHDR64_VERSION,4,2          ; @Q_DQHDR64_VERSION
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_TRUNC,4,2                    ; @O_TRUNC
	.comm	_QUOTAGROUP,4,2                 ; @QUOTAGROUP
.subsections_via_symbols
