	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_bare_git_dir
_setup_bare_git_dir:                    ## @setup_bare_git_dir
	.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	%rcx, %r12
	movq	%rdx, %r13
	movl	%esi, %r15d
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rbx
	movq	%rbx, %rdi
	movq	%rdx, %rsi
	movq	%rcx, %rdx
	callq	_check_repository_format_gently
	testq	%rax, %rax
	jne	LBB0_13
## %bb.1:
	movq	_GIT_IMPLICIT_WORK_TREE_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edx
	callq	_setenv
	movq	_GIT_WORK_TREE_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_getenv
	movq	_git_work_tree_cfg@GOTPCREL(%rip), %rcx
	orq	(%rcx), %rax
	je	LBB0_7
## %bb.2:
	cmpl	%r15d, (%r14)
	je	LBB0_4
## %bb.3:
	movq	8(%r14), %rdi
	movl	%r15d, %esi
	callq	_xmemdupz
	movq	%rax, %rbx
LBB0_4:
	movq	%rbx, _setup_bare_git_dir.gitdir(%rip)
	movq	8(%r14), %rdi
	callq	_chdir
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die_errno
LBB0_6:
	movq	_setup_bare_git_dir.gitdir(%rip), %rdi
	movq	%r14, %rsi
	movq	%r13, %rdx
	movq	%r12, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_setup_explicit_git_dir         ## TAILCALL
LBB0_7:
	movq	_inside_git_dir@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_inside_work_tree@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	cmpl	%r15d, (%r14)
	jne	LBB0_8
## %bb.11:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_8:
	movq	8(%r14), %rdi
	callq	_chdir
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die_errno
LBB0_10:
	movq	8(%r14), %rdi
	callq	_offset_1st_component
	cmpl	%r15d, %eax
	cmovgl	%eax, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_strbuf_setlen
	movq	8(%r14), %rdi
LBB0_12:
	callq	_set_git_dir
LBB0_13:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_GIT_IMPLICIT_WORK_TREE_ENVIRONMENT,4,2 ## @GIT_IMPLICIT_WORK_TREE_ENVIRONMENT
L_.str.1:                               ## @.str.1
	.asciz	"0"

	.comm	_GIT_WORK_TREE_ENVIRONMENT,4,2  ## @GIT_WORK_TREE_ENVIRONMENT
	.comm	_git_work_tree_cfg,8,3          ## @git_work_tree_cfg
.zerofill __DATA,__bss,_setup_bare_git_dir.gitdir,8,3 ## @setup_bare_git_dir.gitdir
L_.str.2:                               ## @.str.2
	.asciz	"cannot come back to cwd"

	.comm	_inside_git_dir,4,2             ## @inside_git_dir
	.comm	_inside_work_tree,8,3           ## @inside_work_tree
	.no_dead_strip	_setup_bare_git_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setup_bare_git_dir
_setup_bare_git_dir:                    ; @setup_bare_git_dir
	.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	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	mov	x2, x3
	bl	_check_repository_format_gently
	cbnz	x0, LBB0_14
; %bb.1:
Lloh2:
	adrp	x8, _GIT_IMPLICIT_WORK_TREE_ENVIRONMENT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GIT_IMPLICIT_WORK_TREE_ENVIRONMENT@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w23, #1
	mov	w2, #1
	bl	_setenv
Lloh7:
	adrp	x8, _GIT_WORK_TREE_ENVIRONMENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GIT_WORK_TREE_ENVIRONMENT@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_getenv
Lloh10:
	adrp	x8, _git_work_tree_cfg@GOTPAGE
Lloh11:
	ldr	x8, [x8, _git_work_tree_cfg@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	orr	x8, x0, x8
	cbz	x8, LBB0_4
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, w22
	b.ne	LBB0_6
; %bb.3:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_4:
Lloh15:
	adrp	x8, _inside_git_dir@GOTPAGE
Lloh16:
	ldr	x8, [x8, _inside_git_dir@GOTPAGEOFF]
Lloh17:
	str	w23, [x8]
Lloh18:
	adrp	x8, _inside_work_tree@GOTPAGE
Lloh19:
	ldr	x8, [x8, _inside_work_tree@GOTPAGEOFF]
Lloh20:
	str	xzr, [x8]
	ldr	w8, [x19]
	cmp	w8, w22
	b.ne	LBB0_10
; %bb.5:
Lloh21:
	adrp	x0, l_.str@PAGE
Lloh22:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_13
LBB0_6:
	ldr	x0, [x19, #8]
	mov	x1, x22
	bl	_xmemdupz
LBB0_7:
	adrp	x22, _setup_bare_git_dir.gitdir@PAGE
	str	x0, [x22, _setup_bare_git_dir.gitdir@PAGEOFF]
	ldr	x0, [x19, #8]
	bl	_chdir
	cbz	x0, LBB0_9
; %bb.8:
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	bl	_die_errno
LBB0_9:
	ldr	x0, [x22, _setup_bare_git_dir.gitdir@PAGEOFF]
	mov	x1, x19
	mov	x2, x21
	mov	x3, x20
	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
	b	_setup_explicit_git_dir
LBB0_10:
	ldr	x0, [x19, #8]
	bl	_chdir
	cbz	x0, LBB0_12
; %bb.11:
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	bl	_die_errno
LBB0_12:
	ldr	x0, [x19, #8]
	bl	_offset_1st_component
	cmp	w0, w22
	csel	w1, w0, w22, gt
	mov	x0, x19
	bl	_strbuf_setlen
	ldr	x0, [x19, #8]
LBB0_13:
	bl	_set_git_dir
LBB0_14:
	mov	x0, #0
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotStr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_GIT_IMPLICIT_WORK_TREE_ENVIRONMENT,4,2 ; @GIT_IMPLICIT_WORK_TREE_ENVIRONMENT
l_.str.1:                               ; @.str.1
	.asciz	"0"

	.comm	_GIT_WORK_TREE_ENVIRONMENT,4,2  ; @GIT_WORK_TREE_ENVIRONMENT
	.comm	_git_work_tree_cfg,8,3          ; @git_work_tree_cfg
.zerofill __DATA,__bss,_setup_bare_git_dir.gitdir,8,3 ; @setup_bare_git_dir.gitdir
l_.str.2:                               ; @.str.2
	.asciz	"cannot come back to cwd"

	.comm	_inside_git_dir,4,2             ; @inside_git_dir
	.comm	_inside_work_tree,8,3           ; @inside_work_tree
	.no_dead_strip	_setup_bare_git_dir
.subsections_via_symbols
