	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function newfile
_newfile:                               ## @newfile
	.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
	movq	_ofd@GOTPCREL(%rip), %r14
	cmpl	$-1, (%r14)
	jne	LBB0_5
## %bb.1:
	movq	_fname@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	cmpb	$0, (%rbx)
	je	LBB0_2
## %bb.3:
	movq	%rbx, %rdi
	callq	_strlen
	cltq
	addq	%rbx, %rax
	jmp	LBB0_4
LBB0_2:
	movb	$120, (%rbx)
	movq	(%rax), %rax
	incq	%rax
LBB0_4:
	movq	%rax, _newfile.fpnt(%rip)
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fileno
	movl	%eax, (%r14)
LBB0_5:
	movq	_dflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	$97, %eax
	movl	$48, %ecx
	cmovel	%eax, %ecx
	movl	$122, %eax
	movl	$57, %r12d
	cmovel	%eax, %r12d
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	subl	%ecx, %r12d
	incl	%r12d
	movq	_sufflen@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movslq	%r12d, %r13
	movl	$1, %r14d
	testq	%rcx, %rcx
	jle	LBB0_11
## %bb.6:
	movq	_LONG_MAX@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	imulq	%r13, %r14
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	cmpq	%rcx, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %eax
	cltd
	idivl	%r12d
	cltq
	cmpq	%rax, %r14
	jle	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	_EX_USAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_errx
	movq	_sufflen@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	jmp	LBB0_10
LBB0_11:
	movq	_newfile.fnum(%rip), %rsi
	cmpq	%r14, %rsi
	jne	LBB0_13
## %bb.12:
	movq	_EX_DATAERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_errx
	movq	_newfile.fnum(%rip), %rsi
	movq	_sufflen@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
LBB0_13:
	movq	_newfile.fpnt(%rip), %rdi
	incq	%rcx
	movq	%rsi, %rax
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_14 Depth=1
	cqto
	idivq	%r13
LBB0_17:                                ##   in Loop: Header=BB0_14 Depth=1
	addb	%bl, %dl
	movb	%dl, -2(%rdi,%rcx)
	decq	%rcx
	cmpq	$1, %rcx
	jle	LBB0_18
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rdx
	orq	%r13, %rdx
	shrq	$32, %rdx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $edx killed $edx def $rdx
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_17
LBB0_18:
	movq	_sufflen@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movb	$0, (%rdi,%rax)
	incq	%rsi
	movq	%rsi, _newfile.fnum(%rip)
	movq	_fname@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_freopen
	testl	%eax, %eax
	jne	LBB0_20
## %bb.19:
	movq	_EX_IOERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rdx
	leaq	L_.str.3(%rip), %rsi
	callq	_err
LBB0_20:
	movq	_file_open@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_newfile.fnum,8,3 ## @newfile.fnum
.zerofill __DATA,__bss,_newfile.fpnt,8,3 ## @newfile.fpnt
	.comm	_ofd,4,2                        ## @ofd
	.comm	_fname,8,3                      ## @fname
	.comm	_stdout,4,2                     ## @stdout
	.comm	_dflag,8,3                      ## @dflag
	.comm	_sufflen,8,3                    ## @sufflen
	.comm	_LONG_MAX,4,2                   ## @LONG_MAX
	.comm	_EX_USAGE,4,2                   ## @EX_USAGE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"suffix is too long (max %ld)"

	.comm	_EX_DATAERR,4,2                 ## @EX_DATAERR
L_.str.1:                               ## @.str.1
	.asciz	"too many files"

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

	.comm	_EX_IOERR,4,2                   ## @EX_IOERR
L_.str.3:                               ## @.str.3
	.asciz	"%s"

	.comm	_file_open,4,2                  ## @file_open
	.no_dead_strip	_newfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function newfile
_newfile:                               ; @newfile
	.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
Lloh0:
	adrp	x20, _ofd@GOTPAGE
Lloh1:
	ldr	x20, [x20, _ofd@GOTPAGEOFF]
	ldr	w8, [x20]
Lloh2:
	adrp	x22, _fname@GOTPAGE
Lloh3:
	ldr	x22, [x22, _fname@GOTPAGEOFF]
	adrp	x23, _newfile.fpnt@PAGE
Lloh4:
	adrp	x21, _stdout@GOTPAGE
Lloh5:
	ldr	x21, [x21, _stdout@GOTPAGEOFF]
	cmn	w8, #1
	b.ne	LBB0_5
; %bb.1:
	ldr	x19, [x22]
	ldrb	w8, [x19]
	cbz	w8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_strlen
	add	x8, x19, w0, sxtw
	b	LBB0_4
