// File: /workspace/github_c_makefile_star2_O0/00pauln00[P]yapio/yapio.c
// Function: yapio_test_group_mpi_group_init
static int
yapio_test_group_mpi_group_init(int start_rank, yapio_test_group_t *ytg)
{
    MPI_Group group_world;

    ytg->ytg_first_rank = start_rank;

    int rc = MPI_Comm_group(MPI_COMM_WORLD, &group_world);
    if (rc != MPI_SUCCESS)
    {
        log_msg(YAPIO_LL_ERROR, "MPI_Comm_group: %d", rc);
        return rc;
    }

    int *ranks = YAPIO_CALLOC(ytg->ytg_num_ranks, sizeof(int));
    if (!ranks)
        return -errno;

    int i;
    for (i = 0; i < ytg->ytg_num_ranks; i++)
        ranks[i] = start_rank + i;

    rc = MPI_Group_incl(group_world, ytg->ytg_num_ranks, ranks,
                        &ytg->ytg_group);

    YAPIO_FREE(ranks);

    if (rc != MPI_SUCCESS)
    {
        log_msg(YAPIO_LL_ERROR, "MPI_Group_incl: %d", rc);
        rc = -ECOMM;
    }
    else
    {
        rc = MPI_Comm_create(MPI_COMM_WORLD, ytg->ytg_group, &ytg->ytg_comm);
        if (rc != MPI_SUCCESS)
            log_msg(YAPIO_LL_ERROR, "MPI_Comm_create: %d", rc);
    }

    return rc;
}

// Assembly:
subq $0x78, %rsp
movl %edi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl 0x70(%rsp), %ecx
movq 0x68(%rsp), %rax
movl %ecx, 0xb018(%rax)
movq 0x954d(%rip), %rdi      # 0xefd0
leaq 0x60(%rsp), %rsi
callq 0x22e0
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0x5afc
movl $0x1, %eax
cmpl 0x976d(%rip), %eax      # 0xf210
jg 0x5aef
movq 0x9534(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movl $0x1, %edi
callq 0x4890
movq 0x30(%rsp), %rdi
movq %rax, %rdx
movl 0x97c3(%rip), %r8d      # 0xf290
movl 0x5c(%rsp), %eax
leaq 0x6335(%rip), %rsi      # 0xbe0d
leaq 0x6350(%rip), %rcx      # 0xbe2f
movl $0x37c, %r9d            # imm = 0x37C
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2370
movl 0x5c(%rsp), %eax
movl %eax, 0x74(%rsp)
jmp 0x5d6e
movq 0x68(%rsp), %rax
movslq 0xb01c(%rax), %rdi
movl $0x4, %esi
callq 0x22c0
movq %rax, 0x48(%rsp)
movl $0x3, %eax
cmpl 0x96ee(%rip), %eax      # 0xf210
jg 0x5b85
movq 0x94b5(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movl $0x3, %edi
callq 0x4890
movq 0x28(%rsp), %rdi
movq %rax, %rdx
movl 0x9744(%rip), %r8d      # 0xf290
movq 0x48(%rsp), %r10
movq 0x68(%rsp), %rax
movslq 0xb01c(%rax), %rax
shlq $0x2, %rax
leaq 0x62e7(%rip), %rsi      # 0xbe4f
leaq 0x62c0(%rip), %rcx      # 0xbe2f
movl $0x380, %r9d            # imm = 0x380
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x2370
movq 0x48(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x50(%rsp)
jne 0x5bb6
callq 0x2230
movq %rax, %rcx
xorl %eax, %eax
subl (%rcx), %eax
movl %eax, 0x74(%rsp)
jmp 0x5d6e
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movq 0x68(%rsp), %rcx
cmpl 0xb01c(%rcx), %eax
jge 0x5bf1
movl 0x70(%rsp), %edx
addl 0x3c(%rsp), %edx
movq 0x50(%rsp), %rax
movslq 0x3c(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x5bbe
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rax
movl 0xb01c(%rax), %esi
movq 0x50(%rsp), %rdx
movq 0x68(%rsp), %rcx
addq $0x8, %rcx
callq 0x22f0
movl %eax, 0x5c(%rsp)
movq 0x50(%rsp), %rdi
callq 0x2150
movl $0x3, %eax
cmpl 0x95e3(%rip), %eax      # 0xf210
jg 0x5c7b
movq 0x93aa(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movl $0x3, %edi
callq 0x4890
movq 0x20(%rsp), %rdi
movq %rax, %rdx
movl 0x9639(%rip), %r8d      # 0xf290
movq 0x50(%rsp), %rax
leaq 0x6209(%rip), %rsi      # 0xbe6c
leaq 0x61c5(%rip), %rcx      # 0xbe2f
movl $0x38b, %r9d            # imm = 0x38B
movq %rax, (%rsp)
movb $0x0, %al
callq 0x2370
cmpl $0x0, 0x5c(%rsp)
je 0x5ce6
movl $0x1, %eax
cmpl 0x9583(%rip), %eax      # 0xf210
jg 0x5cd9
movq 0x934a(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movl $0x1, %edi
callq 0x4890
movq 0x18(%rsp), %rdi
movq %rax, %rdx
movl 0x95d9(%rip), %r8d      # 0xf290
movl 0x5c(%rsp), %eax
leaq 0x61c2(%rip), %rsi      # 0xbe84
leaq 0x6166(%rip), %rcx      # 0xbe2f
movl $0x38f, %r9d            # imm = 0x38F
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2370
movl $0xffffffba, 0x5c(%rsp) # imm = 0xFFFFFFBA
jmp 0x5d66
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x68(%rsp), %rdx
movq 0x92d5(%rip), %rdi      # 0xefd0
callq 0x21b0
movl %eax, 0x5c(%rsp)
cmpl $0x0, 0x5c(%rsp)
je 0x5d64
movl $0x1, %eax
cmpl 0x94fa(%rip), %eax      # 0xf210
jg 0x5d62
movq 0x92c1(%rip), %rax      # 0xefe0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movl $0x1, %edi
callq 0x4890
movq 0x10(%rsp), %rdi
movq %rax, %rdx
movl 0x9550(%rip), %r8d      # 0xf290
movl 0x5c(%rsp), %eax
leaq 0x615b(%rip), %rsi      # 0xbea6
leaq 0x60dd(%rip), %rcx      # 0xbe2f
movl $0x396, %r9d            # imm = 0x396
movl %eax, (%rsp)
movb $0x0, %al
callq 0x2370
jmp 0x5d64
jmp 0x5d66
movl 0x5c(%rsp), %eax
movl %eax, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw (%rax,%rax)