LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: rotate
static void invert (Instruction *p, int e) {
  int i;
  for (i = 0; i < e; i++, e--) {
    Instruction temp = p[i];
    p[i] = p[e];
    p[e] = temp;
  }
}

// Assembly:
cmpl $0x2, %edx
jl 0x23f5c4
leal -0x1(%rdx), %eax
decq %rax
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %r8
movq 0x8(%rdi,%rax,8), %r9
movq %r9, (%rdi,%rcx,8)
movq %r8, 0x8(%rdi,%rax,8)
incq %rcx
leaq -0x1(%rax), %r8
cmpq %rax, %rcx
movq %r8, %rax
jl 0x23f5a3
movl %esi, %ecx
subl %edx, %ecx
jle 0x23f5f9
movslq %edx, %rax
leaq (%rdi,%rax,8), %rax
movl %ecx, %ecx
decq %rcx
xorl %edx, %edx
movq (%rax,%rdx,8), %r8
movq 0x8(%rax,%rcx,8), %r9
movq %r9, (%rax,%rdx,8)
movq %r8, 0x8(%rax,%rcx,8)
incq %rdx
leaq -0x1(%rcx), %r8
cmpq %rcx, %rdx
movq %r8, %rcx
jl 0x23f5d8
testl %esi, %esi
jle 0x23f625
movl %esi, %eax
decq %rax
xorl %ecx, %ecx
movq (%rdi,%rcx,8), %rdx
movq 0x8(%rdi,%rax,8), %rsi
movq %rsi, (%rdi,%rcx,8)
movq %rdx, 0x8(%rdi,%rax,8)
incq %rcx
leaq -0x1(%rax), %rdx
cmpq %rax, %rcx
movq %rdx, %rax
jl 0x23f604
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: skipchecks
static int skipchecks (Instruction *p, int up, int *pn) {
  int i, n = 0;
  for (i = 0; isfixcheck(p + i); i += sizei(p + i)) {
    int st = op_step(p + i);
    if (n + st > MAXOFF - up) break;
    n += st;
  }
  *pn = n;
  return i;
}

