	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getnewbasename
_getnewbasename:                        ## @getnewbasename
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	%rcx, %rdi
	callq	_strdup
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	cmpb	$42, (%rcx)
	sete	%al
	addq	%rcx, %rax
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rcx
	callq	_asprintf
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_errx
LBB0_4:
	movq	(%rbx), %rax
	testq	%rax, %rax
	jne	LBB0_6
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_err                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s_%s"

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

	.no_dead_strip	_getnewbasename
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getnewbasename
_getnewbasename:                        ; @getnewbasename
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.1:
	mov	x0, x3
	bl	_strdup
	str	x0, [x19]
	cbz	x0, LBB0_6
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x8, x3
	ldrb	w9, [x8], #1
	cmp	w9, #42
	csel	x3, x3, x8, ne
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_asprintf
	tbz	x0, #63, LBB0_5
; %bb.4:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_5:
	ldr	x0, [x19]
	cbnz	x0, LBB0_2
LBB0_6:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_err
	.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	"%s_%s"

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

	.no_dead_strip	_getnewbasename
.subsections_via_symbols
