	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_next                           ## -- Begin function next
	.p2align	4, 0x90
_next:                                  ## @next
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.24:
	movq	__argv@GOTPCREL(%rip), %rax
	movq	%rdi, (%rax)
	jmp	LBB0_22
LBB0_1:
	movq	__argv@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	_stdin@GOTPCREL(%rip), %r15
	movq	_skip@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_warn
	movq	_exitval@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	(%r12), %rax
	addq	$8, %rax
	movq	%rax, (%r12)
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, _next.done(%rip)
	movl	(%r15), %edx
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_freopen
	movl	$1, %ebx
	testl	%eax, %eax
	jne	LBB0_6
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	_next.done(%rip), %eax
	leal	1(%rax), %ecx
	movl	%ecx, _next.done(%rip)
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_23
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edi
	callq	_fileno
	movq	_CAPH_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_caph_limit_stream
	testq	%rax, %rax
	js	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	testq	%r14, %r14
	jne	LBB0_11
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.3(%rip), %rdx
	testq	%r14, %r14
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rdx
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
	testq	%r14, %r14
	je	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_12
## %bb.25:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%r13)
	jne	LBB0_17
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%eax, %eax
	callq	_caph_enter
	testq	%rax, %rax
	js	LBB0_13
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%r13)
	jne	LBB0_15
	jmp	LBB0_19
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_err
	cmpq	$0, (%r13)
	je	LBB0_19
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.3(%rip), %rdi
	testq	%r14, %r14
	je	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rax), %rdi
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %esi
	callq	_doskip
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %rax
	cmpq	$0, (%rax)
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	addq	$8, %rax
	movq	%rax, (%r12)
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, (%r13)
	jne	LBB0_2
LBB0_22:
	movl	$1, %ebx
LBB0_23:
	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,_next.done,4,2   ## @next.done
	.comm	__argv,8,3                      ## @_argv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

	.comm	_stdin,4,2                      ## @stdin
L_.str.1:                               ## @.str.1
	.asciz	"%s"

	.comm	_exitval,4,2                    ## @exitval
	.comm	_CAPH_READ,4,2                  ## @CAPH_READ
L_.str.2:                               ## @.str.2
	.asciz	"unable to restrict %s"

L_.str.3:                               ## @.str.3
	.asciz	"stdin"

L_.str.4:                               ## @.str.4
	.asciz	"unable to enter capability mode"

	.comm	_skip,8,3                       ## @skip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_next                           ; -- Begin function next
	.p2align	2
_next:                                  ; @next
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, __argv@GOTPAGE
Lloh1:
	ldr	x8, [x8, __argv@GOTPAGEOFF]
Lloh2:
	str	x0, [x8]
	b	LBB0_26
LBB0_2:
Lloh3:
	adrp	x25, __argv@GOTPAGE
Lloh4:
	ldr	x25, [x25, __argv@GOTPAGEOFF]
	ldr	x8, [x25]
Lloh5:
	adrp	x26, _stdin@GOTPAGE
Lloh6:
	ldr	x26, [x26, _stdin@GOTPAGEOFF]
Lloh7:
	adrp	x27, _CAPH_READ@GOTPAGE
Lloh8:
	ldr	x27, [x27, _CAPH_READ@GOTPAGEOFF]
Lloh9:
	adrp	x19, l_.str.2@PAGE
Lloh10:
	add	x19, x19, l_.str.2@PAGEOFF
	adrp	x20, _next.done@PAGE
Lloh11:
	adrp	x28, _skip@GOTPAGE
Lloh12:
	ldr	x28, [x28, _skip@GOTPAGEOFF]
Lloh13:
	adrp	x21, l_.str@PAGE
Lloh14:
	add	x21, x21, l_.str@PAGEOFF
Lloh15:
	adrp	x22, l_.str.1@PAGE
Lloh16:
	add	x22, x22, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x1, [x8]
	mov	x0, x22
	bl	_warn
	mov	w8, #1
Lloh17:
	adrp	x9, _exitval@GOTPAGE
Lloh18:
	ldr	x9, [x9, _exitval@GOTPAGEOFF]
Lloh19:
	str	w8, [x9]
	ldr	x8, [x25]
	add	x8, x8, #8
	str	x8, [x25]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x24, [x8]
	cbz	x24, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w23, #1
	str	w23, [x20, _next.done@PAGEOFF]
	ldr	w2, [x26]
	mov	x0, x24
	mov	x1, x21
	bl	_freopen
	cbnz	w0, LBB0_7
	b	LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w23, #0
	mov	w0, #0
	ldr	w8, [x20, _next.done@PAGEOFF]
	add	w9, w8, #1
	str	w9, [x20, _next.done@PAGEOFF]
	cbnz	w8, LBB0_27
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x26]
	bl	_fileno
	ldr	w1, [x27]
	bl	_caph_limit_stream
	tbnz	x0, #63, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	x24, LBB0_13
	b	LBB0_15
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	x24, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x8, [x8]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh20:
	adrp	x8, l_.str.3@PAGE
Lloh21:
	add	x8, x8, l_.str.3@PAGEOFF
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x8, [sp]
	mov	w0, #1
	mov	x1, x19
	bl	_err
	cbz	x24, LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x28]
	cbnz	x9, LBB0_20
	b	LBB0_23
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_caph_enter
	tbnz	x0, #63, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
	cbnz	x8, LBB0_18
	b	LBB0_23
LBB0_17:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
Lloh22:
	adrp	x1, l_.str.4@PAGE
Lloh23:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_err
	ldr	x8, [x28]
	cbz	x8, LBB0_23
LBB0_18:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	x24, LBB0_21
; %bb.19:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
LBB0_20:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x8]
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_22:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x1, x23
	bl	_doskip
LBB0_23:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x25]
	ldr	x9, [x8]
	cbz	x9, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x8, #8
	str	x8, [x25]
LBB0_25:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x28]
	cbnz	x9, LBB0_4
LBB0_26:
	mov	w0, #1
LBB0_27:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_next.done,4,2   ; @next.done
	.comm	__argv,8,3                      ; @_argv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

	.comm	_stdin,4,2                      ; @stdin
l_.str.1:                               ; @.str.1
	.asciz	"%s"

	.comm	_exitval,4,2                    ; @exitval
	.comm	_CAPH_READ,4,2                  ; @CAPH_READ
l_.str.2:                               ; @.str.2
	.asciz	"unable to restrict %s"

l_.str.3:                               ; @.str.3
	.asciz	"stdin"

l_.str.4:                               ; @.str.4
	.asciz	"unable to enter capability mode"

	.comm	_skip,8,3                       ; @skip
.subsections_via_symbols
