// File: /workspace/github_c_makefile_star2_O0/00pauln00[P]yapio/yapio.c
// Function: yapio_getopts
static void
yapio_getopts(int argc, char **argv)
{
    int opt;

    yapioExecName = argv[0];

    while ((opt = getopt(argc, argv, YAPIO_OPTS)) != -1)
    {
        switch (opt)
        {
        case 'b':
            yapioBlkSz = strtoull(optarg, NULL, 10);
            break;
        case 'D':
            yapioDecomposeCnt = MIN(atoi(optarg), YAPIO_DECOMPOSE_MAX);
            break;
        case 'd':
            yapioDbgLevel = MIN(atoi(optarg), YAPIO_LL_MAX);
            break;
        case 'h':
            yapio_print_help(YAPIO_EXIT_OK);
            break;
        case 'm':
            yapioSysCallOps = yapio_parse_io_mode(optarg);
            break;
        case 'N':
            yapioVerifyRead = false;
            break;
        case 'n':
            yapioNumBlksPerRank = strtoull(optarg, NULL, 10);
            break;
        case 'P':
            yapioPolluteBlks = true;
            break;
        case 's':
            yapioDisplayStats = true;
            break;
        case 'S':
            yapioUseStoneWalling = true;
            yapioStoneWallNsecs = strtoull(optarg, NULL, 10);
            if (yapioStoneWallNsecs <= 0)
            {
                fprintf(stderr, "Invalid stonewalling value.\n");
                yapio_print_help(YAPIO_EXIT_ERR);
            }
            break;
        case 't':
            if (yapio_parse_test_recipe(optarg))
                yapio_print_help(YAPIO_EXIT_ERR);

            yapioNumTestGroups++;
            break;
        default:
            yapio_print_help(YAPIO_EXIT_ERR);
            break;
        }
    }

    /* Check for user provided test directory parameter which should be at the
     * end.
     */
    yapioTestRootDir = argv[optind];
    if (!yapioTestRootDir || argc > (optind + 1))
        yapio_print_help(YAPIO_EXIT_ERR);

//XXX this check needs to be moved
    if ((yapioNumBlksPerRank * yapioBlkSz) > YAPIO_MAX_SIZE_PER_PE)
        log_msg(YAPIO_LL_FATAL,
                "Per rank data size (%zu) exceeds max (%llu)",
                (yapioNumBlksPerRank * yapioBlkSz), YAPIO_MAX_SIZE_PER_PE);

    if (yapioDecomposeCnt && yapioNumRanks % (1 << yapioDecomposeCnt))
    {
        if (yapio_global_leader_rank())
        {
            log_msg(YAPIO_LL_FATAL,
                    "Decompose count must be greater than and a multiple of"
                    " mpi ranks. %d %d", yapioNumRanks, yapioDecomposeCnt);
        }
        else
        {
            yapio_exit(YAPIO_EXIT_ERR);
        }
    }

    int rc = yapio_test_groups_setup_nranks();
    if (rc)
        yapio_exit(rc);

    if (yapio_global_leader_rank())
    {
        log_msg(YAPIO_LL_DEBUG, "rank=%d num_ranks=%d",
                yapioMyRank, yapioNumRanks);
    }
}

