decompiled_code:
__int64 __fastcall check_arglst_len_eq(__int64 a1, int a2, unsigned int a3)
{
unsigned int v3; // eax
__int64 result; // rax
void *v5; // rcx

args_push(a3);
v3 = list_len();
result = get_integer(v3);
if ( (_DWORD)result != a2 )
{
v5 = &unk_24F;
if ( a2 <= 1 )
v5 = &unk_250;
printf(
"Error: procedure \"%s\" expects %d argument%s, but given %d\n",
a1,
(unsigned int)a2,
v5,
(unsigned int)result);
result = error_handler();
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func0(__int64 a1, int a2, unsigned int a3)
{
unsigned int v3; // eax
__int64 result; // rax
void *v5; // rcx

args_push(a3);
v3 = list_len();
result = get_integer(v3);
if ( (_DWORD)result != a2 )
{
v5 = &unk_24F;
if ( a2 <= 1 )
v5 = &unk_250;
printf(
"Error: procedure \"%s\" expects %d argument%s, but given %d\n",
a1,
(unsigned int)a2,
v5,
(unsigned int)result);
result = error_handler();
}
return result;
}

original_code:
void check_arglst_len_eq(char *func, int req_len, cellpoint arglst)
{
    int len;
 args_push(arglst);
 len = get_integer(list_len());
    if (len != req_len){
        printf("Error: procedure \"%s\" expects %d argument%s, but given %d\n", func, req_len, (req_len > 1)?"":"s", len);
  error_handler();
    }
}

canonical_original_code:
void check_arglst_len_eq(char *func, int req_len, unsigned int arglst)
{
    int len;
 args_push(arglst);
 len = get_integer(list_len());
    if (len != req_len){
        printf("Error: procedure \"%s\" expects %d argument%s, but given %d\n", func, req_len, (req_len > 1)?"":"s", len);
  error_handler();
    }
}

variable_types:
func
char *


decompiled_code:
__int64 __fastcall check_arg_type(const void *a1, __int64 a2, unsigned int a3, int a4)
{
unsigned int v5; // eax
__int64 result; // rax
unsigned int v7; // eax
__int64 v8; // rdx
const void *v9; // rsi
size_t v10; // rdx
unsigned int v11; // eax
__int64 v12; // rdx
unsigned int v13; // eax
__int64 v14; // rdx
unsigned int v15; // eax
__int64 v16; // rdx
unsigned int v17; // eax
__int64 v18; // rdx
unsigned int v19; // eax
__int64 v20; // rdx
unsigned int v21; // eax
__int64 v22; // rdx
unsigned int v23; // eax
__int64 v24; // rdx
unsigned int v25; // eax
__int64 v26; // rdx

switch ( a4 )
{
case 0:
v11 = is_boolean(a3);
result = is_false(v11);
if ( (_DWORD)result )
{
v12 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a boolean, but given: ", a1, v12);
goto LABEL_22;
}
break;
case 1:
v13 = is_char(a3);
result = is_false(v13);
if ( (_DWORD)result )
{
v14 = a2;
v9 = a1;
printf("Errror: procedure \"%s\" expects the %s argument is a character, but given: ", a1, v14);
goto LABEL_22;
}
break;
case 2:
v15 = is_integer(a3);
result = is_false(v15);
if ( (_DWORD)result )
{
v16 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a integer, but given: ", a1, v16);
goto LABEL_22;
}
break;
case 3:
v17 = is_number(a3);
result = is_false(v17);
if ( (_DWORD)result )
{
v18 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a number, but given: ", a1, v18);
goto LABEL_22;
}
break;
case 4:
v19 = is_symbol(a3);
result = is_false(v19);
if ( (_DWORD)result )
{
v20 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a symbol, but given: ", a1, v20);
goto LABEL_22;
}
break;
case 5:
v21 = is_string(a3);
result = is_false(v21);
if ( (_DWORD)result )
{
v22 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a string, but given: ", a1, v22);
goto LABEL_22;
}
break;
case 6:
v23 = is_vector(a3);
result = is_false(v23);
if ( (_DWORD)result )
{
v24 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a vector, but given: ", a1, v24);
goto LABEL_22;
}
break;
case 7:
v25 = is_pair(a3);
result = is_false(v25);
if ( (_DWORD)result )
{
v26 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a pair, but given: ", a1, v26);
goto LABEL_22;
}
break;
case 8:
v5 = is_list(a3);
result = is_false(v5);
if ( (_DWORD)result )
{
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a list, but given: ", a1, a2);
goto LABEL_22;
}
break;
case 9:
v7 = is_procedure(a3);
result = is_false(v7);
if ( (_DWORD)result )
{
v8 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a procedure, but given: ", a1, v8);
LABEL_22:
write(a3, v9, v10);
newline();
goto LABEL_23;
}
break;
default:
puts("Error: unknown check arg type. -- CHECK_ARG_TYPE.");
LABEL_23:
result = error_handler();
break;
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func1(const void *a1, __int64 a2, unsigned int a3, int a4)
{
unsigned int v5; // eax
__int64 result; // rax
unsigned int v7; // eax
__int64 v8; // rdx
const void *v9; // rsi
size_t v10; // rdx
unsigned int v11; // eax
__int64 v12; // rdx
unsigned int v13; // eax
__int64 v14; // rdx
unsigned int v15; // eax
__int64 v16; // rdx
unsigned int v17; // eax
__int64 v18; // rdx
unsigned int v19; // eax
__int64 v20; // rdx
unsigned int v21; // eax
__int64 v22; // rdx
unsigned int v23; // eax
__int64 v24; // rdx
unsigned int v25; // eax
__int64 v26; // rdx

switch ( a4 )
{
case 0:
v11 = is_boolean(a3);
result = is_false(v11);
if ( (_DWORD)result )
{
v12 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a boolean, but given: ", a1, v12);
goto LABEL_22;
}
break;
case 1:
v13 = is_char(a3);
result = is_false(v13);
if ( (_DWORD)result )
{
v14 = a2;
v9 = a1;
printf("Errror: procedure \"%s\" expects the %s argument is a character, but given: ", a1, v14);
goto LABEL_22;
}
break;
case 2:
v15 = is_integer(a3);
result = is_false(v15);
if ( (_DWORD)result )
{
v16 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a integer, but given: ", a1, v16);
goto LABEL_22;
}
break;
case 3:
v17 = is_number(a3);
result = is_false(v17);
if ( (_DWORD)result )
{
v18 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a number, but given: ", a1, v18);
goto LABEL_22;
}
break;
case 4:
v19 = is_symbol(a3);
result = is_false(v19);
if ( (_DWORD)result )
{
v20 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a symbol, but given: ", a1, v20);
goto LABEL_22;
}
break;
case 5:
v21 = is_string(a3);
result = is_false(v21);
if ( (_DWORD)result )
{
v22 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a string, but given: ", a1, v22);
goto LABEL_22;
}
break;
case 6:
v23 = is_vector(a3);
result = is_false(v23);
if ( (_DWORD)result )
{
v24 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a vector, but given: ", a1, v24);
goto LABEL_22;
}
break;
case 7:
v25 = is_pair(a3);
result = is_false(v25);
if ( (_DWORD)result )
{
v26 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a pair, but given: ", a1, v26);
goto LABEL_22;
}
break;
case 8:
v5 = is_list(a3);
result = is_false(v5);
if ( (_DWORD)result )
{
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a list, but given: ", a1, a2);
goto LABEL_22;
}
break;
case 9:
v7 = is_procedure(a3);
result = is_false(v7);
if ( (_DWORD)result )
{
v8 = a2;
v9 = a1;
printf("Error: procedure \"%s\" expects the %s argument is a procedure, but given: ", a1, v8);
LABEL_22:
write(a3, v9, v10);
newline();
goto LABEL_23;
}
break;
default:
puts("Error: unknown check arg type. -- CHECK_ARG_TYPE.");
LABEL_23:
result = error_handler();
break;
}
return result;
}

original_code:
void check_arg_type(char *func, char* loc, cellpoint arg, int type)
{
 switch (type){
 case 0:
  if (is_false(is_boolean(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a boolean, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 1:
  if (is_false(is_char(arg))){
   printf("Errror: procedure \"%s\" expects the %s argument is a character, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 2:
  if (is_false(is_integer(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a integer, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 3:
  if (is_false(is_number(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a number, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 4:
  if (is_false(is_symbol(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a symbol, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 5:
  if (is_false(is_string(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a string, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 6:
  if (is_false(is_vector(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a vector, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 7:
  if (is_false(is_pair(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a pair, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 8:
  if (is_false(is_list(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a list, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 9:
  if (is_false(is_procedure(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a procedure, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 default:
  printf("Error: unknown check arg type. -- CHECK_ARG_TYPE.\n");
  error_handler();
 }
}

canonical_original_code:
void check_arg_type(char *func, char *loc, unsigned int arg, int type)
{
 switch (type){
 case 0:
  if (is_false(is_boolean(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a boolean, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 1:
  if (is_false(is_char(arg))){
   printf("Errror: procedure \"%s\" expects the %s argument is a character, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 2:
  if (is_false(is_integer(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a integer, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 3:
  if (is_false(is_number(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a number, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 4:
  if (is_false(is_symbol(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a symbol, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 5:
  if (is_false(is_string(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a string, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 6:
  if (is_false(is_vector(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a vector, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 7:
  if (is_false(is_pair(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a pair, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 8:
  if (is_false(is_list(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a list, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 case 9:
  if (is_false(is_procedure(arg))){
   printf("Error: procedure \"%s\" expects the %s argument is a procedure, but given: ", func, loc);
   write(arg);
   newline();
   error_handler();
  }
  break;
 default:
  printf("Error: unknown check arg type. -- CHECK_ARG_TYPE.\n");
  error_handler();
 }
}

variable_types:
loc
char *

variable_types:
arg
unsigned int

variable_types: type int

return_type: void


decompiled_code:
__int64 __fastcall eq_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax

check_arglst_len_eq(&unk_BF, 2LL, a1);
v1 = cdr(a1);
v2 = car(v1);
args_push(v2);
v3 = car(a1);
args_push(v3);
return eq();
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax

check_arglst_len_eq(&unk_BF, 2LL, a1);
v1 = cdr(a1);
v2 = car(v1);
args_push(v2);
v3 = car(a1);
args_push(v3);
return eq();
}

original_code:
cellpoint eq_proc(cellpoint arglst)
{
 check_arglst_len_eq("eq?", 2, arglst);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 return eq();
}

canonical_original_code:
unsigned int eq_proc(unsigned int arglst)
{
 check_arglst_len_eq("eq?", 2, arglst);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 return eq();
}

variable_types:
arglst
unsigned int

return_type: unsigned int


decompiled_code:
__int64 __fastcall eqv_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
__int64 v3; // rdi

check_arglst_len_eq("eqv?", 2LL, a1);
v1 = cdr(a1);
v2 = car(v1);
args_push(v2);
v3 = (unsigned int)car(a1);
args_push(v3);
return eqv();
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
__int64 v3; // rdi

check_arglst_len_eq("eqv?", 2LL, a1);
v1 = cdr(a1);
v2 = car(v1);
args_push(v2);
v3 = (unsigned int)car(a1);
args_push(v3);
return eqv();
}

original_code:
cellpoint eqv_proc(cellpoint arglst)
{
 check_arglst_len_eq("eqv?", 2, arglst);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 return eqv();
}

canonical_original_code:
unsigned int eqv_proc(unsigned int arglst)
{
 check_arglst_len_eq("eqv?", 2, arglst);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 return eqv();
}


decompiled_code:
__int64 __fastcall equal_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
__int64 v3; // rdi

check_arglst_len_eq("equal?", 2LL, a1);
v1 = cdr(a1);
v2 = car(v1);
args_push(v2);
v3 = (unsigned int)car(a1);
args_push(v3);
return equal();
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
__int64 v3; // rdi

check_arglst_len_eq("equal?", 2LL, a1);
v1 = cdr(a1);
v2 = car(v1);
args_push(v2);
v3 = (unsigned int)car(a1);
args_push(v3);
return equal();
}

original_code:
cellpoint equal_proc(cellpoint arglst)
{
 check_arglst_len_eq("equal?", 2, arglst);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 return equal();
}

canonical_original_code:
unsigned int equal_proc(unsigned int arglst)
{
 check_arglst_len_eq("equal?", 2, arglst);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 return equal();
}


vector

decompiled_code:
__int64 vector()
{
unsigned int v0; // ebx
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
__int64 v7; // rsi
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax

v0 = 0;
v1 = args_ref(1LL);
args_push(v1);
v2 = list_len();
v3 = get_integer(v2);
reg = make_vector(v3, 0LL);
v4 = args_ref(1LL);
stack_push(&vars_stack, v4);
while ( 1 )
{
v10 = stack_top(&vars_stack);
v11 = is_null(v10);
if ( !(unsigned int)is_false(v11) )
break;
v5 = stack_top(&vars_stack);
v6 = car(v5);
v7 = v0++;
vector_set(reg, v7, v6);
v8 = stack_pop(&vars_stack);
v9 = cdr(v8);
stack_push(&vars_stack, v9);
}
stack_pop(&vars_stack);
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func0()
{
unsigned int v0; // ebx
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
__int64 v7; // rsi
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax

v0 = 0;
v1 = args_ref(1LL);
args_push(v1);
v2 = list_len();
v3 = get_integer(v2);
reg = make_vector(v3, 0LL);
v4 = args_ref(1LL);
stack_push(&vars_stack, v4);
while ( 1 )
{
v10 = stack_top(&vars_stack);
v11 = is_null(v10);
if ( !(unsigned int)is_false(v11) )
break;
v5 = stack_top(&vars_stack);
v6 = car(v5);
v7 = v0++;
vector_set(reg, v7, v6);
v8 = stack_pop(&vars_stack);
v9 = cdr(v8);
stack_push(&vars_stack, v9);
}
stack_pop(&vars_stack);
args_pop(1LL);
return reg;
}

original_code:
cellpoint vector(void)
{
    int len, i=0;
 args_push(args_ref(1));
 len = get_integer(list_len());
    reg = make_vector(len, 0);
 stack_push(&vars_stack, args_ref(1));
    while (is_false(is_null(stack_top(&vars_stack)))){
  vector_set(reg, i, car(stack_top(&vars_stack)));
  ++i;
  stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
    }
 stack_pop(&vars_stack);
 args_pop(1);
    return reg;
}

canonical_original_code:
unsigned int vector()
{
    int len; int i = 0;
 args_push(args_ref(1));
 len = get_integer(list_len());
    reg = make_vector(len, 0);
 stack_push(&vars_stack, args_ref(1));
    while (is_false(is_null(stack_top(&vars_stack)))){
  vector_set(reg, i, car(stack_top(&vars_stack)));
  ++i;
  stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
    }
 stack_pop(&vars_stack);
 args_pop(1);
    return reg;
}

variable_types: len int

variable_types: i int


decompiled_code:
__int64 vector_eq()
{
unsigned int v0; // eax
int v1; // ebp
unsigned int v2; // eax
int v3; // er12
int v4; // ebx
unsigned int v5; // ebx
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax

v0 = args_ref(1LL);
v1 = vector_len(v0);
v2 = args_ref(2LL);
v3 = vector_len(v2);
v4 = args_ref(1LL);
if ( v4 == (unsigned int)args_ref(2LL) )
goto LABEL_8;
if ( v1 != v3 )
{
LABEL_7:
args_pop(2LL);
return a_false;
}
v5 = 0;
if ( v1 > 0 )
{
do
{
v6 = args_ref(1LL);
reg = vector_ref(v6, v5);
v7 = args_ref(2LL);
v8 = vector_ref(v7, v5);
args_push(v8);
args_push(reg);
reg = equal();
if ( (unsigned int)is_false(reg) )
goto LABEL_7;
}
while ( v1 != ++v5 );
}
LABEL_8:
args_pop(2LL);
return a_true;
}

canonical_decompiled_code:
__int64 func1()
{
unsigned int v0; // eax
int v1; // ebp
unsigned int v2; // eax
int v3; // er12
int v4; // ebx
unsigned int v5; // ebx
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax

v0 = args_ref(1LL);
v1 = vector_len(v0);
v2 = args_ref(2LL);
v3 = vector_len(v2);
v4 = args_ref(1LL);
if ( v4 == (unsigned int)args_ref(2LL) )
goto LABEL_8;
if ( v1 != v3 )
{
LABEL_7:
args_pop(2LL);
return a_false;
}
v5 = 0;
if ( v1 > 0 )
{
do
{
v6 = args_ref(1LL);
reg = vector_ref(v6, v5);
v7 = args_ref(2LL);
v8 = vector_ref(v7, v5);
args_push(v8);
args_push(reg);
reg = equal();
if ( (unsigned int)is_false(reg) )
goto LABEL_7;
}
while ( v1 != ++v5 );
}
LABEL_8:
args_pop(2LL);
return a_true;
}

original_code:
cellpoint vector_eq(void)
{
    int len1 = vector_len(args_ref(1));
    int len2 = vector_len(args_ref(2));
    int i;
    if (args_ref(1) == args_ref(2)){
  args_pop(2);
        return a_true;
    }
    if (len1 != len2){
  args_pop(2);
        return a_false;
    }
    for (i=0; i < len1; ++i){
  reg = vector_ref(args_ref(1), i);
  args_push(vector_ref(args_ref(2), i));
  args_push(reg);
  reg = equal();
        if (is_false(reg)){
            args_pop(2);
   return a_false;
        }
    }
 args_pop(2);
    return a_true;
}

canonical_original_code:
unsigned int vector_eq()
{
    int len1 = vector_len(args_ref(1));
    int len2 = vector_len(args_ref(2));
    int i;
    if (args_ref(1) == args_ref(2)){
  args_pop(2);
        return a_true;
    }
    if (len1 != len2){
  args_pop(2);
        return a_false;
    }
    for (i=0; i < len1; ++i){
  reg = vector_ref(args_ref(1), i);
  args_push(vector_ref(args_ref(2), i));
  args_push(reg);
  reg = equal();
        if (is_false(reg)){
            args_pop(2);
   return a_false;
        }
    }
 args_pop(2);
    return a_true;
}


decompiled_code:
__int64 vector_2_list()
{
unsigned int v0; // eax
int v1; // eax
int v2; // eax
unsigned int v3; // ebp
unsigned int v4; // ebx
unsigned int v5; // eax
unsigned int v6; // eax

v0 = args_ref(1LL);
v1 = vector_len(v0);
reg = 0;
v2 = v1 - 1;
if ( v2 >= 0 )
{
v3 = 0;
v4 = v2;
do
{
v5 = args_ref(1LL);
v6 = vector_ref(v5, v4);
reg = cons(v6, v3);
v3 = reg;
}
while ( v4-- != 0 );
}
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func2()
{
unsigned int v0; // eax
int v1; // eax
int v2; // eax
unsigned int v3; // ebp
unsigned int v4; // ebx
unsigned int v5; // eax
unsigned int v6; // eax

v0 = args_ref(1LL);
v1 = vector_len(v0);
reg = 0;
v2 = v1 - 1;
if ( v2 >= 0 )
{
v3 = 0;
v4 = v2;
do
{
v5 = args_ref(1LL);
v6 = vector_ref(v5, v4);
reg = cons(v6, v3);
v3 = reg;
}
while ( v4-- != 0 );
}
args_pop(1LL);
return reg;
}

original_code:
cellpoint vector_2_list(void)
{
 int i, len = vector_len(args_ref(1));
 reg = 0;
 for (i=len-1; i >= 0; --i){
  reg = cons(vector_ref(args_ref(1), i), reg);
 }
 args_pop(1);
 return reg;
}

canonical_original_code:
unsigned int vector_2_list()
{
 int i; int len = vector_len(args_ref(1));
 reg = 0;
 for (i=len-1; i >= 0; --i){
  reg = cons(vector_ref(args_ref(1), i), reg);
 }
 args_pop(1);
 return reg;
}


decompiled_code:
__int64 list_2_vector()
{
__int64 v0; // rdi

v0 = (unsigned int)args_ref(1LL);
args_push(v0);
reg = vector();
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func3()
{
__int64 v0; // rdi

v0 = (unsigned int)args_ref(1LL);
args_push(v0);
reg = func0();
args_pop(1LL);
return reg;
}

original_code:
cellpoint list_2_vector(void)
{
 args_push(args_ref(1));
 reg = vector();
 args_pop(1);
 return reg;
}

canonical_original_code:
unsigned int list_2_vector()
{
 args_push(args_ref(1));
 reg = vector();
 args_pop(1);
 return reg;
}


decompiled_code:
__int64 vector_fill()
{
int v0; // eax
int v1; // ebp
unsigned int i; // ebx
unsigned int v3; // eax
__int64 v4; // rsi

reg = args_ref(1LL);
v0 = vector_len(reg);
if ( v0 > 0 )
{
v1 = v0;
for ( i = 0; i != v1; ++i )
{
v3 = args_ref(2LL);
v4 = i;
vector_set(reg, v4, v3);
}
}
return args_pop(1LL);
}

canonical_decompiled_code:
__int64 func4()
{
int v0; // eax
int v1; // ebp
unsigned int i; // ebx
unsigned int v3; // eax
__int64 v4; // rsi

reg = args_ref(1LL);
v0 = vector_len(reg);
if ( v0 > 0 )
{
v1 = v0;
for ( i = 0; i != v1; ++i )
{
v3 = args_ref(2LL);
v4 = i;
vector_set(reg, v4, v3);
}
}
return args_pop(1LL);
}

original_code:
void vector_fill(void)
{
 int i, len;
 reg = args_ref(1);
 len = vector_len(reg);
 for (i=0; i < len; ++i){
  vector_set(reg, i, args_ref(2));
 }
 args_pop(1);
}

canonical_original_code:
void vector_fill()
{
 int i; int len;
 reg = args_ref(1);
 len = vector_len(reg);
 for (i=0; i < len; ++i){
  vector_set(reg, i, args_ref(2));
 }
 args_pop(1);
}


decompiled_code:
__int64 vars_init()
{
int v0; // eax
__int64 result; // rax

v0 = cons(0LL, 0LL);
reg = 0;
allocons = v0;
stack_init(&env_stack);
stack_init(&vars_stack);
stack_init(&args_stack);
stack_init(&parser_stack);
stack_init(&state_stack);
result = (unsigned int)the_global_env;
current_env = the_global_env;
return result;
}

canonical_decompiled_code:
__int64 func0()
{
int v0; // eax
__int64 result; // rax

v0 = cons(0LL, 0LL);
reg = 0;
allocons = v0;
stack_init(&env_stack);
stack_init(&vars_stack);
stack_init(&args_stack);
stack_init(&parser_stack);
stack_init(&state_stack);
result = (unsigned int)the_global_env;
current_env = the_global_env;
return result;
}

original_code:
void vars_init(void)
{
 allocons = cons(0, 0);
 reg = 0;
 stack_init(&env_stack);
 stack_init(&vars_stack);
 stack_init(&args_stack);
 stack_init(&parser_stack);
 stack_init(&state_stack);
 current_env = the_global_env;
}

canonical_original_code:
void vars_init()
{
 allocons = cons(0, 0);
 reg = 0;
 stack_init(&env_stack);
 stack_init(&vars_stack);
 stack_init(&args_stack);
 stack_init(&parser_stack);
 stack_init(&state_stack);
 current_env = the_global_env;
}


initial

decompiled_code:
__int64 initial()
{
memory_init();
bool_init();
parser_init();
init_obarray();
the_global_env = setup_environment();
vars_init();
return gc_init();
}

canonical_decompiled_code:
__int64 func1()
{
memory_init();
bool_init();
parser_init();
init_obarray();
the_global_env = setup_environment();
func0();
return gc_init();
}

original_code:
void initial(void)
{
 memory_init();
 bool_init();
 parser_init();
 init_obarray();
 the_global_env = setup_environment();
 vars_init();
 gc_init();
}

canonical_original_code:
void initial()
{
 memory_init();
 bool_init();
 parser_init();
 init_obarray();
 the_global_env = setup_environment();
 vars_init();
 gc_init();
}


decompiled_code:
__int64 __fastcall args_ref(int a1)
{
__int64 v2; // rdi

v2 = (unsigned int)args_stack;
if ( a1 > 1 )
{
do
{
--a1;
v2 = (unsigned int)cdr(v2);
}
while ( a1 != 1 );
}
return car(v2);
}

canonical_decompiled_code:
__int64 __fastcall func2(int a1)
{
__int64 v2; // rdi

v2 = (unsigned int)args_stack;
if ( a1 > 1 )
{
do
{
--a1;
v2 = (unsigned int)cdr(v2);
}
while ( a1 != 1 );
}
return car(v2);
}

original_code:
cellpoint args_ref(int n)
{
 cellpoint args = args_stack;
 while (n > 1){
  args = cdr(args);
  --n;
 }
  return car(args);
}

canonical_original_code:
unsigned int args_ref(int n)
{
 unsigned int args = args_stack;
 while (n > 1){
  args = cdr(args);
  --n;
 }
  return car(args);
}

variable_types: n int

variable_types:
args
unsigned int


decompiled_code:
__int64 __fastcall args_push(unsigned int a1)
{
return stack_push(&args_stack, a1);
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int a1)
{
return stack_push(&args_stack, a1);
}

original_code:
void args_push(cellpoint arg)
{
 stack_push(&args_stack, arg);
}

canonical_original_code:
void args_push(unsigned int arg)
{
 stack_push(&args_stack, arg);
}


decompiled_code:
__int64 __fastcall args_pop(int a1)
{
int v1; // ebx
__int64 result; // rax

if ( a1 > 0 )
{
v1 = a1;
do
{
result = stack_pop(&args_stack);
--v1;
}
while ( v1 );
}
return result;
}

canonical_decompiled_code:
__int64 __fastcall func4(int a1)
{
int v1; // ebx
__int64 result; // rax

if ( a1 > 0 )
{
v1 = a1;
do
{
result = stack_pop(&args_stack);
--v1;
}
while ( v1 );
}
return result;
}

original_code:
void args_pop(int n)
{
 while (n > 0){
  stack_pop(&args_stack);
  --n;
 }
}


decompiled_code:
void __noreturn error_handler()
{
longjmp(jump_buffer, 1);
}

canonical_decompiled_code:
void __noreturn func5()
{
longjmp(jump_buffer, 1);
}

original_code:
void error_handler(void)
{
 longjmp(jump_buffer, 1);
}

canonical_original_code:
void error_handler()
{
 longjmp(jump_buffer, 1);
}


eq

decompiled_code:
__int64 eq()
{
int v0; // ebx
bool v1; // zf
int v2; // eax

v0 = args_ref(1LL);
v1 = v0 == (unsigned int)args_ref(2LL);
v2 = a_true;
if ( !v1 )
v2 = a_false;
reg = v2;
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func0()
{
int v0; // ebx
bool v1; // zf
int v2; // eax

v0 = args_ref(1LL);
v1 = v0 == (unsigned int)args_ref(2LL);
v2 = a_true;
if ( !v1 )
v2 = a_false;
reg = v2;
args_pop(2LL);
return reg;
}

original_code:
cellpoint eq(void)
{
 if (args_ref(1) == args_ref(2)){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int eq()
{
 if (args_ref(1) == args_ref(2)){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}


eqv

decompiled_code:
__int64 eqv()
{
unsigned int v0; // eax
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // eax
unsigned int v14; // eax
unsigned int v15; // eax
unsigned int v16; // eax
unsigned int v17; // eax
unsigned int v18; // eax
unsigned int v19; // eax
unsigned int v20; // eax
unsigned int v21; // eax
unsigned int v22; // eax
unsigned int v23; // eax
unsigned int v24; // eax
int v25; // ebx
bool v26; // zf
int v27; // eax
unsigned int v29; // eax
unsigned int v30; // eax
unsigned int v31; // eax
unsigned int v32; // eax
unsigned int v33; // eax
unsigned int v34; // eax
unsigned int v35; // eax
unsigned int v36; // eax
unsigned int v37; // eax
unsigned int v38; // eax
unsigned int v39; // eax
unsigned int v40; // eax
unsigned int v41; // eax

v0 = args_ref(1LL);
v1 = is_boolean(v0);
if ( !(unsigned int)is_true(v1) || (v2 = args_ref(2LL), v3 = is_boolean(v2), !(unsigned int)is_true(v3)) )
{
v4 = args_ref(1LL);
v5 = is_symbol(v4);
if ( !(unsigned int)is_true(v5) || (v6 = args_ref(2LL), v7 = is_symbol(v6), !(unsigned int)is_true(v7)) )
{
v8 = args_ref(1LL);
v9 = is_number(v8);
if ( (unsigned int)is_true(v9) )
{
v10 = args_ref(2LL);
v11 = is_number(v10);
if ( (unsigned int)is_true(v11) )
{
reg = args_ref(1LL);
v39 = args_ref(2LL);
args_push(v39);
args_push(reg);
reg = number_eq();
goto LABEL_18;
}
}
v12 = args_ref(1LL);
v13 = is_char(v12);
if ( (unsigned int)is_true(v13) )
{
v18 = args_ref(2LL);
v19 = is_char(v18);
if ( (unsigned int)is_true(v19) )
{
reg = args_ref(1LL);
v20 = args_ref(2LL);
args_push(v20);
args_push(reg);
reg = char_eq();
goto LABEL_18;
}
}
v14 = args_ref(1LL);
v15 = is_null(v14);
if ( (unsigned int)is_true(v15) )
{
v16 = args_ref(2LL);
v17 = is_null(v16);
if ( (unsigned int)is_true(v17) )
{
reg = a_true;
goto LABEL_18;
}
}
v21 = args_ref(1LL);
v22 = is_pair(v21);
if ( !(unsigned int)is_true(v22) || (v23 = args_ref(2LL), v24 = is_pair(v23), !(unsigned int)is_true(v24)) )
{
v29 = args_ref(1LL);
v30 = is_string(v29);
if ( !(unsigned int)is_true(v30) || (v31 = args_ref(2LL), v32 = is_string(v31), !(unsigned int)is_true(v32)) )
{
v33 = args_ref(1LL);
v34 = is_vector(v33);
if ( !(unsigned int)is_true(v34) || (v35 = args_ref(2LL), v36 = is_vector(v35), !(unsigned int)is_true(v36)) )
{
v37 = args_ref(1LL);
v38 = is_procedure(v37);
if ( !(unsigned int)is_true(v38)
|| (v40 = args_ref(2LL), v41 = is_procedure(v40), !(unsigned int)is_true(v41)) )
{
reg = a_false;
goto LABEL_18;
}
}
}
}
}
}
v25 = args_ref(1LL);
v26 = v25 == (unsigned int)args_ref(2LL);
v27 = a_true;
if ( !v26 )
v27 = a_false;
reg = v27;
LABEL_18:
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func1()
{
unsigned int v0; // eax
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // eax
unsigned int v14; // eax
unsigned int v15; // eax
unsigned int v16; // eax
unsigned int v17; // eax
unsigned int v18; // eax
unsigned int v19; // eax
unsigned int v20; // eax
unsigned int v21; // eax
unsigned int v22; // eax
unsigned int v23; // eax
unsigned int v24; // eax
int v25; // ebx
bool v26; // zf
int v27; // eax
unsigned int v29; // eax
unsigned int v30; // eax
unsigned int v31; // eax
unsigned int v32; // eax
unsigned int v33; // eax
unsigned int v34; // eax
unsigned int v35; // eax
unsigned int v36; // eax
unsigned int v37; // eax
unsigned int v38; // eax
unsigned int v39; // eax
unsigned int v40; // eax
unsigned int v41; // eax

v0 = args_ref(1LL);
v1 = is_boolean(v0);
if ( !(unsigned int)is_true(v1) || (v2 = args_ref(2LL), v3 = is_boolean(v2), !(unsigned int)is_true(v3)) )
{
v4 = args_ref(1LL);
v5 = is_symbol(v4);
if ( !(unsigned int)is_true(v5) || (v6 = args_ref(2LL), v7 = is_symbol(v6), !(unsigned int)is_true(v7)) )
{
v8 = args_ref(1LL);
v9 = is_number(v8);
if ( (unsigned int)is_true(v9) )
{
v10 = args_ref(2LL);
v11 = is_number(v10);
if ( (unsigned int)is_true(v11) )
{
reg = args_ref(1LL);
v39 = args_ref(2LL);
args_push(v39);
args_push(reg);
reg = number_eq();
goto LABEL_18;
}
}
v12 = args_ref(1LL);
v13 = is_char(v12);
if ( (unsigned int)is_true(v13) )
{
v18 = args_ref(2LL);
v19 = is_char(v18);
if ( (unsigned int)is_true(v19) )
{
reg = args_ref(1LL);
v20 = args_ref(2LL);
args_push(v20);
args_push(reg);
reg = char_eq();
goto LABEL_18;
}
}
v14 = args_ref(1LL);
v15 = is_null(v14);
if ( (unsigned int)is_true(v15) )
{
v16 = args_ref(2LL);
v17 = is_null(v16);
if ( (unsigned int)is_true(v17) )
{
reg = a_true;
goto LABEL_18;
}
}
v21 = args_ref(1LL);
v22 = is_pair(v21);
if ( !(unsigned int)is_true(v22) || (v23 = args_ref(2LL), v24 = is_pair(v23), !(unsigned int)is_true(v24)) )
{
v29 = args_ref(1LL);
v30 = is_string(v29);
if ( !(unsigned int)is_true(v30) || (v31 = args_ref(2LL), v32 = is_string(v31), !(unsigned int)is_true(v32)) )
{
v33 = args_ref(1LL);
v34 = is_vector(v33);
if ( !(unsigned int)is_true(v34) || (v35 = args_ref(2LL), v36 = is_vector(v35), !(unsigned int)is_true(v36)) )
{
v37 = args_ref(1LL);
v38 = is_procedure(v37);
if ( !(unsigned int)is_true(v38)
|| (v40 = args_ref(2LL), v41 = is_procedure(v40), !(unsigned int)is_true(v41)) )
{
reg = a_false;
goto LABEL_18;
}
}
}
}
}
}
v25 = args_ref(1LL);
v26 = v25 == (unsigned int)args_ref(2LL);
v27 = a_true;
if ( !v26 )
v27 = a_false;
reg = v27;
LABEL_18:
args_pop(2LL);
return reg;
}

original_code:
cellpoint eqv(void)
{
    if (is_true(is_boolean(args_ref(1))) &&
  is_true(is_boolean(args_ref(2)))){
        reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_symbol(args_ref(1))) &&
     is_true(is_symbol(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_number(args_ref(1))) &&
     is_true(is_number(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = number_eq();
    }else if (is_true(is_char(args_ref(1))) &&
     is_true(is_char(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = char_eq();
    }else if (is_true(is_null(args_ref(1))) &&
     is_true(is_null(args_ref(2)))){
        reg = a_true;
    }else if (is_true(is_pair(args_ref(1))) &&
     is_true(is_pair(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_string(args_ref(1))) &&
     is_true(is_string(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_vector(args_ref(1))) &&
     is_true(is_vector(args_ref(2)))){
        reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_procedure(args_ref(1))) &&
     is_true(is_procedure(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int eqv()
{
    if (is_true(is_boolean(args_ref(1))) &&
  is_true(is_boolean(args_ref(2)))){
        reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_symbol(args_ref(1))) &&
     is_true(is_symbol(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_number(args_ref(1))) &&
     is_true(is_number(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = number_eq();
    }else if (is_true(is_char(args_ref(1))) &&
     is_true(is_char(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = char_eq();
    }else if (is_true(is_null(args_ref(1))) &&
     is_true(is_null(args_ref(2)))){
        reg = a_true;
    }else if (is_true(is_pair(args_ref(1))) &&
     is_true(is_pair(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_string(args_ref(1))) &&
     is_true(is_string(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_vector(args_ref(1))) &&
     is_true(is_vector(args_ref(2)))){
        reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
    }else if (is_true(is_procedure(args_ref(1))) &&
     is_true(is_procedure(args_ref(2)))){
  reg = (args_ref(1) == args_ref(2)) ? a_true : a_false;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}


equal

decompiled_code:
__int64 equal()
{
unsigned int v0; // eax
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v12; // eax
unsigned int v13; // eax
unsigned int v14; // eax
unsigned int v15; // eax
unsigned int v16; // eax

v0 = args_ref(1LL);
v1 = is_string(v0);
if ( (unsigned int)is_true(v1) && (v2 = args_ref(2LL), v3 = is_string(v2), (unsigned int)is_true(v3)) )
{
reg = args_ref(1LL);
v15 = args_ref(2LL);
args_push(v15);
args_push(reg);
reg = string_eq();
}
else
{
v4 = args_ref(1LL);
v5 = is_vector(v4);
if ( (unsigned int)is_true(v5) && (v6 = args_ref(2LL), v7 = is_vector(v6), (unsigned int)is_true(v7)) )
{
reg = args_ref(1LL);
v16 = args_ref(2LL);
args_push(v16);
args_push(reg);
reg = vector_eq();
}
else
{
v8 = args_ref(1LL);
v9 = is_list(v8);
if ( (unsigned int)is_true(v9) && (v12 = args_ref(2LL), v13 = is_list(v12), (unsigned int)is_true(v13)) )
{
reg = args_ref(1LL);
v14 = args_ref(2LL);
args_push(v14);
args_push(reg);
reg = list_eq();
}
else
{
reg = args_ref(1LL);
v10 = args_ref(2LL);
args_push(v10);
args_push(reg);
reg = eqv();
}
}
}
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func2()
{
unsigned int v0; // eax
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v12; // eax
unsigned int v13; // eax
unsigned int v14; // eax
unsigned int v15; // eax
unsigned int v16; // eax

v0 = args_ref(1LL);
v1 = is_string(v0);
if ( (unsigned int)is_true(v1) && (v2 = args_ref(2LL), v3 = is_string(v2), (unsigned int)is_true(v3)) )
{
reg = args_ref(1LL);
v15 = args_ref(2LL);
args_push(v15);
args_push(reg);
reg = string_eq();
}
else
{
v4 = args_ref(1LL);
v5 = is_vector(v4);
if ( (unsigned int)is_true(v5) && (v6 = args_ref(2LL), v7 = is_vector(v6), (unsigned int)is_true(v7)) )
{
reg = args_ref(1LL);
v16 = args_ref(2LL);
args_push(v16);
args_push(reg);
reg = vector_eq();
}
else
{
v8 = args_ref(1LL);
v9 = is_list(v8);
if ( (unsigned int)is_true(v9) && (v12 = args_ref(2LL), v13 = is_list(v12), (unsigned int)is_true(v13)) )
{
reg = args_ref(1LL);
v14 = args_ref(2LL);
args_push(v14);
args_push(reg);
reg = list_eq();
}
else
{
reg = args_ref(1LL);
v10 = args_ref(2LL);
args_push(v10);
args_push(reg);
reg = func1();
}
}
}
args_pop(2LL);
return reg;
}

original_code:
cellpoint equal(void)
{
    if (is_true(is_string(args_ref(1))) &&
  is_true(is_string(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = string_eq();
    }else if (is_true(is_vector(args_ref(1))) &&
     is_true(is_vector(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = vector_eq();
    }else if (is_true(is_list(args_ref(1))) &&
     is_true(is_list(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = list_eq();
 }else {
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = eqv();
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int equal()
{
    if (is_true(is_string(args_ref(1))) &&
  is_true(is_string(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = string_eq();
    }else if (is_true(is_vector(args_ref(1))) &&
     is_true(is_vector(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = vector_eq();
    }else if (is_true(is_list(args_ref(1))) &&
     is_true(is_list(args_ref(2)))){
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = list_eq();
 }else {
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = eqv();
 }
 args_pop(2);
 return reg;
}


decompiled_code:
_BOOL8 __fastcall stack_is_empty(_DWORD *a1)
{
return *a1 == 0;
}

canonical_decompiled_code:
_BOOL8 __fastcall func1(_DWORD *a1)
{
return *a1 == 0;
}

original_code:
int stack_is_empty(t_stack *st)
{
    return *st == 0;
}

canonical_original_code:
int stack_is_empty(unsigned int *st)
{
    return *st == 0;
}

variable_types:
st
unsigned int *

return_type: int


decompiled_code:
__int64 __fastcall stack_push(_DWORD *a1, unsigned int a2)
{
__int64 result; // rax

result = cons(a2, (unsigned int)*a1);
*a1 = result;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func2(_DWORD *a1, unsigned int a2)
{
__int64 result; // rax

result = cons(a2, (unsigned int)*a1);
*a1 = result;
return result;
}

original_code:
void stack_push(t_stack *st, cellpoint ele)
{
    *st = cons(ele, *st);
}

canonical_original_code:
void stack_push(unsigned int *st, unsigned int ele)
{
    *st = cons(ele, *st);
}

variable_types:
ele
unsigned int


decompiled_code:
__int64 __fastcall stack_pop(_DWORD *a1)
{
unsigned int v1; // er12

if ( stack_is_empty(a1) )
{
perror("Error: the stack is empty. --STACK_POP\n");
error_handler();
}
v1 = car((unsigned int)*a1);
*a1 = cdr((unsigned int)*a1);
return v1;
}

canonical_decompiled_code:
__int64 __fastcall func3(_DWORD *a1)
{
unsigned int v1; // er12

if ( func1(a1) )
{
perror("Error: the stack is empty. --STACK_POP\n");
error_handler();
}
v1 = car((unsigned int)*a1);
*a1 = cdr((unsigned int)*a1);
return v1;
}

original_code:
cellpoint stack_pop(t_stack *st)
{
    if (stack_is_empty(st)){
        perror("Error: the stack is empty. --STACK_POP\n");
  error_handler();
    }
    cellpoint top = car(*st);
    *st = cdr(*st);
    return top;
}

canonical_original_code:
unsigned int stack_pop(unsigned int *st)
{
    if (stack_is_empty(st)){
        perror("Error: the stack is empty. --STACK_POP\n");
  error_handler();
    }
    unsigned int top = car(*st);
    *st = cdr(*st);
    return top;
}

variable_types:
top
unsigned int


decompiled_code:
__int64 __fastcall stack_top(_DWORD *a1)
{
if ( stack_is_empty(a1) )
{
perror("Error: the stack is empty. --STACK_TOP\n");
error_handler();
}
return car((unsigned int)*a1);
}

canonical_decompiled_code:
__int64 __fastcall func4(_DWORD *a1)
{
if ( func1(a1) )
{
perror("Error: the stack is empty. --STACK_TOP\n");
error_handler();
}
return car((unsigned int)*a1);
}

original_code:
cellpoint stack_top(t_stack *st)
{
    if (stack_is_empty(st)){
        perror("Error: the stack is empty. --STACK_TOP\n");
  error_handler();
    }
    return car(*st);
}

canonical_original_code:
unsigned int stack_top(unsigned int *st)
{
    if (stack_is_empty(st)){
        perror("Error: the stack is empty. --STACK_TOP\n");
  error_handler();
    }
    return car(*st);
}


decompiled_code:
__int64 symbol_2_string()
{
unsigned int v0; // eax
__int64 v1; // rax

v0 = args_ref(1LL);
v1 = get_symbol(v0);
reg = chars_2_string(v1);
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func0()
{
unsigned int v0; // eax
__int64 v1; // rax

v0 = args_ref(1LL);
v1 = get_symbol(v0);
reg = chars_2_string(v1);
args_pop(1LL);
return reg;
}

original_code:
cellpoint symbol_2_string(void)
{
 reg = chars_2_string(get_symbol(args_ref(1)));
 args_pop(1);
 return reg;
}

canonical_original_code:
unsigned int symbol_2_string()
{
 reg = chars_2_string(get_symbol(args_ref(1)));
 args_pop(1);
 return reg;
}


decompiled_code:
__int64 string_2_symbol()
{
unsigned int v0; // eax
void *v1; // rbp

v0 = args_ref(1LL);
v1 = (void *)get_string(v0);
reg = make_symbol(v1);
free(v1);
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func1()
{
unsigned int v0; // eax
void *v1; // rbp

v0 = args_ref(1LL);
v1 = (void *)get_string(v0);
reg = make_symbol(v1);
free(v1);
args_pop(1LL);
return reg;
}

original_code:
cellpoint string_2_symbol(void)
{
 char *s = get_string(args_ref(1));
 reg = make_symbol(s);
 free(s);
 args_pop(1);
 return reg;
}

canonical_original_code:
unsigned int string_2_symbol()
{
 char *s = get_string(args_ref(1));
 reg = make_symbol(s);
 free(s);
 args_pop(1);
 return reg;
}

variable_types:
s
char *


decompiled_code:
__int64 number_eq()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // zf
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 == (unsigned int)get_integer(v2);
v4 = a_true;
if ( !v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func0()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // zf
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 == (unsigned int)get_integer(v2);
v4 = a_true;
if ( !v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

original_code:
cellpoint number_eq(void)
{
 if (get_integer(args_ref(1)) == get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int number_eq()
{
 if (get_integer(args_ref(1)) == get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}


decompiled_code:
__int64 number_less()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 < (int)get_integer(v2);
v4 = a_true;
if ( !v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func1()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 < (int)get_integer(v2);
v4 = a_true;
if ( !v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

original_code:
cellpoint number_less(void)
{
 if (get_integer(args_ref(1)) < get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int number_less()
{
 if (get_integer(args_ref(1)) < get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}


decompiled_code:
__int64 number_greater()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 <= (int)get_integer(v2);
v4 = a_true;
if ( v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func2()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 <= (int)get_integer(v2);
v4 = a_true;
if ( v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

original_code:
cellpoint number_greater(void)
{
 if (get_integer(args_ref(1)) > get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int number_greater()
{
 if (get_integer(args_ref(1)) > get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}


decompiled_code:
__int64 number_less_eq()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 <= (int)get_integer(v2);
v4 = a_true;
if ( !v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func3()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 <= (int)get_integer(v2);
v4 = a_true;
if ( !v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

original_code:
cellpoint number_less_eq(void)
{
 if (get_integer(args_ref(1)) <= get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int number_less_eq()
{
 if (get_integer(args_ref(1)) <= get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}


decompiled_code:
__int64 number_greater_eq()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 < (int)get_integer(v2);
v4 = a_true;
if ( v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func4()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
bool v3; // cc
int v4; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = v1 < (int)get_integer(v2);
v4 = a_true;
if ( v3 )
v4 = a_false;
reg = v4;
args_pop(2LL);
return reg;
}

original_code:
cellpoint number_greater_eq(void)
{
 if (get_integer(args_ref(1)) >= get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int number_greater_eq()
{
 if (get_integer(args_ref(1)) >= get_integer(args_ref(2))){
  reg = a_true;
 }else {
  reg = a_false;
 }
 args_pop(2);
 return reg;
}


add

decompiled_code:
__int64 add()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 + v3));
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func5()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 + v3));
args_pop(2LL);
return reg;
}

original_code:
cellpoint add(void)
{
 reg = make_integer(get_integer(args_ref(1)) + get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int add()
{
 reg = make_integer(get_integer(args_ref(1)) + get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}


sub

decompiled_code:
__int64 sub()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 - v3));
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func6()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 - v3));
args_pop(2LL);
return reg;
}

original_code:
cellpoint sub(void)
{
 reg = make_integer(get_integer(args_ref(1)) - get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int sub()
{
 reg = make_integer(get_integer(args_ref(1)) - get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}


mul

decompiled_code:
__int64 mul()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v3 * v1));
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func7()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v3 * v1));
args_pop(2LL);
return reg;
}

original_code:
cellpoint mul(void)
{
 reg = make_integer(get_integer(args_ref(1)) * get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int mul()
{
 reg = make_integer(get_integer(args_ref(1)) * get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}


mdiv

decompiled_code:
__int64 mdiv()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 / v3));
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func8()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 / v3));
args_pop(2LL);
return reg;
}

original_code:
cellpoint mdiv(void)
{
 reg = make_integer(get_integer(args_ref(1)) / get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int mdiv()
{
 reg = make_integer(get_integer(args_ref(1)) / get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}


mremainder

decompiled_code:
__int64 mremainder()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 % v3));
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func9()
{
unsigned int v0; // eax
int v1; // ebx
unsigned int v2; // eax
int v3; // eax

v0 = args_ref(1LL);
v1 = get_integer(v0);
v2 = args_ref(2LL);
v3 = get_integer(v2);
reg = make_integer((unsigned int)(v1 % v3));
args_pop(2LL);
return reg;
}

original_code:
cellpoint mremainder(void)
{
 reg = make_integer(get_integer(args_ref(1)) % get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}

canonical_original_code:
unsigned int mremainder()
{
 reg = make_integer(get_integer(args_ref(1)) % get_integer(args_ref(2)));
 args_pop(2);
 return reg;
}


decompiled_code:
__int64 __fastcall write_proc(unsigned int a1)
{
int v1; // eax
size_t v2; // rdx

check_arglst_len_eq("write", 1LL, a1);
v1 = car(a1);
write(v1, &loc_1, v2);
return make_symbol("ok");
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1)
{
int v1; // eax
size_t v2; // rdx

check_arglst_len_eq("write", 1LL, a1);
v1 = car(a1);
write(v1, &loc_1, v2);
return make_symbol("ok");
}

original_code:
cellpoint write_proc(cellpoint arglst)
{
 check_arglst_len_eq("write", 1, arglst);
 write(car(arglst));
 return make_symbol("ok");
}

canonical_original_code:
unsigned int write_proc(unsigned int arglst)
{
 check_arglst_len_eq("write", 1, arglst);
 write(car(arglst));
 return make_symbol("ok");
}


decompiled_code:
__int64 __fastcall display_proc(unsigned int a1)
{
unsigned int v1; // eax

check_arglst_len_eq("display", 1LL, a1);
v1 = car(a1);
display(v1);
return make_symbol("ok");
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned int a1)
{
unsigned int v1; // eax

check_arglst_len_eq("display", 1LL, a1);
v1 = car(a1);
display(v1);
return make_symbol("ok");
}

original_code:
cellpoint display_proc(cellpoint arglst)
{
 check_arglst_len_eq("display", 1, arglst);
 display(car(arglst));
 return make_symbol("ok");
}

canonical_original_code:
unsigned int display_proc(unsigned int arglst)
{
 check_arglst_len_eq("display", 1, arglst);
 display(car(arglst));
 return make_symbol("ok");
}


decompiled_code:
__int64 __fastcall newline_proc(unsigned int a1)
{
check_arglst_len_eq("newline", 0LL, a1);
newline();
return make_symbol("ok");
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned int a1)
{
check_arglst_len_eq("newline", 0LL, a1);
newline();
return make_symbol("ok");
}

original_code:
cellpoint newline_proc(cellpoint arglst)
{
 check_arglst_len_eq("newline", 0, arglst);
 newline();
 return make_symbol("ok");
}

canonical_original_code:
unsigned int newline_proc(unsigned int arglst)
{
 check_arglst_len_eq("newline", 0, arglst);
 newline();
 return make_symbol("ok");
}


decompiled_code:
__int64 __fastcall write_char_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax

check_arglst_len_eq("write-char", 1LL, a1);
v1 = car(a1);
check_arg_type("write-char", "first", v1, 1LL);
v2 = car(a1);
display(v2);
return make_symbol("ok");
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax

check_arglst_len_eq("write-char", 1LL, a1);
v1 = car(a1);
check_arg_type("write-char", "first", v1, 1LL);
v2 = car(a1);
display(v2);
return make_symbol("ok");
}

original_code:
cellpoint write_char_proc(cellpoint arglst)
{
 check_arglst_len_eq("write-char", 1, arglst);
 check_arg_type("write-char", "first", car(arglst), 1);
 display(car(arglst));
 return make_symbol("ok");
}

canonical_original_code:
unsigned int write_char_proc(unsigned int arglst)
{
 check_arglst_len_eq("write-char", 1, arglst);
 check_arg_type("write-char", "first", car(arglst), 1);
 display(car(arglst));
 return make_symbol("ok");
}


decompiled_code:
__int64 boolean_not()
{
unsigned int v0; // eax
bool v1; // zf
int v2; // eax

v0 = args_ref(1LL);
v1 = (unsigned int)is_false(v0) == 0;
v2 = a_true;
if ( v1 )
v2 = a_false;
reg = v2;
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func0()
{
unsigned int v0; // eax
bool v1; // zf
int v2; // eax

v0 = args_ref(1LL);
v1 = (unsigned int)is_false(v0) == 0;
v2 = a_true;
if ( v1 )
v2 = a_false;
reg = v2;
args_pop(1LL);
return reg;
}

original_code:
cellpoint boolean_not(void)
{
    if (is_false(args_ref(1))){
        reg = a_true;
    }else {
        reg = a_false;
    }
 args_pop(1);
 return reg;
}

canonical_original_code:
unsigned int boolean_not()
{
    if (is_false(args_ref(1))){
        reg = a_true;
    }else {
        reg = a_false;
    }
 args_pop(1);
 return reg;
}


decompiled_code:
void *memory_init()
{
void *result; // rax

the_cons_cells = (__int64)malloc(0x800000uLL);
if ( !the_cons_cells || (result = malloc(0x800000uLL), (free_cons_cells = (__int64)result) == 0) )
{
puts("Error: malloc error. -- INITIAL.");
exit(-1);
}
return result;
}

canonical_decompiled_code:
void *func0()
{
void *result; // rax

the_cons_cells = (__int64)malloc(0x800000uLL);
if ( !the_cons_cells || (result = malloc(0x800000uLL), (free_cons_cells = (__int64)result) == 0) )
{
puts("Error: malloc error. -- INITIAL.");
exit(-1);
}
return result;
}

original_code:
void memory_init(void)
{
    the_cons_cells = (struct cons_cell *)malloc(sizeof(struct cons_cell) * 0x100000);
 if (the_cons_cells == ((void *)0)){
  printf("Error: malloc error. -- INITIAL.\n");
  exit(-1);
 }
 free_cons_cells = (struct cons_cell *)malloc(sizeof(struct cons_cell) * 0x100000);
 if (free_cons_cells == ((void *)0)){
  printf("Error: malloc error. -- INITIAL.\n");
  exit(-1);
 }
}

canonical_original_code:
void memory_init()
{
    the_cons_cells = (struct cons_cell *)malloc(sizeof(struct cons_cell) * 0x100000);
 if (the_cons_cells == ((void *)0)){
  printf("Error: malloc error. -- INITIAL.\n");
  exit(-1);
 }
 free_cons_cells = (struct cons_cell *)malloc(sizeof(struct cons_cell) * 0x100000);
 if (free_cons_cells == ((void *)0)){
  printf("Error: malloc error. -- INITIAL.\n");
  exit(-1);
 }
}

user_defined_types: struct cons_cell { unsigned int car; unsigned int cdr; }


decompiled_code:
_BOOL8 __fastcall memory_enough(int a1)
{
return (unsigned int)(free_point + a1) <= 0xFFFFF;
}

canonical_decompiled_code:
_BOOL8 __fastcall func1(int a1)
{
return (unsigned int)(free_point + a1) <= 0xFFFFF;
}

original_code:
int memory_enough(int k)
{
 return (free_point + k) < 0x100000;
}

variable_types: k int


car

decompiled_code:
__int64 __fastcall car(unsigned int a1)
{
return *(unsigned int *)(the_cons_cells + 8LL * a1);
}

canonical_decompiled_code:
__int64 __fastcall func2(unsigned int a1)
{
return *(unsigned int *)(the_cons_cells + 8LL * a1);
}

original_code:
uint car(cellpoint cp)
{
    return the_cons_cells[cp].car;
}

canonical_original_code:
unsigned int car(unsigned int cp)
{
    return the_cons_cells[cp].car;
}

variable_types:
cp
unsigned int


cdr

decompiled_code:
__int64 __fastcall cdr(unsigned int a1)
{
return *(unsigned int *)(the_cons_cells + 8LL * a1 + 4);
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int a1)
{
return *(unsigned int *)(the_cons_cells + 8LL * a1 + 4);
}

original_code:
uint cdr(cellpoint cp)
{
    return the_cons_cells[cp].cdr;
}

canonical_original_code:
unsigned int cdr(unsigned int cp)
{
    return the_cons_cells[cp].cdr;
}


decompiled_code:
__int64 __fastcall car_set(unsigned int a1, int a2)
{
__int64 result; // rax

result = the_cons_cells;
*(_DWORD *)(the_cons_cells + 8LL * a1) = a2;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func4(unsigned int a1, int a2)
{
__int64 result; // rax

result = the_cons_cells;
*(_DWORD *)(the_cons_cells + 8LL * a1) = a2;
return result;
}

original_code:
void car_set(cellpoint cp, uint ele)
{
 the_cons_cells[cp].car = ele;
}

canonical_original_code:
void car_set(unsigned int cp, unsigned int ele)
{
 the_cons_cells[cp].car = ele;
}


decompiled_code:
__int64 __fastcall cdr_set(unsigned int a1, int a2)
{
__int64 result; // rax

result = the_cons_cells;
*(_DWORD *)(the_cons_cells + 8LL * a1 + 4) = a2;
return result;
}

canonical_decompiled_code:
__int64 __fastcall func5(unsigned int a1, int a2)
{
__int64 result; // rax

result = the_cons_cells;
*(_DWORD *)(the_cons_cells + 8LL * a1 + 4) = a2;
return result;
}

original_code:
void cdr_set(cellpoint cp, uint ele)
{
 the_cons_cells[cp].cdr = ele;
}

canonical_original_code:
void cdr_set(unsigned int cp, unsigned int ele)
{
 the_cons_cells[cp].cdr = ele;
}


cons

decompiled_code:
__int64 cons()
{
int v0; // er8
int v1; // er9
int *v2; // rdx
__int64 result; // rax
int v4; // er8
unsigned int v5; // er8

if ( !memory_enough(1) )
{
car_set(allocons, v1);
cdr_set(allocons, v4);
garbage_collection();
car(allocons);
v0 = cdr(v5);
}
v2 = (int *)(the_cons_cells + 8LL * (unsigned int)free_point);
result = (unsigned int)free_point;
*v2 = v1;
v2[1] = v0;
free_point = result + 1;
return result;
}

canonical_decompiled_code:
__int64 func6()
{
int v0; // er8
int v1; // er9
int *v2; // rdx
__int64 result; // rax
int v4; // er8
unsigned int v5; // er8

if ( !func1(1) )
{
func4(allocons, v1);
func5(allocons, v4);
garbage_collection();
func2(allocons);
v0 = func3(v5);
}
v2 = (int *)(the_cons_cells + 8LL * (unsigned int)free_point);
result = (unsigned int)free_point;
*v2 = v1;
v2[1] = v0;
free_point = result + 1;
return result;
}

original_code:
cellpoint cons(uint addr, uint decre)
{
    if(!memory_enough(1)){
  car_set(allocons, addr);
  cdr_set(allocons, decre);
        garbage_collection();
  addr = car(allocons);
  decre = cdr(allocons);
    }
 the_cons_cells[free_point].car = addr;
 the_cons_cells[free_point].cdr = decre;
    return free_point++;
}

canonical_original_code:
unsigned int cons(unsigned int addr, unsigned int decre)
{
    if(!memory_enough(1)){
  car_set(allocons, addr);
  cdr_set(allocons, decre);
        garbage_collection();
  addr = car(allocons);
  decre = cdr(allocons);
    }
 the_cons_cells[free_point].car = addr;
 the_cons_cells[free_point].cdr = decre;
    return free_point++;
}

variable_types:
addr
unsigned int

variable_types:
decre
unsigned int


decompiled_code:
__int64 __fastcall vector_pred_proc(unsigned int a1)
{
unsigned int v1; // eax

check_arglst_len_eq("vector?", 1LL, a1);
v1 = car(a1);
return is_vector(v1);
}

canonical_decompiled_code:
__int64 __fastcall func0(unsigned int a1)
{
unsigned int v1; // eax

check_arglst_len_eq("vector?", 1LL, a1);
v1 = car(a1);
return is_vector(v1);
}

original_code:
cellpoint vector_pred_proc(cellpoint arglst)
{
 check_arglst_len_eq("vector?", 1, arglst);
 return is_vector(car(arglst));
}

canonical_original_code:
unsigned int vector_pred_proc(unsigned int arglst)
{
 check_arglst_len_eq("vector?", 1, arglst);
 return is_vector(car(arglst));
}


decompiled_code:
__int64 __fastcall make_vector_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // er12
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v8; // eax

args_push();
v1 = list_len();
v2 = get_integer(v1);
if ( v2 == 1 )
{
reg = 0;
}
else if ( v2 == 2 )
{
v8 = cdr(a1, 2LL);
reg = car(v8);
}
else
{
printf("Error: procedure \"make-vector\" expects one or two arguments, but given %d.\n", v2);
error_handler();
}
v3 = car(a1);
check_arg_type("make-vector", "first", v3, 2LL);
v4 = reg;
v5 = car(a1);
v6 = get_integer(v5);
return make_vector(v6, v4);
}

canonical_decompiled_code:
__int64 __fastcall func1(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
unsigned int v4; // er12
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v8; // eax

args_push();
v1 = list_len();
v2 = get_integer(v1);
if ( v2 == 1 )
{
reg = 0;
}
else if ( v2 == 2 )
{
v8 = cdr(a1, 2LL);
reg = car(v8);
}
else
{
printf("Error: procedure \"make-vector\" expects one or two arguments, but given %d.\n", v2);
error_handler();
}
v3 = car(a1);
check_arg_type("make-vector", "first", v3, 2LL);
v4 = reg;
v5 = car(a1);
v6 = get_integer(v5);
return make_vector(v6, v4);
}

original_code:
cellpoint make_vector_proc(cellpoint arglst)
{
 int len;
 args_push(arglst);
 len = get_integer(list_len());
 if (len == 1){
  reg = 0;
 }else if (len == 2){
  reg = car(cdr(arglst));
 }else {
  printf("Error: procedure \"make-vector\" expects one or two arguments, but given %d.\n", len);
  error_handler();
 }
 check_arg_type("make-vector", "first", car(arglst), 2);
 return make_vector(get_integer(car(arglst)), reg);
}

canonical_original_code:
unsigned int make_vector_proc(unsigned int arglst)
{
 int len;
 args_push(arglst);
 len = get_integer(list_len());
 if (len == 1){
  reg = 0;
 }else if (len == 2){
  reg = car(cdr(arglst));
 }else {
  printf("Error: procedure \"make-vector\" expects one or two arguments, but given %d.\n", len);
  error_handler();
 }
 check_arg_type("make-vector", "first", car(arglst), 2);
 return make_vector(get_integer(car(arglst)), reg);
}


decompiled_code:
__int64 vector_proc()
{
args_push();
return vector();
}

canonical_decompiled_code:
__int64 func2()
{
args_push();
return vector();
}

original_code:
cellpoint vector_proc(cellpoint arglst)
{
 args_push(arglst);
 return vector();
}

canonical_original_code:
unsigned int vector_proc(unsigned int arglst)
{
 args_push(arglst);
 return vector();
}


decompiled_code:
__int64 __fastcall vector_length_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax

check_arglst_len_eq("vector-length", 1LL, a1);
v1 = car(a1);
check_arg_type("vector-length", "first", v1, 6LL);
v2 = car(a1);
v3 = vector_len(v2);
return make_integer(v3);
}

canonical_decompiled_code:
__int64 __fastcall func3(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax

check_arglst_len_eq("vector-length", 1LL, a1);
v1 = car(a1);
check_arg_type("vector-length", "first", v1, 6LL);
v2 = car(a1);
v3 = vector_len(v2);
return make_integer(v3);
}

original_code:
cellpoint vector_length_proc(cellpoint arglst)
{
 check_arglst_len_eq("vector-length", 1, arglst);
 check_arg_type("vector-length", "first", car(arglst), 6);
 return make_integer(vector_len(car(arglst)));
}

canonical_original_code:
unsigned int vector_length_proc(unsigned int arglst)
{
 check_arglst_len_eq("vector-length", 1, arglst);
 check_arg_type("vector-length", "first", car(arglst), 6);
 return make_integer(vector_len(car(arglst)));
}


decompiled_code:
__int64 __fastcall vector_ref_proc(unsigned int a1)
{
unsigned int v1; // er12
unsigned int v2; // eax
unsigned int v3; // ebp
unsigned int v4; // eax

check_arglst_len_eq("vector-ref", 2LL, a1);
v1 = car(a1);
v2 = cdr(a1, 2LL);
v3 = car(v2);
check_arg_type("vector-ref", "first", v1, 6LL);
check_arg_type("vector-ref", "first", v3, 2LL);
v4 = get_integer(v3);
return vector_ref(v1, v4);
}

canonical_decompiled_code:
__int64 __fastcall func4(unsigned int a1)
{
unsigned int v1; // er12
unsigned int v2; // eax
unsigned int v3; // ebp
unsigned int v4; // eax

check_arglst_len_eq("vector-ref", 2LL, a1);
v1 = car(a1);
v2 = cdr(a1, 2LL);
v3 = car(v2);
check_arg_type("vector-ref", "first", v1, 6LL);
check_arg_type("vector-ref", "first", v3, 2LL);
v4 = get_integer(v3);
return vector_ref(v1, v4);
}

original_code:
cellpoint vector_ref_proc(cellpoint arglst)
{
 check_arglst_len_eq("vector-ref", 2, arglst);
 cellpoint farg = car(arglst);
 cellpoint sarg = car(cdr(arglst));
 check_arg_type("vector-ref", "first", farg, 6);
 check_arg_type("vector-ref", "first", sarg, 2);
 return vector_ref(farg, get_integer(sarg));
}

canonical_original_code:
unsigned int vector_ref_proc(unsigned int arglst)
{
 check_arglst_len_eq("vector-ref", 2, arglst);
 unsigned int farg = car(arglst);
 unsigned int sarg = car(cdr(arglst));
 check_arg_type("vector-ref", "first", farg, 6);
 check_arg_type("vector-ref", "first", sarg, 2);
 return vector_ref(farg, get_integer(sarg));
}

variable_types:
farg
unsigned int

variable_types:
sarg
unsigned int


decompiled_code:
__int64 __fastcall vector_set_proc(unsigned int a1)
{
unsigned int v1; // er12
unsigned int v2; // eax
unsigned int v3; // er13
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // er14
unsigned int v7; // eax

check_arglst_len_eq("vector-set!", 3LL, a1);
v1 = car(a1);
v2 = cdr(a1, 3LL);
v3 = car(v2);
v4 = cdr(a1, 3LL);
v5 = cdr(v4, 3LL);
v6 = car(v5);
check_arg_type("vector-set!", "first", v1, 6LL);
check_arg_type("vector-set!", "second", v3, 2LL);
v7 = get_integer(v3);
vector_set(v1, v7, v6);
return make_symbol("ok");
}

canonical_decompiled_code:
__int64 __fastcall func5(unsigned int a1)
{
unsigned int v1; // er12
unsigned int v2; // eax
unsigned int v3; // er13
unsigned int v4; // eax
unsigned int v5; // eax
unsigned int v6; // er14
unsigned int v7; // eax

check_arglst_len_eq("vector-set!", 3LL, a1);
v1 = car(a1);
v2 = cdr(a1, 3LL);
v3 = car(v2);
v4 = cdr(a1, 3LL);
v5 = cdr(v4, 3LL);
v6 = car(v5);
check_arg_type("vector-set!", "first", v1, 6LL);
check_arg_type("vector-set!", "second", v3, 2LL);
v7 = get_integer(v3);
vector_set(v1, v7, v6);
return make_symbol("ok");
}

original_code:
cellpoint vector_set_proc(cellpoint arglst)
{
 check_arglst_len_eq("vector-set!", 3, arglst);
 cellpoint farg = car(arglst);
 cellpoint sarg = car(cdr(arglst));
 cellpoint targ = car(cdr(cdr(arglst)));
 check_arg_type("vector-set!", "first", farg, 6);
 check_arg_type("vector-set!", "second", sarg, 2);
 vector_set(farg, get_integer(sarg), targ);
 return make_symbol("ok");
}

canonical_original_code:
unsigned int vector_set_proc(unsigned int arglst)
{
 check_arglst_len_eq("vector-set!", 3, arglst);
 unsigned int farg = car(arglst);
 unsigned int sarg = car(cdr(arglst));
 unsigned int targ = car(cdr(cdr(arglst)));
 check_arg_type("vector-set!", "first", farg, 6);
 check_arg_type("vector-set!", "second", sarg, 2);
 vector_set(farg, get_integer(sarg), targ);
 return make_symbol("ok");
}

variable_types:
targ
unsigned int


decompiled_code:
__int64 __fastcall vector_2_list_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax

check_arglst_len_eq("vector->list", 1LL, a1);
v1 = car(a1);
check_arg_type("vector->list", "first", v1, 6LL);
v2 = car(a1);
args_push(v2);
return vector_2_list();
}

canonical_decompiled_code:
__int64 __fastcall func6(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax

check_arglst_len_eq("vector->list", 1LL, a1);
v1 = car(a1);
check_arg_type("vector->list", "first", v1, 6LL);
v2 = car(a1);
args_push(v2);
return vector_2_list();
}

original_code:
cellpoint vector_2_list_proc(cellpoint arglst)
{
 check_arglst_len_eq("vector->list", 1, arglst);
 check_arg_type("vector->list", "first", car(arglst), 6);
 args_push(car(arglst));
 return vector_2_list();
}

canonical_original_code:
unsigned int vector_2_list_proc(unsigned int arglst)
{
 check_arglst_len_eq("vector->list", 1, arglst);
 check_arg_type("vector->list", "first", car(arglst), 6);
 args_push(car(arglst));
 return vector_2_list();
}


decompiled_code:
__int64 __fastcall list_2_vector_proc(unsigned int a1)
{
unsigned int v1; // eax
__int64 v2; // rdi

check_arglst_len_eq("list->vector", 1LL, a1);
v1 = car(a1);
check_arg_type("list->vector", "first", v1, 8LL);
v2 = (unsigned int)car(a1);
args_push(v2);
return list_2_vector();
}

canonical_decompiled_code:
__int64 __fastcall func7(unsigned int a1)
{
unsigned int v1; // eax
__int64 v2; // rdi

check_arglst_len_eq("list->vector", 1LL, a1);
v1 = car(a1);
check_arg_type("list->vector", "first", v1, 8LL);
v2 = (unsigned int)car(a1);
args_push(v2);
return list_2_vector();
}

original_code:
cellpoint list_2_vector_proc(cellpoint arglst)
{
 check_arglst_len_eq("list->vector", 1, arglst);
 check_arg_type("list->vector", "first", car(arglst), 8);
 args_push(car(arglst));
 return list_2_vector();
}

canonical_original_code:
unsigned int list_2_vector_proc(unsigned int arglst)
{
 check_arglst_len_eq("list->vector", 1, arglst);
 check_arg_type("list->vector", "first", car(arglst), 8);
 args_push(car(arglst));
 return list_2_vector();
}


decompiled_code:
__int64 __fastcall vector_fill_proc(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
__int64 v4; // rdi

check_arglst_len_eq("vector-fill!", 2LL, a1);
v1 = car(a1);
check_arg_type("vector-fill!", "first", v1, 6LL);
v2 = cdr(a1, "first");
v3 = car(v2);
args_push(v3);
v4 = (unsigned int)car(a1);
args_push(v4);
vector_fill();
return make_symbol("ok");
}

canonical_decompiled_code:
__int64 __fastcall func8(unsigned int a1)
{
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
__int64 v4; // rdi

check_arglst_len_eq("vector-fill!", 2LL, a1);
v1 = car(a1);
check_arg_type("vector-fill!", "first", v1, 6LL);
v2 = cdr(a1, "first");
v3 = car(v2);
args_push(v3);
v4 = (unsigned int)car(a1);
args_push(v4);
vector_fill();
return make_symbol("ok");
}

original_code:
cellpoint vector_fill_proc(cellpoint arglst)
{
 check_arglst_len_eq("vector-fill!", 2, arglst);
 check_arg_type("vector-fill!", "first", car(arglst), 6);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 vector_fill();
 return make_symbol("ok");
}

canonical_original_code:
unsigned int vector_fill_proc(unsigned int arglst)
{
 check_arglst_len_eq("vector-fill!", 2, arglst);
 check_arg_type("vector-fill!", "first", car(arglst), 6);
 args_push(car(cdr(arglst)));
 args_push(car(arglst));
 vector_fill();
 return make_symbol("ok");
}


decompiled_code:
__int64 make_frame()
{
unsigned int v0; // ebp
unsigned int v1; // eax

v0 = args_ref(2LL);
v1 = args_ref(1LL);
reg = cons(v1, v0);
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func0()
{
unsigned int v0; // ebp
unsigned int v1; // eax

v0 = args_ref(2LL);
v1 = args_ref(1LL);
reg = cons(v1, v0);
args_pop(2LL);
return reg;
}

original_code:
static cellpoint make_frame(void)
{
 reg = cons(args_ref(1), args_ref(2));
 args_pop(2);
 return reg;
}

canonical_original_code:
static unsigned int make_frame()
{
 reg = cons(args_ref(1), args_ref(2));
 args_pop(2);
 return reg;
}


decompiled_code:
__int64 frame_variables()
{
unsigned int v0; // eax

v0 = args_ref(1LL);
reg = car(v0);
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func1()
{
unsigned int v0; // eax

v0 = args_ref(1LL);
reg = car(v0);
args_pop(1LL);
return reg;
}

original_code:
static cellpoint frame_variables(void)
{
 reg = car(args_ref(1));
 args_pop(1);
 return reg;
}

canonical_original_code:
static unsigned int frame_variables()
{
 reg = car(args_ref(1));
 args_pop(1);
 return reg;
}


decompiled_code:
__int64 frame_values()
{
unsigned int v0; // eax

v0 = args_ref(1LL);
reg = cdr(v0);
args_pop(1LL);
return reg;
}

canonical_decompiled_code:
__int64 func2()
{
unsigned int v0; // eax

v0 = args_ref(1LL);
reg = cdr(v0);
args_pop(1LL);
return reg;
}

original_code:
static cellpoint frame_values(void)
{
 reg = cdr(args_ref(1));
 args_pop(1);
 return reg;
}

canonical_original_code:
static unsigned int frame_values()
{
 reg = cdr(args_ref(1));
 args_pop(1);
 return reg;
}


decompiled_code:
__int64 prim_proc_names()
{
const char *v0; // rdi
unsigned int v1; // ebp
char *v2; // rbx
unsigned int v3; // eax
__int64 result; // rax

v0 = "apply";
v1 = 0;
v2 = (char *)&off_1370;
reg = 0;
while ( 1 )
{
v3 = make_symbol(v0);
result = cons(v3, v1);
reg = result;
v1 = result;
if ( v2 == "D_ENV\n" )
break;
v0 = *(const char **)v2;
v2 -= 16;
}
return result;
}

canonical_decompiled_code:
__int64 func3()
{
const char *v0; // rdi
unsigned int v1; // ebp
char *v2; // rbx
unsigned int v3; // eax
__int64 result; // rax

v0 = "apply";
v1 = 0;
v2 = (char *)&off_1370;
reg = 0;
while ( 1 )
{
v3 = make_symbol(v0);
result = cons(v3, v1);
reg = result;
v1 = result;
if ( v2 == "D_ENV\n" )
break;
v0 = *(const char **)v2;
v2 -= 16;
}
return result;
}

original_code:
static cellpoint prim_proc_names(void)
{
 int len = sizeof(pparray) / sizeof(struct prim_proc_pair);
 int i;
 reg = 0;
 for (i=len-1; i >= 0; --i){
  reg = cons(make_symbol(pparray[i].name), reg);
 }
 return reg;
}

canonical_original_code:
static unsigned int prim_proc_names()
{
 int len = sizeof(pparray) / sizeof(struct prim_proc_pair);
 int i;
 reg = 0;
 for (i=len-1; i >= 0; --i){
  reg = cons(make_symbol(pparray[i].name), reg);
 }
 return reg;
}


decompiled_code:
__int64 prim_proc_objs()
{
__int64 v0; // rsi
char **v1; // rbx
char **v2; // rbp
char *v3; // r12
unsigned int v4; // eax
unsigned int v5; // eax
__int64 result; // rax

reg = 0;
v0 = 0LL;
v1 = &off_1380;
do
{
v2 = v1;
v1 -= 2;
stack_push(&vars_stack, v0);
v3 = v1[3];
v4 = make_symbol(v1[2]);
reg = make_prim_proc(v4, v3);
v5 = stack_pop(&vars_stack);
result = cons(reg, v5);
reg = result;
v0 = (unsigned int)result;
}
while ( v2 != &pparray );
return result;
}

canonical_decompiled_code:
__int64 func4()
{
__int64 v0; // rsi
char **v1; // rbx
char **v2; // rbp
char *v3; // r12
unsigned int v4; // eax
unsigned int v5; // eax
__int64 result; // rax

reg = 0;
v0 = 0LL;
v1 = &off_1380;
do
{
v2 = v1;
v1 -= 2;
stack_push(&vars_stack, v0);
v3 = v1[3];
v4 = make_symbol(v1[2]);
reg = make_prim_proc(v4, v3);
v5 = stack_pop(&vars_stack);
result = cons(reg, v5);
reg = result;
v0 = (unsigned int)result;
}
while ( v2 != &pparray );
return result;
}

original_code:
static cellpoint prim_proc_objs(void)
{
 int len = sizeof(pparray) / sizeof(struct prim_proc_pair);
 int i;
 reg = 0;
 for (i = len-1; i >= 0; --i){
  stack_push(&vars_stack, reg);
  reg = make_prim_proc(make_symbol(pparray[i].name), pparray[i].func);
  reg = cons(reg, stack_pop(&vars_stack));
 }
 return reg;
}

canonical_original_code:
static unsigned int prim_proc_objs()
{
 int len = sizeof(pparray) / sizeof(struct prim_proc_pair);
 int i;
 reg = 0;
 for (i = len-1; i >= 0; --i){
  stack_push(&vars_stack, reg);
  reg = make_prim_proc(make_symbol(pparray[i].name), pparray[i].func);
  reg = cons(reg, stack_pop(&vars_stack));
 }
 return reg;
}


decompiled_code:
__int64 extend_env()
{
unsigned int v0; // eax
unsigned int v1; // ebp
__int64 v2; // rdi
unsigned int v3; // eax
unsigned int v5; // eax
unsigned int v6; // eax

v0 = args_ref(1LL);
args_push(v0);
reg = list_len();
v1 = get_integer(reg);
v2 = (unsigned int)args_ref(2LL);
args_push(v2);
reg = list_len();
v3 = get_integer(reg);
if ( v1 == v3 )
{
reg = args_ref(1LL);
v5 = args_ref(2LL);
args_push(v5);
args_push(reg);
reg = make_frame();
v6 = args_ref(3LL);
reg = cons(reg, v6);
}
else
{
printf("Error: the length of vars(%d) not equal the lengths of vals(%d). --EXTEND_ENV\n", v1, v3);
error_handler();
}
args_pop(3LL);
return reg;
}

canonical_decompiled_code:
__int64 func6()
{
unsigned int v0; // eax
unsigned int v1; // ebp
__int64 v2; // rdi
unsigned int v3; // eax
unsigned int v5; // eax
unsigned int v6; // eax

v0 = args_ref(1LL);
args_push(v0);
reg = list_len();
v1 = get_integer(reg);
v2 = (unsigned int)args_ref(2LL);
args_push(v2);
reg = list_len();
v3 = get_integer(reg);
if ( v1 == v3 )
{
reg = args_ref(1LL);
v5 = args_ref(2LL);
args_push(v5);
args_push(reg);
reg = func0();
v6 = args_ref(3LL);
reg = cons(reg, v6);
}
else
{
printf("Error: the length of vars(%d) not equal the lengths of vals(%d). --EXTEND_ENV\n", v1, v3);
error_handler();
}
args_pop(3LL);
return reg;
}

original_code:
cellpoint extend_env(void)
{
 int len1, len2;
 args_push(args_ref(1));
 reg = list_len();
 len1 = get_integer(reg);
 args_push(args_ref(2));
 reg = list_len();
 len2 = get_integer(reg);
 if (len1 != len2){
  printf("Error: the length of vars(%d) not equal the lengths of vals(%d). --EXTEND_ENV\n", len1, len2);
  error_handler();
 }else {
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = make_frame();
  reg = cons(reg, args_ref(3));
 }
 args_pop(3);
 return reg;
}

canonical_original_code:
unsigned int extend_env()
{
 int len1; int len2;
 args_push(args_ref(1));
 reg = list_len();
 len1 = get_integer(reg);
 args_push(args_ref(2));
 reg = list_len();
 len2 = get_integer(reg);
 if (len1 != len2){
  printf("Error: the length of vars(%d) not equal the lengths of vals(%d). --EXTEND_ENV\n", len1, len2);
  error_handler();
 }else {
  reg = args_ref(1);
  args_push(args_ref(2));
  args_push(reg);
  reg = make_frame();
  reg = cons(reg, args_ref(3));
 }
 args_pop(3);
 return reg;
}


decompiled_code:
__int64 lookup_var_val()
{
__int64 v0; // rsi
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
__int64 v4; // rsi
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
__int64 v13; // rdi
unsigned int v14; // eax

v0 = (unsigned int)args_ref(2LL);
stack_push(&vars_stack, v0);
while ( 1 )
{
if ( !(unsigned int)stack_top(&vars_stack) )
{
printf("Error: unknown variables ");
v14 = args_ref(1LL);
display(v14);
newline();
error_handler();
args_pop(2LL);
return 0LL;
}
v1 = stack_top(&vars_stack);
args_push(v1);
reg = frame_variables();
stack_push(&vars_stack, reg);
v2 = stack_top(&vars_stack);
args_push(v2);
reg = ((__int64 (*)(void))frame_values)();
v3 = stack_pop(&vars_stack);
args_push(v3);
stack_push(&vars_stack, reg);
reg = frame_variables();
v4 = reg;
if ( reg )
break;
LABEL_8:
stack_pop(&vars_stack);
v13 = (unsigned int)stack_pop(&vars_stack);
args_push(v13);
reg = frame_values(v13, v4);
stack_push(&vars_stack, reg);
}
while ( 1 )
{
stack_push(&vars_stack, v4);
v8 = args_ref(1LL);
args_push(v8);
v9 = stack_top(&vars_stack);
v10 = car(v9);
args_push(v10);
reg = eq();
if ( (unsigned int)is_true(reg) )
break;
v5 = stack_pop(&vars_stack);
reg = cdr(v5);
v6 = stack_pop(&vars_stack);
v7 = cdr(v6);
stack_push(&vars_stack, v7);
v4 = reg;
if ( !reg )
goto LABEL_8;
}
stack_pop(&vars_stack);
v11 = stack_pop(&vars_stack);
reg = car(v11);
stack_pop(&vars_stack);
args_pop(2LL);
return reg;
}

canonical_decompiled_code:
__int64 func7()
{
__int64 v0; // rsi
unsigned int v1; // eax
unsigned int v2; // eax
unsigned int v3; // eax
__int64 v4; // rsi
unsigned int v5; // eax
unsigned int v6; // eax
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
__int64 v13; // rdi
unsigned int v14; // eax

v0 = (unsigned int)args_ref(2LL);
stack_push(&vars_stack, v0);
while ( 1 )
{
if ( !(unsigned int)stack_top(&vars_stack) )
{
printf("Error: unknown variables ");
v14 = args_ref(1LL);
display(v14);
newline();
error_handler();
args_pop(2LL);
return 0LL;
}
v1 = stack_top(&vars_stack);
args_push(v1);
reg = func1();
stack_push(&vars_stack, reg);
v2 = stack_top(&vars_stack);
args_push(v2);
reg = ((__int64 (*)(void))frame_values)();
v3 = stack_pop(&vars_stack);
args_push(v3);
stack_push(&vars_stack, reg);
reg = func1();
v4 = reg;
if ( reg )
break;
LABEL_8:
stack_pop(&vars_stack);
v13 = (unsigned int)stack_pop(&vars_stack);
args_push(v13);
reg = func2(v13, v4);
stack_push(&vars_stack, reg);
}
while ( 1 )
{
stack_push(&vars_stack, v4);
v8 = args_ref(1LL);
args_push(v8);
v9 = stack_top(&vars_stack);
v10 = car(v9);
args_push(v10);
reg = eq();
if ( (unsigned int)is_true(reg) )
break;
v5 = stack_pop(&vars_stack);
reg = cdr(v5);
v6 = stack_pop(&vars_stack);
v7 = cdr(v6);
stack_push(&vars_stack, v7);
v4 = reg;
if ( !reg )
goto LABEL_8;
}
stack_pop(&vars_stack);
v11 = stack_pop(&vars_stack);
reg = car(v11);
stack_pop(&vars_stack);
args_pop(2LL);
return reg;
}

original_code:
cellpoint lookup_var_val(void)
{
 stack_push(&vars_stack, args_ref(2));
 while (stack_top(&vars_stack) != the_empty_env){
  args_push(stack_top(&vars_stack));
  reg = first_frame();
  stack_push(&vars_stack, reg);
  args_push(stack_top(&vars_stack));
  reg = frame_values();
  args_push(stack_pop(&vars_stack));
  stack_push(&vars_stack, reg);
  reg = frame_variables();
  while (reg != 0){
   stack_push(&vars_stack, reg);
   args_push(args_ref(1));
   args_push(car(stack_top(&vars_stack)));
   reg = eq();
   if (is_true(reg)){
    stack_pop(&vars_stack);
    reg = car(stack_pop(&vars_stack));
    stack_pop(&vars_stack);
    args_pop(2);
    return reg;
   }
   reg = cdr(stack_pop(&vars_stack));
   stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
  }
  stack_pop(&vars_stack);
  args_push(stack_pop(&vars_stack));
  reg = enclosing_env();
  stack_push(&vars_stack, reg);
 }
 printf("Error: unknown variables ");
 display(args_ref(1));
 newline();
 error_handler();
 args_pop(2);
 return 0;
}

canonical_original_code:
unsigned int lookup_var_val()
{
 stack_push(&vars_stack, args_ref(2));
 while (stack_top(&vars_stack) != the_empty_env){
  args_push(stack_top(&vars_stack));
  reg = first_frame();
  stack_push(&vars_stack, reg);
  args_push(stack_top(&vars_stack));
  reg = frame_values();
  args_push(stack_pop(&vars_stack));
  stack_push(&vars_stack, reg);
  reg = frame_variables();
  while (reg != 0){
   stack_push(&vars_stack, reg);
   args_push(args_ref(1));
   args_push(car(stack_top(&vars_stack)));
   reg = eq();
   if (is_true(reg)){
    stack_pop(&vars_stack);
    reg = car(stack_pop(&vars_stack));
    stack_pop(&vars_stack);
    args_pop(2);
    return reg;
   }
   reg = cdr(stack_pop(&vars_stack));
   stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
  }
  stack_pop(&vars_stack);
  args_push(stack_pop(&vars_stack));
  reg = enclosing_env();
  stack_push(&vars_stack, reg);
 }
 printf("Error: unknown variables ");
 display(args_ref(1));
 newline();
 error_handler();
 args_pop(2);
 return 0;
}


decompiled_code:
__int64 define_var()
{
unsigned int v0; // eax
unsigned int v1; // eax
__int64 v2; // rsi
__int64 v3; // rdi
unsigned int v4; // eax
unsigned int v5; // eax
__int64 v6; // rsi
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // eax
__int64 result; // rax
unsigned int v15; // eax
unsigned int v16; // eax
__int64 v17; // rsi
unsigned int v18; // eax
__int64 v19; // rdi
unsigned int v20; // eax
unsigned int v21; // eax
__int64 v22; // rdi
unsigned int v23; // eax
unsigned int v24; // eax

v0 = args_ref(3LL);
args_push(v0);
v1 = frame_variables();
v2 = v1;
reg = v1;
stack_push(&vars_stack, v1);
v3 = (unsigned int)stack_top(&vars_stack);
args_push(v3);
reg = frame_values(v3, v2);
v4 = stack_pop(&vars_stack);
args_push(v4);
stack_push(&vars_stack, reg);
v5 = frame_variables();
reg = v5;
if ( v5 )
{
v6 = v5;
while ( 1 )
{
stack_push(&vars_stack, v6);
v10 = args_ref(1LL);
args_push(v10);
v11 = stack_top(&vars_stack);
v12 = car(v11);
args_push(v12);
reg = eq();
if ( (unsigned int)is_true(reg) )
break;
v7 = stack_pop(&vars_stack);
reg = cdr(v7);
v8 = stack_pop(&vars_stack);
v9 = cdr(v8);
stack_push(&vars_stack, v9);
v6 = reg;
if ( !reg )
goto LABEL_6;
}
stack_pop(&vars_stack);
reg = stack_pop(&vars_stack);
v13 = args_ref(2LL);
car_set(reg, v13);
result = args_pop(3LL);
}
else
{
LABEL_6:
stack_pop(&vars_stack);
v15 = args_ref(3LL);
args_push(v15);
reg = frame_variables();
v16 = args_ref(1LL);
stack_push(&vars_stack, v16);
v17 = (unsigned int)args_ref(2LL);
stack_push(&vars_stack, v17);
args_push(reg);
v18 = stack_pop(&vars_stack);
args_push(v18);
v19 = (unsigned int)stack_pop(&vars_stack);
args_push(v19);
add_binding_to_frame_isra_0();
v20 = args_ref(2LL);
v21 = is_compound_proc(v20);
if ( (unsigned int)is_true(v21) )
{
v22 = (unsigned int)args_ref(2LL);
args_push(v22);
reg = procedure_name();
v23 = is_null(reg);
if ( (unsigned int)is_true(v23) )
{
reg = args_ref(2LL);
v24 = args_ref(1LL);
args_push(v24);
args_push(reg);
procedure_name_set();
}
}
result = args_pop(3LL);
}
return result;
}

canonical_decompiled_code:
__int64 func8()
{
unsigned int v0; // eax
unsigned int v1; // eax
__int64 v2; // rsi
__int64 v3; // rdi
unsigned int v4; // eax
unsigned int v5; // eax
__int64 v6; // rsi
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // eax
__int64 result; // rax
unsigned int v15; // eax
unsigned int v16; // eax
__int64 v17; // rsi
unsigned int v18; // eax
__int64 v19; // rdi
unsigned int v20; // eax
unsigned int v21; // eax
__int64 v22; // rdi
unsigned int v23; // eax
unsigned int v24; // eax

v0 = args_ref(3LL);
args_push(v0);
v1 = func1();
v2 = v1;
reg = v1;
stack_push(&vars_stack, v1);
v3 = (unsigned int)stack_top(&vars_stack);
args_push(v3);
reg = func2(v3, v2);
v4 = stack_pop(&vars_stack);
args_push(v4);
stack_push(&vars_stack, reg);
v5 = func1();
reg = v5;
if ( v5 )
{
v6 = v5;
while ( 1 )
{
stack_push(&vars_stack, v6);
v10 = args_ref(1LL);
args_push(v10);
v11 = stack_top(&vars_stack);
v12 = car(v11);
args_push(v12);
reg = eq();
if ( (unsigned int)is_true(reg) )
break;
v7 = stack_pop(&vars_stack);
reg = cdr(v7);
v8 = stack_pop(&vars_stack);
v9 = cdr(v8);
stack_push(&vars_stack, v9);
v6 = reg;
if ( !reg )
goto LABEL_6;
}
stack_pop(&vars_stack);
reg = stack_pop(&vars_stack);
v13 = args_ref(2LL);
car_set(reg, v13);
result = args_pop(3LL);
}
else
{
LABEL_6:
stack_pop(&vars_stack);
v15 = args_ref(3LL);
args_push(v15);
reg = func1();
v16 = args_ref(1LL);
stack_push(&vars_stack, v16);
v17 = (unsigned int)args_ref(2LL);
stack_push(&vars_stack, v17);
args_push(reg);
v18 = stack_pop(&vars_stack);
args_push(v18);
v19 = (unsigned int)stack_pop(&vars_stack);
args_push(v19);
func5();
v20 = args_ref(2LL);
v21 = is_compound_proc(v20);
if ( (unsigned int)is_true(v21) )
{
v22 = (unsigned int)args_ref(2LL);
args_push(v22);
reg = procedure_name();
v23 = is_null(reg);
if ( (unsigned int)is_true(v23) )
{
reg = args_ref(2LL);
v24 = args_ref(1LL);
args_push(v24);
args_push(reg);
procedure_name_set();
}
}
result = args_pop(3LL);
}
return result;
}

original_code:
void define_var(void)
{
 args_push(args_ref(3));
 reg = first_frame();
 stack_push(&vars_stack, reg);
 args_push(stack_top(&vars_stack));
 reg = frame_values();
 args_push(stack_pop(&vars_stack));
 stack_push(&vars_stack, reg);
 reg = frame_variables();
 while (reg != 0){
  stack_push(&vars_stack, reg);
  args_push(args_ref(1));
  args_push(car(stack_top(&vars_stack)));
  reg = eq();
  if (is_true(reg)){
   stack_pop(&vars_stack);
   reg = stack_pop(&vars_stack);
   car_set(reg, args_ref(2));
   args_pop(3);
   return;
  }
  reg = cdr(stack_pop(&vars_stack));
  stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
 }
 stack_pop(&vars_stack);
 args_push(args_ref(3));
 reg = first_frame();
 stack_push(&vars_stack, args_ref(1));
 stack_push(&vars_stack, args_ref(2));
 args_push(reg);
 args_push(stack_pop(&vars_stack));
 args_push(stack_pop(&vars_stack));
 add_binding_to_frame();
 if (is_true(is_compound_proc(args_ref(2)))){
  args_push(args_ref(2));
  reg = procedure_name();
  if (is_true(is_null(reg))){
   reg = args_ref(2);
   args_push(args_ref(1));
   args_push(reg);
   procedure_name_set();
  }
 }
 args_pop(3);
}

canonical_original_code:
void define_var()
{
 args_push(args_ref(3));
 reg = first_frame();
 stack_push(&vars_stack, reg);
 args_push(stack_top(&vars_stack));
 reg = frame_values();
 args_push(stack_pop(&vars_stack));
 stack_push(&vars_stack, reg);
 reg = frame_variables();
 while (reg != 0){
  stack_push(&vars_stack, reg);
  args_push(args_ref(1));
  args_push(car(stack_top(&vars_stack)));
  reg = eq();
  if (is_true(reg)){
   stack_pop(&vars_stack);
   reg = stack_pop(&vars_stack);
   car_set(reg, args_ref(2));
   args_pop(3);
   return;
  }
  reg = cdr(stack_pop(&vars_stack));
  stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
 }
 stack_pop(&vars_stack);
 args_push(args_ref(3));
 reg = first_frame();
 stack_push(&vars_stack, args_ref(1));
 stack_push(&vars_stack, args_ref(2));
 args_push(reg);
 args_push(stack_pop(&vars_stack));
 args_push(stack_pop(&vars_stack));
 add_binding_to_frame();
 if (is_true(is_compound_proc(args_ref(2)))){
  args_push(args_ref(2));
  reg = procedure_name();
  if (is_true(is_null(reg))){
   reg = args_ref(2);
   args_push(args_ref(1));
   args_push(reg);
   procedure_name_set();
  }
 }
 args_pop(3);
}


decompiled_code:
__int64 set_var_val()
{
__int64 v0; // rsi
unsigned int v1; // eax
unsigned int v2; // eax
__int64 v3; // rsi
__int64 v4; // rdi
unsigned int v5; // eax
__int64 v6; // rsi
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // eax
__int64 v15; // rdi
__int64 v16; // rdi

v0 = (unsigned int)args_ref(3LL);
stack_push(&vars_stack, v0);
if ( (unsigned int)stack_top(&vars_stack) )
{
while ( 1 )
{
v1 = stack_top(&vars_stack);
args_push(v1);
v2 = frame_variables();
v3 = v2;
reg = v2;
stack_push(&vars_stack, v2);
v4 = (unsigned int)stack_top(&vars_stack);
args_push(v4);
reg = frame_values(v4, v3);
v5 = stack_pop(&vars_stack);
args_push(v5);
stack_push(&vars_stack, reg);
reg = frame_variables();
v6 = reg;
if ( reg )
break;
LABEL_8:
stack_pop(&vars_stack);
v15 = (unsigned int)stack_pop(&vars_stack);
args_push(v15);
reg = frame_values(v15, v6);
stack_push(&vars_stack, reg);
if ( !(unsigned int)stack_top(&vars_stack) )
goto LABEL_9;
}
while ( 1 )
{
stack_push(&vars_stack, v6);
v10 = args_ref(1LL);
args_push(v10);
v11 = stack_top(&vars_stack);
v12 = car(v11);
args_push(v12);
reg = eq();
if ( (unsigned int)is_true(reg) )
break;
v7 = stack_pop(&vars_stack);
reg = cdr(v7);
v8 = stack_pop(&vars_stack);
v9 = cdr(v8);
stack_push(&vars_stack, v9);
v6 = reg;
if ( !reg )
goto LABEL_8;
}
stack_pop(&vars_stack);
reg = stack_pop(&vars_stack);
v13 = args_ref(2LL);
car_set(reg, v13);
}
else
{
LABEL_9:
printf("Error: unknown variable ");
v16 = (unsigned int)args_ref(1LL);
display(v16);
newline();
error_handler();
}
stack_pop(&vars_stack);
return args_pop(3LL);
}

canonical_decompiled_code:
__int64 func9()
{
__int64 v0; // rsi
unsigned int v1; // eax
unsigned int v2; // eax
__int64 v3; // rsi
__int64 v4; // rdi
unsigned int v5; // eax
__int64 v6; // rsi
unsigned int v7; // eax
unsigned int v8; // eax
unsigned int v9; // eax
unsigned int v10; // eax
unsigned int v11; // eax
unsigned int v12; // eax
unsigned int v13; // eax
__int64 v15; // rdi
__int64 v16; // rdi

v0 = (unsigned int)args_ref(3LL);
stack_push(&vars_stack, v0);
if ( (unsigned int)stack_top(&vars_stack) )
{
while ( 1 )
{
v1 = stack_top(&vars_stack);
args_push(v1);
v2 = func1();
v3 = v2;
reg = v2;
stack_push(&vars_stack, v2);
v4 = (unsigned int)stack_top(&vars_stack);
args_push(v4);
reg = func2(v4, v3);
v5 = stack_pop(&vars_stack);
args_push(v5);
stack_push(&vars_stack, reg);
reg = func1();
v6 = reg;
if ( reg )
break;
LABEL_8:
stack_pop(&vars_stack);
v15 = (unsigned int)stack_pop(&vars_stack);
args_push(v15);
reg = func2(v15, v6);
stack_push(&vars_stack, reg);
if ( !(unsigned int)stack_top(&vars_stack) )
goto LABEL_9;
}
while ( 1 )
{
stack_push(&vars_stack, v6);
v10 = args_ref(1LL);
args_push(v10);
v11 = stack_top(&vars_stack);
v12 = car(v11);
args_push(v12);
reg = eq();
if ( (unsigned int)is_true(reg) )
break;
v7 = stack_pop(&vars_stack);
reg = cdr(v7);
v8 = stack_pop(&vars_stack);
v9 = cdr(v8);
stack_push(&vars_stack, v9);
v6 = reg;
if ( !reg )
goto LABEL_8;
}
stack_pop(&vars_stack);
reg = stack_pop(&vars_stack);
v13 = args_ref(2LL);
car_set(reg, v13);
}
else
{
LABEL_9:
printf("Error: unknown variable ");
v16 = (unsigned int)args_ref(1LL);
display(v16);
newline();
error_handler();
}
stack_pop(&vars_stack);
return args_pop(3LL);
}

original_code:
void set_var_val(void)
{
 stack_push(&vars_stack, args_ref(3));
 while (stack_top(&vars_stack) != the_empty_env){
  args_push(stack_top(&vars_stack));
  reg = first_frame();
  stack_push(&vars_stack, reg);
  args_push(stack_top(&vars_stack));
  reg = frame_values();
  args_push(stack_pop(&vars_stack));
  stack_push(&vars_stack, reg);
  reg = frame_variables();
  while (reg != 0){
   stack_push(&vars_stack, reg);
   args_push(args_ref(1));
   args_push(car(stack_top(&vars_stack)));
   reg = eq();
   if (is_true(reg)){
    stack_pop(&vars_stack);
    reg = stack_pop(&vars_stack);
    car_set(reg, args_ref(2));
    stack_pop(&vars_stack);
    args_pop(3);
    return;
   }
   reg = cdr(stack_pop(&vars_stack));
   stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
  }
  stack_pop(&vars_stack);
  args_push(stack_pop(&vars_stack));
  reg = enclosing_env();
  stack_push(&vars_stack, reg);
 }
 printf("Error: unknown variable ");
 display(args_ref(1));
 newline();
 error_handler();
 stack_pop(&vars_stack);
 args_pop(3);
}

canonical_original_code:
void set_var_val()
{
 stack_push(&vars_stack, args_ref(3));
 while (stack_top(&vars_stack) != the_empty_env){
  args_push(stack_top(&vars_stack));
  reg = first_frame();
  stack_push(&vars_stack, reg);
  args_push(stack_top(&vars_stack));
  reg = frame_values();
  args_push(stack_pop(&vars_stack));
  stack_push(&vars_stack, reg);
  reg = frame_variables();
  while (reg != 0){
   stack_push(&vars_stack, reg);
   args_push(args_ref(1));
   args_push(car(stack_top(&vars_stack)));
   reg = eq();
   if (is_true(reg)){
    stack_pop(&vars_stack);
    reg = stack_pop(&vars_stack);
    car_set(reg, args_ref(2));
    stack_pop(&vars_stack);
    args_pop(3);
    return;
   }
   reg = cdr(stack_pop(&vars_stack));
   stack_push(&vars_stack, cdr(stack_pop(&vars_stack)));
  }
  stack_pop(&vars_stack);
  args_push(stack_pop(&vars_stack));
  reg = enclosing_env();
  stack_push(&vars_stack, reg);
 }
 printf("Error: unknown variable ");
 display(args_ref(1));
 newline();
 error_handler();
 stack_pop(&vars_stack);
 args_pop(3);
}


decompiled_code:
__int64 setup_environment()
{
unsigned int v0; // eax
__int64 v1; // rdi
__int64 result; // rax

args_push(0LL);
v0 = prim_proc_objs();
args_push(v0);
v1 = (unsigned int)prim_proc_names();
args_push(v1);
result = extend_env();
reg = result;
return result;
}

canonical_decompiled_code:
__int64 func10()
{
unsigned int v0; // eax
__int64 v1; // rdi
__int64 result; // rax

args_push(0LL);
v0 = func4();
args_push(v0);
v1 = (unsigned int)func3();
args_push(v1);
result = func6();
reg = result;
return result;
}

original_code:
cellpoint setup_environment(void)
{
 args_push(the_empty_env);
 args_push(prim_proc_objs());
 args_push(prim_proc_names());
 reg = extend_env();
 return reg;
}

canonical_original_code:
unsigned int setup_environment()
{
 args_push(the_empty_env);
 args_push(prim_proc_objs());
 args_push(prim_proc_names());
 reg = extend_env();
 return reg;
}