	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function insert_to_inseg_list
_insert_to_inseg_list:                  ## @insert_to_inseg_list
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rdi)
	movq	8(%rdi), %rdi
	leal	8(,%rax,8), %esi
	callq	_realloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_2:
	movl	(%rbx), %eax
	leal	-1(%rax), %edx
	cmpl	$2, %eax
	jl	LBB0_7
## %bb.3:
	movq	(%r14), %rcx
	movl	%edx, %edx
	addl	$-2, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rsi
	movl	%eax, %edi
	movq	(%rsi,%rdi,8), %rdi
	cmpq	(%rdi), %rcx
	jge	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rdi, (%rsi,%rdx,8)
	leaq	-1(%rdx), %rsi
	decl	%eax
	cmpq	$1, %rdx
	movq	%rsi, %rdx
	jg	LBB0_4
	jmp	LBB0_8
LBB0_7:
	testl	%edx, %edx
	jne	LBB0_10
LBB0_8:
	movq	8(%rbx), %rax
	jmp	LBB0_9
LBB0_5:
	movl	%edx, %eax
	leaq	(%rsi,%rax,8), %rax
LBB0_9:
	movq	%r14, (%rax)
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"realloc failed"

	.no_dead_strip	_insert_to_inseg_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function insert_to_inseg_list
_insert_to_inseg_list:                  ; @insert_to_inseg_list
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x0]
	add	w8, w8, #1
	str	w8, [x0]
	ldr	x0, [x0, #8]
	lsl	w1, w8, #3
	bl	_realloc
	str	x0, [x20, #8]
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	ldr	w9, [x20]
	sub	w8, w9, #1
	subs	w9, w9, #2
	b.lt	LBB0_6
; %bb.3:
	ldr	x10, [x19]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x20, #8]
	ldr	x12, [x11, w9, uxtw #3]
	ldr	x13, [x12]
	cmp	x10, x13
	b.ge	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	x12, [x11, x8, lsl #3]
	sub	w9, w9, #1
	subs	x8, x8, #1
	b.gt	LBB0_4
	b	LBB0_7
LBB0_6:
	cbnz	w8, LBB0_10
LBB0_7:
	ldr	x8, [x20, #8]
	b	LBB0_9
LBB0_8:
	add	x8, x11, w8, uxtw #3
LBB0_9:
	str	x19, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"realloc failed"

	.no_dead_strip	_insert_to_inseg_list
.subsections_via_symbols
