	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zzmalloc                       ## -- Begin function zzmalloc
	.p2align	4, 0x90
_zzmalloc:                              ## @zzmalloc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_max_memory@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_get_memory_used
	cmpq	(%rbx), %rax
	jle	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%eax, %eax
	callq	_free_LRU
	testq	%rax, %rax
	je	LBB0_1
LBB0_3:
	xorl	%eax, %eax
	callq	_get_memory_used
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setle	%dil
	callq	_assert
	movq	_MAX_ZMALLOC_MEM@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jle	LBB0_9
## %bb.4:
	movq	_PTRSIZE@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movl	%r14d, %edi
	callq	_dyn_alloc
	testq	%rax, %rax
	jne	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_free_LRU
	testq	%rax, %rax
	je	LBB0_5
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	callq	_free_LRU
	testq	%rax, %rax
	je	LBB0_9
LBB0_11:
	movq	_malloc_mem@GOTPCREL(%rip), %rax
	addl	%r14d, (%rax)
	jmp	LBB0_12
LBB0_6:
	movq	%rax, %rbx
LBB0_12:
	movq	%rbx, %rdi
	callq	_assert
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_max_memory,8,3                 ## @max_memory
	.comm	_MAX_ZMALLOC_MEM,4,2            ## @MAX_ZMALLOC_MEM
	.comm	_PTRSIZE,4,2                    ## @PTRSIZE
	.comm	_malloc_mem,4,2                 ## @malloc_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zzmalloc                       ; -- Begin function zzmalloc
	.p2align	2
_zzmalloc:                              ; @zzmalloc
	.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, x0
Lloh0:
	adrp	x20, _max_memory@GOTPAGE
Lloh1:
	ldr	x20, [x20, _max_memory@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	bl	_get_memory_used
	ldr	x8, [x20]
	cmp	x0, x8
	b.le	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	bl	_free_LRU
	cbz	x0, LBB0_1
LBB0_3:
	bl	_get_memory_used
	ldr	x8, [x20]
	cmp	x0, x8
	cset	w0, le
	bl	_assert
Lloh2:
	adrp	x8, _MAX_ZMALLOC_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MAX_ZMALLOC_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_8
; %bb.4:
Lloh5:
	adrp	x21, _PTRSIZE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PTRSIZE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_dyn_alloc
	cbnz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_free_LRU
	cbz	x0, LBB0_5
; %bb.7:
	mov	x20, #0
	b	LBB0_12
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_malloc
	mov	x20, x0
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_free_LRU
	cbz	x0, LBB0_8
LBB0_10:
Lloh7:
	adrp	x8, _malloc_mem@GOTPAGE
Lloh8:
	ldr	x8, [x8, _malloc_mem@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, w19
	str	w9, [x8]
	b	LBB0_12
LBB0_11:
	mov	x20, x0
LBB0_12:
	mov	x0, x20
	bl	_assert
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_max_memory,8,3                 ; @max_memory
	.comm	_MAX_ZMALLOC_MEM,4,2            ; @MAX_ZMALLOC_MEM
	.comm	_PTRSIZE,4,2                    ; @PTRSIZE
	.comm	_malloc_mem,4,2                 ; @malloc_mem
.subsections_via_symbols
