LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/RodionGork[P]tinyscheme/scheme.c
// Function: utf8_decode
static int utf8_decode(const char *p) {
  int bytes;
  int c;
  unsigned char *s = (unsigned char*) p;
  if (IS_ASCII(*s)) {
    return *s;
  }
  bytes = (*s < 0xE0) ? 2 : ((*s < 0xF0) ? 3 : 4);
  c = *s & ((0x100 >> bytes) - 1);
  while (--bytes) {
    c = (c << 6) | (*(++s) & 0x3F);
  }
  return c;
}

// Assembly:
movsbl (%rdi), %eax
testl %eax, %eax
jns 0x647f
cmpb $-0x10, %al
movl $0x4, %edx
sbbl $0x0, %edx
cmpb $-0x20, %al
movl $0x2, %ecx
cmovael %edx, %ecx
movl $0x100, %edx            # imm = 0x100
shrl %cl, %edx
decl %edx
andl %eax, %edx
movzbl %dl, %eax
movl $0x1, %edx
shll $0x6, %eax
movzbl (%rdi,%rdx), %esi
andl $0x3f, %esi
orl %esi, %eax
incq %rdx
cmpl %edx, %ecx
jne 0x646c
retq
// File: /workspace/github_c_makefile_star2_O3/RodionGork[P]tinyscheme/scheme.c
// Function: fill_vector
INTERFACE static void fill_vector(pointer vec, pointer obj) {
  int i;
  int num = ivalue(vec) / 2 + ivalue(vec) % 2;
  for (i = 0; i < num; i++) {
    typeflag(vec + 1 + i) = T_PAIR;
    setimmutable(vec + 1 + i);
    car(vec + 1 + i) = obj;
    cdr(vec + 1 + i) = obj;
  }
}

// Assembly:
cmpb $0x0, 0x8(%rdi)
je 0x659a
movq 0x10(%rdi), %rcx
jmp 0x65a0
cvttsd2si 0x10(%rdi), %rcx
movq %rcx, %rax
shrq $0x3f, %rax
addq %rcx, %rax
movq %rax, %rdx
andq $-0x2, %rdx
subq %rdx, %rcx
sarq %rax
addq %rcx, %rax
testl %eax, %eax
jle 0x65de
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
addq $0x28, %rdi
movl $0x2005, -0x10(%rdi)    # imm = 0x2005
movq %rsi, -0x8(%rdi)
movq %rsi, (%rdi)
addq $0x18, %rdi
decq %rax
jne 0x65c7
retq
// File: /workspace/github_c_makefile_star2_O3/RodionGork[P]tinyscheme/scheme.c
// Function: find_consecutive_cells
static pointer find_consecutive_cells(scheme * sc, int n) {
  pointer *pp;
  int cnt;

  pp = &sc->free_cell;
  while (*pp != sc->NIL) {
    cnt = count_consecutive_cells(*pp, n);
    if (cnt >= n) {
      pointer x = *pp;
      *pp = cdr(*pp + n - 1);
      sc->fcells -= n;
      return x;
    }
    pp = &cdr(*pp + cnt - 1);
  }
  return sc->NIL;
}

// Assembly:
movq 0x90(%rdi), %rcx
movq 0x160(%rdi), %rax
cmpq %rcx, %rax
je 0x6659
pushq %rbx
leaq 0x160(%rdi), %rdx
cmpl $0x2, %esi
movl $0x1, %r8d
cmovgel %esi, %r8d
leal 0x1(%r8), %r9d
negl %r8d
movq %rax, %r11
movl $0x1, %r10d
movq %r11, %rbx
movq 0x10(%r11), %r11
addq $0x18, %rbx
cmpq %rbx, %r11
jne 0x6638
leal (%r8,%r10), %ebx
incl %ebx
incl %r10d
cmpl $0x1, %ebx
jne 0x6617
movl %r9d, %r10d
cmpl %esi, %r10d
jge 0x665d
movslq %r10d, %rdx
leaq (%rdx,%rdx,2), %rdx
leaq (%rax,%rdx,8), %rdx
addq $-0x8, %rdx
movq (%rdx), %rax
cmpq %rcx, %rax
jne 0x660e
movq %rcx, %rax
jmp 0x6673
movq %rcx, %rax
retq
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rsi
movq -0x8(%rax,%rsi,8), %rsi
movq %rsi, (%rdx)
subq %rcx, 0x168(%rdi)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/RodionGork[P]tinyscheme/scheme.c
// Function: file_pop
static void file_pop(scheme * sc) {
  if (sc->file_i != 0) {
    sc->nesting = sc->nesting_stack[sc->file_i];
    port_close(sc, sc->loadport, port_input);
    sc->file_i--;
    sc->loadport->_object._port = sc->load_stack + sc->file_i;
  }
}

