	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_newterm                    ## -- Begin function cmd_newterm
	.p2align	4, 0x90
_cmd_newterm:                           ## @cmd_newterm
	.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, %rbx
	movl	$3, %esi
	callq	_check_arg_count
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rax, %r14
	movq	16(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	%rax, %r15
	movl	$1, %edi
	callq	_report_count
	testq	%r15, %r15
	je	LBB0_3
## %bb.5:
	movq	(%rbx), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_newterm
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_report_ptr                     ## TAILCALL
LBB0_2:
	movl	$1, %edi
	callq	_report_count
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_report_error                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rw"

L_.str.1:                               ## @.str.1
	.asciz	"BAD FILE_ARGUMENT"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_newterm                    ; -- Begin function cmd_newterm
	.p2align	2
_cmd_newterm:                           ; @cmd_newterm
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	w1, #3
	bl	_check_arg_count
	cmp	w0, #1
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_5
; %bb.3:
	mov	x20, x0
	ldr	x0, [x19, #16]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	mov	x21, x0
	mov	w0, #1
	bl	_report_count
	cbz	x21, LBB0_6
; %bb.4:
	ldr	x0, [x19]
	mov	x1, x21
	mov	x2, x20
	bl	_newterm
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_report_ptr
LBB0_5:
	mov	w0, #1
	bl	_report_count
LBB0_6:
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_report_error
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rw"

l_.str.1:                               ; @.str.1
	.asciz	"BAD FILE_ARGUMENT"

.subsections_via_symbols
