	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quota_test3
_quota_test3:                           ## @quota_test3
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_TEST_NONROOT_ID@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rdi
	movl	%edx, %esi
	callq	_rump_sys_chown
	movq	%rbx, %rdi
	movl	$511, %esi                      ## imm = 0x1FF
	callq	_rump_sys_chmod
	movl	(%r14), %edi
	callq	_rump_sys_setegid
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	jmp	LBB0_12
LBB0_2:
	movl	(%r14), %edi
	callq	_rump_sys_seteuid
	testq	%rax, %rax
	je	LBB0_3
## %bb.13:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_warn
	jmp	LBB0_12
LBB0_3:
	leaq	_quota_test3.buf(%rip), %rbx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_sprintf
	movq	_O_EXCL@GOTPCREL(%rip), %r15
	movq	_O_CREAT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	orl	(%r15), %esi
	movq	_O_RDWR@GOTPCREL(%rip), %r13
	orl	(%r13), %esi
	movq	%rbx, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_rump_sys_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_5:
	leaq	_quota_test3.buf(%rip), %r14
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_sprintf
	movq	%r14, %rdi
	callq	_strlen
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_rump_sys_write
	movl	%ebx, %edi
	callq	_rump_sys_close
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_sprintf
	movl	(%r12), %esi
	orl	(%r15), %esi
	orl	(%r13), %esi
	movq	%r14, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_rump_sys_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_7
## %bb.6:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_7:
	leaq	_quota_test3.buf(%rip), %r14
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_sprintf
	movq	%r14, %rdi
	callq	_strlen
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_rump_sys_write
	movl	%ebx, %edi
	callq	_rump_sys_close
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_sprintf
	movl	(%r12), %esi
	orl	(%r15), %esi
	orl	(%r13), %esi
	movq	%r14, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_rump_sys_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_9:
	leaq	_quota_test3.buf(%rip), %r14
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	$2, %edx
	callq	_sprintf
	movq	%r14, %rdi
	callq	_strlen
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_rump_sys_write
	movl	%ebx, %edi
	callq	_rump_sys_close
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	$3, %edx
	callq	_sprintf
	movl	(%r12), %esi
	orl	(%r15), %esi
	orl	(%r13), %esi
	movq	%r14, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_rump_sys_open
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_11:
	leaq	_quota_test3.buf(%rip), %r14
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	$3, %edx
	callq	_sprintf
	movq	%r14, %rdi
	callq	_strlen
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_rump_sys_write
	movl	%ebx, %edi
	callq	_rump_sys_close
	movl	$2, %edi
	callq	_sleep
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_sprintf
	movl	(%r12), %esi
	orl	(%r15), %esi
	orl	(%r13), %esi
	movq	%r14, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_rump_sys_open
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, %ebx
	sarl	$31, %ebx
	andl	(%rcx), %ebx
	movl	%eax, %edi
	callq	_rump_sys_close
	xorl	%edi, %edi
	callq	_rump_sys_seteuid
	xorl	%edi, %edi
	callq	_rump_sys_setegid
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_quota_test3.buf,512,4 ## @quota_test3.buf
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_TEST_NONROOT_ID,4,2            ## @TEST_NONROOT_ID
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"rump_sys_setegid"

L_.str.2:                               ## @.str.2
	.asciz	"rump_sys_seteuid"

L_.str.3:                               ## @.str.3
	.asciz	"file%d"

	.comm	_O_EXCL,4,2                     ## @O_EXCL
	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.4:                               ## @.str.4
	.asciz	"file create failed early"

L_.str.5:                               ## @.str.5
	.asciz	"test file no %d"

	.no_dead_strip	_quota_test3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quota_test3
_quota_test3:                           ; @quota_test3
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
Lloh0:
	adrp	x20, _TEST_NONROOT_ID@GOTPAGE
