	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_segs
_alloc_segs:                            ## @alloc_segs
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movl	(%rdi), %edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movl	%r12d, 4(%r14)
	xorl	%ebx, %ebx
	testl	%r12d, %r12d
	je	LBB0_12
## %bb.2:
	movq	%rax, %r13
	movl	8(%r14), %r15d
	movl	%r12d, %edi
	movl	%r15d, %ecx
	shll	%cl, %edi
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.3:
	testl	%r12d, %r12d
	jle	LBB0_12
## %bb.4:
	movq	%rax, (%r13)
	cmpl	$1, %r12d
	je	LBB0_12
## %bb.5:
	movl	%r12d, %ecx
	leaq	-1(%rcx), %r8
	addq	$-2, %rcx
	movl	%r8d, %edx
	andl	$3, %edx
	movl	$1, %edi
	cmpq	$3, %rcx
	jb	LBB0_9
## %bb.6:
	andq	$-4, %r8
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rdi, %rsi
	movq	16(%r14), %rdi
	leal	1(%rsi), %ebx
	movl	%r15d, %ecx
	shll	%cl, %ebx
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rcx
	movq	%rcx, 8(%rdi,%rsi,8)
	movq	16(%r14), %rdi
	leal	2(%rsi), %ebx
	movl	%r15d, %ecx
	shll	%cl, %ebx
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rcx
	movq	%rcx, 16(%rdi,%rsi,8)
	movq	16(%r14), %rdi
	leal	3(%rsi), %ebx
	movl	%r15d, %ecx
	shll	%cl, %ebx
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rcx
	movq	%rcx, 24(%rdi,%rsi,8)
	movq	16(%r14), %r9
	leaq	4(%rsi), %rdi
	movl	%edi, %ebx
	movl	%r15d, %ecx
	shll	%cl, %ebx
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rcx
	movq	%rcx, 32(%r9,%rsi,8)
	cmpq	%r8, %rdi
	jne	LBB0_7
## %bb.8:
	incq	%rdi
	xorl	%ebx, %ebx
LBB0_9:
	testq	%rdx, %rdx
	je	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rsi
	movl	%edi, %ebx
	movl	%r15d, %ecx
	shll	%cl, %ebx
	movslq	%ebx, %rcx
	leaq	(%rax,%rcx,4), %rcx
	movq	%rcx, (%rsi,%rdi,8)
	incq	%rdi
	decq	%rdx
	jne	LBB0_10
## %bb.11:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_13:
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movq	%r14, %rdi
	callq	_hdestroy
	movl	%ebx, (%r15)
	movl	$-1, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_alloc_segs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alloc_segs
_alloc_segs:                            ; @alloc_segs
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0]
	mov	w1, #8
	bl	_calloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.1:
	str	w20, [x19, #4]
	cbz	w20, LBB0_7
; %bb.2:
	mov	x21, x0
	ldr	w22, [x19, #8]
	lsl	w0, w20, w22
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_8
; %bb.3:
	cmp	w20, #1
	b.lt	LBB0_7
; %bb.4:
	str	x0, [x21]
	cmp	w20, #1
	b.eq	LBB0_7
; %bb.5:
	mov	w8, w20
	mov	w9, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19, #16]
	lsl	w11, w9, w22
	add	x11, x0, w11, sxtw #2
	str	x11, [x10, x9, lsl #3]
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_6
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh0:
	adrp	x20, _errno@GOTPAGE
Lloh1:
	ldr	x20, [x20, _errno@GOTPAGEOFF]
	ldr	w21, [x20]
	mov	x0, x19
	bl	_hdestroy
	str	w21, [x20]
	mov	w0, #-1
LBB0_9:
	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	_errno,4,2                      ; @errno
	.no_dead_strip	_alloc_segs
.subsections_via_symbols
