	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ensure_core_worktree
_ensure_core_worktree:                  ## @ensure_core_worktree
	.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	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	cmpl	$2, %edi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_BUG
LBB0_2:
	movq	8(%rbx), %r14
	movq	_the_repository@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	_null_oid@GOTPCREL(%rip), %rsi
	movq	%r14, %rdx
	callq	_submodule_from_path
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_BUG
LBB0_4:
	movl	(%r15), %esi
	leaq	-32(%rbp), %rdi
	movq	%rbx, %rdx
	callq	_repo_submodule_init
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_die
LBB0_6:
	leaq	L_.str.3(%rip), %rsi
	leaq	-32(%rbp), %rdi
	leaq	-48(%rbp), %rdx
	callq	_repo_config_get_string
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	leaq	L_.str.4(%rip), %rsi
	leaq	-32(%rbp), %rdi
	callq	_repo_git_path
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_absolute_pathdup
	movq	%rax, %rbx
	movl	-32(%rbp), %esi
	leaq	-40(%rbp), %r14
	movq	%rax, %rdi
	movq	%r14, %rdx
	callq	_relative_path
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_git_config_set_in_file
	movq	%r15, %rdi
	callq	_free
	movq	%rbx, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_strbuf_release
LBB0_8:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"submodule--helper ensure-core-worktree <path>"

	.comm	_the_repository,4,2             ## @the_repository
	.comm	_null_oid,4,2                   ## @null_oid
L_.str.1:                               ## @.str.1
	.asciz	"We could get the submodule handle before?"

L_.str.2:                               ## @.str.2
	.asciz	"could not get a repository handle for submodule '%s'"

L_.str.3:                               ## @.str.3
	.asciz	"core.worktree"

	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
L_.str.4:                               ## @.str.4
	.asciz	"config"

	.no_dead_strip	_ensure_core_worktree
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ensure_core_worktree
_ensure_core_worktree:                  ; @ensure_core_worktree
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	cmp	w0, #2
	b.eq	LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_BUG
LBB0_2:
	ldr	x19, [x19, #8]
Lloh2:
	adrp	x21, _the_repository@GOTPAGE
Lloh3:
	ldr	x21, [x21, _the_repository@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh4:
	adrp	x1, _null_oid@GOTPAGE
Lloh5:
	ldr	x1, [x1, _null_oid@GOTPAGEOFF]
	mov	x2, x19
	bl	_submodule_from_path
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BUG
LBB0_4:
	ldr	w1, [x21]
	add	x0, sp, #16
	mov	x2, x20
	bl	_repo_submodule_init
	cbz	x0, LBB0_6
; %bb.5:
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x19
	bl	_die
LBB0_6:
Lloh10:
	adrp	x1, l_.str.3@PAGE
Lloh11:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x0, sp, #16
	add	x2, sp, #24
	bl	_repo_config_get_string
	cbnz	w0, LBB0_8
; %bb.7:
Lloh12:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x0, sp, #16
	bl	_repo_git_path
	mov	x20, x0
	mov	x0, x19
	bl	_absolute_pathdup
	mov	x19, x0
	ldr	w1, [sp, #16]
	add	x2, sp, #8
	bl	_relative_path
	mov	x2, x0
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_git_config_set_in_file
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_free
	add	x0, sp, #8
	bl	_strbuf_release
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"submodule--helper ensure-core-worktree <path>"

	.comm	_the_repository,4,2             ; @the_repository
	.comm	_null_oid,4,2                   ; @null_oid
l_.str.1:                               ; @.str.1
	.asciz	"We could get the submodule handle before?"

l_.str.2:                               ; @.str.2
	.asciz	"could not get a repository handle for submodule '%s'"

l_.str.3:                               ; @.str.3
	.asciz	"core.worktree"

	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
l_.str.4:                               ; @.str.4
	.asciz	"config"

	.no_dead_strip	_ensure_core_worktree
.subsections_via_symbols
