LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/vc.c
// Function: decisiontree_vc_dimension_discrete_recursive_old
double decisiontree_vc_dimension_discrete_recursive_old(int d, Decisionnodeptr rootnode)
{
 /*Last Changed 20.04.2008*/
 int N;
 double leftplusright;
 if (rootnode->featureno == LEAF_NODE)
   return 1;
 N = decisiontree_node_count(rootnode);
 leftplusright = decisiontree_vc_dimension_discrete_recursive_old(d - 1, &(rootnode->string[0])) + decisiontree_vc_dimension_discrete_recursive_old(d - 1, &(rootnode->string[1]));
 return 0.6076 + 1.0077 * leftplusright + 0.3657 * log2(d) - 0.8058 * log2(N);
}

// Assembly:
cmpl $-0x1, 0x30(%rsi)
je 0xa2fff
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %r14d
movq %rsi, %rdi
callq 0x1cce7
movl %eax, %ebx
leal -0x1(%r14), %ebp
movq 0x10(%r15), %rsi
movl %ebp, %edi
callq 0xa2f5d
movsd %xmm0, (%rsp)
movl $0x160, %esi            # imm = 0x160
addq 0x10(%r15), %rsi
movl %ebp, %edi
callq 0xa2f5d
addsd (%rsp), %xmm0
mulsd 0xf541(%rip), %xmm0     # 0xb24f0
addsd 0xf541(%rip), %xmm0     # 0xb24f8
movsd %xmm0, (%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
callq 0x39bdc
mulsd 0xf52f(%rip), %xmm0     # 0xb2500
addsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
callq 0x39bdc
mulsd 0xf519(%rip), %xmm0     # 0xb2508
addsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movsd 0x2519(%rip), %xmm0     # 0xa5520
retq
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/vc.c
// Function: decisiontree_vc_dimension_discrete_recursive
double decisiontree_vc_dimension_discrete_recursive(Datasetptr current_dataset, int d, Decisionnodeptr rootnode)
{
 int i, sum;
 BOOLEAN all_leaves = BOOLEAN_TRUE;
 if (rootnode->featureno == LEAF_NODE)
   return 1;
 for (i = 0; i < current_dataset->features[rootnode->featureno].valuecount; i++)
   if (rootnode->string[i].featureno != LEAF_NODE)
     all_leaves = BOOLEAN_FALSE;
 if (all_leaves)
  {
   sum = 1;
   for (i = 0; i < current_dataset->featurecount; i++)
     if (current_dataset->features[i].type != CLASSDEF)
       sum += pow(2, current_dataset->features[i].valuecount - 1) - 1; 
   return log2(sum) + 1;
  }
 sum = 0;
 for (i = 0; i < current_dataset->features[rootnode->featureno].valuecount; i++)
   sum += ((int) decisiontree_vc_dimension_discrete_recursive(current_dataset, d - 1, &(rootnode->string[i])));
 return sum;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x30(%rdx), %rax
cmpq $-0x1, %rax
je 0xa30de
movq %rdi, %rbx
imulq $0x340, %rax, %rax      # imm = 0x340
movslq 0x30f20(%rdi,%rax), %rax
testq %rax, %rax
jle 0xa3074
movq %rdx, %r14
leaq 0x30f08(%rbx), %rbp
movq 0x10(%rdx), %rcx
imulq $0x160, %rax, %r10      # imm = 0x160
movl $0x1, %edx
xorl %edi, %edi
xorl %r8d, %r8d
cmpl $-0x1, 0x30(%rcx,%r8)
cmovnel %edi, %edx
addq $0x160, %r8             # imm = 0x160
cmpq %r8, %r10
jne 0xa3057
testl %edx, %edx
je 0xa310c
movl 0x1bc(%rbx), %eax
testl %eax, %eax
jle 0xa30e8
leaq 0x30f20(%rbx), %r14
movl $0x1, %ebp
xorl %r15d, %r15d
cmpl $0x3, -0x18(%r14)
je 0xa30c3
movl (%r14), %edi
decl %edi
movsd 0x247f(%rip), %xmm0     # 0xa5520
callq 0x4080
addsd 0x2cfa(%rip), %xmm0     # 0xa5da8
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %ebp
movl 0x1bc(%rbx), %eax
incq %r15
movslq %eax, %rcx
addq $0x340, %r14            # imm = 0x340
cmpq %rcx, %r15
jl 0xa308d
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
jmp 0xa30f0
movsd 0x243a(%rip), %xmm0     # 0xa5520
jmp 0xa30fd
movsd 0x2430(%rip), %xmm0     # 0xa5520
callq 0x39bdc
addsd 0x2423(%rip), %xmm0     # 0xa5520
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %eax, %eax
jle 0xa3166
decl %esi
xorl %r12d, %r12d
xorl %r15d, %r15d
xorl %r13d, %r13d
movq %rbx, (%rsp)
movq 0x10(%r14), %rdx
addq %r12, %rdx
movq %rbx, %rdi
movl %esi, %ebx
callq 0xa3008
movl %ebx, %esi
movq (%rsp), %rbx
cvttsd2si %xmm0, %eax
addl %eax, %r13d
incq %r15
movslq 0x30(%r14), %rax
imulq $0x340, %rax, %rax      # imm = 0x340
movslq 0x18(%rbp,%rax), %rax
addq $0x160, %r12            # imm = 0x160
cmpq %rax, %r15
jl 0xa311f
xorps %xmm0, %xmm0
cvtsi2sd %r13d, %xmm0
jmp 0xa30fd
xorpd %xmm0, %xmm0
jmp 0xa30fd
// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/vc.c
// Function: decisiontree_vc_dimension_continuous_recursive
double decisiontree_vc_dimension_continuous_recursive(Datasetptr current_dataset, Decisionnodeptr rootnode)
{
 if (rootnode->featureno == LEAF_NODE)
   return 1;
 if (rootnode->left->featureno == LEAF_NODE && rootnode->right->featureno == LEAF_NODE)
   return log2(current_dataset->featurecount - 1) + 1;
 return decisiontree_vc_dimension_continuous_recursive(current_dataset, rootnode->left) + decisiontree_vc_dimension_continuous_recursive(current_dataset, rootnode->right);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $-0x1, 0x30(%rsi)
je 0xa31af
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rsi
cmpl $-0x1, 0x30(%rsi)
jne 0xa318f
movq 0x8(%r14), %rax
cmpl $-0x1, 0x30(%rax)
je 0xa31bf
movq %rbx, %rdi
callq 0xa316c
movsd %xmm0, (%rsp)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
callq 0xa316c
addsd (%rsp), %xmm0
jmp 0xa31b7
movsd 0x2369(%rip), %xmm0     # 0xa5520
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl 0x1bc(%rbx), %eax
decl %eax
cvtsi2sd %eax, %xmm0
callq 0x39bdc
addsd 0x2348(%rip), %xmm0     # 0xa5520
jmp 0xa31b7
// File: /workspace/github_c_makefile_star2_O3/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 0x150dd
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0xa3209
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
callq 0xa3008
jmp 0xa3231
movq 0x8(%r14), %rdi
callq 0x151e6
movl %eax, %ecx
movl 0x1bc(%r14), %edx
decl %edx
movl $0x1, %eax
cmpl %edx, %ecx
jne 0xa3235
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa316c
cvttsd2si %xmm0, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movl %esi, %ebp
movl 0x1c0(%rdi), %r14d
decl %r14d
cvtsi2sd %r14d, %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x39bdc
movapd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%rsp)
leaq 0xf3b6(%rip), %rsi      # 0xb2630
cmpl $0x2, %ebx
je 0xa3313
cmpl $0x1, %ebx
je 0xa32d6
testl %ebx, %ebx
jne 0xa3376
movl $0x18, %edi
movl $0xa, %edx
movsd %xmm1, 0x8(%rsp)
callq 0x3a0e1
movq %rax, %rbx
movsd 0x8(%rsp), %xmm2
movapd %xmm2, %xmm0
movsd (%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, (%rax)
movsd %xmm2, 0x8(%rax)
movsd %xmm1, 0x10(%rax)
movq %rax, %rdi
callq 0xa2b5c
jmp 0xa336f
movl $0x18, %edi
movl $0xa, %edx
callq 0x3a0e1
movq %rax, %rbx
movsd (%rsp), %xmm1
movapd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, (%rax)
movsd %xmm2, 0x8(%rax)
movsd %xmm1, 0x10(%rax)
movq %rax, %rdi
callq 0xa2bfd
jmp 0xa336f
movl $0x28, %edi
movl $0xa, %edx
callq 0x3a0e1
movq %rax, %rbx
movsd (%rsp), %xmm1
movapd %xmm1, %xmm0
movsd 0x8(%rsp), %xmm2
mulsd %xmm2, %xmm0
movsd %xmm0, 0x10(%rax)
movsd %xmm2, 0x18(%rax)
movsd %xmm1, 0x20(%rax)
imull %r14d, %r14d
imull %r14d, %ebp
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
movsd %xmm0, (%rax)
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd %xmm0, 0x8(%rax)
movq %rax, %rdi
callq 0xa2c9e
movsd %xmm0, (%rsp)
jmp 0xa339d
xorl %edi, %edi
movl $0xa, %edx
callq 0x3a0e1
movq %rax, %rbx
movabsq $0x7ff8000000000000, %rax # imm = 0x7FF8000000000000
movq %rax, -0x18(%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, -0x8(%rbx)
movq %rbx, %rdi
callq 0x3a180
cvttsd2si (%rsp), %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x9fc04
movq %rbx, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0xa323d
movl %eax, %ebp
movq %r14, %rdi
callq 0x4cf64
movq %rbx, %rdi
movl %eax, %esi
movl $0x1, %edx
callq 0xa323d
movl %eax, %r15d
addl %ebp, %r15d
movq %r14, %rdi
callq 0x4cfb3
movq %rbx, %rdi
movl %eax, %esi
movl $0x2, %edx
callq 0xa323d
addl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl %edx, 0x4(%rsp)
movq %rdi, %r14
cmpl $0x1, %esi
jne 0xa3464
movl (%r14), %esi
testl %esi, %esi
js 0xa356f
movl 0x4(%rsp), %edi
callq 0x39f7f
addsd 0x20d2(%rip), %xmm0     # 0xa5520
callq 0x39bdc
addsd 0x20c5(%rip), %xmm0     # 0xa5520
cvttsd2si %xmm0, %eax
jmp 0xa3574
movl %esi, %r15d
movq $0x0, 0x8(%rsp)
cmpl $0x2, %esi
jl 0xa3579
decl 0x4(%rsp)
movl %r15d, %ebx
leaq 0x4(%r14), %r12
decl %r15d
movq $0x0, 0x8(%rsp)
movl $0x1, %r13d
movq %rbx, 0x20(%rsp)
movl %r15d, %r15d
leaq (,%r13,4), %rdi
leaq 0xf1aa(%rip), %rsi      # 0xb2657
movl $0x8, %edx
callq 0x3a0e1
movq %rax, %rbp
xorl %eax, %eax
movl -0x4(%r14,%r13,4), %ecx
decl %ecx
movl %ecx, (%rbp,%rax,4)
incq %rax
cmpq %rax, %r13
jne 0xa34bc
subq %r13, %rbx
movq %rbx, 0x18(%rsp)
leaq (,%rbx,4), %rdi
leaq 0xf171(%rip), %rsi      # 0xb2657
movl $0xb, %edx
callq 0x3a0e1
movq %rax, %rbx
cmpq $0x0, 0x18(%rsp)
jle 0xa350e
xorl %eax, %eax
movl (%r12,%rax,4), %ecx
decl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq %rax, %r15
jne 0xa34fd
movq %rbp, %rdi
movl %r13d, %esi
movl 0x4(%rsp), %edx
callq 0xa3418
movl %eax, 0x14(%rsp)
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl 0x4(%rsp), %edx
callq 0xa3418
addl 0x14(%rsp), %eax
movq 0x8(%rsp), %rcx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movq %rcx, 0x8(%rsp)
movq %rbp, %rdi
callq 0x3a180
movq %rbx, %rdi
callq 0x3a180
incq %r13
addq $0x4, %r12
decl %r15d
movq 0x20(%rsp), %rbx
cmpq %rbx, %r13
jne 0xa349b
jmp 0xa3579
movl $0x1, %eax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xf0cf(%rip), %rsi      # 0xb267f
movl $0x6, %edx
callq 0x3a0e1
movq %rax, %r15
testq %r12, %r12
je 0xa35da
movq %r15, %rax
movl 0x28(%r12), %ecx
movl %ecx, (%rax)
movq 0x30(%r12), %r12
addq $0x4, %rax
testq %r12, %r12
jne 0xa35c5
decl %ebx
movl 0x10(%r14), %esi
movq %r15, %rdi
movl %ebx, %edx
callq 0xa3418
movl %eax, %ebx
movq %r15, %rdi
callq 0x3a180
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 %r14
pushq %rbx
movq (%rsi), %r14
testq %r14, %r14
je 0xa365b
movl 0x1bc(%rdi), %ebp
addl $-0x2, %ebp
xorl %ebx, %ebx
movl 0x28(%r14), %esi
movl $0x2, %eax
cmpl $0x2, %esi
jl 0xa364e
addl $-0x2, %esi
movl %ebp, %edi
callq 0x39f7f
movsd 0x1ee7(%rip), %xmm1     # 0xa5520
addsd %xmm1, %xmm0
callq 0x39bdc
addsd 0x1ed6(%rip), %xmm0     # 0xa5520
cvttsd2si %xmm0, %eax
addl %eax, %ebx
movq 0x30(%r14), %r14
testq %r14, %r14
jne 0xa3619
jmp 0xa365d
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x150dd
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0xa3696
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa358d
movq 0x8(%r14), %rdi
callq 0x151e6
movl 0x1bc(%r14), %ecx
decl %ecx
cmpl %ecx, %eax
jne 0xa36be
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xa3602
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x38bf7
testl %eax, %eax
je 0xa370d
leaq 0xefe1(%rip), %rsi      # 0xb26c4
movl $0x10, %edi
movl $0x2, %edx
callq 0x3a0e1
movq %rax, %r14
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x3b494
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
jmp 0xa3710
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa3758
btq %rcx, %r13
jb 0xa378b
testl %ebp, %ebp
sete %dl
cmpb $0x20, %al
sete %sil
testb %sil, %dl
jne 0xa378b
cmpb $0x3e, %al
ja 0xa3772
btq %rcx, %r12
jb 0xa378b
cmpl $0xff, %ecx
je 0xa378b
movb %al, (%rsp,%r15)
incq %r15
movq %r14, %rdi
callq 0x41c0
jmp 0xa374a
movl %r15d, %ecx
movb $0x0, (%rsp,%rcx)
movb %al, (%rbx)
movq %rsp, %rsi
xorl %edi, %edi
callq 0x3b494
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa37dd
movl $0x4, (%rbx)
movq %r14, %rdi
callq 0x41c0
movb %al, 0xf(%rsp)
jmp 0xa37e3
movl $0x0, (%rbx)
movsbl %al, %esi
leaq 0xf(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0xa371b
cmpb $0x3e, (%r15)
movl (%rbx), %ecx
jne 0xa380b
testl %ecx, %ecx
jne 0xa3825
movl $0x1, %ecx
jmp 0xa3823
cmpl $0x4, %ecx
jne 0xa3825
leaq 0xef1d(%rip), %rdi      # 0xb2734
callq 0x4090
movl $0x8, %ecx
xorl %eax, %eax
movl %ecx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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)
movl $0x5, %ebp
xorl %eax, %eax
cmpb $0x22, %cl
je 0xa3894
movzbl %cl, %edx
cmpl $0x27, %edx
je 0xa3894
movsbl %cl, %esi
leaq 0x7(%rsp), %r15
movq %r14, %rdi
movq %r15, %rdx
movl $0x1, %ecx
callq 0xa371b
movzbl (%r15), %ecx
cmpl $0x22, %ecx
je 0xa3894
cmpl $0x27, %ecx
je 0xa3894
leaq 0xee74(%rip), %rdi      # 0xb26fc
callq 0x4090
movl $0x8, %ebp
xorl %eax, %eax
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x3, %ecx
cmpb $0x3e, %al
je 0xa38c4
leaq 0xee7a(%rip), %rdi      # 0xb2734
callq 0x4090
movl $0x8, %ecx
movl %ecx, (%rbx)
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa38d8
cmpl $0xa000000, %ecx        # imm = 0xA000000
je 0xa38d8
cmpl $0x20000000, %ecx       # imm = 0x20000000
je 0xa38d8
movb %al, 0x7(%rsp)
sarl $0x18, %ecx
cmpl $0x2e, %ecx
jle 0xa3932
cmpl $0x3c, %ecx
jg 0xa3957
cmpl $0x2f, %ecx
je 0xa39a1
cmpl $0x3c, %ecx
jne 0xa3971
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa37ad
cmpl $-0x1, %ecx
je 0xa3969
cmpl $0x22, %ecx
je 0xa3941
cmpl $0x27, %ecx
jne 0xa3971
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0xa382f
cmpl $0x3d, %ecx
je 0xa39ae
cmpl $0x3e, %ecx
jne 0xa3971
movl $0x2, (%rbx)
jmp 0xa39b4
movl $0x8, (%rbx)
jmp 0xa39b4
movsbl %al, %esi
leaq 0x7(%rsp), %r12
movq %r14, %rdi
movq %r12, %rdx
movl $0x1, %ecx
callq 0xa371b
movq %rax, %r15
movl $0x7, (%rbx)
movsbl (%r12), %edi
movq %r14, %rsi
callq 0x4140
jmp 0xa39b7
movq %r14, %rdi
movq %rbx, %rsi
callq 0xa38a1
jmp 0xa39b4
movl $0x6, (%rbx)
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xecf5(%rip), %rsi      # 0xb26d1
movl $0x30, %edi
movl $0x2, %edx
callq 0x3a0e1
movq %rax, %r14
testl %ebp, %ebp
je 0xa39fb
xorl %eax, %eax
callq 0x1bccb
jmp 0xa39fd
xorl %eax, %eax
movq %rax, 0x10(%r14)
movq %r15, 0x18(%r14)
movq $0x0, 0x8(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r14)
movq (%r14), %rdi
movq %rbx, %rsi
callq 0x3b494
movq %rax, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0xa3a8b
pushq %r15
pushq %r14
pushq %rbx
movq (%rax), %r15
testq %r15, %r15
je 0xa3a86
movq %rdx, %rbx
movq %rsi, %r14
movq (%r15), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x3b3a8
testl %eax, %eax
je 0xa3a6a
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xa3a4d
jmp 0xa3a86
movq (%r15), %r14
movq 0x8(%r14), %rdi
callq 0x3a180
movq 0x8(%r14), %rdi
movq %rbx, %rsi
callq 0x3b494
movq %rax, 0x8(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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), %rax
testq %rax, %rax
je 0xa3ac4
movq (%rax), %r15
testq %r15, %r15
je 0xa3ac4
movq %rsi, %r14
xorl %ebx, %ebx
movq (%r15), %rax
movq (%rax), %rsi
movq %r14, %rdi
callq 0x3b3a8
testl %eax, %eax
je 0xa3ac8
movq 0x8(%r15), %r15
testq %r15, %r15
jne 0xa3aa7
jmp 0xa3acf
xorl %ebx, %ebx
jmp 0xa3acf
movq (%r15), %rax
movq 0x8(%rax), %rbx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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), %ebp
leaq 0xebbb(%rip), %r12      # 0xb26e9
testl %ebx, %ebx
jle 0xa3b47
movl %ebx, %r13d
movl $0x9, %edi
movq %r15, %rsi
callq 0x4150
decl %r13d
jne 0xa3b35
movl $0x3c, %edi
movq %r15, %rsi
callq 0x4150
movq (%r14), %rdi
movq %r15, %rsi
callq 0x41f0
movq 0x10(%r14), %rax
testq %rax, %rax
je 0xa3b8e
movq (%rax), %r13
testq %r13, %r13
je 0xa3b8e
movq (%r13), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rcx
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x42e0
movq 0x8(%r13), %r13
jmp 0xa3b6b
cmpq $0x0, 0x20(%r14)
je 0xa3beb
movl $0x2, %esi
movl $0x1, %edx
leaq 0xd3fb(%rip), %rdi      # 0xb0fa1
movq %r15, %rcx
callq 0x42c0
movq 0x20(%r14), %rsi
movq %r15, %rdi
movl %ebp, %edx
callq 0xa3b11
testl %ebx, %ebx
jle 0xa3bd5
movl %ebx, %r13d
movl $0x9, %edi
movq %r15, %rsi
callq 0x4150
decl %r13d
jne 0xa3bc3
movq (%r14), %rdx
movq %r15, %rdi
leaq 0xeb13(%rip), %rsi      # 0xb26f5
xorl %eax, %eax
callq 0x42e0
jmp 0xa3c23
movq 0x8(%r14), %rdx
testq %rdx, %rdx
je 0xa3c0a
movq (%r14), %rcx
movq %r15, %rdi
leaq 0xeaf1(%rip), %rsi      # 0xb26f2
xorl %eax, %eax
callq 0x42e0
jmp 0xa3c23
movl $0x3, %esi
movl $0x1, %edx
leaq 0xd2eb(%rip), %rdi      # 0xb0f06
movq %r15, %rcx
callq 0x42c0
movq 0x28(%r14), %r14
testq %r14, %r14
jne 0xa3b2e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x20(%rdi), %r15
testq %r15, %r15
je 0xa3ccb
movq %rdx, %rbx
movq %rsi, %r14
xorl %ebp, %ebp
movq %r15, %rdi
movq %r14, %rsi
callq 0xa3a8c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3b3a8
cmpl $0x1, %eax
adcl $0x0, %ebp
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0xa3ca4
jmp 0xa3ccd
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0xa3d88
leaq -0x32(%rip), %rsi       # 0xa3d51
callq 0x1be40
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0xa3d96
callq 0x3a180
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0xa3da4
callq 0xa3d6f
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0xa3db2
callq 0xa3d6f
movq (%rbx), %rdi
callq 0x3a180
movq %rbx, %rdi
popq %rbx
jmp 0x3a180
// File: /workspace/github_c_makefile_star2_O3/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 0x1a3d5
movl $0x20, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a3f9
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1a403
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_O3/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 0xda03
movl $0x20, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xda30
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xda3a
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_O3/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 0x1c883
movl $0x20, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c8eb
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c8fa
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_O3/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 0x1f36c
movl $0x20, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f3f2
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x1f3fc
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_O3/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 0x1134c
movl $0x20, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1138b
leaq -0x40(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x11395
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_O3/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 0x165f
movq 0x8(%rsi), %rbx
cmpl $0x2, %edi
jne 0x1610
leaq 0x1ea88(%rip), %r14     # 0x20046
xorl %r15d, %r15d
leaq (%r15,%rbp), %rdx
addq $-0x40, %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x10d0
addq $0x2, %rbx
incq %r15
cmpq $0x20, %r15
jne 0x15c1
xorl %r15d, %r15d
leaq 0x26aa3(%rip), %r12     # 0x28090
leaq -0x40(%rbp), %rbx
leaq -0x60(%rbp), %r14
movq (%r15,%r12), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x13d6
addq $0x8, %r15
cmpq $0x30, %r15
jne 0x15f5
jmp 0x1650
movq 0x10(%rsi), %r14
leaq 0x1ea2b(%rip), %r15     # 0x20046
xorl %r12d, %r12d
leaq (%r12,%rbp), %rdx
addq $-0x40, %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10d0
addq $0x2, %r14
incq %r12
cmpq $0x20, %r12
jne 0x161e
leaq -0x40(%rbp), %rsi
leaq -0x60(%rbp), %rdx
movq %rbx, %rdi
callq 0x13d6
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1e9fb(%rip), %rdi     # 0x20061
callq 0x1050
movl $0x1, %edi
callq 0x10e0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x350, %rsp            # imm = 0x350
movq %rsi, %rbx
movq %rdi, %r14
leaq -0xe0(%rbp), %r15
movq %r15, %rdi
callq 0xda03
movl $0x50, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xda30
leaq -0x60(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xda3a
leaq -0x368(%rbp), %r12
movq %r12, %rdi
callq 0x1c883
movl $0x20, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1c8eb
leaq -0x40(%rbp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x1c8fa
subq $0x8, %rsp
movl $0x8, %eax
movl $0x20, %esi
movl $0x20, %ecx
movl $0x20, %r9d
movq %r14, %rdi
movq %r15, %rdx
movq %r15, %r8
pushq %rax
pushq %rax
pushq $0x1
callq 0x1bfa
addq $0x20, %rsp
leaq -0x170(%rbp), %r12
movq %r12, %rdi
callq 0x1f36c
movl $0x20, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1f3f2
movq %r12, %rdi
movq %r15, %rsi
callq 0x1f3fc
leaq -0x200(%rbp), %r12
movq %r12, %rdi
callq 0x6063
movl $0x20, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x6098
movq %r12, %rdi
movq %r14, %rsi
callq 0x60a2
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x350, %rsp            # imm = 0x350
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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, %rbx
movq %rdi, %r14
leaq -0xf0(%rbp), %r15
movq %r15, %rdi
callq 0xda03
movl $0x50, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0xda30
leaq -0x70(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0xda3a
leaq -0x420(%rbp), %r12
movq %r12, %rdi
callq 0x1c883
movl $0x20, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1c8eb
leaq -0x50(%rbp), %r15
movq %r12, %rdi
movq %r15, %rsi
callq 0x1c8fa
leaq -0x2b8(%rbp), %r12
movq %r12, %rdi
callq 0x1a3d5
movl $0x20, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1a3f9
movq %r12, %rdi
movq %r14, %rsi
callq 0x1a403
subq $0x8, %rsp
movl $0x4, %eax
movl $0x20, %esi
movl $0x20, %ecx
movl $0x20, %r9d
movq %r15, %rdi
movq %r14, %rdx
movq %r14, %r8
pushq %rax
pushq %rax
pushq $0x1
callq 0x18f8
addq $0x20, %rsp
leaq -0x210(%rbp), %r13
movq %r13, %rdi
callq 0x1f36c
movl $0x20, %edx
movq %r13, %rdi
movq %r15, %rsi
callq 0x1f3f2
movq %r13, %rdi
movq %r14, %rsi
callq 0x1f3fc
movq %r12, %rdi
callq 0x1a3d5
movl $0x20, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0x1a3f9
movq %r12, %rdi
movq %r15, %rsi
callq 0x1a403
leaq -0x180(%rbp), %r12
movq %r12, %rdi
callq 0x1134c
movl $0x20, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1138b
movq %r12, %rdi
movq %r14, %rsi
callq 0x11395
movaps (%r14), %xmm0
movaps 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
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_O3/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 %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl %edx, %eax
movl $0xaaaaaaab, %r15d      # imm = 0xAAAAAAAB
imulq %rax, %r15
shrq $0x26, %r15
movl %r15d, %eax
shll $0x5, %eax
leal (%rax,%rax,2), %eax
movl %edx, %r12d
subl %eax, %r12d
cmpl $0x60, %edx
jb 0x1fde
movl $0x60, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10b0
movq %rbx, %rdi
callq 0x1ff4
addq $0x60, %r14
decl %r15d
jne 0x1fbd
movl %r12d, %edx
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rdx, %rdx
je 0x331b
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rdi, %r14
leaq (%rdx,%rdx,2), %rax
shlq $0x5, %rax
leaq (%rax,%rsi), %r15
addq $-0x8, %r15
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 0x331c
addq $-0x60, %r15
decq %rbx
jne 0x32a2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x1c61a(%rip), %rdi     # 0x20076
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1070
testl %r14d, %r14d
je 0x3a8f
movl %r14d, %r15d
leaq 0x1c606(%rip), %r14     # 0x2007b
xorl %r12d, %r12d
movzbl (%rbx,%r12), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1070
incq %r12
cmpq %r12, %r15
jne 0x3a78
movl $0xa, %edi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1040
nopl (%rax)