// Assembly:
movslq 0xa90(%rdi), %rax
testq %rax, %rax
je 0xaffe
pushq %rbx
movq %rdi, %rbx
movl 0x990(%rdi,%rax,4), %eax
movl %eax, 0xa94(%rdi)
movq 0x188(%rdi), %rax
movq 0x8(%rax), %rsi
movl $0x10, %edx
callq 0xb407
movslq 0xa90(%rbx), %rax
decq %rax
movl %eax, 0xa90(%rbx)
shlq $0x5, %rax
addq %rbx, %rax
addq $0x190, %rax            # imm = 0x190
movq 0x188(%rbx), %rcx
movq %rax, 0x8(%rcx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/RodionGork[P]tinyscheme/scheme.c
// Function: s_return
static pointer _s_return(scheme * sc, pointer a) {
  sc->value = (a);
  if (sc->dump == sc->NIL)
    return sc->NIL;
  sc->op = ivalue(car(sc->dump));
  sc->args = cadr(sc->dump);
  sc->envir = caddr(sc->dump);
  sc->code = cadddr(sc->dump);
  sc->dump = cddddr(sc->dump);
  return sc->T;
}

// Assembly:
movq %rsi, 0xec0(%rdi)
movq 0x48(%rdi), %rcx
movq 0x90(%rdi), %rax
cmpq %rax, %rcx
je 0xb07d
movq 0x8(%rcx), %rax
cmpb $0x0, 0x8(%rax)
je 0xb026
movq 0x10(%rax), %rax
jmp 0xb02c
cvttsd2si 0x10(%rax), %rax
movl %eax, 0xec8(%rdi)
movq 0x10(%rcx), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rdi)
movq 0x10(%rcx), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rdi)
movq 0x10(%rcx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x40(%rdi)
movq 0x10(%rcx), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, 0x48(%rdi)
movq 0xb0(%rdi), %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
addl $-0x2, %esi
cmpl $0x4, %esi
ja 0xb3dd
leaq 0x204f(%rip), %rax      # 0xd3b4
movslq (%rax,%rsi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
cmpb $0x69, (%rdi)
movl $0x16, %ecx
movl $0x28, %eax
jmp 0xb3d9
movb 0x2(%rdi), %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(%rdi), %eax
cmpl $0x2a, %eax
je 0xb3e9
cmpl $0x65, %eax
je 0xb3e3
cmpl $0x64, %eax
jne 0xb3f5
movl $0x23, %eax
retq
movzbl 0x2(%rdi), %eax
cmpl $0x63, %eax
je 0xb3fb
cmpl $0x67, %eax
je 0xb3ef
cmpl $0x6c, %eax
jne 0xb401
movl $0x25, %eax
retq
cmpb $0x61, (%rdi)
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_O3/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 %rsi, %rbx
movzbl (%rsi), %esi
notb %dl
movzbl %dl, %ecx
andl %esi, %ecx
movb %cl, (%rbx)
testb $0x30, %cl
jne 0xb443
testb $0x1, %cl
je 0xb440
movq %rdi, %rax
movl $0x0, 0x14(%rbx)
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xb437
callq *0x8(%rax)
movq 0x8(%rbx), %rdi
callq 0x40b0
movb $0x0, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xb463
movl $0xffffffff, 0x2c(%rbx) # imm = 0xFFFFFFFF
jmp 0xb4ec
movq 0x170(%rbx), %rax
movq 0x8(%rax), %r14
testb $0x40, (%r14)
jne 0xb4e7
movq %r14, %rdi
callq 0xb4f8
cmpl $0x80, %eax
jl 0xb4ce
movb %al, 0x4(%rsp)
cmpl $0xf0, %eax
movl $0x4, %ecx
sbbq $0x0, %rcx
cmpl $0xe0, %eax
movl $0x2, %r15d
cmovaeq %rcx, %r15
movl $0x1, %r12d
movq %r14, %rdi
callq 0xb4f8
cmpl $-0x1, %eax
je 0xb4d3
movb %al, 0x4(%rsp,%r12)
incq %r12
cmpq %r12, %r15
jne 0xb4aa
leaq 0x4(%rsp), %rdi
callq 0x643e
cmpl $-0x1, %eax
jne 0xb4ec
movq 0x170(%rbx), %rax
cmpq 0x188(%rbx), %rax
jne 0xb4e7
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_O3/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 0xb51d
movq 0x18(%rdi), %rcx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpb $0x0, (%rcx)
je 0xb51c
cmpq 0x10(%rdi), %rcx
je 0xb51c
leaq 0x1(%rcx), %rax
movq %rax, 0x18(%rdi)
movsbl (%rcx), %eax
retq
movq 0x8(%rdi), %rdi
jmp 0x4130
// File: /workspace/github_c_makefile_star2_O3/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 0xb5af
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 0xb5b4
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 0xb5a3
movq %rbx, %r13
movq 0x10(%r13), %rbx
cmpq %rax, 0x10(%rbx)
jne 0xb56f
jmp 0xb5b7
movq %r12, %r14
jmp 0xb5c3
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_O3/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 0xb648
ucomisd %xmm3, %xmm0
jbe 0xb616
movapd %xmm2, %xmm1
jmp 0xb648
movapd %xmm1, (%rsp)
movsd 0x1e6d(%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_O3/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 0xb694
testq %r9, %r9
jns 0xb6ae
movq %rsi, %rax
negq %rax
cmovnsq %rsi, %rax
jmp 0xb6ab
sete %al
testq %r9, %r9
setle %cl
orb %al, %cl
jne 0xb6ae
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_O3/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 0xc07c
xorl %eax, %eax
movsbl (%r15,%rax), %ecx
movl %ecx, 0x4(%r12,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xc06a
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_O3/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 0xc12b
movl %edx, %ebx
movq %rdi, %r14
movzbl (%rsi), %r12d
movl %r12d, %eax
shrl $0x7, %eax
leaq (%rsi,%rax,4), %r15
testb %r12b, %r12b
js 0xc0d0
movsbl (%r15), %ebp
incq %r15
jmp 0xc0d7
movl (%r15), %ebp
addq $0x4, %r15
movq %r14, %rdi
leaq 0x8(%rsp), %rsi
callq 0xc31c
testl %eax, %eax
je 0xc122
movq 0x8(%rsp), %r13
testl %ebp, %ebp
je 0xc10f
movl %ebp, %edi
movq %r13, %rsi
leaq 0x14(%rsp), %rdx
callq 0xc2a2
movslq 0x14(%rsp), %rax
addq %r13, %rax
movq %rax, 0x8(%rsp)
jmp 0xc122
movb $-0x40, (%r13)
leaq 0x2(%r13), %rax
movq %rax, 0x8(%rsp)
movb $-0x80, 0x1(%r13)
decl %ebx
jne 0xc0c2
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_O3/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, %ebx
movq %rsi, %r15
movq %rdi, %r14
movl $0x22, %esi
callq 0x4c37
movl %ebx, 0xc(%rsp)
testl %ebx, %ebx
jle 0xc287
movzbl (%r15), %ebp
movl %ebp, %eax
shrl $0x7, %eax
leaq (%r15,%rax,4), %r15
xorl %r12d, %r12d
testb %bpl, %bpl
js 0xc187
movzbl (%r15), %r13d
incq %r15
jmp 0xc18e
movl (%r15), %r13d
addq $0x4, %r15
cmpl $0x20, %r13d
jl 0xc1a0
cmpl $0x5c, %r13d
je 0xc1a0
cmpl $0x22, %r13d
jne 0xc1e6
movq %r14, %rdi
movl $0x5c, %esi
callq 0x4c37
cmpl $0xc, %r13d
jle 0xc1cf
cmpl $0xd, %r13d
je 0xc21b
cmpl $0x22, %r13d
je 0xc26e
cmpl $0x5c, %r13d
je 0xc26e
jmp 0xc22b
cmpl $0x9, %r13d
je 0xc223
cmpl $0xa, %r13d
jne 0xc22b
movl $0x6e, %r13d
jmp 0xc26e
movl %r13d, %edi
leaq 0x13(%rsp), %rsi
leaq 0x8(%rsp), %rdx
callq 0xc2a2
movslq 0x8(%rsp), %r13
testq %r13, %r13
jle 0xc279
xorl %ebx, %ebx
movsbl 0x13(%rsp,%rbx), %esi
movq %r14, %rdi
callq 0x4c37
incq %rbx
cmpq %rbx, %r13
jne 0xc204
jmp 0xc279
movl $0x72, %r13d
jmp 0xc26e
movl $0x74, %r13d
jmp 0xc26e
movq %r14, %rdi
movl $0x78, %esi
callq 0x4c37
leal 0xf(%r13), %ebx
testl %r13d, %r13d
cmovnsl %r13d, %ebx
movl %ebx, %esi
sarl $0x4, %esi
addl $0x30, %esi
movq %r14, %rdi
callq 0x4c37
andl $-0x10, %ebx
subl %ebx, %r13d
movl %r13d, 0x8(%rsp)
cmpl $0x9, %r13d
jg 0xc26a
addl $0x30, %r13d
jmp 0xc26e
addl $0x37, %r13d
movq %r14, %rdi
movl %r13d, %esi
callq 0x4c37
incl %r12d
cmpl 0xc(%rsp), %r12d
jne 0xc179
movq %r14, %rdi
movl $0x22, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4c37
// File: /workspace/github_c_makefile_star2_O3/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 0xc2c1
movb %al, (%rsi)
movb $0x0, 0x1(%rsi)
jmp 0xc310
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)
decl %ecx
leaq (%rcx,%rsi), %rdx
movb $-0x80, %al
movl $0x80, %r8d
shrl %cl, %r8d
orb %r8b, %al
movl %edi, %r8d
andb $0x3f, %r8b
orb $-0x80, %r8b
movb %r8b, (%rdx)
shrl $0x6, %edi
decq %rdx
decl %ecx
jne 0xc2e7
orb %dil, %al
movb %al, (%rsi)
movq %rsi, %rdi
callq 0x40c0
movl %eax, (%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xc39a
movq %rdi, %r14
movslq %eax, %rdi
addq %rdi, %rdi
movl %edi, 0xea8(%r14)
cmpl $0x8000, %eax           # imm = 0x8000
jl 0xc364
movl %eax, 0xea8(%r14)
xorl %ebx, %ebx
jmp 0xc39a
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_O3/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 0xc3c3
cmpq %rcx, %rsi
setl %al
jmp 0xc3eb
testb %dil, %dil
je 0xc3cf
cvtsi2sd %rsi, %xmm0
jmp 0xc3d4
movq %rsi, %xmm0
testb %dl, %dl
je 0xc3df
cvtsi2sd %rcx, %xmm1
jmp 0xc3e4
movq %rcx, %xmm1
ucomisd %xmm0, %xmm1
seta %al
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xc546
movq %rax, %rbx
movl $0x100, %edi            # imm = 0x100
callq *(%r14)
testq %rax, %rax
je 0xc546
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)
movq 0x90(%r14), %rdx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x4689
movl $0x400a, (%rax)         # imm = 0x400A
movq %rbx, 0x8(%rax)
jmp 0xc54d
movq 0x90(%r14), %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1c91(%rip), %r13      # 0xe20b
leaq 0x14(%rsp), %r15
movq %rbx, %rdi
callq 0xb445
movl %eax, %ebp
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc31c
testl %eax, %eax
je 0xc5b7
movq 0x8(%rsp), %r12
movl %ebp, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0xc2a2
movslq 0x14(%rsp), %rax
addq %r12, %rax
movq %rax, 0x8(%rsp)
cmpl $-0x1, %ebp
je 0xc5d0
xorl %eax, %eax
cmpq $0xa, %rax
je 0xc57f
movsbl (%rax,%r13), %ecx
incq %rax
cmpl %ecx, %ebp
jne 0xc5be
movq 0x8(%rsp), %rax
movq 0xea0(%rbx), %rcx
addq $0x2, %rcx
cmpq %rcx, %rax
jne 0xc5eb
cmpb $0x5c, -0x2(%rax)
je 0xc5fa
movsbl -0x1(%rax), %ecx
decq %rax
cmpl $-0x1, %ecx
je 0xc5fa
movl %ecx, 0x2c(%rbx)
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_O3/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 0xbc45
movq (%r14), %r14
movl (%r15), %ebp
movq 0x178(%rbx), %rax
movq 0x8(%rax), %r15
testb $0x1, (%r15)
jne 0xc8f6
testl %ebp, %ebp
je 0xc8eb
movq 0x18(%r15), %rax
cmpq 0x10(%r15), %rax
je 0xc8be
movb (%r14), %cl
incq %r14
leaq 0x1(%rax), %rdx
movq %rdx, 0x18(%r15)
movb %cl, (%rax)
jmp 0xc8e7
testb $0x4, (%r15)
je 0xc8e7
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4bab
testl %eax, %eax
je 0xc8e7
movb (%r14), %al
incq %r14
movq 0x18(%r15), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, 0x18(%r15)
movb %al, (%rcx)
decl %ebp
jne 0xc8a2
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_O3/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), %ecx
movl %ecx, %eax
orl $0x8000, %eax           # imm = 0x8000
movl %eax, (%rdi)
andl $0x1f, %ecx
cmpl $0xb, %ecx
jne 0xc977
movq 0x10(%r15), %rcx
movq %rcx, %r12
shrq $0x3f, %r12
addq %rcx, %r12
movq %r12, %rdx
andq $-0x2, %rdx
subq %rdx, %rcx
sarq %r12
addq %rcx, %r12
testl %r12d, %r12d
jle 0xc977
leaq 0x18(%r15), %rbx
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
movq %rbx, %rdi
callq 0xc914
addq $0x18, %rbx
decq %r12
jne 0xc963
movl (%r15), %eax
btl $0xe, %eax
jb 0xc9c0
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0xc99d
testb $-0x80, 0x1(%rdi)
jne 0xc99d
orl $0x4000, %eax           # imm = 0x4000
movl %eax, (%r15)
movq %r14, 0x8(%r15)
movq %r15, %r14
jmp 0xc91f
movq 0x10(%r15), %rdi
testq %rdi, %rdi
je 0xc9c0
testb $-0x80, 0x1(%rdi)
jne 0xc9c0
movq %r14, 0x10(%r15)
movq %r15, %r14
jmp 0xc91f
movq 0x10(%r15), %r14
movq %rax, 0x10(%r15)
movq %r15, %rax
testq %r14, %r14
je 0xc9e7
movq %r14, %r15
movl (%r14), %ecx
btl $0xe, %ecx
jae 0xc9b8
andl $0xbfff, %ecx           # imm = 0xBFFF
movl %ecx, (%r15)
movq 0x8(%r15), %r14
movq %rax, 0x8(%r15)
jmp 0xc99d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/VeeeectorPan[P]MyNetdisk/clientSrc/cd.c
// Function: cd
int cd(int sock_fd,char* file_name,char* path,int *file_id)
{
    int ctl_num = CTL_CD;
    send(sock_fd,&ctl_num,sizeof(int),0);
    send(sock_fd,file_id,sizeof(int),0);
    if(strcmp(file_name,"..") == 0)
    {
        ctl_num = CD_BACK;
        send(sock_fd,&ctl_num,sizeof(int),0);
        recv(sock_fd,&ctl_num,sizeof(int),0);
        if(ctl_num == CD_FAIL)
            return -1;
        recv(sock_fd,file_id,sizeof(int),0);
        int i;
        for(i = strlen(path) - 1; path[i] != '/'; --i);
        if(i == 0)
        {
            ++i;
        }
        path[i] = '\0';
        return 0;
    }
    ctl_num = CD_JMP;
    send(sock_fd,&ctl_num,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 == CD_FAIL)
    {
        return -1;
    }
    recv(sock_fd,file_id,sizeof(int),0);
    len = strlen(path);
    if(len != 1)
    {
        path[len++] = '/';
    }
    sprintf(path + len,"%s",file_name);
    len += strlen(file_name);
    path[len] = '\0';
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movl %edi, %r12d
leaq -0x2c(%rbp), %rsi
movl $0x2, (%rsi)
movl $0x4, %edx
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %r12d, %edi
movq %r14, -0x38(%rbp)
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x20c0
cmpb $0x2e, (%r15)
jne 0x246d
cmpb $0x2e, 0x1(%r15)
jne 0x246d
cmpb $0x0, 0x2(%r15)
je 0x253f
leaq -0x2c(%rbp), %r14
movl $0x1, (%r14)
movl $0x4, %edx
movl %r12d, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x20c0
movq %r15, %rdi
callq 0x2080
leaq -0x3c(%rbp), %r13
movl %eax, (%r13)
movl $0x4, %edx
movl %r12d, %edi
movq %r13, %rsi
xorl %ecx, %ecx
callq 0x20c0
movslq (%r13), %rdx
movl %r12d, %edi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %r12d, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2070
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpl $0x2, (%r14)
je 0x252d
xorl %r13d, %r13d
movl $0x4, %edx
movl %r12d, %edi
movq -0x38(%rbp), %rsi
xorl %ecx, %ecx
callq 0x2070
movq %rbx, %rdi
callq 0x2080
movl $0x1, %ecx
cmpl $0x1, %eax
je 0x250c
leal 0x1(%rax), %ecx
cltq
movb $0x2f, (%rbx,%rax)
movslq %ecx, %r14
leaq (%rbx,%r14), %rdi
movq %r15, %rsi
callq 0x2160
movq %r15, %rdi
callq 0x2080
addl %eax, %r14d
movslq %r14d, %rax
movb $0x0, (%rbx,%rax)
movl %r13d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x2c(%rbp), %r14
movl $0x0, (%r14)
movl $0x4, %edx
movl %r12d, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x20c0
movl $0x4, %edx
movl %r12d, %edi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x2070
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
cmpl $0x2, (%r14)
je 0x252d
movl $0x4, %edx
movl %r12d, %edi
movq -0x38(%rbp), %rsi
xorl %ecx, %ecx
callq 0x2070
movq %rbx, %rdi
callq 0x2080
decl %eax
movslq %eax, %rcx
cmpb $0x2f, (%rbx,%rcx)
jne 0x2595
cmpl $0x1, %eax
adcl $0x0, %eax
cltq
movb $0x0, (%rbx,%rax)
xorl %r13d, %r13d
jmp 0x252d
// File: /workspace/github_c_makefile_star2_O3/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 0x2100
movl %eax, -0x2c(%rbp)
cmpl $-0x1, %eax
je 0x2b7a
leaq -0x98(%rbp), %rdi
callq 0x3180
testl %r14d, %r14d
jle 0x2b1b
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 0x2200
movq %rax, %r13
cmpl $-0x1, %r13d
je 0x2b88
leaq -0x98(%rbp), %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x319e
addl %r13d, %r15d
cmpl %r14d, %r15d
jl 0x2ad6
movl -0x2c(%rbp), %edi
callq 0x22d0
leaq -0x98(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x3aac
xorl %r14d, %r14d
leaq 0x256b(%rip), %r15      # 0x50a8
xorl %r12d, %r12d
movzbl -0x40(%rbp,%r12), %ecx
movl $0x3, %esi
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x2270
incq %r12
addq $0x2, %rbx
cmpq $0x10, %r12
jne 0x2b40
movl %r14d, %eax
addq $0x1078, %rsp           # imm = 0x1078
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x251d(%rip), %rdi      # 0x509e
callq 0x2130
jmp 0x2b9c
leaq 0x2514(%rip), %rdi      # 0x50a3
callq 0x2130
movl -0x2c(%rbp), %edi
callq 0x22d0
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x2b65
// File: /workspace/github_c_makefile_star2_O3/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 0x2210
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 0x2160
movq %r15, %rdi
callq 0x2210
movq %r15, %rdi
callq 0x21a0
movq %r12, %rdi
callq 0x21a0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x2d62
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 0x3e10
cmpl $-0x1, %eax
je 0x2d62
movb $0x0, -0x29(%rbp)
movl $0x1, %edx
movl %r14d, %edi
movq %r12, %rsi
xorl %ecx, %ecx
callq 0x2070
testl %eax, %eax
je 0x2d62
cmpb $0x64, -0x29(%rbp)
jne 0x2d29
movq %r15, %rdi
callq 0x2250
movq %r15, %rdi
movq %r13, %rsi
callq 0x2150
cmpl $-0x1, %eax
je 0x2d1a
movl -0xb0(%rbp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax           # imm = 0x4000
je 0x2d39
movq %r15, %rdi
callq 0x20a0
movq %r15, %rdi
movl $0x1ff, %esi            # imm = 0x1FF
callq 0x2090
jmp 0x2d39
movl %r14d, %edi
movq %r15, %rsi
callq 0x416c
cmpl $-0x1, %eax
je 0x2d62
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 0x2cab
movl %r14d, %edi
callq 0x22d0
movq -0x38(%rbp), %rdi
callq 0x21a0
xorl %edi, %edi
callq 0x22a0
// File: /workspace/github_c_makefile_star2_O3/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 0x2160
xorl %edi, %edi
xorl %esi, %esi
callq 0x20d0
movq %rax, %r15
leaq 0x2216(%rip), %rsi      # 0x50ad
movq %rbx, %rdi
movq %rax, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x2050
movq %r15, %rdi
callq 0x21a0
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x3169
leaq -0x1040(%rbp), %r15
leaq -0x2c(%rbp), %r13
movl %ebx, %edi
movq %r15, %rsi
callq 0x4118
movzbl -0x1040(%rbp), %r12d
movl -0x103f(%rbp), %r14d
leaq 0x2048(%rip), %rdi      # 0x512a
leaq -0x103b(%rbp), %rsi
xorl %eax, %eax
callq 0x2030
cmpl $0x66, %r12d
je 0x311a
cmpl $0x64, %r12d
jne 0x313e
leaq 0x202d(%rip), %rdi      # 0x5130
leaq 0x1f47(%rip), %rsi      # 0x5051
xorl %eax, %eax
callq 0x2030
leaq 0x1f54(%rip), %rdi      # 0x506c
jmp 0x3139
leaq 0x2015(%rip), %rdi      # 0x5136
leaq 0x1f29(%rip), %rsi      # 0x5051
movl %r14d, %edx
xorl %eax, %eax
callq 0x2030
leaq 0x2007(%rip), %rdi      # 0x5140
callq 0x2250
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 0x30c2
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_O3/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 %rdi, %r12
movl (%rdi), %eax
movl %eax, %r14d
shrl $0x3, %r14d
andl $0x3f, %r14d
movl $0x40, %r13d
subl %r14d, %r13d
leal (,%rbx,8), %ecx
shrl $0x1d, %edx
addl %eax, %ecx
movl %ecx, (%rdi)
adcl %edx, 0x4(%rdi)
movq %rsi, %r15
cmpl %ebx, %r13d
jbe 0x31eb
movl %r14d, %eax
xorl %r13d, %r13d
jmp 0x3253
leaq 0x18(%r12), %rax
movq %rax, -0x38(%rbp)
leaq (%r12,%r14), %rdi
addq $0x18, %rdi
movl %r13d, %edx
movq %r15, %rsi
callq 0x2110
movq %r12, -0x30(%rbp)
addq $0x8, %r12
movq %r12, %rdi
movq -0x38(%rbp), %rsi
callq 0x327d
movl $0x80, %eax
subl %r14d, %eax
cmpl %ebx, %eax
jbe 0x322f
xorl %eax, %eax
movq -0x30(%rbp), %r12
jmp 0x3253
movl %r13d, %r14d
movl %r13d, %esi
addq %r15, %rsi
movq %r12, %rdi
callq 0x327d
leal 0x40(%r14), %r13d
subl $-0x80, %r14d
cmpl %ebx, %r14d
jbe 0x322f
movq -0x30(%rbp), %r12
xorl %eax, %eax
leaq (%r12,%rax), %rdi
addq $0x18, %rdi
movl %r13d, %eax
addq %rax, %r15
subl %r13d, %ebx
movq %r15, %rsi
movq %rbx, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2110
// File: /workspace/github_c_makefile_star2_O3/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 0x3ad5
subl %eax, %edx
leaq 0x3691(%rip), %rsi      # 0x7180
movq %r14, %rdi
callq 0x319e
leaq -0x18(%rbp), %rsi
movq %r14, %rdi
movl $0x8, %edx
callq 0x319e
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 0x3b0a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3b76
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 0x3b50
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3b97
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 0x3b89
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 0x1515(%rip), %rax      # 0x5160
leaq 0x151d(%rip), %rdi      # 0x516f
cmoveq %rax, %rdi
callq 0x2250
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_O3/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 0x4634
leaq -0x14(%rbp), %rsi
movl $0x3, (%rsi)
movl $0x4, %edx
movl %r14d, %edi
xorl %ecx, %ecx
callq 0x20c0
movq %rbx, %rdi
callq 0x21a0
xorl %edi, %edi
callq 0x22a0