	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mkdbname
_mkdbname:                              ## @mkdbname
	.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	%rdi, %r14
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$47, %esi
	callq	_strrchr
	leaq	1(%rax), %rcx
	testq	%rax, %rax
	cmovneq	%rcx, %r14
LBB0_2:
	movq	%r14, %rdi
	callq	_strlen
	movl	%eax, %r15d
	movq	_ext@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_strlen
	movl	%eax, %r12d
	leal	(%r12,%r15), %r13d
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jge	LBB0_6
## %bb.3:
	leal	1(%r13), %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movslq	%r15d, %rdi
	addq	%rbx, %rdi
	movq	_ext@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movslq	%r13d, %rax
	movb	$0, (%rbx,%rax)
	jmp	LBB0_7
LBB0_6:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ext,8,3                        ## @ext
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.no_dead_strip	_mkdbname
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mkdbname
_mkdbname:                              ; @mkdbname
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	cbz	w1, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	cmp	x0, #0
	csinc	x19, x19, x0, eq
LBB0_2:
	mov	x0, x19
	bl	_strlen
	mov	x21, x0
Lloh0:
	adrp	x23, _ext@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ext@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_strlen
	sxtw	x22, w21
	add	x24, x22, w0, sxtw
Lloh2:
	adrp	x8, _MAXPATHLEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAXPATHLEN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ge	LBB0_5
; %bb.3:
	mov	x20, x0
	add	w0, w24, #1
	bl	_malloc
	mov	x21, x0
	cbz	x0, LBB0_6
; %bb.4:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_memcpy
	add	x0, x21, x22
	ldr	x1, [x23]
	mov	x2, x20
	bl	_memcpy
	strb	wzr, [x21, x24]
	b	LBB0_6
LBB0_5:
	mov	x21, #0
LBB0_6:
	mov	x0, x21
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ext,8,3                        ; @ext
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.no_dead_strip	_mkdbname
.subsections_via_symbols
