// File: AndreRenaud[P]simple_options/./acutest.h
// Function: acutest_do_run_
static int
acutest_do_run_(const struct acutest_test_* test, int index)
{
    int status = -1;

    acutest_was_aborted_ = 0;
    acutest_current_test_ = test;
    acutest_current_index_ = index;
    acutest_test_failures_ = 0;
    acutest_test_already_logged_ = 0;
    acutest_cond_failed_ = 0;

#ifdef __cplusplus
    try {
#endif
        acutest_init_(test->name);
        acutest_begin_test_line_(test);

        /* This is good to do in case the test unit crashes. */
        fflush(stdout);
        fflush(stderr);

        if(!acutest_worker_) {
            acutest_abort_has_jmp_buf_ = 1;
            if(setjmp(acutest_abort_jmp_buf_) != 0) {
                acutest_was_aborted_ = 1;
                goto aborted;
            }
        }

        acutest_timer_get_time_(&acutest_timer_start_);
        test->func();
aborted:
        acutest_abort_has_jmp_buf_ = 0;
        acutest_timer_get_time_(&acutest_timer_end_);

        if(acutest_verbose_level_ >= 3) {
            acutest_line_indent_(1);
            if(acutest_test_failures_ == 0) {
                acutest_colored_printf_(ACUTEST_COLOR_GREEN_INTENSIVE_, "SUCCESS: ");
                printf("All conditions have passed.\n");

                if(acutest_timer_) {
                    acutest_line_indent_(1);
                    printf("Duration: ");
                    acutest_timer_print_diff_();
                    printf("\n");
                }
            } else {
                acutest_colored_printf_(ACUTEST_COLOR_RED_INTENSIVE_, "FAILED: ");
                if(!acutest_was_aborted_) {
                    printf("%d condition%s %s failed.\n",
                            acutest_test_failures_,
                            (acutest_test_failures_ == 1) ? "" : "s",
                            (acutest_test_failures_ == 1) ? "has" : "have");
                } else {
                    printf("Aborted.\n");
                }
            }
            printf("\n");
        } else if(acutest_verbose_level_ >= 1 && acutest_test_failures_ == 0) {
            acutest_finish_test_line_(0);
        }

        status = (acutest_test_failures_ == 0) ? 0 : -1;

#ifdef __cplusplus
    } catch(std::exception& e) {
        const char* what = e.what();
        acutest_check_(0, NULL, 0, "Threw std::exception");
        if(what != NULL)
            acutest_message_("std::exception::what(): %s", what);

        if(acutest_verbose_level_ >= 3) {
            acutest_line_indent_(1);
            acutest_colored_printf_(ACUTEST_COLOR_RED_INTENSIVE_, "FAILED: ");
            printf("C++ exception.\n\n");
        }
    } catch(...) {
        acutest_check_(0, NULL, 0, "Threw an exception");

        if(acutest_verbose_level_ >= 3) {
            acutest_line_indent_(1);
            acutest_colored_printf_(ACUTEST_COLOR_RED_INTENSIVE_, "FAILED: ");
            printf("C++ exception.\n\n");
        }
    }
#endif

    acutest_fini_(test->name);
    acutest_case_(NULL);
    acutest_current_test_ = NULL;

    return status;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
movl $0x0, 0x4bf4(%rip)      # 0xb324
movq -0x8(%rbp), %rax
movq %rax, 0x4a3d(%rip)      # 0xb178
movl -0xc(%rbp), %eax
movl %eax, 0x4bb4(%rip)      # 0xb2f8
movl $0x0, 0x4a32(%rip)      # 0xb180
movl $0x0, 0x4a18(%rip)      # 0xb170
movl $0x0, 0x4a6e(%rip)      # 0xb1d0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x69c0
movq -0x8(%rbp), %rdi
callq 0x69d0
movq 0x485a(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x21c0
movq 0x486b(%rip), %rax      # 0xaff8
movq (%rax), %rdi
callq 0x21c0
cmpl $0x0, 0x4b3c(%rip)      # 0xb2d8
jne 0x67c7
movl $0x1, 0x4a2c(%rip)      # 0xb1d4
leaq 0x4a31(%rip), %rdi      # 0xb1e0
callq 0x2150
cmpl $0x0, %eax
je 0x67c5
movl $0x1, 0x4b61(%rip)      # 0xb324
jmp 0x67da
jmp 0x67c7
leaq 0x4b32(%rip), %rdi      # 0xb300
callq 0x65e0
movq -0x8(%rbp), %rax
callq *0x8(%rax)
movl $0x0, 0x49f0(%rip)      # 0xb1d4
leaq 0x4b25(%rip), %rdi      # 0xb310
callq 0x65e0
cmpl $0x3, 0x4961(%rip)      # 0xb158
jl 0x68ef
movl $0x1, %edi
callq 0x33f0
cmpl $0x0, 0x4972(%rip)      # 0xb180
jne 0x6867
movl $0x4, %edi
leaq 0x1580(%rip), %rsi      # 0x7d9c
movb $0x0, %al
callq 0x3470
leaq 0x157c(%rip), %rdi      # 0x7da6
movb $0x0, %al
callq 0x2100
cmpl $0x0, 0x4ac4(%rip)      # 0xb2fc
je 0x6865
movl $0x1, %edi
callq 0x33f0
leaq 0xbc6(%rip), %rdi       # 0x7411
movb $0x0, %al
callq 0x2100
callq 0x5f90
leaq 0xd78(%rip), %rdi       # 0x75d6
movb $0x0, %al
callq 0x2100
jmp 0x68df
movl $0x5, %edi
leaq 0x1550(%rip), %rsi      # 0x7dc3
movb $0x0, %al
callq 0x3470
cmpl $0x0, 0x4aa3(%rip)      # 0xb324
jne 0x68cf
movl 0x48f7(%rip), %esi      # 0xb180
movl 0x48f1(%rip), %ecx      # 0xb180
leaq 0x7bc(%rip), %rdx       # 0x7052
leaq 0x7a4(%rip), %rax       # 0x7041
cmpl $0x1, %ecx
cmoveq %rax, %rdx
movl 0x48d6(%rip), %edi      # 0xb180
leaq 0xa13(%rip), %rcx       # 0x72c4
leaq 0xa08(%rip), %rax       # 0x72c0
cmpl $0x1, %edi
cmoveq %rax, %rcx
leaq 0x1506(%rip), %rdi      # 0x7dcc
movb $0x0, %al
callq 0x2100
jmp 0x68dd
leaq 0x1511(%rip), %rdi      # 0x7de7
movb $0x0, %al
callq 0x2100
jmp 0x68df
leaq 0xcf0(%rip), %rdi       # 0x75d6
movb $0x0, %al
callq 0x2100
jmp 0x690a
cmpl $0x1, 0x4862(%rip)      # 0xb158
jl 0x6908
cmpl $0x0, 0x4881(%rip)      # 0xb180
jne 0x6908
xorl %edi, %edi
callq 0x32c0
jmp 0x690a
movl 0x4870(%rip), %edx      # 0xb180
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3ba0
xorl %eax, %eax
movl %eax, %edi
movb $0x0, %al
callq 0x3620
movq $0x0, 0x4836(%rip) # 0xb178
movl -0x10(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)