	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function files_initial_transaction_commit
_files_initial_transaction_commit:      ## @files_initial_transaction_commit
	.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	%rdx, %r15
	movq	%rsi, %r12
	movq	_REF_STORE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_files_downcast
	movq	%rax, %r13
	movq	_STRING_LIST_INIT_NODUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	%r15, %rdi
	callq	_assert
	movq	(%r12), %rax
	movq	_REF_TRANSACTION_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_BUG
LBB0_2:
	cmpq	$0, 8(%r12)
	je	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movl	12(%rax), %esi
	movq	%r14, %rdi
	callq	_string_list_append
	incq	%rbx
	cmpq	8(%r12), %rbx
	jb	LBB0_4
LBB0_5:
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_string_list_sort
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_ref_update_reject_duplicates
	testq	%rax, %rax
	je	LBB0_7
LBB0_6:
	movq	_TRANSACTION_GENERIC_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_24
LBB0_7:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	addq	$4, %r13
	movq	_ref_present@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r13, %rdi
	callq	_refs_for_each_rawref
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.2(%rip), %rdi
	callq	_BUG
LBB0_9:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_ref_store_transaction_begin
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_6
## %bb.10:
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	cmpq	$0, 8(%r12)
	je	LBB0_18
## %bb.11:
	xorl	%ebx, %ebx
	movq	_REF_HAVE_OLD@GOTPCREL(%rip), %rcx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rax
	movq	(%rax,%rbx,8), %r14
	movq	%rcx, %r15
	movl	(%rcx), %eax
	testl	%eax, (%r14)
	je	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	4(%r14), %rdi
	callq	_is_null_oid
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	_BUG
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	12(%r14), %esi
	movq	%r13, %rdi
	leaq	-48(%rbp), %rdx
	xorl	%ecx, %ecx
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_refs_verify_refname_available
	testq	%rax, %rax
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	12(%r14), %esi
	movl	(%r15), %edx
	notl	%edx
	andl	(%r14), %edx
	leaq	8(%r14), %rcx
	addq	$4, %r14
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %r8
	xorl	%r9d, %r9d
	callq	_ref_transaction_add_update
	movq	%r15, %rcx
	incq	%rbx
	cmpq	8(%r12), %rbx
	jb	LBB0_12
LBB0_18:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_packed_refs_lock
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movq	_TRANSACTION_GENERIC_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_23
LBB0_16:
	movq	_TRANSACTION_NAME_CONFLICT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_23
LBB0_20:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_initial_ref_transaction_commit
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	movq	_TRANSACTION_GENERIC_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_22:
	movl	(%r15), %edi
	callq	_packed_refs_unlock
LBB0_23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_ref_transaction_free
LBB0_24:
	movq	_REF_TRANSACTION_CLOSED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_string_list_clear
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REF_STORE_WRITE,4,2            ## @REF_STORE_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"initial_ref_transaction_commit"

	.comm	_STRING_LIST_INIT_NODUP,4,2     ## @STRING_LIST_INIT_NODUP
	.comm	_REF_TRANSACTION_OPEN,8,3       ## @REF_TRANSACTION_OPEN
L_.str.1:                               ## @.str.1
	.asciz	"commit called for transaction that is not open"

	.comm	_TRANSACTION_GENERIC_ERROR,4,2  ## @TRANSACTION_GENERIC_ERROR
	.comm	_ref_present,4,2                ## @ref_present
L_.str.2:                               ## @.str.2
	.asciz	"initial ref transaction called with existing refs"

	.comm	_REF_HAVE_OLD,4,2               ## @REF_HAVE_OLD
L_.str.3:                               ## @.str.3
	.asciz	"initial ref transaction with old_sha1 set"

	.comm	_TRANSACTION_NAME_CONFLICT,4,2  ## @TRANSACTION_NAME_CONFLICT
	.comm	_REF_TRANSACTION_CLOSED,8,3     ## @REF_TRANSACTION_CLOSED
	.no_dead_strip	_files_initial_transaction_commit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function files_initial_transaction_commit
_files_initial_transaction_commit:      ; @files_initial_transaction_commit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _REF_STORE_WRITE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REF_STORE_WRITE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_files_downcast
	mov	x21, x0
