// File: /workspace/github_c_makefile_star2_O0/mmcco[P]sljit/test_src/sljitTest.c
// Function: test38
static void test38(void)
{
#if (defined SLJIT_UTIL_STACK && SLJIT_UTIL_STACK)
	/* Test stack utility. */
	executable_code code;
	struct sljit_compiler* compiler = sljit_create_compiler();
	struct sljit_jump* alloc_fail;
	struct sljit_jump* alloc2_fail;
	struct sljit_jump* alloc3_fail;
	struct sljit_jump* jump;
	struct sljit_label* label;

	if (verbose)
		printf("Run test38\n");

	FAILED(!compiler, "cannot create compiler\n");

	sljit_emit_enter(compiler, 0, 0, 2, 1, 0, 0, 0);

	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_IMM, 8192);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R1, 0, SLJIT_IMM, 65536);
	sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_allocate_stack));
	alloc_fail = sljit_emit_cmp(compiler, SLJIT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_S0, 0, SLJIT_RETURN_REG, 0);

	/* Write 8k data. */
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSETOF(struct sljit_stack, base), SLJIT_IMM, sizeof(long));
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R1, 0, SLJIT_R0, 0, SLJIT_IMM, 8192);
	label = sljit_emit_label(compiler);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_R0), sizeof(long), SLJIT_IMM, -1);
	jump = sljit_emit_cmp(compiler, SLJIT_LESS, SLJIT_R0, 0, SLJIT_R1, 0);
	sljit_set_label(jump, label);

	/* Grow stack. */
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_S0, 0);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSETOF(struct sljit_stack, base), SLJIT_IMM, 65536);
	sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize));
	alloc2_fail = sljit_emit_cmp(compiler, SLJIT_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);

	/* Write 64k data. */
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSETOF(struct sljit_stack, base), SLJIT_IMM, sizeof(long));
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R1, 0, SLJIT_R0, 0, SLJIT_IMM, 65536);
	label = sljit_emit_label(compiler);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_R0), sizeof(long), SLJIT_IMM, -1);
	jump = sljit_emit_cmp(compiler, SLJIT_LESS, SLJIT_R0, 0, SLJIT_R1, 0);
	sljit_set_label(jump, label);

	/* Shrink stack. */
	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_S0, 0);
	sljit_emit_op2(compiler, SLJIT_ADD, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSETOF(struct sljit_stack, base), SLJIT_IMM, 32768);
	sljit_emit_ijump(compiler, SLJIT_CALL2, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_stack_resize));
	alloc3_fail = sljit_emit_cmp(compiler, SLJIT_NOT_EQUAL, SLJIT_RETURN_REG, 0, SLJIT_IMM, 0);

	/* Write 32k data. */
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R0, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSETOF(struct sljit_stack, base), SLJIT_IMM, sizeof(long));
	sljit_emit_op2(compiler, SLJIT_SUB, SLJIT_R1, 0, SLJIT_MEM1(SLJIT_S0), SLJIT_OFFSETOF(struct sljit_stack, limit), SLJIT_IMM, sizeof(long));
	label = sljit_emit_label(compiler);
	sljit_emit_op1(compiler, SLJIT_MOVU, SLJIT_MEM1(SLJIT_R0), sizeof(long), SLJIT_IMM, -1);
	jump = sljit_emit_cmp(compiler, SLJIT_LESS, SLJIT_R0, 0, SLJIT_R1, 0);
	sljit_set_label(jump, label);

	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_R0, 0, SLJIT_S0, 0);
	sljit_emit_ijump(compiler, SLJIT_CALL1, SLJIT_IMM, SLJIT_FUNC_OFFSET(sljit_free_stack));

	sljit_emit_op1(compiler, SLJIT_MOV, SLJIT_RETURN_REG, 0, SLJIT_IMM, 1);
	label = sljit_emit_label(compiler);
	sljit_set_label(alloc_fail, label);
	sljit_set_label(alloc2_fail, label);
	sljit_set_label(alloc3_fail, label);
	sljit_emit_return(compiler, SLJIT_UNUSED, 0, 0);

	code.code = sljit_generate_code(compiler);
	CHECK(compiler);
	sljit_free_compiler(compiler);

	/* Just survive this. */
	FAILED(code.func0() != 1, "test38 case 1 failed\n");

	sljit_free_code(code.code);
#endif
	successful_tests++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
