	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add
_add:                                   ## @add
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	_STDOUT_FILENO@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_caph_limit_stdout
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.2:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_3:
	movq	_CAP_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CAP_FSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_cap_rights_init
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_caph_rights_limit
	testq	%rax, %rax
	jns	LBB0_6
## %bb.4:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_5:
	callq	_err
LBB0_6:
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_8:
	movl	%r15d, (%rbx)
	movq	%r14, 8(%rbx)
	movq	_head@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, 16(%rbx)
	movq	%rbx, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STDOUT_FILENO,4,2              ## @STDOUT_FILENO
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to limit stdout"

	.comm	_CAP_WRITE,4,2                  ## @CAP_WRITE
	.comm	_CAP_FSTAT,4,2                  ## @CAP_FSTAT
L_.str.1:                               ## @.str.1
	.asciz	"unable to limit rights"

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

	.comm	_head,8,3                       ## @head
	.no_dead_strip	_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add
_add:                                   ; @add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _STDOUT_FILENO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STDOUT_FILENO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_3
; %bb.1:
	bl	_caph_limit_stdout
	cmn	w0, #1
	b.ne	LBB0_6
; %bb.2:
Lloh3:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _CAP_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CAP_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _CAP_FSTAT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CAP_FSTAT@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x0, sp, #12
	bl	_cap_rights_init
	add	x1, sp, #12
	mov	x0, x20
	bl	_caph_rights_limit
	tbz	x0, #63, LBB0_6
; %bb.4:
Lloh14:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	bl	_err
LBB0_6:
	mov	w0, #24
	bl	_malloc
	mov	x21, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_8:
	str	w20, [x21]
Lloh21:
	adrp	x8, _head@GOTPAGE
Lloh22:
	ldr	x8, [x8, _head@GOTPAGEOFF]
	ldr	x9, [x8]
	stp	x19, x9, [x21, #8]
	str	x21, [x8]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_STDOUT_FILENO,4,2              ; @STDOUT_FILENO
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to limit stdout"

	.comm	_CAP_WRITE,4,2                  ; @CAP_WRITE
	.comm	_CAP_FSTAT,4,2                  ; @CAP_FSTAT
l_.str.1:                               ; @.str.1
	.asciz	"unable to limit rights"

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

	.comm	_head,8,3                       ; @head
	.no_dead_strip	_add
.subsections_via_symbols
