	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Z_Malloc                       ## -- Begin function Z_Malloc
	.p2align	4, 0x90
_Z_Malloc:                              ## @Z_Malloc
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	addl	$43, %r15d
	andl	$-4, %r15d
	movq	_mainzone@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movq	32(%rbx), %rax
	cmpq	$0, 24(%rax)
	cmoveq	%rax, %rbx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	32(%rbx), %r14
	movq	_PU_PURGELEVEL@GOTPCREL(%rip), %r12
	movq	%rbx, %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, %rbx
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	$0, 24(%rbx)
	je	LBB0_7
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rbx), %eax
	cmpl	(%r12), %eax
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%rbx), %rbx
	movq	%rbx, %r13
	cmpq	$0, 24(%r13)
	jne	LBB0_1
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_I_Error
	cmpq	$0, 24(%rbx)
	jne	LBB0_4
LBB0_7:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%rbx), %rbx
	cmpq	$0, 24(%r13)
	jne	LBB0_1
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	32(%r13), %r13
	addq	$160, %rbx
	movq	%rbx, %rdi
	callq	_Z_Free
	movq	16(%r13), %r13
	movq	16(%r13), %rbx
	cmpq	$0, 24(%r13)
	jne	LBB0_1
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %eax
	subl	%r15d, %eax
	jl	LBB0_1
## %bb.10:
	movq	_MINFRAGMENT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_12
## %bb.11:
	movslq	%r15d, %rcx
	leaq	(,%rcx,4), %rdx
	addq	%r13, %rdx
	movl	%eax, (%r13,%rcx,4)
	movq	$0, 24(%r13,%rcx,4)
	movl	$0, 4(%r13,%rcx,4)
	movq	%r13, 32(%r13,%rcx,4)
	movq	16(%r13), %rax
	movq	%rax, 16(%r13,%rcx,4)
	movq	%rdx, 32(%rax)
	movq	%rdx, 16(%r13)
	movl	%r15d, (%r13)
LBB0_12:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.13:
	movq	%rcx, 24(%r13)
	leaq	160(%r13), %rax
	movq	%rax, (%rcx)
	movq	_mainzone@GOTPCREL(%rip), %rcx
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_17
LBB0_14:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, (%r12)
	jg	LBB0_16
## %bb.15:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_I_Error
LBB0_16:
	movq	$2, 24(%r13)
	movq	_mainzone@GOTPCREL(%rip), %rcx
LBB0_17:
	movl	%ebx, 4(%r13)
	movq	16(%r13), %rax
	movq	(%rcx), %rcx
	movq	%rax, (%rcx)
	movq	_ZONEID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r13)
	addq	$160, %r13
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mainzone,8,3                   ## @mainzone
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Z_Malloc: failed on allocation of %i bytes"

	.comm	_PU_PURGELEVEL,4,2              ## @PU_PURGELEVEL
	.comm	_MINFRAGMENT,4,2                ## @MINFRAGMENT
L_.str.1:                               ## @.str.1
	.asciz	"Z_Malloc: an owner is required for purgable blocks"

	.comm	_ZONEID,4,2                     ## @ZONEID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Z_Malloc                       ; -- Begin function Z_Malloc
	.p2align	2
_Z_Malloc:                              ; @Z_Malloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x19, x1
	add	w8, w0, #43
	and	w24, w8, #0xfffffffc
Lloh0:
	adrp	x22, _mainzone@GOTPAGE
Lloh1:
	ldr	x22, [x22, _mainzone@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	x9, [x8, #32]
	ldr	x10, [x9, #24]
	cmp	x10, #0
	csel	x27, x9, x8, eq
	ldr	x26, [x27, #32]
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
Lloh4:
	adrp	x25, _PU_PURGELEVEL@GOTPAGE
Lloh5:
	ldr	x25, [x25, _PU_PURGELEVEL@GOTPAGEOFF]
	mov	x23, x27
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, x26
	b.eq	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x27, #24]
	cbz	x8, LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x27, #4]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ge	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x27, [x27, #16]
	mov	x23, x27
	ldr	x8, [x23, #24]
	cbnz	x8, LBB0_1
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	str	x24, [sp]
	mov	x0, x21
	bl	_I_Error
	ldr	x8, [x27, #24]
	cbnz	x8, LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x27, [x27, #16]
	ldr	x8, [x23, #24]
	cbnz	x8, LBB0_1
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x23, [x23, #32]
	add	x0, x27, #160
	bl	_Z_Free
	ldr	x23, [x23, #16]
	ldr	x27, [x23, #16]
	ldr	x8, [x23, #24]
	cbnz	x8, LBB0_1
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x23]
	subs	w8, w8, w24
	b.lt	LBB0_1
; %bb.9:
Lloh6:
	adrp	x9, _MINFRAGMENT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MINFRAGMENT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_11
; %bb.10:
	add	x9, x23, w24, sxtw #2
	stp	w8, wzr, [x9]
	str	x23, [x9, #32]
	ldr	x8, [x23, #16]
	stp	x8, xzr, [x9, #16]
	str	x9, [x8, #32]
	str	x9, [x23, #16]
	str	w24, [x23]
LBB0_11:
	cbz	x20, LBB0_13
; %bb.12:
	str	x20, [x23, #24]
	add	x8, x23, #160
	str	x8, [x20]
	b	LBB0_16
LBB0_13:
	ldr	w8, [x25]
	cmp	w8, w19
	b.gt	LBB0_15
; %bb.14:
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_I_Error
LBB0_15:
	mov	w8, #2
	str	x8, [x23, #24]
LBB0_16:
	ldr	x8, [x23, #16]
	ldr	x9, [x22]
Lloh11:
	adrp	x10, _ZONEID@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ZONEID@GOTPAGEOFF]
	str	x8, [x9]
Lloh13:
	ldr	w8, [x10]
	stp	w19, w8, [x23, #4]
	add	x0, x23, #160
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_mainzone,8,3                   ; @mainzone
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Z_Malloc: failed on allocation of %i bytes"

	.comm	_PU_PURGELEVEL,4,2              ; @PU_PURGELEVEL
	.comm	_MINFRAGMENT,4,2                ; @MINFRAGMENT
l_.str.1:                               ; @.str.1
	.asciz	"Z_Malloc: an owner is required for purgable blocks"

	.comm	_ZONEID,4,2                     ; @ZONEID
.subsections_via_symbols