Lloh5:
	adrp	x8, _STRING_LIST_INIT_NODUP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STRING_LIST_INIT_NODUP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	mov	x0, x20
	bl	_assert
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _REF_TRANSACTION_OPEN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _REF_TRANSACTION_OPEN@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_BUG
LBB0_2:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w1, [x8, #12]
	add	x0, sp, #8
	bl	_string_list_append
	add	x22, x22, #1
	ldr	x8, [x19, #8]
	cmp	x22, x8
	b.lo	LBB0_4
LBB0_5:
	add	x0, sp, #8
	bl	_string_list_sort
	add	x0, sp, #8
	mov	x1, x20
	bl	_ref_update_reject_duplicates
	cbz	x0, LBB0_7
LBB0_6:
Lloh13:
	adrp	x8, _TRANSACTION_GENERIC_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TRANSACTION_GENERIC_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w20, [x8]
	b	LBB0_22
LBB0_7:
	add	x23, x21, #4
Lloh16:
	adrp	x8, _ref_present@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ref_present@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x23
	bl	_refs_for_each_rawref
	cbz	x0, LBB0_9
; %bb.8:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_BUG
LBB0_9:
	ldr	w0, [x21]
	mov	x1, x20
	bl	_ref_store_transaction_begin
	cbz	x0, LBB0_6
; %bb.10:
	mov	x22, x0
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_17
; %bb.11:
	mov	x25, #0
Lloh21:
	adrp	x26, _REF_HAVE_OLD@GOTPAGE
Lloh22:
	ldr	x26, [x26, _REF_HAVE_OLD@GOTPAGEOFF]
Lloh23:
	adrp	x24, l_.str.3@PAGE
Lloh24:
	add	x24, x24, l_.str.3@PAGEOFF
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #16]
	ldr	x27, [x8, x25, lsl #3]
	ldr	w8, [x27]
	ldr	w9, [x26]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, x27, #4
	bl	_is_null_oid
	cbnz	w0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x24
	bl	_BUG
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x27, #12]
	add	x2, sp, #8
	mov	x0, x23
	mov	x3, #0
	mov	x4, x20
	bl	_refs_verify_refname_available
	cbnz	x0, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	w1, [x27, #12]
	ldr	w8, [x27]
	ldr	w9, [x26]
	bic	w2, w8, w9
	add	x3, x27, #8
	add	x4, x27, #4
	mov	x0, x22
	mov	x5, #0
	bl	_ref_transaction_add_update
	add	x25, x25, #1
	ldr	x8, [x19, #8]
	cmp	x25, x8
	b.lo	LBB0_12
LBB0_17:
	ldr	w0, [x21]
	mov	w1, #0
	mov	x2, x20
	bl	_packed_refs_lock
	cbz	x0, LBB0_20
; %bb.18:
Lloh25:
	adrp	x8, _TRANSACTION_GENERIC_ERROR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TRANSACTION_GENERIC_ERROR@GOTPAGEOFF]
Lloh27:
	ldr	w20, [x8]
	b	LBB0_21
LBB0_19:
Lloh28:
	adrp	x8, _TRANSACTION_NAME_CONFLICT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TRANSACTION_NAME_CONFLICT@GOTPAGEOFF]
Lloh30:
	ldr	w20, [x8]
	b	LBB0_21
LBB0_20:
	mov	x0, x22
	mov	x1, x20
	bl	_initial_ref_transaction_commit
Lloh31:
	adrp	x8, _TRANSACTION_GENERIC_ERROR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _TRANSACTION_GENERIC_ERROR@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, wzr, w8, eq
	ldr	w0, [x21]
	bl	_packed_refs_unlock
LBB0_21:
	mov	x0, x22
	bl	_ref_transaction_free
LBB0_22:
Lloh34:
	adrp	x8, _REF_TRANSACTION_CLOSED@GOTPAGE
Lloh35:
	ldr	x8, [x8, _REF_TRANSACTION_CLOSED@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	str	x8, [x19]
	add	x0, sp, #8
	mov	w1, #0
	bl	_string_list_clear
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_REF_STORE_WRITE,4,2            ; @REF_STORE_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"initial_ref_transaction_commit"

	.comm	_STRING_LIST_INIT_NODUP,4,2     ; @STRING_LIST_INIT_NODUP
	.comm	_REF_TRANSACTION_OPEN,8,3       ; @REF_TRANSACTION_OPEN
l_.str.1:                               ; @.str.1
	.asciz	"commit called for transaction that is not open"

	.comm	_TRANSACTION_GENERIC_ERROR,4,2  ; @TRANSACTION_GENERIC_ERROR
	.comm	_ref_present,4,2                ; @ref_present
l_.str.2:                               ; @.str.2
	.asciz	"initial ref transaction called with existing refs"

	.comm	_REF_HAVE_OLD,4,2               ; @REF_HAVE_OLD
l_.str.3:                               ; @.str.3
	.asciz	"initial ref transaction with old_sha1 set"

	.comm	_TRANSACTION_NAME_CONFLICT,4,2  ; @TRANSACTION_NAME_CONFLICT
	.comm	_REF_TRANSACTION_CLOSED,8,3     ; @REF_TRANSACTION_CLOSED
	.no_dead_strip	_files_initial_transaction_commit
.subsections_via_symbols
