	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function image_chunk_memory
_image_chunk_memory:                    ## @image_chunk_memory
	.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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	_secsz@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movl	$1, %edi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	%rax, %r14
	cmpq	%r15, (%rbx)
	jge	LBB0_4
## %bb.2:
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	%r15, %rax
	subq	(%rbx), %rax
	imulq	(%r13), %rax
	movq	%rax, 8(%rbx)
	movq	%r15, (%r12)
	subq	%rax, 8(%r12)
	movq	_ch_list@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_image_chunks@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_TAILQ_INSERT_AFTER
	movq	_image_nchunks@GOTPCREL(%rip), %rax
	incl	(%rax)
	movq	%r12, %rbx
LBB0_4:
	movq	8(%rbx), %rax
	cmpq	(%r13), %rax
	jle	LBB0_7
## %bb.5:
	movl	$32, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	$32, %edx
	callq	_memcpy
	movq	(%r13), %rax
	movq	%rax, 8(%rbx)
	incq	(%r15)
	movq	(%r13), %rax
	subq	%rax, 8(%r15)
	movq	_ch_list@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_image_chunks@GOTPCREL(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_TAILQ_INSERT_AFTER
	movq	_image_nchunks@GOTPCREL(%rip), %rax
	incl	(%rax)
LBB0_7:
	movq	_CH_TYPE_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r14, 16(%rbx)
	jmp	LBB0_11
LBB0_9:
	movq	%r14, %rdi
	callq	_free
LBB0_10:
	xorl	%ebx, %ebx
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_secsz,8,3                      ## @secsz
	.comm	_image_chunks,4,2               ## @image_chunks
	.comm	_ch_list,4,2                    ## @ch_list
	.comm	_image_nchunks,4,2              ## @image_nchunks
	.comm	_CH_TYPE_MEMORY,4,2             ## @CH_TYPE_MEMORY
	.no_dead_strip	_image_chunk_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function image_chunk_memory
_image_chunk_memory:                    ; @image_chunk_memory
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _secsz@GOTPAGE
Lloh1:
	ldr	x23, [x23, _secsz@GOTPAGEOFF]
	ldr	x1, [x23]
	mov	w0, #1
	bl	_calloc
	cbz	x0, LBB0_9
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19]
	cmp	x8, x21
	b.ge	LBB0_4
; %bb.2:
	mov	w0, #32
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.3:
	mov	x22, x0
	mov	x1, x19
	mov	w2, #32
	bl	_memcpy
	ldr	x8, [x19]
	sub	x8, x21, x8
	ldr	x9, [x23]
	mul	x8, x8, x9
	str	x8, [x19, #8]
	ldr	x9, [x22, #8]
	sub	x8, x9, x8
	stp	x21, x8, [x22]
Lloh2:
	adrp	x8, _ch_list@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ch_list@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x0, _image_chunks@GOTPAGE
Lloh6:
	ldr	x0, [x0, _image_chunks@GOTPAGEOFF]
	mov	x1, x19
	mov	x2, x22
	bl	_TAILQ_INSERT_AFTER
Lloh7:
	adrp	x8, _image_nchunks@GOTPAGE
Lloh8:
	ldr	x8, [x8, _image_nchunks@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	x19, x22
LBB0_4:
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.le	LBB0_7
; %bb.5:
	mov	w0, #32
	bl	_malloc
	cbz	x0, LBB0_8
; %bb.6:
	mov	x21, x0
	mov	x1, x19
	mov	w2, #32
	bl	_memcpy
	ldr	x8, [x23]
	str	x8, [x19, #8]
	ldp	x8, x9, [x21]
	add	x8, x8, #1
	str	x8, [x21]
	ldr	x8, [x23]
	sub	x8, x9, x8
	str	x8, [x21, #8]
Lloh9:
	adrp	x8, _ch_list@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ch_list@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x0, _image_chunks@GOTPAGE
Lloh13:
	ldr	x0, [x0, _image_chunks@GOTPAGEOFF]
	mov	x1, x19
	mov	x2, x21
	bl	_TAILQ_INSERT_AFTER
Lloh14:
	adrp	x8, _image_nchunks@GOTPAGE
Lloh15:
	ldr	x8, [x8, _image_nchunks@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
LBB0_7:
Lloh16:
	adrp	x8, _CH_TYPE_MEMORY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CH_TYPE_MEMORY@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	str	x20, [x19, #16]
	b	LBB0_10
LBB0_8:
	mov	x0, x20
	bl	_free
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_secsz,8,3                      ; @secsz
	.comm	_image_chunks,4,2               ; @image_chunks
	.comm	_ch_list,4,2                    ; @ch_list
	.comm	_image_nchunks,4,2              ; @image_nchunks
	.comm	_CH_TYPE_MEMORY,4,2             ; @CH_TYPE_MEMORY
	.no_dead_strip	_image_chunk_memory
.subsections_via_symbols
