	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quota_test1
_quota_test1:                           ## @quota_test1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -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_16
LBB0_2:
	movl	(%r14), %edi
	callq	_rump_sys_seteuid
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.2(%rip), %rdi
	callq	_warn
	jmp	LBB0_16
LBB0_4:
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_rump_sys_open
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_17
## %bb.5:
	leaq	_quota_test1.buf(%rip), %rsi
	movl	%r14d, %edi
	movl	$512, %edx                      ## imm = 0x200
	callq	_rump_sys_write
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_7
## %bb.6:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_7:
	leaq	_quota_test1.buf(%rip), %rsi
	movl	%r14d, %edi
	movl	$512, %edx                      ## imm = 0x200
	callq	_rump_sys_write
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_9
## %bb.8:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_9:
	leaq	_quota_test1.buf(%rip), %rsi
	movl	%r14d, %edi
	movl	$512, %edx                      ## imm = 0x200
	callq	_rump_sys_write
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_11:
	leaq	_quota_test1.buf(%rip), %rsi
	movl	%r14d, %edi
	movl	$512, %edx                      ## imm = 0x200
	callq	_rump_sys_write
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_13
## %bb.12:
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_13:
	movl	$2, %edi
	callq	_sleep
	leaq	_quota_test1.buf(%rip), %rsi
	movl	%r14d, %edi
	movl	$512, %edx                      ## imm = 0x200
	callq	_rump_sys_write
	xorl	%ebx, %ebx
	cmpl	$512, %eax                      ## imm = 0x200
	je	LBB0_15
## %bb.14:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_15
LBB0_17:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.4(%rip), %rdi
	callq	_warn
LBB0_15:
	movl	%r14d, %edi
	callq	_rump_sys_close
	xorl	%edi, %edi
	callq	_rump_sys_seteuid
	xorl	%edi, %edi
	callq	_rump_sys_setegid
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_quota_test1.buf,512,4 ## @quota_test1.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	"test_fillup"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_RDWR,4,2                     ## @O_RDWR
L_.str.4:                               ## @.str.4
	.asciz	"rump_sys_open"

L_.str.5:                               ## @.str.5
	.asciz	"write failed early"

	.no_dead_strip	_quota_test1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quota_test1
_quota_test1:                           ; @quota_test1
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
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	w20, [x8]
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warn
	b	LBB0_16
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	w20, [x8]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_warn
	b	LBB0_16
LBB0_4:
Lloh14:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	w2, #420
	bl	_rump_sys_open
	mov	x19, x0
	tbnz	w0, #31, LBB0_14
; %bb.5:
Lloh22:
	adrp	x1, _quota_test1.buf@PAGE
Lloh23:
	add	x1, x1, _quota_test1.buf@PAGEOFF
	mov	x0, x19
	mov	w2, #512
	bl	_rump_sys_write
	cmp	w0, #512
	b.eq	LBB0_7
; %bb.6:
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_7:
Lloh26:
	adrp	x1, _quota_test1.buf@PAGE
Lloh27:
	add	x1, x1, _quota_test1.buf@PAGEOFF
	mov	x0, x19
	mov	w2, #512
	bl	_rump_sys_write
	cmp	w0, #512
	b.eq	LBB0_9
; %bb.8:
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_9:
Lloh30:
	adrp	x1, _quota_test1.buf@PAGE
Lloh31:
	add	x1, x1, _quota_test1.buf@PAGEOFF
	mov	x0, x19
	mov	w2, #512
	bl	_rump_sys_write
	cmp	w0, #512
	b.eq	LBB0_11
; %bb.10:
Lloh32:
	adrp	x1, l_.str.5@PAGE
Lloh33:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_11:
Lloh34:
	adrp	x1, _quota_test1.buf@PAGE
Lloh35:
	add	x1, x1, _quota_test1.buf@PAGEOFF
	mov	x0, x19
	mov	w2, #512
	bl	_rump_sys_write
	cmp	w0, #512
	b.eq	LBB0_13
; %bb.12:
Lloh36:
	adrp	x1, l_.str.5@PAGE
Lloh37:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_13:
	mov	w0, #2
	bl	_sleep
Lloh38:
	adrp	x1, _quota_test1.buf@PAGE
Lloh39:
	add	x1, x1, _quota_test1.buf@PAGEOFF
	mov	x0, x19
	mov	w2, #512
	bl	_rump_sys_write
Lloh40:
	adrp	x8, _errno@GOTPAGE
Lloh41:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	cmp	w0, #512
	csel	w20, wzr, w8, eq
	b	LBB0_15
LBB0_14:
Lloh43:
	adrp	x8, _errno@GOTPAGE
Lloh44:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh45:
	ldr	w20, [x8]
Lloh46:
	adrp	x0, l_.str.4@PAGE
Lloh47:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_warn
LBB0_15:
	mov	x0, x19
	bl	_rump_sys_close
	mov	w0, #0
	bl	_rump_sys_seteuid
	mov	w0, #0
	bl	_rump_sys_setegid
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 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 AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_quota_test1.buf,512,0 ; @quota_test1.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	"test_fillup"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_RDWR,4,2                     ; @O_RDWR
l_.str.4:                               ; @.str.4
	.asciz	"rump_sys_open"

l_.str.5:                               ; @.str.5
	.asciz	"write failed early"

	.no_dead_strip	_quota_test1
.subsections_via_symbols