// Assembly:
movzbl (%rdi), %r9d
leaq -0x3(%r9), %r8
xorl %ecx, %ecx
movl $0x0, %eax
cmpq $0x15, %r8
jb 0x23f8b4
movl $0xf, %r8d
subl %esi, %r8d
xorl %esi, %esi
movq %rdi, %r10
xorl %ecx, %ecx
movl %ecx, %eax
cmpw $0x0, 0x2(%r10)
jne 0x23f8b0
movl $0x1, %ecx
testb %r9b, %r9b
jne 0x23f866
movzbl 0x1(%r10), %ecx
addl %eax, %ecx
cmpl %r8d, %ecx
ja 0x23f8b0
movzbl %r9b, %r9d
movl $0x5, %eax
leal -0x2(%r9), %r11d
cmpl $0x2, %r11d
jb 0x23f895
cmpl $0x11, %r9d
jne 0x23f890
movzbl 0x1(%r10), %eax
addl $0x2, %eax
jmp 0x23f895
movl $0x1, %eax
addl %esi, %eax
leaq (%rdi,%rax,8), %r10
movzbl (%r10), %r9d
movq %r9, %r11
addq $-0x3, %r11
movl %eax, %esi
cmpq $0x14, %r11
ja 0x23f84d
jmp 0x23f8b4
movl %eax, %ecx
movl %esi, %eax
movl %ecx, (%rdx)
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: capture_aux
static int capture_aux (lua_State *L, int kind, int labelidx) {
  int l1, n;
  Instruction *p1 = getpatt(L, 1, &l1);
  int lc = skipchecks(p1, 0, &n);
  if (lc == l1) {  /* got whole pattern? */
    /* may use a IFullCapture instruction at its end */
    Instruction *p = newpatt(L, l1 + 1);
    int label = getlabel(L, labelidx);
    p += addpatt(L, p, 1);
    setinstcap(p, IFullCapture, label, kind, n);
  }
  else {  /* must use open-close pair */
    Instruction *op = newpatt(L, 1 + l1 + 1);
    Instruction *p = op;
    setinstcap(p++, IOpenCapture, getlabel(L, labelidx), kind, 0);
    p += addpatt(L, p, 1);
    setinstcap(p, ICloseCapture, 0, Cclose, 0);
    optimizecaptures(op);
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
leaq 0x4(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x23dd8d
movq %rsp, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x23f828
movslq (%r15), %rsi
cmpl %esi, %eax
jne 0x23f90f
incl %eax
movslq %eax, %rsi
movq %r14, %rdi
callq 0x23d5e1
movq %rax, %r15
testl %ebp, %ebp
je 0x23f932
movq %r14, %rdi
movl %ebp, %esi
callq 0x23eafb
movw $0x1, %bp
jmp 0x23f934
addq $0x2, %rsi
movq %r14, %rdi
callq 0x23d5e1
movq %rax, %r15
testl %ebp, %ebp
je 0x23f968
movq %r14, %rdi
movl %ebp, %esi
callq 0x23eafb
movw $0x1, %ax
jmp 0x23f96a
xorl %ebp, %ebp
movq %r14, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x23ebf1
movl (%rsp), %ecx
shll $0x4, %ecx
orl %ebx, %ecx
cmpl $0x100, %ecx            # imm = 0x100
jge 0x23f9b1
cltq
movb $0x12, (%r15,%rax,8)
movw %bp, 0x2(%r15,%rax,8)
movb %cl, 0x1(%r15,%rax,8)
jmp 0x23f9a6
xorl %eax, %eax
cmpl $0x100, %ebx            # imm = 0x100
jge 0x23f9b1
movq %r15, %rsi
addq $0x8, %rsi
movb $0x15, (%r15)
movw %ax, 0x2(%r15)
movb %bl, 0x1(%r15)
movq %r14, %rdi
movl $0x1, %edx
callq 0x23ebf1
cltq
movl $0x16, 0x8(%r15,%rax,8)
movq %r15, %rdi
callq 0x23f626
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x189d1c(%rip), %rdi    # 0x3c96d4
leaq 0x189d23(%rip), %rsi    # 0x3c96e2
leaq 0x189d3c(%rip), %rcx    # 0x3c9702
movl $0x3fb, %edx            # imm = 0x3FB
callq 0x174d0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: setmax
static int setmax (lua_State *L) {
  luaL_optinteger(L, 1, -1);
  lua_settop(L, 1);
  lua_setfield(L, LUA_REGISTRYINDEX, MAXSTACKIDX);
  return 0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
movq $-0x1, %rdx
callq 0x227333
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2235b9
leaq 0x188b9d(%rip), %rdx    # 0x3c96a0
movq %rbx, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x224f78
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: pattbehind
static int pattbehind (lua_State *L) {
  int l1;
  CharsetTag st1;
  Instruction *p1 = getpatt(L, 1, &l1);
  int n = luaL_optint(L, 2, 1);
  luaL_argcheck(L, n <= MAXAUX, 2, "lookbehind delta too large");
  if (!nocalls(p1))
    luaL_error(L, "lookbehind pattern cannot contain non terminals");
  if (isfail(p1) || issucc(p1))
    lua_pushvalue(L, 1);  /* <fail == fail; <true == true */
  else if (n == 1 && tocharset(p1, &st1) == ISCHARSET) {
    Instruction *p = newpatt(L, 1 + l1);
    setinstaux(p, IBack, 0, 1); p++;
    copypatt(p, p1, l1);
  }
  else {  /* Choice L1; Back; p1; BackCommit L2; L1: fail; L2: */
    Instruction *p = newpatt(L, 2 + l1 + 2);
    setinst(p++, IChoice, 2 + l1 + 1);
    setinstaux(p++, IBack, 0, n);
    p += addpatt(L, p, 1);
    setinst(p++, IBackCommit, 2);
    setinst(p, IFail, 0);
  }
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %rdx
movl $0x1, %esi
callq 0x23dd8d
movq %rax, %r15
movl $0x1, %edx
movq %rbx, %rdi
movl $0x2, %esi
callq 0x227333
movq %rax, %r14
cmpl $0x100, %r14d           # imm = 0x100
jl 0x240b64
leaq 0x18949c(%rip), %rdx    # 0x3c9ff3
movq %rbx, %rdi
movl $0x2, %esi
callq 0x226d91
movq %r15, %rax
movzbl (%rax), %ecx
cmpl $0x5, %ecx
jg 0x240b7e
movl $0x5, %edx
addl $-0x2, %ecx
cmpl $0x2, %ecx
jb 0x240b9c
jmp 0x240b97
cmpl $0x11, %ecx
jne 0x240b8d
movzbl 0x1(%rax), %edx
addq $0x2, %rdx
jmp 0x240b9c
cmpl $0x6, %ecx
je 0x240bb3
cmpl $0xa, %ecx
je 0x240ba2
movl $0x1, %edx
leaq (%rax,%rdx,8), %rax
jmp 0x240b67
leaq 0x189465(%rip), %rsi    # 0x3ca00e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x226e43
movzbl (%r15), %eax
cmpl $0xf, %eax
je 0x240bc1
cmpl $0x6, %eax
jne 0x240bd3
movq %rbx, %rdi
movl $0x1, %esi
callq 0x223a2b
jmp 0x240c7f
cmpl $0x1, %r14d
jne 0x240c18
leaq 0xc(%rsp), %rsi
movq %r15, %rdi
callq 0x23e4cd
cmpl $0x1, %eax
jne 0x240c18
movslq 0x8(%rsp), %rsi
incq %rsi
movq %rbx, %rdi
callq 0x23d5e1
movl $0x104, (%rax)          # imm = 0x104
leaq 0x8(%rax), %rdi
movslq 0x8(%rsp), %rdx
shlq $0x3, %rdx
movq %r15, %rsi
callq 0x17660
jmp 0x240c7f
movslq 0x8(%rsp), %rsi
addq $0x4, %rsi
movq %rbx, %rdi
callq 0x23d5e1
movq %rax, %r15
movl 0x8(%rsp), %eax
addl $0x3, %eax
movw $0x7, (%r15)
movw %ax, 0x2(%r15)
cmpl $0x100, %r14d           # imm = 0x100
jge 0x240c8e
movq %r15, %rsi
addq $0x10, %rsi
movb $0x4, 0x8(%r15)
movw $0x0, 0xa(%r15)
movb %r14b, 0x9(%r15)
movq %rbx, %rdi
movl $0x1, %edx
callq 0x23ebf1
cltq
movl $0x2000d, 0x10(%r15,%rax,8) # imm = 0x2000D
movl $0xf, 0x18(%r15,%rax,8)
movl $0x1, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x188a3f(%rip), %rdi    # 0x3c96d4
leaq 0x188a46(%rip), %rsi    # 0x3c96e2
leaq 0x188a5f(%rip), %rcx    # 0x3c9702
movl $0x3fb, %edx            # imm = 0x3FB
callq 0x174d0
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: capconst_l
static int capconst_l (lua_State *L) {
  int i, j;
  int n = lua_gettop(L);
  Instruction *p = newpatt(L, n > 1 ? n + 2 : n);
  lua_createtable(L, n, 0);  /* new environment for the new pattern */
  if (n > 1) setinstcap(p++, IOpenCapture, 0, Cgroup, 0);
  for (i = j = 1; i <= n; i++) {
    if (lua_isnil(L, i))
      setinstcap(p++, IEmptyCaptureIdx, 0, Cconst, 0);
    else {
      setinstcap(p++, IEmptyCaptureIdx, j, Cconst, 0);
      lua_pushvalue(L, i);
      lua_rawseti(L, -2, j++);
    }
  }
  if (n > 1) setinstcap(p++, ICloseCapture, 0, Cclose, 0);
  lua_setfenv(L, -2);   /* set environment */
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2235ac
movl %eax, %r14d
leal 0x2(%r14), %eax
cmpl $0x2, %r14d
cmovll %r14d, %eax
movslq %eax, %rsi
movq %rbx, %rdi
callq 0x23d5e1
movq %rax, %r15
movq %rbx, %rdi
movl %r14d, %esi
xorl %edx, %edx
callq 0x224be0
cmpl $0x2, %r14d
jl 0x240d3d
movl $0xd15, (%r15)          # imm = 0xD15
addq $0x8, %r15
jmp 0x240d43
cmpl $0x1, %r14d
jne 0x240dc0
movq %r14, (%rsp)
movl %r14d, %ebp
movl $0x1, %r12d
xorl %r13d, %r13d
leaq 0x1(%r13), %r14
movq %rbx, %rdi
movl %r14d, %esi
callq 0x223a4b
movb $0x14, (%r15,%r13,8)
testl %eax, %eax
je 0x240d9c
movw %r12w, 0x2(%r15,%r13,8)
movb $0x2, 0x1(%r15,%r13,8)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x223a2b
leal 0x1(%r12), %r13d
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl %r12d, %edx
callq 0x2250be
movl %r13d, %r12d
jmp 0x240daa
movw $0x0, 0x2(%r15,%r13,8)
movb $0x2, 0x1(%r15,%r13,8)
movq %r14, %r13
cmpl %r14d, %ebp
jne 0x240d53
cmpl $0x2, (%rsp)
jl 0x240dc0
movl $0x16, (%r15,%r14,8)
movq %rbx, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22523b
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: backref_l
static int backref_l (lua_State *L) {
  Instruction *p = newpatt(L, 1);
  int n = getlabel(L, 1);
  setinstcap(p, IEmptyCaptureIdx, n, Cbackref, 0);
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x23d5e1
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x23eafb
movl $0x10314, (%r14)        # imm = 0x10314
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: argcap_l
static int argcap_l (lua_State *L) {
  int n = luaL_checkint(L, 1);
  Instruction *p = newpatt(L, 1);
  luaL_argcheck(L, 0 < n && n <= SHRT_MAX, 1, "invalid argument index");
  setinstcap(p, IEmptyCapture, n, Carg, 0);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, %esi
callq 0x2272f4
movq %rax, %rbx
movl $0x1, %esi
movq %r14, %rdi
callq 0x23d5e1
movq %rax, %r15
movl %ebx, %eax
decl %eax
cmpl $0x7fff, %eax           # imm = 0x7FFF
jb 0x240eb9
leaq 0x189192(%rip), %rdx    # 0x3ca03e
movq %r14, %rdi
movl $0x1, %esi
callq 0x226d91
movw $0x413, (%r15)          # imm = 0x413
movw %bx, 0x2(%r15)
movl $0x1, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: matchtime_l
static int matchtime_l (lua_State *L) {
  int l1 = getpattl(L, 1);
  Instruction *op = newpatt(L, 1 + l1 + 1);
  Instruction *p = op;
  luaL_checktype(L, 2, LUA_TFUNCTION);
  setinstcap(p++, IOpenCapture, value2fenv(L, 2), Cruntime, 0);
  p += addpatt(L, p, 1);
  setinstcap(p, ICloseRunTime, 0, Cclose, 0);
  optimizecaptures(op);
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xc(%rsp), %r14
movl $0x1, %esi
movq %r14, %rdx
callq 0x23dd8d
movslq (%r14), %rsi
addq $0x2, %rsi
movq %rbx, %rdi
callq 0x23d5e1
movq %rax, %r14
movq %rbx, %rdi
movl $0x2, %esi
movl $0x6, %edx
callq 0x2271e1
leaq 0x8(%r14), %r15
movq %rbx, %rdi
movl $0x2, %esi
callq 0x23eafb
movl $0x10c15, (%r14)        # imm = 0x10C15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x23ebf1
cltq
movl $0x17, 0x8(%r14,%rax,8)
movq %r14, %rdi
callq 0x23f626
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: range_l
static int range_l (lua_State *L) {
  int arg;
  int top = lua_gettop(L);
  Instruction *p = newcharset(L);
  for (arg = 1; arg <= top; arg++) {
    int c;
    size_t l;
    const char *r = luaL_checklstring(L, arg, &l);
    luaL_argcheck(L, l == 2, arg, "range must have two characters");
    for (c = (byte)r[0]; c <= (byte)r[1]; c++)
      setchar(p[1].buff, c);
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2235ac
movl %eax, %ebp
movl $0x5, %esi
movq %rbx, %rdi
callq 0x23d5e1
movb $0x2, (%rax)
movw $0x0, 0x2(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
testl %ebp, %ebp
jle 0x241056
movq %rax, %r14
addq $0x8, %r14
movl $0x1, %r12d
movq %rsp, %r15
movq %rbx, %rdi
movl %r12d, %esi
movq %r15, %rdx
callq 0x22708d
movq %rax, %r13
cmpq $0x2, (%rsp)
je 0x24101b
movq %rbx, %rdi
movl %r12d, %esi
leaq 0x18903f(%rip), %rdx    # 0x3ca055
callq 0x226d91
movzbl (%r13), %eax
cmpb 0x1(%r13), %al
ja 0x241049
movl %eax, %ecx
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
movl %eax, %ecx
shrl $0x3, %ecx
orb %dl, (%r14,%rcx)
leal 0x1(%rax), %ecx
movzbl 0x1(%r13), %edx
cmpl %edx, %eax
movl %ecx, %eax
jb 0x241026
leal 0x1(%r12), %eax
cmpl %ebp, %r12d
movl %eax, %r12d
jne 0x240ff1
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: set_l
static int set_l (lua_State *L) {
  size_t l;
  const char *s = luaL_checklstring(L, 1, &l);
  if (l == 1)
    getpatt(L, 1, NULL);  /* a unit set is equivalent to a literal */
  else {
    Instruction *p = newcharset(L);
    while (l--) {
      setchar(p[1].buff, (byte)(*s));
      s++;
    }
  }
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movl $0x1, %esi
movq %r15, %rdx
callq 0x22708d
cmpq $0x1, (%r15)
jne 0x24109f
movq %r14, %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x23dd8d
jmp 0x2410ef
movq %rax, %rbx
movl $0x5, %esi
movq %r14, %rdi
callq 0x23d5e1
movb $0x2, (%rax)
movw $0x0, 0x2(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rax)
movups %xmm0, 0x18(%rax)
subq $0x1, 0x8(%rsp)
jb 0x2410ef
addq $0x8, %rax
movzbl (%rbx), %edx
movl %edx, %ecx
andb $0x7, %cl
movb $0x1, %sil
shlb %cl, %sil
shrl $0x3, %edx
orb %sil, (%rax,%rdx)
incq %rbx
subq $0x1, 0x8(%rsp)
jae 0x2410cf
movl $0x1, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: nter_l
static int nter_l (lua_State *L) {
  Instruction *p;
  luaL_argcheck(L, !lua_isnoneornil(L, 1), 1, "non-nil value expected");
  p = newpatt(L, 1);
  setinst(p, IOpenCall, value2fenv(L, 1));
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %esi
callq 0x223a4b
testl %eax, %eax
jg 0x241127
leaq 0x188f5a(%rip), %rdx    # 0x3ca074
movq %rbx, %rdi
movl $0x1, %esi
callq 0x226d91
movl $0x1, %esi
movq %rbx, %rdi
callq 0x23d5e1
movq %rax, %r14
movq %rbx, %rdi
movl $0x1, %esi
callq 0x23eafb
movl $0x1000a, (%r14)        # imm = 0x1000A
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: type_l
static int type_l (lua_State *L) {
  if (testpattern(L, 1))
    lua_pushliteral(L, "pattern");
  else
    lua_pushnil(L);
  return 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x1, %esi
callq 0x23eb40
testl %eax, %eax
je 0x241180
leaq 0x10b677(%rip), %rsi    # 0x34c7e8
movl $0x7, %edx
movq %rbx, %rdi
callq 0x2241f7
jmp 0x241188
movq %rbx, %rdi
callq 0x2241b4
movl $0x1, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: doublestack
static Stack *doublestack (lua_State *L, Stack **stacklimit, int ptop) {
  Stack *stack = getstackbase(L, ptop);
  Stack *newstack;
  int n = *stacklimit - stack;
  int max, newn;
  lua_getfield(L, LUA_REGISTRYINDEX, MAXSTACKIDX);
  max = lua_tointeger(L, -1);
  lua_pop(L, 1);
  if (n >= max)
    luaL_error(L, "too many pending calls/choices");
  newn = 2*n; if (newn > max) newn = max;
  newstack = (Stack *)lua_newuserdata(L, newn * sizeof(Stack));
  memcpy(newstack, stack, n * sizeof(Stack));
  lua_replace(L, stackidx(ptop));
  *stacklimit = newstack + newn;
  return newstack + n;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
addl $0x4, %ebp
movl %ebp, %esi
callq 0x224118
movq %rax, %r15
movq %rbx, (%rsp)
movq (%rbx), %rax
subq %r15, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rbx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbx
leaq 0x1884ba(%rip), %rdx    # 0x3c96a0
movq %r14, %rdi
movl $0xffffd8f0, %esi       # imm = 0xFFFFD8F0
callq 0x224a06
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x223e53
movq %rax, %r12
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x2235b9
cmpl %r12d, %ebx
jl 0x241226
leaq 0x188667(%rip), %rsi    # 0x3c9883
movq %r14, %rdi
xorl %eax, %eax
callq 0x226e43
leal (%rbx,%rbx), %eax
cmpl %r12d, %eax
cmovll %eax, %r12d
movslq %r12d, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x225cfa
movq %rax, %r13
movslq %ebx, %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rbx
movq %r13, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x17660
movq %r14, %rdi
movl %ebp, %esi
callq 0x22383a
addq %r13, %r12
movq (%rsp), %rax
movq %r12, (%rax)
addq %rbx, %r13
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: doublecap
static Capture *doublecap (lua_State *L, Capture *cap, int captop, int ptop) {
  Capture *newc;
  if (captop >= INT_MAX/((int)sizeof(Capture) * 2))
    luaL_error(L, "too many captures");
  newc = (Capture *)lua_newuserdata(L, captop * 2 * sizeof(Capture));
  memcpy(newc, cap, captop * sizeof(Capture));
  lua_replace(L, caplistidx(ptop));
  return newc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %r14
cmpl $0x3ffffff, %edx        # imm = 0x3FFFFFF
jl 0x2412b8
leaq 0x187a18(%rip), %rsi    # 0x3c8cc6
movq %r14, %rdi
xorl %eax, %eax
callq 0x226e43
leal (%r12,%r12), %eax
movslq %eax, %rsi
shlq $0x4, %rsi
movq %r14, %rdi
callq 0x225cfa
movq %rax, %r13
movslq %r12d, %rdx
shlq $0x4, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x17660
addl $0x2, %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x22383a
movq %r13, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: pushallvalues
static int pushallvalues (CapState *cs, int addextra) {
  Capture *co = cs->cap;
  int n = 0;
  if (isfullcap(cs->cap++)) {
    pushsubject(cs, co);  /* push whole match */
    return 1;
  }
  while (!isclosecap(cs->cap))
    n += pushcapture(cs);
  if (addextra || n == 0) {  /* need extra? */
    lua_pushlstring(cs->L, co->s, cs->cap->s - co->s);  /* push whole match */
    n++;
  }
  cs->cap++;  /* skip close entry */
  return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %r15
leaq 0x10(%r15), %rax
movq %rax, (%rdi)
movzbl 0xb(%r15), %edx
testq %rdx, %rdx
je 0x24132d
movq 0x10(%rbx), %rdi
movq (%r15), %rsi
decl %edx
callq 0x2241f7
movl $0x1, %ebp
jmp 0x241380
cmpb $0x0, 0x1a(%r15)
je 0x241360
movl %esi, %r14d
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x24138d
addl %eax, %ebp
movq (%rbx), %rax
cmpb $0x0, 0xa(%rax)
jne 0x241339
testl %r14d, %r14d
setne %cl
testl %ebp, %ebp
sete %dl
orb %cl, %dl
cmpb $0x1, %dl
je 0x241362
jmp 0x241379
xorl %ebp, %ebp
movq 0x10(%rbx), %rdi
movq (%r15), %rsi
movq (%rax), %rdx
subq %rsi, %rdx
callq 0x2241f7
incl %ebp
movq (%rbx), %rax
addq $0x10, %rax
movq %rax, (%rbx)
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: stringcap
static void stringcap (luaL_Buffer *b, CapState *cs) {
  StrAux cps[MAXSTRCAPS];
  int n;
  size_t len, i;
  const char *c;
  updatecache(cs, cs->cap->idx);
  c = lua_tolstring(cs->L, subscache(cs), &len);
  n = getstrcaps(cs, cps, 0) - 1;
  for (i = 0; i < len; i++) {
    if (c[i] != '%' || c[++i] < '0' || c[i] > '9')
      luaL_addchar(b, c[i]);
    else {
      int l = c[i] - '0';
      if (l > n)
        luaL_error(cs->L, "invalid capture index (%d)", l);
      else if (cps[l].isstring)
        luaL_addlstring(b, cps[l].u.s.s, cps[l].u.s.e - cps[l].u.s.s);
      else {
        Capture *curr = cs->cap;
        cs->cap = cps[l].u.cp;
        if (addonestring(b, cs, "capture") == 0)
          luaL_error(cs->L, "no values in capture index %d", l);
        cs->cap = curr;
      }
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movswl 0x8(%rax), %esi
cmpl %esi, 0x28(%rbx)
je 0x24195a
movq %rbx, %rdi
callq 0x241b23
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
incl %esi
leaq 0x18(%rsp), %r12
movq %r12, %rdx
callq 0x223ea8
movq %rax, %r15
leaq 0x20(%rsp), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x241b59
movl %eax, 0xc(%rsp)
cmpq $0x0, (%r12)
je 0x241a75
leaq 0x2018(%r14), %r13
xorl %ebp, %ebp
movb (%r15,%rbp), %al
cmpb $0x25, %al
jne 0x2419b2
movb 0x1(%r15,%rbp), %al
incq %rbp
leal -0x3a(%rax), %ecx
cmpb $-0xb, %cl
ja 0x2419e1
movq (%r14), %rcx
cmpq %r13, %rcx
jb 0x2419c9
movq %r14, %rdi
callq 0x227a17
movb (%r15,%rbp), %al
movq (%r14), %rcx
leaq 0x1(%rcx), %rdx
movq %rdx, (%r14)
movb %al, (%rcx)
incq %rbp
cmpq 0x18(%rsp), %rbp
jb 0x24199a
jmp 0x241a75
addb $-0x30, %al
movzbl %al, %r12d
cmpl %r12d, 0xc(%rsp)
jle 0x241a17
movl %r12d, %eax
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax,8), %rax
addq $0x20, %rax
cmpl $0x0, (%rax)
je 0x241a2e
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
subq %rsi, %rdx
movq %r14, %rdi
callq 0x227976
jmp 0x2419d2
movq 0x10(%rbx), %rdi
leaq 0x1883d2(%rip), %rsi    # 0x3c9df4
movl %r12d, %edx
xorl %eax, %eax
callq 0x226e43
jmp 0x2419d2
movq (%rbx), %rcx
movq %rcx, 0x10(%rsp)
movq 0x8(%rax), %rax
movq %rax, (%rbx)
movq %r14, %rdi
movq %rbx, %rsi
leaq 0x1a856a(%rip), %rdx    # 0x3e9fb4
callq 0x241c6e
testl %eax, %eax
jne 0x241a68
movq 0x10(%rbx), %rdi
leaq 0x1883b1(%rip), %rsi    # 0x3c9e0f
movl %r12d, %edx
xorl %eax, %eax
callq 0x226e43
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
jmp 0x2419d2
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: substcap
static void substcap (luaL_Buffer *b, CapState *cs) {
  const char *curr = cs->cap->s;
  if (isfullcap(cs->cap))  /* no nested captures? */
    luaL_addlstring(b, curr, cs->cap->siz - 1);  /* keep original text */
  else {
    cs->cap++;
    while (!isclosecap(cs->cap)) {
      const char *next = cs->cap->s;
      luaL_addlstring(b, curr, next - curr);  /* add text up to capture */
      if (addonestring(b, cs, "replacement") == 0)  /* no capture value? */
        curr = next;  /* keep original text in final result */
      else
        curr = closeaddr(cs->cap - 1);  /* continue after match */
    }
    luaL_addlstring(b, curr, cs->cap->s - curr);  /* add last piece of text */
  }
  cs->cap++;  /* go to next capture */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq (%rax), %rsi
movzbl 0xb(%rax), %edx
testq %rdx, %rdx
je 0x241aab
decl %edx
movq %r14, %rdi
jmp 0x241b0e
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
cmpb $0x0, 0x1a(%rax)
je 0x241aff
leaq 0x13330f(%rip), %r12    # 0x374dce
movq (%rcx), %r15
movq %r15, %rdx
subq %rsi, %rdx
movq %r14, %rdi
callq 0x227976
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x241c6e
movq (%rbx), %rcx
testl %eax, %eax
je 0x241af4
movq -0x10(%rcx), %rax
movzbl -0x5(%rcx), %edx
leaq (%rax,%rdx), %r15
decq %r15
cmpb $0x0, 0xa(%rcx)
movq %r15, %rsi
jne 0x241abf
jmp 0x241b02
movq %rsi, %r15
movq (%rcx), %rdx
subq %r15, %rdx
movq %r14, %rdi
movq %r15, %rsi
callq 0x227976
addq $0x10, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: getstrcaps
static int getstrcaps (CapState *cs, StrAux *cps, int n) {
  int k = n++;
  cps[k].isstring = 1;
  cps[k].u.s.s = cs->cap->s;
  if (!isfullcap(cs->cap++)) {
    while (!isclosecap(cs->cap)) {
      if (n >= MAXSTRCAPS)  /* too many captures? */
        cs->cap = nextcap(cs->cap);  /* skip it */
      else if (captype(cs->cap) == Csimple)
        n = getstrcaps(cs, cps, n);
      else {
        cps[n].isstring = 0;
        cps[n].u.cp = cs->cap;
        cs->cap = nextcap(cs->cap);
        n++;
      }
    }
    cs->cap++;  /* skip close */
  }
  cps[k].u.s.e = closeaddr(cs->cap - 1);
  return n;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %eax
movslq %edx, %rcx
incl %eax
leaq (%rcx,%rcx,2), %rcx
leaq (%rsi,%rcx,8), %r15
movl $0x1, (%r15)
movq (%rdi), %rcx
movq (%rcx), %rcx
movq %rcx, 0x8(%r15)
movq (%rdi), %rdx
leaq 0x10(%rdx), %rcx
movq %rcx, (%rdi)
cmpb $0x0, 0xb(%rdx)
jne 0x241c56
movq %rdi, %rbx
movb 0x1a(%rdx), %dl
testb %dl, %dl
je 0x241c4f
movq %rsi, %r14
cmpl $0xa, %eax
jl 0x241bb7
cmpb $0x0, 0xb(%rcx)
je 0x241bfd
addq $0x10, %rcx
movq %rcx, (%rbx)
jmp 0x241bf4
cmpb $0x5, %dl
jne 0x241bce
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x241b59
movq (%rbx), %rcx
jmp 0x241bf4
movslq %eax, %rdx
leaq (%rdx,%rdx,2), %rdx
movl $0x0, (%r14,%rdx,8)
movq %rcx, 0x8(%r14,%rdx,8)
movq (%rbx), %rcx
cmpb $0x0, 0xb(%rcx)
je 0x241c26
addq $0x10, %rcx
movq %rcx, (%rbx)
incl %eax
movb 0xa(%rcx), %dl
testb %dl, %dl
jne 0x241ba3
jmp 0x241c4f
addq $0x20, %rcx
xorl %edx, %edx
cmpb $0x0, -0x6(%rcx)
je 0x241c15
xorl %esi, %esi
cmpb $0x0, -0x5(%rcx)
sete %sil
jmp 0x241c1e
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
testl %edx, %edx
je 0x241bb2
addl %esi, %edx
addq $0x10, %rcx
jmp 0x241c03
addq $0x20, %rcx
xorl %edx, %edx
cmpb $0x0, -0x6(%rcx)
je 0x241c3e
xorl %esi, %esi
cmpb $0x0, -0x5(%rcx)
sete %sil
jmp 0x241c47
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
testl %edx, %edx
je 0x241bef
addl %esi, %edx
addq $0x10, %rcx
jmp 0x241c2c
addq $0x10, %rcx
movq %rcx, (%rbx)
movq -0x10(%rcx), %rdx
movzbl -0x5(%rcx), %ecx
addq %rdx, %rcx
decq %rcx
movq %rcx, 0x10(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: addonestring
static int addonestring (luaL_Buffer *b, CapState *cs, const char *what) {
  switch (captype(cs->cap)) {
    case Cstring:
      stringcap(b, cs);  /* add capture directly to buffer */
      return 1;
    case Csubst:
      substcap(b, cs);  /* add capture directly to buffer */
      return 1;
    default: {
      lua_State *L = cs->L;
      int n = pushcapture(cs);
      if (n > 0) {
        if (n > 1) lua_pop(L, n - 1);  /* only one result */
        if (!lua_isstring(L, -1))
          luaL_error(L, "invalid %s value (a %s)", what, luaL_typename(L, -1));
        luaL_addvalue(b);
      }
      return n;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rax
movzbl 0xa(%rax), %eax
cmpl $0xa, %eax
je 0x241c93
cmpl $0x9, %eax
jne 0x241ca2
movq %rbx, %rdi
callq 0x24192f
jmp 0x241c9b
movq %rbx, %rdi
callq 0x241a87
movl $0x1, %ebp
jmp 0x241d0f
movq %rdx, %r14
movq 0x10(%rsi), %r15
movq %rsi, %rdi
callq 0x24138d
movl %eax, %ebp
testl %eax, %eax
jle 0x241d0f
cmpl $0x1, %ebp
je 0x241cc8
movl %ebp, %esi
negl %esi
movq %r15, %rdi
callq 0x2235b9
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x223b1f
testl %eax, %eax
jne 0x241d07
movq %r15, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x223a4b
movq %r15, %rdi
movl %eax, %esi
callq 0x223a66
leaq 0x188136(%rip), %rsi    # 0x3c9e2d
movq %r15, %rdi
movq %r14, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x226e43
movq %rbx, %rdi
callq 0x227b0d
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: printcharset
static void printcharset (const Charset st) {
  int i;
  printf("[");
  for (i = 0; i <= UCHAR_MAX; i++) {
    int first = i;
    while (testchar(st, i) && i <= UCHAR_MAX) i++;
    if (i - 1 == first)  /* unary range? */
      printf("(%02x)", first);
    else if (i - 1 > first)  /* non-empty range? */
      printf("(%02x-%02x)", first, i - 1);
  }
  printf("]");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x5b, %edi
callq 0x17a20
leaq 0x188235(%rip), %r14    # 0x3c9fc7
leaq 0x188235(%rip), %r15    # 0x3c9fce
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
leal (%r12,%r13), %eax
movl %eax, %ecx
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
decl %ebp
incl %r13d
cmpl $0xff, %eax
jg 0x241dca
sarl $0x3, %eax
cltq
movzbl (%rbx,%rax), %eax
andl %eax, %edx
jne 0x241da1
cmpl $-0x2, %ebp
jne 0x241dde
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x17070
jmp 0x241df8
movl %r12d, %edx
subl %ebp, %edx
addl $-0x2, %edx
cmpl %r12d, %edx
jle 0x241df8
movq %r15, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x17070
notl %ebp
addl %r12d, %ebp
addl %r12d, %r13d
movl %r13d, %r12d
cmpl $0xff, %ebp
jl 0x241d9c
movl $0x5d, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x17a20
nop
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/samtools-0.1.18/bam.c
// Function: bam_cigar2qlen
int32_t bam_cigar2qlen(const bam1_core_t *c, const uint32_t *cigar)
{
	uint32_t k;
	int32_t l = 0;
	for (k = 0; k < c->n_cigar; ++k) {
		int op = cigar[k] & BAM_CIGAR_MASK;
		if (op == BAM_CMATCH || op == BAM_CINS || op == BAM_CSOFT_CLIP || op == BAM_CEQUAL || op == BAM_CDIFF)
			l += cigar[k] >> BAM_CIGAR_SHIFT;
	}
	return l;
}

// Assembly:
movq 0x8(%rdi), %rcx
xorl %eax, %eax
shrq $0x30, %rcx
je 0x241ea1
xorl %edx, %edx
movl $0x193, %edi            # imm = 0x193
xorl %eax, %eax
movl (%rsi,%rdx,4), %r8d
movl %r8d, %r9d
andl $0xf, %r9d
cmpl $0x8, %r9d
ja 0x241e99
btl %r9d, %edi
jae 0x241e99
shrl $0x4, %r8d
addl %r8d, %eax
incq %rdx
cmpq %rdx, %rcx
jne 0x241e7b
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_ParserCreate_MM
XML_Parser XMLCALL
XML_ParserCreate_MM(const XML_Char *encodingName,
                    const XML_Memory_Handling_Suite *memsuite,
                    const XML_Char *nameSep)
{
  XML_Parser parser = parserCreate(encodingName, memsuite, nameSep, NULL);
  if (parser != NULL && ns) {
    /* implicit context only set for root parser, since child
       parsers (i.e. external entity parsers) will inherit it
    */
    if (!setContext(parser, implicitContext)) {
      XML_ParserFree(parser);
      return NULL;
    }
  }
  return parser;
}

// Assembly:
pushq %rbx
callq 0x24b854
testq %rax, %rax
je 0x24b83b
movq %rax, %rbx
cmpb $0x0, 0x1c8(%rax)
je 0x24b83d
leaq 0x17f759(%rip), %rsi    # 0x3caf80
movq %rbx, %rdi
callq 0x24baee
testb %al, %al
jne 0x24b83d
movq %rbx, %rdi
callq 0x24bd74
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_SetEncoding
enum XML_Status XMLCALL
XML_SetEncoding(XML_Parser parser, const XML_Char *encodingName)
{
  /* Block after XML_Parse()/XML_ParseBuffer() has been called.
     XXX There's no way for the caller to determine which of the
     XXX possible error cases caused the XML_STATUS_ERROR return.
  */
  if (ps_parsing == XML_PARSING || ps_parsing == XML_SUSPENDED)
    return XML_STATUS_ERROR;
  if (encodingName == NULL)
    protocolEncodingName = NULL;
  else {
    protocolEncodingName = poolCopyString(&tempPool, encodingName);
    if (!protocolEncodingName)
      return XML_STATUS_ERROR;
  }
  return XML_STATUS_OK;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x378(%rdi), %eax
xorl %ebx, %ebx
orl $0x2, %eax
cmpl $0x3, %eax
je 0x24c4f2
movq %rdi, %r14
testq %rsi, %rsi
je 0x24c4e2
leaq 0x300(%r14), %rdi
callq 0x24c4fc
movq %rax, 0x1c0(%r14)
testq %rax, %rax
jne 0x24c4ed
jmp 0x24c4f2
movq $0x0, 0x1c0(%r14)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: poolCopyString
static const XML_Char * FASTCALL
poolCopyString(STRING_POOL *pool, const XML_Char *s)
{
  do {
    if (!poolAppendChar(pool, *s))
      return NULL;
  } while (*s++);
  s = pool->start;
  poolFinish(pool);
  return s;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
movq 0x18(%r14), %rax
cmpq 0x10(%r14), %rax
jne 0x24c523
movq %r14, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24c546
movq 0x18(%r14), %rax
movb (%r15), %cl
leaq 0x1(%rax), %rdx
movq %rdx, 0x18(%r14)
movb %cl, (%rax)
cmpb $0x0, (%r15)
leaq 0x1(%r15), %r15
jne 0x24c509
movq 0x18(%r14), %rax
movq 0x20(%r14), %rbx
movq %rax, 0x20(%r14)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: externalEntityInitProcessor
static enum XML_Error PTRCALL
externalEntityInitProcessor(XML_Parser parser,
                            const char *start,
                            const char *end,
                            const char **endPtr)
{
  enum XML_Error result = initializeEncoding(parser);
  if (result != XML_ERROR_NONE)
    return result;
  processor = externalEntityInitProcessor2;
  return externalEntityInitProcessor2(parser, start, end, endPtr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x24d73d
testl %eax, %eax
je 0x24cccb
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x5e5a(%rip), %rax      # 0x252b2c
movq %rax, 0x200(%r12)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x252b2c
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: poolDestroy
static void FASTCALL
poolDestroy(STRING_POOL *pool)
{
  BLOCK *p = pool->blocks;
  while (p) {
    BLOCK *tem = p->next;
    pool->mem->free_fcn(p);
    p = tem;
  }
  p = pool->freeBlocks;
  while (p) {
    BLOCK *tem = p->next;
    pool->mem->free_fcn(p);
    p = tem;
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x24cd17
movq (%rdi), %r14
movq 0x28(%rbx), %rax
callq *0x10(%rax)
movq %r14, %rdi
testq %r14, %r14
jne 0x24cd05
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x24cd32
movq (%rdi), %r14
movq 0x28(%rbx), %rax
callq *0x10(%rax)
movq %r14, %rdi
testq %r14, %r14
jne 0x24cd20
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_ParseBuffer
enum XML_Status XMLCALL
XML_ParseBuffer(XML_Parser parser, int len, int isFinal)
{
  const char *start;
  enum XML_Status result = XML_STATUS_OK;

  switch (ps_parsing) {
  case XML_SUSPENDED:
    errorCode = XML_ERROR_SUSPENDED;
    return XML_STATUS_ERROR;
  case XML_FINISHED:
    errorCode = XML_ERROR_FINISHED;
    return XML_STATUS_ERROR;
  default:
    ps_parsing = XML_PARSING;
  }

  start = bufferPtr;
  positionPtr = start;
  bufferEnd += len;
  parseEndPtr = bufferEnd;
  parseEndByteIndex += len;
  ps_finalBuffer = (XML_Bool)isFinal;

  errorCode = processor(parser, start, parseEndPtr, &bufferPtr);

  if (errorCode != XML_ERROR_NONE) {
    eventEndPtr = eventPtr;
    processor = errorProcessor;
    return XML_STATUS_ERROR;
  }
  else {
    switch (ps_parsing) {
    case XML_SUSPENDED:
      result = XML_STATUS_SUSPENDED;
      break;
    case XML_INITIALIZED: 
    case XML_PARSING:
      if (isFinal) {
        ps_parsing = XML_FINISHED;
        return result;
      }
    default: ;  /* should not happen */
    }
  }

  XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
  positionPtr = bufferPtr;
  return result;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x378(%rdi), %eax
cmpl $0x2, %eax
je 0x24d2a2
cmpl $0x3, %eax
jne 0x24d2ae
movl $0x21, 0x208(%rbx)
jmp 0x24d319
movl $0x24, 0x208(%rbx)
jmp 0x24d319
movl %edx, %r14d
movl $0x1, 0x378(%rbx)
leaq 0x30(%rbx), %rcx
movq 0x30(%rbx), %rax
movq %rax, 0x220(%rbx)
movslq %esi, %rsi
movq 0x38(%rbx), %rdx
addq %rsi, %rdx
movq %rdx, 0x38(%rbx)
movq %rdx, 0x50(%rbx)
addq %rsi, 0x48(%rbx)
movb %r14b, 0x37c(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq *0x200(%rbx)
movl %eax, 0x208(%rbx)
testl %eax, %eax
je 0x24d322
movq 0x210(%rbx), %rax
movq %rax, 0x218(%rbx)
leaq -0x1a4(%rip), %rax      # 0x24d16e
movq %rax, 0x200(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl 0x378(%rbx), %eax
movl $0x1, %ebp
cmpl $0x2, %eax
jae 0x24d343
testl %r14d, %r14d
je 0x24d34d
movl $0x2, 0x378(%rbx)
jmp 0x24d31b
cmpl $0x3, %eax
jne 0x24d34d
movl $0x2, %ebp
movq 0x30(%rbx), %rdx
movq 0x120(%rbx), %rdi
movq 0x220(%rbx), %rsi
leaq 0x2f0(%rbx), %rcx
callq *0x60(%rdi)
movq 0x30(%rbx), %rax
movq %rax, 0x220(%rbx)
jmp 0x24d31b
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_ResumeParser
enum XML_Status XMLCALL
XML_ResumeParser(XML_Parser parser)
{
  enum XML_Status result = XML_STATUS_OK;

  if (ps_parsing != XML_SUSPENDED) {
    errorCode = XML_ERROR_NOT_SUSPENDED;
    return XML_STATUS_ERROR;
  }
  ps_parsing = XML_PARSING;

  errorCode = processor(parser, bufferPtr, parseEndPtr, &bufferPtr);

  if (errorCode != XML_ERROR_NONE) {
    eventEndPtr = eventPtr;
    processor = errorProcessor;
    return XML_STATUS_ERROR;
  }
  else {
    switch (ps_parsing) {
    case XML_SUSPENDED:
      result = XML_STATUS_SUSPENDED;
      break;
    case XML_INITIALIZED: 
    case XML_PARSING:
      if (ps_finalBuffer) {
        ps_parsing = XML_FINISHED;
        return result;
      }
    default: ;
    }
  }

  XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
  positionPtr = bufferPtr;
  return result;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x3, 0x378(%rdi)
jne 0x24d41b
movl $0x1, 0x378(%rbx)
leaq 0x30(%rbx), %rcx
movq 0x30(%rbx), %rsi
movq 0x50(%rbx), %rdx
movq %rbx, %rdi
callq *0x200(%rbx)
movl %eax, 0x208(%rbx)
testl %eax, %eax
je 0x24d430
movq 0x210(%rbx), %rax
movq %rax, 0x218(%rbx)
leaq -0x2a4(%rip), %rax      # 0x24d16e
movq %rax, 0x200(%rbx)
jmp 0x24d425
movl $0x22, 0x208(%rbx)
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl 0x378(%rbx), %eax
movl $0x1, %ebp
cmpl $0x2, %eax
jae 0x24d455
cmpb $0x0, 0x37c(%rbx)
je 0x24d45f
movl $0x2, 0x378(%rbx)
jmp 0x24d427
cmpl $0x3, %eax
jne 0x24d45f
movl $0x2, %ebp
movq 0x30(%rbx), %rdx
movq 0x120(%rbx), %rdi
movq 0x220(%rbx), %rsi
leaq 0x2f0(%rbx), %rcx
callq *0x60(%rdi)
movq 0x30(%rbx), %rax
movq %rax, 0x220(%rbx)
jmp 0x24d427
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_GetCurrentLineNumber
XML_Size XMLCALL
XML_GetCurrentLineNumber(XML_Parser parser)
{
  if (eventPtr && eventPtr >= positionPtr) {
    XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
    positionPtr = eventPtr;
  }
  return position.lineNumber + 1;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x210(%rdi), %rdx
testq %rdx, %rdx
je 0x24d539
movq 0x220(%rbx), %rsi
cmpq %rsi, %rdx
jb 0x24d539
movq 0x120(%rbx), %rdi
leaq 0x2f0(%rbx), %rcx
callq *0x60(%rdi)
movq 0x210(%rbx), %rax
movq %rax, 0x220(%rbx)
movq 0x2f0(%rbx), %rax
incq %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_GetCurrentColumnNumber
XML_Size XMLCALL
XML_GetCurrentColumnNumber(XML_Parser parser)
{
  if (eventPtr && eventPtr >= positionPtr) {
    XmlUpdatePosition(encoding, positionPtr, eventPtr, &position);
    positionPtr = eventPtr;
  }
  return position.columnNumber;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x210(%rdi), %rdx
testq %rdx, %rdx
je 0x24d580
movq 0x220(%rbx), %rsi
cmpq %rsi, %rdx
jb 0x24d580
movq 0x120(%rbx), %rdi
leaq 0x2f0(%rbx), %rcx
callq *0x60(%rdi)
movq 0x210(%rbx), %rax
movq %rax, 0x220(%rbx)
movq 0x2f8(%rbx), %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: XML_DefaultCurrent
void XMLCALL
XML_DefaultCurrent(XML_Parser parser)
{
  if (defaultHandler) {
    if (openInternalEntities)
      reportDefault(parser,
                    internalEncoding,
                    openInternalEntities->internalEventPtr,
                    openInternalEntities->internalEventEndPtr);
    else
      reportDefault(parser, encoding, eventPtr, eventEndPtr);
  }
}

// Assembly:
cmpq $0x0, 0xa0(%rdi)
je 0x24d5d6
movq 0x228(%rdi), %rax
testq %rax, %rax
je 0x24d5d7
movq 0x1b8(%rdi), %rsi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
jmp 0x24d5ee
retq
movq 0x120(%rdi), %rsi
movq 0x210(%rdi), %rdx
movq 0x218(%rdi), %rcx
jmp 0x24d5ee
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: reportDefault
static void
reportDefault(XML_Parser parser, const ENCODING *enc,
              const char *s, const char *end)
{
  if (MUST_CONVERT(enc, s)) {
    const char **eventPP;
    const char **eventEndPP;
    if (enc == encoding) {
      eventPP = &eventPtr;
      eventEndPP = &eventEndPtr;
    }
    else {
      eventPP = &(openInternalEntities->internalEventPtr);
      eventEndPP = &(openInternalEntities->internalEventEndPtr);
    }
    do {
      ICHAR *dataPtr = (ICHAR *)dataBuf;
      XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd);
      *eventEndPP = s;
      defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf));
      *eventPP = s;
    } while (s != end);
  }
  else
    defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdi, %r14
movq %rdx, 0x8(%rsp)
cmpb $0x0, 0x84(%rsi)
je 0x24d632
movq 0x8(%r14), %rdi
movq 0xa0(%r14), %rax
subl %edx, %ebx
movq %rdx, %rsi
movl %ebx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %rsi, %r15
cmpq %rsi, 0x120(%r14)
je 0x24d64b
movq 0x228(%r14), %rbp
leaq 0x8(%rbp), %r12
jmp 0x24d659
leaq 0x210(%r14), %rbp
leaq 0x218(%r14), %r12
leaq 0x10(%rsp), %r13
movq 0x58(%r14), %rax
movq %rax, 0x10(%rsp)
movq 0x60(%r14), %r8
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
movq %rbx, %rdx
movq %r13, %rcx
callq *0x70(%r15)
movq 0x8(%rsp), %rax
movq %rax, (%r12)
movq 0x8(%r14), %rdi
movq 0x58(%r14), %rsi
movl 0x10(%rsp), %edx
subl %esi, %edx
callq *0xa0(%r14)
movq 0x8(%rsp), %rax
movq %rax, (%rbp)
cmpq %rbx, %rax
jne 0x24d65e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: prologInitProcessor
static enum XML_Error PTRCALL
prologInitProcessor(XML_Parser parser,
                    const char *s,
                    const char *end,
                    const char **nextPtr)
{
  enum XML_Error result = initializeEncoding(parser);
  if (result != XML_ERROR_NONE)
    return result;
  processor = prologProcessor;
  return prologProcessor(parser, s, end, nextPtr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x24d73d
testl %eax, %eax
je 0x24d715
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x57(%rip), %rax        # 0x24d773
movq %rax, 0x200(%r12)
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x24d773
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: handleUnknownEncoding
static enum XML_Error
handleUnknownEncoding(XML_Parser parser, const XML_Char *encodingName)
{
  if (unknownEncodingHandler) {
    XML_Encoding info;
    int i;
    for (i = 0; i < 256; i++)
      info.map[i] = -1;
    info.convert = NULL;
    info.data = NULL;
    info.release = NULL;
    if (unknownEncodingHandler(unknownEncodingHandlerData, encodingName,
                               &info)) {
      ENCODING *enc;
      unknownEncodingMem = MALLOC(XmlSizeOfUnknownEncoding());
      if (!unknownEncodingMem) {
        if (info.release)
          info.release(info.data);
        return XML_ERROR_NO_MEMORY;
      }
      enc = (ns
             ? XmlInitUnknownEncodingNS
             : XmlInitUnknownEncoding)(unknownEncodingMem,
                                       info.map,
                                       info.convert,
                                       info.data);
      if (enc) {
        unknownEncodingData = info.data;
        unknownEncodingRelease = info.release;
        encoding = enc;
        return XML_ERROR_NONE;
      }
    }
    if (info.release != NULL)
      info.release(info.data);
  }
  return XML_ERROR_UNKNOWN_ENCODING;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x420, %rsp            # imm = 0x420
movq 0xf8(%rdi), %r13
movl $0x12, %ebx
testq %r13, %r13
je 0x24effc
movq %rsi, %r15
movq %rdi, %r14
leaq 0x8(%rsp), %r12
movl $0x400, %edx            # imm = 0x400
movq %r12, %rdi
movl $0xff, %esi
callq 0x173a0
xorps %xmm0, %xmm0
movups %xmm0, 0x400(%r12)
movq $0x0, 0x410(%r12)
movq 0x1e0(%r14), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *%r13
testl %eax, %eax
je 0x24efd6
movq 0x18(%r14), %r15
callq 0x253de7
movslq %eax, %rdi
callq *%r15
movq %rax, 0x1d0(%r14)
testq %rax, %rax
je 0x24efe0
leaq 0x8(%rsp), %rsi
movq 0x400(%rsi), %rcx
movq 0x408(%rsi), %rdx
movq %rax, %rdi
callq 0x253ded
testq %rax, %rax
je 0x24efd6
movq 0x408(%rsp), %rcx
movq %rcx, 0x1d8(%r14)
movq 0x418(%rsp), %rcx
movq %rcx, 0x1e8(%r14)
movq %rax, 0x120(%r14)
xorl %ebx, %ebx
jmp 0x24effc
movq 0x418(%rsp), %rax
jmp 0x24efed
movq 0x418(%rsp), %rax
movl $0x1, %ebx
testq %rax, %rax
je 0x24effc
movq 0x408(%rsp), %rdi
callq *%rax
movl %ebx, %eax
addq $0x420, %rsp            # imm = 0x420
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/expat-2.0.1/lib/xmlparse.c
// Function: poolStoreString
static XML_Char *
poolStoreString(STRING_POOL *pool, const ENCODING *enc,
                const char *ptr, const char *end)
{
  if (!poolAppend(pool, enc, ptr, end))
    return NULL;
  if (pool->ptr == pool->end && !poolGrow(pool))
    return NULL;
  *(pool->ptr)++ = 0;
  return pool->start;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x24f67d
testq %rax, %rax
je 0x24f32d
movq 0x18(%rbx), %rax
cmpq 0x10(%rbx), %rax
jne 0x24f31c
movq %rbx, %rdi
callq 0x24f7dc
testb %al, %al
je 0x24f32d
movq 0x18(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x18(%rbx)
movb $0x0, (%rax)
movq 0x20(%rbx), %rax
jmp 0x24f32f
xorl %eax, %eax
popq %rbx
retq