LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: syntaxnum
static int syntaxnum(pointer p) {
  const char *s = strvalue(car(p));
  switch (strlength(car(p))) {
  case 2:
    if (s[0] == 'i')
      return OP_IF0;            /* if */
    else
      return OP_OR0;            /* or */
  case 3:
    if (s[0] == 'a')
      return OP_AND0;           /* and */
    else
      return OP_LET0;           /* let */
  case 4:
    switch (s[3]) {
    case 'e':
      return OP_CASE0;          /* case */
    case 'd':
      return OP_COND0;          /* cond */
    case '*':
      return OP_LET0AST;        /* let* */
    default:
      return OP_SET0;           /* set! */
    }
  case 5:
    switch (s[2]) {
    case 'g':
      return OP_BEGIN;          /* begin */
    case 'l':
      return OP_DELAY;          /* delay */
    case 'c':
      return OP_MACRO0;         /* macro */
    default:
      return OP_QUOTE;          /* quote */
    }
  case 6:
    switch (s[2]) {
    case 'm':
      return OP_LAMBDA;         /* lambda */
    case 'f':
      return OP_DEF0;           /* define */
    default:
      return OP_LET0REC;        /* letrec */
    }
  default:
    return OP_C0STREAM;         /* cons-stream */
  }
}

// Assembly:
movq 0x8(%rdi), %rax
movl 0x10(%rax), %ecx
addl $-0x2, %ecx
cmpl $0x4, %ecx
ja 0xb545
movq 0x8(%rax), %rax
leaq 0x1ee7(%rip), %rdx      # 0xd3b4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpb $0x69, (%rax)
movl $0x16, %ecx
movl $0x28, %eax
jmp 0xb541
movb 0x2(%rax), %al
cmpb $0x66, %al
movl $0x12, %ecx
movl $0x20, %edx
cmovel %ecx, %edx
cmpb $0x6d, %al
movl $0xe, %eax
cmovnel %edx, %eax
retq
movzbl 0x3(%rax), %eax
cmpl $0x2a, %eax
je 0xb551
cmpl $0x65, %eax
je 0xb54b
cmpl $0x64, %eax
jne 0xb55d
movl $0x23, %eax
retq
movzbl 0x2(%rax), %eax
cmpl $0x63, %eax
je 0xb563
cmpl $0x67, %eax
je 0xb557
cmpl $0x6c, %eax
jne 0xb569
movl $0x25, %eax
retq
cmpb $0x61, (%rax)
movl $0x26, %ecx
movl $0x1a, %eax
cmovel %ecx, %eax
retq
movl $0x2a, %eax
retq
movl $0x2e, %eax
retq
movl $0x1d, %eax
retq
movl $0x15, %eax
retq
movl $0x18, %eax
retq
movl $0x2c, %eax
retq
movl $0x11, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: port_close
static void port_close(scheme * sc, pointer p, int flag) {
  port *pt = p->_object._port;
  pt->kind &= ~flag;
  if ((pt->kind & (port_input | port_output)) == 0) {
    if (pt->kind & port_file) {

#if SHOW_ERROR_LINE
      /* Cleanup is here so (close-*-port) functions could work too */
      pt->rep.stdio.curr_line = 0;

      if (pt->rep.stdio.filename)
        sc->free(pt->rep.stdio.filename);
#endif

      fclose(pt->rep.stdio.file);
    }
    pt->kind = port_free;
  }
}

