LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: bilde_f
void bilde_f(KNOTENTYP *f, KANTE *k1, KANTE *k2, KNOTENTYP anz) {
  KNOTENTYP i;
  for (i=1; i<=anz; i++) {f[i] = 0;}   /* Funktionstabelle loeschen */
  f[k1->ursprung] = k2->ursprung;
  f[k1->name]     = k2->name;           /* k1 wird auf k2 abgebildet */  
  bilde_f_rek(f,k1,k2);
}

// Assembly:
movl %ecx, %eax
pushq $0x1
popq %rcx
cmpq %rax, %rcx
ja 0x6d03
andw $0x0, (%rdi,%rcx,2)
incq %rcx
jmp 0x6cf4
movzwl (%rdx), %eax
movzwl (%rsi), %ecx
movw %ax, (%rdi,%rcx,2)
movzwl 0x2(%rdx), %eax
movzwl 0x2(%rsi), %ecx
movw %ax, (%rdi,%rcx,2)
jmp 0x6c91
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: bilde_f_sp_rek
void bilde_f_sp_rek(KNOTENTYP *f, KANTE *k1, KANTE *k2) {
  KNOTENTYP u;
  k1 = k1->invers->prev;
  k2 = k2->invers->next;   /* k1 und k2 spiegelverkehrt nach rechts und links */
  u = k1->name;            /* von u wird der Funktionswert f[u] berechnet */
  if (!(f[u])) {           /* Funktionswert noch nicht bekannt */
    f[u] = k2->name;
    bilde_f_sp_rek(f,k1,k2);  /* von u ausgehend weitere Funktionswerte ermitteln */
  }
  k1 = k1->prev;           /* k1 und k2 spiegelverkehrt nach links und rechts */
  k2 = k2->next;           /* denn: (k->invers->next)->next = k->invers->prev */
  u = k1->name;
  if (!(f[u])) {
    f[u] = k2->name;
    bilde_f_sp_rek(f,k1,k2);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rsi), %rax
movq 0x18(%rax), %r15
movq 0x28(%rdx), %rax
movq 0x20(%rax), %r14
movzwl 0x2(%r15), %eax
cmpw $0x0, (%rbx,%rax,2)
jne 0x6d59
movzwl 0x2(%r14), %ecx
movw %cx, (%rbx,%rax,2)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x6d1e
movq 0x18(%r15), %rsi
movzwl 0x2(%rsi), %eax
cmpw $0x0, (%rbx,%rax,2)
jne 0x6d76
movq 0x20(%r14), %rdx
movzwl 0x2(%rdx), %ecx
movw %cx, (%rbx,%rax,2)
jmp 0x6d26
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: bilde_f_sp
void bilde_f_sp(KNOTENTYP *f, KANTE *k1, KANTE *k2, KNOTENTYP anz) {
  KNOTENTYP i;
  for (i=1; i<=anz; i++) {f[i] = 0;}   /* Funktionstabelle loeschen */
  f[k1->ursprung] = k2->ursprung;
  f[k1->name]     = k2->name;           /* k1 wird auf k2 abgebildet */  
  bilde_f_sp_rek(f,k1,k2);
}

// Assembly:
movl %ecx, %eax
pushq $0x1
popq %rcx
cmpq %rax, %rcx
ja 0x6d90
andw $0x0, (%rdi,%rcx,2)
incq %rcx
jmp 0x6d81
movzwl (%rdx), %eax
movzwl (%rsi), %ecx
movw %ax, (%rdi,%rcx,2)
movzwl 0x2(%rdx), %eax
movzwl 0x2(%rsi), %ecx
movw %ax, (%rdi,%rcx,2)
jmp 0x6d1e
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: bilde_f_und_g_sp_rek
BOOL bilde_f_und_g_sp_rek(KNOTENTYP *f, KNOTENTYP *g, KANTE *k1, KANTE *k2) {
  KNOTENTYP u,v;
  k1 = k1->invers->prev;
  k2 = k2->invers->next;   /* k1 und k2 spiegelverkehrt nach rechts und links */
  u = k1->name;            /* von u wird der Funktionswert f[u] berechnet */
  v = k2->name;
  if (!(f[u])) {          /* Funktionswert noch nicht bekannt */
    f[u] = v;
    if (g[v]) {return(0);}    /* Widerspruch gefunden */
    g[v] = u;
    if (!bilde_f_und_g_sp_rek(f,g,k1,k2))  {return(0);}  /* weitere Funktionswerte: Widerspruch? */
  }
  else { 
    if (!(g[v])) {return(0);}     /* Widerspruch gefunden. Diese Abfrage koennte aber auch
                                      entfallen, denn wenn ein Wert von g noch nicht festgelegt
        ist, obwohl der zugehoerige Wert von f bereits feststeht, so wird an anderer Stelle ein
        Wert von g zuviel festgelegt sein, obwohl der zugehoerige Wert von f noch nicht feststeht */
  }
  k1 = k1->prev;           /* k1 und k2 spiegelverkehrt nach links und rechts */
  k2 = k2->next;           /* denn: (k->invers->next)->next = k->invers->prev */
  u = k1->name;
  v = k2->name;
  if (!(f[u])) {
    f[u] = v;
    if (g[v]) {return(0);}
    g[v] = u;
    if (!bilde_f_und_g_sp_rek(f,g,k1,k2))  {return(0);}
  }
  else {
    if (!(g[v])) {return(0);}
  }
  return(1);       /* keinen Widerspruch festgestellt */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rdx), %rax
movq 0x18(%rax), %r15
movq 0x28(%rcx), %rax
movq 0x20(%rax), %r12
movzwl 0x2(%r15), %ecx
movzwl 0x2(%r12), %edx
movzwl %dx, %eax
cmpw $0x0, (%rdi,%rcx,2)
je 0x6e0c
cmpw $0x0, (%rbx,%rax,2)
je 0x6e3f
movq 0x18(%r15), %rdx
movq 0x20(%r12), %rcx
movzwl 0x2(%rdx), %esi
movzwl 0x2(%rcx), %edi
movzwl %di, %eax
cmpw $0x0, (%r14,%rsi,2)
je 0x6e33
cmpw $0x0, (%rbx,%rax,2)
je 0x6e3f
movb $0x1, %al
jmp 0x6e41
movw %dx, (%r14,%rcx,2)
cmpw $0x0, (%rbx,%rax,2)
jne 0x6e3f
movw %cx, (%rbx,%rax,2)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x6dab
testb %al, %al
jne 0x6de5
jmp 0x6e3f
movw %di, (%r14,%rsi,2)
cmpw $0x0, (%rbx,%rax,2)
je 0x6e4d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movw %si, (%rbx,%rax,2)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6dab
testb %al, %al
jne 0x6e08
jmp 0x6e3f
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: bilde_f_und_g_sp
BOOL bilde_f_und_g_sp(KNOTENTYP *f, KNOTENTYP *g, KANTE *k1, KANTE *k2, KNOTENTYP anz) {
  KNOTENTYP i;
  for (i=1; i<=anz; i++) {f[i]=0; g[i]=0;}   /* Funktionstabellen loeschen */
  f[k1->ursprung] = k2->ursprung;
  f[k1->name]     = k2->name;           /* f: k1 wird auf k2 abgebildet */  
  g[k2->ursprung] = k1->ursprung;
  g[k2->name]     = k1->name;           /* g: k2 wird auf k1 abgebildet */
  return(bilde_f_und_g_sp_rek(f,g,k1,k2));
}

// Assembly:
movl %r8d, %eax
pushq $0x1
popq %r8
cmpq %rax, %r8
ja 0x6e7f
andw $0x0, (%rdi,%r8,2)
andw $0x0, (%rsi,%r8,2)
incq %r8
jmp 0x6e69
movzwl (%rcx), %eax
movzwl (%rdx), %r8d
movw %ax, (%rdi,%r8,2)
movzwl 0x2(%rcx), %eax
movzwl 0x2(%rdx), %r8d
movw %ax, (%rdi,%r8,2)
movzwl (%rdx), %eax
movzwl (%rcx), %r8d
movw %ax, (%rsi,%r8,2)
movzwl 0x2(%rdx), %eax
movzwl 0x2(%rcx), %r8d
movw %ax, (%rsi,%r8,2)
jmp 0x6dab
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: bilde_f_und_g_rek
BOOL bilde_f_und_g_rek(KNOTENTYP *f, KNOTENTYP *g, KANTE *k1, KANTE *k2) {
  KNOTENTYP u,v;
  k1 = k1->invers->prev;
  k2 = k2->invers->prev;   /* k1 und k2 im Gleichschritt nach rechts und links */
  u = k1->name;            /* von u wird der Funktionswert f[u] berechnet */
  v = k2->name;
  if (!(f[u])) {          /* Funktionswert noch nicht bekannt */
    f[u] = v;
    if (g[v]) {return(0);}    /* Widerspruch gefunden */
    g[v] = u;
    if (!bilde_f_und_g_rek(f,g,k1,k2))  {return(0);}  /* weitere Funktionswerte: Widerspruch? */
  }
  else { 
    if (!(g[v])) {return(0);}     /* Widerspruch gefunden. Diese Abfrage koennte aber auch
                                      entfallen, denn wenn ein Wert von g noch nicht festgelegt
        ist, obwohl der zugehoerige Wert von f bereits feststeht, so wird an anderer Stelle ein
        Wert von g zuviel festgelegt sein, obwohl der zugehoerige Wert von f noch nicht feststeht */
  }
  k1 = k1->prev;           /* k1 und k2 spiegelverkehrt nach links und rechts */
  k2 = k2->prev;           /* denn: (k->invers->prev)->prev = k->invers->next */
  u = k1->name;
  v = k2->name;
  if (!(f[u])) {
    f[u] = v;
    if (g[v]) {return(0);}
    g[v] = u;
    if (!bilde_f_und_g_rek(f,g,k1,k2))  {return(0);}
  }
  else {
    if (!(g[v])) {return(0);}
  }
  return(1);       /* keinen Widerspruch festgestellt */
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rdx), %rax
movq 0x18(%rax), %r15
movq 0x28(%rcx), %rax
movq 0x18(%rax), %r12
movzwl 0x2(%r15), %ecx
movzwl 0x2(%r12), %edx
movzwl %dx, %eax
cmpw $0x0, (%rdi,%rcx,2)
je 0x6f19
cmpw $0x0, (%rbx,%rax,2)
je 0x6f4c
movq 0x18(%r15), %rdx
movq 0x18(%r12), %rcx
movzwl 0x2(%rdx), %esi
movzwl 0x2(%rcx), %edi
movzwl %di, %eax
cmpw $0x0, (%r14,%rsi,2)
je 0x6f40
cmpw $0x0, (%rbx,%rax,2)
je 0x6f4c
movb $0x1, %al
jmp 0x6f4e
movw %dx, (%r14,%rcx,2)
cmpw $0x0, (%rbx,%rax,2)
jne 0x6f4c
movw %cx, (%rbx,%rax,2)
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0x6eb8
testb %al, %al
jne 0x6ef2
jmp 0x6f4c
movw %di, (%r14,%rsi,2)
cmpw $0x0, (%rbx,%rax,2)
je 0x6f5a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movw %si, (%rbx,%rax,2)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6eb8
testb %al, %al
jne 0x6f15
jmp 0x6f4c
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: bilde_f_und_g
BOOL bilde_f_und_g(KNOTENTYP *f, KNOTENTYP *g, KANTE *k1, KANTE *k2, KNOTENTYP anz) {
  KNOTENTYP i;
  for (i=1; i<=anz; i++) {f[i]=0; g[i]=0;}   /* Funktionstabellen loeschen */
  f[k1->ursprung] = k2->ursprung;
  f[k1->name]     = k2->name;           /* f: k1 wird auf k2 abgebildet */  
  g[k2->ursprung] = k1->ursprung;
  g[k2->name]     = k1->name;           /* g: k2 wird auf k1 abgebildet */
  return(bilde_f_und_g_rek(f,g,k1,k2));
}

// Assembly:
movl %r8d, %eax
pushq $0x1
popq %r8
cmpq %rax, %r8
ja 0x6f8c
andw $0x0, (%rdi,%r8,2)
andw $0x0, (%rsi,%r8,2)
incq %r8
jmp 0x6f76
movzwl (%rcx), %eax
movzwl (%rdx), %r8d
movw %ax, (%rdi,%r8,2)
movzwl 0x2(%rcx), %eax
movzwl 0x2(%rdx), %r8d
movw %ax, (%rdi,%r8,2)
movzwl (%rdx), %eax
movzwl (%rcx), %r8d
movw %ax, (%rsi,%r8,2)
movzwl 0x2(%rdx), %eax
movzwl 0x2(%rcx), %r8d
movw %ax, (%rsi,%r8,2)
jmp 0x6eb8
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: checksize_2
int checksize_2( KANTE* edge)
{
KANTE *run; 
int zaehler=1;

for (run=edge->invers->next; run != edge; run=run->invers->next) 
  { if (run->name==aussen) return(6); 
    zaehler++;  }
return(zaehler);
}

// Assembly:
pushq $0x1
popq %rax
pushq $0x6
popq %rcx
movq %rdi, %rdx
movq 0x28(%rdx), %rdx
movq 0x20(%rdx), %rdx
cmpq %rdi, %rdx
je 0xa2ff
cmpw $0x246, 0x2(%rdx)       # imm = 0x246
je 0xa2fd
incl %eax
jmp 0xa2e4
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: teste_und_schreibe
void teste_und_schreibe(PLANMAP map, KNOTENTYP *code)
{ int erg;

(non_iso_graphenzahl[map[0][0].name])++;
if ((erg=minitest(map,code))) { 
  (graphenzahl[map[0][0].name])++;
  if (symm_len==0 || vergleiche_symm(erg)) codiereplanar(map);
  (symm_anz[erg])++;                  /* fuer die Symmetriestatistik */  
}

}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzwl 0x2(%rdi), %eax
leaq 0x147d7(%rip), %rcx     # 0x1eb10
incq (%rcx,%rax,8)
callq 0x6fc5
testl %eax, %eax
je 0xa381
movl %eax, %ebp
movzwl 0x2(%rbx), %eax
leaq 0x1136d(%rip), %rcx     # 0x1b6c0
incq (%rcx,%rax,8)
cmpl $0x0, 0x8ed2(%rip)      # 0x13230
je 0xa36d
movsbl %bpl, %edi
callq 0xa300
testb %al, %al
je 0xa375
movq %rbx, %rdi
callq 0x24d0
movl %ebp, %eax
leaq 0x8e12(%rip), %rcx      # 0x13190
incl (%rcx,%rax,4)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: suche_item
ITEMLISTE *suche_item(KNOTENTYP *adresse)
{
int i, laenge;
SEQUENZLISTE *sq;

laenge=8-adresse[0];

sq=mapliste.sechser[adresse[1]];

for (i=2; i<laenge; i++)
  { if (sq->number_next <= adresse[i]) return(nil);
    if (sq->next_level[adresse[i]]==nil) return(nil);
    sq=sq->next_level[adresse[i]]; }
return(sq->items);
}

// Assembly:
movzwl (%rdi), %eax
pushq $0x8
popq %rcx
subq %rax, %rcx
movzwl 0x2(%rdi), %eax
leaq 0x13794(%rip), %rdx     # 0x1db30
movq 0x8(%rdx,%rax,8), %rdx
pushq $0x2
popq %rsi
xorl %eax, %eax
cmpq %rcx, %rsi
jge 0xa3c6
movzwl (%rdi,%rsi,2), %r8d
cmpl %r8d, 0x8(%rdx)
jle 0xa3c5
movq (%rdx), %rdx
movq (%rdx,%r8,8), %rdx
incq %rsi
testq %rdx, %rdx
jne 0xa3a6
retq
movq 0x10(%rdx), %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: insert_patch
void insert_patch(PLANMAP map, KANTE *anfang, ITEMLISTE *item, int flaechenzahl, int fuenfecke)
{

FLAECHENTYP *code;
KANTE *run;
int zaehler, codestelle;

code=item->code;
    for (codestelle=0, zaehler=1, run=anfang; run != nil; zaehler++ )
      { 
	if ((codestelle<fuenfecke) && (code[codestelle]==zaehler))
          { add_polygon_invers(5, map, run, &run); codestelle++; }
        else add_polygon_invers(6, map, run, &run);
      }
        if (zaehler != flaechenzahl) 
	  { fprintf(stderr,"Insert_patch: Could not insert enough faces: ");
	    fprintf(stderr,"%d instead of %d\n (insert_patch)\n",zaehler,flaechenzahl);
	    exit(92); }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, %r14d
movl %ecx, 0xc(%rsp)
movq %rdx, %r15
movq %rsi, %rdx
movq %rdi, %r12
leaq 0x10(%rsp), %r13
movq %rsi, (%r13)
xorl %ebx, %ebx
pushq $0x1
popq %rbp
testq %rdx, %rdx
je 0xb3a6
cmpl %r14d, %ebx
jge 0xb38f
movslq %ebx, %rax
movzbl 0x8(%r15,%rax), %eax
cmpl %eax, %ebp
jne 0xb38f
pushq $0x5
popq %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0xa3ef
incl %ebx
jmp 0xb39d
pushq $0x6
popq %rdi
movq %r12, %rsi
movq %r13, %rcx
callq 0xa3ef
incl %ebp
movq 0x10(%rsp), %rdx
jmp 0xb366
movl 0xc(%rsp), %r14d
cmpl %ebp, %r14d
jne 0xb3bf
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7c32(%rip), %rbx      # 0x12ff8
movq (%rbx), %rcx
leaq 0x36d9(%rip), %rdi      # 0xeaa9
pushq $0x2d
popq %rsi
pushq $0x1
popq %rdx
callq 0x1150
movq (%rbx), %rdi
leaq 0x36f2(%rip), %rsi      # 0xead7
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x10a0
pushq $0x5c
popq %rdi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: delete_patch
void delete_patch(PLANMAP map, KANTE *anfang, KNOTENTYP *adresse)
{
int sqlaenge, randlaenge, i, j, knotenverlust;
KANTE *run;

sqlaenge=6-adresse[0];
for (i=2, randlaenge=sqlaenge; i<= 1+sqlaenge; i++) randlaenge+=(2*adresse[i]);

knotenverlust=(3*adresse[0])+randlaenge;
knotenverlust= knotenverlust/2;  /* diese konstruktion nur Sicherheitshalber, damit kein
				    Compiler die Ordnung "erst 3a[0]+r" aufloest */
knotenverlust= knotenverlust+(2*adresse[1])+1-randlaenge;
/*alles nur Euler-Formel*/

map[0][0].name = map[0][0].name - knotenverlust;

for (i=1+sqlaenge; adresse[i]==0; i--);
for ( run=anfang ; i>1 ; i--)
  { if (adresse[i])
      { for (j=0; j < adresse[i]; j++)
	  { 
	    run->name=aussen; run->invers=nil; run = run->next->invers->next->invers->next; }
	run=run->invers->next;
      }
    else { run=run->invers->next; }
  }
}

// Assembly:
movq %rdx, %rcx
movzwl (%rdx), %r8d
pushq $0x6
popq %r9
subl %r8d, %r9d
pushq $0x7
popq %rax
subq %r8, %rax
pushq $0x2
popq %rdx
cmpq %rax, %rdx
jg 0xb423
movzwl (%rcx,%rdx,2), %r10d
leal (%r9,%r10,2), %r9d
incq %rdx
jmp 0xb410
leal (%r8,%r8,2), %eax
addl %r9d, %eax
pushq $0x2
popq %r10
cltd
idivl %r10d
movzwl 0x2(%rcx), %edx
leal (%rax,%rdx,2), %eax
notl %eax
addl %r9d, %eax
addw %ax, 0x2(%rdi)
pushq $0x8
popq %rax
subl %r8d, %eax
addl %r8d, %r8d
movq %rcx, %rdx
subq %r8, %rdx
addq $0xe, %rdx
decl %eax
cmpw $0x0, (%rdx)
leaq -0x2(%rdx), %rdx
je 0xb455
movl %eax, %eax
cmpl $0x2, %eax
jl 0xb4ae
movzwl (%rcx,%rax,2), %edi
testw %di, %di
je 0xb4a1
xorl %edx, %edx
movzwl %di, %edi
cmpl %edi, %edx
jae 0xb4a1
movw $0x246, 0x2(%rsi)       # imm = 0x246
andq $0x0, 0x28(%rsi)
movq 0x20(%rsi), %rsi
movq 0x28(%rsi), %rsi
movq 0x20(%rsi), %rsi
movq 0x28(%rsi), %rsi
movq 0x20(%rsi), %rsi
incl %edx
movzwl (%rcx,%rax,2), %edi
jmp 0xb473
movq 0x28(%rsi), %rdx
movq 0x20(%rdx), %rsi
decq %rax
jmp 0xb463
retq
// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/fullgen.c
// Function: berechne_adresse3
void berechne_adresse3(int l1, int l3, KNOTENTYP adresse[]) 
{
int sl1, sl3;

if (l1%2) { sl1=(l1-1)/2; 
	    if (l3%2) { sl3=(l3-1)/2; adresse[0]=4;
			if (sl3>sl1) { adresse[2]=sl3; adresse[3]=sl1; } 
			else { adresse[2]=sl1; adresse[3]=sl3; }
		      } else /* d.h. l3 gerade */
			{ sl3=(l3-2)/2;
			  adresse[0]=3;
			  if (sl3>sl1) { adresse[2]=sl3; adresse[3]=0; adresse[4]=sl1; }
			  else { adresse[2]=sl1;
				 adresse[3]=sl3; adresse[4]=0; }
			}
	  }

else { sl1=(l1-2)/2; 
       if (l3%2) { sl3=(l3-1)/2;
		   adresse[0]=3;
		   if (sl3>sl1) { adresse[2]=sl3; adresse[3]=0; adresse[4]=sl1; } 
		   else { adresse[2]=sl1; adresse[3]=sl3; adresse[4]=0; }
		 } else /*d.h. l3 gerade */ 
		   { sl3=(l3-2)/2;
		     adresse[0]=2; 
		     if (sl3>sl1) { adresse[2]=sl3; adresse[3]=0; adresse[4]=sl1; adresse[5]=0; } 
		     else { adresse[2]=sl1; adresse[3]=0; adresse[4]=sl3; adresse[5]=0; }
		   }
     }
 }

// Assembly:
testb $0x1, %dil
jne 0xba6d
addl $-0x2, %edi
sarl %edi
testb $0x1, %sil
jne 0xba7c
addl $-0x2, %esi
sarl %esi
movw $0x2, (%rdx)
cmpl %edi, %esi
jle 0xbabb
movw %si, 0x4(%rdx)
andw $0x0, 0x6(%rdx)
movw %di, 0x8(%rdx)
jmp 0xbac8
decl %edi
sarl %edi
testb $0x1, %sil
jne 0xba97
addl $-0x2, %esi
jmp 0xba7e
decl %esi
sarl %esi
movw $0x3, (%rdx)
cmpl %edi, %esi
jle 0xbaad
movw %si, 0x4(%rdx)
andw $0x0, 0x6(%rdx)
movw %di, 0x8(%rdx)
retq
decl %esi
sarl %esi
movw $0x4, (%rdx)
cmpl %edi, %esi
jle 0xbace
movw %si, 0x4(%rdx)
movw %di, 0x6(%rdx)
retq
movw %di, 0x4(%rdx)
movw %si, 0x6(%rdx)
andw $0x0, 0x8(%rdx)
retq
movw %di, 0x4(%rdx)
andw $0x0, 0x6(%rdx)
movw %si, 0x8(%rdx)
andw $0x0, 0xa(%rdx)
retq
movw %di, 0x4(%rdx)
movw %si, 0x6(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/cath-mawr[P]rscmapgen/mapdump.c
// Function: load_chunk
int
load_chunk(struct chunk *c, unsigned x, unsigned y, unsigned z)
{
	FILE *f;
	char name[128];

	snprintf(name, sizeof(name), "./Map/%u-%u-%u.dat", x, y, z);
	f = fopen(name, "rb");
	if (f == NULL) {
		if (errno == ENOENT) {
			memset(c->overlays[z], 2, sizeof(c->overlays[z]));
			return 0;
		}
		return 1;
	}
	puts(name);
	fread(c->colour[z], 1, CHUNKAREA, f);
	fread(c->elevation[z], 1, CHUNKAREA, f);
	fread(c->h_boundaries[z], 1, CHUNKAREA, f);
	fread(c->v_boundaries[z], 1, CHUNKAREA, f);
	fread(c->d_boundaries[z], 2, CHUNKAREA, f);
	fread(c->roofing[z], 1, CHUNKAREA, f);
	fread(c->overlays[z], 1, CHUNKAREA, f);
	fread(c->rotation[z], 1, CHUNKAREA, f);
	fclose(f);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %ecx, %ebp
movl %edx, %r8d
movl %esi, %ecx
movq %rdi, %r14
leaq 0x30e32(%rip), %rdx     # 0x32040
xorl %ebx, %ebx
movq %rsp, %r15
movl $0x80, %esi
movq %r15, %rdi
movl %ebp, %r9d
xorl %eax, %eax
callq 0x1090
leaq 0x30e27(%rip), %rsi     # 0x32053
movq %r15, %rdi
callq 0x10d0
testq %rax, %rax
je 0x1337
movq %rax, %r15
movq %rsp, %rdi
callq 0x1050
movl %ebp, %ebp
imulq $0x900, %rbp, %r13      # imm = 0x900
leaq (%r14,%r13), %rdi
addq $0x2400, %rdi           # imm = 0x2400
pushq $0x1
popq %r12
movl $0x900, %edx            # imm = 0x900
movq %r12, %rsi
movq %r15, %rcx
callq 0x1060
leaq (%r14,%r13), %rdi
movl $0x900, %edx            # imm = 0x900
movq %r12, %rsi
movq %r15, %rcx
callq 0x1060
leaq (%r14,%r13), %rdi
addq $0x6c00, %rdi           # imm = 0x6C00
movl $0x900, %edx            # imm = 0x900
movq %r12, %rsi
movq %r15, %rcx
callq 0x1060
leaq (%r14,%r13), %rdi
addq $0x4800, %rdi           # imm = 0x4800
movl $0x900, %edx            # imm = 0x900
movq %r12, %rsi
movq %r15, %rcx
callq 0x1060
imulq $0x1200, %rbp, %rax     # imm = 0x1200
leaq (%r14,%rax), %rdi
addq $0x9000, %rdi           # imm = 0x9000
pushq $0x2
popq %rsi
movl $0x900, %edx            # imm = 0x900
movq %r15, %rcx
callq 0x1060
leaq (%r14,%r13), %rdi
addq $0xd800, %rdi           # imm = 0xD800
movl $0x900, %edx            # imm = 0x900
movq %r12, %rsi
movq %r15, %rcx
callq 0x1060
leaq (%r14,%r13), %rdi
addq $0xfc00, %rdi           # imm = 0xFC00
movl $0x900, %edx            # imm = 0x900
movq %r12, %rsi
movq %r15, %rcx
callq 0x1060
leaq (%r14,%r13), %rdi
addq $0x12000, %rdi          # imm = 0x12000
movl $0x900, %edx            # imm = 0x900
movq %r12, %rsi
movq %r15, %rcx
callq 0x1060
movq %r15, %rdi
callq 0x1070
jmp 0x1367
callq 0x1040
cmpl $0x2, (%rax)
jne 0x1364
movl %ebp, %eax
imulq $0x900, %rax, %rax      # imm = 0x900
leaq (%r14,%rax), %rdi
addq $0xfc00, %rdi           # imm = 0xFC00
pushq $0x2
popq %rsi
movl $0x900, %edx            # imm = 0x900
callq 0x10a0
jmp 0x1367
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/cath-mawr[P]rscmapgen/mapdump.c
// Function: get_tile_colour
uint32_t
get_tile_colour(const struct chunk *c, unsigned x, unsigned y)
{
	const unsigned pos = x + y * CHUNKSIZE;

	switch (c->overlays[0][pos]) {
	case 0: return colour_tab[c->colour[0][pos]];
	case 1: return 0x40403f;
	case 2: return 0x1f3f7d;
	case 3: return 0x603001;
	case 4: return 0x603001;
	case 5: return 0x40403f;
	case 6: return 0x6b030f;
	case 7: return 0x0e2c38;
	case 8: return 0x000000;
	case 9: return 0x606260;
	case 10: return 0x000000;
	case 11: return 0x9f5000;
	case 12: return 0x613000;
	case 13: return 0x1f3f7d;
	case 14: return 0x40403f;
	case 15: return 0x241609;
	case 16: return 0x241609;
	case 17: return 0x797b7a;
	case 23: return 0x483000;
	case 21: return 0x000000;
	case 24: return 0x3f2200;
	default:
		printf("Missing overlay definition: %u\n", c->overlays[0][pos]);
		return 0x0;
	}
}

// Assembly:
pushq %rbx
imull $0x30, %edx, %eax
addl %esi, %eax
movzbl 0xfc00(%rdi,%rax), %esi
cmpq $0x18, %rsi
ja 0x13bf
leaq 0xc7a(%rip), %rcx       # 0x2010
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl $0x40403f, %ebx         # imm = 0x40403F
jmp 0x141b
xorl %ebx, %ebx
jmp 0x141b
movl $0x603001, %ebx         # imm = 0x603001
jmp 0x141b
movl $0x1f3f7d, %ebx         # imm = 0x1F3F7D
jmp 0x141b
movl $0x241609, %ebx         # imm = 0x241609
jmp 0x141b
leaq 0x30c90(%rip), %rdi     # 0x32056
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1080
jmp 0x141b
movl $0x797b7a, %ebx         # imm = 0x797B7A
jmp 0x141b
movl $0x483000, %ebx         # imm = 0x483000
jmp 0x141b
movl $0xe2c38, %ebx          # imm = 0xE2C38
jmp 0x141b
movzbl 0x2400(%rdi,%rax), %eax
leaq 0x32cab(%rip), %rcx     # 0x340a0
movl (%rcx,%rax,4), %ebx
jmp 0x141b
movl $0x6b030f, %ebx         # imm = 0x6B030F
jmp 0x141b
movl $0x9f5000, %ebx         # imm = 0x9F5000
jmp 0x141b
movl $0x613000, %ebx         # imm = 0x613000
jmp 0x141b
movl $0x606260, %ebx         # imm = 0x606260
jmp 0x141b
movl $0x3f2200, %ebx         # imm = 0x3F2200
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/cath-mawr[P]rscmapgen/mapdump.c
// Function: write_tga
int write_tga(const char *outname, const uint32_t *pixels)
{
	unsigned i;
	FILE *f;

	if ((f = fopen(outname, "w")) == NULL) {
		return 1;
	}
	fputc(0, f); /* id len */
	fputc(0, f); /* maptype */
	fputc(2, f); /* uncompressed trucolour */
	fputc(0, f); /* map entry index */
	fputc(0, f); /* map entry index */
	fputc(0, f); /* map len */
	fputc(0, f); /* map len */
	fputc(0, f); /* map bpp */
	fputc(0, f); /* x-origin */
	fputc(0, f); /* x-origin */
	fputc(0, f); /* y-origin */
	fputc(0, f); /* y-origin */
	fputc((uint8_t)(XSIZE >> 0), f); /* width */
	fputc((uint8_t)(XSIZE >> 8), f); /* width */
	fputc((uint8_t)(YSIZE >> 0), f); /* height */
	fputc((uint8_t)(YSIZE >> 8), f); /* height */
	fputc(24, f); /* bpp */
	fputc(0x20, f); /* desc */
	for (i = 0; i < IMGSIZE; ++i) {
		fputc((uint8_t)(pixels[i] >> 0), f);
		fputc((uint8_t)(pixels[i] >> 8), f);
		fputc((uint8_t)(pixels[i] >> 16), f);
	}
	fclose(f);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
leaq 0x3092d(%rip), %rsi     # 0x32076
callq 0x10d0
testq %rax, %rax
je 0x1860
movq %rax, %r14
xorl %r15d, %r15d
xorl %edi, %edi
movq %rax, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
pushq $0x2
popq %rdi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
xorl %edi, %edi
movq %r14, %rsi
callq 0x10b0
movl $0x90, %edi
movq %r14, %rsi
callq 0x10b0
pushq $0x9
popq %rbp
movl %ebp, %edi
movq %r14, %rsi
callq 0x10b0
movl $0x90, %edi
movq %r14, %rsi
callq 0x10b0
movl %ebp, %edi
movq %r14, %rsi
callq 0x10b0
pushq $0x18
popq %rdi
movq %r14, %rsi
callq 0x10b0
pushq $0x20
popq %rdi
movq %r14, %rsi
callq 0x10b0
cmpq $0x5b7100, %r15         # imm = 0x5B7100
je 0x1854
movzbl (%rbx,%r15,4), %edi
movq %r14, %rsi
callq 0x10b0
movzbl 0x1(%rbx,%r15,4), %edi
movq %r14, %rsi
callq 0x10b0
movzbl 0x2(%rbx,%r15,4), %edi
movq %r14, %rsi
callq 0x10b0
incq %r15
jmp 0x181d
movq %r14, %rdi
callq 0x1070
xorl %eax, %eax
jmp 0x1863
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/plvhx[P]dummy-vm/src/ast.c
// Function: vm_ast_create
vm_ast_t *vm_ast_create(unsigned short kind_type, const void *ast_value) {
  vm_ast_t *ret = vm_ast_alloc(vm_ast_calculate_child(4));

  ret->kind_type = kind_type;
  ret->num_childs = 0;
  ret->num_childs_alloc_size = 4;

  switch (ret->kind_type) {
  case VM_AST_REGISTER:
    ret->regs.name = (unsigned char *)ast_value;
    break;
  case VM_AST_MNEMONIC:
    ret->mnemonic.name = (unsigned char *)ast_value;
    break;
  case VM_AST_INTEGER_VALUE:
    ret->number.val = (unsigned char *)ast_value;
    break;
  }

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
pushq $0x1
popq %rdi
pushq $0x50
popq %rsi
callq 0x10d0
testq %rax, %rax
je 0x12f7
movw %r14w, (%rax)
movq $0x4, 0x28(%rax)
decl %r14d
cmpw $0x2, %r14w
ja 0x12f2
movzwl %r14w, %ecx
leaq 0x2dc6(%rip), %rdx      # 0x40b0
movq (%rdx,%rcx,8), %rcx
movq %rbx, (%rax,%rcx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2d06(%rip), %rdi      # 0x4004
leaq 0x2d0b(%rip), %rsi      # 0x4010
leaq 0x2d0e(%rip), %rcx      # 0x401a
pushq $0xc
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/plvhx[P]dummy-vm/src/ast.c
// Function: vm_ast_create_multi_ex
vm_ast_t *vm_ast_create_multi_ex(unsigned short kind_type,
                                 const void *ast_value, ...) {
  va_list ap;
  vm_ast_t *ret;

  va_start(ap, ast_value);
  ret = vm_ast_create_from_va_list(kind_type, ast_value, ap);
  va_end(ap);

  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq -0xd0(%rbp), %r10
movq %rdx, 0x10(%r10)
movq %rcx, 0x18(%r10)
movq %r8, 0x20(%r10)
movq %r9, 0x28(%r10)
testb %al, %al
je 0x1360
movaps %xmm0, -0xa0(%rbp)
movaps %xmm1, -0x90(%rbp)
movaps %xmm2, -0x80(%rbp)
movaps %xmm3, -0x70(%rbp)
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x50(%rbp)
movaps %xmm6, -0x40(%rbp)
movaps %xmm7, -0x30(%rbp)
movq %r10, -0x10(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, -0x20(%rbp)
callq 0x12ac
movl -0x20(%rbp), %edx
cmpq $0x28, %rdx
ja 0x1397
movq %rdx, %rcx
addq -0x10(%rbp), %rcx
addl $0x8, %edx
movl %edx, -0x20(%rbp)
jmp 0x13a3
movq -0x18(%rbp), %rcx
leaq 0x8(%rcx), %rdx
movq %rdx, -0x18(%rbp)
movq (%rcx), %rsi
testq %rsi, %rsi
je 0x13b5
movq %rax, %rdi
callq 0x13be
jmp 0x137f
addq $0xd0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/plvhx[P]dummy-vm/src/ast.c
// Function: vm_ast_add_child
vm_ast_t *vm_ast_add_child(vm_ast_t *ast, vm_ast_t *child) {
  if (ast->num_childs >= ast->num_childs_alloc_size) {
    ast =
        vm_ast_realloc(ast, vm_ast_calculate_child(ast->num_childs_alloc_size),
                       vm_ast_calculate_child(ast->num_childs_alloc_size + 4));

    ast->num_childs_alloc_size += 4;
  }

  ast->childs[ast->num_childs++] = child;
  return ast;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
cmpq %rcx, %rax
jb 0x1410
leaq 0x30(,%rcx,8), %r14
leaq 0x50(,%rcx,8), %rsi
cmpq %r14, %rsi
jbe 0x1425
callq 0x1130
testq %rax, %rax
je 0x143e
movq %rax, %rdi
imulq $0x38, %r14, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rdi,%rax)
movups %xmm0, (%rdi,%rax)
addq $0x4, 0x28(%rdi)
movq 0x20(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x20(%rdi)
movq %rbx, 0x30(%rdi,%rax,8)
movq %rdi, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2c0d(%rip), %rdi      # 0x4039
leaq 0x2bdd(%rip), %rsi      # 0x4010
leaq 0x2c13(%rip), %rcx      # 0x404d
pushq $0x13
jmp 0x1455
leaq 0x2bbf(%rip), %rdi      # 0x4004
leaq 0x2bc4(%rip), %rsi      # 0x4010
leaq 0x2bfa(%rip), %rcx      # 0x404d
pushq $0x15
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/plvhx[P]dummy-vm/src/ast.c
// Function: vm_ast_dtor
void vm_ast_dtor(vm_ast_t *ast) {
  if (ast == NULL) {
    return;
  }

  for (int i = 0; i < ast->num_childs; i++) {
    vm_ast_dtor(ast->childs[i]);
  }

  free(ast);
}

// Assembly:
testq %rdi, %rdi
je 0x2913
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
cmpq %r14, 0x20(%rbx)
jbe 0x2907
movq 0x30(%rbx,%r14,8), %rdi
callq 0x28e0
incq %r14
jmp 0x28f2
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030
retq
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: ControlXonXoffSerialPort
void ControlXonXoffSerialPort(ISP_ENVIRONMENT *IspEnvironment, unsigned char XonXoff)
{
    if(tcgetattr(IspEnvironment->fdCom, &IspEnvironment->newtio))
    {
       DebugPrintf(1, "Could not get serial port behaviour\n");
       exit(3);
    }

    if(XonXoff)
    {
      IspEnvironment->newtio.c_iflag |= IXON;
      IspEnvironment->newtio.c_iflag |= IXOFF;
    }
    else
    {
      IspEnvironment->newtio.c_iflag &= ~IXON;
      IspEnvironment->newtio.c_iflag &= ~IXOFF;
    }

    if(tcsetattr(IspEnvironment->fdCom, TCSANOW, &IspEnvironment->newtio))
    {
       DebugPrintf(1, "Could not set serial port behaviour\n");
       exit(3);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl 0x80(%rdi), %edi
leaq 0xc0(%r14), %rbx
movq %rbx, %rsi
callq 0x41d0
testl %eax, %eax
jne 0x43d7
movl $0xffffebff, %eax       # imm = 0xFFFFEBFF
andl 0xc0(%r14), %eax
xorl %ecx, %ecx
testb %bpl, %bpl
movl $0x1400, %edx           # imm = 0x1400
cmovel %ecx, %edx
orl %eax, %edx
movl %edx, 0xc0(%r14)
movl 0x80(%r14), %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x41e0
testl %eax, %eax
jne 0x43e0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x4c3e(%rip), %rsi      # 0x901c
jmp 0x43e7
leaq 0x4c5a(%rip), %rsi      # 0x9041
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x43f9
pushq $0x3
popq %rdi
callq 0x4240
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: DebugPrintf
void DebugPrintf(int level, const char *fmt, ...)
{
    va_list ap;

    if (level <= debug_level)
    {
        char pTemp[2000];
        va_start(ap, fmt);
        //vprintf(fmt, ap);
        vsprintf(pTemp, fmt, ap);
        TRACE(pTemp);
        va_end(ap);
        fflush(stdout);
    }
}

// Assembly:
pushq %rbx
subq $0x8a0, %rsp            # imm = 0x8A0
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x4450
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
cmpl %edi, 0x9cfa(%rip)      # 0xe150
jl 0x44ad
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0x8b0(%rsp), %rax
movq %rax, 0x8(%rdx)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rdx)
leaq 0xd0(%rsp), %rbx
movq %rbx, %rdi
callq 0x41c0
leaq 0x6975(%rip), %rdi      # 0xae09
movq %rbx, %rsi
xorl %eax, %eax
callq 0x40c0
movq 0x9b33(%rip), %rax      # 0xdfd8
movq (%rax), %rdi
callq 0x4180
addq $0x8a0, %rsp            # imm = 0x8A0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: DumpString
void DumpString(int level, const void *b, size_t size, const char *prefix_string)
{
    size_t i;
    const char * s = (const char*) b;
    unsigned char c;

    DebugPrintf(level, prefix_string);

    DebugPrintf(level, "'");
    for (i = 0; i < size; i++)
    {
        c = s[i];
        if (c >= 0x20 && c <= 0x7e) /*isprint?*/
        {
            DebugPrintf(level, "%c", c);
        }
        else
        {
            DebugPrintf(level, "(%02X)", c);
        }
    }
    DebugPrintf(level, "'\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebx
movq %rcx, %rsi
xorl %eax, %eax
callq 0x43f9
leaq 0x4b76(%rip), %rsi      # 0x909b
movl %ebx, %edi
xorl %eax, %eax
callq 0x43f9
leaq 0x4b68(%rip), %r12      # 0x909d
leaq 0x4b64(%rip), %r13      # 0x90a0
xorl %ebp, %ebp
cmpq %rbp, %r14
je 0x4563
movzbl (%r15,%rbp), %edx
leal -0x20(%rdx), %eax
movq %r12, %rsi
cmpb $0x5f, %al
jb 0x4555
movq %r13, %rsi
movl %ebx, %edi
xorl %eax, %eax
callq 0x43f9
incq %rbp
jmp 0x453e
leaq 0x6105(%rip), %rsi      # 0xa66f
movl %ebx, %edi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x43f9
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: PrepareKeyboardTtySettings
void PrepareKeyboardTtySettings(void)
{
#if defined COMPILE_FOR_LINUX || defined COMPILE_FOR_CYGWIN
    /* store the current tty settings */
    if (!tcgetattr(0, &keyboard_origtty))
    {
        struct termios tty;
        /* start with the current settings */
        tty = keyboard_origtty;
        /* make modifications to put it in raw mode, turn off echo */
        tty.c_lflag &= ~ICANON;
        tty.c_lflag &= ~ECHO;
        tty.c_lflag &= ~ISIG;
        tty.c_cc[VMIN] = 1;
        tty.c_cc[VTIME] = 0;

        /* put the settings into effect */
        tcsetattr(0, TCSADRAIN, &tty);
    }
#endif
}

// Assembly:
subq $0x48, %rsp
leaq 0xcad2(%rip), %rsi      # 0x11100
xorl %edi, %edi
callq 0x41d0
testl %eax, %eax
jne 0x467b
movups 0xcac0(%rip), %xmm0     # 0x11100
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movups 0xcac3(%rip), %xmm0     # 0x11110
movaps %xmm0, 0x10(%rdx)
movups 0xcad4(%rip), %xmm0     # 0x1112c
movups %xmm0, 0x2c(%rdx)
movups 0xcabd(%rip), %xmm0     # 0x11120
movaps %xmm0, 0x20(%rdx)
andb $-0xc, 0xc(%rdx)
movw $0x100, 0x16(%rdx)      # imm = 0x100
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x41e0
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: ClearSerialPortBuffers
void ClearSerialPortBuffers(ISP_ENVIRONMENT *IspEnvironment)
{
#if defined COMPILE_FOR_LINUX
    /* variables to store the current tty state, create a new one */
    struct termios origtty, tty;

    /* store the current tty settings */
    tcgetattr(IspEnvironment->fdCom, &origtty);

    // Flush input and output buffers
    tty=origtty;
    tcsetattr(IspEnvironment->fdCom, TCSAFLUSH, &tty);

    /* reset the tty to its original settings */
    tcsetattr(IspEnvironment->fdCom, TCSADRAIN, &origtty);
#endif // defined COMPILE_FOR_LINUX
#if defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
    PurgeComm(IspEnvironment->hCom, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR);
#endif // defined COMPILE_FOR_WINDOWS || defined COMPILE_FOR_CYGWIN
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
movl 0x80(%rdi), %edi
leaq 0x3c(%rsp), %r14
movq %r14, %rsi
callq 0x41d0
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups 0x2c(%r14), %xmm3
movq %rsp, %rdx
movaps %xmm0, (%rdx)
movaps %xmm1, 0x10(%rdx)
movaps %xmm2, 0x20(%rdx)
movups %xmm3, 0x2c(%rdx)
movl 0x80(%rbx), %edi
pushq $0x2
popq %rsi
callq 0x41e0
movl 0x80(%rbx), %edi
pushq $0x1
popq %rsi
movq %r14, %rdx
callq 0x41e0
addq $0x78, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: ReceiveComPortBlockComplete
int ReceiveComPortBlockComplete(ISP_ENVIRONMENT *IspEnvironment,
                                                    void *block, size_t size, unsigned timeout)
{
    unsigned long realsize = 0, read;
    char *result;
    char tmp_string[32];

    result = (char*) block;

    SerialTimeoutSet(IspEnvironment, timeout);

    do
    {
        ReceiveComPortBlock(IspEnvironment, result + realsize, size - realsize, &read);

        realsize += read;

    } while ((realsize < size) && (SerialTimeoutCheck(IspEnvironment) == 0));

    sprintf(tmp_string, "Answer(Length=%ld): ", realsize);
    DumpString(3, result, realsize, tmp_string);

    if (realsize != size)
    {
        return 1;
    }
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %eax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
xorl %r14d, %r14d
pushq $0x64
popq %rcx
xorl %edx, %edx
divl %ecx
movl %eax, 0xfc(%rdi)
leaq 0x8(%rsp), %r13
leaq (%r15,%r14), %rsi
movq %rbx, %rdx
subq %r14, %rdx
movq %r12, %rdi
movq %r13, %rcx
callq 0x48b0
addq 0x8(%rsp), %r14
cmpq %rbx, %r14
jae 0x49f3
cmpl $0x0, 0xfc(%r12)
jne 0x49c9
leaq 0x4675(%rip), %rsi      # 0x906f
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x4230
pushq $0x3
popq %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x4501
xorl %eax, %eax
cmpq %rbx, %r14
setne %al
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: CloseSerialPort
static void CloseSerialPort(ISP_ENVIRONMENT *IspEnvironment)
{
    tcflush(IspEnvironment->fdCom, TCOFLUSH);
    tcflush(IspEnvironment->fdCom, TCIFLUSH);
    tcsetattr(IspEnvironment->fdCom, TCSANOW, &IspEnvironment->oldtio);

    close(IspEnvironment->fdCom);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x80(%rdi), %edi
pushq $0x1
popq %rsi
callq 0x40b0
movl 0x80(%rbx), %edi
xorl %esi, %esi
callq 0x40b0
movl 0x80(%rbx), %edi
leaq 0x84(%rbx), %rdx
xorl %esi, %esi
callq 0x41e0
movl 0x80(%rbx), %edi
popq %rbx
jmp 0x4100
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: LoadFiles1
static int LoadFiles1(ISP_ENVIRONMENT *IspEnvironment, const FILE_LIST *file)
{
    int ret_val;

    if( file->prev != 0)
    {
        DebugPrintf( 3, "Follow file list %s\n", file->name);

        ret_val = LoadFiles1( IspEnvironment, file->prev);
    if( ret_val != 0)
    {
      return ret_val;
    }
    }

    DebugPrintf( 3, "Attempt to read File %s\n", file->name);
    if(file->hex_flag != 0)
    {
        ret_val = LoadFile(IspEnvironment, file->name, FORMAT_HEX);
    }
    else
    {
    ret_val = LoadFile(IspEnvironment, file->name, FORMAT_BINARY);
    }
    if( ret_val != 0)
    {
    return ret_val;
    }

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x5519
movq (%r14), %rdx
leaq 0x3cae(%rip), %rsi      # 0x91a5
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x43f9
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0x54dc
testl %eax, %eax
je 0x5519
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq (%r14), %rdx
leaq 0x3c97(%rip), %rsi      # 0x91ba
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x43f9
xorl %edx, %edx
cmpb $0x0, 0x10(%r14)
setne %dl
movq (%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x5546
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpc21isp.c
// Function: Ascii2Hex
static unsigned char Ascii2Hex(unsigned char c)
{
    if (c >= '0' && c <= '9')
    {
        return (unsigned char)(c - '0');
    }

    if (c >= 'A' && c <= 'F')
    {
        return (unsigned char)(c - 'A' + 10);
    }

    if (c >= 'a' && c <= 'f')
    {
        return (unsigned char)(c - 'a' + 10);
    }

    DebugPrintf(1, "Wrong Hex-Nibble %c (%02X)\n", c, c);
    exit(1);

    return 0;  // this "return" will never be reached, but some compilers give a warning if it is not present
}

// Assembly:
leal -0x30(%rdi), %eax
cmpb $0xa, %al
jb 0x5b8b
leal -0x41(%rdi), %eax
cmpb $0x5, %al
ja 0x5b7e
addb $-0x37, %dil
jmp 0x5b89
leal -0x61(%rdi), %eax
cmpb $0x5, %al
ja 0x5b8c
addb $-0x57, %dil
movl %edi, %eax
retq
pushq %rbx
movzbl %dil, %ecx
leaq 0x3859(%rip), %rsi      # 0x93f1
pushq $0x1
popq %rbx
movl %ebx, %edi
movl %ecx, %edx
xorl %eax, %eax
callq 0x43f9
movl %ebx, %edi
callq 0x4240
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/adprog.c
// Function: AnalogDevicesDownload
int AnalogDevicesDownload(ISP_ENVIRONMENT *IspEnvironment)
{
    AnalogDevicesSync(IspEnvironment);
    AnalogDevicesErase(IspEnvironment);
    if (IspEnvironment->BinaryLength > 0x80000)
    {
        DebugPrintf(2, "Note:  Flash remapped 0x80000 to 0.\n");
        AnalogDevicesWrite(IspEnvironment, IspEnvironment->BinaryContent + 0x80000, 0, IspEnvironment->BinaryLength-0x80000);
    }
    else
    {
        AnalogDevicesWrite(IspEnvironment, IspEnvironment->BinaryContent, 0, IspEnvironment->BinaryLength);
    }
    return (0);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %rbx
callq 0x4691
leaq 0x4460(%rip), %rsi      # 0xa030
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x43f9
leaq 0x4(%rsp), %rax
movb $0x8, (%rax)
pushq $0x5
popq %r14
pushq $0x1
popq %r15
leaq 0x5(%rsp), %r12
pushq $0x18
popq %r13
pushq $0x3
popq %rbp
subl $0x1, %r14d
jb 0x5d04
movq %rbx, %rdi
leaq 0x4(%rsp), %rsi
movq %r15, %rdx
callq 0x44b6
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
movl $0x1f4, %ecx            # imm = 0x1F4
callq 0x499c
testl %eax, %eax
je 0x5c39
movl %ebp, %edi
leaq 0x4439(%rip), %rsi      # 0xa069
xorl %eax, %eax
callq 0x43f9
jmp 0x5c57
cmpl $0x43754441, 0x5(%rsp)  # imm = 0x43754441
je 0x5c61
movl %ebp, %edi
movq %r12, %rsi
movq %r13, %rdx
leaq 0x43f2(%rip), %rcx      # 0xa044
callq 0x4501
movq %rbx, %rdi
callq 0x4691
jmp 0x5bf6
leaq 0x4(%rsp), %r14
movb $0x0, (%r14)
leaq 0x4450(%rip), %rsi      # 0xa0c1
pushq $0x2
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x43f9
pushq $0x45
popq %rdi
pushq $0x1
popq %rsi
leaq 0x5(%rsp), %r15
xorl %edx, %edx
movq %r14, %rcx
movq %r15, %r8
callq 0x5ded
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5e84
leaq 0x4426(%rip), %rsi      # 0xa0cd
movl %ebp, %edi
xorl %eax, %eax
callq 0x43f9
movq 0x60(%rbx), %rdx
cmpq $0x80001, %rdx          # imm = 0x80001
jb 0x5ce4
leaq 0x4347(%rip), %rsi      # 0xa00b
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x43f9
movl $0x80000, %esi          # imm = 0x80000
addq 0x58(%rbx), %rsi
movq $-0x80000, %rdx         # imm = 0xFFF80000
addq 0x60(%rbx), %rdx
jmp 0x5ce8
movq 0x58(%rbx), %rsi
movq %rbx, %rdi
callq 0x5d1d
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4389(%rip), %rsi      # 0xa094
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x43f9
pushq $0x4
popq %rdi
callq 0x4240
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/adprog.c
// Function: AnalogDevicesWrite
static void AnalogDevicesWrite(ISP_ENVIRONMENT *IspEnvironment,
                                         const void *data, long address, size_t bytes)
{
    AD_PACKET packet;
    const BINARY *prog_data;

    DebugPrintf(2, "Writing %d bytes ", bytes);
    prog_data = (const BINARY*) data;
    while (bytes > AD_PACKET_SIZE)
    {
        AnalogDevicesFormPacket(IspEnvironment, 'W', AD_PACKET_SIZE, address, prog_data, &packet);
        AnalogDevicesSendPacket(IspEnvironment, &packet);
        address += AD_PACKET_SIZE;
        prog_data += AD_PACKET_SIZE;
        bytes -= AD_PACKET_SIZE;
        DebugPrintf(2, ".");
    }
    if (bytes > 0)
    {
        AnalogDevicesFormPacket(IspEnvironment, 'W', bytes, address, prog_data, &packet);
        AnalogDevicesSendPacket(IspEnvironment, &packet);
        DebugPrintf(2, ".");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4454(%rip), %rsi      # 0xa192
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x43f9
leaq 0x5(%rsp), %r12
leaq 0x4de2(%rip), %r13      # 0xab36
xorl %ebp, %ebp
cmpq $0xfb, %r15
jb 0x5da2
pushq $0x57
popq %rdi
movl $0xfa, %esi
movl %ebp, %edx
movq %r14, %rcx
movq %r12, %r8
callq 0x5ded
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5e84
addq $0xfa, %r14
addq $-0xfa, %r15
pushq $0x2
popq %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x43f9
addl $0xfa, %ebp
jmp 0x5d56
testq %r15, %r15
je 0x5ddb
pushq $0x57
popq %rdi
leaq 0x5(%rsp), %r12
movl %r15d, %esi
movl %ebp, %edx
movq %r14, %rcx
movq %r12, %r8
callq 0x5ded
movq %rbx, %rdi
movq %r12, %rsi
callq 0x5e84
leaq 0x4d65(%rip), %rsi      # 0xab36
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x43f9
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/adprog.c
// Function: AnalogDevicesSendPacket
static void AnalogDevicesSendPacket(ISP_ENVIRONMENT *IspEnvironment,
                                                const AD_PACKET * packet)
{
    BINARY response;
    int retry = 0;

    do {
        retry++;

        /*  Make sure we don't read garbage later instead of    */
        /* the response we expect from the micro.               */
        ClearSerialPortBuffers(IspEnvironment);

        /*  Send the packet, the size is the number of data     */
        /* bytes in the packet plus 3 bytes worth of header     */
        /* plus checksum.                                       */
        SendComPortBlock(IspEnvironment, packet, packet->bytes + 4);

        /*  Receive the response and check, return to caller    */
        /* if successful.                                       */
        if (ReceiveComPortBlockComplete(IspEnvironment, &response, 1, 5000) == 0)
        {
            if (response == ANALOG_DEVICES_ACK)
            {
                DebugPrintf(3, "Packet Sent\n");
                return;
            }
            if (response != ANALOG_DEVICES_NAK)
            {
                DebugPrintf(3, "Unexpected response to packet (%x)\n", (int)response);
            }
            DebugPrintf(2, "*");
        }
    } while (retry < 3);

    DebugPrintf(1, "Send packet failed\n");
    exit(-1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x3
popq %r13
leaq 0x7(%rsp), %r15
pushq $0x1
popq %r12
pushq $0x2
popq %rbp
movq %r14, %rdi
callq 0x4691
movzbl 0x2(%rbx), %edx
addq $0x4, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x44b6
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl $0x1388, %ecx           # imm = 0x1388
callq 0x499c
testl %eax, %eax
jne 0x5f07
movzbl 0x7(%rsp), %edx
cmpl $0x7, %edx
je 0x5ef7
cmpl $0x6, %edx
je 0x5f25
pushq $0x3
popq %rdi
leaq 0x4268(%rip), %rsi      # 0xa158
xorl %eax, %eax
callq 0x43f9
movl %ebp, %edi
leaq 0x427c(%rip), %rsi      # 0xa17c
xorl %eax, %eax
callq 0x43f9
decl %r13d
jne 0x5ea5
leaq 0x426b(%rip), %rsi      # 0xa17e
pushq $0x1
popq %rdi
xorl %eax, %eax
callq 0x43f9
pushq $-0x1
popq %rdi
callq 0x4240
leaq 0x421f(%rip), %rsi      # 0xa14b
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x43f9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/bokunimowakaru[P]petit15term/lpc21isp/lpcprog.c
// Function: FormatCommand
static void FormatCommand(const char *In, char *Out)
{
  size_t i, j;
  for (i = 0, j = 0; In[j] != '\0'; i++, j++)
  {
    if ((In[j] == '\r') || (In[j] == '\n'))
    {
      if (i > 0) // Ignore leading line breaks (they must be leftovers from a previous answer)
      {
        Out[i] = '\n';
      }
      else
      {
        i--;
      }
      while ((In[j+1] == '\r') || (In[j+1] == '\n'))
      {
        j++;
      }
    }
    else
    {
      Out[i] = In[j];
    }
  }
  Out[i] = '\0';
}

// Assembly:
xorl %edx, %edx
pushq $-0x1
popq %rax
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %r8d
cmpl $0xa, %r8d
je 0x7b04
cmpl $0xd, %r8d
je 0x7b04
testl %r8d, %r8d
je 0x7b2c
movb %r8b, (%rsi,%rdx)
incq %rcx
jmp 0x7b27
movq %rax, %r8
testq %rdx, %rdx
je 0x7b13
movb $0xa, (%rsi,%rdx)
movq %rdx, %r8
incq %rcx
movzbl (%rdi,%rcx), %edx
cmpl $0xd, %edx
je 0x7b13
cmpl $0xa, %edx
je 0x7b13
movq %r8, %rdx
incq %rdx
jmp 0x7ae5
movb $0x0, (%rsi,%rdx)
retq