LBB0_3:
	mov	w8, #120
	strb	w8, [x19]
	ldr	x8, [x22]
	add	x8, x8, #1
LBB0_4:
	str	x8, [x23, _newfile.fpnt@PAGEOFF]
	ldr	w0, [x21]
	bl	_fileno
	str	w0, [x20]
LBB0_5:
Lloh6:
	adrp	x8, _dflag@GOTPAGE
Lloh7:
	ldr	x8, [x8, _dflag@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w8, #48
	mov	w9, #97
	csel	w23, w9, w8, eq
	mov	w8, #57
	mov	w9, #122
	csel	w8, w9, w8, eq
	sub	w8, w8, w23
	add	w25, w8, #1
Lloh9:
	adrp	x24, _sufflen@GOTPAGE
Lloh10:
	ldr	x24, [x24, _sufflen@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x27, #0
	mov	x9, x25
	sxtw	x28, w9
	mov	w26, #1
Lloh11:
	adrp	x21, _LONG_MAX@GOTPAGE
Lloh12:
	ldr	x21, [x21, _LONG_MAX@GOTPAGEOFF]
Lloh13:
	adrp	x20, _EX_USAGE@GOTPAGE
Lloh14:
	ldr	x20, [x20, _EX_USAGE@GOTPAGEOFF]
Lloh15:
	adrp	x19, l_.str@PAGE
Lloh16:
	add	x19, x19, l_.str@PAGEOFF
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	mul	x26, x26, x28
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x27, x27, #1
	cmp	x27, x8
	b.ge	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x21]
	sdiv	w9, w9, w25
	cmp	x26, w9, sxtw
	b.le	LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [x20]
	str	x27, [sp]
	mov	x1, x19
	bl	_errx
	ldr	x8, [x24]
	b	LBB0_8
LBB0_11:
	mov	w26, #1
LBB0_12:
	adrp	x19, _newfile.fnum@PAGE
	ldr	x9, [x19, _newfile.fnum@PAGEOFF]
	cmp	x9, x26
Lloh17:
	adrp	x20, _stdout@GOTPAGE
Lloh18:
	ldr	x20, [x20, _stdout@GOTPAGEOFF]
	b.ne	LBB0_14
; %bb.13:
Lloh19:
	adrp	x8, _EX_DATAERR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EX_DATAERR@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_errx
	ldr	x9, [x19, _newfile.fnum@PAGEOFF]
	ldr	x8, [x24]
LBB0_14:
	sxtw	x11, w25
Lloh24:
	adrp	x10, _newfile.fpnt@PAGE
Lloh25:
	ldr	x10, [x10, _newfile.fpnt@PAGEOFF]
	sub	x12, x10, #1
	mov	x13, x9
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	sdiv	x14, x13, x11
	msub	w13, w14, w11, w13
	add	w13, w23, w13
	strb	w13, [x12, x8]
	mov	x13, x14
	subs	x8, x8, #1
	b.gt	LBB0_15
; %bb.16:
	ldr	x8, [x24]
	strb	wzr, [x10, x8]
	add	x8, x9, #1
	str	x8, [x19, _newfile.fnum@PAGEOFF]
	ldr	x0, [x22]
	ldr	w2, [x20]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_freopen
	cbnz	w0, LBB0_18
; %bb.17:
Lloh28:
	adrp	x8, _EX_IOERR@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EX_IOERR@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	x2, [x22]
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_err
LBB0_18:
Lloh33:
	adrp	x8, _file_open@GOTPAGE
Lloh34:
	ldr	x8, [x8, _file_open@GOTPAGEOFF]
	mov	w9, #1
Lloh35:
	str	w9, [x8]
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdr	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_newfile.fnum,8,3 ; @newfile.fnum
.zerofill __DATA,__bss,_newfile.fpnt,8,3 ; @newfile.fpnt
	.comm	_ofd,4,2                        ; @ofd
	.comm	_fname,8,3                      ; @fname
	.comm	_stdout,4,2                     ; @stdout
	.comm	_dflag,8,3                      ; @dflag
	.comm	_sufflen,8,3                    ; @sufflen
	.comm	_LONG_MAX,4,2                   ; @LONG_MAX
	.comm	_EX_USAGE,4,2                   ; @EX_USAGE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"suffix is too long (max %ld)"

	.comm	_EX_DATAERR,4,2                 ; @EX_DATAERR
l_.str.1:                               ; @.str.1
	.asciz	"too many files"

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

	.comm	_EX_IOERR,4,2                   ; @EX_IOERR
l_.str.3:                               ; @.str.3
	.asciz	"%s"

	.comm	_file_open,4,2                  ; @file_open
	.no_dead_strip	_newfile
.subsections_via_symbols