// Assembly:
subq $0x58, %rsp
movl %edi, 0x54(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x20cbec(%rip)    # 0x20f2a8
movl 0x54(%rsp), %edi
movq 0x48(%rsp), %rsi
leaq 0x8d94(%rip), %rdx      # 0xb460
callq 0x20e0
movl %eax, 0x44(%rsp)
cmpl $-0x1, %eax
je 0x28b3
movl 0x44(%rsp), %eax
addl $-0x44, %eax
movl %eax, %ecx
movq %rcx, 0x38(%rsp)
subl $0x30, %eax
ja 0x28a4
movq 0x38(%rsp), %rax
leaq 0x890f(%rip), %rcx      # 0xb010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0xc8b7(%rip), %rax      # 0xefc8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x2320
movq %rax, 0xcaef(%rip)      # 0xf218
jmp 0x28ae
movq 0xc893(%rip), %rax      # 0xefc8
movq (%rax), %rdi
callq 0x2200
cmpl $0x8, %eax
jge 0x2757
movq 0xc87f(%rip), %rax      # 0xefc8
movq (%rax), %rdi
callq 0x2200
movl %eax, 0x34(%rsp)
jmp 0x2762
movl $0x8, %eax
movl %eax, 0x34(%rsp)
jmp 0x2762
movl 0x34(%rsp), %eax
movl %eax, 0x20cb44(%rip)    # 0x20f2b0
jmp 0x28ae
movq 0xc850(%rip), %rax      # 0xefc8
movq (%rax), %rdi
callq 0x2200
cmpl $0x5, %eax
jge 0x279a
movq 0xc83c(%rip), %rax      # 0xefc8
movq (%rax), %rdi
callq 0x2200
movl %eax, 0x30(%rsp)
jmp 0x27a5
movl $0x5, %eax
movl %eax, 0x30(%rsp)
jmp 0x27a5
movl 0x30(%rsp), %eax
movl %eax, 0xca61(%rip)      # 0xf210
jmp 0x28ae
xorl %edi, %edi
callq 0x4910
jmp 0x28ae
movq 0xc801(%rip), %rax      # 0xefc8
movq (%rax), %rdi
callq 0x4970
movq %rax, 0xca32(%rip)      # 0xf208
jmp 0x28ae
movb $0x0, 0xca3e(%rip)      # 0xf220
jmp 0x28ae
movq 0xc7da(%rip), %rax      # 0xefc8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x2320
movq %rax, 0xca22(%rip)      # 0xf228
jmp 0x28ae
movb $0x1, 0x20caa2(%rip)    # 0x20f2b4
jmp 0x28ae
movb $0x1, 0x20ca97(%rip)    # 0x20f2b5
jmp 0x28ae
movb $0x1, 0xca2e(%rip)      # 0xf258
movq 0xc797(%rip), %rax      # 0xefc8
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x2320
movl %eax, 0x20ca70(%rip)    # 0x20f2b8
cmpl $0x0, 0x20ca69(%rip)    # 0x20f2b8
jg 0x2873
movq 0xc788(%rip), %rax      # 0xefe0
movq (%rax), %rdi
leaq 0x8c14(%rip), %rsi      # 0xb476
movb $0x0, %al
callq 0x2370
movl $0x1, %edi
callq 0x4910
jmp 0x28ae
movq 0xc74c(%rip), %rax      # 0xefc8
movq (%rax), %rdi
callq 0x4a50
cmpl $0x0, %eax
je 0x2893
movl $0x1, %edi
callq 0x4910
movl 0x20ca23(%rip), %eax    # 0x20f2bc
addl $0x1, %eax
movl %eax, 0x20ca1a(%rip)    # 0x20f2bc
jmp 0x28ae
movl $0x1, %edi
callq 0x4910
jmp 0x26bc
movq 0x48(%rsp), %rax
movq 0xc6f1(%rip), %rcx      # 0xefb0
movslq (%rcx), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20c9f3(%rip)    # 0x20f2c0
cmpq $0x0, 0x20c9eb(%rip)    # 0x20f2c0
je 0x28eb
movl 0x54(%rsp), %eax
movq 0xc6ce(%rip), %rcx      # 0xefb0
movl (%rcx), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jle 0x28f5
movl $0x1, %edi
callq 0x4910
movq 0xc92c(%rip), %rax      # 0xf228
imulq 0xc914(%rip), %rax      # 0xf218
movabsq $0x10000000000, %rcx    # imm = 0x10000000000
cmpq %rcx, %rax
jbe 0x298b
xorl %eax, %eax
cmpl 0xc8f5(%rip), %eax      # 0xf210
jg 0x2989
movq 0xc6bc(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
xorl %edi, %edi
callq 0x4890
movq 0x28(%rsp), %rdi
movq %rax, %rdx
movl 0xc94e(%rip), %r8d      # 0xf290
movq 0xc8df(%rip), %r10      # 0xf228
imulq 0xc8c7(%rip), %r10      # 0xf218
leaq 0x8b3b(%rip), %rsi      # 0xb493
leaq 0x8b6f(%rip), %rcx      # 0xb4ce
movl $0x44f, %r9d            # imm = 0x44F
movabsq $0x10000000000, %rax    # imm = 0x10000000000
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2370
movl $0x1, %edi
callq 0x40f0
jmp 0x298b
cmpl $0x0, 0x20c91e(%rip)    # 0x20f2b0
je 0x2a3b
movl 0x20c902(%rip), %eax    # 0x20f2a0
movl 0x20c90c(%rip), %ecx    # 0x20f2b0
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x2a3b
callq 0x3720
testb $0x1, %al
jne 0x29c4
jmp 0x2a2f
xorl %eax, %eax
cmpl 0xc844(%rip), %eax      # 0xf210
jg 0x2a2d
movq 0xc60b(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
xorl %edi, %edi
callq 0x4890
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movl 0xc89d(%rip), %r8d      # 0xf290
movl 0x20c8a6(%rip), %r10d   # 0x20f2a0
movl 0x20c8b0(%rip), %eax    # 0x20f2b0
leaq 0x8ad5(%rip), %rsi      # 0xb4dc
leaq 0x8ac0(%rip), %rcx      # 0xb4ce
movl $0x457, %r9d            # imm = 0x457
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x2370
movl $0x1, %edi
callq 0x40f0
jmp 0x2a39
movl $0x1, %edi
callq 0x40f0
jmp 0x2a3b
callq 0x5410
movl %eax, 0x40(%rsp)
cmpl $0x0, 0x40(%rsp)
je 0x2a54
movl 0x40(%rsp), %edi
callq 0x40f0
callq 0x3720
testb $0x1, %al
jne 0x2a5f
jmp 0x2ac6
movl $0x3, %eax
cmpl 0xc7a6(%rip), %eax      # 0xf210
jg 0x2ac4
movq 0xc56d(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x3, %edi
callq 0x4890
movq 0x18(%rsp), %rdi
movq %rax, %rdx
movl 0xc7fc(%rip), %r8d      # 0xf290
movl 0xc7f5(%rip), %r10d     # 0xf290
movl 0x20c7ff(%rip), %eax    # 0x20f2a0
leaq 0x8a8b(%rip), %rsi      # 0xb533
leaq 0x8a1f(%rip), %rcx      # 0xb4ce
movl $0x466, %r9d            # imm = 0x466
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x2370
jmp 0x2ac6
addq $0x58, %rsp
retq
nopl (%rax,%rax)