// File: /workspace/github_c_makefile_star2_O0/00pauln00[P]yapio/yapio.c
// Function: yapio_test_context_setup_local
static int
yapio_test_context_setup_local(yapio_test_ctx_t *ytc)
{
    if (ytc->ytc_remote_locality)
    {
        return -EINVAL;
    }
    else if (ytc->ytc_io_pattern == YAPIO_IOP_STRIDED)
    {
        return -ENOTSUP;
    }
    else if (ytc->ytc_io_pattern != YAPIO_IOP_SEQUENTIAL &&
             ytc->ytc_io_pattern != YAPIO_IOP_RANDOM)
    {

        log_msg(YAPIO_LL_WARN, "unknown io_pattern=%d", ytc->ytc_io_pattern);
        return -EBADRQC;
    }

    yapio_test_group_t *ytg = ytc->ytc_group;

    /* In this mode all operation instructions are pulled from the local
     * Source Blk Metadata - there is no exchange with other ranks.
     */
    yapio_blk_md_t *md =
        yapio_test_context_alloc(ytc, YAPIO_TEST_CTX_MDH_IN,
                                 ytg->ytg_num_blks_per_rank);
    if (!md)
        return -errno;

    int rc = 0;

    if (ytc->ytc_io_pattern == YAPIO_IOP_SEQUENTIAL)
        yapio_test_context_sequential_setup_for_rank(ytc, yapioMyRank -
                                                     ytg->ytg_first_rank);

    else if (ytc->ytc_io_pattern == YAPIO_IOP_RANDOM)
    {
        rc = yapio_blk_md_randomize(yapioSourceBlkMd, md,
                                    ytg->ytg_num_blks_per_rank, true);

        select_holes(ytg->ytg_num_blks_per_rank, ytc->ytc_sparse_io, md);
    }

    return rc;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
movb (%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x87ea
movl $0xffffffea, 0x34(%rsp) # imm = 0xFFFFFFEA
jmp 0x895d
movq 0x28(%rsp), %rax
cmpl $0x2, 0xc(%rax)
jne 0x8802
movl $0xffffffa1, 0x34(%rsp) # imm = 0xFFFFFFA1
jmp 0x895d
movq 0x28(%rsp), %rax
cmpl $0x0, 0xc(%rax)
je 0x8880
movq 0x28(%rsp), %rax
cmpl $0x1, 0xc(%rax)
je 0x8880
movl $0x2, %eax
cmpl 0x69ed(%rip), %eax      # 0xf210
jg 0x8873
movq 0x67b4(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movl $0x2, %edi
callq 0x4890
movq 0x8(%rsp), %rdi
movq %rax, %rdx
movl 0x6a43(%rip), %r8d      # 0xf290
movq 0x28(%rsp), %rax
movl 0xc(%rax), %eax
leaq 0x3e2d(%rip), %rsi      # 0xc689
leaq 0x41df(%rip), %rcx      # 0xca42
movl $0x7c7, %r9d            # imm = 0x7C7
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2370
movl $0xffffffc8, 0x34(%rsp) # imm = 0xFFFFFFC8
jmp 0x895d
jmp 0x8882
jmp 0x8884
movq 0x28(%rsp), %rax
movq 0xa0(%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movq 0xb020(%rax), %rdx
xorl %esi, %esi
callq 0x9430
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x88cf
callq 0x2230
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, 0x34(%rsp)
jmp 0x895d
movl $0x0, 0x14(%rsp)
movq 0x28(%rsp), %rax
cmpl $0x0, 0xc(%rax)
jne 0x88ff
movq 0x28(%rsp), %rdi
movl 0x69a3(%rip), %esi      # 0xf290
movq 0x20(%rsp), %rax
subl 0xb018(%rax), %esi
callq 0x9540
jmp 0x8955
movq 0x28(%rsp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x8953
movq 0x694f(%rip), %rdi      # 0xf260
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rax
movq 0xb020(%rax), %rdx
movl $0x1, %ecx
callq 0x9a20
movl %eax, 0x14(%rsp)
movq 0x20(%rsp), %rax
movq 0xb020(%rax), %rax
movl %eax, %edi
movq 0x28(%rsp), %rax
movl 0xa8(%rax), %esi
movq 0x18(%rsp), %rdx
callq 0x9e40
jmp 0x8955
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)