	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function copy_templates
_copy_templates:                        ## @copy_templates
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	_REPOSITORY_FORMAT_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movaps	%xmm0, -80(%rbp)
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_3
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_6
LBB0_5:
	xorl	%r14d, %r14d
	cmpb	$0, (%rbx)
	je	LBB0_16
LBB0_8:
	leaq	-64(%rbp), %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_strbuf_addstr
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_strbuf_complete
	movq	-64(%rbp), %r12
	movl	-56(%rbp), %edi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %r13
	movq	%r13, %rdi
	callq	_strbuf_addstr
	movl	-56(%rbp), %esi
	leaq	-48(%rbp), %rdi
	callq	_read_repository_format
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_strbuf_setlen
	cmpq	$0, -48(%rbp)
	js	LBB0_13
## %bb.11:
	leaq	-48(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	callq	_verify_repository_format
	testq	%rax, %rax
	js	LBB0_12
LBB0_13:
	xorl	%eax, %eax
	callq	_get_git_common_dir
	leaq	-96(%rbp), %rbx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_strbuf_addstr
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strbuf_complete
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_copy_templates_1
	jmp	LBB0_14
LBB0_1:
	movq	_TEMPLATE_DIR_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	movq	%rax, %rbx
	testq	%rbx, %rbx
	jne	LBB0_4
LBB0_3:
	movq	_init_db_template_dir@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
LBB0_6:
	movq	_DEFAULT_GIT_TEMPLATE_DIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_system_path
	movq	%rax, %rbx
	movq	%rax, %r14
	cmpb	$0, (%rbx)
	jne	LBB0_8
LBB0_16:
	movq	%r14, %rdi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_9:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_warning
	jmp	LBB0_15
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	-72(%rbp), %edx
	movl	%eax, %edi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_warning
	leaq	-80(%rbp), %rdi
	callq	_strbuf_release
LBB0_14:
	movq	%r15, %rdi
	callq	_closedir
LBB0_15:
	movq	%r14, %rdi
	callq	_free
	leaq	-96(%rbp), %rdi
	callq	_strbuf_release
	leaq	-64(%rbp), %rdi
	callq	_strbuf_release
	leaq	-48(%rbp), %rdi
	callq	_clear_repository_format
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,16,3               ## @STRBUF_INIT
	.comm	_REPOSITORY_FORMAT_INIT,8,3     ## @REPOSITORY_FORMAT_INIT
	.comm	_TEMPLATE_DIR_ENVIRONMENT,4,2   ## @TEMPLATE_DIR_ENVIRONMENT
	.comm	_init_db_template_dir,8,3       ## @init_db_template_dir
	.comm	_DEFAULT_GIT_TEMPLATE_DIR,4,2   ## @DEFAULT_GIT_TEMPLATE_DIR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"templates not found in %s"

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

L_.str.2:                               ## @.str.2
	.asciz	"not copying templates from '%s': %s"

	.no_dead_strip	_copy_templates
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function copy_templates
_copy_templates:                        ; @copy_templates
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	q0, [x8]
	stur	q0, [x29, #-48]
	str	q0, [sp, #48]
Lloh3:
	adrp	x8, _REPOSITORY_FORMAT_INIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _REPOSITORY_FORMAT_INIT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	str	q0, [sp, #16]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _TEMPLATE_DIR_ENVIRONMENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TEMPLATE_DIR_ENVIRONMENT@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_getenv
LBB0_2:
Lloh9:
	adrp	x8, _init_db_template_dir@GOTPAGE
Lloh10:
	ldr	x8, [x8, _init_db_template_dir@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x0, #0
	csel	x20, x8, x0, eq
	cbz	x20, LBB0_8
; %bb.3:
	mov	x19, #0
	ldrb	w8, [x20]
	cbz	w8, LBB0_9
LBB0_4:
	add	x0, sp, #48
	mov	x1, x20
	bl	_strbuf_addstr
	add	x0, sp, #48
	mov	w1, #47
	bl	_strbuf_complete
	ldr	x22, [sp, #48]
	ldr	w0, [sp, #56]
	bl	_opendir
	cbz	x0, LBB0_10
; %bb.5:
	mov	x21, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #48
	bl	_strbuf_addstr
	ldr	w1, [sp, #56]
	add	x0, sp, #40
	bl	_read_repository_format
	add	x0, sp, #48
	mov	x1, x22
	bl	_strbuf_setlen
	ldr	x8, [sp, #40]
	tbnz	x8, #63, LBB0_7
; %bb.6:
	add	x0, sp, #40
	add	x1, sp, #16
	bl	_verify_repository_format
	tbnz	x0, #63, LBB0_11
LBB0_7:
	bl	_get_git_common_dir
	mov	x1, x0
	sub	x0, x29, #48
	bl	_strbuf_addstr
	sub	x0, x29, #48
	mov	w1, #47
	bl	_strbuf_complete
	sub	x0, x29, #48
	add	x1, sp, #48
	mov	x2, x21
	bl	_copy_templates_1
	b	LBB0_12
LBB0_8:
Lloh14:
	adrp	x8, _DEFAULT_GIT_TEMPLATE_DIR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DEFAULT_GIT_TEMPLATE_DIR@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_system_path
	mov	x20, x0
	mov	x19, x0
	ldrb	w8, [x20]
	cbnz	w8, LBB0_4
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_free
LBB0_10:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	mov	x1, x20
	bl	_warning
	b	LBB0_13
LBB0_11:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	ldr	w8, [sp, #24]
	str	x8, [sp]
	mov	x1, x20
	bl	_warning
	add	x0, sp, #16
	bl	_strbuf_release
LBB0_12:
	mov	x0, x21
	bl	_closedir
LBB0_13:
	mov	x0, x19
	bl	_free
	sub	x0, x29, #48
	bl	_strbuf_release
	add	x0, sp, #48
	bl	_strbuf_release
	add	x0, sp, #40
	bl	_clear_repository_format
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,16,3               ; @STRBUF_INIT
	.comm	_REPOSITORY_FORMAT_INIT,8,3     ; @REPOSITORY_FORMAT_INIT
	.comm	_TEMPLATE_DIR_ENVIRONMENT,4,2   ; @TEMPLATE_DIR_ENVIRONMENT
	.comm	_init_db_template_dir,8,3       ; @init_db_template_dir
	.comm	_DEFAULT_GIT_TEMPLATE_DIR,4,2   ; @DEFAULT_GIT_TEMPLATE_DIR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"templates not found in %s"

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

l_.str.2:                               ; @.str.2
	.asciz	"not copying templates from '%s': %s"

	.no_dead_strip	_copy_templates
.subsections_via_symbols