Lloh1:
	ldr	x20, [x20, _TEST_NONROOT_ID@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh2:
	adrp	x19, l_.str@PAGE
Lloh3:
	add	x19, x19, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x1
	bl	_rump_sys_chown
	mov	x0, x19
	mov	w1, #511
	bl	_rump_sys_chmod
	ldr	w0, [x20]
	bl	_rump_sys_setegid
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	w19, [x8]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	b	LBB0_13
LBB0_2:
	ldr	w0, [x20]
	bl	_rump_sys_seteuid
	cbz	x0, LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	b	LBB0_13
LBB0_4:
Lloh14:
	adrp	x19, _quota_test3.buf@PAGE
Lloh15:
	add	x19, x19, _quota_test3.buf@PAGEOFF
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w2, #0
	bl	_sprintf
Lloh18:
	adrp	x21, _O_EXCL@GOTPAGE
Lloh19:
	ldr	x21, [x21, _O_EXCL@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh20:
	adrp	x22, _O_CREAT@GOTPAGE
Lloh21:
	ldr	x22, [x22, _O_CREAT@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w8, w9, w8
Lloh22:
	adrp	x23, _O_RDWR@GOTPAGE
Lloh23:
	ldr	x23, [x23, _O_RDWR@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w1, w8, w9
	mov	x0, x19
	mov	w2, #420
	bl	_rump_sys_open
	mov	x19, x0
	tbz	w0, #31, LBB0_6
; %bb.5:
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_6:
Lloh26:
	adrp	x20, _quota_test3.buf@PAGE
Lloh27:
	add	x20, x20, _quota_test3.buf@PAGEOFF
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w2, #0
	bl	_sprintf
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_rump_sys_write
	mov	x0, x19
	bl	_rump_sys_close
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #1
	bl	_sprintf
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w1, w8, w9
	mov	x0, x20
	mov	w2, #420
	bl	_rump_sys_open
	mov	x19, x0
	tbz	w0, #31, LBB0_8
; %bb.7:
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
Lloh34:
	adrp	x20, _quota_test3.buf@PAGE
Lloh35:
	add	x20, x20, _quota_test3.buf@PAGEOFF
Lloh36:
	adrp	x1, l_.str.5@PAGE
Lloh37:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w2, #1
	bl	_sprintf
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_rump_sys_write
	mov	x0, x19
	bl	_rump_sys_close
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #2
	bl	_sprintf
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w1, w8, w9
	mov	x0, x20
	mov	w2, #420
	bl	_rump_sys_open
	mov	x19, x0
	tbz	w0, #31, LBB0_10
; %bb.9:
Lloh40:
	adrp	x1, l_.str.4@PAGE
Lloh41:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_10:
Lloh42:
	adrp	x20, _quota_test3.buf@PAGE
Lloh43:
	add	x20, x20, _quota_test3.buf@PAGEOFF
Lloh44:
	adrp	x1, l_.str.5@PAGE
Lloh45:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w2, #2
	bl	_sprintf
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_rump_sys_write
	mov	x0, x19
	bl	_rump_sys_close
Lloh46:
	adrp	x1, l_.str.3@PAGE
Lloh47:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #3
	bl	_sprintf
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w1, w8, w9
	mov	x0, x20
	mov	w2, #420
	bl	_rump_sys_open
	mov	x19, x0
	tbz	w0, #31, LBB0_12
; %bb.11:
Lloh48:
	adrp	x1, l_.str.4@PAGE
Lloh49:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_12:
Lloh50:
	adrp	x20, _quota_test3.buf@PAGE
Lloh51:
	add	x20, x20, _quota_test3.buf@PAGEOFF
Lloh52:
	adrp	x1, l_.str.5@PAGE
Lloh53:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	w2, #3
	bl	_sprintf
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_rump_sys_write
	mov	x0, x19
	bl	_rump_sys_close
	mov	w0, #2
	bl	_sleep
Lloh54:
	adrp	x1, l_.str.3@PAGE
Lloh55:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	w2, #4
	bl	_sprintf
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w1, w8, w9
	mov	x0, x20
	mov	w2, #420
	bl	_rump_sys_open
Lloh56:
	adrp	x8, _errno@GOTPAGE
Lloh57:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
	and	w19, w8, w0, asr #31
	bl	_rump_sys_close
	mov	w0, #0
	bl	_rump_sys_seteuid
	mov	w0, #0
	bl	_rump_sys_setegid
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_quota_test3.buf,512,0 ; @quota_test3.buf
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_TEST_NONROOT_ID,4,2            ; @TEST_NONROOT_ID
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"rump_sys_setegid"

l_.str.2:                               ; @.str.2
	.asciz	"rump_sys_seteuid"

l_.str.3:                               ; @.str.3
	.asciz	"file%d"

	.comm	_O_EXCL,4,2                     ; @O_EXCL
	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.4:                               ; @.str.4
	.asciz	"file create failed early"

l_.str.5:                               ; @.str.5
	.asciz	"test file no %d"

	.no_dead_strip	_quota_test3
.subsections_via_symbols