// Assembly:
pushq %rbx
movq 0x8(%rsi), %rbx
movzbl (%rbx), %esi
notb %dl
movzbl %dl, %ecx
andl %esi, %ecx
movb %cl, (%rbx)
testb $0x30, %cl
jne 0xb5ac
testb $0x1, %cl
je 0xb5a9
movq %rdi, %rax
movl $0x0, 0x14(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xb5a0
callq *0x8(%rax)
movq 0x8(%rbx), %rdi
callq 0x40b0
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: inchar
static int inchar(scheme * sc) {
  int c;
  port *pt;
  if (sc->backchar >= 0) {
    c = sc->backchar;
    sc->backchar = -1;
    return c;
  }
  pt = sc->inport->_object._port;
  if (pt->kind & port_saw_EOF) {
    return EOF;
  }
  c = utf8_inchar(pt);
  if (c == EOF && sc->inport == sc->loadport) {
    /* Instead, set port_saw_EOF */
    pt->kind |= port_saw_EOF;
    return EOF;
  }
  return c;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x2c(%rdi), %eax
testl %eax, %eax
js 0xb5cc
movl $0xffffffff, 0x2c(%rbx) # imm = 0xFFFFFFFF
jmp 0xb661
movq 0x170(%rbx), %rax
movq 0x8(%rax), %r14
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb $0x40, (%r14)
jne 0xb661
movq %r14, %rdi
callq 0xb66d
cmpl $0x80, %eax
jl 0xb643
movb %al, 0x4(%rsp)
xorl %ecx, %ecx
cmpl $0xf0, %eax
setge %cl
addq $0x3, %rcx
cmpl $0xe0, %eax
movl $0x2, %r15d
cmovgeq %rcx, %r15
movl $0x1, %r12d
movq %r14, %rdi
callq 0xb66d
cmpl $-0x1, %eax
je 0xb63e
movb %al, 0x4(%rsp,%r12)
incq %r12
cmpq %r12, %r15
jne 0xb618
leaq 0x4(%rsp), %rdi
callq 0x64fa
jmp 0xb643
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
jne 0xb661
movq 0x170(%rbx), %rcx
cmpq 0x188(%rbx), %rcx
jne 0xb661
orb $0x40, (%r14)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: basic_inchar
static int basic_inchar(port * pt) {
  if (pt->kind & port_file) {
    return fgetc(pt->rep.stdio.file);
  } else {
    if (*pt->rep.string.curr == 0 ||
        pt->rep.string.curr == pt->rep.string.past_the_end) {
      return EOF;
    } else {
      return *pt->rep.string.curr++;
    }
  }
}

// Assembly:
testb $0x1, (%rdi)
jne 0xb692
movq 0x18(%rdi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x0, (%rcx)
je 0xb691
cmpq 0x10(%rdi), %rcx
je 0xb691
leaq 0x1(%rcx), %rax
movq %rax, 0x18(%rdi)
movsbl (%rcx), %eax
retq
movq 0x8(%rdi), %rdi
jmp 0x4130
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: list_star
static pointer list_star(scheme * sc, pointer d) {
  pointer p, q;
  if (cdr(d) == sc->NIL) {
    return car(d);
  }
  p = cons(sc, car(d), cdr(d));
  q = p;
  while (cdr(cdr(p)) != sc->NIL) {
    d = cons(sc, car(p), cdr(p));
    if (cdr(cdr(p)) != sc->NIL) {
      p = cdr(d);
    }
  }
  cdr(p) = car(cdr(p));
  return q;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0x8(%rsi), %r12
movq 0x10(%rsi), %rbx
cmpq 0x90(%rdi), %rbx
je 0xb724
movq %rdi, %r15
movq %r12, %rsi
movq %rbx, %rdx
callq 0x4689
movq %rax, %r14
movl $0x5, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x10(%rbx), %rax
cmpq 0x90(%r15), %rax
je 0xb729
movq %r14, %r13
movq 0x8(%r13), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x4689
movl $0x5, (%rax)
movq %r12, 0x8(%rax)
movq %rbx, 0x10(%rax)
movq 0x10(%r13), %rcx
movq 0x90(%r15), %rax
cmpq %rax, 0x10(%rcx)
je 0xb718
movq %rbx, %r13
movq 0x10(%r13), %rbx
cmpq %rax, 0x10(%rbx)
jne 0xb6e4
jmp 0xb72c
movq %r12, %r14
jmp 0xb738
movq %r14, %r13
addq $0x10, %r13
movq 0x8(%rbx), %rax
movq %rax, (%r13)
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: round_per_R5RS
static double round_per_R5RS(double x) {
  double fl = floor(x);
  double ce = ceil(x);
  double dfl = x - fl;
  double dce = ce - x;
  if (dfl > dce) {
    return ce;
  } else if (dfl < dce) {
    return fl;
  } else {
    if (fmod(fl, 2.0) == 0.0) { /* I imagine this holds */
      return fl;
    } else {
      return ce;
    }
  }
}

// Assembly:
subq $0x28, %rsp
movsd %xmm0, (%rsp)
callq 0x4260
movaps %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
callq 0x42c0
movsd (%rsp), %xmm3
movapd 0x10(%rsp), %xmm2
movapd %xmm0, %xmm1
subsd %xmm3, %xmm0
subsd %xmm2, %xmm3
ucomisd %xmm0, %xmm3
ja 0xb7bd
ucomisd %xmm3, %xmm0
jbe 0xb78b
movapd %xmm2, %xmm1
jmp 0xb7bd
movapd %xmm1, (%rsp)
movsd 0x1cf8(%rip), %xmm1     # 0xd490
movapd %xmm2, %xmm0
callq 0x4150
xorpd %xmm1, %xmm1
cmpeqsd %xmm0, %xmm1
movapd 0x10(%rsp), %xmm0
andpd %xmm1, %xmm0
andnpd (%rsp), %xmm1
orpd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: num_rem
static num num_rem(num a, num b) {
  num ret;
  long e1, e2, res;
  ret.is_fixnum = a.is_fixnum && b.is_fixnum;
  e1 = num_ivalue(a);
  e2 = num_ivalue(b);
  res = e1 % e2;
  /* remainder should have same sign as first operand */
  if (res > 0) {
    if (e1 < 0) {
      res -= labs(e2);
    }
  } else if (res < 0) {
    if (e1 > 0) {
      res += labs(e2);
    }
  }
  if (ret.is_fixnum) {
    ret.value.ivalue = res;
  } else {
    ret.value.rvalue = res;
  }
  return ret;
}

// Assembly:
testb %dil, %dil
movq %rsi, %xmm0
cvttsd2si %xmm0, %r9
cmovneq %rsi, %r9
movl %edx, %r8d
movq %rcx, %xmm0
cvttsd2si %xmm0, %rsi
testb %r8b, %r8b
cmovneq %rcx, %rsi
movq %r9, %rax
cqto
idivq %rsi
testq %rdx, %rdx
jle 0xb838
testq %r9, %r9
jns 0xb852
movq %rsi, %rax
negq %rax
cmovnsq %rsi, %rax
jmp 0xb84f
sete %al
testq %r9, %r9
setle %cl
orb %al, %cl
jne 0xb852
movq %rsi, %rax
negq %rax
cmovsq %rsi, %rax
addq %rax, %rdx
testb %r8b, %r8b
setne %cl
testb %dil, %dil
setne %al
andb %cl, %al
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
movq %xmm0, %rcx
cmovneq %rdx, %rcx
movq %rcx, %rdx
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: num_mod
static num num_mod(num a, num b) {
  num ret;
  long e1, e2, res;
  ret.is_fixnum = a.is_fixnum && b.is_fixnum;
  e1 = num_ivalue(a);
  e2 = num_ivalue(b);
  res = e1 % e2;
  /* modulo should have same sign as second operand */
  if ((res < 0) != (e2 < 0) && res) {
    res += e2;
  }
  if (ret.is_fixnum) {
    ret.value.ivalue = res;
  } else {
    ret.value.rvalue = res;
  }
  return ret;
}

// Assembly:
testb %dil, %dil
movq %rsi, %xmm0
cvttsd2si %xmm0, %rax
cmovneq %rsi, %rax
setne %dil
testb %dl, %dl
setne %sil
movq %rcx, %xmm0
cvttsd2si %xmm0, %r8
cmovneq %rcx, %r8
cqto
idivq %r8
movq %rdx, %rax
xorq %r8, %rax
sarq $0x3f, %rax
andq %r8, %rax
testq %rdx, %rdx
cmoveq %rdx, %rax
addq %rax, %rdx
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
movq %xmm0, %rax
andb %dil, %sil
cmoveq %rax, %rdx
movl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: upgrade_string
static void upgrade_string(scheme *sc, pointer p) {
  int len = strlength(p);
  char *s = strvalue(p);
  int *sbig = (int*) sc->malloc((len + 1) * sizeof(int));
  int i;
  sbig[0] = UTFSTR_LEN_SET(len);
  for (i = 0; i < len; i++) {
    sbig[i + 1] = s[i];
  }
  sc->free(s);
  strvalue(p) = (char*) sbig;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x10(%rsi), %r13
movq 0x8(%rsi), %r15
leaq 0x4(,%r13,4), %rdi
callq *(%r14)
movq %rax, %r12
movl %r13d, %eax
shll $0x8, %eax
orl $0x80000080, %eax       # imm = 0x80000080
movl %eax, (%r12)
testq %r13, %r13
jle 0xc216
xorl %eax, %eax
movsbl (%r15,%rax), %ecx
movl %ecx, 0x4(%r12,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xc204
movq %r15, %rdi
callq *0x8(%r14)
movq %r12, 0x8(%rbx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: string_to_utf8
static void string_to_utf8(scheme * sc, char *s, int len) {
  int i, c, d, charsize;
  char *q = sc->strbuff;
  if (IS_ASCII(*s)) {
    charsize = 1;
  } else {
    charsize = 4;
    s += 4;
  }
  for (i = 0; i < len; i++) {
    if (charsize == 1) {
      c = *s++;
    } else {
      c = *((int*) s);
      s += 4;
    }
    if (check_strbuff_size(sc, &q)) {
      if (c != 0) {
        char_to_utf8(c, q, &d);
        q += d;
      } else {
        *q++ = (char) 0xC0;
        *q++ = (char) 0x80;
      }
    }
  }
  *q = 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0xea0(%rdi), %rax
movq %rax, 0x8(%rsp)
testl %edx, %edx
jle 0xc2cd
movl %edx, %ebx
movq %rdi, %r14
movzbl (%rsi), %r12d
movl %r12d, %eax
shrl $0x7, %eax
leaq (%rsi,%rax,4), %r15
testb %r12b, %r12b
js 0xc26e
movsbl (%r15), %ebp
incq %r15
jmp 0xc275
movl (%r15), %ebp
addq $0x4, %r15
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0xc4e2
testl %eax, %eax
je 0xc2c9
movq 0x8(%rsp), %r13
testl %ebp, %ebp
je 0xc2ad
movl %ebp, %edi
movq %r13, %rsi
leaq 0x14(%rsp), %rdx
callq 0xc466
movslq 0x14(%rsp), %rax
addq %r13, %rax
movq %rax, 0x8(%rsp)
jmp 0xc2c9
leaq 0x1(%r13), %rax
movq %rax, 0x8(%rsp)
movb $-0x40, (%r13)
leaq 0x2(%r13), %rax
movq %rax, 0x8(%rsp)
movb $-0x80, 0x1(%r13)
decl %ebx
jne 0xc260
movq 0x8(%rsp), %rax
movb $0x0, (%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: printslashstring
static void printslashstring(scheme * sc, char *p, int len) {
  int i, c, d, charsize;
  char buf[5];
  unsigned char *s = (unsigned char *) p;
  putcharacter(sc, '"');
  if (IS_ASCII(*p)) {
    charsize = 1;
  } else {
    charsize = 4;
    s += 4;
  }
  for (i = 0; i < len; i++) {
    if (charsize == 1) {
      c = *s++;
    } else {
      c = *((int*) s);
      s += 4;
    }
    if (c == '"' || c < ' ' || c == '\\') {
      putcharacter(sc, '\\');
      switch (c) {
      case '"':
        putcharacter(sc, '"');
        break;
      case '\n':
        putcharacter(sc, 'n');
        break;
      case '\t':
        putcharacter(sc, 't');
        break;
      case '\r':
        putcharacter(sc, 'r');
        break;
      case '\\':
        putcharacter(sc, '\\');
        break;
      default:{
          d = c / 16;
          putcharacter(sc, 'x');
          if (d < 10) {
            putcharacter(sc, d + '0');
          } else {
            putcharacter(sc, d - 10 + 'A');
          }
          d = c % 16;
          if (d < 10) {
            putcharacter(sc, d + '0');
          } else {
            putcharacter(sc, d - 10 + 'A');
          }
        }
      }
    } else {
      char_to_utf8(c, buf, &d);
      for (c = 0; c < d; c++) {
        putcharacter(sc, buf[c]);
      }
    }
  }
  putcharacter(sc, '"');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
movl $0x22, %esi
callq 0x4c2e
testl %r12d, %r12d
jle 0xc44b
movzbl (%r15), %eax
movq %rax, 0x10(%rsp)
shrl $0x7, %eax
leaq (%r15,%rax,4), %r15
xorl %ebx, %ebx
movl %r12d, 0x4(%rsp)
cmpb $0x0, 0x10(%rsp)
js 0xc335
movzbl (%r15), %r13d
incq %r15
jmp 0xc33c
movl (%r15), %r13d
addq $0x4, %r15
cmpl $0x20, %r13d
jl 0xc34e
cmpl $0x5c, %r13d
je 0xc34e
cmpl $0x22, %r13d
jne 0xc394
movq %r14, %rdi
movl $0x5c, %esi
callq 0x4c2e
cmpl $0xc, %r13d
jle 0xc37d
cmpl $0xd, %r13d
je 0xc3ca
cmpl $0x22, %r13d
je 0xc435
cmpl $0x5c, %r13d
je 0xc435
jmp 0xc3da
cmpl $0x9, %r13d
je 0xc3d2
cmpl $0xa, %r13d
jne 0xc3da
movl $0x6e, %r13d
jmp 0xc435
movl %r13d, %edi
leaq 0xb(%rsp), %rsi
movq %rsp, %rdx
callq 0xc466
movslq (%rsp), %r13
testq %r13, %r13
jle 0xc440
xorl %ebp, %ebp
movsbl 0xb(%rsp,%rbp), %esi
movq %r14, %rdi
callq 0x4c2e
incq %rbp
cmpq %rbp, %r13
jne 0xc3b3
jmp 0xc440
movl $0x72, %r13d
jmp 0xc435
movl $0x74, %r13d
jmp 0xc435
leal 0xf(%r13), %r12d
testl %r13d, %r13d
cmovnsl %r13d, %r12d
movl %r12d, %ebp
sarl $0x4, %ebp
movl %ebp, (%rsp)
movq %r14, %rdi
movl $0x78, %esi
callq 0x4c2e
leal 0x37(%rbp), %eax
addl $0x30, %ebp
cmpl $0xa0, %r13d
cmovgel %eax, %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x4c2e
andl $-0x10, %r12d
subl %r12d, %r13d
movl %r13d, (%rsp)
cmpl $0x9, %r13d
jg 0xc42c
addl $0x30, %r13d
jmp 0xc430
addl $0x37, %r13d
movl 0x4(%rsp), %r12d
movq %r14, %rdi
movl %r13d, %esi
callq 0x4c2e
incl %ebx
cmpl %r12d, %ebx
jne 0xc325
movq %r14, %rdi
movl $0x22, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4c2e
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: char_to_utf8
static void char_to_utf8(int c, char *p, int *plen) {
  unsigned char *s = (unsigned char *) p;
  int bytes;
  if (c < 0 || c > 0x10FFFF) {
    c = '?';
  }
  if (c < 0x80) {
    *s++ = (unsigned char) c;
    *s = 0;
  } else {
    bytes = (c < 0x800) ? 2 : ((c < 0x10000) ? 3 : 4);
    s[bytes] = 0;
    s[0] = 0x80;
    while (--bytes) {
      s[0] |= (0x80 >> bytes);
      s[bytes] = (unsigned char) (0x80 | (c & 0x3F));
      c >>= 6;
    }
    s[0] |= (unsigned char) c;
  }
  *plen = strlen(p);
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
cmpl $0x110000, %edi         # imm = 0x110000
movl $0x3f, %eax
cmovbl %edi, %eax
cmpl $0x7f, %eax
ja 0xc485
movb %al, (%rsi)
movb $0x0, 0x1(%rsi)
jmp 0xc4d6
cmpl $0x10000, %eax          # imm = 0x10000
movl $0x4, %edx
sbbl $0x0, %edx
cmpl $0x800, %eax            # imm = 0x800
movl $0x2, %ecx
cmovael %edx, %ecx
movb $0x0, (%rsi,%rcx)
movb $-0x80, (%rsi)
decl %ecx
leaq (%rcx,%rsi), %rdi
movb $-0x80, %dl
movl $0x80, %r8d
shrl %cl, %r8d
orb %r8b, %dl
movl %eax, %r8d
andb $0x3f, %r8b
orb $-0x80, %r8b
movb %r8b, (%rdi)
shrl $0x6, %eax
decq %rdi
decl %ecx
jne 0xc4ae
orb %al, %dl
movb %dl, (%rsi)
movq %rsi, %rdi
callq 0x40c0
movl %eax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: check_strbuff_size
static int check_strbuff_size(scheme * sc, char **p) {
  char *t;
  int len = *p - sc->strbuff;
  if (len + 4 < sc->strbuff_size) {
    return 1;
  }
  sc->strbuff_size *= 2;
  if (sc->strbuff_size >= STRBUFF_MAX_SIZE) {
    sc->strbuff_size /= 2;
    return 0;
  }
  t = sc->malloc(sc->strbuff_size);
  memcpy(t, sc->strbuff, len);
  *p = t + len;
  sc->free(sc->strbuff);
  sc->strbuff = t;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq (%rsi), %r13
subq 0xea0(%rdi), %r13
leal 0x4(%r13), %ecx
movl 0xea8(%rdi), %eax
movl $0x1, %ebx
cmpl %eax, %ecx
jl 0xc560
movq %rdi, %r14
movslq %eax, %rdi
addq %rdi, %rdi
movl %edi, 0xea8(%r14)
cmpl $0x8000, %eax           # imm = 0x8000
jl 0xc52a
movl %eax, 0xea8(%r14)
xorl %ebx, %ebx
jmp 0xc560
movq %rsi, %r15
callq *(%r14)
movq %rax, %r12
movq 0xea0(%r14), %rsi
movslq %r13d, %r13
movq %rax, %rdi
movq %r13, %rdx
callq 0x41d0
addq %r12, %r13
movq %r13, (%r15)
movq 0xea0(%r14), %rdi
callq *0x8(%r14)
movq %r12, 0xea0(%r14)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: num_lt
static int num_lt(num a, num b) {
  int ret;
  int is_fixnum = a.is_fixnum && b.is_fixnum;
  if (is_fixnum) {
    ret = a.value.ivalue < b.value.ivalue;
  } else {
    ret = num_rvalue(a) < num_rvalue(b);
  }
  return ret;
}

// Assembly:
testb %dil, %dil
setne %al
testb %dl, %dl
setne %r8b
andb %al, %r8b
cmpb $0x1, %r8b
jne 0xc589
cmpq %rcx, %rsi
setl %al
jmp 0xc5b1
testb %dil, %dil
je 0xc595
cvtsi2sd %rsi, %xmm0
jmp 0xc59a
movq %rsi, %xmm0
testb %dl, %dl
je 0xc5a5
cvtsi2sd %rcx, %xmm1
jmp 0xc5aa
movq %rcx, %xmm1
ucomisd %xmm0, %xmm1
seta %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: port_from_scratch
static pointer port_from_scratch(scheme * sc) {
  port *pt;
  pt = port_rep_from_scratch(sc);
  if (pt == 0) {
    return sc->NIL;
  }
  return mk_port(sc, pt);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x20, %edi
callq *(%r14)
testq %rax, %rax
je 0xc6f0
movq %rax, %rbx
movl $0x100, %edi            # imm = 0x100
callq *(%r14)
testq %rax, %rax
je 0xc6f0
movq %rax, %r15
movl $0xff, %edx
movq %rax, %rdi
movl $0x20, %esi
callq 0x4120
movq %r15, %rax
addq $0xff, %rax
movb $0x0, 0xff(%r15)
movb $0x26, (%rbx)
movq %r15, 0x8(%rbx)
movq %r15, 0x18(%rbx)
movq %rax, 0x10(%rbx)
jmp 0xc6f2
xorl %ebx, %ebx
movq 0x90(%r14), %rax
testq %rbx, %rbx
je 0xc716
movq %r14, %rdi
movq %rax, %rsi
movq %rax, %rdx
callq 0x4689
movl $0x400a, (%rax)         # imm = 0x400A
movq %rbx, 0x8(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: readstr_upto
static char *readstr_upto(scheme * sc, char *delim) {
  char *p = sc->strbuff;
  int c, len;

  while (1) {
    c = inchar(sc);
    if (check_strbuff_size(sc, &p)) {
      char_to_utf8(c, p, &len);
      p += len;
    }
    if(is_one_of(delim, c)) {
      break;
    }
  }

  if (p == sc->strbuff + 2 && p[-2] == '\\') {
    *p = 0;
  } else {
    backchar(sc, p[-1]);
    *--p = '\0';
  }
  return sc->strbuff;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0xea0(%rdi), %rax
leaq 0x8(%rsp), %r14
movq %rax, (%r14)
leaq 0x1acf(%rip), %r13      # 0xe212
leaq 0x14(%rsp), %r15
movq %rbx, %rdi
callq 0xb5ae
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc4e2
testl %eax, %eax
je 0xc780
movq 0x8(%rsp), %r12
movl %ebp, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0xc466
movslq 0x14(%rsp), %rax
addq %r12, %rax
movq %rax, 0x8(%rsp)
cmpl $-0x1, %ebp
je 0xc799
xorl %eax, %eax
cmpq $0xa, %rax
je 0xc748
movsbl (%rax,%r13), %ecx
incq %rax
cmpl %ecx, %ebp
jne 0xc787
movq 0x8(%rsp), %rax
movq 0xea0(%rbx), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0xc7b4
cmpb $0x5c, -0x2(%rax)
je 0xc7c8
movsbl -0x1(%rax), %ecx
decq %rax
cmpl $-0x1, %ecx
je 0xc7c3
movl %ecx, 0x2c(%rbx)
movq %rax, 0x8(%rsp)
movb $0x0, (%rax)
movq 0xea0(%rbx), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: printatom
static void printatom(scheme * sc, pointer l, int f) {
  char *p;
  int len;
  atom2str(sc, l, f, &p, &len);
  putchars(sc, p, len);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
leaq 0xc(%rsp), %r15
movq %r14, %rcx
movq %r15, %r8
callq 0xbdd2
movq (%r14), %r14
movl (%r15), %ebp
movq 0x178(%rbx), %rax
movq 0x8(%rax), %r15
testb $0x1, (%r15)
jne 0xcac4
testl %ebp, %ebp
je 0xcab9
movq 0x18(%r15), %rax
cmpq 0x10(%r15), %rax
je 0xca8c
movb (%r14), %cl
incq %r14
leaq 0x1(%rax), %rdx
movq %rdx, 0x18(%r15)
movb %cl, (%rax)
jmp 0xcab5
testb $0x4, (%r15)
je 0xcab5
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4ba2
testl %eax, %eax
je 0xcab5
movb (%r14), %al
incq %r14
movq 0x18(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%r15)
movb %al, (%rcx)
decl %ebp
jne 0xca70
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movslq %ebp, %rdx
movq 0x8(%r15), %rcx
movl $0x1, %esi
movq %r14, %rdi
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x42a0
// File: /workspace/github_c_makefile_star2_O1/RodionGork[P]tinyscheme/scheme.c
// Function: mark
static void mark(pointer a) {
  pointer t, q, p;

  t = (pointer) 0;
  p = a;
E2:setmark(p);
  if (is_vector(p)) {
    int i;
    int num = ivalue_unchecked(p) / 2 + ivalue_unchecked(p) % 2;
    for (i = 0; i < num; i++) {
      /* Vector cells will be treated like ordinary cells */
      mark(p + 1 + i);
    }
  }
  if (is_atom(p))
    goto E6;
  /* E4: down car */
  q = car(p);
  if (q && !is_mark(q)) {
    setatom(p);                 /* a note that we have moved car */
    car(p) = t;
    t = p;
    p = q;
    goto E2;
  }
E5:q = cdr(p);                 /* down cdr */
  if (q && !is_mark(q)) {
    cdr(p) = t;
    t = p;
    p = q;
    goto E2;
  }
E6:                            /* up.  Undo the link switching from steps E4 and E5. */
  if (!t)
    return;
  q = t;
  if (is_atom(q)) {
    clratom(q);
    t = car(q);
    car(q) = p;
    p = q;
    goto E5;
  } else {
    t = cdr(q);
    cdr(q) = p;
    p = q;
    goto E6;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %r14d, %r14d
movq %rdi, %r15
movl (%rdi), %eax
movl %eax, %ecx
orl $0x8000, %ecx           # imm = 0x8000
movl %ecx, (%rdi)
andl $0x1f, %eax
cmpl $0xb, %eax
jne 0xcb43
movq 0x10(%r15), %rax
movq %rax, %r12
shrq $0x3f, %r12
addq %rax, %r12
movq %r12, %rcx
andq $-0x2, %rcx
subq %rcx, %rax
sarq %r12
addq %rax, %r12
testl %r12d, %r12d
jle 0xcb43
leaq 0x18(%r15), %rbx
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq %rbx, %rdi
callq 0xcae2
addq $0x18, %rbx
decq %r12
jne 0xcb32
movl (%r15), %eax
btl $0xe, %eax
jb 0xcb8f
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0xcb6c
testb $-0x80, 0x1(%rdi)
jne 0xcb6c
orl $0x4000, %eax           # imm = 0x4000
movl %eax, (%r15)
movq %r14, 0x8(%r15)
movq %r15, %r14
jmp 0xcaed
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0xcb8f
testb $-0x80, 0x1(%rdi)
jne 0xcb8f
movq %r14, 0x10(%r15)
movq %r15, %r14
jmp 0xcaed
movq 0x10(%r15), %r14
movq %rax, 0x10(%r15)
movq %r15, %rax
testq %r14, %r14
je 0xcbb6
movq %r14, %r15
movl (%r14), %ecx
btl $0xe, %ecx
jae 0xcb87
andl $0xbfff, %ecx           # imm = 0xBFFF
movl %ecx, (%r15)
movq 0x8(%r15), %r14
movq %rax, 0x8(%r15)
jmp 0xcb6c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/compute_file_md5.c
// Function: compute_file_md5
int compute_file_md5(const char* file_path,char* md5_str,int size)
{
    int i;
	int fd;
	int ret;
	unsigned char data[READ_DATA_SIZE];
	unsigned char md5_value[MD5_SIZE];
	MD5_CTX md5;

	fd = open(file_path, O_RDONLY);
	if (-1 == fd)
	{
		perror("open");
		return -1;
	}

	// init md5
	MD5Init(&md5);

    int total = 0;
    while(total < size)
	{
        if(size - total > 4096)
		    ret = read(fd, data, 4096);
        else
            ret = read(fd,data,size - total);
		if (-1 == ret)
		{
			perror("read");
			close(fd);
			return -1;
		}
		MD5Update(&md5, data, ret);
        total += ret;
	}

	close(fd);

	MD5Final(&md5, md5_value);

	// convert md5 value to md5 string
	for(i = 0; i < MD5_SIZE; i++)
	{
		snprintf(md5_str + i*2, 2+1, "%02x", md5_value[i]);
	}

	return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1078, %rsp           # imm = 0x1078
movl %edx, %r14d
movq %rsi, %rbx
xorl %esi, %esi
xorl %eax, %eax
callq 0x20f0
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
je 0x2bae
leaq -0x98(%rbp), %rdi
callq 0x31b4
testl %r14d, %r14d
jle 0x2b4f
xorl %r15d, %r15d
leaq -0x10a0(%rbp), %r12
movl %r14d, %eax
subl %r15d, %eax
movl $0x1000, %ecx           # imm = 0x1000
cmpl %ecx, %eax
cmovgel %ecx, %eax
movslq %eax, %rdx
movl -0x2c(%rbp), %edi
movq %r12, %rsi
callq 0x21f0
movq %rax, %r13
cmpl $-0x1, %r13d
je 0x2bbc
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x31d2
addl %r13d, %r15d
cmpl %r14d, %r15d
jl 0x2b0a
movl -0x2c(%rbp), %edi
callq 0x22c0
leaq -0x98(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3aeb
xorl %r14d, %r14d
leaq 0x2537(%rip), %r15      # 0x50a8
xorl %r12d, %r12d
movzbl -0x40(%rbp,%r12), %ecx
movl $0x3, %esi
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2260
incq %r12
addq $0x2, %rbx
cmpq $0x10, %r12
jne 0x2b74
movl %r14d, %eax
addq $0x1078, %rsp           # imm = 0x1078
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24e9(%rip), %rdi      # 0x509e
callq 0x2120
jmp 0x2bd0
leaq 0x24e0(%rip), %rdi      # 0x50a3
callq 0x2120
movl -0x2c(%rbp), %edi
callq 0x22c0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x2b99
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/get_absolute_path.c
// Function: get_absolute_path
int get_absolute_path(char* buf,int size)
{              
    char* oldpath = getcwd(NULL,0);
    chdir(buf);
    char* newpath = getcwd(NULL,0);
    memset(buf,0,size);
    strcpy(buf,newpath);
    chdir(oldpath);
    free(oldpath);
    free(newpath);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %edi, %edi
xorl %esi, %esi
callq 0x20d0
movq %rax, %r15
movq %r14, %rdi
callq 0x2200
xorl %edi, %edi
xorl %esi, %esi
callq 0x20d0
movq %rax, %r12
movslq %ebx, %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r14, %rdi
movq %r12, %rsi
callq 0x2150
movq %r15, %rdi
callq 0x2200
movq %r15, %rdi
callq 0x2190
movq %r12, %rdi
callq 0x2190
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/gets.c
// Function: pthread_download_file
void* pthread_download_file(void* arg)
{
    int sock_fd = *(int*)arg;
    char buf[4096];
    while(1)
    {
        memset(buf,0,sizeof(buf));
        int len;
        int ret = recv(sock_fd,&len,sizeof(int),0);
        if(ret == 0)
            break;
        ret = recv_client_all(sock_fd,buf,len);
        if(ret == -1)
            break;
        char file_type = '\0';
        ret = recv(sock_fd,&file_type,sizeof(char),0);
        if(ret == 0)
            break;
        if(file_type == 'd')
        {
            puts(buf);
            struct stat st;
            ret = stat(buf,&st);
            if(ret == -1)
            {
                mkdir(buf,0777);
            }
            else if((st.st_mode & S_IFMT) != S_IFDIR)
            {
                unlink(buf);
                mkdir(buf,0777);
            }
        }
        else
        {
            ret = recv_server_file(sock_fd,buf);
            if(ret == -1)
                break;
        }
    }
    close(sock_fd);
    free(arg);
    pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10a8, %rsp           # imm = 0x10A8
movq %rdi, -0x38(%rbp)
movl (%rdi), %r14d
leaq -0x10d0(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x20e0
leaq -0x30(%rbp), %rsi
movl $0x4, %edx
movl %r14d, %edi
xorl %ecx, %ecx
callq 0x2070
testl %eax, %eax
je 0x2d96
leaq -0x10d0(%rbp), %r15
leaq -0x29(%rbp), %r12
leaq -0xc8(%rbp), %r13
leaq -0x30(%rbp), %rbx
movl -0x30(%rbp), %edx
movl %r14d, %edi
movq %r15, %rsi
callq 0x3e58
cmpl $-0x1, %eax
je 0x2d96
movb $0x0, -0x29(%rbp)
movl $0x1, %edx
movl %r14d, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x2070
testl %eax, %eax
je 0x2d96
cmpb $0x64, -0x29(%rbp)
jne 0x2d5d
movq %r15, %rdi
callq 0x2240
movq %r15, %rdi
movq %r13, %rsi
callq 0x2140
cmpl $-0x1, %eax
je 0x2d4e
movl -0xb0(%rbp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax           # imm = 0x4000
je 0x2d6d
movq %r15, %rdi
callq 0x20a0
movq %r15, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2090
jmp 0x2d6d
movl %r14d, %edi
movq %r15, %rsi
callq 0x41a8
cmpl $-0x1, %eax
je 0x2d96
movl $0x1000, %edx           # imm = 0x1000
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
movl $0x4, %edx
movl %r14d, %edi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0x2070
testl %eax, %eax
jne 0x2cdf
movl %r14d, %edi
callq 0x22c0
movq -0x38(%rbp), %rdi
callq 0x2190
xorl %edi, %edi
callq 0x2290
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/gets.c
// Function: gets
int gets(int sock_fd,const char* file_name,const char* path,int file_id)
{
    int ctl_num = CTL_GET;
    send(sock_fd,&ctl_num,sizeof(int),0);
    char buf[4096];
    int file_name_len = strlen(file_name);
    int path_len = strlen(path);
    memcpy(buf ,&file_id,sizeof(int));
    memcpy(buf + sizeof(int),&file_name_len,sizeof(int));
    memcpy(buf + sizeof(int) * 2,&path_len,sizeof(int));
    memcpy(buf + sizeof(int) * 3,file_name,file_name_len);
    memcpy(buf + sizeof(int) * 3 + file_name_len,path,path_len);
    send(sock_fd,buf,sizeof(int) * 3 + file_name_len + path_len,0);

    pthread_t id;
    int * arg = (int*)malloc(sizeof(int));
    *arg = sock_fd;
    pthread_create(&id,NULL,pthread_download_file,arg);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movl %ecx, -0x2c(%rbp)
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebx
leaq -0x30(%rbp), %rsi
movl $0x5, (%rsi)
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x20c0
movq %r15, %rdi
callq 0x2080
movq %rax, %r13
movq %r14, %rdi
callq 0x2080
movq %rax, %r12
leaq -0x1034(%rbp), %rdi
movl -0x2c(%rbp), %eax
movl %eax, -0xc(%rdi)
movl %r13d, -0x8(%rdi)
movl %r12d, -0x4(%rdi)
movslq %r13d, %r13
movq %r15, %rsi
movq %r13, %rdx
callq 0x2100
leaq -0x1034(,%r13), %rdi
addq %rbp, %rdi
movslq %r12d, %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x2100
leaq (%r15,%r13), %rdx
addq $0xc, %rdx
leaq -0x1040(%rbp), %rsi
movl %ebx, %edi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edi
callq 0x21b0
movl %ebx, (%rax)
leaq -0x1e0(%rip), %rdx      # 0x2c80
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movq %rax, %rcx
callq 0x22a0
xorl %eax, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/link_path.c
// Function: link_path
void link_path(char* file_name)
{
    char tmp[256] = {0};
    strcpy(tmp,file_name);
    char* path = getcwd(NULL,0);
    sprintf(file_name,"%s/%s",path,tmp);
    free(path);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
leaq -0x120(%rbp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x20e0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2150
xorl %edi, %edi
xorl %esi, %esi
callq 0x20d0
movq %rax, %r15
leaq 0x21e2(%rip), %rsi      # 0x50ad
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2050
movq %r15, %rdi
callq 0x2190
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/ls.c
// Function: ls
int ls(int sock_fd,int file_id)
{
    int ctl_num = CTL_LS;
    send(sock_fd,&ctl_num,sizeof(int),0);
    send(sock_fd,&file_id,sizeof(int),0);
    int len;
    char buf[4096];
    while(1)
    {
        memset(buf,0,sizeof(buf));
        recv(sock_fd,&len,sizeof(int),0);
        if(len == LS_FIN)
            break;
        recv_n_bytes(sock_fd,buf,len);
        char file_type = buf[0];
        int file_size = *(int*)(buf + 1);
        printf("%-32s",buf + 5);
        switch(file_type)
        {
        case 'd':
            printf("%-30s"," ");
            puts("directory");
            break;
        case 'f':
            printf("%20s%-10d"," ",file_size);
            puts("regular file");
            break;
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1018, %rsp           # imm = 0x1018
movl %edi, %ebx
leaq -0x34(%rbp), %r14
movl %esi, (%r14)
leaq -0x30(%rbp), %rsi
movl $0x1, (%rsi)
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x20c0
leaq -0x1040(%rbp), %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x20e0
leaq -0x2c(%rbp), %r14
movl $0x4, %edx
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2070
movl (%r14), %edx
testl %edx, %edx
je 0x319d
leaq -0x1040(%rbp), %r15
leaq -0x2c(%rbp), %r13
movl %ebx, %edi
movq %r15, %rsi
callq 0x4154
movzbl -0x1040(%rbp), %r12d
movl -0x103f(%rbp), %r14d
leaq 0x2014(%rip), %rdi      # 0x512a
leaq -0x103b(%rbp), %rsi
xorl %eax, %eax
callq 0x2030
cmpl $0x66, %r12d
je 0x314e
cmpl $0x64, %r12d
jne 0x3172
leaq 0x1ff9(%rip), %rdi      # 0x5130
leaq 0x1f16(%rip), %rsi      # 0x5054
xorl %eax, %eax
callq 0x2030
leaq 0x1f20(%rip), %rdi      # 0x506c
jmp 0x316d
leaq 0x1fe1(%rip), %rdi      # 0x5136
leaq 0x1ef8(%rip), %rsi      # 0x5054
movl %r14d, %edx
xorl %eax, %eax
callq 0x2030
leaq 0x1fd3(%rip), %rdi      # 0x5140
callq 0x2240
movl $0x1000, %edx           # imm = 0x1000
movq %r15, %rdi
xorl %esi, %esi
callq 0x20e0
movl $0x4, %edx
movl %ebx, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x2070
movl -0x2c(%rbp), %edx
testl %edx, %edx
jne 0x30f6
xorl %eax, %eax
addq $0x1018, %rsp           # imm = 0x1018
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/md5.c
// Function: MD5Update
void MD5Update(MD5_CTX *context, unsigned char *input, unsigned int inputlen)
{
	unsigned int i = 0;
	unsigned int index = 0;
	unsigned int partlen = 0;

	index = (context->count[0] >> 3) & 0x3F;
	partlen = 64 - index;
	context->count[0] += inputlen << 3;

	if(context->count[0] < (inputlen << 3))
		context->count[1]++;
	context->count[1] += inputlen >> 29;

	if(inputlen >= partlen)
	{
		memcpy(&context->buffer[index], input,partlen);
		MD5Transform(context->state, context->buffer);

		for(i = partlen; i+64 <= inputlen; i+=64)
			MD5Transform(context->state, &input[i]);

		index = 0;        
	}  
	else
	{
		i = 0;
	}
	memcpy(&context->buffer[index], &input[i], inputlen-i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movl (%rdi), %eax
movl %eax, %r15d
shrl $0x3, %r15d
andl $0x3f, %r15d
movl $0x40, %r13d
subl %r15d, %r13d
leal (,%rbx,8), %ecx
addl %eax, %ecx
movl %ecx, (%rdi)
jae 0x3213
incl 0x4(%r12)
movl %ebx, %eax
shrl $0x1d, %eax
addl %eax, 0x4(%r12)
cmpl %ebx, %r13d
jbe 0x322a
movl %r15d, %eax
xorl %r13d, %r13d
jmp 0x3292
leaq 0x18(%r12), %rax
movq %rax, -0x38(%rbp)
leaq (%r12,%r15), %rdi
addq $0x18, %rdi
movl %r13d, %edx
movq %r14, %rsi
callq 0x2100
movq %r12, -0x30(%rbp)
addq $0x8, %r12
movq %r12, %rdi
movq -0x38(%rbp), %rsi
callq 0x32bc
movl $0x80, %eax
subl %r15d, %eax
cmpl %ebx, %eax
jbe 0x326e
xorl %eax, %eax
movq -0x30(%rbp), %r12
jmp 0x3292
movl %r13d, %r15d
movl %r13d, %esi
addq %r14, %rsi
movq %r12, %rdi
callq 0x32bc
leal 0x40(%r15), %r13d
subl $-0x80, %r15d
cmpl %ebx, %r15d
jbe 0x326e
movq -0x30(%rbp), %r12
xorl %eax, %eax
leaq (%r12,%rax), %rdi
addq $0x18, %rdi
movl %r13d, %eax
addq %rax, %r14
subl %r13d, %ebx
movq %r14, %rsi
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2100
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/md5.c
// Function: MD5Final
void MD5Final(MD5_CTX *context, unsigned char digest[16])
{
	unsigned int index = 0,padlen = 0;
	unsigned char bits[8];

	index = (context->count[0] >> 3) & 0x3F;
	padlen = (index < 56)?(56-index):(120-index);
	MD5Encode(bits, context->count, 8);
	MD5Update(context, PADDING, padlen);
	MD5Update(context, bits, 8);
	MD5Encode(digest, context->state, 16);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %eax
shrl $0x3, %eax
andl $0x3f, %eax
xorl %edx, %edx
cmpl $0x38, %eax
setae %dl
shll $0x6, %edx
orl $0x38, %edx
xorl %ecx, %ecx
movl (%r14,%rcx,4), %esi
movl %esi, -0x18(%rbp,%rcx,4)
incq %rcx
cmpq $0x2, %rcx
jne 0x3b14
subl %eax, %edx
leaq 0x3652(%rip), %rsi      # 0x7180
movq %r14, %rdi
callq 0x31d2
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x31d2
xorl %eax, %eax
movb 0x8(%r14,%rax,4), %cl
movb %cl, (%rbx,%rax,4)
movb 0x9(%r14,%rax,4), %cl
movb %cl, 0x1(%rbx,%rax,4)
movb 0xa(%r14,%rax,4), %cl
movb %cl, 0x2(%rbx,%rax,4)
movb 0xb(%r14,%rax,4), %cl
movb %cl, 0x3(%rbx,%rax,4)
incq %rax
cmpq $0x4, %rax
jne 0x3b49
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/md5.c
// Function: MD5Encode
void MD5Encode(unsigned char *output,unsigned int *input,unsigned int len)
{
	unsigned int i = 0;
	unsigned int j = 0;

	while(j < len)
	{
		output[j] = input[i] & 0xFF;  
		output[j+1] = (input[i] >> 8) & 0xFF;
		output[j+2] = (input[i] >> 16) & 0xFF;
		output[j+3] = (input[i] >> 24) & 0xFF;
		i++;
		j += 4;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edx, %edx
je 0x3bb5
decl %edx
shrl $0x2, %edx
incl %edx
xorl %eax, %eax
movb (%rsi,%rax,4), %cl
movb %cl, (%rdi,%rax,4)
movb 0x1(%rsi,%rax,4), %cl
movb %cl, 0x1(%rdi,%rax,4)
movb 0x2(%rsi,%rax,4), %cl
movb %cl, 0x2(%rdi,%rax,4)
movb 0x3(%rsi,%rax,4), %cl
movb %cl, 0x3(%rdi,%rax,4)
incq %rax
cmpq %rax, %rdx
jne 0x3b8f
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/md5.c
// Function: MD5Decode
void MD5Decode(unsigned int *output, unsigned char *input, unsigned int len)
{
	unsigned int i = 0;
	unsigned int j = 0;

	while(j < len)
	{
		output[i] = (input[j]) |
			(input[j+1] << 8) |
			(input[j+2] << 16) |
			(input[j+3] << 24);
		i++;
		j += 4; 
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edx, %edx
je 0x3bd6
decl %edx
shrl $0x2, %edx
incl %edx
xorl %eax, %eax
movl (%rsi,%rax,4), %ecx
movl %ecx, (%rdi,%rax,4)
incq %rax
cmpq %rax, %rdx
jne 0x3bc8
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/my_mkdir.c
// Function: my_mkdir
int my_mkdir(int sock_fd,int file_id,int user_id,const char* file_name)
{
    int ctl_num = CTL_MKDIR;
    send(sock_fd,&ctl_num,sizeof(int),0);
    send(sock_fd,&file_id,sizeof(int),0);
    send(sock_fd,&user_id,sizeof(int),0);
    int len = strlen(file_name);
    send(sock_fd,&len,sizeof(int),0);
    send(sock_fd,file_name,len,0);
    recv(sock_fd,&ctl_num,sizeof(int),0);
    if(ctl_num == FILE_NAME_AVAIABLE)
    {
        puts("mkdir success!");
    }
    else
    {
        puts("mkdir fail!");
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movl %edi, %ebx
leaq -0x38(%rbp), %r13
movl %esi, (%r13)
leaq -0x34(%rbp), %r12
movl %edx, (%r12)
leaq -0x30(%rbp), %r14
movl $0x7, (%r14)
movl $0x4, %edx
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %ebx, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %ebx, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x20c0
movq %r15, %rdi
callq 0x2080
leaq -0x2c(%rbp), %r12
movl %eax, (%r12)
movl $0x4, %edx
movl %ebx, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x20c0
movslq (%r12), %rdx
movl %ebx, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2070
cmpl $0x1, (%r14)
leaq 0x14d9(%rip), %rax      # 0x5160
leaq 0x14e1(%rip), %rdi      # 0x516f
cmoveq %rax, %rdi
callq 0x2240
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/put.c
// Function: pthread_upload_func
void* pthread_upload_func(void* arg)
{
    int sock_fd = *(int*)arg;
    int parent_id = *((int*)arg + 1);
    char* path = (char*)arg + sizeof(int) * 2;
    upload(sock_fd,path,parent_id);
    int ctl_num = NO_MORE_FILE;
    send(sock_fd,&ctl_num,sizeof(int),0);
    free(arg);
    pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl (%rdi), %r14d
movl 0x4(%rdi), %edx
leaq 0x8(%rdi), %rsi
movl %r14d, %edi
callq 0x4604
leaq -0x14(%rbp), %rsi
movl $0x3, (%rsi)
movl $0x4, %edx
movl %r14d, %edi
xorl %ecx, %ecx
callq 0x20c0
movq %rbx, %rdi
callq 0x2190
xorl %edi, %edi
callq 0x2290
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/put.c
// Function: put
int put(int sock_fd,char* path,int user_id,int file_id)
{
    
    char file_name[128] = {0};
    get_file_name(file_name,path);
    int ctl_num = CTL_PUT;
    send(sock_fd,&ctl_num,sizeof(int),0);
    int len = strlen(file_name);
    send(sock_fd,&user_id,sizeof(int),0);
    send(sock_fd,&file_id,sizeof(int),0);
    send(sock_fd,&len,sizeof(int),0);
    send(sock_fd,file_name,len,0);
    recv(sock_fd,&ctl_num,sizeof(int),0);
    if(ctl_num == PUT_FAIL)
    {
        puts("在当前目录有同名文件，不可上传");
        close(sock_fd);
        return -1;
    }
    char* buf = (char*)malloc(4096);
    memset(buf,0,4096);
    memcpy(buf,&sock_fd,sizeof(int));
    memcpy(buf + sizeof(int),&file_id,sizeof(int));
    strcpy(buf + sizeof(int) * 2,path);
    pthread_t id;
    pthread_create(&id,NULL,pthread_upload_func,(void*)buf);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movl %edi, %ebx
leaq -0x44(%rbp), %r14
movl %edx, (%r14)
leaq -0x2c(%rbp), %rax
movl %ecx, (%rax)
xorps %xmm0, %xmm0
leaq -0xd0(%rbp), %r12
movaps %xmm0, 0x70(%r12)
movaps %xmm0, 0x60(%r12)
movaps %xmm0, 0x50(%r12)
movaps %xmm0, 0x40(%r12)
movaps %xmm0, 0x30(%r12)
movaps %xmm0, 0x20(%r12)
movaps %xmm0, 0x10(%r12)
movaps %xmm0, (%r12)
movq %r12, %rdi
movq %rsi, -0x38(%rbp)
callq 0x2c44
leaq -0x40(%rbp), %r13
movl $0x4, (%r13)
movl $0x4, %edx
movl %ebx, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x20c0
movq %r12, %rdi
callq 0x2080
leaq -0x3c(%rbp), %r15
movl %eax, (%r15)
movl $0x4, %edx
movl %ebx, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %ebx, %edi
leaq -0x2c(%rbp), %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %ebx, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x20c0
movslq (%r15), %rdx
movl %ebx, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %ebx, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x2070
cmpl $0x0, (%r13)
je 0x3e2b
movl $0x1000, %edi           # imm = 0x1000
callq 0x21b0
movq %rax, %r14
movl $0x1000, %edx           # imm = 0x1000
movq %rax, %rdi
xorl %esi, %esi
callq 0x20e0
movl %ebx, (%r14)
movl -0x2c(%rbp), %eax
movl %eax, 0x4(%r14)
leaq 0x8(%r14), %rdi
movq -0x38(%rbp), %rsi
callq 0x2150
leaq -0x171(%rip), %rdx      # 0x3ca8
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movq %r14, %rcx
callq 0x22a0
xorl %eax, %eax
jmp 0x3e43
leaq 0x1349(%rip), %rdi      # 0x517b
callq 0x2240
movl %ebx, %edi
callq 0x22c0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/recv_client_all.c
// Function: recv_client_all
int recv_client_all(int fd,void* buf,int len)
{
    int total = 0;
    int ret;
    while(total < len)
    {
        ret = recv(fd,(char*)buf + total,len - total,MSG_WAITALL);
        if(ret == 0)
        {
            return -1;
        }
        total += ret;
    }
    return 0;
}

// Assembly:
testl %edx, %edx
jle 0x3e9d
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
xorl %r12d, %r12d
movslq %r12d, %rax
leaq (%r14,%rax), %rsi
movl %ebx, %ecx
subl %eax, %ecx
movslq %ecx, %rdx
movl %r15d, %edi
movl $0x100, %ecx            # imm = 0x100
callq 0x2070
testl %eax, %eax
je 0x3ea0
addl %eax, %r12d
cmpl %ebx, %r12d
jl 0x3e72
xorl %eax, %eax
jmp 0x3ea5
xorl %eax, %eax
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/VeeeectorPan[P]MyNetdisk/clientSrc/recv_file.c
// Function: recv_file
int recv_file(int sock_fd,int file_fd, int file_size)
{
    int total = 0;
    int pipefd[2];
    int ret = pipe(pipefd);
    ERROR_CHECK(ret,-1,"pipe");
    int download_size = 0;
    int splice_size = file_size/10000;
    int previous_download_size = 0;
    while(total < file_size)
    {
        ret = splice(sock_fd,NULL,pipefd[1],NULL,4096,SPLICE_F_MOVE|SPLICE_F_MORE);
        ERROR_CHECK(ret,-1,"splice");
        ret = splice(pipefd[0],NULL,file_fd,NULL,ret,SPLICE_F_MOVE|SPLICE_F_MORE);
        ERROR_CHECK(ret,-1,"splice");
        total += ret;
        download_size += ret;
        if(download_size - previous_download_size >= splice_size)
        {
            printf("downloading %.2f\r",(double)download_size/file_size * 100);
            fflush(stdout);
            previous_download_size = download_size;
        }
    }
    printf("downloading %.2f\n",(double)download_size/file_size * 100);
    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r12d
movl %esi, -0x2c(%rbp)
movl %edi, -0x30(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x21c0
cmpl $-0x1, %eax
je 0x3fec
cvtsi2sd %r12d, %xmm0
movsd %xmm0, -0x38(%rbp)
testl %r12d, %r12d
jle 0x3fb3
movslq %r12d, %rax
imulq $0x68db8bad, %rax, %rcx # imm = 0x68DB8BAD
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x2c, %rcx
addl %eax, %ecx
movq %rcx, -0x48(%rbp)
xorl %ebx, %ebx
xorl %r14d, %r14d
xorl %r15d, %r15d
movl -0x3c(%rbp), %edx
movl $0x1000, %r8d           # imm = 0x1000
movl -0x30(%rbp), %edi
xorl %esi, %esi
xorl %ecx, %ecx
movl $0x5, %r9d
callq 0x20b0
cmpl $-0x1, %eax
je 0x3fe3
movl -0x40(%rbp), %edi
movslq %eax, %r8
xorl %esi, %esi
movl -0x2c(%rbp), %edx
xorl %ecx, %ecx
movl $0x5, %r9d
callq 0x20b0
movq %rax, %r13
cmpl $-0x1, %r13d
je 0x3fe3
addl %r13d, %r14d
movl %r14d, %eax
subl %ebx, %eax
cmpl -0x48(%rbp), %eax
jl 0x3f9d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
divsd -0x38(%rbp), %xmm0
mulsd 0x1233(%rip), %xmm0     # 0x51b0
leaq 0x1240(%rip), %rdi      # 0x51c4
movb $0x1, %al
callq 0x2030
movq 0x302e(%rip), %rax      # 0x6fc0
movq (%rax), %rdi
callq 0x2180
movl %r14d, %ebx
addl %r13d, %r15d
cmpl %r12d, %r15d
jl 0x3f12
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
jmp 0x3fb7
xorpd %xmm0, %xmm0
divsd -0x38(%rbp), %xmm0
mulsd 0x11ec(%rip), %xmm0     # 0x51b0
leaq 0x120b(%rip), %rdi      # 0x51d6
movb $0x1, %al
callq 0x2030
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11d3(%rip), %rdi      # 0x51bd
jmp 0x3ff3
leaq 0x11c5(%rip), %rdi      # 0x51b8
callq 0x2120
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3fd4
nop