	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function update_shallow_ref
_update_shallow_ref:                    ## @update_shallow_ref
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	_LOCK_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	_OID_ARRAY_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	_CHECK_CONNECTED_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	movb	(%rdi), %cl
	movl	$1, %r13d
	shll	%cl, %r13d
	movl	4(%rdi), %edx
	movq	_trace_shallow@GOTPCREL(%rip), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_trace_printf_key
	movq	16(%r12), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.1:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	16(%r12), %rax
	movslq	(%rax), %rax
	addq	$4, %r15
	cmpq	%rax, %rbx
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%r15,2), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %ecx
	leal	31(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	sarl	$5, %edx
	movslq	%edx, %rcx
	testl	%r13d, (%rax,%rcx,4)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_delayed_reachability_test
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r12), %rax
	movq	8(%rax), %rsi
	addq	%r15, %rsi
	leaq	-64(%rbp), %rdi
	callq	_oid_array_append
	jmp	LBB0_6
LBB0_7:
	movq	_tmp_objdir@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_tmp_objdir_env
	movl	%eax, -68(%rbp)
	leaq	-48(%rbp), %rdi
	leaq	-72(%rbp), %rbx
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_setup_alternate_shallow
	movq	_command_singleton_iterator@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_check_connected
	leaq	-48(%rbp), %rdi
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	callq	_rollback_lock_file
	movl	$-1, %ebx
	jmp	LBB0_13
LBB0_9:
	callq	_commit_lock_file
	cmpl	$0, -64(%rbp)
	jle	LBB0_12
## %bb.10:
	xorl	%r13d, %r13d
	movq	_the_repository@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	-56(%rbp), %rsi
	addq	%r13, %rsi
	callq	_register_shallow
	incq	%rbx
	movslq	-64(%rbp), %rax
	addq	$4, %r13
	cmpq	%rax, %rbx
	jl	LBB0_11
LBB0_12:
	movq	8(%r12), %rax
	movslq	(%r14), %rcx
	movq	$0, (%rax,%rcx,8)
	xorl	%ebx, %ebx
LBB0_13:
	leaq	-64(%rbp), %rdi
	callq	_oid_array_clear
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOCK_INIT,4,2                  ## @LOCK_INIT
	.comm	_OID_ARRAY_INIT,16,3            ## @OID_ARRAY_INIT
	.comm	_CHECK_CONNECTED_INIT,8,2       ## @CHECK_CONNECTED_INIT
	.comm	_trace_shallow,4,2              ## @trace_shallow
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"shallow: update_shallow_ref %s\n"

	.comm	_tmp_objdir,4,2                 ## @tmp_objdir
	.comm	_command_singleton_iterator,4,2 ## @command_singleton_iterator
	.comm	_the_repository,4,2             ## @the_repository
	.no_dead_strip	_update_shallow_ref
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function update_shallow_ref
_update_shallow_ref:                    ; @update_shallow_ref
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _LOCK_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LOCK_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #40]
Lloh3:
	adrp	x8, _OID_ARRAY_INIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OID_ARRAY_INIT@GOTPAGEOFF]
Lloh5:
	ldr	q0, [x8]
	str	q0, [sp, #16]
Lloh6:
	adrp	x8, _CHECK_CONNECTED_INIT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CHECK_CONNECTED_INIT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	ldp	w23, w2, [x0]
Lloh9:
	adrp	x0, _trace_shallow@GOTPAGE
Lloh10:
	ldr	x0, [x0, _trace_shallow@GOTPAGEOFF]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_trace_printf_key
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x22, #0
	mov	x21, #0
	mov	w8, #1
	lsl	w23, w8, w23
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	ldr	x8, [x20, #16]
	ldrsw	x8, [x8]
	add	x22, x22, #4
	cmp	x21, x8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	ldr	x8, [x8, x21, lsl #3]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x19]
	add	w10, w9, #31
	cmp	w9, #0
	csel	w9, w10, w9, lt
	asr	w9, w9, #5
	ldr	w8, [x8, w9, sxtw #2]
	tst	w8, w23
	b.eq	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x21
	bl	_delayed_reachability_test
	cbnz	w0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x20, #16]
	ldr	x8, [x8, #8]
	add	x1, x8, x22
	add	x0, sp, #16
	bl	_oid_array_append
	b	LBB0_2
LBB0_7:
Lloh13:
	adrp	x8, _tmp_objdir@GOTPAGE
Lloh14:
	ldr	x8, [x8, _tmp_objdir@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_tmp_objdir_env
	str	w0, [sp, #12]
	add	x0, sp, #40
	add	x1, sp, #8
	add	x2, sp, #16
	bl	_setup_alternate_shallow
Lloh16:
	adrp	x8, _command_singleton_iterator@GOTPAGE
Lloh17:
	ldr	x8, [x8, _command_singleton_iterator@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	add	x2, sp, #8
	mov	x1, x19
	bl	_check_connected
	cbz	x0, LBB0_9
; %bb.8:
	add	x0, sp, #40
	bl	_rollback_lock_file
	mov	w21, #-1
	b	LBB0_13
LBB0_9:
	add	x0, sp, #40
	bl	_commit_lock_file
	ldr	w8, [sp, #16]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x21, #0
	mov	x22, #0
Lloh19:
	adrp	x23, _the_repository@GOTPAGE
Lloh20:
	ldr	x23, [x23, _the_repository@GOTPAGEOFF]
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	ldr	x8, [sp, #24]
	add	x1, x8, x21
	bl	_register_shallow
	add	x22, x22, #1
	ldrsw	x8, [sp, #16]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_11
LBB0_12:
	mov	w21, #0
	ldr	x8, [x20, #8]
	ldrsw	x9, [x19]
	str	xzr, [x8, x9, lsl #3]
LBB0_13:
	add	x0, sp, #16
	bl	_oid_array_clear
	mov	x0, x21
	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
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_LOCK_INIT,4,2                  ; @LOCK_INIT
	.comm	_OID_ARRAY_INIT,16,3            ; @OID_ARRAY_INIT
	.comm	_CHECK_CONNECTED_INIT,8,2       ; @CHECK_CONNECTED_INIT
	.comm	_trace_shallow,4,2              ; @trace_shallow
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"shallow: update_shallow_ref %s\n"

	.comm	_tmp_objdir,4,2                 ; @tmp_objdir
	.comm	_command_singleton_iterator,4,2 ; @command_singleton_iterator
	.comm	_the_repository,4,2             ; @the_repository
	.no_dead_strip	_update_shallow_ref
.subsections_via_symbols
