	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_git_env                  ## -- Begin function setup_git_env
	.p2align	4, 0x90
_setup_git_env:                         ## @setup_git_env
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	$0, -40(%rbp)
	movq	_ARGV_ARRAY_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	_GIT_COMMON_DIR_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-32(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_getenv_safe
	movq	%rax, -48(%rbp)
	movq	_DB_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_getenv_safe
	movq	%rax, -56(%rbp)
	movq	_GRAFT_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_getenv_safe
	movq	%rax, -64(%rbp)
	movq	_INDEX_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_getenv_safe
	movq	%rax, -72(%rbp)
	movq	_ALTERNATE_DB_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_getenv_safe
	movq	%rax, -80(%rbp)
	movq	_the_repository@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	-80(%rbp), %rdx
	movq	%r14, %rsi
	callq	_repo_set_gitdir
	movq	%rbx, %rdi
	callq	_argv_array_clear
	movq	_NO_REPLACE_OBJECTS_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_read_replace_refs@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_2:
	movq	_GIT_REPLACE_REF_BASE_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	movq	%rax, %rbx
	movq	_git_replace_ref_base@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_free
	testq	%rbx, %rbx
	leaq	L_.str(%rip), %rdi
	cmovneq	%rbx, %rdi
	callq	_xstrdup
	movl	%eax, (%r14)
	movq	_git_namespace@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_free
	movq	_GIT_NAMESPACE_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	movq	%rax, %rdi
	callq	_expand_namespace
	movl	%eax, (%rbx)
	movq	_GIT_SHALLOW_FILE_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r15), %edi
	movq	%rax, %rsi
	xorl	%edx, %edx
	callq	_set_alternate_shallow_file
LBB0_4:
	addq	$56, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ARGV_ARRAY_INIT,4,2            ## @ARGV_ARRAY_INIT
	.comm	_GIT_COMMON_DIR_ENVIRONMENT,4,2 ## @GIT_COMMON_DIR_ENVIRONMENT
	.comm	_DB_ENVIRONMENT,4,2             ## @DB_ENVIRONMENT
	.comm	_GRAFT_ENVIRONMENT,4,2          ## @GRAFT_ENVIRONMENT
	.comm	_INDEX_ENVIRONMENT,4,2          ## @INDEX_ENVIRONMENT
	.comm	_ALTERNATE_DB_ENVIRONMENT,4,2   ## @ALTERNATE_DB_ENVIRONMENT
	.comm	_the_repository,4,2             ## @the_repository
	.comm	_NO_REPLACE_OBJECTS_ENVIRONMENT,4,2 ## @NO_REPLACE_OBJECTS_ENVIRONMENT
	.comm	_read_replace_refs,8,3          ## @read_replace_refs
	.comm	_GIT_REPLACE_REF_BASE_ENVIRONMENT,4,2 ## @GIT_REPLACE_REF_BASE_ENVIRONMENT
	.comm	_git_replace_ref_base,4,2       ## @git_replace_ref_base
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"refs/replace/"

	.comm	_git_namespace,4,2              ## @git_namespace
	.comm	_GIT_NAMESPACE_ENVIRONMENT,4,2  ## @GIT_NAMESPACE_ENVIRONMENT
	.comm	_GIT_SHALLOW_FILE_ENVIRONMENT,4,2 ## @GIT_SHALLOW_FILE_ENVIRONMENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_setup_git_env                  ; -- Begin function setup_git_env
	.p2align	2
