LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/afinit[P]afin/extension.cpp
// Function: Extension::bp_count()
void Extension::bp_count(){
  for( int i=0; i<len; i++ ){
    // initialize temporary vector 
    vector<int> ATCG_curr = { 0,0,0,0,0 };
    int next_char = 0;

    // loop through matches to get count of each nucleotide present at the current position
    for( int j=0; j<matches.get_matchlist_size(); j++ ){
      next_char = matches.get_pos( j, start+(pos_mult*i) );

      if ( next_char == 'A' ) {
        ATCG_curr[0]++;
      }
      else if ( next_char == 'T' ) {
        ATCG_curr[1]++;
      }
      else if ( next_char == 'C' ) {
        ATCG_curr[2]++;
      }
      else if ( next_char == 'G' ) {
        ATCG_curr[3]++;
      }
    }

    // determine maximum number of any nucleotide 
    for( int j=0; j<4; j++ ){
      if( ATCG_curr[j] > ATCG_curr[4] ){
        ATCG_curr[4] = ATCG_curr[j];
      }
    }

    // check coverage level and break if below min
    if( ATCG_curr[4] < min_cov ){
      len = i;
      break;
    }

    // initialize next bp to 0 for each nucleotide
    ATCG.push_back( ATCG_curr );
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0x50(%rdi), %rax
movq %rax, -0x50(%rbp)
xorl %r12d, %r12d
leaq -0x48(%rbp), %r15
cmpl 0xcc(%rbx), %r12d
jge 0xf6d7
xorps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
andl $0x0, -0x60(%rbp)
movq %r15, %rdi
leaq -0x70(%rbp), %rsi
pushq $0x5
popq %rdx
leaq -0x29(%rbp), %rcx
callq 0xfc24
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0xb3dc
cmpq %r13, %rax
jbe 0xf67c
movl 0xc8(%rbx), %edx
imull %r12d, %edx
addl 0x80(%rbx), %edx
movq %rbx, %rdi
movl %r13d, %esi
callq 0xb3fa
cmpb $0x54, %al
je 0xf66d
movzbl %al, %eax
cmpl $0x43, %eax
je 0xf659
cmpl $0x47, %eax
je 0xf663
cmpl $0x41, %eax
jne 0xf677
movq -0x48(%rbp), %rax
jmp 0xf675
movq -0x48(%rbp), %rax
addq $0x8, %rax
jmp 0xf675
movq -0x48(%rbp), %rax
addq $0xc, %rax
jmp 0xf675
movq -0x48(%rbp), %rax
addq $0x4, %rax
incl (%rax)
incq %r13
jmp 0xf615
movq -0x48(%rbp), %rax
movl 0x10(%rax), %r13d
xorl %ecx, %ecx
cmpq $0x4, %rcx
je 0xf69f
movl (%rax,%rcx,4), %edx
cmpl %r13d, %edx
jle 0xf69a
movl %edx, 0x10(%rax)
movl %edx, %r13d
incq %rcx
jmp 0xf686
leaq 0xbf82(%rip), %rax      # 0x1b628
movl (%rax), %r14d
cmpl %r14d, %r13d
jge 0xf6b7
movl %r12d, 0xcc(%rbx)
jmp 0xf6c3
movq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0xfc5a
movq %r15, %rdi
callq 0x5b30
incl %r12d
cmpl %r14d, %r13d
jge 0xf5e7
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf6e8
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x5b30
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/afinit[P]afin/extension.cpp
// Function: Extension::missed_count()
void Extension::missed_count(){
  for( int i=0; i<len; i++ ){
    int next_char = 0;
    for( int j=0; j<matches.get_matchlist_size(); j++ ){
      next_char = matches.get_pos( j, start+(pos_mult*i) );
      switch( next_char ){
        case 'A':
          if( ATCG[i][0] < ATCG[i][4] ){
            missed_bp[j]++;
            missed_bp_tot++;
          }
          break;
        case 'T':
          if( ATCG[i][1] < ATCG[i][4] ){
            missed_bp[j]++;
            missed_bp_tot++;
          }
          break;
        case 'C':
          if( ATCG[i][2] < ATCG[i][4] ){
            missed_bp[j]++;
            missed_bp_tot++;
          }
          break;
        case 'G':
          if( ATCG[i][3] < ATCG[i][4] ){
            missed_bp[j]++;
            missed_bp_tot++;
          }
          break;
        default:
          break;
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r15d, %r15d
movslq 0xcc(%rbx), %rax
cmpq %rax, %r15
jge 0xf7b6
imulq $0x18, %r15, %r12
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0xb3dc
cmpq %r14, %rax
jbe 0xf7ae
movl 0xc8(%rbx), %edx
imull %r15d, %edx
addl 0x80(%rbx), %edx
movq %rbx, %rdi
movl %r14d, %esi
callq 0xb3fa
cmpb $0x54, %al
je 0xf788
movzbl %al, %eax
cmpl $0x43, %eax
je 0xf76e
cmpl $0x47, %eax
je 0xf77b
cmpl $0x41, %eax
jne 0xf7a6
movq 0x50(%rbx), %rax
movq (%rax,%r12), %rax
movl (%rax), %ecx
jmp 0xf793
movq 0x50(%rbx), %rax
movq (%rax,%r12), %rax
movl 0x8(%rax), %ecx
jmp 0xf793
movq 0x50(%rbx), %rax
movq (%rax,%r12), %rax
movl 0xc(%rax), %ecx
jmp 0xf793
movq 0x50(%rbx), %rax
movq (%rax,%r12), %rax
movl 0x4(%rax), %ecx
cmpl 0x10(%rax), %ecx
jge 0xf7a6
movq 0x68(%rbx), %rax
incl (%rax,%r14,4)
incl 0xd0(%rbx)
incq %r14
jmp 0xf724
incq %r15
jmp 0xf70d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/afinit[P]afin/extension.cpp
// Function: Extension::error_removal()
bool Extension::error_removal(){
  int start_size = (int)matches.get_matchlist_size();
  for( int i=0; i<missed_bp.size(); i++ ){
    if( missed_bp[i] > missed_bp_avg ){
      matches.remove_match( i );
      missed_bp.erase( missed_bp.begin() + i );
      i--;
    }
  }
  if( start_size > 5 && matches.get_matchlist_size() < start_size * stop_ext ){
    return false;
  }
  
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0xb3dc
movq %rax, %rbx
leaq 0x68(%r14), %r15
xorl %eax, %eax
movslq %eax, %r12
movq 0x68(%r14), %rcx
movq 0x70(%r14), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r12, %rdx
jbe 0xf827
movl (%rcx,%r12,4), %ecx
cmpl 0xd4(%r14), %ecx
jle 0xf823
movq %r14, %rdi
movl %r12d, %esi
callq 0xba9e
movq %r12, %rsi
shlq $0x2, %rsi
addq 0x68(%r14), %rsi
movq %r15, %rdi
callq 0xaeae
leal -0x1(%r12), %eax
incl %eax
jmp 0xf7dc
cmpl $0x5, %ebx
jle 0xf86e
movq %r14, %rdi
callq 0xb3dc
movq %rax, %xmm0
punpckldq 0x38af(%rip), %xmm0 # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x38b7(%rip), %xmm0     # 0x13100
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
cvtsi2sd %ebx, %xmm0
leaq 0xbde0(%rip), %rax      # 0x1b640
mulsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xf86e
xorl %eax, %eax
jmp 0xf870
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/afinit[P]afin/contiglist.cpp
// Function: Contiglist::parse_ids()
void Contiglist::parse_ids(){
  for( int i=0; i<contigs.size(); i++ ){
    string contig_id = contigs[i].get_contig_id(); 
    size_t pos = contig_id.find( "_", 5, 1 );

    if( pos != string::npos ){
      contig_id = contig_id.substr( 0, pos );
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
leaq -0x48(%rbp), %r14
leaq -0x68(%rbp), %r15
xorl %r13d, %r13d
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rax
subq %rsi, %rax
cqto
pushq $0x50
popq %rcx
idivq %rcx
cmpq %r13, %rax
jbe 0x108c4
addq %r12, %rsi
movq %r14, %rdi
callq 0x5550
movq %r14, %rdi
leaq 0x2894(%rip), %rsi      # 0x13113
pushq $0x5
popq %rdx
pushq $0x1
popq %rcx
callq 0x4580
cmpq $-0x1, %rax
je 0x108b3
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x4330
movq %r14, %rdi
movq %r15, %rsi
callq 0x4390
movq %r15, %rdi
callq 0x4160
movq %r14, %rdi
callq 0x4160
incq %r13
addq $0x50, %r12
jmp 0x10852
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x4160
movq %rbx, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O2/afinit[P]afin/contiglist.cpp
// Function: Contiglist::output_contigs(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Contiglist::output_contigs( int list_num, string file, string id_suffix ){
  vector<Contig> clist = contigs;  

  cout << "output_contigs" << endl;
  if( list_num )
    clist = contigs_fused;
  
  // open outfile
  ofstream outfile_fp( file+".fa");

  // print out each line to the
  for( int i=0; i<clist.size(); i++ ){
    string seq = clist[i].get_sequence();
    outfile_fp << ">" << "contig" << i << "_len_" << seq.length() << "_" << id_suffix << endl;
    outfile_fp << seq << endl;
  }

  outfile_fp.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %r12d
movq %rdi, %r15
leaq 0x8(%rdi), %rsi
leaq -0x40(%rbp), %rdi
callq 0x10caa
movq 0xa6a4(%rip), %rdi      # 0x1afc0
leaq 0x2d9b(%rip), %rsi      # 0x136be
callq 0x4310
movq %rax, %rdi
callq 0x4180
testl %r12d, %r12d
je 0x10945
addq $0x20, %r15
leaq -0x40(%rbp), %rdi
movq %r15, %rsi
callq 0x10d04
leaq 0x2d81(%rip), %rdx      # 0x136cd
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
callq 0x6fc3
leaq -0x260(%rbp), %rdi
leaq -0x60(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x4610
leaq -0x60(%rbp), %r14
movq %r14, %rdi
callq 0x4160
xorl %r13d, %r13d
leaq -0x260(%rbp), %r12
xorl %r15d, %r15d
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rax
subq %rsi, %rax
cqto
pushq $0x50
popq %rcx
idivq %rcx
cmpq %r15, %rax
jbe 0x10a38
addq %r13, %rsi
movq %r14, %rdi
callq 0x5534
movq %r12, %rdi
leaq 0x2d1c(%rip), %rsi      # 0x136d1
callq 0x4310
movq %rax, %rdi
leaq 0x2d0f(%rip), %rsi      # 0x136d3
callq 0x4310
movq %rax, %rdi
movl %r15d, %esi
callq 0x4570
movq %rax, %rdi
leaq 0x2cfc(%rip), %rsi      # 0x136da
callq 0x4310
movq -0x58(%rbp), %rsi
movq %rax, %rdi
callq 0x4210
movq %rax, %rdi
leaq 0x271a(%rip), %rsi      # 0x13113
callq 0x4310
movq %rax, %rdi
movq %rbx, %rsi
callq 0x42c0
movq %rax, %rdi
callq 0x4180
movq %r12, %rdi
movq %r14, %rsi
callq 0x42c0
movq %rax, %rdi
callq 0x4180
movq %r14, %rdi
callq 0x4160
incq %r15
addq $0x50, %r13
jmp 0x10984
leaq -0x260(%rbp), %rdi
callq 0x4440
leaq -0x260(%rbp), %rdi
callq 0x4490
leaq -0x40(%rbp), %rdi
callq 0x73f0
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x10a82
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4160
jmp 0x10a9f
jmp 0x10a7d
movq %rax, %rbx
jmp 0x10a9f
movq %rax, %rbx
jmp 0x10a93
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x4160
leaq -0x260(%rbp), %rdi
callq 0x4490
leaq -0x40(%rbp), %rdi
callq 0x73f0
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/afinit[P]afin/contiglist.cpp
// Function: Contiglist::create_final_fasta()
void Contiglist::create_final_fasta(){
  // remove directories from outfile to form id_suffix if necessary
  size_t id_suffix_pos = outfile.find_last_of( "/" );
  string id_suffix = outfile;
  if( id_suffix_pos != string::npos ){
    id_suffix = id_suffix.substr( id_suffix_pos + 1 );
  }

  cout << "create_final_fasta" << endl;
  // print completed contigs to file
  output_contigs( 0, outfile, id_suffix );

  if( print_fused ){
    output_contigs( 1, outfile+"_fused", id_suffix );
  }

  if( log_output || screen_output ){
    Log::Inst()->close_log();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
leaq 0x2c12(%rip), %rsi      # 0x136e0
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x4300
movq %rax, %r15
leaq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x4410
cmpq $-0x1, %r15
je 0x10b22
incq %r15
leaq -0xd8(%rbp), %rdi
leaq -0x38(%rbp), %rsi
pushq $-0x1
popq %rcx
movq %r15, %rdx
callq 0x4330
leaq -0x38(%rbp), %rdi
leaq -0xd8(%rbp), %r15
movq %r15, %rsi
callq 0x4390
movq %r15, %rdi
callq 0x4160
movq 0xa497(%rip), %rdi      # 0x1afc0
leaq 0x2bb2(%rip), %rsi      # 0x136e2
callq 0x4310
movq %rax, %rdi
callq 0x4180
leaq -0xb8(%rbp), %rdi
movq %r14, %rsi
callq 0x4410
leaq -0x98(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4410
leaq -0xb8(%rbp), %rdx
leaq -0x98(%rbp), %rcx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x108e8
leaq -0x98(%rbp), %rdi
callq 0x4160
leaq -0xb8(%rbp), %rdi
callq 0x4160
leaq 0xaab9(%rip), %rax      # 0x1b64c
cmpl $0x0, (%rax)
je 0x10bdd
leaq 0x1e1e(%rip), %rdx      # 0x129bd
leaq -0x78(%rbp), %rdi
movq %r14, %rsi
callq 0x6fc3
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x4410
pushq $0x1
popq %rsi
leaq -0x78(%rbp), %rdx
leaq -0x58(%rbp), %rcx
movq %rbx, %rdi
callq 0x108e8
leaq -0x58(%rbp), %rdi
callq 0x4160
leaq -0x78(%rbp), %rdi
callq 0x4160
leaq 0xaa70(%rip), %rax      # 0x1b654
leaq 0xaa65(%rip), %rcx      # 0x1b650
movl (%rcx), %ecx
orl (%rax), %ecx
je 0x10bfe
callq 0x81fe
movq %rax, %rdi
callq 0x82a4
leaq -0x38(%rbp), %rdi
callq 0x4160
addq $0xc8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x4160
jmp 0x10c26
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
jmp 0x10c49
jmp 0x10c50
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0x4160
jmp 0x10c42
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x4160
jmp 0x10c53
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x4160
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network.cpp
// Function: Network::init(int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>> const&, bool, int)
void Network::init(int n, const ipvec& edges, bool virtual_parent, int side_connectivity) {
    // if side_connectivity is positive, that many side_links are made for each edge
    // otherwise in_links are used.
    int vparent = -1;
    depthwise.resize(1);
    if(virtual_parent) {
        vparent = 0;
        make_new_vertices(1, -1);
        depthwise[0].push_back(0);
    }
    int ufirst = vparent + 1;
    int uend = ufirst + n;
    make_new_vertices(n, vparent);
    for(int i=ufirst; i<uend; ++i) {
        depthwise[0].push_back(i);
    }

    for(const iipair& p: edges) {
        int u = ufirst + p.first, v = ufirst + p.second;
        if(side_connectivity > 0) {
            for(int i=0; i<side_connectivity; ++i) {
                add_side_edge(u, v);
            }
        }
        else {
            add_in_edge(u, v);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x10(%rsp)
movl %ecx, %ebp
movq %rdx, 0x8(%rsp)
movl %esi, %r15d
movq %rdi, %r14
leaq 0xa8(%rdi), %r12
pushq $0x1
popq %rsi
movq %r12, %rdi
callq 0x32f0
testl %ebp, %ebp
je 0x24d8
pushq $0x1
popq %rsi
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x257a
movq 0xa8(%r14), %rdi
leaq 0x14(%rsp), %rsi
andl $0x0, (%rsi)
callq 0x37be
xorl %edx, %edx
jmp 0x24db
pushq $-0x1
popq %rdx
leal 0x1(%rdx), %r13d
leal (%rdx,%r15), %ebx
incl %ebx
movq %r14, %rdi
movl %r15d, %esi
callq 0x257a
leaq 0x4(%rsp), %r15
movl %r13d, %eax
movl %eax, 0x4(%rsp)
cmpl %ebx, %eax
jge 0x2514
movq (%r12), %rdi
movq %r15, %rsi
callq 0x3326
movl 0x4(%rsp), %eax
incl %eax
jmp 0x24f8
movq 0x8(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq 0x8(%rsp), %r12
movl 0x10(%rsp), %ebx
je 0x256a
movl (%r12), %ebp
addl %r13d, %ebp
movl 0x4(%r12), %r15d
addl %r13d, %r15d
testl %ebx, %ebx
jg 0x255f
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x267e
jmp 0x2564
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
callq 0x264c
subl $0x1, %ebx
jae 0x2552
addq $0x8, %r12
jmp 0x2525
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network.cpp
// Function: Network::make_new_vertices(int, int)
int Network::make_new_vertices(int k, int _nid) {
    // insert k new physical nodes in the network whose network id is _nid
    // doesn't fill 'depthwise'
    int u = size();
    int uend = u+k;
    nid.resize(uend, _nid);
    netsize.resize(uend, 0);
    if(_nid >= 0) {
        netsize[_nid] += k;
        depth.resize(uend, depth[_nid]);
    }
    else {
        depth.resize(uend, 0);
    }

    in_nbrs.resize(uend);
    side_nbrs.resize(uend);
    up_nbrs.resize(uend);
    down_nbrs.resize(uend);
    return u;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r12d
movq %rdi, %rbx
leaq 0xc(%rsp), %r13
movl %edx, (%r13)
movq 0x20(%rdi), %r14
subq 0x18(%rdi), %r14
leaq 0x18(%rdi), %rbp
shrq $0x2, %r14
leal (%r14,%r12), %eax
movslq %eax, %r15
movq %r15, %rsi
movq %r13, %rdx
callq 0x339a
leaq 0x14(%rsp), %rdx
andl $0x0, (%rdx)
movq %rbp, %rdi
movq %r15, %rsi
callq 0x339a
movslq (%r13), %rax
testq %rax, %rax
js 0x25f0
movq 0x18(%rbx), %rcx
addl %r12d, (%rcx,%rax,4)
leaq 0x30(%rbx), %rdi
movslq 0xc(%rsp), %rdx
shlq $0x2, %rdx
addq 0x30(%rbx), %rdx
jmp 0x25fc
leaq 0x30(%rbx), %rdi
leaq 0x10(%rsp), %rdx
andl $0x0, (%rdx)
movq %r15, %rsi
callq 0x339a
leaq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x32f0
leaq 0x60(%rbx), %rdi
movq %r15, %rsi
callq 0x32f0
leaq 0x78(%rbx), %rdi
movq %r15, %rsi
callq 0x32f0
addq $0x90, %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x32f0
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network.cpp
// Function: Network::add_upward_edge(int, int)
void Network::add_upward_edge(int u, int v) {
    insert(up_nbrs[u], v);
    insert(down_nbrs[v], u);
    if(is_virtual(v)) {
        fprintf(stderr, "virtual node %d got a child %d\n", v, u);
    }
    if(depth[u] != depth[v] + 1) {
        fprintf(stderr, "Depth of lower node %d is %d, depth of upper node %d is %d\n",
            u, depth[u], v, depth[v]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r15
movslq %esi, %r14
imulq $0x18, %r14, %rdi
addq 0x78(%r15), %rdi
movl %edx, %esi
callq 0x26af
movslq %ebx, %r12
imulq $0x18, %r12, %rdi
addq 0x90(%r15), %rdi
movl %r14d, %esi
callq 0x26af
movq 0x18(%r15), %rax
cmpl $0x0, (%rax,%r12,4)
jg 0x2721
movq 0x30(%r15), %rax
movl (%rax,%r14,4), %ecx
movl (%rax,%r12,4), %r9d
leal 0x1(%r9), %eax
cmpl %eax, %ecx
jne 0x273f
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xe8a8(%rip), %rax      # 0x10fd0
movq (%rax), %rdi
leaq 0x88d2(%rip), %rsi      # 0xb004
movl %ebx, %edx
movl %ebp, %ecx
xorl %eax, %eax
callq 0x2180
jmp 0x2704
movq 0xe88a(%rip), %rax      # 0x10fd0
movq (%rax), %rdi
leaq 0x88d4(%rip), %rsi      # 0xb024
movl %ebp, %edx
movl %ebx, %r8d
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2180
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network.cpp
// Function: Network::num_edges() const
int Network::num_edges() const {
    // returns the number of edges between physical nodes
    int m = 0;
    for(int u=0; u<size(); ++u) {
        if(netsize[u] == 0) {
            m += degree(u);
        }
    }
    if(m % 2 != 0) {
        fprintf(stderr, "Degree sum is odd.\n");
    }
    return m / 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %ebx, %ebx
movq 0x18(%r14), %rax
movq 0x20(%r14), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r15
jge 0x27bd
cmpl $0x0, (%rax,%r15,4)
jne 0x27b8
movq %r14, %rdi
movl %r15d, %esi
callq 0x3344
addl %eax, %ebx
incq %r15
jmp 0x278d
testb $0x1, %bl
jne 0x27d0
pushq $0x2
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
popq %rbx
popq %r14
popq %r15
retq
movq 0xe7f9(%rip), %rax      # 0x10fd0
movq (%rax), %rcx
leaq 0x887f(%rip), %rdi      # 0xb060
pushq $0x13
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
jmp 0x27c2
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network.cpp
// Function: Network::edge_list() const
ipvec Network::edge_list() const {
    ipvec l;
    for(int u=0; u<size(); ++u) {
        if(!is_virtual(u)) {
            for(int v: in_nbrs[u]) {if(v > u) {l.push_back(iipair(u, v));}}
            for(int v: side_nbrs[u]) {if(v > u) {l.push_back(iipair(u, v));}}
            for(int v: up_nbrs[u]) {if(v > u) {l.push_back(iipair(u, v));}}
            for(int v: down_nbrs[u]) {if(v > u) {l.push_back(iipair(u, v));}}
        }
    }
    return l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
movq 0x10(%rsp), %rcx
movq 0x18(%rcx), %rax
movq 0x20(%rcx), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r12
jge 0x2936
cmpl $0x0, (%rax,%r12,4)
jle 0x2843
incq %r12
jmp 0x2817
movq 0x10(%rsp), %rax
movq 0x48(%rax), %rax
imulq $0x18, %r12, %r13
movq (%rax,%r13), %rbp
movq 0x8(%rax,%r13), %r14
cmpq %r14, %rbp
je 0x2881
movslq (%rbp), %rax
cmpq %rax, %r12
jge 0x287b
movl %r12d, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3af0
addq $0x4, %rbp
jmp 0x2859
movq 0x10(%rsp), %rax
movq 0x60(%rax), %rax
movq (%rax,%r13), %rbp
movq 0x8(%rax,%r13), %r14
cmpq %r14, %rbp
je 0x28bb
movslq (%rbp), %rax
cmpq %rax, %r12
jge 0x28b5
movl %r12d, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3af0
addq $0x4, %rbp
jmp 0x2893
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rax
movq (%rax,%r13), %rbp
movq 0x8(%rax,%r13), %r14
cmpq %r14, %rbp
je 0x28f5
movslq (%rbp), %rax
cmpq %rax, %r12
jge 0x28ef
movl %r12d, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3af0
addq $0x4, %rbp
jmp 0x28cd
movq 0x10(%rsp), %rax
movq 0x90(%rax), %rax
movq (%rax,%r13), %rbp
movq 0x8(%rax,%r13), %r14
cmpq %r14, %rbp
je 0x283e
movslq (%rbp), %rax
cmpq %rax, %r12
jge 0x2930
movl %r12d, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3af0
addq $0x4, %rbp
jmp 0x290a
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x294e
jmp 0x294e
jmp 0x294e
movq %rax, %r14
movq %rbx, %rdi
callq 0x366e
movq %r14, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network.cpp
// Function: Network::print(std::ostream&) const
void Network::print(ostream& os) const {
    os << "Network"
        << "(\n        nid = " << nid
        << ",\n    netsize = " << netsize
        << "(\n      depth = " << depth
        << ",\n    in_nbrs = " << in_nbrs
        << ",\n  side_nbrs = " << side_nbrs
        << ",\n    up_nbrs = " << up_nbrs
        << ",\n  down_nbrs = " << down_nbrs
        << "\n)\n";
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x8704(%rip), %rsi      # 0xb074
movq %rax, %rdi
callq 0x2140
leaq 0x86fd(%rip), %rsi      # 0xb07c
movq %rax, %rdi
callq 0x2140
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3463
leaq 0x86f4(%rip), %rsi      # 0xb08d
movq %rax, %rdi
callq 0x2140
leaq 0x18(%rbx), %rsi
movq %rax, %rdi
callq 0x3463
leaq 0x86ea(%rip), %rsi      # 0xb09e
movq %rax, %rdi
callq 0x2140
leaq 0x30(%rbx), %rsi
movq %rax, %rdi
callq 0x3463
leaq 0x86e0(%rip), %rsi      # 0xb0af
movq %rax, %rdi
callq 0x2140
leaq 0x48(%rbx), %rsi
movq %rax, %rdi
callq 0x33cd
leaq 0x86d6(%rip), %rsi      # 0xb0c0
movq %rax, %rdi
callq 0x2140
leaq 0x60(%rbx), %rsi
movq %rax, %rdi
callq 0x33cd
leaq 0x86cc(%rip), %rsi      # 0xb0d1
movq %rax, %rdi
callq 0x2140
leaq 0x78(%rbx), %rsi
movq %rax, %rdi
callq 0x33cd
leaq 0x86c2(%rip), %rsi      # 0xb0e2
movq %rax, %rdi
callq 0x2140
addq $0x90, %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x33cd
leaq 0x86b2(%rip), %rsi      # 0xb0f3
movq %rax, %rdi
popq %rbx
jmp 0x2140
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/prettyprint.hpp
// Function: std::ostream& std::operator<<<int>(std::ostream&, std::vector<int, std::allocator<int>> const&)
ostream& operator<<(ostream& os, const std::vector<T>& v) {
        os << "[";
        if(!v.empty()) {
            os << v[0];
        }
        for(int i=1; i < int(v.size()); ++i) {
            os << ", " << v[i];
        }
        os << "]";
        return os;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80a6(%rip), %rsi      # 0xb51e
callq 0x2140
movq (%r14), %rax
cmpq 0x8(%r14), %rax
je 0x3490
movl (%rax), %esi
movq %rbx, %rdi
callq 0x21e0
pushq $0x1
popq %r12
leaq 0x7c90(%rip), %r15      # 0xb12b
movq 0x8(%r14), %rax
subq (%r14), %rax
shrq $0x2, %rax
cltq
cmpq %rax, %r12
jge 0x34cc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2140
movq (%r14), %rcx
movl (%rcx,%r12,4), %esi
movq %rax, %rdi
callq 0x21e0
incq %r12
jmp 0x349b
leaq 0x7f69(%rip), %rsi      # 0xb43c
movq %rbx, %rdi
callq 0x2140
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network_grow.cpp
// Function: Network::hgrow(GraphGen&, int)
void Network::hgrow(GraphGen& graph_gen, int seed) {
    rng_t rng(seed);
    ivec leaves(depthwise.back().begin(), depthwise.back().end());
    for(int u: leaves) {
        if(!is_virtual(u)) {
            expand_node(u, graph_gen, rng());
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movslq %edx, %rax
movl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
xorl %edx, %edx
divq %r13
movq %rdx, %r14
cmpq $0x1, %rdx
adcq $0x0, %r14
movq %rdi, %r15
movq 0xb0(%rdi), %rax
movq -0x18(%rax), %rsi
movq -0x10(%rax), %rdx
leaq 0x10(%rsp), %r12
leaq 0xf(%rsp), %rcx
movq %r12, %rdi
callq 0x4840
movq (%r12), %rbp
movq 0x8(%r12), %r12
cmpq %r12, %rbp
je 0x42c1
movslq (%rbp), %rsi
movq 0x18(%r15), %rax
cmpl $0x0, (%rax,%rsi,4)
jg 0x42bb
imulq $0xbc8f, %r14, %rax     # imm = 0xBC8F
xorl %edx, %edx
divq %r13
movq %rdx, %r14
movq %r15, %rdi
movq %rbx, %rdx
movl %r14d, %ecx
callq 0x3e80
addq $0x4, %rbp
jmp 0x428b
leaq 0x10(%rsp), %rdi
callq 0x3660
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3660
movq %rbx, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/util.hpp
// Function: bool find_and_erase<std::vector<int, std::allocator<int>>>(std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>::value_type)
inline bool find_and_erase(C& c, typename C::value_type x) {
    typename C::const_iterator it = find(c, x);
    if(it == c.end()) {
        return false;
    }
    else {
        c.erase(it);
        return true;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %rdx
movl %esi, (%rdx)
movq (%rdi), %rdi
movq 0x8(%rbx), %rsi
callq 0x35ce
movq %rax, %r14
movq 0x8(%rbx), %r15
cmpq %r15, %rax
je 0x482f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x506c
cmpq %r15, %r14
setne %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/network.hpp
// Function: Network::reserve(int)
void reserve(int n) {
        nid.reserve(n);
        netsize.reserve(n);
        depth.reserve(n);
        in_nbrs.reserve(n);
        side_nbrs.reserve(n);
        up_nbrs.reserve(n);
        down_nbrs.reserve(n);
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movslq %esi, %rbx
movq %rbx, %rsi
callq 0x4892
leaq 0x18(%r14), %rdi
movq %rbx, %rsi
callq 0x4892
leaq 0x30(%r14), %rdi
movq %rbx, %rsi
callq 0x4892
leaq 0x48(%r14), %rdi
movq %rbx, %rsi
callq 0x4d4a
leaq 0x60(%r14), %rdi
movq %rbx, %rsi
callq 0x4d4a
leaq 0x78(%r14), %rdi
movq %rbx, %rsi
callq 0x4d4a
addq $0x90, %r14
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4d4a
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/sample.hpp
// Function: std::vector<int, std::allocator<int>>::value_type sample<std::vector<int, std::allocator<int>>>(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
inline typename C::value_type sample(const C& v1, const C& v2, rng_t& rng) {
    int i = iunidist(0, v1.size() + v2.size() - 1, rng);
    if(v1.size() + v2.size() == 0) {
        fprintf(stderr, "sample: both containers are empty\n");
    }
    if(i < int(v1.size())) {
        return ord_stat(v1, i);
    }
    else {
        return ord_stat(v2, i-v1.size());
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
subq (%rdi), %rax
shrq $0x2, %rax
movq 0x8(%rsi), %rcx
subq (%rsi), %rcx
shrq $0x2, %rcx
leal (%rcx,%rax), %esi
decl %esi
xorl %edi, %edi
callq 0x421e
movl %eax, %ebp
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
movq %rcx, %rsi
sarq $0x2, %rsi
movq (%rbx), %rdx
movq 0x8(%rbx), %rdi
subq %rdx, %rdi
sarq $0x2, %rdi
addq %rsi, %rdi
je 0x49fa
shrq $0x2, %rcx
movslq %ebp, %rsi
subl %ecx, %ebp
leaq (%rax,%rsi,4), %rax
movslq %ebp, %rcx
leaq (%rdx,%rcx,4), %rcx
cmovlq %rax, %rcx
movl (%rcx), %eax
popq %rbx
popq %r14
popq %rbp
retq
movq 0xc5cf(%rip), %rax      # 0x10fd0
movq (%rax), %rcx
leaq 0x6ba5(%rip), %rdi      # 0xb5b0
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
movq (%r14), %rax
movq 0x8(%r14), %rcx
movq (%rbx), %rdx
subq %rax, %rcx
jmp 0x49db
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/sample.hpp
// Function: std::vector<int, std::allocator<int>>::value_type sample<std::vector<int, std::allocator<int>>>(std::vector<int, std::allocator<int>> const&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
inline typename C::value_type sample(const C& v, rng_t& rng) {
    if(v.empty()) {
        fprintf(stderr, "sample: container is empty\n");
    }
    int i = iunidist(0, v.size() - 1, rng);
    return ord_stat(v, i);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
cmpq %rsi, %rax
je 0x4a5e
subq %rax, %rsi
shrq $0x2, %rsi
decl %esi
xorl %edi, %edi
movq %r14, %rdx
callq 0x421e
cltq
movq (%rbx), %rcx
movl (%rcx,%rax,4), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xc56b(%rip), %rax      # 0x10fd0
movq (%rax), %rcx
leaq 0x6b64(%rip), %rdi      # 0xb5d3
pushq $0x1b
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
movq (%rbx), %rax
movq 0x8(%rbx), %rsi
jmp 0x4a3b
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/sample.hpp
// Function: weighed_sample(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
inline int weighed_sample(const ivec& v, const ivec& weights, rng_t& rng) {
    if(weights.size() != v.size()) {
        fprintf(stderr, "weighed_sample: container and weights have different sizes\n");
    }
    if(weights.empty()) {
        fprintf(stderr, "weighed_sample: nothing_to_sample\n");
    }
    ivec cum_weights(1, 0);
    cum_weights.reserve(v.size()+1);
    for(auto weight: weights) {
        cum_weights.push_back(weight + cum_weights.back());
    }

    int i = iunidist(0, cum_weights.back() - 1, rng);
    int j = std::upper_bound(cum_weights.begin(), cum_weights.end(), i) - cum_weights.begin() - 1;
    return v[j];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
movq %rcx, %rdx
subq %rax, %rdx
movq 0x8(%rdi), %rsi
subq (%rdi), %rsi
cmpq %rsi, %rdx
jne 0x4b8d
cmpq %rcx, %rax
je 0x4bb5
leaq 0x8(%rsp), %rdx
andl $0x0, (%rdx)
leaq 0x10(%rsp), %r12
pushq $0x1
popq %rsi
leaq 0xf(%rsp), %rcx
movq %r12, %rdi
callq 0x3578
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x2, %rsi
incq %rsi
movq %r12, %rdi
callq 0x4892
movq (%r15), %r13
movq 0x8(%r15), %rbp
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
cmpq %rbp, %r13
je 0x4b2a
movl (%r13), %eax
movq 0x18(%rsp), %rcx
addl -0x4(%rcx), %eax
movl %eax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x37be
addq $0x4, %r13
jmp 0x4b04
movq 0x18(%rsp), %rax
movl -0x4(%rax), %esi
decl %esi
xorl %edi, %edi
movq %r14, %rdx
callq 0x421e
leaq 0x8(%rsp), %rdx
movl %eax, (%rdx)
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x5033
leaq 0x10(%rsp), %rdi
subq (%rdi), %rax
shlq $0x1e, %rax
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
addq %rax, %rcx
movq (%rbx), %rax
sarq $0x1e, %rcx
movl (%rax,%rcx), %ebx
callq 0x3660
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xc43c(%rip), %rax      # 0x10fd0
movq (%rax), %rcx
leaq 0x69b3(%rip), %rdi      # 0xb551
pushq $0x3b
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
movq (%r15), %rax
movq 0x8(%r15), %rcx
jmp 0x4ab7
movq 0xc414(%rip), %rax      # 0x10fd0
movq (%rax), %rcx
leaq 0x69c7(%rip), %rdi      # 0xb58d
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
jmp 0x4ac0
jmp 0x4bdc
jmp 0x4bdc
jmp 0x4bdc
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3660
movq %rbx, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/sample.hpp
// Function: std::vector<int, std::allocator<int>>::value_type sample_other<std::vector<int, std::allocator<int>>>(std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>>::value_type, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
inline typename C::value_type sample_other(const C& v, typename C::value_type x, rng_t& rng) {
    if(v.empty()) {
        // fprintf(stderr, "sample_other: container is empty\n");
        return x;
    }
    bool all_x = true;
    for(auto y: v) {
        if(y != x) {
            all_x = false;
            break;
        }
    }
    if(all_x) {
        // fprintf(stderr, "sample_other: container contains no other element\n");
        return x;
    }
    typename C::value_type y = x;
    while(y == x) {
        y = sample(v, rng);
    }
    return y;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq (%rdi), %rcx
movq 0x8(%rdi), %rax
cmpq %rax, %rcx
je 0x4c2d
movq %rdx, %r14
movq %rdi, %r15
cmpq %rax, %rcx
je 0x4c2d
leaq 0x4(%rcx), %rdx
cmpl %ebx, (%rcx)
movq %rdx, %rcx
je 0x4c0a
movl %ebx, %eax
cmpl %ebx, %eax
jne 0x4c2f
movq %r15, %rdi
movq %r14, %rsi
callq 0x4a25
jmp 0x4c1c
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/graph_gen.cpp
// Function: make_cycle_graph(int, std::vector<std::pair<int, int>, std::allocator<std::pair<int, int>>>&)
void make_cycle_graph(int n, ipvec& l) {
    // iipair st_graph[] = {{0, 1}, {1, 2}, {2, 3}, {3, 0}, {3, 4}, {0, 5}};
    l.emplace_back(n-1, 0);
    for(int i=1; i<n; ++i) {
        l.emplace_back(i-1, i);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leal -0x1(%r14), %eax
movq %rsp, %r15
movl %eax, (%r15)
leaq 0x4(%rsp), %r12
andl $0x0, (%r12)
movq %rsi, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x56e2
pushq $0x1
popq %rax
movl %eax, (%rsp)
cmpl %r14d, %eax
jge 0x51fe
decl %eax
movl %eax, 0x4(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x5708
movl (%rsp), %eax
incl %eax
jmp 0x51db
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/dsu.hpp
// Function: DisjointSets::find(int)
int find(int x) {
        if(parent[x] == x) {
            return x;
        }
        else {
            int p = find(parent[x]);
            parent[x] = p;
            return p;
        }
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
movslq %esi, %r14
movq 0x20(%rdi), %rcx
movl (%rcx,%r14,4), %esi
cmpl %r14d, %esi
je 0x59fa
movq %rdi, %rbx
callq 0x59d4
movq 0x20(%rbx), %rcx
movl %eax, (%rcx,%r14,4)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/dsu.hpp
// Function: DisjointSets::unite(int, int)
void unite(int x, int y) {
        x = find(x);
        y = find(y);
        if(subsize[x] > subsize[y]) {
            std::swap(x, y);
        }
        parent[x] = y;
        subsize[y] += subsize[x];
    }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %r14
callq 0x59d4
movl %eax, %ebp
movq %r14, %rdi
movl %ebx, %esi
callq 0x59d4
movslq %ebp, %rcx
movq 0x8(%r14), %rdx
movl (%rdx,%rcx,4), %esi
cltq
cmpl (%rdx,%rax,4), %esi
movl %ecx, %esi
cmovgl %eax, %esi
cmovgl %ecx, %eax
movq 0x20(%r14), %rcx
movslq %esi, %rsi
movl %eax, (%rcx,%rsi,4)
movl (%rdx,%rsi,4), %ecx
cltq
addl %ecx, (%rdx,%rax,4)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/dsu.hpp
// Function: DisjointSets::init(int)
void init(int _n) {
        n = _n;
        subsize.resize(n);
        parent.resize(n);
        for(int i=0; i<n; ++i) {
            parent[i] = i;
            subsize[i] = 1;
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
addq $0x8, %rdi
movslq %esi, %rsi
callq 0x5ae6
leaq 0x20(%rbx), %rdi
movslq (%rbx), %rsi
callq 0x5ae6
movq 0x8(%rbx), %rax
movq 0x20(%rbx), %rcx
xorl %edx, %edx
movslq (%rbx), %rsi
cmpq %rsi, %rdx
jge 0x5ae3
movl %edx, (%rcx,%rdx,4)
movl $0x1, (%rax,%rdx,4)
incq %rdx
jmp 0x5acc
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/attack.cpp
// Function: normalize_edge_weights(int&, int&)
void normalize_edge_weights(int& in_weight, int& side_weight) {
    if(in_weight < 0) {
        fprintf(stderr, "in_weight = %d\n", in_weight);
    }
    if(side_weight < 0) {
        fprintf(stderr, "side_weight = %d\n", side_weight);
    }
    if(in_weight == 0) {
        if(side_weight == 0) {
            in_weight = side_weight = 1;
        }
        else {
            in_weight = 1;
            side_weight = -1;
        }
    }
    else if(side_weight == 0) {
        side_weight = 1;
        in_weight = -1;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rdi), %edx
testl %edx, %edx
js 0x698b
movl (%r14), %edx
testl %edx, %edx
js 0x69a5
cmpl $0x0, (%rbx)
movl (%r14), %eax
je 0x696b
testl %eax, %eax
jne 0x6983
movl $0x1, (%r14)
orl $-0x1, (%rbx)
jmp 0x6983
testl %eax, %eax
je 0x697b
movl $0x1, (%rbx)
orl $-0x1, (%r14)
jmp 0x6983
pushq $0x1
popq %rax
movl %eax, (%r14)
movl %eax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0xa63e(%rip), %rax      # 0x10fd0
movq (%rax), %rdi
leaq 0x4c74(%rip), %rsi      # 0xb610
xorl %eax, %eax
callq 0x2180
jmp 0x694c
movq 0xa624(%rip), %rax      # 0x10fd0
movq (%rax), %rdi
leaq 0x4c6a(%rip), %rsi      # 0xb620
xorl %eax, %eax
callq 0x2180
jmp 0x6953
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: place_victims_randomly(Network const&, int, std::vector<int, std::allocator<int>>&, int)
void place_victims_randomly(const Network& network, int n, ivec& victims, int seed) {
    victims.reserve(network.depthwise.back().size());
    for(int u: network.depthwise.back()) {
        if(network.netsize[u] == 0) {
            victims.push_back(u);
        }
    }
    n = std::min<int>(n, victims.size());
    std::shuffle(victims.begin(), victims.end(), rng_t(seed));
    victims.resize(n);
    victims.shrink_to_fit();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, 0x8(%rsp)
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r15
movq 0xb0(%rdi), %rax
movq -0x10(%rax), %rsi
subq -0x18(%rax), %rsi
sarq $0x2, %rsi
movq %rdx, %rdi
callq 0x4892
movq 0xb0(%r15), %rax
movq -0x18(%rax), %r13
movq -0x10(%rax), %r14
leaq 0xc(%rsp), %r12
cmpq %r14, %r13
je 0x7c4d
movslq (%r13), %rax
movl %eax, 0xc(%rsp)
movq 0x18(%r15), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0x7c47
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3326
addq $0x4, %r13
jmp 0x7c25
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
movq %rsi, %rax
subq %rdi, %rax
shrq $0x2, %rax
cmpl %ebp, %eax
cmovll %eax, %ebp
movslq 0x8(%rsp), %rax
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
divq %rcx
cmpq $0x1, %rdx
adcq $0x0, %rdx
leaq 0x10(%rsp), %rax
movq %rdx, (%rax)
movq %rax, %rdx
callq 0x8d3c
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x5ae6
movq %rbx, %rdi
callq 0x94d2
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: make_network_dag(Network const&, Graph&)
void make_network_dag(const Network& network, Graph& graph2) {
    Graph graph(network.size());
    for(int d=network.height(); d>=0; --d) {
        for(int v: network.depthwise[d]) {
            int u = network.nid[v];
            if(u < 0 || network.depth[u] != d) {
                if(d > 0) {
                    for(int u: network.up_nbrs[v]) {
                        graph.add_edge(u, v);
                    }
                }
            }
            else {
                graph.add_edge(u, v);
            }
        }
    }
    graph2.swap(graph);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq 0x20(%rdi), %rsi
subq 0x18(%rdi), %rsi
shrq $0x2, %rsi
leaq 0x20(%rsp), %r15
movq %r15, %rdi
callq 0x8e68
movq 0xb0(%r14), %rax
subq 0xa8(%r14), %rax
pushq $0x18
popq %rcx
cqto
idivq %rcx
movl %eax, %edx
decq %rdx
testl %edx, %edx
js 0x7d88
movl %edx, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0xa8(%r14), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rbp
movq 0x8(%rcx,%rax), %rax
movq %rax, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
cmpq 0x18(%rsp), %rbp
je 0x7cf3
movslq (%rbp), %r12
movq (%r14), %rax
movslq (%rax,%r12,4), %rsi
testq %rsi, %rsi
js 0x7d50
movq 0x30(%r14), %rax
cmpl %edx, (%rax,%rsi,4)
jne 0x7d50
movq %r15, %rdi
movl %r12d, %edx
callq 0x8ebe
jmp 0x7d7d
testl %edx, %edx
je 0x7d7d
movq 0x78(%r14), %rax
imulq $0x18, %r12, %rcx
movq (%rax,%rcx), %rbx
movq 0x8(%rax,%rcx), %r13
cmpq %r13, %rbx
je 0x7d7d
movl (%rbx), %esi
movq %r15, %rdi
movl %r12d, %edx
callq 0x8ebe
addq $0x4, %rbx
jmp 0x7d65
addq $0x4, %rbp
movq 0x10(%rsp), %rdx
jmp 0x7d23
leaq 0x20(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x8f0a
movq %r14, %rdi
callq 0x8f44
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7db3
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x8f44
movq %rbx, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: noisy_normalize(std::vector<double, std::allocator<double>>&, int, double, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
void noisy_normalize(vector<double>& weights, int x, double max_noise, rng_t& rng) {
    std::uniform_real_distribution<double> noise_dist(-max_noise, max_noise);
    double weight_sum = std::accumulate(weights.begin(), weights.end(), 0.0);
    for(double& w: weights) {
        w = w / weight_sum + noise_dist(rng);
    }
    weight_sum = std::accumulate(weights.begin(), weights.end(), 0.0);
    for(double& w: weights) {
        w = (w * x) / weight_sum;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r14
movl %esi, %ebx
movq %rdi, %r15
movapd 0x38ca(%rip), %xmm1     # 0xb6b0
xorpd %xmm0, %xmm1
movlpd %xmm1, 0x18(%rsp)
movsd %xmm0, 0x20(%rsp)
movq (%rdi), %r13
movq 0x8(%rdi), %rbp
xorpd %xmm0, %xmm0
movq %r13, %rax
cmpq %rbp, %rax
je 0x7e13
addsd (%rax), %xmm0
addq $0x8, %rax
jmp 0x7e04
leaq 0x18(%rsp), %r12
movsd %xmm0, 0x8(%rsp)
cmpq %rbp, %r13
je 0x7e56
movsd (%r13), %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x5008
addsd 0x10(%rsp), %xmm0
movsd %xmm0, (%r13)
movsd 0x8(%rsp), %xmm0
addq $0x8, %r13
jmp 0x7e1e
movq (%r15), %rax
movq 0x8(%r15), %rcx
xorpd %xmm0, %xmm0
movq %rax, %rdx
cmpq %rcx, %rdx
je 0x7e73
addsd (%rdx), %xmm0
addq $0x8, %rdx
jmp 0x7e64
cvtsi2sd %ebx, %xmm1
cmpq %rcx, %rax
je 0x7e92
movsd (%rax), %xmm2
mulsd %xmm1, %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, (%rax)
addq $0x8, %rax
jmp 0x7e77
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sharmaeklavya2[P]ddos-on-anycast/src/lib/place_victims.cpp
// Function: distribute(std::vector<double, std::allocator<double>>&, int, std::vector<int, std::allocator<int>>&, std::linear_congruential_engine<unsigned long, 48271ul, 0ul, 2147483647ul>&)
void distribute(vector<double>& weights, int x, ivec& xvec, rng_t& rng) {
    int n = weights.size();
    if(n == 1) {
        xvec.push_back(x);
        return;
    }

    typedef pair<double, int> dipair;
    vector<dipair> wvec;
    wvec.reserve(n);
    for(int i=0; i<n; ++i) {
        wvec.emplace_back(weights[i], i);
    }
    std::shuffle(wvec.begin(), wvec.end(), rng);

    vector<iipair> xvec2;
    xvec2.reserve(n);
    double acc = 0.000001;
    for(const dipair& p: wvec) {
        double w = p.first;
        int i = p.second;
        acc += w;
        xvec2.emplace_back(i, int(acc+0.4));
        acc -= int(acc+0.4);
    }
    std::sort(xvec2.begin(), xvec2.end());
    xvec.reserve(n);
    for(const iipair& p: xvec2) {
        xvec.push_back(p.second);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, 0xc(%rsp)
movq 0x8(%rdi), %r14
subq (%rdi), %r14
shrq $0x3, %r14
cmpl $0x1, %r14d
jne 0x7ed6
leaq 0xc(%rsp), %rsi
movq %rdx, %rdi
callq 0x3326
jmp 0x802a
movq %rcx, %r15
movq %rdi, %r12
movq %rdx, 0x58(%rsp)
xorpd %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movapd %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movslq %r14d, %rbx
movq %rbx, %rsi
callq 0x8f5e
xorl %eax, %eax
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %rbp
movl %eax, 0x10(%rsp)
cmpl %r14d, %eax
jge 0x7f31
movslq %eax, %rsi
shlq $0x3, %rsi
addq (%r12), %rsi
movq %r13, %rdi
movq %rbp, %rdx
callq 0x8ff8
movl 0x10(%rsp), %eax
incl %eax
jmp 0x7f0a
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movq %r15, %rdx
callq 0x9022
xorpd %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movapd %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rbx, 0x50(%rsp)
movq %rbx, %rsi
callq 0x589a
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %rbp
movsd 0x374c(%rip), %xmm0     # 0xb6c0
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x4(%rsp), %r13
cmpq %rbp, %r14
je 0x7fd1
addsd (%r14), %xmm0
movl 0x8(%r14), %eax
movl %eax, 0x8(%rsp)
movsd %xmm0, 0x60(%rsp)
addsd 0x3725(%rip), %xmm0     # 0xb6c8
cvttsd2si %xmm0, %ebx
movl %ebx, 0x4(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x91d4
cvtsi2sd %ebx, %xmm0
movsd 0x60(%rsp), %xmm1
subsd %xmm0, %xmm1
addq $0x10, %r14
movapd %xmm1, %xmm0
jmp 0x7f83
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x9800
movq 0x58(%rsp), %rbx
movq %rbx, %rdi
movq 0x50(%rsp), %rsi
callq 0x4892
movq 0x10(%rsp), %r14
movq 0x18(%rsp), %r15
cmpq %r15, %r14
je 0x8016
addq $0x4, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3326
addq $0x4, %r14
jmp 0x7ffc
leaq 0x10(%rsp), %rdi
callq 0x366e
leaq 0x30(%rsp), %rdi
callq 0x95d8
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8041
jmp 0x8041
jmp 0x8050
jmp 0x8041
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x366e
jmp 0x8053
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x95d8
movq %rbx, %rdi
callq 0x21f0