	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function unlink_segment
_unlink_segment:                        ## @unlink_segment
	.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, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rax
	movq	(%rax), %rsi
	movq	_DSA_SEGMENT_INDEX_NONE@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rsi
	jne	LBB0_1
## %bb.2:
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movq	16(%rax), %rax
	movq	(%rcx,%rax,8), %r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_get_segment_index
	xorl	%edi, %edi
	cmpq	%rax, %r12
	sete	%dil
	callq	_Assert
	movq	(%rbx), %rcx
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	8(%rcx), %rdx
	movq	16(%rcx), %rsi
	movq	%rdx, (%rax,%rsi,8)
	jmp	LBB0_3
LBB0_1:
	movq	%r14, %rdi
	callq	_get_segment_by_index
	movq	(%rbx), %rcx
	movq	8(%rcx), %rdx
	movq	(%rax), %rax
	movq	%rdx, 8(%rax)
LBB0_3:
	movq	8(%rcx), %rsi
	cmpq	(%r15), %rsi
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_get_segment_by_index
	movq	(%rbx), %rcx
	movq	(%rcx), %rcx
	movq	(%rax), %rax
	movq	%rcx, (%rax)
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSA_SEGMENT_INDEX_NONE,8,3     ## @DSA_SEGMENT_INDEX_NONE
	.no_dead_strip	_unlink_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function unlink_segment
_unlink_segment:                        ; @unlink_segment
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x20, x0
	ldr	x8, [x1]
	ldr	x1, [x8]
Lloh0:
	adrp	x21, _DSA_SEGMENT_INDEX_NONE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DSA_SEGMENT_INDEX_NONE@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x1, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x9, [x20]
	ldr	x9, [x9]
	ldr	x8, [x8, #16]
	ldr	x22, [x9, x8, lsl #3]
	mov	x0, x20
	mov	x1, x19
	bl	_get_segment_index
	cmp	x22, x0
	cset	w0, eq
	bl	_Assert
	ldr	x8, [x19]
	ldr	x9, [x20]
	ldr	x9, [x9]
	ldp	x10, x11, [x8, #8]
	str	x10, [x9, x11, lsl #3]
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_get_segment_by_index
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	ldr	x10, [x0]
	str	x9, [x10, #8]
LBB0_3:
	ldr	x1, [x8, #8]
	ldr	x8, [x21]
	cmp	x1, x8
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_get_segment_by_index
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x9, [x0]
	str	x8, [x9]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DSA_SEGMENT_INDEX_NONE,8,3     ; @DSA_SEGMENT_INDEX_NONE
	.no_dead_strip	_unlink_segment
.subsections_via_symbols
