	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function replace_entry
_replace_entry:                         ## @replace_entry
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rsi), %rdx
	movq	16(%rsi), %r12
	cmpq	%rdi, %rdx
	ja	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_die
LBB0_2:
	movq	(%r12), %rsi
	movq	8(%r12), %rdx
	cmpq	%rdx, %rsi
	jb	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_die
LBB0_4:
	movq	8(%r14), %rax
	movq	(%rax,%r15,8), %r14
	movq	_CE_REMOVE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_die
LBB0_6:
	movq	(%r12), %rax
	movq	16(%r12), %rcx
	movq	(%rcx,%rax,8), %rbx
	movq	%rbx, %rdi
	callq	_ce_namelen
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_die
LBB0_8:
	incq	%r15
	movq	%r15, 8(%rbx)
	movq	_CE_UPDATE_IN_BASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
	movl	16(%r14), %eax
	movl	%eax, 16(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_copy_cache_entry
	movq	%rbx, %rdi
	callq	_discard_cache_entry
	incq	(%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"position for replacement %d exceeds base index size %d"

L_.str.1:                               ## @.str.1
	.asciz	"too many replacements (%d vs %d)"

	.comm	_CE_REMOVE,4,2                  ## @CE_REMOVE
L_.str.2:                               ## @.str.2
	.asciz	"entry %d is marked as both replaced and deleted"

L_.str.3:                               ## @.str.3
	.asciz	"corrupt link extension, entry %d should have zero length name"

	.comm	_CE_UPDATE_IN_BASE,4,2          ## @CE_UPDATE_IN_BASE
	.no_dead_strip	_replace_entry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function replace_entry
_replace_entry:                         ; @replace_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x1, #16]
	ldr	x8, [x1]
	cmp	x8, x0
	b.hi	LBB0_2
; %bb.1:
	str	x8, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_die
LBB0_2:
	ldp	x1, x8, [x22]
	cmp	x1, x8
	b.lo	LBB0_4
; %bb.3:
	str	x8, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_die
LBB0_4:
	ldr	x8, [x20, #8]
	ldr	x20, [x8, x19, lsl #3]
	ldr	w8, [x20]
Lloh4:
	adrp	x9, _CE_REMOVE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _CE_REMOVE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_die
LBB0_6:
	ldr	x8, [x22, #16]
	ldr	x9, [x22]
	ldr	x21, [x8, x9, lsl #3]
	mov	x0, x21
	bl	_ce_namelen
	cbz	x0, LBB0_8
; %bb.7:
Lloh9:
	adrp	x0, l_.str.3@PAGE
Lloh10:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_die
LBB0_8:
	add	x8, x19, #1
	str	x8, [x21, #8]
Lloh11:
	adrp	x8, _CE_UPDATE_IN_BASE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CE_UPDATE_IN_BASE@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
	ldr	w8, [x20, #16]
	str	w8, [x21, #16]
	mov	x0, x20
	mov	x1, x21
	bl	_copy_cache_entry
	mov	x0, x21
	bl	_discard_cache_entry
	ldr	x8, [x22]
	add	x8, x8, #1
	str	x8, [x22]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"position for replacement %d exceeds base index size %d"

l_.str.1:                               ; @.str.1
	.asciz	"too many replacements (%d vs %d)"

	.comm	_CE_REMOVE,4,2                  ; @CE_REMOVE
l_.str.2:                               ; @.str.2
	.asciz	"entry %d is marked as both replaced and deleted"

l_.str.3:                               ; @.str.3
	.asciz	"corrupt link extension, entry %d should have zero length name"

	.comm	_CE_UPDATE_IN_BASE,4,2          ; @CE_UPDATE_IN_BASE
	.no_dead_strip	_replace_entry
.subsections_via_symbols
