// File: /workspace/github_c_makefile_star2_O0/meaning-matters[P]Except/Test.c
// Function: TestMemory
static void TestMemory(void)
{
    printf("\nMEMORY TESTS ------------------------------------------\n\n");

    try
    {
        void *  p;

        printf("-->%2d: Out of memory?\n", testNum++);
        p = malloc(INT_MAX);    /* calloc() and realloc() are similar */
    }
    catch (OutOfMemoryError, e)
    {
        printf("%s\n", e->getMessage());
    }
    finally;
    printf("\n");

    try
    {
        void *  p;

        printf("-->%2d: Out of memory?\n", testNum++);
        p = new(int[INT_MAX/4]);
    }
    catch (OutOfMemoryError, e)
    {
        printf("%s\n", e->getMessage());
    }
    finally;
    printf("\n");

    try
    {
        void *  p;

        printf("-->%2d: Not out of memory?\n", testNum++);
        p = new(int);
    }
    catch (OutOfMemoryError, e)
    {
        printf("%s\n", e->getMessage());
    }
    finally
    {
        printf("Enough memory left.\n");
    }
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
leaq 0x735e(%rip), %rdi      # 0xe62d
movb $0x0, %al
callq 0x1060
leaq 0x9f83(%rip), %rax      # 0x11260
movq (%rax), %rdi
leaq 0x7179(%rip), %rsi      # 0xe460
movl $0x188, %edx            # imm = 0x188
callq 0x1610
leaq 0x9f68(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0xa00d(%rip), %rsi      # 0x11324
leaq 0x7142(%rip), %rdx      # 0xe460
movl $0x188, %ecx            # imm = 0x188
callq 0x1f60
cmpl $0x0, %eax
je 0x73aa
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
je 0x73aa
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x1110
cmpl $0x0, %eax
jne 0x73aa
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x1b8(%rax)
movl 0x9ee2(%rip), %esi      # 0x11250
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x9ed7(%rip)      # 0x11250
leaq 0x72e8(%rip), %rdi      # 0xe668
movb $0x0, %al
callq 0x1060
movq -0x10(%rbp), %rdi
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
leaq 0x70c9(%rip), %rdx      # 0xe460
movl $0x18d, %ecx            # imm = 0x18D
callq 0x28c0
movq %rax, -0x18(%rbp)
jmp 0x743e
movq -0x10(%rbp), %rdi
leaq 0x9f6f(%rip), %rsi      # 0x11324
leaq 0x9d34(%rip), %rdx      # 0x110f0
leaq 0x709d(%rip), %rcx      # 0xe460
movl $0x18f, %r8d            # imm = 0x18F
callq 0x2030
cmpl $0x0, %eax
je 0x743c
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
je 0x743c
movq -0x10(%rbp), %rdi
leaq 0x9d02(%rip), %rsi      # 0x110f0
callq 0x1b80
cmpl $0x0, %eax
je 0x743c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x2550
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x2, 0x1b8(%rax)
movq -0x20(%rbp), %rax
callq *0x1e0(%rax)
movq %rax, %rsi
leaq 0x7431(%rip), %rdi      # 0xe864
movb $0x0, %al
callq 0x1060
jmp 0x743c
jmp 0x743e
cmpl $0x0, 0x9edf(%rip)      # 0x11324
jne 0x744c
jmp 0x72f1
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
jne 0x748c
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0xd0, %rdi
movl $0x1, %esi
callq 0x1110
cmpl $0x0, %eax
jne 0x748c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x1b4(%rax)
jmp 0x748e
jmp 0x7493
jmp 0x72f1
leaq 0x9dc6(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rax
movl $0x3, 0x1b8(%rax)
leaq 0x9daa(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rcx
movb $0x1, %al
cmpl $0x0, 0x1b4(%rcx)
movb %al, -0x61(%rbp)
jg 0x74e7
leaq 0x9d8a(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x1c60
cmpl $0x0, %eax
setne %al
movb %al, -0x61(%rbp)
movb -0x61(%rbp), %al
testb $0x1, %al
jne 0x74f0
jmp 0x751e
jmp 0x74f2
leaq 0x9d67(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rcx
movl 0x1b4(%rcx), %eax
movl %eax, %edx
addl $-0x1, %edx
movl %edx, 0x1b4(%rcx)
cmpl $0x0, %eax
jle 0x751c
jmp 0x74f2
jmp 0x74af
leaq 0x74f5(%rip), %rdi      # 0xea1a
movb $0x0, %al
callq 0x1060
leaq 0x9d2d(%rip), %rax      # 0x11260
movq (%rax), %rdi
leaq 0x6f23(%rip), %rsi      # 0xe460
movl $0x196, %edx            # imm = 0x196
callq 0x1610
leaq 0x9d12(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
leaq 0x9dbb(%rip), %rsi      # 0x11328
leaq 0x6eec(%rip), %rdx      # 0xe460
movl $0x196, %ecx            # imm = 0x196
callq 0x1f60
cmpl $0x0, %eax
je 0x760a
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
je 0x760a
movq -0x30(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x1110
cmpl $0x0, %eax
jne 0x760a
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x1b8(%rax)
movl 0x9c88(%rip), %esi      # 0x11250
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x9c7d(%rip)      # 0x11250
leaq 0x708e(%rip), %rdi      # 0xe668
movb $0x0, %al
callq 0x1060
movq -0x30(%rbp), %rdi
movl $0x1, %esi
movl $0x7ffffffc, %edx       # imm = 0x7FFFFFFC
leaq 0x6e6a(%rip), %rcx      # 0xe460
movl $0x19b, %r8d            # imm = 0x19B
callq 0x2860
movq %rax, -0x38(%rbp)
jmp 0x769e
movq -0x30(%rbp), %rdi
leaq 0x9d13(%rip), %rsi      # 0x11328
leaq 0x9ad4(%rip), %rdx      # 0x110f0
leaq 0x6e3d(%rip), %rcx      # 0xe460
movl $0x19d, %r8d            # imm = 0x19D
callq 0x2030
cmpl $0x0, %eax
je 0x769c
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
je 0x769c
movq -0x30(%rbp), %rdi
leaq 0x9aa2(%rip), %rsi      # 0x110f0
callq 0x1b80
cmpl $0x0, %eax
je 0x769c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x2550
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl $0x2, 0x1b8(%rax)
movq -0x40(%rbp), %rax
callq *0x1e0(%rax)
movq %rax, %rsi
leaq 0x71d1(%rip), %rdi      # 0xe864
movb $0x0, %al
callq 0x1060
jmp 0x769c
jmp 0x769e
cmpl $0x0, 0x9c83(%rip)      # 0x11328
jne 0x76ac
jmp 0x7547
movq -0x30(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
jne 0x76ec
movq -0x30(%rbp), %rax
movq (%rax), %rdi
addq $0xd0, %rdi
movl $0x1, %esi
callq 0x1110
cmpl $0x0, %eax
jne 0x76ec
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x1b4(%rax)
jmp 0x76ee
jmp 0x76f3
jmp 0x7547
leaq 0x9b66(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rax
movl $0x3, 0x1b8(%rax)
leaq 0x9b4a(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rcx
movb $0x1, %al
cmpl $0x0, 0x1b4(%rcx)
movb %al, -0x62(%rbp)
jg 0x7747
leaq 0x9b2a(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x1c60
cmpl $0x0, %eax
setne %al
movb %al, -0x62(%rbp)
movb -0x62(%rbp), %al
testb $0x1, %al
jne 0x7750
jmp 0x777e
jmp 0x7752
leaq 0x9b07(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rcx
movl 0x1b4(%rcx), %eax
movl %eax, %edx
addl $-0x1, %edx
movl %edx, 0x1b4(%rcx)
cmpl $0x0, %eax
jle 0x777c
jmp 0x7752
jmp 0x770f
leaq 0x7295(%rip), %rdi      # 0xea1a
movb $0x0, %al
callq 0x1060
leaq 0x9acd(%rip), %rax      # 0x11260
movq (%rax), %rdi
leaq 0x6cc3(%rip), %rsi      # 0xe460
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x1610
leaq 0x9ab2(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
leaq 0x9b5f(%rip), %rsi      # 0x1132c
leaq 0x6c8c(%rip), %rdx      # 0xe460
movl $0x1a4, %ecx            # imm = 0x1A4
callq 0x1f60
cmpl $0x0, %eax
je 0x786a
movq -0x50(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
je 0x786a
movq -0x50(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
movl $0x1, %esi
callq 0x1110
cmpl $0x0, %eax
jne 0x786a
movq -0x50(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x1b8(%rax)
movl 0x9a28(%rip), %esi      # 0x11250
movl %esi, %eax
addl $0x1, %eax
movl %eax, 0x9a1d(%rip)      # 0x11250
leaq 0x6e46(%rip), %rdi      # 0xe680
movb $0x0, %al
callq 0x1060
movq -0x50(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
leaq 0x6c0a(%rip), %rcx      # 0xe460
movl $0x1a9, %r8d            # imm = 0x1A9
callq 0x2860
movq %rax, -0x58(%rbp)
jmp 0x78fe
movq -0x50(%rbp), %rdi
leaq 0x9ab7(%rip), %rsi      # 0x1132c
leaq 0x9874(%rip), %rdx      # 0x110f0
leaq 0x6bdd(%rip), %rcx      # 0xe460
movl $0x1ab, %r8d            # imm = 0x1AB
callq 0x2030
cmpl $0x0, %eax
je 0x78fc
movq -0x50(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
je 0x78fc
movq -0x50(%rbp), %rdi
leaq 0x9842(%rip), %rsi      # 0x110f0
callq 0x1b80
cmpl $0x0, %eax
je 0x78fc
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %esi
callq 0x2550
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movl $0x2, 0x1b8(%rax)
movq -0x60(%rbp), %rax
callq *0x1e0(%rax)
movq %rax, %rsi
leaq 0x6f71(%rip), %rdi      # 0xe864
movb $0x0, %al
callq 0x1060
jmp 0x78fc
jmp 0x78fe
cmpl $0x0, 0x9a27(%rip)      # 0x1132c
jne 0x790c
jmp 0x77a7
movq -0x50(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, 0x1b4(%rax)
jne 0x794c
movq -0x50(%rbp), %rax
movq (%rax), %rdi
addq $0xd0, %rdi
movl $0x1, %esi
callq 0x1110
cmpl $0x0, %eax
jne 0x794c
movq -0x50(%rbp), %rax
movq (%rax), %rax
movl $0x1, 0x1b4(%rax)
jmp 0x794e
jmp 0x7953
jmp 0x77a7
leaq 0x9906(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rax
movl $0x3, 0x1b8(%rax)
leaq 0x98ea(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rcx
movb $0x1, %al
cmpl $0x0, 0x1b4(%rcx)
movb %al, -0x63(%rbp)
jg 0x79a7
leaq 0x98ca(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x1c60
cmpl $0x0, %eax
setne %al
movb %al, -0x63(%rbp)
movb -0x63(%rbp), %al
testb $0x1, %al
jne 0x79b0
jmp 0x79ec
jmp 0x79b2
leaq 0x98a7(%rip), %rax      # 0x11260
movq (%rax), %rdi
callq 0x12a0
movq (%rax), %rcx
movl 0x1b4(%rcx), %eax
movl %eax, %edx
addl $-0x1, %edx
movl %edx, 0x1b4(%rcx)
cmpl $0x0, %eax
jle 0x79ea
leaq 0x6cbb(%rip), %rdi      # 0xe69c
movb $0x0, %al
callq 0x1060
jmp 0x79b2
jmp 0x796f
leaq 0x7027(%rip), %rdi      # 0xea1a
movb $0x0, %al
callq 0x1060
addq $0x70, %rsp
popq %rbp
retq