_setup_git_env:                         ; @setup_git_env
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _ARGV_ARRAY_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ARGV_ARRAY_INIT@GOTPAGEOFF]
	str	xzr, [sp, #56]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh3:
	adrp	x8, _GIT_COMMON_DIR_ENVIRONMENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GIT_COMMON_DIR_ENVIRONMENT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_getenv_safe
	str	x0, [sp, #48]
Lloh6:
	adrp	x8, _DB_ENVIRONMENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DB_ENVIRONMENT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_getenv_safe
	str	x0, [sp, #40]
Lloh9:
	adrp	x8, _GRAFT_ENVIRONMENT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _GRAFT_ENVIRONMENT@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_getenv_safe
	str	x0, [sp, #32]
Lloh12:
	adrp	x8, _INDEX_ENVIRONMENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INDEX_ENVIRONMENT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_getenv_safe
	str	x0, [sp, #24]
Lloh15:
	adrp	x8, _ALTERNATE_DB_ENVIRONMENT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ALTERNATE_DB_ENVIRONMENT@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_getenv_safe
	str	x0, [sp, #16]
Lloh18:
	adrp	x20, _the_repository@GOTPAGE
Lloh19:
	ldr	x20, [x20, _the_repository@GOTPAGEOFF]
	ldr	w0, [x20]
	add	x2, sp, #16
	mov	x1, x19
	bl	_repo_set_gitdir
	add	x0, sp, #8
	bl	_argv_array_clear
Lloh20:
	adrp	x8, _NO_REPLACE_OBJECTS_ENVIRONMENT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _NO_REPLACE_OBJECTS_ENVIRONMENT@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_getenv
	cbz	x0, LBB0_2
; %bb.1:
Lloh23:
	adrp	x8, _read_replace_refs@GOTPAGE
Lloh24:
	ldr	x8, [x8, _read_replace_refs@GOTPAGEOFF]
Lloh25:
	str	xzr, [x8]
LBB0_2:
Lloh26:
	adrp	x8, _GIT_REPLACE_REF_BASE_ENVIRONMENT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _GIT_REPLACE_REF_BASE_ENVIRONMENT@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_getenv
	mov	x19, x0
Lloh29:
	adrp	x21, _git_replace_ref_base@GOTPAGE
Lloh30:
	ldr	x21, [x21, _git_replace_ref_base@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_free
Lloh31:
	adrp	x8, l_.str@PAGE
Lloh32:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x19, #0
	csel	x0, x8, x19, eq
	bl	_xstrdup
	str	w0, [x21]
Lloh33:
	adrp	x19, _git_namespace@GOTPAGE
Lloh34:
	ldr	x19, [x19, _git_namespace@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_free
Lloh35:
	adrp	x8, _GIT_NAMESPACE_ENVIRONMENT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _GIT_NAMESPACE_ENVIRONMENT@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_getenv
	bl	_expand_namespace
	str	w0, [x19]
Lloh38:
	adrp	x8, _GIT_SHALLOW_FILE_ENVIRONMENT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _GIT_SHALLOW_FILE_ENVIRONMENT@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_getenv
	cbz	x0, LBB0_4
; %bb.3:
	mov	x1, x0
	ldr	w0, [x20]
	mov	w2, #0
	bl	_set_alternate_shallow_file
LBB0_4:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_ARGV_ARRAY_INIT,4,2            ; @ARGV_ARRAY_INIT
	.comm	_GIT_COMMON_DIR_ENVIRONMENT,4,2 ; @GIT_COMMON_DIR_ENVIRONMENT
	.comm	_DB_ENVIRONMENT,4,2             ; @DB_ENVIRONMENT
	.comm	_GRAFT_ENVIRONMENT,4,2          ; @GRAFT_ENVIRONMENT
	.comm	_INDEX_ENVIRONMENT,4,2          ; @INDEX_ENVIRONMENT
	.comm	_ALTERNATE_DB_ENVIRONMENT,4,2   ; @ALTERNATE_DB_ENVIRONMENT
	.comm	_the_repository,4,2             ; @the_repository
	.comm	_NO_REPLACE_OBJECTS_ENVIRONMENT,4,2 ; @NO_REPLACE_OBJECTS_ENVIRONMENT
	.comm	_read_replace_refs,8,3          ; @read_replace_refs
	.comm	_GIT_REPLACE_REF_BASE_ENVIRONMENT,4,2 ; @GIT_REPLACE_REF_BASE_ENVIRONMENT
	.comm	_git_replace_ref_base,4,2       ; @git_replace_ref_base
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"refs/replace/"

	.comm	_git_namespace,4,2              ; @git_namespace
	.comm	_GIT_NAMESPACE_ENVIRONMENT,4,2  ; @GIT_NAMESPACE_ENVIRONMENT
	.comm	_GIT_SHALLOW_FILE_ENVIRONMENT,4,2 ; @GIT_SHALLOW_FILE_ENVIRONMENT
.subsections_via_symbols
