LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/vc.c
// Function: decisiontree_vc_dimension_recursive
int decisiontree_vc_dimension_recursive(Datasetptr current_dataset, Decisionnodeptr root)
{
 if (number_of_symbolic_features(current_dataset->name) == current_dataset->featurecount - 1)
   return (int) decisiontree_vc_dimension_discrete_recursive(current_dataset, current_dataset->featurecount - 1, root);
 else
   if (number_of_numeric_features(current_dataset->name) == current_dataset->featurecount - 1)
     return decisiontree_vc_dimension_continuous_recursive(current_dataset, root);
   else
     return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x13ea7
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x93b75
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0x9399e
jmp 0x93b96
movq 0x8(%r14), %rdi
callq 0x13f7f
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x93b9c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x93ad8
cvttsd2si %xmm0, %eax
jmp 0x93b9f
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/vc.c
// Function: decisiontree_vc_dimension_wrt_nodetype
int decisiontree_vc_dimension_wrt_nodetype(Datasetptr d, int nodecount, MODEL_TYPE nodetype)
{
 /*Last Changed 01.10.2006*/
 double* testdata, logd, dimension, multiplier;
 int dim = d->multifeaturecount - 1, size;
 logd = log2(dim);
 switch (nodetype)
  {
   case MODEL_UNI:multiplier = logd;
                  size = 3;
                  break;
   case MODEL_LIN:multiplier = dim;
                  size = 3;
                  break;
   case MODEL_QUA:multiplier = dim;
                  size = 5;
                  break;
  }
 testdata = safemalloc(size * sizeof(double), "decisiontree_vc_dimension_wrt_nodetype", 10);
 testdata[size - 3] = multiplier * nodecount;
 testdata[size - 2] = multiplier;
 testdata[size - 1] = nodecount;
 switch (nodetype)
  {
   case MODEL_UNI:dimension = decisiontree_vc_dimension_univariate1(testdata);
                  break;
   case MODEL_LIN:dimension = decisiontree_vc_dimension_linear1(testdata);
                  break;
   case MODEL_QUA:testdata[0] = dim * dim * nodecount;
                  testdata[1] = dim * dim;
                  dimension = decisiontree_vc_dimension_quadratic1(testdata);
                  break;
  }
 safe_free(testdata);
 return ((int) dimension);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %ebp
movl 0x1c0(%rdi), %r12d
decl %r12d
cvtsi2sd %r12d, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x34d77
cmpl $0x2, %ebx
je 0x93bef
cmpl $0x1, %ebx
je 0x93beb
testl %ebx, %ebx
jne 0x93bf5
pushq $0x3
popq %r15
movsd %xmm0, 0x8(%rsp)
jmp 0x93bf8
pushq $0x3
jmp 0x93bf1
pushq $0x5
popq %r15
jmp 0x93bf8
xorl %r15d, %r15d
leaq 0xe991(%rip), %rsi      # 0xa2590
shll $0x3, %r15d
pushq $0xa
popq %rdx
movq %r15, %rdi
callq 0x34f59
movq %rax, %r14
cvtsi2sd %ebp, %xmm0
movsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rax,%r15)
movsd %xmm2, -0x10(%rax,%r15)
movsd %xmm0, -0x8(%rax,%r15)
cmpl $0x2, %ebx
je 0x93c5a
cmpl $0x1, %ebx
je 0x93c50
testl %ebx, %ebx
jne 0x93c84
movq %r14, %rdi
callq 0x93504
jmp 0x93c7e
movq %r14, %rdi
callq 0x935a9
jmp 0x93c7e
imull %r12d, %r12d
imull %r12d, %ebp
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%r14)
cvtsi2sd %r12d, %xmm0
movsd %xmm0, 0x8(%r14)
movq %r14, %rdi
callq 0x9364e
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
callq 0x34ff7
cvttsd2si 0x8(%rsp), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/vc.c
// Function: omnivariatetree_vc_dimension
int omnivariatetree_vc_dimension(Datasetptr d, Decisionnodeptr node)
{
 /*Last Changed 29.09.2006*/
 /*Last Changed 06.03.2006*/
 int uni, linear, quadratic, result = 0;
 uni = decisiontree_univariate_node_count(node);
 result += decisiontree_vc_dimension_wrt_nodetype(d, uni, MODEL_UNI);
 linear = decisiontree_multivariate_linear_node_count(node);
 result += decisiontree_vc_dimension_wrt_nodetype(d, linear, MODEL_LIN);
 quadratic = decisiontree_multivariate_quadratic_node_count(node);
 result += decisiontree_vc_dimension_wrt_nodetype(d, quadratic, MODEL_QUA);
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x90828
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x93ba7
movl %eax, %ebp
movq %r14, %rdi
callq 0x45d54
pushq $0x1
popq %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x93ba7
movl %eax, %r15d
addl %ebp, %r15d
movq %r14, %rdi
callq 0x45da3
pushq $0x2
popq %rdx
movq %rbx, %rdi
movl %eax, %esi
callq 0x93ba7
addl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/vc.c
// Function: ruleset_vc_dimension_discrete_recursive
int ruleset_vc_dimension_discrete_recursive(int* condition_counts, int k, int d)
{
 int i, j, max, current;
 int *left, *right;
 if (k == 1)
  {
   if (condition_counts[0] > -1)
     return (int) (log2(binomdouble(d, condition_counts[0]) + 1) + 1);
   else
     return 1;
  }
 max = 0;
 for (i = 1; i < k; i++)
  {
   left = safemalloc(i * sizeof(int), "ruleset_vc_dimension_discrete_recursive", 8);
   for (j = 0; j < i; j++)
     left[j] = condition_counts[i - 1] - 1;
   right = safemalloc((k - i) * sizeof(int), "ruleset_vc_dimension_discrete_recursive", 11);
   for (j = 0; j < k - i; j++)
     right[j] = condition_counts[i + j] - 1;
   current = ruleset_vc_dimension_discrete_recursive(left, i, d - 1) + ruleset_vc_dimension_discrete_recursive(right, k - i, d - 1);
   if (current > max)
     max = current;
   safe_free(left);
   safe_free(right);
  }
 return max;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
cmpl $0x1, %esi
jne 0x93d46
movl (%r15), %esi
testl %esi, %esi
js 0x93e2a
movl %edx, %edi
callq 0x34e11
addsd 0x17f0(%rip), %xmm0     # 0x95520
callq 0x34d77
addsd 0x17e3(%rip), %xmm0     # 0x95520
cvttsd2si %xmm0, %eax
jmp 0x93e2d
decl %edx
movl %edx, 0xc(%rsp)
movslq %esi, %rax
movq %rax, 0x20(%rsp)
leaq 0x4(%r15), %r14
movq $0x0, 0x10(%rsp)
pushq $0x1
popq %r12
leaq 0xe84b(%rip), %rbx      # 0xa25b7
movq 0x20(%rsp), %r13
subq %r12, %r13
jle 0x93e23
leaq (,%r12,4), %rdi
movq %rbx, %rsi
pushq $0x8
popq %rdx
callq 0x34f59
movq %rax, %rbp
xorl %eax, %eax
cmpq %rax, %r12
je 0x93da7
movl -0x4(%r15,%r12,4), %ecx
decl %ecx
movl %ecx, (%rbp,%rax,4)
incq %rax
jmp 0x93d92
leaq (,%r13,4), %rdi
movq %rbx, %rsi
pushq $0xb
popq %rdx
callq 0x34f59
movq %rax, %rbx
xorl %eax, %eax
cmpq %r13, %rax
jge 0x93dd2
movl (%r14,%rax,4), %ecx
decl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
jmp 0x93dbf
movq %rbp, %rdi
movl %r12d, %esi
movl 0xc(%rsp), %edx
callq 0x93d00
movl %eax, 0x1c(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
movl 0xc(%rsp), %edx
callq 0x93d00
addl 0x1c(%rsp), %eax
movq 0x10(%rsp), %rcx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movq %rcx, 0x10(%rsp)
movq %rbp, %rdi
callq 0x34ff7
movq %rbx, %rdi
callq 0x34ff7
incq %r12
addq $0x4, %r14
jmp 0x93d65
movq 0x10(%rsp), %rax
jmp 0x93e2d
pushq $0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/vc.c
// Function: ruleset_vc_dimension_discrete
int ruleset_vc_dimension_discrete(Datasetptr current_dataset, Rulesetptr ruleset)
{
 int *condition_counts;
 int i = 0, vc, d;
 Decisionruleptr rule;
 d = current_dataset->featurecount - 1;
 rule = ruleset->start;
 condition_counts = safemalloc(ruleset->rulecount * sizeof(int), "ruleset_vc_dimension_discrete", 6);
 while (rule)
  {
   condition_counts[i] = rule->decisioncount;
   rule = rule->next;
   i++;
  }
 vc = ruleset_vc_dimension_discrete_recursive(condition_counts, ruleset->rulecount, d);
 safe_free(condition_counts);
 return vc;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl 0x1bc(%rdi), %ebx
movq (%rsi), %r12
movslq 0x10(%rsi), %rdi
shlq $0x2, %rdi
leaq 0xe780(%rip), %rsi      # 0xa25df
pushq $0x6
popq %rdx
callq 0x34f59
movq %rax, %r15
testq %r12, %r12
je 0x93e81
movl 0x28(%r12), %ecx
movl %ecx, (%rax)
movq 0x30(%r12), %r12
addq $0x4, %rax
jmp 0x93e6a
decl %ebx
movl 0x10(%r14), %esi
movq %r15, %rdi
movl %ebx, %edx
callq 0x93d00
movl %eax, %ebx
movq %r15, %rdi
callq 0x34ff7
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/vc.c
// Function: ruleset_vc_dimension_continuous
int ruleset_vc_dimension_continuous(Datasetptr current_dataset, Rulesetptr ruleset)
{
 int sum = 0, d;
 Decisionruleptr rule;
 d = current_dataset->featurecount - 1;
 rule = ruleset->start;
 while (rule)
  {
   if (rule->decisioncount < 2)
     sum += 2;
   else
     sum += (int) (log2(binomdouble(d - 1, rule->decisioncount - 2) + 1) + 1);
   rule = rule->next;
  }
 return sum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x1bc(%rdi), %ebp
addl $-0x2, %ebp
xorl %r14d, %r14d
pushq $0x2
popq %r15
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x93f06
movl 0x28(%rbx), %esi
movl %r15d, %eax
cmpl $0x2, %esi
jl 0x93efd
addl $-0x2, %esi
movl %ebp, %edi
callq 0x34e11
movsd 0x1638(%rip), %xmm1     # 0x95520
addsd %xmm1, %xmm0
callq 0x34d77
addsd 0x1627(%rip), %xmm0     # 0x95520
cvttsd2si %xmm0, %eax
addl %eax, %r14d
addq $0x30, %rbx
jmp 0x93ec3
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/vc.c
// Function: ruleset_vc_dimension
int ruleset_vc_dimension(Datasetptr current_dataset, Rulesetptr ruleset)
{
 if (number_of_symbolic_features(current_dataset->name) == current_dataset->featurecount - 1)
   return ruleset_vc_dimension_discrete(current_dataset, ruleset);
 else
    if (number_of_numeric_features(current_dataset->name) == current_dataset->featurecount - 1)
      return ruleset_vc_dimension_continuous(current_dataset, ruleset);
    else
      return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
callq 0x13ea7
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x93f46
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x93e3c
movq 0x8(%r14), %rdi
callq 0x13f7f
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0x93f6e
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x93ea9
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_document
Xmldocumentptr xml_document(char* filename)
{
 Xmldocumentptr xml;
 if (!fileexists(filename))
   return NULL;
 xml = safemalloc(sizeof(Xmldocument), "xml_document", 2);
 xml->filename = strcopy(xml->filename, filename);
 xml->root = NULL;
 return xml;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x340d8
testl %eax, %eax
je 0x93fb6
leaq 0xe691(%rip), %rsi      # 0xa2624
pushq $0x10
popq %rdi
pushq $0x2
popq %rdx
callq 0x34f59
movq %rax, %r14
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x3604c
movq %rax, (%r14)
andq $0x0, 0x8(%r14)
jmp 0x93fb9
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_read_token
char* xml_read_token(FILE* infile, char prevchar, char* nextchar, int space_allowed)
{
 char buffer[MAXTOKENLENGTH];
 char* token = NULL;
 int i;
 char ch = prevchar;
 i = 0;
 while ((ch != '\'') && (ch != '\"') && (ch != '=') && (ch != ' ' || space_allowed) && (ch != '/') && (ch != EOF) && (ch != '<') && (ch != '>'))
  {
   buffer[i] = ch;
   i++;
   ch = fgetc(infile);
  }
 buffer[i] = '\0';
 *nextchar = ch;
 token = strcopy(token, buffer);
 return token;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movq %rdx, %rbx
movl %esi, %eax
movq %rdi, %r14
xorl %r15d, %r15d
movabsq $0x5000800000000000, %r12 # imm = 0x5000800000000000
movabsq $0x2000008400000000, %r13 # imm = 0x2000008400000000
movzbl %al, %ecx
cmpb $0x3d, %cl
ja 0x94001
btq %rcx, %r13
jb 0x94034
testl %ebp, %ebp
sete %dl
cmpb $0x20, %al
sete %sil
testb %sil, %dl
jne 0x94034
cmpb $0x3e, %al
ja 0x9401b
btq %rcx, %r12
jb 0x94034
cmpl $0xff, %ecx
je 0x94034
movb %al, (%rsp,%r15)
incq %r15
movq %r14, %rdi
callq 0x41c0
jmp 0x93ff3
movl %r15d, %ecx
movb $0x0, (%rsp,%rcx)
movb %al, (%rbx)
movq %rsp, %rsi
xorl %edi, %edi
callq 0x3604c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_parse_tag
char* xml_parse_tag(FILE* infile, XML_TOKEN_TYPE* tokentype)
{
 char* token;
 char ch;
 ch = fgetc(infile);
 if (ch == '/')
  {
   *tokentype = XML_CLOSING_TAG_WITHOUT_ATTRIBUTES;
   ch = fgetc(infile);
  }
 else
   *tokentype = XML_OPENING_TAG_WITH_ATTRIBUTES;
 token = xml_read_token(infile, ch, &ch, BOOLEAN_FALSE);
 if (ch == '>' && *tokentype == XML_OPENING_TAG_WITH_ATTRIBUTES)
   *tokentype = XML_OPENING_TAG_WITHOUT_ATTRIBUTES;
 if (*tokentype == XML_CLOSING_TAG_WITHOUT_ATTRIBUTES && ch != '>')
  {
   printf(x1001);
   *tokentype = XML_END;
   return NULL;
  }
 else
   return token;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
callq 0x41c0
movb %al, 0xf(%rsp)
cmpb $0x2f, %al
jne 0x94086
movl $0x4, (%rbx)
movq %r14, %rdi
callq 0x41c0
movb %al, 0xf(%rsp)
jmp 0x94089
andl $0x0, (%rbx)
movsbl %al, %esi
leaq 0xf(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x93fc4
cmpb $0x3e, (%r15)
movl (%rbx), %ecx
jne 0x940af
testl %ecx, %ecx
jne 0x940c7
pushq $0x1
popq %rcx
jmp 0x940c5
cmpl $0x4, %ecx
jne 0x940c7
leaq 0xe5d9(%rip), %rdi      # 0xa2694
callq 0x4090
pushq $0x8
popq %rcx
xorl %eax, %eax
movl %ecx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_parse_attribute_value
char* xml_parse_attribute_value(FILE* infile, XML_TOKEN_TYPE* tokentype)
{
 char* token;
 char ch;
 ch = fgetc(infile);
 if (ch == '\'' || ch == '\"')
  {
   *tokentype = XML_ATTRIBUTE_VALUE;
   return NULL;
  }
 token = xml_read_token(infile, ch, &ch, BOOLEAN_TRUE);
 if (ch != '\'' && ch != '\"')
  {
   printf(x1002);
   *tokentype = XML_END;
   return NULL;
  }
 *tokentype = XML_ATTRIBUTE_VALUE;
 return token;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x41c0
movl %eax, %ecx
movb %cl, 0x7(%rsp)
pushq $0x5
popq %rbp
xorl %eax, %eax
cmpb $0x22, %cl
je 0x94130
movzbl %cl, %edx
cmpl $0x27, %edx
je 0x94130
movsbl %cl, %esi
leaq 0x7(%rsp), %r15
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r15, %rdx
callq 0x93fc4
movzbl (%r15), %ecx
cmpl $0x22, %ecx
je 0x94130
cmpl $0x27, %ecx
je 0x94130
leaq 0xe536(%rip), %rdi      # 0xa265c
callq 0x4090
pushq $0x8
popq %rbp
xorl %eax, %eax
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_parse_empty_tag
char* xml_parse_empty_tag(FILE* infile, XML_TOKEN_TYPE* tokentype)
{
 char ch;
 ch = fgetc(infile);
 if (ch != '>')
  {
   printf(x1001);
   *tokentype = XML_END;
  }
 else
   *tokentype = XML_CLOSING_TAG_WITH_ATTRIBUTES;
 return NULL;
}

// Assembly:
pushq %rbx
movq %rsi, %rbx
callq 0x41c0
cmpb $0x3e, %al
jne 0x9414e
pushq $0x3
jmp 0x9415c
leaq 0xe53f(%rip), %rdi      # 0xa2694
callq 0x4090
pushq $0x8
popq %rax
movl %eax, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_get_next_token
char* xml_get_next_token(FILE* infile, XML_TOKEN_TYPE* tokentype)
{
 char ch;
 char* token;
 /*Skip spaces*/
 ch = fgetc(infile);
 while (ch == ' ' || ch == '\t' || ch == '\n')
   ch = fgetc(infile);
 switch (ch){
   case  '<':return xml_parse_tag(infile, tokentype);
             break;
   case '\"':
   case '\'':return xml_parse_attribute_value(infile, tokentype);
             break;
   case  '/':return xml_parse_empty_tag(infile, tokentype);
             break;
   case  '=':*tokentype = XML_EQUAL;             
             break;
   case  '>':*tokentype = XML_OPENING_TAG_FINISH;
             return NULL;
             break;
   case  EOF:*tokentype = XML_END;
             return NULL;
   default  :token = xml_read_token(infile, ch, &ch, BOOLEAN_TRUE);
             *tokentype = XML_TEXT;
             ungetc(ch, infile);
             return token;
             break;
 }
 return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %r14, %rdi
callq 0x41c0
movl %eax, %ecx
shll $0x18, %ecx
cmpl $0x9000000, %ecx        # imm = 0x9000000
je 0x94171
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0x94171
cmpl $0x20000000, %ecx       # imm = 0x20000000
je 0x94171
movb %al, 0x7(%rsp)
sarl $0x18, %ecx
cmpl $-0x1, %ecx
je 0x94209
cmpl $0x22, %ecx
je 0x941d6
cmpl $0x27, %ecx
je 0x941d6
cmpl $0x2f, %ecx
je 0x941ec
cmpl $0x3e, %ecx
je 0x94201
cmpl $0x3d, %ecx
je 0x941f9
cmpl $0x3c, %ecx
jne 0x94221
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x94056
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x940d1
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9413d
jmp 0x9420f
movl $0x6, (%rbx)
jmp 0x9420f
movl $0x2, (%rbx)
jmp 0x9420f
movl $0x8, (%rbx)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movsbl %al, %esi
leaq 0x7(%rsp), %r12
pushq $0x1
popq %rcx
movq %r14, %rdi
movq %r12, %rdx
callq 0x93fc4
movq %rax, %r15
movl $0x7, (%rbx)
movsbl (%r12), %edi
movq %r14, %rsi
callq 0x4140
jmp 0x94212
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xmlelement
Xmlelementptr xmlelement(char* name, Xmlelementptr parent, int has_attributes)
{
 Xmlelementptr element;
 element = safemalloc(sizeof(Xmlelement), "xmlelement", 2);
 if (has_attributes)
   element->attributes = link_list();
 else
   element->attributes = NULL;
 element->parent = parent;
 element->sibling = NULL;
 element->child = NULL;
 element->pcdata = NULL;
 element->name = strcopy(element->name, name);
 return element;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xe3cc(%rip), %rsi      # 0xa2631
pushq $0x30
popq %rdi
pushq $0x2
popq %rdx
callq 0x34f59
movq %rax, %r14
testl %ebp, %ebp
je 0x94280
xorl %eax, %eax
callq 0x19aac
jmp 0x94282
xorl %eax, %eax
movq %rax, 0x10(%r14)
movq %r15, 0x18(%r14)
andq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x3604c
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_set_attribute_value
void xml_set_attribute_value(Xmlelementptr element, char* attribute_name, char* attribute_value)
{
 Listitemptr listnode;
 Xmlattributeptr att;
 if (element->attributes)
  {
   listnode = element->attributes->head;
   while (listnode && strIcmp(attribute_name, ((Xmlattributeptr)(listnode->item))->name) != 0)
     listnode = listnode->next;
   if (listnode)
    {
     att = (Xmlattributeptr)(listnode->item);
     safe_free(att->value);
     att->value = strcopy(att->value, attribute_value);
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0x94303
movq %rdx, %rbx
movq %rsi, %r14
movq (%r15), %r15
testq %r15, %r15
je 0x94303
movq (%r15), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x35f65
testl %eax, %eax
je 0x942e7
addq $0x8, %r15
jmp 0x942c7
movq (%r15), %r14
movq 0x8(%r14), %rdi
callq 0x34ff7
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x3604c
movq %rax, 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_get_attribute_value
char* xml_get_attribute_value(Xmlelementptr element, char* attribute_name)
{
 Listitemptr listnode;
 if (element->attributes)
  {
   listnode = element->attributes->head;
   while (listnode && strIcmp(attribute_name, ((Xmlattributeptr)(listnode->item))->name) != 0)
     listnode = listnode->next;
   if (listnode)
     return ((Xmlattributeptr)(listnode->item))->value;
  }
 return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0x10(%rdi), %r15
testq %r15, %r15
je 0x9433c
movq %rsi, %r14
xorl %ebx, %ebx
movq (%r15), %r15
testq %r15, %r15
je 0x94347
movq (%r15), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x35f65
testl %eax, %eax
je 0x94340
addq $0x8, %r15
jmp 0x9431c
xorl %ebx, %ebx
jmp 0x94347
movq (%r15), %rax
movq 0x8(%rax), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_print_element
void xml_print_element(FILE* handle, Xmlelementptr element, int level)
{
 int i;
 Listitemptr listnode;
 Xmlattributeptr attribute;
 for (i = 0; i < level; i++)
   fprintf(handle, "\t");
 fprintf(handle, "<");
 fprintf(handle, "%s", element->name);
 if (element->attributes != NULL)
  {
   listnode = element->attributes->head;
   while (listnode)
    {
     attribute = (Xmlattributeptr) listnode->item;
     fprintf(handle, " %s=\"%s\"", attribute->name, attribute->value);
     listnode = listnode->next;
    }
  }
 if (element->child == NULL)
   if (element->pcdata == NULL)
     fprintf(handle, "/>\n");
   else
     fprintf(handle, ">%s</%s>\n", element->pcdata, element->name);
 else
  { 
   fprintf(handle, ">\n");
   xml_print_element(handle, element->child, level + 1);
   for (i = 0; i < level; i++)
     fprintf(handle, "\t");
   fprintf(handle, "</%s>\n", element->name);
  }
 if (element->sibling)
   xml_print_element(handle, element->sibling, level);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leal 0x1(%rbx), %eax
movl %eax, 0x4(%rsp)
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %ebx
pushq $0x9
popq %r13
leaq 0xe298(%rip), %r12      # 0xa2649
movl %ebx, %ebp
subl $0x1, %ebp
jb 0x943c5
movl %r13d, %edi
movq %r15, %rsi
callq 0x4150
jmp 0x943b3
pushq $0x3c
popq %rdi
movq %r15, %rsi
callq 0x4150
movq (%r14), %rdi
movq %r15, %rsi
callq 0x41f0
movq 0x10(%r14), %rbp
testq %rbp, %rbp
je 0x9440b
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x9440b
movq (%rbp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x42e0
addq $0x8, %rbp
jmp 0x943e4
cmpq $0x0, 0x20(%r14)
je 0x94461
leaq 0xcaec(%rip), %rdi      # 0xa0f05
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq 0x42c0
movq 0x20(%r14), %rsi
movq %r15, %rdi
movl 0x4(%rsp), %edx
callq 0x94385
movl %ebx, %ebp
subl $0x1, %ebp
jb 0x9444b
movl %r13d, %edi
movq %r15, %rsi
callq 0x4150
jmp 0x94439
movq (%r14), %rdx
movq %r15, %rdi
leaq 0xe1fd(%rip), %rsi      # 0xa2655
xorl %eax, %eax
callq 0x42e0
jmp 0x94495
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0x94480
movq (%r14), %rcx
movq %r15, %rdi
leaq 0xe1db(%rip), %rsi      # 0xa2652
xorl %eax, %eax
callq 0x42e0
jmp 0x94495
leaq 0xc9e3(%rip), %rdi      # 0xa0e6a
pushq $0x3
popq %rsi
pushq $0x1
popq %rdx
movq %r15, %rcx
callq 0x42c0
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0x943b1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_number_of_children_with_specific_attribute_value
int xml_number_of_children_with_specific_attribute_value(Xmlelementptr element, char* attribute_name, char* attribute_value)
{
 int result = 0;
 Xmlelementptr childnode = element->child;
 while (childnode)
  {
   if (strIcmp(xml_get_attribute_value(childnode, attribute_name), attribute_value) == 0)
     result++;
   childnode = childnode->sibling;
  }
 return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
addq $0x20, %r15
xorl %ebp, %ebp
movq (%r15), %r15
testq %r15, %r15
je 0x94541
movq %r15, %rdi
movq %r14, %rsi
callq 0x94309
movq %rax, %rdi
movq %rbx, %rsi
callq 0x35f65
cmpl $0x1, %eax
adcl $0x0, %ebp
addq $0x28, %r15
jmp 0x94517
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_get_child_with_specific_attribute_value
Xmlelementptr xml_get_child_with_specific_attribute_value(Xmlelementptr element, char* attribute_name, char* attribute_value)
{
 Xmlelementptr childnode = element->child;
 while (childnode)
  {
   if (strIcmp(xml_get_attribute_value(childnode, attribute_name), attribute_value) == 0)
     return childnode;
   childnode = childnode->sibling;
  }
 return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
addq $0x20, %r14
movq (%r14), %r14
testq %r14, %r14
je 0x94588
movq %r14, %rdi
movq %r15, %rsi
callq 0x94309
movq %rax, %rdi
movq %rbx, %rsi
callq 0x35f65
testl %eax, %eax
je 0x94588
addq $0x28, %r14
jmp 0x94560
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_get_child_with_name
Xmlelementptr xml_get_child_with_name(Xmlelementptr element, char* name)
{
 Xmlelementptr childnode = element->child;
 while (childnode)
  {
   if (strIcmp(childnode->name, name) == 0)
     return childnode;
   childnode = childnode->sibling;
  }
 return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x20, %rbx
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x945bc
movq (%rbx), %rdi
movq %r14, %rsi
callq 0x35f65
testl %eax, %eax
je 0x945bc
addq $0x28, %rbx
jmp 0x9459f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/xmlparser.c
// Function: xml_free_element
void xml_free_element(Xmlelementptr element)
{
 if (element->attributes != NULL)
   free_link_list(element->attributes, xml_free_attribute);
 if (element->pcdata != NULL)
   safe_free(element->pcdata);
 if (element->child != NULL)
   xml_free_element(element->child);
 if (element->sibling != NULL)
   xml_free_element(element->sibling);
 safe_free(element->name);
 safe_free(element);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
je 0x945fe
leaq -0x32(%rip), %rsi       # 0x945c7
callq 0x19bd5
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x9460c
callq 0x34ff7
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x9461a
callq 0x945e5
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x94628
callq 0x945e5
movq (%rbx), %rdi
callq 0x34ff7
movq %rbx, %rdi
popq %rbx
jmp 0x34ff7
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/main.c
// Function: cubehash256
void cubehash256(char* input, char* output) {
    
    uint32_t result[8];
    sph_cubehash256_context ctx_cubehash;
    
    sph_cubehash256_init(&ctx_cubehash);
    sph_cubehash256(&ctx_cubehash, input, 32);
    sph_cubehash256_close(&ctx_cubehash, result);
    
    memcpy(output, result, 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0xe8(%rbp), %r15
movq %r15, %rdi
callq 0x197ba
pushq $0x20
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x197e0
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x197ea
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/main.c
// Function: blake256
void blake256(char* input, char* output) {
    
    uint32_t result[8];
    sph_blake256_context ctx_blake;
    
    sph_blake256_init(&ctx_blake);
    sph_blake256(&ctx_blake, input, 32);
    sph_blake256_close(&ctx_blake, result);	
    
    memcpy(output, result, 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0xc0(%rbp), %r15
movq %r15, %rdi
callq 0xd236
pushq $0x20
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xd263
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xd26d
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0xa8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/main.c
// Function: keccak256
void keccak256(char* input, char* output) {
    
    uint32_t result[8];
    sph_keccak256_context ctx_keccak;
    
    sph_keccak256_init(&ctx_keccak);
    sph_keccak256(&ctx_keccak, input, 32); 
    sph_keccak256_close(&ctx_keccak, result);
    
    memcpy(output, result, 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x1a8(%rbp), %r15
movq %r15, %rdi
callq 0x1bba9
pushq $0x20
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1bbb8
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1bbc7
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/main.c
// Function: skein256
void skein256(char* input, char* output) {
    
    uint32_t result[8];
    sph_skein256_context ctx_skein;
    
    sph_skein256_init(&ctx_skein);
    sph_skein256(&ctx_skein, input, 32); 
    sph_skein256_close(&ctx_skein, result);
    
    memcpy(output, result, 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
callq 0x1e474
pushq $0x20
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e485
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1e48f
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/main.c
// Function: bmw256
void bmw256(char* input, char* output) {
    
    uint32_t result[8];
    sph_bmw256_context ctx_bmw;
    
    sph_bmw256_init(&ctx_bmw);
    sph_bmw256(&ctx_bmw, input, 32);
    sph_bmw256_close(&ctx_bmw, result);
    
    memcpy(output, result, 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0xd0(%rbp), %r15
movq %r15, %rdi
callq 0x10952
pushq $0x20
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x10991
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1099b
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0xb8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/main.c
// Function: main
int main(int argc, char *argv[]) {
    
    char* algorithm;
    char* input;
    char input_hex[32];
    char output[32];
    bool all = false;
    
    if (argc <= 1) {
        printf("Arguments is missing\n");
        exit(1);
    }

    all = argc == 2;

    if (all) {

        input = argv[1];

        for (size_t count = 0; count < sizeof(input_hex) / sizeof(*input_hex); count++) {
            sscanf(input, "%2hhx", &input_hex[count]);
            input += 2;
        }

        for(int i = 0; i < sizeof(algorithms) / sizeof(*algorithms); i++) {
            print_hash(algorithms[i], input_hex, output);
        }

    } else {

        algorithm = argv[1];
        input = argv[2];

        for (size_t count = 0; count < sizeof(input_hex) / sizeof(*input_hex); count++) {
            sscanf(input, "%2hhx", &input_hex[count]);
            input += 2;
        }

        print_hash(algorithm, input_hex, output);
    }
    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
cmpl $0x1, %edi
jle 0x1650
movq 0x8(%rsi), %rbx
cmpl $0x2, %edi
jne 0x15d2
leaq 0x1da9b(%rip), %r14     # 0x1f046
xorl %r15d, %r15d
cmpq $0x20, %r15
je 0x1604
leaq (%r15,%rbp), %rdx
addq $-0x40, %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x10d0
addq $0x2, %rbx
incq %r15
jmp 0x15ae
movq 0x10(%rsi), %r14
leaq 0x1da69(%rip), %r15     # 0x1f046
xorl %r12d, %r12d
cmpq $0x20, %r12
je 0x1631
leaq (%r12,%rbp), %rdx
addq $-0x40, %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10d0
addq $0x2, %r14
incq %r12
jmp 0x15e0
xorl %r15d, %r15d
leaq 0x25a82(%rip), %r12     # 0x27090
leaq -0x40(%rbp), %rbx
leaq -0x60(%rbp), %r14
cmpq $0x30, %r15
je 0x1641
movq (%r15,%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x13cc
addq $0x8, %r15
jmp 0x1616
leaq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x13cc
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1da0a(%rip), %rdi     # 0x1f061
callq 0x1050
pushq $0x1
popq %rdi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/Lyra2RE.c
// Function: lyra2re_hash
void lyra2re_hash(const char* input, char* output)
{
    sph_blake256_context     ctx_blake;
    sph_groestl256_context   ctx_groestl;
    sph_keccak256_context    ctx_keccak;
    sph_skein256_context     ctx_skein;

    uint32_t hashA[8], hashB[8];

    sph_blake256_init(&ctx_blake);
    sph_blake256 (&ctx_blake, input, 80);
    sph_blake256_close (&ctx_blake, hashA);	
	
    sph_keccak256_init(&ctx_keccak);
    sph_keccak256 (&ctx_keccak,hashA, 32); 
    sph_keccak256_close(&ctx_keccak, hashB);
	
	LYRA2_old(hashA, 32, hashB, 32, hashB, 32, 1, 8, 8);
	
	sph_skein256_init(&ctx_skein);
    sph_skein256 (&ctx_skein, hashA, 32); 
    sph_skein256_close(&ctx_skein, hashB); 

    sph_groestl256_init(&ctx_groestl);
    sph_groestl256 (&ctx_groestl, hashB, 32); 
    sph_groestl256_close(&ctx_groestl, hashA); 

	memcpy(output, hashA, 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
movq %rsi, %rbx
movq %rdi, %r14
leaq -0xf0(%rbp), %r15
movq %r15, %rdi
callq 0xd236
pushq $0x50
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xd263
leaq -0x70(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xd26d
leaq -0x378(%rbp), %r13
movq %r13, %rdi
callq 0x1bba9
pushq $0x20
popq %r15
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1bbb8
leaq -0x50(%rbp), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x1bbc7
subq $0x8, %rsp
pushq $0x8
popq %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r15, %rcx
movq %r12, %r8
movq %r15, %r9
pushq %rax
pushq %rax
pushq $0x1
callq 0x1ba7
addq $0x20, %rsp
leaq -0x180(%rbp), %r13
movq %r13, %rdi
callq 0x1e474
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1e485
movq %r13, %rdi
movq %r12, %rsi
callq 0x1e48f
leaq -0x210(%rbp), %r13
movq %r13, %rdi
callq 0x6036
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x6045
movq %r13, %rdi
movq %r14, %rsi
callq 0x604f
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/Lyra2RE.c
// Function: lyra2re2_hash
void lyra2re2_hash(const char* input, char* output)
{
	sph_blake256_context ctx_blake;
	sph_cubehash256_context ctx_cubehash;
	sph_keccak256_context ctx_keccak;
	sph_skein256_context ctx_skein;
	sph_bmw256_context ctx_bmw;
	
	uint32_t hashA[8], hashB[8];
	
	sph_blake256_init(&ctx_blake);
    sph_blake256(&ctx_blake, input, 80);
    sph_blake256_close (&ctx_blake, hashA);	
	
    sph_keccak256_init(&ctx_keccak);
    sph_keccak256(&ctx_keccak, hashA, 32); 
    sph_keccak256_close(&ctx_keccak, hashB);
    
    sph_cubehash256_init(&ctx_cubehash);
    sph_cubehash256(&ctx_cubehash, hashB, 32);
    sph_cubehash256_close(&ctx_cubehash, hashA);
    
    LYRA2(hashB, 32, hashA, 32, hashA, 32, 1, 4, 4);
    
   	sph_skein256_init(&ctx_skein);
    sph_skein256(&ctx_skein, hashB, 32); 
    sph_skein256_close(&ctx_skein, hashA);
    
    sph_cubehash256_init(&ctx_cubehash);
    sph_cubehash256(&ctx_cubehash, hashA, 32);
    sph_cubehash256_close(&ctx_cubehash, hashB);
    
    sph_bmw256_init(&ctx_bmw);
    sph_bmw256(&ctx_bmw, hashB, 32);
    sph_bmw256_close(&ctx_bmw, hashA);
    
   	memcpy(output, hashA, 32);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movq %rsi, -0x30(%rbp)
movq %rdi, %r14
leaq -0xf0(%rbp), %r15
movq %r15, %rdi
callq 0xd236
pushq $0x50
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xd263
leaq -0x70(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xd26d
leaq -0x420(%rbp), %r13
movq %r13, %rdi
callq 0x1bba9
pushq $0x20
popq %r15
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1bbb8
leaq -0x50(%rbp), %r12
movq %r13, %rdi
movq %r12, %rsi
callq 0x1bbc7
leaq -0x2b8(%rbp), %r13
movq %r13, %rdi
callq 0x197ba
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x197e0
movq %r13, %rdi
movq %r14, %rsi
callq 0x197ea
subq $0x8, %rsp
pushq $0x4
popq %rax
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %r15, %r9
pushq %rax
pushq %rax
pushq $0x1
callq 0x18d0
addq $0x20, %rsp
leaq -0x210(%rbp), %rbx
movq %rbx, %rdi
callq 0x1e474
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x1e485
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1e48f
movq %r13, %rdi
callq 0x197ba
movq %r13, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x197e0
movq %r13, %rdi
movq %r12, %rsi
callq 0x197ea
leaq -0x180(%rbp), %rbx
movq %rbx, %rdi
callq 0x10952
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x10991
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1099b
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movq -0x30(%rbp), %rax
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/Sponge.c
// Function: squeeze
inline void squeeze(uint64_t *state, byte *out, unsigned int len) {
    int fullBlocks = len / BLOCK_LEN_BYTES;
    byte *ptr = out;
    int i;
    //Squeezes full blocks
    for (i = 0; i < fullBlocks; i++) {
	memcpy(ptr, state, BLOCK_LEN_BYTES);
	blake2bLyra(state);
	ptr += BLOCK_LEN_BYTES;
    }

    //Squeezes remaining bytes
    memcpy(ptr, state, (len % BLOCK_LEN_BYTES));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %eax
movq %rsi, %r14
movq %rdi, %rbx
pushq $0x60
popq %rcx
xorl %edx, %edx
divl %ecx
movl %eax, %r12d
movl %edx, %r15d
pushq $0x60
popq %r13
subl $0x1, %r12d
jb 0x1f55
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x10b0
movq %rbx, %rdi
callq 0x1f71
addq $0x60, %r14
jmp 0x1f33
movl %r15d, %edx
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/Sponge.c
// Function: reducedSqueezeRow0
inline void reducedSqueezeRow0(uint64_t* state, uint64_t* rowOut, uint64_t nCols) {
    uint64_t* ptrWord = rowOut + (nCols-1)*BLOCK_LEN_INT64; //In Lyra2: pointer to M[0][C-1]
    int i;
    //M[row][C-1-col] = H.reduced_squeeze()
    for (i = 0; i < nCols; i++) {
	ptrWord[0] = state[0];
	ptrWord[1] = state[1];
	ptrWord[2] = state[2];
	ptrWord[3] = state[3];
	ptrWord[4] = state[4];
	ptrWord[5] = state[5];
	ptrWord[6] = state[6];
	ptrWord[7] = state[7];
	ptrWord[8] = state[8];
	ptrWord[9] = state[9];
	ptrWord[10] = state[10];
	ptrWord[11] = state[11];

	//Goes to next block (column) that will receive the squeezed data
	ptrWord -= BLOCK_LEN_INT64;

	//Applies the reduced-round transformation f to the sponge's state
	reducedBlake2bLyra(state);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
imulq $0x60, %rdx, %rax
leaq (%rax,%rsi), %r15
addq $-0x8, %r15
subq $0x1, %rbx
jb 0x3284
movq (%r14), %rax
movq %rax, -0x58(%r15)
movq 0x8(%r14), %rax
movq %rax, -0x50(%r15)
movq 0x10(%r14), %rax
movq %rax, -0x48(%r15)
movq 0x18(%r14), %rax
movq %rax, -0x40(%r15)
movq 0x20(%r14), %rax
movq %rax, -0x38(%r15)
movq 0x28(%r14), %rax
movq %rax, -0x30(%r15)
movq 0x30(%r14), %rax
movq %rax, -0x28(%r15)
movq 0x38(%r14), %rax
movq %rax, -0x20(%r15)
movq 0x40(%r14), %rax
movq %rax, -0x18(%r15)
movq 0x48(%r14), %rax
movq %rax, -0x10(%r15)
movq 0x50(%r14), %rax
movq %rax, -0x8(%r15)
movq 0x58(%r14), %rax
movq %rax, (%r15)
movq %r14, %rdi
callq 0x328f
addq $-0x60, %r15
jmp 0x3212
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/Sponge.c
// Function: printArray
void printArray(unsigned char *array, unsigned int size, char *name) {
    int i;
    printf("%s: ", name);
    for (i = 0; i < size; i++) {
	printf("%2x|", array[i]);
    }
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x1b6b8(%rip), %rdi     # 0x1f076
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1070
movl %r14d, %r15d
leaq 0x1b6a9(%rip), %r14     # 0x1f07b
xorl %r12d, %r12d
cmpq %r12, %r15
je 0x39ee
movzbl (%rbx,%r12), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1070
incq %r12
jmp 0x39d5
pushq $0xa
popq %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1040
nop
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/bmw.c
// Function: bmw32
static void
bmw32(sph_bmw_small_context *sc, const void *data, size_t len)
{
	unsigned char *buf;
	size_t ptr;
	sph_u32 htmp[16];
	sph_u32 *h1, *h2;
#if !SPH_64
	sph_u32 tmp;
#endif

#if SPH_64
	sc->bit_count += (sph_u64)len << 3;
#else
	tmp = sc->bit_count_low;
	sc->bit_count_low = SPH_T32(tmp + ((sph_u32)len << 3));
	if (sc->bit_count_low < tmp)
		sc->bit_count_high ++;
	sc->bit_count_high += len >> 29;
#endif
	buf = sc->buf;
	ptr = sc->ptr;
	h1 = sc->H;
	h2 = htmp;
	while (len > 0) {
		size_t clen;

		clen = (sizeof sc->buf) - ptr;
		if (clen > len)
			clen = len;
		memcpy(buf + ptr, data, clen);
		data = (const unsigned char *)data + clen;
		len -= clen;
		ptr += clen;
		if (ptr == sizeof sc->buf) {
			sph_u32 *ht;

			compress_small(buf, h1, h2);
			ht = h1;
			h1 = h2;
			h2 = ht;
			ptr = 0;
		}
	}
	sc->ptr = ptr;
	if (h1 != sc->H)
		memcpy(sc->H, h1, sizeof sc->H);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
leaq (,%rdx,8), %rax
addq %rax, 0x88(%rdi)
movq 0x40(%rdi), %r13
leaq 0x48(%rdi), %rax
leaq -0x80(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq %rax, -0x30(%rbp)
testq %rbx, %rbx
je 0x107ab
pushq $0x40
popq %r12
subq %r13, %r12
cmpq %rbx, %r12
cmovaeq %rbx, %r12
leaq (%r14,%r13), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x10b0
addq %r12, %r15
subq %r12, %rbx
addq %r12, %r13
cmpq $0x40, %r13
jne 0x10757
movq %r14, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %r12
movq %r12, %rdx
callq 0x10cf8
xorl %r13d, %r13d
movq %r12, %rax
movq -0x30(%rbp), %rcx
movq %rcx, -0x38(%rbp)
jmp 0x10753
movq %r13, 0x40(%r14)
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq %rax, %rcx
je 0x107da
movups (%rcx), %xmm0
movups 0x10(%rcx), %xmm1
movups 0x20(%rcx), %xmm2
movups 0x30(%rcx), %xmm3
movups %xmm3, 0x30(%rax)
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/bmw.c
// Function: bmw32_close
static void
bmw32_close(sph_bmw_small_context *sc, unsigned ub, unsigned n,
	void *dst, size_t out_size_w32)
{
	unsigned char *buf, *out;
	size_t ptr, u, v;
	unsigned z;
	sph_u32 h1[16], h2[16], *h;

	buf = sc->buf;
	ptr = sc->ptr;
	z = 0x80 >> n;
	buf[ptr ++] = ((ub & -z) | z) & 0xFF;
	h = sc->H;
	if (ptr > (sizeof sc->buf) - 8) {
		memset(buf + ptr, 0, (sizeof sc->buf) - ptr);
		compress_small(buf, h, h1);
		ptr = 0;
		h = h1;
	}
	memset(buf + ptr, 0, (sizeof sc->buf) - 8 - ptr);
#if SPH_64
	sph_enc64le_aligned(buf + (sizeof sc->buf) - 8,
		SPH_T64(sc->bit_count + n));
#else
	sph_enc32le_aligned(buf + (sizeof sc->buf) - 8,
		sc->bit_count_low + n);
	sph_enc32le_aligned(buf + (sizeof sc->buf) - 4,
		SPH_T32(sc->bit_count_high));
#endif
	compress_small(buf, h, h2);
	for (u = 0; u < 16; u ++)
		sph_enc32le_aligned(buf + 4 * u, h2[u]);
	compress_small(buf, final_s, h1);
	out = dst;
	for (u = 0, v = 16 - out_size_w32; u < out_size_w32; u ++, v ++)
		sph_enc32le(out + 4 * u, h1[v]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %r8, %rbx
movq %rcx, %r14
movl %edx, %ecx
movq %rdi, %r15
movq 0x40(%rdi), %rax
movl $0x80, %edx
movl %ecx, -0x2c(%rbp)
shrl %cl, %edx
movl %edx, %ecx
negl %ecx
andl %esi, %ecx
orl %edx, %ecx
leaq 0x1(%rax), %rdi
movb %cl, (%r15,%rax)
leaq 0x48(%r15), %r13
cmpq $0x39, %rdi
jb 0x108ba
addq %r15, %rdi
pushq $0x3f
popq %rdx
subq %rax, %rdx
xorl %esi, %esi
callq 0x1080
leaq -0x70(%rbp), %r12
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10cf8
xorl %edi, %edi
movq %r12, %r13
leaq (%r15,%rdi), %rax
pushq $0x38
popq %rdx
subq %rdi, %rdx
xorl %r12d, %r12d
movq %rax, %rdi
xorl %esi, %esi
callq 0x1080
movl -0x2c(%rbp), %eax
addq 0x88(%r15), %rax
movq %rax, 0x38(%r15)
leaq -0xb0(%rbp), %rdx
movq %r15, %rdi
movq %r13, %rsi
callq 0x10cf8
cmpq $0x10, %r12
je 0x10908
movl -0xb0(%rbp,%r12,4), %eax
movl %eax, (%r15,%r12,4)
incq %r12
jmp 0x108f1
leaq 0x129b1(%rip), %rsi     # 0x232c0
leaq -0x70(%rbp), %rdx
movq %r15, %rdi
callq 0x10cf8
leaq (,%rbx,4), %rax
negq %rax
addq %rbp, %rax
addq $-0x30, %rax
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x10940
movl (%rax,%rcx,4), %edx
movl %edx, (%r14,%rcx,4)
incq %rcx
jmp 0x1092f
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/rb-de0[P]hashverifier-for-monacoin/Lyra2RE/bmw.c
// Function: bmw64
static void
bmw64(sph_bmw_big_context *sc, const void *data, size_t len)
{
	unsigned char *buf;
	size_t ptr;
	sph_u64 htmp[16];
	sph_u64 *h1, *h2;

	sc->bit_count += (sph_u64)len << 3;
	buf = sc->buf;
	ptr = sc->ptr;
	h1 = sc->H;
	h2 = htmp;
	while (len > 0) {
		size_t clen;

		clen = (sizeof sc->buf) - ptr;
		if (clen > len)
			clen = len;
		memcpy(buf + ptr, data, clen);
		data = (const unsigned char *)data + clen;
		len -= clen;
		ptr += clen;
		if (ptr == sizeof sc->buf) {
			sph_u64 *ht;

			compress_big(buf, h1, h2);
			ht = h1;
			h1 = h2;
			h2 = ht;
			ptr = 0;
		}
	}
	sc->ptr = ptr;
	if (h1 != sc->H)
		memcpy(sc->H, h1, sizeof sc->H);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r15
leaq (,%rdx,8), %rax
addq %rax, 0x108(%rdi)
movq 0x80(%rdi), %r13
leaq 0x88(%rdi), %rax
leaq -0xc0(%rbp), %rcx
movq %rcx, -0x38(%rbp)
movq %rax, -0x40(%rbp)
movq %rax, -0x30(%rbp)
testq %r14, %r14
je 0x10adf
movl $0x80, %ebx
subq %r13, %rbx
cmpq %r14, %rbx
cmovaeq %r14, %rbx
leaq (%r15,%r13), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x10b0
addq %rbx, %r12
subq %rbx, %r14
addq %rbx, %r13
movl $0x80, %eax
cmpq %rax, %r13
jne 0x10a86
movq %r15, %rdi
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rbx
movq %rbx, %rdx
callq 0x124b3
xorl %r13d, %r13d
movq %rbx, %rax
movq -0x30(%rbp), %rcx
movq %rcx, -0x38(%rbp)
jmp 0x10a82
movq %r13, 0x80(%r15)
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
cmpq %rdi, %rsi
je 0x10af9
pushq $0x10
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq