	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setup_discovered_git_dir
_setup_discovered_git_dir:              ## @setup_discovered_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	%r8, %r15
	movq	%rcx, %rbx
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rcx, %rsi
	movq	%r8, %rdx
	callq	_check_repository_format_gently
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_2:
	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_5
## %bb.3:
	cmpl	%r13d, (%r14)
	je	LBB0_4
## %bb.10:
	movq	%r12, %rdi
	callq	_is_absolute_path
	testl	%eax, %eax
	je	LBB0_17
LBB0_4:
	xorl	%r13d, %r13d
	jmp	LBB0_18
LBB0_5:
	movq	_is_bare_repository_cfg@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jle	LBB0_12
## %bb.6:
	cmpl	%r13d, (%r14)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_real_path
	movq	%rax, %r12
LBB0_8:
	movq	%r12, %rdi
	callq	_set_git_dir
	movq	8(%r14), %rdi
	callq	_chdir
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die_errno
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_12:
	leaq	L_.str.1(%rip), %rdi
	callq	_set_git_work_tree
	movq	_DEFAULT_GIT_DIR_ENVIRONMENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	callq	_set_git_dir
LBB0_14:
	movq	_inside_git_dir@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_inside_work_tree@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	cmpl	%r13d, (%r14)
	jle	LBB0_1
## %bb.15:
	movq	8(%r14), %rdi
	callq	_offset_1st_component
	xorl	%ebx, %ebx
	cmpl	%r13d, %eax
	setne	%bl
	addl	%r13d, %ebx
	movq	%r14, %rdi
	movl	$47, %esi
	callq	_strbuf_addch
	movslq	%ebx, %rax
	addq	8(%r14), %rax
	jmp	LBB0_21
LBB0_17:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_real_pathdup
	movq	%rax, %r12
	movq	%rax, %r13
LBB0_18:
	movq	8(%r14), %rdi
	callq	_chdir
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	leaq	L_.str(%rip), %rdi
	callq	__
	movl	%eax, %edi
	callq	_die_errno
LBB0_20:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_setup_explicit_git_dir
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_free
	movq	%rbx, %rax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GIT_WORK_TREE_ENVIRONMENT,4,2  ## @GIT_WORK_TREE_ENVIRONMENT
	.comm	_git_work_tree_cfg,8,3          ## @git_work_tree_cfg
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot come back to cwd"

	.comm	_is_bare_repository_cfg,8,3     ## @is_bare_repository_cfg
L_.str.1:                               ## @.str.1
	.asciz	"."

	.comm	_DEFAULT_GIT_DIR_ENVIRONMENT,4,2 ## @DEFAULT_GIT_DIR_ENVIRONMENT
	.comm	_inside_git_dir,8,3             ## @inside_git_dir
	.comm	_inside_work_tree,4,2           ## @inside_work_tree
	.no_dead_strip	_setup_discovered_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_discovered_git_dir
_setup_discovered_git_dir:              ; @setup_discovered_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	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x20, x0
	mov	x1, x3
	mov	x2, x4
	bl	_check_repository_format_gently
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, #0
	b	LBB0_19
LBB0_2:
Lloh0:
	adrp	x8, _GIT_WORK_TREE_ENVIRONMENT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GIT_WORK_TREE_ENVIRONMENT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_getenv
Lloh3:
	adrp	x8, _git_work_tree_cfg@GOTPAGE
Lloh4:
	ldr	x8, [x8, _git_work_tree_cfg@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	orr	x8, x0, x8
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w8, [x19]
	cmp	w8, w23
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_is_absolute_path
	cbz	w0, LBB0_15
LBB0_5:
	mov	x23, #0
	b	LBB0_16
LBB0_6:
Lloh6:
	adrp	x8, _is_bare_repository_cfg@GOTPAGE
Lloh7:
	ldr	x8, [x8, _is_bare_repository_cfg@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_11
; %bb.7:
	ldr	w8, [x19]
	cmp	w8, w23
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_real_path
	mov	x20, x0
LBB0_9:
	mov	x0, x20
	bl	_set_git_dir
	ldr	x0, [x19, #8]
	bl	_chdir
	cbz	x0, LBB0_19
; %bb.10:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	bl	_die_errno
	mov	x0, #0
	b	LBB0_19
LBB0_11:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_set_git_work_tree
Lloh13:
	adrp	x8, _DEFAULT_GIT_DIR_ENVIRONMENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DEFAULT_GIT_DIR_ENVIRONMENT@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.12:
	mov	x0, x20
	bl	_set_git_dir
LBB0_13:
	mov	x0, #0
Lloh16:
	adrp	x8, _inside_git_dir@GOTPAGE
Lloh17:
	ldr	x8, [x8, _inside_git_dir@GOTPAGEOFF]
Lloh18:
	str	xzr, [x8]
Lloh19:
	adrp	x8, _inside_work_tree@GOTPAGE
Lloh20:
	ldr	x8, [x8, _inside_work_tree@GOTPAGEOFF]
	mov	w9, #1
Lloh21:
	str	w9, [x8]
	ldr	w8, [x19]
	cmp	w8, w23
	b.le	LBB0_19
; %bb.14:
	ldr	x0, [x19, #8]
	bl	_offset_1st_component
	cmp	w0, w23
	cinc	w20, w23, ne
	mov	x0, x19
	mov	w1, #47
	bl	_strbuf_addch
	ldr	x8, [x19, #8]
	add	x0, x8, w20, sxtw
	b	LBB0_19
LBB0_15:
	mov	x0, x20
	mov	w1, #1
	bl	_real_pathdup
	mov	x20, x0
	mov	x23, x0
LBB0_16:
	ldr	x0, [x19, #8]
	bl	_chdir
	cbz	x0, LBB0_18
; %bb.17:
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	__
	bl	_die_errno
LBB0_18:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x3, x21
	bl	_setup_explicit_git_dir
	mov	x19, x0
	mov	x0, x23
	bl	_free
	mov	x0, x19
LBB0_19:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GIT_WORK_TREE_ENVIRONMENT,4,2  ; @GIT_WORK_TREE_ENVIRONMENT
	.comm	_git_work_tree_cfg,8,3          ; @git_work_tree_cfg
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot come back to cwd"

	.comm	_is_bare_repository_cfg,8,3     ; @is_bare_repository_cfg
l_.str.1:                               ; @.str.1
	.asciz	"."

	.comm	_DEFAULT_GIT_DIR_ENVIRONMENT,4,2 ; @DEFAULT_GIT_DIR_ENVIRONMENT
	.comm	_inside_git_dir,8,3             ; @inside_git_dir
	.comm	_inside_work_tree,4,2           ; @inside_work_tree
	.no_dead_strip	_setup_discovered_git_dir
.subsections_via_symbols
