LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::ReadPoints(char const*)
int R3MeshProperty::
ReadPoints(const char *filename)
{
  // Open file
  FILE *fp = fopen(filename, "r");
  if (!fp) {
    RNFail("Unable to open ASCII file: %s\n", filename);
    return 0;
  }

  // Create property name
  SetName("Points");

  // Initialize all values to zero
  Clear(0);

  // Assign value 1 to vertices in pid file
  int vertex_index;
  while (fscanf(fp, "%d", &vertex_index) == (unsigned int) 1) {
    if ((vertex_index > 0) && (vertex_index < mesh->NVertices())) {
      SetVertexValue(vertex_index, 1);
    }
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x9d18d(%rip), %rsi     # 0xe85a3
movq %r15, %rdi
callq 0x21aa0
testq %rax, %rax
je 0x4b50b
movq %rax, %r14
leaq 0x8(%rbx), %rdi
leaq 0x980bf(%rip), %rsi     # 0xe34f4
movl $0x400, %edx            # imm = 0x400
callq 0x21410
movb $0x0, 0x5b(%rbx)
movslq 0x408(%rbx), %rdx
testq %rdx, %rdx
jle 0x4b461
movq 0x410(%rbx), %rdi
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x21470
movaps 0x97fc8(%rip), %xmm0    # 0xe3430
movups %xmm0, 0x418(%rbx)
movups %xmm0, 0x428(%rbx)
movups %xmm0, 0x438(%rbx)
leaq 0x9cd96(%rip), %rsi     # 0xe821a
leaq 0xc(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x22180
cmpl $0x1, %eax
jne 0x4b4fc
movabsq $0x3ff0000000000000, %r13 # imm = 0x3FF0000000000000
leaq 0x9cd71(%rip), %r15     # 0xe821a
leaq 0xc(%rsp), %r12
movslq 0xc(%rsp), %rax
testq %rax, %rax
jle 0x4b4e7
movq (%rbx), %rcx
cmpl 0x14(%rcx), %eax
jge 0x4b4e7
movq 0x410(%rbx), %rcx
movq %r13, (%rcx,%rax,8)
movaps 0x97f5e(%rip), %xmm0    # 0xe3430
movups %xmm0, 0x418(%rbx)
movups %xmm0, 0x428(%rbx)
movups %xmm0, 0x438(%rbx)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x22180
cmpl $0x1, %eax
je 0x4b4ae
movq %r14, %rdi
callq 0x218a0
movl $0x1, %ebx
jmp 0x4b51e
leaq 0x97fc3(%rip), %rdi     # 0xe34d5
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x8fd7a
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::Write(char const*) const
int R3MeshProperty::
Write(const char *filename) const
{
  // Parse input filename extension
  const char *extension;
  if (!(extension = strrchr(filename, '.'))) {
    printf("Filename %s has no extension (e.g., .arff)\n", filename);
    return 0;
  }

  // Write file of appropriate type
  if (!strcmp(extension, ".arff")) return WriteARFF(filename);
  else if (!strcmp(extension, ".txt")) return WriteValues(filename);
  else if (!strcmp(extension, ".val")) return WriteValues(filename);
  else if (!strcmp(extension, ".dat")) return WriteValues(filename);

  // None of the extensions matched
  RNFail("Unable to write file %s (unrecognized extension: %s)\n", filename, extension);
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
movl $0x2e, %esi
callq 0x219a0
testq %rax, %rax
je 0x4b5b0
movq %rax, %r15
leaq 0x979be(%rip), %rsi     # 0xe2f13
movq %rax, %rdi
callq 0x21cf0
testl %eax, %eax
je 0x4b5d9
leaq 0x9613d(%rip), %rsi     # 0xe16a5
movq %r15, %rdi
callq 0x21cf0
testl %eax, %eax
je 0x4b5c9
leaq 0x97cee(%rip), %rsi     # 0xe3269
movq %r15, %rdi
callq 0x21cf0
testl %eax, %eax
je 0x4b5c9
leaq 0x97ce0(%rip), %rsi     # 0xe326e
movq %r15, %rdi
callq 0x21cf0
testl %eax, %eax
je 0x4b5c9
leaq 0x96159(%rip), %rdi     # 0xe16fa
movq %rbx, %rsi
movq %r15, %rdx
xorl %eax, %eax
callq 0x8fd7a
jmp 0x4b5c1
leaq 0x97930(%rip), %rdi     # 0xe2ee7
movq %rbx, %rsi
xorl %eax, %eax
callq 0x21080
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4b6c6
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x4b5ea
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::WriteARFF(char const*) const
int R3MeshProperty::
WriteARFF(const char *filename) const
{
  // Open file
  FILE *fp = fopen(filename, "w");
  if (!fp) {
    RNFail("Unable to open ARFF file: %s\n", filename);
    return 0;
  }

  // Write header
  const char *mesh_name = (mesh->Name()) ? mesh->Name() : "Mesh";
  fprintf(fp, "@relation %s\n\n", mesh_name);

  // Write names
  const char *property_name = (Name()) ? Name() : "Property";
  fprintf(fp, "@attribute %s real\n", property_name);

  // Write values
  fprintf(fp, "\n@data\n\n");
  for (int i = 0; i < mesh->NVertices(); i++) {
    fprintf(fp, "%g\n", VertexValue(i));
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x99d7d(%rip), %rsi     # 0xe537c
movq %r15, %rdi
callq 0x21aa0
testq %rax, %rax
je 0x4b6a4
movq %rax, %r14
movq (%rbx), %rdx
addq $0x78, %rdx
leaq 0x97c52(%rip), %rsi     # 0xe3273
movq %rax, %rdi
xorl %eax, %eax
callq 0x21d70
leaq 0x8(%rbx), %rdx
leaq 0x97c4c(%rip), %rsi     # 0xe3282
movq %r14, %rdi
xorl %eax, %eax
callq 0x21d70
leaq 0x97c4f(%rip), %rdi     # 0xe3296
movl $0x8, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x22270
movq (%rbx), %rax
cmpl $0x0, 0x14(%rax)
jle 0x4b695
xorl %r12d, %r12d
leaq 0x972ad(%rip), %r15     # 0xe2919
movq 0x410(%rbx), %rax
movsd (%rax,%r12,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x21d70
incq %r12
movq (%rbx), %rax
movslq 0x14(%rax), %rax
cmpq %rax, %r12
jl 0x4b66c
movq %r14, %rdi
callq 0x218a0
movl $0x1, %ebx
jmp 0x4b6b7
leaq 0x9787d(%rip), %rdi     # 0xe2f28
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x8fd7a
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/R3Shapes/R3MeshProperty.cpp
// Function: gaps::R3MeshProperty::WriteValues(char const*) const
int R3MeshProperty::
WriteValues(const char *filename) const
{
  // Open file
  FILE *fp = fopen(filename, "w");
  if (!fp) {
    RNFail("Unable to open values file: %s\n", filename);
    return 0;
  }

  // Write values
  for (int i = 0; i < mesh->NVertices(); i++) {
    fprintf(fp, "%g\n", values[i]);
  }

  // Close file
  fclose(fp);

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x99ca1(%rip), %rsi     # 0xe537c
movq %r15, %rdi
callq 0x21aa0
testq %rax, %rax
je 0x4b736
movq %rax, %r14
movq (%rbx), %rax
cmpl $0x0, 0x14(%rax)
jle 0x4b727
xorl %r12d, %r12d
leaq 0x9721b(%rip), %r15     # 0xe2919
movq 0x410(%rbx), %rax
movsd (%rax,%r12,8), %xmm0
movq %r14, %rdi
movq %r15, %rsi
movb $0x1, %al
callq 0x21d70
incq %r12
movq (%rbx), %rax
movslq 0x14(%rax), %rax
cmpq %rax, %r12
jl 0x4b6fe
movq %r14, %rdi
callq 0x218a0
movl $0x1, %ebx
jmp 0x4b749
leaq 0x97ccd(%rip), %rdi     # 0xe340a
xorl %ebx, %ebx
movq %r15, %rsi
xorl %eax, %eax
callq 0x8fd7a
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/genipasat/genipasat.c
// Function: die
static void die (const char * fmt, ...) {
  va_list ap;
  fflush (stderr);
  printf ("*** genipasat: ");
  va_start (ap, fmt);
  vprintf (fmt, ap);
  va_end (ap);
  fputc ('\n', stdout);
  fflush (stdout);
  exit (1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x1d1b
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x152d6(%rip), %rax     # 0x16ff8
movq (%rax), %rdi
callq 0x1160
leaq 0xe569(%rip), %rdi      # 0x1029a
xorl %eax, %eax
callq 0x10c0
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsi)
movq %r14, 0x10(%rsi)
movq %rbx, %rdi
callq 0x1170
movq 0x15269(%rip), %rbx     # 0x16fd0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x1110
movq (%rbx), %rdi
callq 0x1160
movl $0x1, %edi
callq 0x11e0
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/genipasat/genipasat.c
// Function: msg
static void msg (const char * fmt, ...) {
  va_list ap;
  fflush (stderr);
  printf ("c [genipasat] ");
  va_start (ap, fmt);
  vprintf (fmt, ap);
  va_end (ap);
  fputc ('\n', stdout);
  fflush (stdout);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x1de7
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x1520a(%rip), %rax     # 0x16ff8
movq (%rax), %rdi
callq 0x1160
leaq 0xe4ad(%rip), %rdi      # 0x102aa
xorl %eax, %eax
callq 0x10c0
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsi)
movq %r14, 0x10(%rsi)
movq %rbx, %rdi
callq 0x1170
movq 0x1519d(%rip), %rbx     # 0x16fd0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x1110
movq (%rbx), %rdi
callq 0x1160
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/genipasat/genipasat.c
// Function: pipeit
static FILE * pipeit (const char * name, const char * fmt) {
  char * cmd = malloc (strlen (name) + strlen (fmt) + 20);
  FILE * res;
  sprintf (cmd, fmt, name);
  res = popen (cmd, "r");
  free (cmd);
  return res;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x10b0
movq %rax, %r15
movq %rbx, %rdi
callq 0x10b0
leaq (%r15,%rax), %rdi
addq $0x14, %rdi
callq 0x1150
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x11d0
leaq 0x10d7f(%rip), %rsi     # 0x12c59
movq %r15, %rdi
callq 0x1190
movq %rax, %rbx
movq %r15, %rdi
callq 0x1040
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/genipasat/genipasat.c
// Function: perr
static void perr (const char * fmt, ...) {
  va_list ap;
  fflush (stderr);
  printf ("*** genipasat: parse error in '%s' line '%d': ", name, lineno);
  va_start (ap, fmt);
  vprintf (fmt, ap);
  va_end (ap);
  fputc ('\n', stdout);
  fflush (stdout);
  exit (1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %r14
movq %rsi, 0x8(%r14)
movq %rdx, 0x10(%r14)
movq %rcx, 0x18(%r14)
movq %r8, 0x20(%r14)
movq %r9, 0x28(%r14)
testb %al, %al
je 0x1f57
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq 0x1509a(%rip), %rax     # 0x16ff8
movq (%rax), %rdi
callq 0x1160
movq 0x151c3(%rip), %rsi     # 0x17130
movl 0x151ad(%rip), %edx     # 0x17120
leaq 0xe33f(%rip), %rdi      # 0x102b9
xorl %eax, %eax
callq 0x10c0
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rsp, %rsi
movq %rax, (%rsi)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsi)
movq %r14, 0x10(%rsi)
movq %rbx, %rdi
callq 0x1170
movq 0x15020(%rip), %rbx     # 0x16fd0
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x1110
movq (%rbx), %rdi
callq 0x1160
movl $0x1, %edi
callq 0x11e0
// File: /workspace/github_cpp_makefile_star2_O1/biotomas[P]ipasir/app/genipasat/genipasat.c
// Function: getime
static double getime (void) {
  struct rusage u;
  double res;
  if (getrusage (RUSAGE_SELF, &u)) return 0;
  res = u.ru_utime.tv_sec + 1e-6 * u.ru_utime.tv_usec;
  res += u.ru_stime.tv_sec + 1e-6 * u.ru_stime.tv_usec;
  return res;
}

// Assembly:
subq $0x98, %rsp
leaq 0x8(%rsp), %rsi
xorl %edi, %edi
callq 0x11b0
xorpd %xmm0, %xmm0
testl %eax, %eax
jne 0x2025
cvtsi2sdq 0x8(%rsp), %xmm1
cvtsi2sdq 0x10(%rsp), %xmm2
movsd 0xe008(%rip), %xmm3     # 0x10008
mulsd %xmm3, %xmm2
cvtsi2sdq 0x18(%rsp), %xmm4
xorps %xmm0, %xmm0
cvtsi2sdq 0x20(%rsp), %xmm0
addsd %xmm1, %xmm2
mulsd %xmm3, %xmm0
addsd %xmm4, %xmm0
addsd %xmm2, %xmm0
addq $0x98, %rsp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeserver.hpp
// Function: RequestHandler::HandleError()
virtual void HandleError()
    {
        fprintf(stderr, "client %d closed\n", m_handle);
        close(m_handle);
        g_reactor.RemoveHandler(this);
        delete this;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x4b73(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
movl 0x8(%rbx), %edx
leaq 0x1cf4(%rip), %rsi      # 0x4166
xorl %eax, %eax
callq 0x2270
movl 0x8(%rbx), %edi
callq 0x2300
leaq 0x5548(%rip), %r15      # 0x79d0
cmpq $0x0, (%r15)
jne 0x24a4
pushq $0x8
popq %rdi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
movq %r14, (%r15)
movq (%r15), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x359c
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x8(%rax)
movq %rax, %rbx
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/reactor_server_test.cc
// Function: main
int main(int argc, char **argv)
{
    if (argc < 3) {
        fprintf(stderr, "usage: %s ip port\n", argv[0]);
        return EXIT_FAILURE;
    }

    /**
     * 命令行参数，第1个是 IP ，第2个是 port 。
     * （1）启动服务器。
    */
    TimeServer server(argv[1], atoi(argv[2]));
    if (!server.Start()) {
        fprintf(stderr, "start server failed\n");
        return EXIT_FAILURE;
    }
    fprintf(stderr, "server started!\n");

    heap_timer *printtask = new heap_timer(5);
    printtask->cb_func = printHelloworld;

    fprintf(stderr, "register a task which will be run is five seconds!\n");
    g_reactor.RegisterTimerTask(printtask);

    /**
     * （3）向 Reactor 中注册事件处理器：server 。
    */
    g_reactor.RegisterHandler(&server, reactor::kReadEvent);

    while (true) {
        /**
         * （4）监控并分发事件到各个事件处理器。
        */
        g_reactor.HandleEvents();
    }
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
cmpl $0x2, %edi
jg 0x26a0
movq %rsi, %rdi
callq 0x240c
jmp 0x27c7
movq 0x8(%rsi), %r14
movq 0x10(%rsi), %rdi
callq 0x22a0
movl %eax, %ebp
leaq 0x45f2(%rip), %r15      # 0x6ca8
leaq 0x18(%rsp), %rbx
movq %r15, -0x10(%rbx)
leaq 0x7(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28de
movw %bp, 0x20(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x281e
movq 0x48f4(%rip), %rcx      # 0x6fd8
movq (%rcx), %rcx
testb %al, %al
je 0x27b7
leaq 0x196d(%rip), %rdi      # 0x4063
movl $0x10, %esi
movl $0x1, %edx
callq 0x22f0
movl $0x18, %edi
callq 0x21e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x23bf
testb $0x1, %al
je 0x273d
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
leaq 0x5296(%rip), %rax      # 0x79d0
movq %r14, (%rax)
leaq 0x528c(%rip), %r12      # 0x79d0
movq (%r12), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x3652
cmpq $0x0, (%r12)
jne 0x2773
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
movq %r14, (%r12)
movq (%r12), %rax
movq (%rax), %rdi
leaq 0x8(%rsp), %rsi
movl $0x1, %edx
callq 0x34fc
cmpq $0x0, (%r12)
jne 0x27a9
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
movq %r14, (%r12)
movq (%r12), %rax
movq (%rax), %rdi
callq 0x35fc
jmp 0x2789
leaq 0x8(%rsp), %rsi
movq %rcx, %rdi
movq %rbx, %rdx
callq 0x2377
movl $0x1, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27f3
jmp 0x27e1
jmp 0x27e1
jmp 0x27f3
movq %rax, %rbx
movl $0x8, %esi
movq %r14, %rdi
callq 0x2200
jmp 0x27f6
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq %r15, -0x20(%rax)
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2815
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeserver.hpp
// Function: TimeServer::Start()
bool Start()
    {
        m_handle = socket(AF_INET, SOCK_STREAM, 0);
        if (!IsValidHandle(m_handle)) {
            ReportSocketError("socket");
            return false;
        }

        struct sockaddr_in addr;
        addr.sin_family = AF_INET;
        addr.sin_port = htons(m_port);
        addr.sin_addr.s_addr = inet_addr(m_ip.c_str());
        if (bind(m_handle, (struct sockaddr *)&addr, sizeof(addr)) < 0) {
            ReportSocketError("bind");
            return false;
        }

        if (listen(m_handle, 10) < 0) {
            ReportSocketError("listen");
            return false;
        }
        return true;
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2080
movl %eax, 0x8(%rbx)
testl %eax, %eax
js 0x2896
leaq 0x8(%rsp), %r14
movw $0x2, (%r14)
movzwl 0x30(%rbx), %eax
rolw $0x8, %ax
movw %ax, 0x2(%r14)
movq 0x10(%rbx), %rdi
callq 0x21f0
movl %eax, 0x4(%r14)
movl 0x8(%rbx), %edi
movq %r14, %rsi
movl $0x10, %edx
callq 0x2050
testl %eax, %eax
js 0x289f
movl 0x8(%rbx), %edi
movl $0xa, %esi
callq 0x2220
movl %eax, %ecx
movb $0x1, %al
testl %ecx, %ecx
js 0x28a8
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x18db(%rip), %rdi      # 0x4178
jmp 0x28af
leaq 0x18d9(%rip), %rdi      # 0x417f
jmp 0x28af
leaq 0x18d5(%rip), %rdi      # 0x4184
callq 0x2320
xorl %eax, %eax
jmp 0x288e
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeserver.hpp
// Function: TimeServer::HandleRead()
virtual void HandleRead()
    {
        struct sockaddr addr;
        socklen_t addrlen = sizeof(addr);
        reactor::handle_t handle = accept(m_handle, &addr, &addrlen);
        if (!IsValidHandle(handle)) {
            ReportSocketError("accept");
        } else {
            /**
             * 对该新连接注册读写事件。
            */
            RequestHandler *handler = new RequestHandler(handle);
            if (g_reactor.RegisterHandler(handler, reactor::kReadEvent) != 0) {
                fprintf(stderr, "error: register handler failed\n");
                delete handler;
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x4(%rsp), %rdx
movl $0x10, (%rdx)
movl 0x8(%rdi), %edi
leaq 0x8(%rsp), %rsi
callq 0x20a0
testl %eax, %eax
js 0x29dd
movl %eax, %ebp
movl $0x10, %edi
callq 0x21e0
movq %rax, %rbx
leaq 0x4380(%rip), %rax      # 0x6d10
movq %rax, (%rbx)
movl %ebp, 0x8(%rbx)
leaq 0x5033(%rip), %r15      # 0x79d0
cmpq $0x0, (%r15)
jne 0x29bb
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
movq %r14, (%r15)
movq (%r15), %rax
movq (%rax), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x34fc
testl %eax, %eax
jne 0x29eb
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x16ee(%rip), %rdi      # 0x40d2
callq 0x2320
jmp 0x29d2
movq %rbx, %rdi
callq 0x242a
jmp 0x29d2
movq %rax, %rbx
movl $0x8, %esi
movq %r14, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeserver.hpp
// Function: RequestHandler::HandleRead()
virtual void HandleRead()
    {
        memset(g_read_buffer, 0, sizeof(g_read_buffer));
        int len = recv(m_handle, g_read_buffer, BUFFERSIZE, 0);
        if (len > 0) {
            if (strncasecmp("time", g_read_buffer, 4) == 0) {
                g_reactor.RegisterHandler(this, reactor::kWriteEvent);
            } else if (strncasecmp("exit", g_read_buffer, 4) == 0) {
                close(m_handle);
                g_reactor.RemoveHandler(this);
                delete this;
            } else {
                fprintf(stderr, "Invalid request: %s", g_read_buffer);
                close(m_handle);
                g_reactor.RemoveHandler(this);
                delete this;
            }
        } else {
            ReportSocketError("recv");
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x46ff(%rip), %r14      # 0x71c0
movl $0x400, %edx            # imm = 0x400
movq %r14, %rdi
xorl %esi, %esi
callq 0x2130
movl 0x8(%rbx), %edi
movl $0x400, %edx            # imm = 0x400
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x20b0
testl %eax, %eax
jle 0x2bac
leaq 0x1608(%rip), %rdi      # 0x40f9
leaq 0x46c8(%rip), %rsi      # 0x71c0
movl $0x4, %edx
callq 0x2240
testl %eax, %eax
je 0x2b6f
leaq 0x15f1(%rip), %rdi      # 0x40fe
leaq 0x46ac(%rip), %rsi      # 0x71c0
movl $0x4, %edx
callq 0x2240
testl %eax, %eax
jne 0x2bbd
movl 0x8(%rbx), %edi
callq 0x2300
leaq 0x4e9b(%rip), %r15      # 0x79d0
cmpq $0x0, (%r15)
jne 0x2b53
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
movq %r14, (%r15)
movq (%r15), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x359c
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmpq *0x8(%rax)
leaq 0x4e5a(%rip), %r15      # 0x79d0
cmpq $0x0, (%r15)
jne 0x2b94
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
movq %r14, (%r15)
movq (%r15), %rax
movq (%rax), %rdi
movq %rbx, %rsi
movl $0x2, %edx
popq %rbx
popq %r14
popq %r15
jmp 0x34fc
leaq 0x1564(%rip), %rdi      # 0x4117
popq %rbx
popq %r14
popq %r15
jmp 0x2320
movq 0x4414(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
leaq 0x1535(%rip), %rsi      # 0x4103
leaq 0x45eb(%rip), %rdx      # 0x71c0
xorl %eax, %eax
callq 0x2270
movl 0x8(%rbx), %edi
callq 0x2300
leaq 0x4de5(%rip), %r15      # 0x79d0
cmpq $0x0, (%r15)
jne 0x2b53
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
jmp 0x2b50
jmp 0x2c13
jmp 0x2c13
movq %rax, %rbx
movl $0x8, %esi
movq %r14, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./eventhandler/timeserver.hpp
// Function: RequestHandler::HandleWrite()
virtual void HandleWrite()
    {
        struct tm *ttime;
        char now[64];
        time_t tt;

        memset(now, 0, 64);
        tt = time(nullptr);
        ttime = localtime(&tt);
        strftime(now, 64, "%Y-%m-%d %H:%M:%S", ttime);

        memset(g_write_buffer, 0, sizeof(g_write_buffer));
        int len = sprintf(g_write_buffer, "current time: %s\r\n", now);
        len = send(m_handle, g_write_buffer, len, 0);
        if (len > 0) {
            fprintf(stderr, "send response to client, fd=%d\n", (int)m_handle);
            g_reactor.RegisterHandler(this, reactor::kReadEvent);
        } else {
            ReportSocketError("send");
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %r14
movaps %xmm0, (%r14)
movaps %xmm0, 0x10(%r14)
movaps %xmm0, 0x20(%r14)
movaps %xmm0, 0x30(%r14)
xorl %edi, %edi
callq 0x21d0
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
callq 0x2180
leaq 0x14ae(%rip), %rdx      # 0x411c
movl $0x40, %esi
movq %r14, %rdi
movq %rax, %rcx
callq 0x21a0
leaq 0x493b(%rip), %r15      # 0x75c0
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x2130
leaq 0x1493(%rip), %rsi      # 0x412e
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2070
movl 0x8(%rbx), %edi
movslq %eax, %rdx
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x2110
testl %eax, %eax
jle 0x2d11
movq 0x4315(%rip), %rax      # 0x6fd8
movq (%rax), %rdi
movl 0x8(%rbx), %edx
leaq 0x1471(%rip), %rsi      # 0x4141
xorl %eax, %eax
callq 0x2270
leaq 0x4cf2(%rip), %r15      # 0x79d0
cmpq $0x0, (%r15)
jne 0x2cfc
movl $0x8, %edi
callq 0x21e0
movq %rax, %r14
movq %rax, %rdi
callq 0x39d4
movq %r14, (%r15)
movq (%r15), %rax
movq (%rax), %rdi
movq %rbx, %rsi
movl $0x1, %edx
callq 0x34fc
jmp 0x2d1d
leaq 0x1449(%rip), %rdi      # 0x4161
callq 0x2320
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x8, %esi
movq %r14, %rdi
callq 0x2200
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/eventDemultiplexer/event_demultiplexer.cc
// Function: reactor::EpollDemultiplexer::RequestEvent(int, unsigned int)
int EpollDemultiplexer::RequestEvent(handle_t handle, event_t evt)
{
    epoll_event ep_evt;
    ep_evt.data.fd = handle;
    ep_evt.events = 0;

    if (evt & kReadEvent) {
        ep_evt.events |= EPOLLIN;
    }
    if (evt & kWriteEvent) {
        ep_evt.events |= EPOLLOUT;
    }
    ep_evt.events |= EPOLLONESHOT;

    if (epoll_ctl(m_epoll_fd, EPOLL_CTL_MOD, handle, &ep_evt) != 0) {
        if (errno == ENOENT) {
            if (epoll_ctl(m_epoll_fd, EPOLL_CTL_ADD, handle, &ep_evt) != 0) {
                return -errno;
            }
            ++m_fd_num;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0xc(%rsp), %rcx
movl %esi, 0x4(%rcx)
movl %edx, %eax
andl $0x1, %eax
andl $0x2, %edx
leal (%rax,%rdx,2), %eax
addl $0x40000000, %eax       # imm = 0x40000000
movl %eax, (%rcx)
movl 0x8(%rdi), %edi
movl $0x3, %esi
movl %r14d, %edx
callq 0x2260
xorl %ebp, %ebp
testl %eax, %eax
je 0x2fd0
callq 0x2040
cmpl $0x2, (%rax)
jne 0x2fd0
movq %rax, %r15
movl 0x8(%rbx), %edi
leaq 0xc(%rsp), %rcx
movl $0x1, %esi
movl %r14d, %edx
callq 0x2260
testl %eax, %eax
je 0x2fcd
xorl %ebp, %ebp
subl (%r15), %ebp
jmp 0x2fd0
incl 0xc(%rbx)
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./other/timeheap.hpp
// Function: time_heap::tick()
void tick()
    {
        heap_timer *tmp = array[0];
        time_t cur = time(nullptr);
        while (!empty()) {
            if (!tmp) {
                break;
            }
            if (tmp->expire > cur) {
                break;
            }
            if (array[0]->cb_func) {
                array[0]->cb_func(array[0]->user_data);
            }
            pop_timer();
            tmp = array[0];
        }
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
movq (%rax), %r15
xorl %edi, %edi
callq 0x21d0
movq %rax, %r14
cmpq $0x0, 0x10(%rbx)
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
je 0x3168
popq %rbx
popq %r14
popq %r15
retq
cmpq %r14, (%r15)
jg 0x3162
movq (%rbx), %rax
movq (%rax), %rcx
movq 0x8(%rcx), %rax
testq %rax, %rax
je 0x3182
movq 0x10(%rcx), %rdi
callq *%rax
movq %rbx, %rdi
callq 0x319e
cmpq $0x0, 0x10(%rbx)
je 0x3162
movq (%rbx), %rax
movq (%rax), %r15
testq %r15, %r15
jne 0x3168
jmp 0x3162
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./other/timeheap.hpp
// Function: time_heap::percolate_down(unsigned long)
void percolate_down(size_t hole)
    {
        heap_timer *temp = array[hole];
        size_t child = 0;
        for (; ((hole * 2 + 1) <= (cur_size - 1)); hole = child) {
            child = hole * 2 + 1;
            if ((child < (cur_size - 1)) && (array[child + 1]->expire < array[child]->expire)) {
                ++child;
            }
            if (array[child]->expire < temp->expire) {
                array[hole] = array[child];
            } else {
                break;
            }
        }
        array[hole] = temp;
    }

// Assembly:
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movq (%rax,%rsi,8), %rax
decq %rcx
leaq (%rsi,%rsi), %r9
cmpq %rcx, %r9
jae 0x324d
movq (%rax), %rdx
movq %r9, %r8
orq $0x1, %r8
cmpq %rcx, %r8
jae 0x322f
movq (%rdi), %r10
movq 0x10(%r10,%r9,8), %r11
movq (%r11), %r11
movq (%r10,%r8,8), %r10
cmpq (%r10), %r11
jge 0x322f
addq $0x2, %r9
movq %r9, %r8
movq (%rdi), %r9
movq (%r9,%r8,8), %r10
cmpq %rdx, (%r10)
jge 0x324d
movq %r10, (%r9,%rsi,8)
leaq (%r8,%r8), %r9
movq %r8, %rsi
cmpq %rcx, %r9
jb 0x3208
jmp 0x3250
movq %rsi, %r8
movq (%rdi), %rcx
movq %rax, (%rcx,%r8,8)
retq
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/reactor/reactor.cc
// Function: reactor::ReactorImplementation::RegisterHandler(reactor::EventHandler*, unsigned int)
int ReactorImplementation::RegisterHandler(EventHandler *handler, event_t evt)
{
    if (handler == nullptr) {
        return -1;
    }
    handle_t handle = handler->GetHandle();
    std::map<handle_t, EventHandler *>::iterator it = m_handlers.find(handle);
    if (it == m_handlers.end()) {
        m_handlers[handle] = handler;
    }
    return m_demultiplexer->RequestEvent(handle, evt);
}

// Assembly:
testq %rsi, %rsi
je 0x3596
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
movl %eax, 0xc(%rsp)
movq 0x18(%r14), %rsi
leaq 0x10(%r14), %rcx
movq %rcx, %rdx
testq %rsi, %rsi
je 0x3555
movq %rcx, %rdx
xorl %edi, %edi
cmpl %eax, 0x20(%rsi)
setl %dil
cmovgeq %rsi, %rdx
movq 0x10(%rsi,%rdi,8), %rsi
testq %rsi, %rsi
jne 0x353e
movq %rcx, %rsi
cmpq %rcx, %rdx
je 0x3567
cmpl 0x20(%rdx), %eax
cmovlq %rcx, %rdx
movq %rdx, %rsi
cmpq %rcx, %rsi
jne 0x357d
leaq 0x8(%r14), %rdi
leaq 0xc(%rsp), %rsi
callq 0x30d4
movq %r15, (%rax)
movq (%r14), %rdi
movl 0xc(%rsp), %esi
movq (%rdi), %rax
movl %ebx, %edx
callq *0x18(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/reactor/reactor.cc
// Function: reactor::ReactorImplementation::RemoveHandler(reactor::EventHandler*)
int ReactorImplementation::RemoveHandler(EventHandler *handler)
{
    if (handler == nullptr) {
        return -1;
    }

    handle_t handle = handler->GetHandle();
    m_handlers.erase(handle);
    return m_demultiplexer->UnrequestEvent(handle);
}

// Assembly:
testq %rsi, %rsi
je 0x35f6
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x10(%rax)
leaq 0xc(%rsp), %r14
movl %eax, (%r14)
leaq 0x8(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x38b6
movq %r15, %rdi
movq %rax, %rsi
callq 0x392e
movq (%rbx), %rdi
movl (%r14), %esi
movq (%rdi), %rax
callq *0x20(%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/reactor/reactor.cc
// Function: reactor::ReactorImplementation::HandleEvents()
void ReactorImplementation::HandleEvents()
{
    int timeout = 0;
    if (m_eventtimer->top() == nullptr) {
        timeout = 0;
    } else {
        timeout = ((m_eventtimer->top())->expire - time(nullptr)) * 1000;
    }
    m_demultiplexer->WaitEvents(&m_handlers, timeout, m_eventtimer);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rax
xorl %edx, %edx
cmpq $0x0, 0x10(%rax)
je 0x3637
movq (%rax), %rcx
cmpq $0x0, (%rcx)
je 0x3637
movq (%rax), %rax
movq (%rax), %rax
movl (%rax), %ebp
xorl %edi, %edi
callq 0x21d0
subl %eax, %ebp
imull $0x3e8, %ebp, %edx      # imm = 0x3E8
leaq 0x8(%rbx), %rsi
movq (%rbx), %rdi
movq 0x38(%rbx), %rcx
movq (%rdi), %rax
movq 0x10(%rax), %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmpq *%rax
nop
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/reactor/reactor.cc
// Function: reactor::Reactor::RegisterTimerTask(heap_timer*)
int ReactorImplementation::RegisterTimerTask(heap_timer *timerevent)
{
    if (timerevent == nullptr) {
        return -1;
    }
    m_eventtimer->add_timer(timerevent);
    return 0;
}

// Assembly:
testq %rsi, %rsi
je 0x366b
pushq %rax
movq (%rdi), %rax
movq 0x38(%rax), %rdi
callq 0x376e
xorl %eax, %eax
addq $0x8, %rsp
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./other/timeheap.hpp
// Function: time_heap::add_timer(heap_timer*)
int add_timer(heap_timer *timer)
    {
        if (timer == nullptr) {
            return -1;
        }
        if (cur_size >= capacity) {
            resize();
        }
        int hole = cur_size++;
        int parent = 0;
        for (; hole > 0; hole = parent) {
            parent = (hole - 1) / 2;
            if (array[parent]->expire <= timer->expire) {
                break;
            }
            array[hole] = array[parent];
        }
        array[hole] = timer;
        return 0;
    }

// Assembly:
testq %rsi, %rsi
je 0x37da
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdi), %rax
cmpq 0x8(%rdi), %rax
jb 0x378f
movq %r14, %rdi
callq 0x3830
movq 0x10(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x10(%r14)
testl %eax, %eax
jle 0x37c4
movq (%rbx), %rdx
leal -0x1(%rax), %esi
movl %esi, %ecx
shrl %ecx
movq (%r14), %rdi
movq (%rdi,%rcx,8), %r8
cmpq %rdx, (%r8)
jle 0x37c4
movl %eax, %eax
movq %r8, (%rdi,%rax,8)
movl %ecx, %eax
cmpl $0x1, %esi
ja 0x37a2
jmp 0x37c6
movl %eax, %ecx
movq (%r14), %rax
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
// File: /workspace/github_cpp_makefile_star2_O1/xuchanglong[P]SimpleReactorImplemention-comments/./other/timeheap.hpp
// Function: time_heap::resize()
void resize()
    {
        heap_timer **temp = new heap_timer *[2 * capacity];
        for (size_t i = 0; i < 2 * capacity; ++i) {
            temp[i] = nullptr;
        }
        if (!temp) {
            throw std::exception();
        }
        capacity = 2 * capacity;
        for (size_t i = 0; i < cur_size; ++i) {
            temp[i] = array[i];
        }
        delete[] array;
        array = temp;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r12
movabsq $0x7000000000000000, %rax # imm = 0x7000000000000000
andq %r12, %rax
movq %r12, %r15
shlq $0x4, %r15
xorl %edi, %edi
negq %rax
sbbq %rdi, %rdi
orq %r15, %rdi
callq 0x2030
movq %rax, %r14
addq %r12, %r12
je 0x3878
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x2130
movq %r12, 0x8(%rbx)
movq 0x10(%rbx), %rax
testq %rax, %rax
je 0x389a
movq (%rbx), %rcx
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movq %rsi, (%r14,%rdx,8)
incq %rdx
cmpq %rdx, %rax
jne 0x388a
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x38a7
callq 0x2250
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/input.cpp
// Function: InputManager(int, char const**, Makefile&)
void InputManager(int argc, char const **argv, Makefile &mk){

	// No parameters
	if(argc==1){ printf(" (i) > No arguments given using defaults..\n"); return; }
	
	// Only one parameter => use it as a name
	else if(argc==2){ 
		if( argv[1][0]!='-' ){
			printf(" (i) > Only one argument given. Using '%s' as a Name\n", argv[1]);
			mk.setName(argv[1]);
			return;
		}
	}

	// More than one parameter
	int count=1; // Start from 2nd argument
	argc=argc-1; // Use argc as a total counter

	while(count<=argc){
		// HandleParameter changes count for ease
		if( HandleParameter(count, argc, argv, mk)!=0 ){ exit(1); } 
	}

	// Compilation Parameter read mode
	if(mk.getCompParam()){ mk.readCompParam(); }

	// Execution Parameter read mode
	if(mk.getExecParam()){ mk.readExecParam(); }

	return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %r15d
movl %edi, 0xc(%rsp)
cmpl $0x2, %edi
je 0x24aa
cmpl $0x1, %r15d
jne 0x24b3
leaq 0x2e8e(%rip), %rdi      # 0x5326
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x2240
movq 0x8(%r14), %rsi
cmpb $0x2d, (%rsi)
jne 0x251d
leaq 0x10(%rsp), %r12
movl $0x1, (%r12)
leal -0x1(%r15), %eax
leaq 0xc(%rsp), %r13
movl %eax, (%r13)
cmpl %r15d, 0x10(%rsp)
jge 0x24f3
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x259b
testl %eax, %eax
je 0x24cd
movl $0x1, %edi
callq 0x21d0
movq %rbx, %rdi
callq 0x3c56
testb %al, %al
je 0x2507
movq %rbx, %rdi
callq 0x418a
movq %rbx, %rdi
callq 0x3c5e
testb %al, %al
je 0x2567
movq %rbx, %rdi
callq 0x41f0
jmp 0x2567
leaq 0x2ae0(%rip), %rdi      # 0x5004
xorl %eax, %eax
callq 0x2040
movq 0x8(%r14), %rsi
leaq 0x10(%rsp), %r14
leaq 0xb(%rsp), %rdx
movq %r14, %rdi
callq 0x34f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3cec
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2567
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2593
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/input.cpp
// Function: printInputFormat()
void printInputFormat(void){
	printf("\n          ------ Argument Format ------ \n // Default values on ()\n");
	printf(" >> Set Executable Name:     -n < name (a.out) >\n");
	printf(" >> Set Source file Format:  -f < source file format (.cpp) >\n");
	printf(" >> Set Header file Format:  -h < header file format (.hpp) >\n");
	printf(" >> Set Compiler:            -c < compiler name (g++) >\n");
	printf(" >> Toggle gdb:                     -db  (1)\n");
	printf(" >> Toggle valgrind:                -vg  (1)\n");
	printf(" >> Toggle compilation parameters:  -p   (0)\n");
	printf(" >> Toggle execution parameters:    -e   (0)\n");
	printf(" >> Toggle auto project organizer:  -org (0)\n");
	printf(" >> Print help:                     --help\n");
	
	printf("\n (i)> The <...> fields are REQUIRED right after their corresponding parameter\n");
	printf(" (i)> Rogue Strings and Non-Supported parameters will cause termination\n");
	printf(" (i)> Give Format by writing just the last chars (example: file.c => -f c) \n");
	return;
}

// Assembly:
pushq %rax
leaq 0x27e7(%rip), %rdi      # 0x5351
callq 0x2240
leaq 0x281e(%rip), %rdi      # 0x5394
callq 0x2240
leaq 0x2843(%rip), %rdi      # 0x53c5
callq 0x2240
leaq 0x2875(%rip), %rdi      # 0x5403
callq 0x2240
leaq 0x28a7(%rip), %rdi      # 0x5441
callq 0x2240
leaq 0x28d3(%rip), %rdi      # 0x5479
callq 0x2240
leaq 0x28f4(%rip), %rdi      # 0x54a6
callq 0x2240
leaq 0x2915(%rip), %rdi      # 0x54d3
callq 0x2240
leaq 0x2936(%rip), %rdi      # 0x5500
callq 0x2240
leaq 0x2957(%rip), %rdi      # 0x552d
callq 0x2240
leaq 0x2978(%rip), %rdi      # 0x555a
callq 0x2240
leaq 0x2997(%rip), %rdi      # 0x5585
callq 0x2240
leaq 0x29da(%rip), %rdi      # 0x55d4
callq 0x2240
leaq 0x2a16(%rip), %rdi      # 0x561c
popq %rax
jmp 0x2240
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/input.cpp
// Function: changeFormat(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 changeFormat(string &str, const string frm){
	int pos=str.find_last_of(".");
	int len=str.length() - pos;
	str.erase(pos+1, len);
	str+=frm;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1d0a(%rip), %rsi      # 0x51bd
movl $0x1, %ecx
movq $-0x1, %rdx
callq 0x22c0
movl 0x8(%r14), %ecx
subl %eax, %ecx
incl %eax
movslq %eax, %rsi
movslq %ecx, %rdx
movq %r14, %rdi
callq 0x2070
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x20b0
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/main.cpp
// Function: main
int main(int argc, char const **argv){

	// Create a Makefile with default values
	Makefile mk;

	// Parse the user arguments and update Makefile values
	InputManager(argc, argv, mk);

	// Get a list of files from the targeted directory
	SystemInput(mk);

	// Create and write the actual makefile
	Output(mk);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x370c
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x246c
leaq 0x8(%rsp), %rdi
callq 0x2c64
leaq 0x8(%rsp), %rdi
callq 0x42e8
leaq 0x8(%rsp), %rdi
callq 0x362c
xorl %eax, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x362c
movq %rbx, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/makefileS.cpp
// Function: Makefile::Makefile()
Makefile::Makefile(){
	Name=NAME;
	Compiler=COMP;
	SourceFormat=FRMT;
	HeaderFormat=HEAD;
	debugEnable=DEBG;
	valgrindEnable=VALG;
	installEnable=INST;
	parameterEnable=PARM;
	execParamEnable=EXEC;
	organizeEnable=ORGN;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x18(%rsp)
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
leaq 0x60(%rdi), %r12
leaq 0x70(%rdi), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movb %al, 0x70(%rdi)
leaq 0x98(%rdi), %r14
movq %r14, 0x88(%rdi)
movq %rax, 0x90(%rdi)
movb %al, 0x98(%rdi)
leaq 0xb8(%rdi), %rbp
movq %rbp, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
movb %al, 0xb8(%rdi)
leaq 0xd8(%rdi), %r15
movq %r15, 0xc8(%rdi)
movq %rax, 0xd0(%rdi)
movb %al, 0xd8(%rdi)
leaq 0xf8(%rdi), %r13
movq %r13, 0xe8(%rdi)
movq %rax, 0xf0(%rdi)
movb %al, 0xf8(%rdi)
leaq 0x1eb2(%rip), %rcx      # 0x56a8
movl $0x5, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x2250
movq 0x28(%rbx), %rdx
leaq 0x1e9e(%rip), %rcx      # 0x56ae
movl $0x3, %r8d
movq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x2250
movq 0x48(%rbx), %rdx
leaq 0x1e85(%rip), %rcx      # 0x56b2
movl $0x3, %r8d
movq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2250
movq 0x68(%rbx), %rdx
leaq 0x1e6c(%rip), %rcx      # 0x56b6
movl $0x3, %r8d
movq %r12, %rdi
xorl %esi, %esi
callq 0x2250
movl $0x10101, 0x80(%rbx)    # imm = 0x10101
movw $0x0, 0x84(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, 0x30(%rsp)
movq 0xe8(%rbx), %rdi
cmpq %r13, %rdi
je 0x3899
movq (%r13), %rsi
incq %rsi
callq 0x2190
movq 0xc8(%rbx), %rdi
cmpq %r15, %rdi
je 0x38b0
movq (%r15), %rsi
incq %rsi
callq 0x2190
movq 0xa8(%rbx), %rdi
cmpq %rbp, %rdi
je 0x38c8
movq (%rbp), %rsi
incq %rsi
callq 0x2190
movq 0x88(%rbx), %rdi
cmpq %r14, %rdi
je 0x38df
movq (%r14), %rsi
incq %rsi
callq 0x2190
movq (%r12), %rdi
cmpq (%rsp), %rdi
je 0x38f8
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x3917
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq 0x28(%rsp), %rax
movq (%rax), %rdi
cmpq 0x10(%rsp), %rdi
je 0x3936
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq (%rbx), %rdi
cmpq 0x18(%rsp), %rdi
je 0x3950
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq 0x30(%rsp), %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/makefileS.cpp
// Function: Makefile::Makefile(Makefile const&)
Makefile::Makefile(const Makefile &mkfl){
	Name=mkfl.Name;
	Compiler=mkfl.Compiler;
	SourceFormat=mkfl.SourceFormat;
	HeaderFormat=mkfl.HeaderFormat;
	debugEnable=mkfl.debugEnable;
	valgrindEnable=mkfl.valgrindEnable;
	installEnable=mkfl.installEnable;
	parameterEnable=mkfl.parameterEnable;
	execParamEnable=mkfl.execParamEnable;
	organizeEnable=mkfl.organizeEnable;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r13
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x18(%rsp)
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x10(%rsp)
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movb %al, 0x30(%rdi)
leaq 0x40(%rdi), %rcx
movq %rcx, 0x28(%rsp)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x8(%rsp)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movb %al, 0x50(%rdi)
leaq 0x60(%rdi), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x70(%rdi), %rcx
movq %rcx, (%rsp)
movq %rcx, 0x60(%rdi)
movq %rax, 0x68(%rdi)
movb %al, 0x70(%rdi)
leaq 0x98(%rdi), %rbp
movq %rbp, 0x88(%rdi)
movq %rax, 0x90(%rdi)
movb %al, 0x98(%rdi)
leaq 0xb8(%rdi), %r15
movq %r15, 0xa8(%rdi)
movq %rax, 0xb0(%rdi)
movb %al, 0xb8(%rdi)
leaq 0xd8(%rdi), %r14
movq %r14, 0xc8(%rdi)
movq %rax, 0xd0(%rdi)
movb %al, 0xd8(%rdi)
leaq 0xf8(%rdi), %r12
movq %r12, 0xe8(%rdi)
movq %rax, 0xf0(%rdi)
movb %al, 0xf8(%rdi)
callq 0x20f0
leaq 0x20(%r13), %rsi
movq 0x30(%rsp), %rdi
callq 0x20f0
leaq 0x40(%r13), %rsi
movq 0x28(%rsp), %rdi
callq 0x20f0
leaq 0x60(%r13), %rsi
movq 0x20(%rsp), %rdi
callq 0x20f0
movb 0x80(%r13), %al
movb %al, 0x80(%rbx)
movb 0x81(%r13), %al
movb %al, 0x81(%rbx)
movb 0x82(%r13), %al
movb %al, 0x82(%rbx)
movb 0x83(%r13), %al
movb %al, 0x83(%rbx)
movb 0x84(%r13), %al
movb %al, 0x84(%rbx)
movb 0x85(%r13), %al
movb %al, 0x85(%rbx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
movq 0xe8(%rbx), %rdi
cmpq %r12, %rdi
je 0x3aec
movq (%r12), %rsi
incq %rsi
callq 0x2190
movq 0xc8(%rbx), %rdi
cmpq %r14, %rdi
je 0x3b03
movq (%r14), %rsi
incq %rsi
callq 0x2190
movq 0xa8(%rbx), %rdi
cmpq %r15, %rdi
je 0x3b1a
movq (%r15), %rsi
incq %rsi
callq 0x2190
movq 0x88(%rbx), %rdi
cmpq %rbp, %rdi
je 0x3b32
movq (%rbp), %rsi
incq %rsi
callq 0x2190
movq 0x20(%rsp), %rax
movq (%rax), %rdi
cmpq (%rsp), %rdi
je 0x3b4f
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq 0x28(%rsp), %rax
movq (%rax), %rdi
cmpq 0x8(%rsp), %rdi
je 0x3b6e
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq 0x30(%rsp), %rax
movq (%rax), %rdi
cmpq 0x10(%rsp), %rdi
je 0x3b8d
movq 0x10(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq (%rbx), %rdi
cmpq 0x18(%rsp), %rdi
je 0x3ba7
movq 0x18(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x2190
movq %r13, %rdi
callq 0x2290
nop
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/output.cpp
// Function: mkflBody[abi:cxx11]()
string mkflBody(void){
	string buf;
	buf+="\nall: $(OUT)\n\n";
	buf+="$(OUT): $(OBJS)\n";
	buf+="\t$(CXX) -o $(OUT) $(OBJS)\n\n";
	buf+="%.o: %.c\n";
	buf+="\t$(CXX) -c -o $@ $<\n\n";
	buf+="run: $(OUT)\n";
	buf+="\t./$(OUT) $(EXECUTION_PARAMETERS)\n\n";
	return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x105c(%rip), %rsi      # 0x589a
callq 0x22b0
leaq 0x105f(%rip), %rsi      # 0x58a9
movq %rbx, %rdi
callq 0x22b0
leaq 0x1061(%rip), %rsi      # 0x58ba
movq %rbx, %rdi
callq 0x22b0
leaq 0x106e(%rip), %rsi      # 0x58d6
movq %rbx, %rdi
callq 0x22b0
leaq 0x1069(%rip), %rsi      # 0x58e0
movq %rbx, %rdi
callq 0x22b0
leaq 0x1070(%rip), %rsi      # 0x58f6
movq %rbx, %rdi
callq 0x22b0
leaq 0x106e(%rip), %rsi      # 0x5903
movq %rbx, %rdi
callq 0x22b0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x48bc
movq (%r15), %rsi
incq %rsi
callq 0x2190
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O1/rvthak[P]Makefile-Maker/output.cpp
// Function: mkflInst[abi:cxx11]()
string mkflInst(void){
	string buf;
	buf+="\ninstall: $(OUT)\n";
	buf+="\tsudo cp $(OUT) /usr/local/bin\n";
	buf+="\t@echo Program Installed in /usr/local/bin\n";
	buf+="\t@echo You can now delete this folder safely\n\n";
	return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x1041(%rip), %rsi      # 0x5927
callq 0x22b0
leaq 0x1047(%rip), %rsi      # 0x5939
movq %rbx, %rdi
callq 0x22b0
leaq 0x1058(%rip), %rsi      # 0x5959
movq %rbx, %rdi
callq 0x22b0
leaq 0x1075(%rip), %rsi      # 0x5985
movq %rbx, %rdi
callq 0x22b0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4937
movq (%r15), %rsi
incq %rsi
callq 0x2190
movq %r14, %rdi
callq 0x2290