// File: /workspace/github_c_makefile_star2_O0/meaning-matters[P]Except/Except.c
// Function: ExceptCheck
int ExceptCheck(
    Context *   pC,             /* pointer to thread exception context */
    int *       pChecked,       /* pointer to flag if finished checking */
    ClassRef    class,          /* next exception class to be checked */
    char *      file,           /* name of source file where invoked */
    int         line)           /* source file line number */
{
    typedef struct _Check
    {
        ClassRef        class;
        int             line;
    } Check;

    ExceptPrintDebug(pC, "ExceptCheck");

    if (!*pChecked)
    {
        Check * pCheck;

        pCheck = ListHead(pC->pEx->checkList);
        while (pCheck != NULL)                  /* breaked from */
        {
            if (class == pCheck->class)
            {
                fprintf(stderr, "Duplicate catch(%s): file \"%s\", line %d; "
                        "already caught at line %d.\n",
                        class->name, file, line, pCheck->line);
                break;
            }

            if (ExceptIsDerived(class, pCheck->class))
            {
                fprintf(stderr, "Superfluous catch(%s): file \"%s\", line %d; "
                        "already caught by %s at line %d.\n", class->name,
                        file, line, pCheck->class->name, pCheck->line);
                break;
            }

            pCheck = ListNext(pC->pEx->checkList);
        }

        if (pCheck == NULL)
        {
            pCheck = malloc(sizeof(Check));
            pCheck->class = class;
            pCheck->line  = line;
            ListAddTail(pC->pEx->checkList, pCheck);
        }
    }
    return *pChecked;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl %r8d, -0x24(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x26dd
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x1c0(%rax), %rdi
callq 0x3fe0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x269a
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x262a
movq 0x59f9(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %rax
movl 0x8(%rax), %r9d
leaq 0x2b4e(%rip), %rsi      # 0x516f
movb $0x0, %al
callq 0x10a0
jmp 0x269a
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0x2170
cmpl $0x0, %eax
je 0x267e
movq 0x59b2(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x20(%rbp), %rcx
movl -0x24(%rbp), %r8d
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %r9
movq -0x30(%rbp), %rax
movl 0x8(%rax), %eax
leaq 0x2b42(%rip), %rsi      # 0x51b4
movl %eax, (%rsp)
movb $0x0, %al
callq 0x10a0
jmp 0x269a
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x1c0(%rax), %rdi
callq 0x4150
movq %rax, -0x30(%rbp)
jmp 0x25e0
cmpq $0x0, -0x30(%rbp)
jne 0x26db
movl $0x10, %edi
callq 0x10d0
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl -0x24(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x1c0(%rax), %rdi
movq -0x30(%rbp), %rsi
callq 0x3670
jmp 0x26dd
movq -0x10(%rbp), %rax
movl (%rax), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)