	.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
	testl	%edi, %edi
	js	LBB0_1
## %bb.2:
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_get_memory_used
	movq	_max_memory@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jle	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_get_memory_used
	movq	(%rbx), %rcx
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_4:
	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_6
## %bb.5:
	movq	_PTRSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_dyn_alloc
	movq	%rax, %rbx
	movq	_zalloc_mem@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	jne	LBB0_9
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_6:
	movl	%r14d, %edi
	callq	_malloc
	movq	%rax, %rbx
	movq	_malloc_mem@GOTPCREL(%rip), %r15
	testq	%rax, %rax
	jne	LBB0_9
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_9:
	movq	%rbx, %rdi
	callq	_assert
	addl	%r14d, (%r15)
	movq	%rbx, %rdi
	callq	_assert
LBB0_10:
	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	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"too much memory used: %lld of %lld\n"

	.comm	_MAX_ZMALLOC_MEM,4,2            ## @MAX_ZMALLOC_MEM
	.comm	_PTRSIZE,4,2                    ## @PTRSIZE
L_.str.1:                               ## @.str.1
	.asciz	"Out of memory\n"

	.comm	_zalloc_mem,4,2                 ## @zalloc_mem
	.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:
	sub	sp, sp, #64
	.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
	tbnz	w0, #31, LBB0_5
; %bb.1:
	mov	x19, x0
	bl	_get_memory_used
Lloh0:
	adrp	x21, _max_memory@GOTPAGE
Lloh1:
	ldr	x21, [x21, _max_memory@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.le	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _stderr@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh4:
	ldr	w20, [x8]
	bl	_get_memory_used
	ldr	x8, [x21]
	stp	x0, x8, [sp]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_fprintf
LBB0_3:
	bl	_get_memory_used
	ldr	x8, [x21]
	cmp	x0, x8
	cset	w0, le
	bl	_assert
Lloh7:
	adrp	x8, _MAX_ZMALLOC_MEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MAX_ZMALLOC_MEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w19
	b.le	LBB0_6
; %bb.4:
Lloh10:
	adrp	x8, _PTRSIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PTRSIZE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dyn_alloc
	mov	x20, x0
Lloh13:
	adrp	x21, _zalloc_mem@GOTPAGE
Lloh14:
	ldr	x21, [x21, _zalloc_mem@GOTPAGEOFF]
	cbnz	x0, LBB0_8
	b	LBB0_7
LBB0_5:
	mov	x20, #0
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_malloc
	mov	x20, x0
Lloh15:
	adrp	x21, _malloc_mem@GOTPAGE
Lloh16:
	ldr	x21, [x21, _malloc_mem@GOTPAGEOFF]
	cbnz	x0, LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _stderr@GOTPAGE
Lloh18:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
LBB0_8:
	mov	x0, x20
	bl	_assert
	ldr	w8, [x21]
	add	w8, w8, w19
	str	w8, [x21]
	mov	x0, x20
	bl	_assert
LBB0_9:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_max_memory,8,3                 ; @max_memory
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"too much memory used: %lld of %lld\n"

	.comm	_MAX_ZMALLOC_MEM,4,2            ; @MAX_ZMALLOC_MEM
	.comm	_PTRSIZE,4,2                    ; @PTRSIZE
l_.str.1:                               ; @.str.1
	.asciz	"Out of memory\n"

	.comm	_zalloc_mem,4,2                 ; @zalloc_mem
	.comm	_malloc_mem,4,2                 ; @malloc_mem
.subsections_via_symbols
