	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_heap_allocate            ## -- Begin function __lwp_heap_allocate
	.p2align	4, 0x90
___lwp_heap_allocate:                   ## @__lwp_heap_allocate
	.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	_HEAP_BLOCK_USED_OVERHEAD@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	notl	%eax
	cmpl	%esi, %eax
	jle	LBB0_1
## %bb.2:
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	__CPU_ISR_Disable
	movl	(%r14), %ecx
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	addl	%ecx, %ebx
	addl	(%r13), %ebx
	subl	%edx, %ecx
	testl	%edx, %edx
	cmovel	%edx, %ecx
	addl	%ebx, %ecx
	cmpl	$25, %ecx
	movl	$24, %r15d
	cmovael	%ecx, %r15d
	movq	8(%r14), %rbx
	movq	%r14, %rdi
	callq	___lwp_heap_tail
	xorl	%r12d, %r12d
	cmpq	%rax, %rbx
	je	LBB0_10
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %eax
	subl	%r15d, %eax
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rbx), %rbx
	movq	%r14, %rdi
	callq	___lwp_heap_tail
	cmpq	%rax, %rbx
	jne	LBB0_4
	jmp	LBB0_10
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_6:
	movl	(%r13), %ecx
	addl	(%r14), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_8
## %bb.7:
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	___lwp_heap_nextblock
	movq	%rax, %r12
	movl	(%rbx), %eax
	movl	%eax, 4(%r12)
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	___lwp_heap_blockat
	movq	%rax, %rbx
	movq	_HEAP_BLOCK_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	___lwp_heap_buildflag
	movl	%eax, (%r12)
	movl	%eax, 4(%rbx)
	movq	%r12, %rdi
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	callq	___lwp_heap_nextblock
	movq	%rax, %r15
	movl	(%rbx), %edi
	movq	_HEAP_BLOCK_USED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	___lwp_heap_buildflag
	movl	%eax, 4(%r15)
	movl	%eax, (%rbx)
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	%rcx, 16(%rax)
	movq	16(%rbx), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, %rdi
LBB0_9:
	callq	___lwp_heap_startuser
	movl	(%r14), %ecx
	leal	-1(%rcx), %edx
	andl	%eax, %edx
	subl	%edx, %ecx
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx), %r12
	movl	%ecx, -4(%rax,%rcx)
LBB0_10:
	callq	__CPU_ISR_Restore
LBB0_11:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEAP_BLOCK_USED_OVERHEAD,4,2   ## @HEAP_BLOCK_USED_OVERHEAD
	.comm	_HEAP_BLOCK_USED,4,2            ## @HEAP_BLOCK_USED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___lwp_heap_allocate            ; -- Begin function __lwp_heap_allocate
	.p2align	2
___lwp_heap_allocate:                   ; @__lwp_heap_allocate
	.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
Lloh0:
	adrp	x22, _HEAP_BLOCK_USED_OVERHEAD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _HEAP_BLOCK_USED_OVERHEAD@GOTPAGEOFF]
	ldr	w8, [x22]
	mvn	w8, w8
	cmp	w8, w1
	b.le	LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	__CPU_ISR_Disable
	ldr	w8, [x19]
	sdiv	w9, w20, w8
	msub	w9, w9, w8, w20
	ldr	w10, [x22]
	add	w11, w8, w20
	add	w10, w11, w10
	sub	w8, w8, w9
	cmp	w9, #0
	csel	w8, wzr, w8, eq
	add	w8, w10, w8
	mov	w9, #24
	cmp	w8, #24
	csel	w21, w8, w9, hi
	ldr	x20, [x19, #8]
	mov	x0, x19
	bl	___lwp_heap_tail
	cmp	x20, x0
	b.eq	LBB0_4
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20]
	subs	w8, w8, w21
	b.ge	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x20, [x20, #8]
	mov	x0, x19
	bl	___lwp_heap_tail
	cmp	x20, x0
	b.ne	LBB0_2
LBB0_4:
	mov	x19, #0
	b	LBB0_10
LBB0_5:
	mov	x19, #0
	b	LBB0_11
LBB0_6:
	ldr	w9, [x19]
	ldr	w10, [x22]
	add	w9, w10, w9
	cmp	w8, w9
	b.le	LBB0_8
; %bb.7:
	str	w8, [x20]
	mov	x0, x20
	bl	___lwp_heap_nextblock
	mov	x22, x0
	ldr	w8, [x20]
	str	w8, [x0, #4]
	mov	x1, x21
	bl	___lwp_heap_blockat
	mov	x20, x0
Lloh2:
	adrp	x8, _HEAP_BLOCK_USED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HEAP_BLOCK_USED@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x21
	bl	___lwp_heap_buildflag
	str	w0, [x22]
	str	w0, [x20, #4]
	mov	x0, x22
	b	LBB0_9
LBB0_8:
	mov	x0, x20
	bl	___lwp_heap_nextblock
	mov	x21, x0
	ldr	w0, [x20]
Lloh5:
	adrp	x8, _HEAP_BLOCK_USED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HEAP_BLOCK_USED@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	___lwp_heap_buildflag
	str	w0, [x21, #4]
	str	w0, [x20]
	ldp	x9, x8, [x20, #8]
	str	x8, [x9, #16]
	ldr	x8, [x20, #16]
	str	x9, [x8]
	mov	x0, x20
LBB0_9:
	bl	___lwp_heap_startuser
	ldr	w8, [x19]
	sub	w9, w8, #1
	and	w9, w9, w0
	sub	w8, w8, w9
	add	x19, x0, w8, sxtw
	stur	w8, [x19, #-4]
LBB0_10:
	bl	__CPU_ISR_Restore
LBB0_11:
	mov	x0, x19
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HEAP_BLOCK_USED_OVERHEAD,4,2   ; @HEAP_BLOCK_USED_OVERHEAD
	.comm	_HEAP_BLOCK_USED,4,2            ; @HEAP_BLOCK_USED
.subsections_via_symbols
