	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$344, %rsp                      ## imm = 0x158
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SIGCHLD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_handle_signal@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_signal
	movl	$4, %eax
	cmpl	$2, %ebx
	jl	LBB0_2
## %bb.1:
	movq	8(%r15), %rdi
	callq	_atoi
LBB0_2:
	movl	%eax, -360(%rbp)                ## 4-byte Spill
	movq	_CAP_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CAP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CAP_SEEK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-376(%rbp), %r15
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_cap_rights_init
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_dup
	movl	%eax, %r12d
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_cap_rights_limit
	movl	%eax, %r15d
	movq	_stderr@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	xorl	%eax, %eax
	callq	_getpid_
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	testl	%r15d, %r15d
	jns	LBB0_4
## %bb.3:
	movl	(%r13), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_4:
	leaq	-372(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_cap_rights_init
	movl	%r12d, %edi
	movq	%r15, %rsi
	callq	_cap_rights_get
	movl	%eax, %ebx
	leaq	-304(%rbp), %r14
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_cap_rights_describe
	movl	(%r13), %r15d
	xorl	%eax, %eax
	callq	_getpid_
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	movq	%r14, %r9
	xorl	%eax, %eax
	callq	_fprintf
	testl	%ebx, %ebx
	jns	LBB0_6
## %bb.5:
	movl	(%r13), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_6:
	leaq	-368(%rbp), %rsi
	movl	%r12d, %edi
	callq	_fstat
	movl	%eax, %ebx
	movl	(%r13), %r15d
	xorl	%eax, %eax
	callq	_getpid_
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %r9d
	leaq	L_.str.4(%rip), %rsi
	movl	%r15d, %edi
	movl	%eax, %edx
	movl	%r12d, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_fprintf
	cmpl	$-1, %ebx
	je	LBB0_8
## %bb.7:
	movl	(%r13), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	movl	$-1, -348(%rbp)
	leaq	-348(%rbp), %rdi
	xorl	%esi, %esi
	callq	_pdfork
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_9
## %bb.28:
	jne	LBB0_10
## %bb.29:
	leaq	L_.str.7(%rip), %r14
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %r15d
	xorl	%eax, %eax
	callq	_getpid_
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_getppid
	movl	%r15d, %edi
	movq	%r14, %rsi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_sleep
	jmp	LBB0_30
LBB0_9:
	movl	(%r13), %r15d
	movl	(%r14), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.6(%rip), %rsi
	movl	%r15d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_10:
	movl	(%r13), %ebx
	xorl	%eax, %eax
	callq	_getpid_
	movl	-348(%rbp), %r8d
	leaq	L_.str.9(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	movl	%r12d, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	movl	$-1, -356(%rbp)
	movl	-348(%rbp), %edi
	leaq	-356(%rbp), %rsi
	callq	_pdgetpid
	testl	%eax, %eax
	jns	LBB0_12
## %bb.11:
	movl	(%r13), %r14d
	movl	-348(%rbp), %r15d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.10(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movl	%ebx, %ecx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_fprintf
LBB0_12:
	movl	(%r13), %ebx
	xorl	%eax, %eax
	callq	_getpid_
	movl	-348(%rbp), %ecx
	movl	-356(%rbp), %r8d
	leaq	L_.str.11(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	movl	%r12d, %r9d
	xorl	%eax, %eax
	callq	_fprintf
	movl	-360(%rbp), %edi                ## 4-byte Reload
	callq	_sleep
	movl	-348(%rbp), %edi
	movq	_SIGKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_pdkill
	movl	%eax, %ebx
	movl	(%r13), %r14d
	xorl	%eax, %eax
	callq	_getpid_
	movl	-348(%rbp), %ecx
	leaq	L_.str.12(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_fprintf
	testl	%ebx, %ebx
	jns	LBB0_14
## %bb.13:
	movl	(%r13), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.13(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_14:
	movl	$50000, %edi                    ## imm = 0xC350
	callq	_usleep
	movq	_seen_sigchld@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
## %bb.15:
	movl	(%r13), %edi
	leaq	L_.str.14(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_16:
	movq	_WNOHANG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-352(%rbp), %rsi
	movl	$-1, %edi
	xorl	%ecx, %ecx
	callq	_wait4
	testl	%eax, %eax
	jle	LBB0_18
## %bb.17:
	movl	(%r13), %edi
	leaq	L_.str.15(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_18:
	movl	(%r13), %ebx
	xorl	%eax, %eax
	callq	_getpid_
	leaq	L_.str.16(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%eax, %eax
	callq	_fork
	testl	%eax, %eax
	je	LBB0_19
## %bb.31:
	movl	%eax, %ebx
	leaq	-352(%rbp), %rsi
	movl	%eax, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_wait4
	movl	(%r13), %r14d
	xorl	%eax, %eax
	callq	_getpid_
	movl	-352(%rbp), %r8d
	leaq	L_.str.24(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	movaps	l___const.main.argv_pass+16(%rip), %xmm0
	movaps	%xmm0, -320(%rbp)
	movaps	l___const.main.argv_pass(%rip), %xmm0
	movaps	%xmm0, -336(%rbp)
	movq	$0, -344(%rbp)
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.25(%rip), %rdi
	callq	_open
	movl	%eax, %r14d
	movl	(%r13), %ebx
	xorl	%eax, %eax
	callq	_getpid_
	leaq	L_.str.28(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf
	leaq	-336(%rbp), %rsi
	leaq	-344(%rbp), %rdx
	movl	%r14d, %edi
	callq	_fexecve
	movl	%eax, %r15d
	movl	(%r13), %r12d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.29(%rip), %rsi
	movl	%r12d, %edi
	movl	%r14d, %edx
	movl	%r15d, %ecx
	movl	%ebx, %r8d
	movq	%rax, %r9
	xorl	%eax, %eax
	callq	_fprintf
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_33
## %bb.32:
	xorl	%eax, %eax
	addq	$344, %rsp                      ## imm = 0x158
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movl	$-1, -336(%rbp)
	leaq	-336(%rbp), %rdi
	callq	_cap_getmode
	movl	%eax, %ebx
	movl	(%r13), %r14d
	xorl	%eax, %eax
	callq	_getpid_
	movl	-336(%rbp), %r8d
	leaq	L_.str.17(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	testl	%ebx, %ebx
	jns	LBB0_21
## %bb.20:
	movl	(%r13), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.18(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_21:
	xorl	%eax, %eax
	callq	_cap_enter
	movl	%eax, %ebx
	movl	(%r13), %r14d
	xorl	%eax, %eax
	callq	_getpid_
	leaq	L_.str.19(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	testl	%ebx, %ebx
	jns	LBB0_23
## %bb.22:
	movl	(%r13), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.20(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_23:
	leaq	-336(%rbp), %rdi
	callq	_cap_getmode
	movl	%eax, %ebx
	movl	(%r13), %r14d
	xorl	%eax, %eax
	callq	_getpid_
	movl	-336(%rbp), %r8d
	leaq	L_.str.17(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	testl	%ebx, %ebx
	jns	LBB0_25
## %bb.24:
	movl	(%r13), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str.18(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_25:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.21(%rip), %rdi
	callq	_open
	movl	%eax, %ebx
	movl	(%r13), %r14d
	xorl	%eax, %eax
	callq	_getpid_
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	leaq	L_.str.22(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_fprintf
	cmpl	$-1, %ebx
	je	LBB0_27
## %bb.26:
	movl	(%r13), %edi
	leaq	L_.str.23(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_27:
	xorl	%edi, %edi
	callq	_exit
LBB0_33:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.comm	_handle_signal,4,2              ## @handle_signal
	.comm	_CAP_READ,4,2                   ## @CAP_READ
	.comm	_CAP_WRITE,4,2                  ## @CAP_WRITE
	.comm	_CAP_SEEK,4,2                   ## @CAP_SEEK
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[%d] cap_fd=%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"*** cap_rights_limit() failed: errno=%d %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"[%d] cap_rights_get(cap_fd=%d) rc=%d rights=%s\n"

L_.str.3:                               ## @.str.3
	.asciz	"*** cap_rights_get() failed: errno=%d %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"[%d] fstat(cap_fd=%d) rc=%d errno=%d\n"

L_.str.5:                               ## @.str.5
	.asciz	"*** fstat() unexpectedly succeeded\n"

L_.str.6:                               ## @.str.6
	.asciz	"*** pdfork() failed: errno=%d %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"  [%d] child alive, parent is ppid=%d\n"

L_.str.9:                               ## @.str.9
	.asciz	"[%d] pdfork() rc=%d pd=%d\n"

L_.str.10:                              ## @.str.10
	.asciz	"*** pdgetpid(pd=%d) failed: errno=%d %s\n"

L_.str.11:                              ## @.str.11
	.asciz	"[%d] pdgetpid(pd=%d)=%d, pdfork returned %d\n"

	.comm	_SIGKILL,4,2                    ## @SIGKILL
L_.str.12:                              ## @.str.12
	.asciz	"[%d] pdkill(pd=%d, SIGKILL) -> rc=%d\n"

L_.str.13:                              ## @.str.13
	.asciz	"*** pdkill() failed: errno=%d %s\n"

	.comm	_seen_sigchld,8,3               ## @seen_sigchld
L_.str.14:                              ## @.str.14
	.asciz	"*** SIGCHLD emitted\n"

	.comm	_WNOHANG,4,2                    ## @WNOHANG
L_.str.15:                              ## @.str.15
	.asciz	"*** wait4(-1, ...) unexpectedly found child %d\n"

L_.str.16:                              ## @.str.16
	.asciz	"[%d] forking off a child process to check cap_enter()\n"

L_.str.17:                              ## @.str.17
	.asciz	"  [%d] cap_getmode() -> rc=%d, cap_mode=%d\n"

L_.str.18:                              ## @.str.18
	.asciz	"*** cap_getmode() failed: errno=%d %s\n"

L_.str.19:                              ## @.str.19
	.asciz	"  [%d] cap_enter() -> rc=%d\n"

L_.str.20:                              ## @.str.20
	.asciz	"*** cap_enter() failed: errno=%d %s\n"

L_.str.21:                              ## @.str.21
	.asciz	"/etc/passwd"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.22:                              ## @.str.22
	.asciz	"  [%d] open('/etc/passwd') -> rc=%d, errno=%d\n"

L_.str.23:                              ## @.str.23
	.asciz	"*** open() unexpectedly succeeded\n"

L_.str.24:                              ## @.str.24
	.asciz	"[%d] child %d exited with status %x\n"

L_.str.25:                              ## @.str.25
	.asciz	"/bin/ls"

L_.str.26:                              ## @.str.26
	.asciz	"-l"

L_.str.27:                              ## @.str.27
	.asciz	"smoketest"

	.section	__DATA,__const
	.p2align	4                               ## @__const.main.argv_pass
l___const.main.argv_pass:
	.quad	L_.str.25
	.quad	L_.str.26
	.quad	L_.str.27
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
L_.str.28:                              ## @.str.28
	.asciz	"[%d] about to fexecve('/bin/ls', '-l', 'smoketest')\n"

L_.str.29:                              ## @.str.29
	.asciz	"*** fexecve(fd=%d) failed: rc=%d errno=%d %s\n"

	.comm	_ECAPMODE,4,2                   ## @ECAPMODE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #464
	.cfi_def_cfa_offset 464
	stp	x26, x25, [sp, #384]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #400]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #416]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #432]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #448]            ; 16-byte Folded Spill
	add	x29, sp, #448
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x8, _SIGCHLD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGCHLD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _handle_signal@GOTPAGE
Lloh7:
	ldr	x8, [x8, _handle_signal@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_signal
	cmp	w20, #2
	b.lt	LBB0_2
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_atoi
	mov	x19, x0
	b	LBB0_3
LBB0_2:
	mov	w19, #4
LBB0_3:
Lloh9:
	adrp	x8, _CAP_READ@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CAP_READ@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _CAP_WRITE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CAP_WRITE@GOTPAGEOFF]
Lloh14:
	adrp	x9, _CAP_SEEK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _CAP_SEEK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	stp	x8, x9, [sp]
	add	x0, sp, #68
	bl	_cap_rights_init
Lloh18:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_dup
	mov	x20, x0
	add	x1, sp, #68
	bl	_cap_rights_limit
	mov	x21, x0
Lloh21:
	adrp	x23, _stderr@GOTPAGE
Lloh22:
	ldr	x23, [x23, _stderr@GOTPAGEOFF]
	ldr	w22, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x20, [sp]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	bl	_fprintf
Lloh25:
	adrp	x24, _errno@GOTPAGE
Lloh26:
	ldr	x24, [x24, _errno@GOTPAGEOFF]
	tbz	w21, #31, LBB0_5
; %bb.4:
	ldr	w21, [x23]
	ldr	w22, [x24]
	mov	x0, x22
	bl	_strerror
	stp	x22, x0, [sp]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_fprintf
LBB0_5:
	add	x0, sp, #64
	mov	w1, #0
	bl	_cap_rights_init
	add	x1, sp, #64
	mov	x0, x20
	bl	_cap_rights_get
	mov	x21, x0
	add	x25, sp, #120
	add	x0, sp, #64
	add	x1, sp, #120
	bl	_cap_rights_describe
	ldr	w22, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x25, [sp, #16]
	mov	x8, x20
	stp	x0, x8, [sp]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x22
	bl	_fprintf
	tbz	w21, #31, LBB0_7
; %bb.6:
	ldr	w21, [x23]
	ldr	w22, [x24]
	mov	x0, x22
	bl	_strerror
	stp	x22, x0, [sp]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_fprintf
LBB0_7:
	add	x1, sp, #56
	mov	x0, x20
	bl	_fstat
	mov	x21, x0
	ldr	w22, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x24]
	stp	x21, x8, [sp, #16]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x0, x20, [sp]
Lloh33:
	adrp	x1, l_.str.4@PAGE
Lloh34:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x22
	bl	_fprintf
	cmn	w21, #1
	b.eq	LBB0_9
; %bb.8:
	ldr	w0, [x23]
Lloh35:
	adrp	x1, l_.str.5@PAGE
Lloh36:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_9:
	mov	w8, #-1
	str	w8, [sp, #52]
	add	x0, sp, #52
	mov	w1, #0
	bl	_pdfork
	mov	x20, x0
	tbnz	w0, #31, LBB0_13
; %bb.10:
	cbnz	w20, LBB0_14
; %bb.11:
Lloh37:
	adrp	x19, l_.str.7@PAGE
Lloh38:
	add	x19, x19, l_.str.7@PAGEOFF
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w20, [x23]
	bl	_getpid_
	mov	x21, x0
	bl	_getppid
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp]
	mov	x0, x20
	mov	x1, x19
	bl	_fprintf
	mov	w0, #1
	bl	_sleep
	b	LBB0_12
LBB0_13:
	ldr	w21, [x23]
	ldr	w22, [x24]
	mov	x0, x22
	bl	_strerror
	stp	x22, x0, [sp]
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x21
	bl	_fprintf
LBB0_14:
	ldr	w21, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [sp, #52]
	stp	x20, x8, [sp, #8]
	str	x0, [sp]
Lloh41:
	adrp	x1, l_.str.9@PAGE
Lloh42:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	w8, #-1
	str	w8, [sp, #48]
	ldr	w0, [sp, #52]
	add	x1, sp, #48
	bl	_pdgetpid
	tbz	w0, #31, LBB0_16
; %bb.15:
	ldr	w21, [x23]
	ldr	w22, [x24]
	ldr	w25, [sp, #52]
	mov	x0, x22
	bl	_strerror
	stp	x22, x0, [sp, #8]
	str	x25, [sp]
Lloh43:
	adrp	x1, l_.str.10@PAGE
Lloh44:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x21
	bl	_fprintf
LBB0_16:
	ldr	w21, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	ldp	w9, w8, [sp, #48]
	stp	x9, x20, [sp, #16]
	stp	x0, x8, [sp]
Lloh45:
	adrp	x1, l_.str.11@PAGE
Lloh46:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	mov	x0, x19
	bl	_sleep
	ldr	w0, [sp, #52]
Lloh47:
	adrp	x8, _SIGKILL@GOTPAGE
Lloh48:
	ldr	x8, [x8, _SIGKILL@GOTPAGEOFF]
Lloh49:
	ldr	w1, [x8]
	bl	_pdkill
	mov	x19, x0
	ldr	w20, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [sp, #52]
	stp	x8, x19, [sp, #8]
	str	x0, [sp]
Lloh50:
	adrp	x1, l_.str.12@PAGE
Lloh51:
	add	x1, x1, l_.str.12@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	tbz	w19, #31, LBB0_18
; %bb.17:
	ldr	w19, [x23]
	ldr	w20, [x24]
	mov	x0, x20
	bl	_strerror
	stp	x20, x0, [sp]
Lloh52:
	adrp	x1, l_.str.13@PAGE
Lloh53:
	add	x1, x1, l_.str.13@PAGEOFF
	mov	x0, x19
	bl	_fprintf
LBB0_18:
	mov	w0, #50000
	bl	_usleep
Lloh54:
	adrp	x8, _seen_sigchld@GOTPAGE
Lloh55:
	ldr	x8, [x8, _seen_sigchld@GOTPAGEOFF]
Lloh56:
	ldr	x8, [x8]
	cbz	x8, LBB0_20
; %bb.19:
	ldr	w0, [x23]
Lloh57:
	adrp	x1, l_.str.14@PAGE
Lloh58:
	add	x1, x1, l_.str.14@PAGEOFF
	bl	_fprintf
LBB0_20:
Lloh59:
	adrp	x8, _WNOHANG@GOTPAGE
Lloh60:
	ldr	x8, [x8, _WNOHANG@GOTPAGEOFF]
Lloh61:
	ldr	w2, [x8]
	add	x1, sp, #44
	mov	w0, #-1
	mov	x3, #0
	bl	_wait4
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w0, #1
	b.lt	LBB0_22
; %bb.21:
	ldr	w8, [x23]
	str	x0, [sp]
Lloh62:
	adrp	x1, l_.str.15@PAGE
Lloh63:
	add	x1, x1, l_.str.15@PAGEOFF
	mov	x0, x8
	bl	_fprintf
LBB0_22:
	ldr	w19, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh64:
	adrp	x1, l_.str.16@PAGE
Lloh65:
	add	x1, x1, l_.str.16@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	bl	_fork
	cbz	w0, LBB0_25
; %bb.23:
	mov	x19, x0
	add	x1, sp, #44
	mov	w2, #0
	mov	x3, #0
	bl	_wait4
	ldr	w20, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [sp, #44]
	stp	x19, x8, [sp, #8]
	str	x0, [sp]
Lloh66:
	adrp	x1, l_.str.24@PAGE
Lloh67:
	add	x1, x1, l_.str.24@PAGEOFF
	mov	x0, x20
	bl	_fprintf
Lloh68:
	adrp	x8, l___const.main.argv_pass@PAGE
Lloh69:
	add	x8, x8, l___const.main.argv_pass@PAGEOFF
	ldp	q0, q1, [x8]
	stp	q0, q1, [sp, #80]
	str	xzr, [sp, #72]
Lloh70:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh71:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh72:
	ldr	w1, [x8]
Lloh73:
	adrp	x0, l_.str.25@PAGE
Lloh74:
	add	x0, x0, l_.str.25@PAGEOFF
	bl	_open
	mov	x19, x0
	ldr	w20, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh75:
	adrp	x1, l_.str.28@PAGE
Lloh76:
	add	x1, x1, l_.str.28@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	add	x1, sp, #80
	add	x2, sp, #72
	mov	x0, x19
	bl	_fexecve
	mov	x20, x0
	ldr	w21, [x23]
	ldr	w22, [x24]
	mov	x0, x22
	bl	_strerror
	stp	x22, x0, [sp, #16]
	stp	x19, x20, [sp]
Lloh77:
	adrp	x1, l_.str.29@PAGE
Lloh78:
	add	x1, x1, l_.str.29@PAGEOFF
	mov	x0, x21
	bl	_fprintf
	ldur	x8, [x29, #-72]
Lloh79:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh80:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh81:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_34
; %bb.24:
	mov	w0, #0
	ldp	x29, x30, [sp, #448]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #432]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #416]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #400]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #384]            ; 16-byte Folded Reload
	add	sp, sp, #464
	ret
LBB0_25:
	mov	w8, #-1
	str	w8, [sp, #80]
	add	x0, sp, #80
	bl	_cap_getmode
	mov	x19, x0
	ldr	w20, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [sp, #80]
	stp	x19, x8, [sp, #8]
	str	x0, [sp]
Lloh82:
	adrp	x1, l_.str.17@PAGE
Lloh83:
	add	x1, x1, l_.str.17@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	tbz	w19, #31, LBB0_27
; %bb.26:
	ldr	w19, [x23]
	ldr	w20, [x24]
	mov	x0, x20
	bl	_strerror
	stp	x20, x0, [sp]
Lloh84:
	adrp	x1, l_.str.18@PAGE
Lloh85:
	add	x1, x1, l_.str.18@PAGEOFF
	mov	x0, x19
	bl	_fprintf
LBB0_27:
	bl	_cap_enter
	mov	x19, x0
	ldr	w20, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x0, x19, [sp]
Lloh86:
	adrp	x1, l_.str.19@PAGE
Lloh87:
	add	x1, x1, l_.str.19@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	tbz	w19, #31, LBB0_29
; %bb.28:
	ldr	w19, [x23]
	ldr	w20, [x24]
	mov	x0, x20
	bl	_strerror
	stp	x20, x0, [sp]
Lloh88:
	adrp	x1, l_.str.20@PAGE
Lloh89:
	add	x1, x1, l_.str.20@PAGEOFF
	mov	x0, x19
	bl	_fprintf
LBB0_29:
	add	x0, sp, #80
	bl	_cap_getmode
	mov	x19, x0
	ldr	w20, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [sp, #80]
	stp	x19, x8, [sp, #8]
	str	x0, [sp]
Lloh90:
	adrp	x1, l_.str.17@PAGE
Lloh91:
	add	x1, x1, l_.str.17@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	tbz	w19, #31, LBB0_31
; %bb.30:
	ldr	w19, [x23]
	ldr	w20, [x24]
	mov	x0, x20
	bl	_strerror
	stp	x20, x0, [sp]
Lloh92:
	adrp	x1, l_.str.18@PAGE
Lloh93:
	add	x1, x1, l_.str.18@PAGEOFF
	mov	x0, x19
	bl	_fprintf
LBB0_31:
Lloh94:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh95:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh96:
	ldr	w1, [x8]
Lloh97:
	adrp	x0, l_.str.21@PAGE
Lloh98:
	add	x0, x0, l_.str.21@PAGEOFF
	bl	_open
	mov	x19, x0
	ldr	w20, [x23]
	bl	_getpid_
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x24]
	stp	x19, x8, [sp, #8]
	str	x0, [sp]
Lloh99:
	adrp	x1, l_.str.22@PAGE
Lloh100:
	add	x1, x1, l_.str.22@PAGEOFF
	mov	x0, x20
	bl	_fprintf
	cmn	w19, #1
	b.eq	LBB0_33
; %bb.32:
	ldr	w0, [x23]
Lloh101:
	adrp	x1, l_.str.23@PAGE
Lloh102:
	add	x1, x1, l_.str.23@PAGEOFF
	bl	_fprintf
LBB0_33:
	mov	w0, #0
	bl	_exit
LBB0_34:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpAdd	Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpAdd	Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh79, Lloh80, Lloh81
	.loh AdrpAdd	Lloh77, Lloh78
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpAdd	Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpAdd	Lloh68, Lloh69
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpAdd	Lloh84, Lloh85
	.loh AdrpAdd	Lloh86, Lloh87
	.loh AdrpAdd	Lloh88, Lloh89
	.loh AdrpAdd	Lloh90, Lloh91
	.loh AdrpAdd	Lloh92, Lloh93
	.loh AdrpAdd	Lloh99, Lloh100
	.loh AdrpAdd	Lloh97, Lloh98
	.loh AdrpLdrGotLdr	Lloh94, Lloh95, Lloh96
	.loh AdrpAdd	Lloh101, Lloh102
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.comm	_handle_signal,4,2              ; @handle_signal
	.comm	_CAP_READ,4,2                   ; @CAP_READ
	.comm	_CAP_WRITE,4,2                  ; @CAP_WRITE
	.comm	_CAP_SEEK,4,2                   ; @CAP_SEEK
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[%d] cap_fd=%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"*** cap_rights_limit() failed: errno=%d %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"[%d] cap_rights_get(cap_fd=%d) rc=%d rights=%s\n"

l_.str.3:                               ; @.str.3
	.asciz	"*** cap_rights_get() failed: errno=%d %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"[%d] fstat(cap_fd=%d) rc=%d errno=%d\n"

l_.str.5:                               ; @.str.5
	.asciz	"*** fstat() unexpectedly succeeded\n"

l_.str.6:                               ; @.str.6
	.asciz	"*** pdfork() failed: errno=%d %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"  [%d] child alive, parent is ppid=%d\n"

l_.str.9:                               ; @.str.9
	.asciz	"[%d] pdfork() rc=%d pd=%d\n"

l_.str.10:                              ; @.str.10
	.asciz	"*** pdgetpid(pd=%d) failed: errno=%d %s\n"

l_.str.11:                              ; @.str.11
	.asciz	"[%d] pdgetpid(pd=%d)=%d, pdfork returned %d\n"

	.comm	_SIGKILL,4,2                    ; @SIGKILL
l_.str.12:                              ; @.str.12
	.asciz	"[%d] pdkill(pd=%d, SIGKILL) -> rc=%d\n"

l_.str.13:                              ; @.str.13
	.asciz	"*** pdkill() failed: errno=%d %s\n"

	.comm	_seen_sigchld,8,3               ; @seen_sigchld
l_.str.14:                              ; @.str.14
	.asciz	"*** SIGCHLD emitted\n"

	.comm	_WNOHANG,4,2                    ; @WNOHANG
l_.str.15:                              ; @.str.15
	.asciz	"*** wait4(-1, ...) unexpectedly found child %d\n"

l_.str.16:                              ; @.str.16
	.asciz	"[%d] forking off a child process to check cap_enter()\n"

l_.str.17:                              ; @.str.17
	.asciz	"  [%d] cap_getmode() -> rc=%d, cap_mode=%d\n"

l_.str.18:                              ; @.str.18
	.asciz	"*** cap_getmode() failed: errno=%d %s\n"

l_.str.19:                              ; @.str.19
	.asciz	"  [%d] cap_enter() -> rc=%d\n"

l_.str.20:                              ; @.str.20
	.asciz	"*** cap_enter() failed: errno=%d %s\n"

l_.str.21:                              ; @.str.21
	.asciz	"/etc/passwd"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.22:                              ; @.str.22
	.asciz	"  [%d] open('/etc/passwd') -> rc=%d, errno=%d\n"

l_.str.23:                              ; @.str.23
	.asciz	"*** open() unexpectedly succeeded\n"

l_.str.24:                              ; @.str.24
	.asciz	"[%d] child %d exited with status %x\n"

l_.str.25:                              ; @.str.25
	.asciz	"/bin/ls"

l_.str.26:                              ; @.str.26
	.asciz	"-l"

l_.str.27:                              ; @.str.27
	.asciz	"smoketest"

	.section	__DATA,__const
	.p2align	3                               ; @__const.main.argv_pass
l___const.main.argv_pass:
	.quad	l_.str.25
	.quad	l_.str.26
	.quad	l_.str.27
	.quad	0

	.section	__TEXT,__cstring,cstring_literals
l_.str.28:                              ; @.str.28
	.asciz	"[%d] about to fexecve('/bin/ls', '-l', 'smoketest')\n"

l_.str.29:                              ; @.str.29
	.asciz	"*** fexecve(fd=%d) failed: rc=%d errno=%d %s\n"

	.comm	_ECAPMODE,4,2                   ; @ECAPMODE
.subsections_via_symbols
