	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_shallow
_update_shallow:                        ## @update_shallow
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_OID_ARRAY_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)
	cmpq	$0, 16(%rdi)
	movq	_alternate_shallow_file@GOTPCREL(%rip), %r15
	je	LBB0_6
## %bb.1:
	movq	(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.2:
	cmpb	$0, (%rcx)
	je	LBB0_3
## %bb.4:
	movq	_shallow_lock@GOTPCREL(%rip), %rdi
	callq	_commit_lock_file
	movq	$0, (%r15)
	jmp	LBB0_53
LBB0_6:
	movq	24(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_53
## %bb.7:
	movl	(%rcx), %edx
	testl	%edx, %edx
	je	LBB0_53
## %bb.8:
	cmpq	$0, 8(%r13)
	je	LBB0_18
## %bb.9:
	movq	%r15, %r13
	movq	%rax, -48(%rbp)
	testl	%edx, %edx
	jle	LBB0_15
## %bb.10:
	movq	8(%rcx), %rbx
	xorl	%r12d, %r12d
	leaq	-48(%rbp), %r15
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r12
	movq	24(%r14), %rax
	movslq	(%rax), %rax
	addq	$4, %rbx
	cmpq	%rax, %r12
	jge	LBB0_14
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_has_object_file
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_oid_array_append
	jmp	LBB0_13
LBB0_3:
	movq	_the_repository@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_git_path_shallow
	movl	%eax, %edi
	callq	_unlink_or_warn
	movq	_shallow_lock@GOTPCREL(%rip), %rdi
	callq	_rollback_lock_file
	movq	$0, (%r15)
	jmp	LBB0_53
LBB0_14:
	movq	-48(%rbp), %rax
LBB0_15:
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_shallow_lock@GOTPCREL(%rip), %rbx
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r13, %r14
	movq	%r13, %rsi
	callq	_setup_alternate_shallow
	movq	%rbx, %rdi
	callq	_commit_lock_file
	movq	$0, (%r13)
LBB0_17:
	leaq	-48(%rbp), %rdi
LBB0_52:
	callq	_oid_array_clear
LBB0_53:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	cmpl	$0, (%r14)
	jne	LBB0_20
## %bb.19:
	cmpl	$0, 4(%r14)
	je	LBB0_53
LBB0_20:
	movq	%r14, %rdi
	callq	_remove_nonexistent_theirs_shallow
	cmpl	$0, (%r14)
	jne	LBB0_22
## %bb.21:
	cmpl	$0, 4(%r14)
	je	LBB0_53
LBB0_22:
	movl	%ebx, -60(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	movq	%r12, %rbx
	jle	LBB0_25
## %bb.23:
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx,%r15,8), %rsi
	addq	$4, %rsi
	leaq	-56(%rbp), %rdi
	callq	_oid_array_append
	incq	%r15
	cmpq	%r15, %r12
	jne	LBB0_24
LBB0_25:
	leaq	-56(%rbp), %rax
	movq	%rax, 32(%r14)
	cmpq	$0, (%r13)
	je	LBB0_35
## %bb.26:
	movq	_OID_ARRAY_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	24(%r14), %rax
	movq	8(%rax), %r12
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_assign_shallow_commits_to_refs
	cmpl	$0, (%r14)
	je	LBB0_27
## %bb.32:
	jle	LBB0_28
## %bb.33:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	leaq	(%r12,%rax,4), %rsi
	movq	%r15, %rdi
	callq	_oid_array_append
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_34
	jmp	LBB0_28
LBB0_35:
	movq	%rbx, %r15
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edi
	movl	$4, %esi
	callq	_xcalloc
	movq	%rax, %rbx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
	callq	_assign_shallow_commits_to_refs
	cmpl	$0, (%r14)
	je	LBB0_36
## %bb.38:
	testl	%r12d, %r12d
	movq	%r15, %rsi
	jg	LBB0_39
	jmp	LBB0_50
LBB0_27:
	cmpl	$0, 4(%r14)
	je	LBB0_51
LBB0_28:
	cmpl	$0, 4(%r14)
	jle	LBB0_31
## %bb.29:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	leaq	(%r12,%rax,4), %rsi
	movq	%r15, %rdi
	callq	_oid_array_append
	incq	%rbx
	movslq	4(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_30
LBB0_31:
	movq	_shallow_lock@GOTPCREL(%rip), %rbx
	leaq	-48(%rbp), %r14
	movq	%rbx, %rdi
	movq	_alternate_shallow_file@GOTPCREL(%rip), %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_setup_alternate_shallow
	movq	%rbx, %rdi
	callq	_commit_lock_file
	movq	%r14, %rdi
	callq	_oid_array_clear
	leaq	-56(%rbp), %rdi
	callq	_oid_array_clear
	movq	$0, (%r15)
	jmp	LBB0_53
LBB0_36:
	cmpl	$0, 4(%r14)
	je	LBB0_50
## %bb.37:
	movq	%r15, %rsi
	testl	%r12d, %r12d
	jle	LBB0_50
LBB0_39:
	movl	%r12d, %r8d
	cmpl	$1, %r12d
	jne	LBB0_41
## %bb.40:
	xorl	%ecx, %ecx
LBB0_47:
	testb	$1, %r8b
	je	LBB0_50
## %bb.48:
	cmpl	$0, (%rbx,%rcx,4)
	je	LBB0_50
## %bb.49:
	movq	_REF_STATUS_REJECT_SHALLOW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rsi,%rcx,8), %rcx
	movl	%eax, (%rcx)
LBB0_50:
	movq	%rbx, %rdi
	callq	_free
LBB0_51:
	leaq	-56(%rbp), %rdi
	jmp	LBB0_52
LBB0_41:
	movl	%r8d, %edx
	andl	$-2, %edx
	xorl	%ecx, %ecx
	movq	_REF_STATUS_REJECT_SHALLOW@GOTPCREL(%rip), %r9
	jmp	LBB0_42
LBB0_46:                                ##   in Loop: Header=BB0_42 Depth=1
	addq	$2, %rcx
	cmpq	%rcx, %rdx
	je	LBB0_47
LBB0_42:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx,%rcx,4)
	je	LBB0_44
## %bb.43:                              ##   in Loop: Header=BB0_42 Depth=1
	movl	(%r9), %edi
	movq	(%rsi,%rcx,8), %rax
	movl	%edi, (%rax)
LBB0_44:                                ##   in Loop: Header=BB0_42 Depth=1
	cmpl	$0, 4(%rbx,%rcx,4)
	je	LBB0_46
## %bb.45:                              ##   in Loop: Header=BB0_42 Depth=1
	movl	(%r9), %eax
	movq	8(%rsi,%rcx,8), %rdi
	movl	%eax, (%rdi)
	jmp	LBB0_46
	.cfi_endproc
                                        ## -- End function
	.comm	_OID_ARRAY_INIT,8,3             ## @OID_ARRAY_INIT
	.comm	_alternate_shallow_file,8,3     ## @alternate_shallow_file
	.comm	_the_repository,4,2             ## @the_repository
	.comm	_shallow_lock,4,2               ## @shallow_lock
	.comm	_REF_STATUS_REJECT_SHALLOW,4,2  ## @REF_STATUS_REJECT_SHALLOW
	.no_dead_strip	_update_shallow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_shallow
_update_shallow:                        ; @update_shallow
	.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
Lloh0:
	adrp	x24, _OID_ARRAY_INIT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _OID_ARRAY_INIT@GOTPAGEOFF]
	ldr	x8, [x24]
	str	x8, [sp, #8]
	ldr	x10, [x0, #16]
Lloh2:
	adrp	x19, _alternate_shallow_file@GOTPAGE
Lloh3:
	ldr	x19, [x19, _alternate_shallow_file@GOTPAGEOFF]
	ldr	x9, [x19]
	cmp	x10, #0
	ccmp	x9, #0, #4, ne
	b.ne	LBB0_9
; %bb.1:
	mov	x20, x3
	ldr	x9, [x3, #24]
	cbz	x9, LBB0_17
; %bb.2:
	ldr	w10, [x9]
	cbz	w10, LBB0_17
; %bb.3:
	mov	x23, x0
	ldr	x11, [x0, #8]
	cbz	x11, LBB0_18
; %bb.4:
	str	x8, [sp]
	cmp	w10, #1
	b.lt	LBB0_13
; %bb.5:
	mov	x22, #0
	ldr	x21, [x9, #8]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	ldr	x8, [x20, #24]
	ldrsw	x8, [x8]
	add	x21, x21, #4
	cmp	x22, x8
	b.ge	LBB0_12
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_has_object_file
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, sp
	mov	x1, x21
	bl	_oid_array_append
	b	LBB0_6
LBB0_9:
	ldrb	w8, [x9]
	cbz	w8, LBB0_11
; %bb.10:
Lloh4:
	adrp	x0, _shallow_lock@GOTPAGE
Lloh5:
	ldr	x0, [x0, _shallow_lock@GOTPAGEOFF]
	bl	_commit_lock_file
	str	xzr, [x19]
	b	LBB0_17
LBB0_11:
Lloh6:
	adrp	x8, _the_repository@GOTPAGE
Lloh7:
	ldr	x8, [x8, _the_repository@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_git_path_shallow
	bl	_unlink_or_warn
Lloh9:
	adrp	x0, _shallow_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _shallow_lock@GOTPAGEOFF]
	bl	_rollback_lock_file
	str	xzr, [x19]
	b	LBB0_17
LBB0_12:
	ldr	x8, [sp]
LBB0_13:
	cbz	x8, LBB0_15
; %bb.14:
Lloh11:
	adrp	x20, _shallow_lock@GOTPAGE
Lloh12:
	ldr	x20, [x20, _shallow_lock@GOTPAGEOFF]
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	bl	_setup_alternate_shallow
	mov	x0, x20
	bl	_commit_lock_file
	str	xzr, [x19]
LBB0_15:
	mov	x0, sp
LBB0_16:
	bl	_oid_array_clear
LBB0_17:
	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_18:
	mov	x22, x2
	mov	x21, x1
	ldr	w8, [x20]
	cbnz	w8, LBB0_20
; %bb.19:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_17
LBB0_20:
	mov	x0, x20
	bl	_remove_nonexistent_theirs_shallow
	ldr	w8, [x20]
	cbnz	w8, LBB0_22
; %bb.21:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_17
LBB0_22:
	cmp	w22, #1
	b.lt	LBB0_25
; %bb.23:
	mov	w25, w22
	mov	x26, x21
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26], #8
	add	x1, x8, #4
	add	x0, sp, #8
	bl	_oid_array_append
	subs	x25, x25, #1
	b.ne	LBB0_24
LBB0_25:
	add	x8, sp, #8
	str	x8, [x20, #32]
	ldr	x8, [x23]
	cbz	x8, LBB0_30
; %bb.26:
	ldr	x8, [x24]
	str	x8, [sp]
	ldr	x8, [x20, #24]
	ldr	x21, [x8, #8]
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	bl	_assign_shallow_commits_to_refs
	ldr	w8, [x20]
	cbz	w8, LBB0_32
; %bb.27:
	cmp	w8, #1
	b.lt	LBB0_33
; %bb.28:
	mov	x22, #0
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	x8, [x8, x22, lsl #3]
	add	x1, x21, x8, lsl #2
	mov	x0, sp
	bl	_oid_array_append
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.lt	LBB0_29
	b	LBB0_33
LBB0_30:
	mov	x0, x22
	mov	w1, #4
	bl	_xcalloc
	mov	x19, x0
	mov	x0, x20
	mov	x1, #0
	mov	x2, x19
	bl	_assign_shallow_commits_to_refs
	ldr	w8, [x20]
	cbz	w8, LBB0_37
; %bb.31:
	cmp	w22, #1
	b.ge	LBB0_39
	b	LBB0_43
LBB0_32:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_44
LBB0_33:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_36
; %bb.34:
	mov	x22, #0
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	x8, [x8, x22, lsl #3]
	add	x1, x21, x8, lsl #2
	mov	x0, sp
	bl	_oid_array_append
	add	x22, x22, #1
	ldrsw	x8, [x20, #4]
	cmp	x22, x8
	b.lt	LBB0_35
LBB0_36:
Lloh13:
	adrp	x20, _shallow_lock@GOTPAGE
Lloh14:
	ldr	x20, [x20, _shallow_lock@GOTPAGEOFF]
	mov	x2, sp
	mov	x0, x20
	mov	x1, x19
	bl	_setup_alternate_shallow
	mov	x0, x20
	bl	_commit_lock_file
	mov	x0, sp
	bl	_oid_array_clear
	add	x0, sp, #8
	bl	_oid_array_clear
	str	xzr, [x19]
	b	LBB0_17
LBB0_37:
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_43
; %bb.38:
	cmp	w22, #0
	b.le	LBB0_43
LBB0_39:
	mov	w8, w22
Lloh15:
	adrp	x9, _REF_STATUS_REJECT_SHALLOW@GOTPAGE
Lloh16:
	ldr	x9, [x9, _REF_STATUS_REJECT_SHALLOW@GOTPAGEOFF]
	mov	x10, x19
	b	LBB0_41
LBB0_40:                                ;   in Loop: Header=BB0_41 Depth=1
	add	x21, x21, #8
	add	x10, x10, #4
	subs	x8, x8, #1
	b.eq	LBB0_43
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cbz	w11, LBB0_40
; %bb.42:                               ;   in Loop: Header=BB0_41 Depth=1
	ldr	w11, [x9]
	ldr	x12, [x21]
	str	w11, [x12]
	b	LBB0_40
LBB0_43:
	mov	x0, x19
	bl	_free
LBB0_44:
	add	x0, sp, #8
	b	LBB0_16
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_OID_ARRAY_INIT,8,3             ; @OID_ARRAY_INIT
	.comm	_alternate_shallow_file,8,3     ; @alternate_shallow_file
	.comm	_the_repository,4,2             ; @the_repository
	.comm	_shallow_lock,4,2               ; @shallow_lock
	.comm	_REF_STATUS_REJECT_SHALLOW,4,2  ; @REF_STATUS_REJECT_SHALLOW
	.no_dead_strip	_update_shallow
.subsections_via_symbols
