	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_submodule_to_gitdir            ## -- Begin function submodule_to_gitdir
	.p2align	4, 0x90
_submodule_to_gitdir:                   ## @submodule_to_gitdir
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_strbuf_reset
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_strbuf_addstr
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strbuf_complete
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strbuf_addstr
	movl	(%rbx), %edi
	callq	_read_gitfile
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_strbuf_reset
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_strbuf_addstr
LBB0_2:
	movl	(%rbx), %edi
	callq	_is_git_directory
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_null_oid@GOTPCREL(%rip), %rsi
	movq	%r14, %rdx
	callq	_submodule_from_path
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_strbuf_reset
	movl	(%r14), %ecx
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	callq	_strbuf_git_path
	jmp	LBB0_6
LBB0_4:
	movl	$-1, %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	".git"

	.comm	_the_repository,4,2             ## @the_repository
	.comm	_null_oid,4,2                   ## @null_oid
L_.str.1:                               ## @.str.1
	.asciz	"%s/%s"

L_.str.2:                               ## @.str.2
	.asciz	"modules"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_submodule_to_gitdir            ; -- Begin function submodule_to_gitdir
	.p2align	2
_submodule_to_gitdir:                   ; @submodule_to_gitdir
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	bl	_strbuf_reset
	mov	x0, x19
	mov	x1, x20
	bl	_strbuf_addstr
	mov	x0, x19
	mov	w1, #47
	bl	_strbuf_complete
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strbuf_addstr
	ldr	w0, [x19]
	bl	_read_gitfile
	cbz	x0, LBB0_2
; %bb.1:
	mov	x21, x0
	mov	x0, x19
	bl	_strbuf_reset
	mov	x0, x19
	mov	x1, x21
	bl	_strbuf_addstr
LBB0_2:
	ldr	w0, [x19]
	bl	_is_git_directory
	cbnz	w0, LBB0_5
; %bb.3:
Lloh2:
	adrp	x8, _the_repository@GOTPAGE
Lloh3:
	ldr	x8, [x8, _the_repository@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, _null_oid@GOTPAGE
Lloh6:
	ldr	x1, [x1, _null_oid@GOTPAGEOFF]
	mov	x2, x20
	bl	_submodule_from_path
	cbz	x0, LBB0_7
; %bb.4:
	mov	x20, x0
	mov	x0, x19
	bl	_strbuf_reset
	ldr	w3, [x20]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_strbuf_git_path
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w0, #-1
	b	LBB0_6
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	".git"

	.comm	_the_repository,4,2             ; @the_repository
	.comm	_null_oid,4,2                   ; @null_oid
l_.str.1:                               ; @.str.1
	.asciz	"%s/%s"

l_.str.2:                               ; @.str.2
	.asciz	"modules"

.subsections_via_symbols