callq 0x18ba0
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x22adc(%rip)     # 0x34354
je 0x11888
leaq 0x1db27(%rip), %rdi     # 0x2f3a8
movb $0x0, %al
callq 0x2070
cmpq $0x0, -0x10(%rbp)
jne 0x118a2
leaq 0x1bb3d(%rip), %rdi     # 0x2d3d3
movb $0x0, %al
callq 0x2070
jmp 0x11e31
movq -0x10(%rbp), %rdi
xorl %r9d, %r9d
movl $0x2, %ecx
movl $0x1, %r8d
movl %r9d, %esi
movl %r9d, %edx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
callq 0x19b20
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x2000, %r9d           # imm = 0x2000
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x10000, %r9d          # imm = 0x10000
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x1a, %esi
movl $0x40, %edx
leaq 0x6987(%rip), %rcx      # 0x182b0
callq 0x288b0
movq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, %r8d
movq %r9, %rcx
callq 0x2ac80
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0xc, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x10, %r9d
addq $0x8, %r9
subq $0x10, %r9
movl $0x40, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x2000, 0x8(%rsp)      # imm = 0x2000
callq 0x1f8d0
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x81, %edx
movl $0x8, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2, %r8d
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %esi
movq %r9, %rcx
callq 0x2ac80
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x10, %r9d
addq $0x8, %r9
subq $0x10, %r9
movl $0x40, (%rsp)
movq $0x10000, 0x8(%rsp)     # imm = 0x10000
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x1a, %esi
movl $0x40, %edx
leaq 0x6990(%rip), %rcx      # 0x18440
callq 0x288b0
movq -0x10(%rbp), %rdi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, %r8d
movl %edx, %esi
movq %r9, %rcx
callq 0x2ac80
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x10, %r9d
addq $0x8, %r9
subq $0x10, %r9
movl $0x40, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x1, %r8d
movq %r9, %rcx
movl $0x40, (%rsp)
movq $0x10000, 0x8(%rsp)     # imm = 0x10000
callq 0x1f8d0
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x81, %edx
movl $0x8, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2, %r8d
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %esi
movq %r9, %rcx
callq 0x2ac80
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x60, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x10, %r9d
addq $0x8, %r9
subq $0x10, %r9
movl $0x40, (%rsp)
movq $0x8000, 0x8(%rsp)      # imm = 0x8000
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x1a, %esi
movl $0x40, %edx
leaq 0x682a(%rip), %rcx      # 0x18440
callq 0x288b0
movq -0x10(%rbp), %rdi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0x40, %r8d
movl %edx, %esi
movq %r9, %rcx
callq 0x2ac80
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x10, %r9d
addq $0x8, %r9
subq $0x10, %r9
movl $0x40, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
movl $0x62, %esi
movl $0x2, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x8c, %r8d
movl $0x10, %r9d
addq $0x10, %r9
subq $0x10, %r9
movl $0x40, (%rsp)
movq $0x8, 0x8(%rsp)
callq 0x1f8d0
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl $0x28, %esi
movl $0x81, %edx
movl $0x8, %ecx
movl $0x40, %r8d
movq $-0x1, %r9
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x2, %r8d
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl %r8d, %esi
movq %r9, %rcx
callq 0x2ac80
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %r9d
movl $0xc, %r8d
movq %r9, %rcx
callq 0x1d3d0
movq -0x10(%rbp), %rdi
movl $0x19, %esi
movl $0x40, %edx
leaq 0x66b5(%rip), %rcx      # 0x18400
callq 0x288b0
movq -0x10(%rbp), %rdi
movl $0x20, %esi
movl $0x1, %edx
xorl %eax, %eax
movl %eax, %ecx
movl $0x40, %r8d
movl $0x1, %r9d
callq 0x1d3d0
movq -0x10(%rbp), %rdi
callq 0x28220
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x18e30
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x18e30
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x18e30
movq -0x10(%rbp), %rdi
xorl %edx, %edx
xorl %eax, %eax
movl %eax, %ecx
movl %edx, %esi
callq 0x1a7c0
movq -0x10(%rbp), %rdi
callq 0x19070
movq %rax, -0x8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x18030
cmpl $0x1, %eax
je 0x11df7
movq -0x10(%rbp), %rdi
callq 0x18030
movl %eax, %esi
leaq 0x1b633(%rip), %rdi     # 0x2d418
movb $0x0, %al
callq 0x2070
movq -0x10(%rbp), %rdi
callq 0x18d90
jmp 0x11e31
movq -0x10(%rbp), %rdi
callq 0x18d90
callq *-0x8(%rbp)
cmpq $0x1, %rax
je 0x11e19
leaq 0x1d5a4(%rip), %rdi     # 0x2f3b4
movb $0x0, %al
callq 0x2070
jmp 0x11e31
movq -0x8(%rbp), %rdi
callq 0x18e10
movl 0x22534(%rip), %eax     # 0x3435c
addl $0x1, %eax
movl %eax, 0x2252b(%rip)     # 0x3435c
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)