// File: /workspace/github_c_makefile_star2_O0/00pauln00[P]yapio/yapio.c
// Function: yapio_verify_test_contexts
static void
yapio_verify_test_contexts(yapio_test_group_t *ytg)
{
    if (!ytg->ytg_num_contexts)
    {
        log_msg(YAPIO_LL_DEBUG, "Using default tests");
        /* Perform the default test - local write followed by local read.
         */
        ytg->ytg_num_contexts = 2;
        yapio_test_ctx_t *ytc_write = &ytg->ytg_contexts[0];
        yapio_test_ctx_t *ytc_read  = &ytg->ytg_contexts[1];;

        ytc_write->ytc_io_pattern = ytc_read->ytc_io_pattern =
            YAPIO_IOP_SEQUENTIAL;

        ytc_read->ytc_read = 1;
    }

    int i;
    for (i = 0; i < ytg->ytg_num_contexts; i++)
    {
        yapio_test_ctx_t *ytc = &ytg->ytg_contexts[i];

        if (!ytc->ytc_read)
            ytg->ytg_last_writer_ctx = i;

        if (!i && ytc->ytc_read && !ytg->ytg_restart_from_previous_job)
        {
            if (yapio_leader_rank())
            {
                log_msg(YAPIO_LL_FATAL,
                        "Read test may not occur first unless restarting from"
                        " a previous job.");
            }
            else
            {
                yapio_exit(-EINVAL);
            }
        }

        if ((ytc->ytc_io_pattern == YAPIO_IOP_RANDOM ||
             ytc->ytc_io_pattern == YAPIO_IOP_STRIDED) &&
            ytg->ytg_num_blks_per_rank % ytg->ytg_num_ranks)
        {
            if (yapio_leader_rank())
            {
                log_msg(YAPIO_LL_FATAL,
                        "random and strided tests require BlksPerRank (%zu) "
                        "to be a multiple of NumRanks (%d)",
                        ytg->ytg_num_blks_per_rank, ytg->ytg_num_ranks);
            }
            else
            {
                yapio_exit(-EINVAL);
            }
        }
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpl $0x0, 0xb010(%rax)
jne 0x2ca3
movl $0x3, %eax
cmpl 0xc60a(%rip), %eax      # 0xf210
jg 0x2c4b
movq 0xc3d1(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movl $0x3, %edi
callq 0x4890
movq 0x28(%rsp), %rdi
movq %rax, %rdx
movl 0xc660(%rip), %r8d      # 0xf290
leaq 0x92e3(%rip), %rsi      # 0xbf1a
leaq 0x92ff(%rip), %rcx      # 0xbf3d
movl $0x8e1, %r9d            # imm = 0x8E1
movb $0x0, %al
callq 0x2370
movq 0x50(%rsp), %rax
movl $0x2, 0xb010(%rax)
movq 0x50(%rsp), %rax
addq $0x10, %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
addq $0x10, %rax
addq $0xb0, %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x48(%rsp), %rax
movl $0x0, 0xc(%rax)
movq 0x40(%rsp), %rax
movb (%rax), %cl
andb $-0x9, %cl
orb $0x8, %cl
movb %cl, (%rax)
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movq 0x50(%rsp), %rcx
cmpl 0xb010(%rcx), %eax
jge 0x2e79
movq 0x50(%rsp), %rax
addq $0x10, %rax
movslq 0x3c(%rsp), %rcx
imulq $0xb0, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movb (%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x2d00
movl 0x3c(%rsp), %ecx
movq 0x50(%rsp), %rax
movl %ecx, 0xb034(%rax)
cmpl $0x0, 0x3c(%rsp)
jne 0x2d9a
movq 0x30(%rsp), %rax
movb (%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x2d9a
movq 0x50(%rsp), %rax
testb $0x1, 0xb033(%rax)
jne 0x2d9a
callq 0x5910
testb $0x1, %al
jne 0x2d38
jmp 0x2d8e
xorl %eax, %eax
cmpl 0xc4d0(%rip), %eax      # 0xf210
jg 0x2d8c
movq 0xc297(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
xorl %edi, %edi
callq 0x4890
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movl 0xc529(%rip), %r8d      # 0xf290
leaq 0x91ea(%rip), %rsi      # 0xbf58
leaq 0x91c8(%rip), %rcx      # 0xbf3d
movl $0x8fc, %r9d            # imm = 0x8FC
movb $0x0, %al
callq 0x2370
movl $0x1, %edi
callq 0x40f0
jmp 0x2d98
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
callq 0x40f0
jmp 0x2d9a
movq 0x30(%rsp), %rax
cmpl $0x1, 0xc(%rax)
je 0x2db4
movq 0x30(%rsp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x2e67
movq 0x50(%rsp), %rax
movq 0xb020(%rax), %rax
movq 0x50(%rsp), %rcx
movslq 0xb01c(%rcx), %rcx
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
je 0x2e67
callq 0x5910
testb $0x1, %al
jne 0x2de6
jmp 0x2e5b
xorl %eax, %eax
cmpl 0xc422(%rip), %eax      # 0xf210
jg 0x2e59
movq 0xc1e9(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
xorl %edi, %edi
callq 0x4890
movq 0x18(%rsp), %rdi
movq %rax, %rdx
movl 0xc47b(%rip), %r8d      # 0xf290
movq 0x50(%rsp), %rax
movq 0xb020(%rax), %r10
movq 0x50(%rsp), %rax
movl 0xb01c(%rax), %eax
leaq 0x9179(%rip), %rsi      # 0xbfac
leaq 0x9103(%rip), %rcx      # 0xbf3d
movl $0x90d, %r9d            # imm = 0x90D
movq %r10, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x2370
movl $0x1, %edi
callq 0x40f0
jmp 0x2e65
movl $0xffffffea, %edi       # imm = 0xFFFFFFEA
callq 0x40f0
jmp 0x2e67
jmp 0x2e69
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x2cab
addq $0x58, %rsp
retq
nop