// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test_exec_allocator
static void test_exec_allocator(void)
{
	/* This is not an sljit test. */
	void *ptr1;
	void *ptr2;
	void *ptr3;

	if (verbose)
		printf("Run executable allocator test\n");

	MALLOC_EXEC(ptr1, 32);
	MALLOC_EXEC(ptr2, 512);
	MALLOC_EXEC(ptr3, 512);
	SLJIT_FREE_EXEC(ptr2);
	SLJIT_FREE_EXEC(ptr3);
	SLJIT_FREE_EXEC(ptr1);
	MALLOC_EXEC(ptr1, 262104);
	MALLOC_EXEC(ptr2, 32000);
	SLJIT_FREE_EXEC(ptr1);
	MALLOC_EXEC(ptr1, 262104);
	SLJIT_FREE_EXEC(ptr1);
	SLJIT_FREE_EXEC(ptr2);
	MALLOC_EXEC(ptr1, 512);
	MALLOC_EXEC(ptr2, 512);
	MALLOC_EXEC(ptr3, 512);
	SLJIT_FREE_EXEC(ptr2);
	MALLOC_EXEC(ptr2, 512);
#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
	sljit_free_unused_memory_exec();
#endif
	SLJIT_FREE_EXEC(ptr3);
	SLJIT_FREE_EXEC(ptr1);
	SLJIT_FREE_EXEC(ptr2);
#if (defined SLJIT_UTIL_GLOBAL_LOCK && SLJIT_UTIL_GLOBAL_LOCK)
	/* Just call the global locks. */
	sljit_grab_lock();
	sljit_release_lock();
#endif

#if (defined SLJIT_EXECUTABLE_ALLOCATOR && SLJIT_EXECUTABLE_ALLOCATOR)
	sljit_free_unused_memory_exec();
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpl $0x0, 0x31d15(%rip)     # 0x34354
je 0x264f
leaq 0x2ad3e(%rip), %rdi     # 0x2d386
movb $0x0, %al
callq 0x2070
movl $0x20, %edi
callq 0x18520
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2677
leaq 0x2ad3a(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x8(%rbp), %rdi
movl $0xff, %esi
movl $0x20, %edx
callq 0x2080
movl $0x200, %edi            # imm = 0x200
callq 0x18520
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x26b2
leaq 0x2acff(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x10(%rbp), %rdi
movl $0xff, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2080
movl $0x200, %edi            # imm = 0x200
callq 0x18520
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x26ed
leaq 0x2acc4(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x18(%rbp), %rdi
movl $0xff, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2080
movq -0x10(%rbp), %rdi
callq 0x18920
movq -0x18(%rbp), %rdi
callq 0x18920
movq -0x8(%rbp), %rdi
callq 0x18920
movl $0x3ffd8, %edi          # imm = 0x3FFD8
callq 0x18520
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x2743
leaq 0x2ac6e(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x8(%rbp), %rdi
movl $0xff, %esi
movl $0x3ffd8, %edx          # imm = 0x3FFD8
callq 0x2080
movl $0x7d00, %edi           # imm = 0x7D00
callq 0x18520
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x277e
leaq 0x2ac33(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x10(%rbp), %rdi
movl $0xff, %esi
movl $0x7d00, %edx           # imm = 0x7D00
callq 0x2080
movq -0x8(%rbp), %rdi
callq 0x18920
movl $0x3ffd8, %edi          # imm = 0x3FFD8
callq 0x18520
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x27c2
leaq 0x2abef(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x8(%rbp), %rdi
movl $0xff, %esi
movl $0x3ffd8, %edx          # imm = 0x3FFD8
callq 0x2080
movq -0x8(%rbp), %rdi
callq 0x18920
movq -0x10(%rbp), %rdi
callq 0x18920
movl $0x200, %edi            # imm = 0x200
callq 0x18520
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x280f
leaq 0x2aba2(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x8(%rbp), %rdi
movl $0xff, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2080
movl $0x200, %edi            # imm = 0x200
callq 0x18520
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x284a
leaq 0x2ab67(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x10(%rbp), %rdi
movl $0xff, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2080
movl $0x200, %edi            # imm = 0x200
callq 0x18520
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x2885
leaq 0x2ab2c(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x18(%rbp), %rdi
movl $0xff, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2080
movq -0x10(%rbp), %rdi
callq 0x18920
movl $0x200, %edi            # imm = 0x200
callq 0x18520
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x28c6
leaq 0x2aae8(%rip), %rdi     # 0x2d3a5
movb $0x0, %al
callq 0x2070
jmp 0x2908
movq -0x10(%rbp), %rdi
movl $0xff, %esi
movl $0x200, %edx            # imm = 0x200
callq 0x2080
callq 0x18ac0
movq -0x18(%rbp), %rdi
callq 0x18920
movq -0x8(%rbp), %rdi
callq 0x18920
movq -0x10(%rbp), %rdi
callq 0x18920
callq 0x18270
callq 0x18290
callq 0x18ac0
addq $0x20, %rsp
popq %rbp
retq
nop