// File: /workspace/github_c_makefile_star2_O0/00pauln00[P]yapio/yapio.c
// Function: yapio_test_context_sequential_setup_for_rank
static void
yapio_test_context_sequential_setup_for_rank(yapio_test_ctx_t *ytc, int rank)
{
    int num_ops = 0;

    /* The local mode test case does not require the 'MDH_OUT' buffers at all.
     */
    enum yapio_test_ctx_mdh_in_out in_out = ytc->ytc_remote_locality ?
        YAPIO_TEST_CTX_MDH_OUT : YAPIO_TEST_CTX_MDH_IN;

    yapio_blk_md_t *md =
        yapio_test_ctx_to_md_array(ytc, in_out, &num_ops);

    if (!md)
        log_msg(YAPIO_LL_FATAL, "ytc_ops_md[%d] is NULL", rank);

    int skips_left = ytc->ytc_sparse_io;
    int i;
    for (i = 0; i < num_ops; i++)
    {
        size_t src_idx = ytc->ytc_backwards ? num_ops - i - 1 : i;

        bool skip_io = skip_io_or_not(num_ops - i, skips_left);

        /* update writer in case of write (which isn't skipped) */
        if (!ytc->ytc_read && !skip_io)
        {
            log_msg(YAPIO_LL_DEBUG, "update writer rank for op #%d\n", i);
            yapio_source_md_update_writer_rank(src_idx, rank);
        }

        md[i] = yapioSourceBlkMd[src_idx];

        if (skip_io)
        {
            log_msg(YAPIO_LL_DEBUG, "skip IO # %d\n", i);
            md[i].ybm_skip_io = 1;
            skips_left--;
        }

        unsigned long x = md[i].ybm_blk_number;
        log_msg(YAPIO_LL_TRACE, "writer_rank=%d md->ybm_blk_number=%zd",
                md[i].ybm_writer_rank, x);
    }
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movl $0x0, 0x68(%rsp)
movq 0x70(%rsp), %rax
movb (%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, 0x64(%rsp)
movq 0x70(%rsp), %rdi
movl 0x64(%rsp), %esi
leaq 0x68(%rsp), %rdx
callq 0x24f0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x95f2
xorl %eax, %eax
cmpl 0x5c73(%rip), %eax      # 0xf210
jg 0x95f0
movq 0x5a3a(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x30(%rsp)
xorl %edi, %edi
callq 0x4890
movq 0x30(%rsp), %rdi
movq %rax, %rdx
movl 0x5ccc(%rip), %r8d      # 0xf290
movl 0x6c(%rsp), %eax
leaq 0x3196(%rip), %rsi      # 0xc765
leaq 0x31b5(%rip), %rcx      # 0xc78b
movl $0x765, %r9d            # imm = 0x765
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2370
movl $0x1, %edi
callq 0x40f0
jmp 0x95f2
movq 0x70(%rsp), %rax
movl 0xa8(%rax), %eax
movl %eax, 0x54(%rsp)
movl $0x0, 0x50(%rsp)
movl 0x50(%rsp), %eax
cmpl 0x68(%rsp), %eax
jge 0x985c
movq 0x70(%rsp), %rax
movb (%rax), %al
shrb %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x963b
movl 0x68(%rsp), %eax
subl 0x50(%rsp), %eax
subl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x9643
movl 0x50(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
cltq
movq %rax, 0x48(%rsp)
movl 0x68(%rsp), %edi
subl 0x50(%rsp), %edi
movl 0x54(%rsp), %esi
callq 0x9870
andb $0x1, %al
movb %al, 0x47(%rsp)
movq 0x70(%rsp), %rax
movb (%rax), %al
shrb $0x3, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x96e5
testb $0x1, 0x47(%rsp)
jne 0x96e5
movl $0x3, %eax
cmpl 0x5b85(%rip), %eax      # 0xf210
jg 0x96d7
movq 0x594c(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x3, %edi
callq 0x4890
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movl 0x5bdb(%rip), %r8d      # 0xf290
movl 0x50(%rsp), %eax
leaq 0x30f8(%rip), %rsi      # 0xc7b8
leaq 0x30c4(%rip), %rcx      # 0xc78b
movl $0x772, %r9d            # imm = 0x772
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2370
movq 0x48(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x98e0
movq 0x58(%rsp), %rax
movslq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x5b63(%rip), %rcx      # 0xf260
movq 0x48(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
testb $0x1, 0x47(%rsp)
je 0x97b4
movl $0x3, %eax
cmpl 0x5ae3(%rip), %eax      # 0xf210
jg 0x9779
movq 0x58aa(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x3, %edi
callq 0x4890
movq 0x18(%rsp), %rdi
movq %rax, %rdx
movl 0x5b39(%rip), %r8d      # 0xf290
movl 0x50(%rsp), %eax
leaq 0x3084(%rip), %rsi      # 0xc7e6
leaq 0x3022(%rip), %rcx      # 0xc78b
movl $0x77a, %r9d            # imm = 0x77A
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2370
movq 0x58(%rsp), %rax
movslq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x8(%rax), %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %rcx
movq %rcx, 0x8(%rax)
movl 0x54(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x54(%rsp)
movq 0x58(%rsp), %rcx
movslq 0x50(%rsp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movabsq $0x3fffffffffffffff, %rax # imm = 0x3FFFFFFFFFFFFFFF
andq 0x8(%rcx), %rax
movq %rax, 0x38(%rsp)
movl $0x4, %eax
cmpl 0x5a2d(%rip), %eax      # 0xf210
jg 0x984a
movq 0x57f4(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movl $0x4, %edi
callq 0x4890
movq 0x10(%rsp), %rdi
movq %rax, %rdx
movl 0x5a83(%rip), %r8d      # 0xf290
movq 0x58(%rsp), %rax
movslq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %r10d
movq 0x38(%rsp), %rax
leaq 0x2fd6(%rip), %rsi      # 0xc803
leaq 0x2f57(%rip), %rcx      # 0xc78b
movl $0x781, %r9d            # imm = 0x781
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2370
jmp 0x984c
movl 0x50(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x50(%rsp)
jmp 0x9609
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)