// File: /workspace/github_c_makefile_star2_O0/jondurbin[P]dre2/src/dre2_parse.c
// Function: dre2_duplicate_group
void dre2_duplicate_group( struct dre2_node **v, int *node_count, int *last_node, struct dre2_parse_return *res, int **minimal )
{
  int i, j, diff;
  int o, c;

  for ( i = res->open; i <= res->close; i++ )
  {
    dre2_duplicate_node( v, node_count, i, minimal );
    ( *minimal )[*node_count - 1] = ( *minimal )[i];
    if ( i != res->open )
    {
      ( *v )[*node_count - 1].p_count = ( *v )[i].p_count;
      ( *v )[*node_count - 1].p = ( int * )malloc( sizeof( int ) * ( *v )[i].p_count );
      for ( j = 0; j < ( *v )[i].p_count; j++ )
      {
        diff = ( *v )[i].p[j] - res->open;
        ( *v )[*node_count - 1].p[j] = *last_node + diff + 1;
      }
    } else
    {
      ( *v )[*node_count - 1].p_count = 1;
      ( *v )[*node_count - 1].p = ( int * )malloc( sizeof( int ) );
      ( *v )[*node_count - 1].p[0] = res->close;
    }

    if ( i != res->close )
    {
      ( *v )[*node_count - 1].n_count = ( *v )[i].n_count;
      ( *v )[*node_count - 1].n = ( int * )malloc( sizeof( int ) * ( *v )[i].n_count );
      for ( j = 0; j < ( *v )[i].n_count; j++ )
      {
        diff = ( *v )[i].n[j] - res->open;
        ( *v )[*node_count - 1].n[j] = *last_node + diff + 1;
      }
    }
  }
  res->open = res->close + 1;
  res->close = *node_count - 1;
  *last_node = res->close;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq %r8, 0x20(%rsp)
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x1c(%rsp)
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jg 0x700d
movq 0x40(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl 0x1c(%rsp), %edx
movq 0x20(%rsp), %rcx
callq 0x2120
movq 0x20(%rsp), %rax
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
movl (%rax,%rcx,4), %edx
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl (%rcx), %eax
je 0x6e5d
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x20(%rax), %ecx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x6, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq 0x20(%rax), %rdi
shlq $0x2, %rdi
callq 0x2280
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
movq 0x40(%rsp), %rcx
movq (%rcx), %rcx
movslq 0x1c(%rsp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
cmpl 0x20(%rcx), %eax
jge 0x6e5b
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq 0x18(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x28(%rsp), %rcx
subl (%rcx), %eax
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %edx
addl 0x14(%rsp), %edx
addl $0x1, %edx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq 0x18(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x6dcd
jmp 0x6ed7
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movl $0x1, 0x20(%rax)
movl $0x4, %edi
callq 0x2280
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq 0x28(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x6, %rdx
addq %rdx, %rax
movq 0x18(%rax), %rax
movl %ecx, (%rax)
movl 0x1c(%rsp), %eax
movq 0x28(%rsp), %rcx
cmpl 0x4(%rcx), %eax
je 0x6ffb
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movl 0x10(%rax), %ecx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x6, %rdx
addq %rdx, %rax
movl %ecx, 0x10(%rax)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movslq 0x10(%rax), %rdi
shlq $0x2, %rdi
callq 0x2280
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x6, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
movq 0x40(%rsp), %rcx
movq (%rcx), %rcx
movslq 0x1c(%rsp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
cmpl 0x10(%rcx), %eax
jge 0x6ff9
movq 0x40(%rsp), %rax
movq (%rax), %rax
movslq 0x1c(%rsp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq 0x18(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq 0x28(%rsp), %rcx
subl (%rcx), %eax
movl %eax, 0x14(%rsp)
movq 0x30(%rsp), %rax
movl (%rax), %edx
addl 0x14(%rsp), %edx
addl $0x1, %edx
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq 0x18(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x6f6b
jmp 0x6ffb
jmp 0x6ffd
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x6ce8
movq 0x28(%rsp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movq 0x28(%rsp), %rax
movl %ecx, (%rax)
movq 0x38(%rsp), %rax
movl (%rax), %ecx
subl $0x1, %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x28(%rsp), %rax
movl 0x4(%rax), %ecx
movq 0x30(%rsp), %rax
movl %ecx, (%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)