	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_index_file
_add_index_file:                        ## @add_index_file
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_strlen
	movl	%eax, %r12d
	movq	(%r15), %rax
	movl	(%rax), %edi
	movl	%r12d, %esi
	callq	_make_empty_cache_entry
	movq	%rax, %rbx
	movl	16(%rax), %edi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movl	%r13d, %edi
	callq	_create_ce_mode
	movl	%eax, 12(%rbx)
	xorl	%edi, %edi
	callq	_create_ce_flags
	movl	%eax, 8(%rbx)
	movl	%r12d, (%rbx)
	cmpq	$0, 16(%r15)
	je	LBB0_5
## %bb.1:
	movq	_CE_INTENT_TO_ADD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_set_object_name_for_intent_to_add_entry
LBB0_2:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_3:
	movq	(%r15), %rax
	movl	(%rax), %edi
	movq	_ADD_CACHE_OK_TO_ADD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rsi
	callq	_add_index_entry
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_16
## %bb.4:
	movq	%rbx, %rdi
	callq	_discard_cache_entry
	leaq	L_.str.4(%rip), %rdi
LBB0_14:
	callq	__
	movl	%eax, %edi
	movq	%r13, %rsi
	jmp	LBB0_15
LBB0_5:
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	%r13d, %edi
	callq	_S_ISGITLINK
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	leaq	L_.str(%rip), %rsi
	leaq	-80(%rbp), %rdx
	movq	%r14, %rdi
	callq	_skip_prefix
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	-80(%rbp), %rdi
	movq	%rbx, %rsi
	addq	$4, %rsi
	callq	_get_oid_hex
	testq	%rax, %rax
	je	LBB0_2
LBB0_8:
	movq	%rbx, %rdi
	callq	_discard_cache_entry
	leaq	L_.str.1(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
LBB0_15:
	callq	_error
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	cmpl	$0, 8(%r15)
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_12
## %bb.10:
	leaq	-56(%rbp), %rsi
	movq	%r13, %rdi
	callq	_lstat
	testq	%rax, %rax
	js	LBB0_17
## %bb.11:
	movq	(%r15), %rax
	movl	(%rax), %edi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_fill_stat_cache_info
LBB0_12:
	movq	_blob_type@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rcx
	addq	$4, %rcx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_write_object_file
	testq	%rax, %rax
	jns	LBB0_3
## %bb.13:
	movq	%rbx, %rdi
	callq	_discard_cache_entry
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_14
LBB0_17:
	movq	%rbx, %rdi
	callq	_discard_cache_entry
	leaq	L_.str.2(%rip), %rdi
	callq	__
	movl	%eax, %edi
	movq	%r13, %rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error_errno                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CE_INTENT_TO_ADD,4,2           ## @CE_INTENT_TO_ADD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Subproject commit "

L_.str.1:                               ## @.str.1
	.asciz	"corrupt patch for submodule %s"

L_.str.2:                               ## @.str.2
	.asciz	"unable to stat newly created file '%s'"

	.comm	_blob_type,4,2                  ## @blob_type
L_.str.3:                               ## @.str.3
	.asciz	"unable to create backing store for newly created file %s"

	.comm	_ADD_CACHE_OK_TO_ADD,4,2        ## @ADD_CACHE_OK_TO_ADD
L_.str.4:                               ## @.str.4
	.asciz	"unable to add cache entry for %s"

	.no_dead_strip	_add_index_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_index_file
_add_index_file:                        ; @add_index_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x4
	mov	x22, x3
	mov	x24, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_strlen
	mov	x25, x0
	ldr	x8, [x21]
	ldr	w0, [x8]
	mov	x1, x25
	bl	_make_empty_cache_entry
	mov	x20, x0
	ldr	w0, [x0, #16]
	mov	x1, x19
	mov	x2, x25
	bl	_memcpy
	mov	x0, x24
	bl	_create_ce_mode
	str	w0, [x20, #12]
	mov	w0, #0
	bl	_create_ce_flags
	str	w0, [x20, #8]
	str	w25, [x20]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _CE_INTENT_TO_ADD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CE_INTENT_TO_ADD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w8, w8, w0
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_set_object_name_for_intent_to_add_entry
LBB0_2:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ADD_CACHE_OK_TO_ADD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADD_CACHE_OK_TO_ADD@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_add_index_entry
	tbnz	x0, #63, LBB0_8
; %bb.3:
	mov	w0, #0
	b	LBB0_10
LBB0_4:
	mov	x0, x24
	bl	_S_ISGITLINK
	cbz	x0, LBB0_11
; %bb.5:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, sp
	mov	x0, x22
	bl	_skip_prefix
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x0, [sp]
	add	x1, x20, #4
	bl	_get_oid_hex
	cbz	x0, LBB0_2
LBB0_7:
	mov	x0, x20
	bl	_discard_cache_entry
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	bl	_discard_cache_entry
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_9:
	bl	__
	mov	x1, x19
	bl	_error
LBB0_10:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	w8, [x21, #8]
	cbnz	w8, LBB0_14
; %bb.12:
	add	x1, sp, #8
	mov	x0, x19
	bl	_lstat
	tbnz	x0, #63, LBB0_16
; %bb.13:
	ldr	x8, [x21]
	ldr	w0, [x8]
	add	x2, sp, #8
	mov	x1, x20
	bl	_fill_stat_cache_info
LBB0_14:
Lloh12:
	adrp	x8, _blob_type@GOTPAGE
Lloh13:
	ldr	x8, [x8, _blob_type@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	add	x3, x20, #4
	mov	x0, x22
	mov	x1, x23
	bl	_write_object_file
	tbz	x0, #63, LBB0_2
; %bb.15:
	mov	x0, x20
	bl	_discard_cache_entry
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_16:
	mov	x0, x20
	bl	_discard_cache_entry
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	__
	mov	x1, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_error_errno
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CE_INTENT_TO_ADD,4,2           ; @CE_INTENT_TO_ADD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Subproject commit "

l_.str.1:                               ; @.str.1
	.asciz	"corrupt patch for submodule %s"

l_.str.2:                               ; @.str.2
	.asciz	"unable to stat newly created file '%s'"

	.comm	_blob_type,4,2                  ; @blob_type
l_.str.3:                               ; @.str.3
	.asciz	"unable to create backing store for newly created file %s"

	.comm	_ADD_CACHE_OK_TO_ADD,4,2        ; @ADD_CACHE_OK_TO_ADD
l_.str.4:                               ; @.str.4
	.asciz	"unable to add cache entry for %s"

	.no_dead_strip	_add_index_file
.subsections_via_symbols
