LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__xformMultiply(double*, double*)
static void nsvg__xformMultiply(double* t, double* s)
{
	double t0 = t[0] * s[0] + t[1] * s[2];
	double t2 = t[2] * s[0] + t[3] * s[2];
	double t4 = t[4] * s[0] + t[5] * s[2] + s[4];
	t[1] = t[0] * s[1] + t[1] * s[3];
	t[3] = t[2] * s[1] + t[3] * s[3];
	t[5] = t[4] * s[1] + t[5] * s[3] + s[5];
	t[0] = t0;
	t[2] = t2;
	t[4] = t4;
}

// Assembly:
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm3
movsd 0x10(%rdi), %xmm4
movsd 0x18(%rdi), %xmm6
movsd 0x18(%rsi), %xmm1
mulsd %xmm3, %xmm1
movsd 0x8(%rsi), %xmm5
mulsd %xmm0, %xmm5
addsd %xmm1, %xmm5
movsd (%rsi), %xmm1
movsd 0x10(%rsi), %xmm2
mulsd %xmm2, %xmm3
mulsd %xmm1, %xmm0
addsd %xmm3, %xmm0
movapd %xmm2, %xmm7
mulsd %xmm6, %xmm7
movsd 0x20(%rsi), %xmm3
movsd %xmm5, 0x8(%rdi)
movapd %xmm4, %xmm5
mulsd %xmm1, %xmm5
mulsd 0x18(%rsi), %xmm6
mulsd 0x8(%rsi), %xmm4
addsd %xmm7, %xmm5
addsd %xmm6, %xmm4
movsd %xmm4, 0x18(%rdi)
movsd 0x28(%rdi), %xmm4
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
movhpd 0x18(%rsi), %xmm2       # xmm2 = xmm2[0],mem[0]
mulpd %xmm4, %xmm2
movsd 0x20(%rdi), %xmm4
unpcklpd %xmm4, %xmm4            # xmm4 = xmm4[0,0]
movhpd 0x8(%rsi), %xmm1        # xmm1 = xmm1[0],mem[0]
mulpd %xmm4, %xmm1
addpd %xmm2, %xmm1
movhpd 0x28(%rsi), %xmm3       # xmm3 = xmm3[0],mem[0]
addpd %xmm1, %xmm3
movsd %xmm0, (%rdi)
movsd %xmm5, 0x10(%rdi)
movupd %xmm3, 0x20(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__parseTransformArgs(char const*, double*, int, int*)
static int nsvg__parseTransformArgs(const char* str, double* args, int maxNa, int* na)
{
	const char* end;
	const char* ptr;
	char it[64];

	*na = 0;
	ptr = str;
	while (*ptr && *ptr != '(') ++ptr;
	if (*ptr == 0)
		return 1;
	end = ptr;
	while (*end && *end != ')') ++end;
	if (*end == 0)
		return 1;

	while (ptr < end) {
		if (*ptr == '-' || *ptr == '+' || *ptr == '.' || nsvg__isdigit(*ptr)) {
			if (*na >= maxNa) return 0;
			ptr = nsvg__parseNumber(ptr, it, 64);
			args[(*na)++] = nsvg__atof(it);
		} else {
			++ptr;
		}
	}
	return (int)(end - str);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %r15d
movq %rdi, %r12
andl $0x0, (%rcx)
xorl %ebx, %ebx
movzbl (%r12,%rbx), %eax
testl %eax, %eax
je 0x31b71
cmpl $0x28, %eax
je 0x31b57
incq %rbx
jmp 0x31b44
leaq (%r12,%rbx), %r13
testb %al, %al
je 0x31b71
movzbl %al, %eax
cmpl $0x29, %eax
je 0x31b85
movb 0x1(%r12,%rbx), %al
incq %rbx
jmp 0x31b5b
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq %rbx, %r12
xorl %eax, %eax
movabsq $0x680000000000, %rbp   # imm = 0x680000000000
movq %rsi, 0x8(%rsp)
cmpq %r12, %r13
jae 0x31b74
movzbl (%r13), %edi
cmpq $0x2e, %rdi
ja 0x31baf
btq %rdi, %rbp
jb 0x31bbe
addb $-0x3a, %dil
cmpb $-0xa, %dil
jae 0x31bbe
incq %r13
jmp 0x31b99
cmpl %r15d, %eax
jge 0x31bf8
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
movq %rcx, %r14
callq 0x31bff
movq %rax, %r13
leaq 0x10(%rsp), %rdi
callq 0x31892
movq %r14, %rcx
movq 0x8(%rsp), %rsi
movslq (%r14), %rdi
leal 0x1(%rdi), %eax
movl %eax, (%r14)
movsd %xmm0, (%rsi,%rdi,8)
jmp 0x31b99
xorl %ebx, %ebx
jmp 0x31b74
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__parseNumber(char const*, char*, int)
static const char* nsvg__parseNumber(const char* s, char* it, const int size)
{
	const int last = size-1;
	int i = 0;

	// sign
	if (*s == '-' || *s == '+') {
		if (i < last) it[i++] = *s;
		s++;
	}
	// integer part
	while (*s && nsvg__isdigit(*s)) {
		if (i < last) it[i++] = *s;
		s++;
	}
	if (*s == '.') {
		// decimal point
		if (i < last) it[i++] = *s;
		s++;
		// fraction part
		while (*s && nsvg__isdigit(*s)) {
			if (i < last) it[i++] = *s;
			s++;
		}
	}
	// exponent
	if (*s == 'e' || *s == 'E') {
		if (i < last) it[i++] = *s;
		s++;
		if (*s == '-' || *s == '+') {
			if (i < last) it[i++] = *s;
			s++;
		}
		while (*s && nsvg__isdigit(*s)) {
			if (i < last) it[i++] = *s;
			s++;
		}
	}
	it[i] = '\0';

	return s;
}

// Assembly:
movq %rdi, %rax
movzbl (%rdi), %edx
cmpl $0x2d, %edx
je 0x31c11
xorl %ecx, %ecx
cmpl $0x2b, %edx
jne 0x31c19
movb %dl, (%rsi)
incq %rax
pushq $0x1
popq %rcx
movb (%rax), %dl
testb %dl, %dl
je 0x31cc7
leal -0x3a(%rdx), %edi
cmpb $-0xa, %dil
jb 0x31c3e
cmpl $0x3e, %ecx
jg 0x31c39
movslq %ecx, %rdi
incl %ecx
movb %dl, (%rsi,%rdi)
incq %rax
jmp 0x31c19
cmpb $0x2e, %dl
jne 0x31c71
movb $0x2e, %dl
cmpl $0x3e, %ecx
jg 0x31c52
movslq %ecx, %rdi
incl %ecx
movb %dl, (%rsi,%rdi)
incq %rax
movb (%rax), %dl
testb %dl, %dl
je 0x31cc7
leal -0x3a(%rdx), %edi
cmpb $-0xa, %dil
jb 0x31c71
incq %rax
cmpl $0x3e, %ecx
jg 0x31c55
decq %rax
jmp 0x31c4a
movzbl %dl, %edi
orl $0x20, %edi
cmpl $0x65, %edi
jne 0x31cc7
cmpl $0x3e, %ecx
jg 0x31c89
movslq %ecx, %rdi
incl %ecx
movb %dl, (%rsi,%rdi)
movzbl 0x1(%rax), %edx
cmpl $0x2d, %edx
je 0x31c97
cmpl $0x2b, %edx
jne 0x31caa
cmpl $0x3e, %ecx
jg 0x31ca4
movslq %ecx, %rdi
incl %ecx
movb %dl, (%rsi,%rdi)
addq $0x2, %rax
jmp 0x31cad
incq %rax
movb (%rax), %dl
leal -0x3a(%rdx), %edi
cmpb $-0xa, %dil
jb 0x31cc7
cmpl $0x3e, %ecx
jg 0x31caa
movslq %ecx, %rdi
incl %ecx
movb %dl, (%rsi,%rdi)
jmp 0x31caa
movslq %ecx, %rcx
movb $0x0, (%rsi,%rcx)
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__getNextPathItem(char const*, char*)
static const char* nsvg__getNextPathItem(const char* s, char* it)
{
	it[0] = '\0';
	// Skip white spaces and commas
	while (*s && (nsvg__isspace(*s) || *s == ',')) s++;
	if (!*s) return s;
	if (*s == '-' || *s == '+' || *s == '.' || nsvg__isdigit(*s)) {
		s = nsvg__parseNumber(s, it, 64);
	} else {
		// Parse command
		it[0] = *s++;
		it[1] = '\0';
		return s;
	}

	return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rsi)
movzbl (%rbx), %r15d
testl %r15d, %r15d
je 0x31d66
movsbl %r15b, %ebp
movl %ebp, %edi
callq 0x30174
cmpb $0x2c, %bpl
je 0x31d20
testl %eax, %eax
je 0x31d25
incq %rbx
jmp 0x31d02
cmpl $0x2e, %r15d
ja 0x31d53
movl %r15d, %eax
movabsq $0x680000000000, %rcx   # imm = 0x680000000000
btq %rax, %rcx
jae 0x31d53
movq %rbx, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31bff
leal -0x3a(%r15), %eax
cmpb $-0xa, %al
jae 0x31d3e
incq %rbx
movb %r15b, (%r14)
movb $0x0, 0x1(%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__moveTo(NSVGparser*, double, double)
static void nsvg__moveTo(NSVGparser* p, double x, double y)
{
	if (p->nElts > 0)
	{
        fprintf(stderr, "nsvg__moveTo called with a non empty path !\n");
	}
	else
	{
        p->StartX = x;
        p->StartY = y;
	}
}

// Assembly:
cmpl $0x0, 0xd028(%rdi)
jg 0x320f0
movsd %xmm0, 0xd018(%rdi)
movsd %xmm1, 0xd020(%rdi)
retq
movq 0x1aea9(%rip), %rax     # 0x4cfa0
movq (%rax), %rcx
leaq 0x5dd7(%rip), %rdi      # 0x37ed8
pushq $0x2c
popq %rsi
pushq $0x1
popq %rdx
jmp 0x8820
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__deletePathElts(NSVGPathElt*)
static void nsvg__deletePathElts(NSVGPathElt* Elt)
{
	while (Elt) {
		NSVGPathElt *next = Elt->next;
		free(Elt);
		Elt = next;
	}
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x32470
movq 0x38(%rdi), %rbx
callq 0x8530
movq %rbx, %rdi
jmp 0x3245d
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__addElt(NSVGparser*, int, double, double, double, double, double, double)
static void nsvg__addElt(NSVGparser *p, int Type, double x, double y, double bz1_x, double bz1_y, double bz2_x, double bz2_y)
{
    NSVGPathElt *cElt = (NSVGPathElt *)malloc(sizeof(NSVGPathElt));
    if ( cElt == NULL )
    {
        fprintf(stderr, "No more memory, nsvg__addElt\n");
        return;
    }
    cElt->Type = Type;
    cElt->next = NULL;
    cElt->EndX = x;
    cElt->EndY = y;
    cElt->BzCtrl1X = bz1_x;
    cElt->BzCtrl1Y = bz1_y;
    cElt->BzCtrl2X = bz2_x;
    cElt->BzCtrl2Y = bz2_y;
    if ( p->FirstElt == NULL )
        p->FirstElt = cElt;
    else
        p->LastElt->next = cElt;
    p->nElts++;
    p->LastElt = cElt;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x38, %rsp
movsd %xmm5, 0x30(%rsp)
movsd %xmm4, 0x28(%rsp)
movsd %xmm3, 0x20(%rsp)
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movl %esi, %ebp
movq %rdi, %rbx
pushq $0x40
popq %rdi
callq 0x85b0
testq %rax, %rax
je 0x3253c
movl %ebp, (%rax)
andq $0x0, 0x38(%rax)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x18(%rax)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x20(%rax)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x28(%rax)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x30(%rax)
cmpq $0x0, 0xd008(%rbx)
je 0x3251e
movq 0xd010(%rbx), %rcx
addq $0x38, %rcx
jmp 0x32525
leaq 0xd008(%rbx), %rcx
movq %rax, (%rcx)
incl 0xd028(%rbx)
movq %rax, 0xd010(%rbx)
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
movq 0x1aa5d(%rip), %rax     # 0x4cfa0
movq (%rax), %rcx
leaq 0x596d(%rip), %rdi      # 0x37eba
pushq $0x1d
popq %rsi
pushq $0x1
popq %rdx
addq $0x38, %rsp
popq %rbx
popq %rbp
jmp 0x8820
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__vecang(double, double, double, double)
static double nsvg__vecang(double ux, double uy, double vx, double vy)
{
	double r = nsvg__vecrat(ux,uy, vx,vy);
	if (r < -1.0) r = -1.0;
	if (r > 1.0) r = 1.0;
	return ((ux*vy < uy*vx) ? -1.0 : 1.0) * acos(r);
}

// Assembly:
subq $0x28, %rsp
movapd %xmm1, %xmm4
mulsd %xmm3, %xmm4
movapd %xmm0, %xmm5
mulsd %xmm2, %xmm5
addsd %xmm4, %xmm5
movapd %xmm1, %xmm6
unpcklpd %xmm3, %xmm6            # xmm6 = xmm6[0],xmm3[0]
mulpd %xmm6, %xmm6
movapd %xmm0, %xmm4
movapd %xmm0, %xmm7
unpcklpd %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
mulpd %xmm4, %xmm4
addpd %xmm6, %xmm4
sqrtpd %xmm4, %xmm0
movapd %xmm0, %xmm4
unpckhpd %xmm0, %xmm4            # xmm4 = xmm4[1],xmm0[1]
mulsd %xmm0, %xmm4
divsd %xmm4, %xmm5
movsd 0x3bce(%rip), %xmm4     # 0x361a0
maxsd %xmm5, %xmm4
movsd 0x1a2a(%rip), %xmm0     # 0x34008
minsd %xmm4, %xmm0
mulsd %xmm3, %xmm7
movapd %xmm7, 0x10(%rsp)
mulsd %xmm2, %xmm1
movapd %xmm1, (%rsp)
callq 0x8400
movapd 0x3abe(%rip), %xmm1     # 0x360c0
xorpd %xmm0, %xmm1
movapd 0x10(%rsp), %xmm3
cmpltsd (%rsp), %xmm3
movapd %xmm3, %xmm2
andnpd %xmm0, %xmm2
andpd %xmm1, %xmm3
orpd %xmm2, %xmm3
movapd %xmm3, %xmm0
addq $0x28, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__xformInverse(double*, double*)
static void nsvg__xformInverse(double* inv, double* t)
{
	double invdet, det = t[0] * t[3] - t[2] * t[1];
	if (det > -1e-6 && det < 1e-6) {
		nsvg__xformIdentity(t);
		return;
	}
	invdet = 1.0 / det;
	inv[0] = (t[3] * invdet);
	inv[2] = (-t[2] * invdet);
	inv[4] = ((t[2] * t[5] - t[3] * t[4]) * invdet);
	inv[1] = -t[1] * invdet;
	inv[3] = (t[0] * invdet);
	inv[5] = ((t[1] * t[4] - t[0] * t[5]) * invdet);
}

// Assembly:
movsd 0x8(%rsi), %xmm0
movsd 0x18(%rsi), %xmm1
mulsd 0x10(%rsi), %xmm0
movsd (%rsi), %xmm2
mulsd %xmm1, %xmm2
subsd %xmm0, %xmm2
movapd 0x35d9(%rip), %xmm0     # 0x36030
andpd %xmm2, %xmm0
movsd 0x3765(%rip), %xmm3     # 0x361c8
ucomisd %xmm0, %xmm3
jbe 0x32a8c
leaq 0x8(%rsi), %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, (%rsi)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq %rcx, 0x18(%rsi)
movupd %xmm0, 0x20(%rsi)
retq
movsd 0x1574(%rip), %xmm0     # 0x34008
divsd %xmm2, %xmm0
mulsd %xmm0, %xmm1
movsd %xmm1, (%rdi)
movsd 0x10(%rsi), %xmm1
movapd 0x3613(%rip), %xmm2     # 0x360c0
xorpd %xmm2, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rdi)
movsd 0x10(%rsi), %xmm1
movsd 0x20(%rsi), %xmm3
mulsd 0x18(%rsi), %xmm3
mulsd 0x28(%rsi), %xmm1
subsd %xmm3, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x20(%rdi)
movsd 0x8(%rsi), %xmm1
xorpd %xmm2, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rdi)
movsd (%rsi), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x18(%rdi)
movsd 0x8(%rsi), %xmm1
movsd 0x28(%rsi), %xmm2
mulsd (%rsi), %xmm2
mulsd 0x20(%rsi), %xmm1
subsd %xmm2, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, 0x28(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/nanosvg.h
// Function: nsvg__findGradientData(NSVGparser*, char const*)
static NSVGgradientData* nsvg__findGradientData(NSVGparser* p, const char* id)
{
	NSVGgradientData* grad = p->gradients;
	while (grad) {
		if (strcmp(grad->id, id) == 0)
			return grad;
		grad = grad->next;
	}
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0xd040, %rbx           # imm = 0xD040
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x33057
movq %rbx, %rdi
movq %r14, %rsi
callq 0x85d0
testl %eax, %eax
je 0x33057
addq $0x120, %rbx            # imm = 0x120
jmp 0x33037
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/Geometry.h
// Function: Point::Transform(double, Point, Point)
inline void Transform(double angle, Point Centre, Point Translation)
	{
        double cos_a = cos(angle);
        double sin_a = sin(angle);
        double newx = (x - Centre.x)*cos_a - (y-Centre.y)*sin_a + Centre.x + Translation.x;
        double newy = (x - Centre.x)*sin_a + (y-Centre.y)*cos_a + Centre.y + Translation.y;
        newx = round(newx/my_Default_Precision)*my_Default_Precision;
        newy = round(newy/my_Default_Precision)*my_Default_Precision;
        x = newx;
        y = newy;
	}

// Assembly:
pushq %rbx
subq $0x60, %rsp
movaps %xmm4, (%rsp)
movaps %xmm3, 0x10(%rsp)
movaps %xmm2, 0x50(%rsp)
movaps %xmm1, 0x40(%rsp)
movsd %xmm0, 0x28(%rsp)
movq %rdi, %rbx
callq 0x87d0
movaps %xmm0, 0x30(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x80e0
movsd (%rbx), %xmm1
movsd 0x8(%rbx), %xmm2
movapd 0x40(%rsp), %xmm6
subsd %xmm6, %xmm1
movapd 0x50(%rsp), %xmm5
subsd %xmm5, %xmm2
movapd 0x3003(%rip), %xmm3     # 0x360c0
xorpd %xmm2, %xmm3
movapd %xmm0, %xmm4
movapd 0x30(%rsp), %xmm7
unpcklpd %xmm7, %xmm4            # xmm4 = xmm4[0],xmm7[0]
unpcklpd %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0]
mulpd %xmm4, %xmm3
unpcklpd %xmm1, %xmm1            # xmm1 = xmm1[0,0]
movapd %xmm7, %xmm2
unpcklpd %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd %xmm1, %xmm2
addpd %xmm3, %xmm2
movapd %xmm6, %xmm0
unpcklpd %xmm5, %xmm0            # xmm0 = xmm0[0],xmm5[0]
addpd %xmm2, %xmm0
movapd %xmm0, %xmm1
movapd 0x10(%rsp), %xmm0
unpcklpd (%rsp), %xmm0           # xmm0 = xmm0[0],mem[0]
addpd %xmm1, %xmm0
divpd 0x306e(%rip), %xmm0     # 0x36180
movapd %xmm0, 0x10(%rsp)
callq 0x81a0
movapd %xmm0, (%rsp)
movapd 0x10(%rsp), %xmm0
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
callq 0x81a0
movapd (%rsp), %xmm1
unpcklpd %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0]
mulpd 0x303e(%rip), %xmm1     # 0x36180
movupd %xmm1, (%rbx)
addq $0x60, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/include/Geometry.h
// Function: operator<<(std::ostream&, Polygon const&)
ostream& operator<<(ostream& output,const Polygon& Poly)
        {
            output<<"Polygon with " << Poly.nVertices << " vertices : " ;
            output << Poly._Vertices[0];
            for ( int i = 1; i < Poly.nVertices; i++ )
                output << ", " << Poly._Vertices[i];
            output << '\n';
            return output;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x4c4f(%rip), %rsi      # 0x37f73
callq 0x8420
movl 0x8(%r14), %esi
movq %rax, %rdi
callq 0x8740
leaq 0x4c45(%rip), %rsi      # 0x37f81
movq %rax, %rdi
callq 0x8420
movq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x333fd
pushq $0x1
popq %r12
pushq $0x10
popq %r13
leaq 0x4c2f(%rip), %r15      # 0x37f8e
movslq 0x8(%r14), %rax
cmpq %rax, %r12
jge 0x3338b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8420
movq 0x10(%r14), %rsi
addq %r13, %rsi
movq %rax, %rdi
callq 0x333fd
incq %r12
addq $0x10, %r13
jmp 0x3335f
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x8510
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/counterpoint.cpp
// Function: Counterpoint::analyse_and_add_interval(bool, bool, std::vector<Interval, std::allocator<Interval>>&, Note, Note, Interval, Song*)
void Counterpoint::analyse_and_add_interval(bool reverse_movement, bool melodic_ascendant, vector<Interval> & possible_intervals, Note previous_counterpoint_note, Note note, Interval interval, Song *){
  Note next_note = Scale::interval_to_note_on_scale(note, interval, song->scale);
  if(!next_note.valid){
    return;
  }
  Interval melodic_interval(previous_counterpoint_note, next_note);
  bool can_jump = (reverse_movement or melodic_interval.quantitative <= 4 or melodic_interval.quantitative == 8);
  if((can_jump and (melodic_ascendant == melodic_interval.ascendant()) and note.valid) or previous_counterpoint_note.rest())
    possible_intervals.push_back(interval);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
movq %r9, %r14
movq %r8, %r13
movq %rcx, %r12
movq %rdx, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movl %edi, %r15d
leaq 0x180(%rsp), %rbx
movq %rbx, %rdi
movq %r8, %rsi
callq 0x12676
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
callq 0x97b4
movq 0x9bfa005(%rip), %rsi   # 0x9c034a8
addq $0x18, %rsi
leaq 0x1d8(%rsp), %rdi
callq 0x98ec
leaq 0x128(%rsp), %rbp
leaq 0x180(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x1d8(%rsp), %rcx
movq %rbp, %rdi
callq 0x14414
leaq 0x1d8(%rsp), %rdi
callq 0x9946
leaq 0x50(%rsp), %rdi
callq 0x51b0
leaq 0x180(%rsp), %rdi
callq 0x979a
cmpb $0x0, 0x17c(%rsp)
je 0x95a8
leaq 0xd0(%rsp), %rdi
movq %r12, %rsi
callq 0x12676
leaq 0x78(%rsp), %rdi
leaq 0x128(%rsp), %rsi
callq 0x12676
leaq 0x18(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xf41a
leaq 0x78(%rsp), %rdi
callq 0x979a
leaq 0xd0(%rsp), %rdi
callq 0x979a
testb %r15b, %r15b
jne 0x956e
movl 0x18(%rsp), %eax
cmpl $0x5, %eax
jl 0x956e
cmpl $0x8, %eax
jne 0x9585
leaq 0x18(%rsp), %rdi
callq 0xf856
cmpb 0xc(%rsp), %al
jne 0x9585
cmpb $0x0, 0x54(%r13)
jne 0x9591
movq %r12, %rdi
callq 0x1302a
testb %al, %al
je 0x959e
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x9968
leaq 0x20(%rsp), %rdi
callq 0x51b0
leaq 0x128(%rsp), %rdi
callq 0x979a
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0x979a
jmp 0x95d9
movq %rax, %r14
leaq 0xd0(%rsp), %rdi
callq 0x979a
jmp 0x9623
movq %rax, %r14
jmp 0x9623
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x51b0
jmp 0x9623
movq %rax, %r14
leaq 0x1d8(%rsp), %rdi
callq 0x9946
jmp 0x9611
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x51b0
jmp 0x9620
movq %rax, %r14
movq %rbx, %rbp
movq %rbp, %rdi
callq 0x979a
movq %r14, %rdi
callq 0x55d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/counterpoint.cpp
// Function: Counterpoint::is_thesis(Note&, int, Song*)
bool Counterpoint::is_thesis(Note & note, int offset, Song * song){
  // printf("%d %d\n", song->time.compass_duration(), song->time.base_note_duration());
  int compass_position = (note.absolute_time + offset) % song->time.compass_duration();
  int time = compass_position / song->time.base_note_duration() + 1;

  if(song->time.times == 4){
    return (time == 1 || time == 3);
  }else if(song->time.times == 2 || song->time.times == 3){
    return time ==  1;
  }

  return true;
}

// Assembly:
addl 0x4(%rdi), %esi
movq %rdx, %rcx
pushq $0x20
popq %rax
xorl %edx, %edx
idivl 0xcc(%rcx)
movl %eax, %edi
movl 0xc8(%rcx), %r8d
movl %r8d, %ecx
imull %eax, %ecx
movl %esi, %eax
cltd
idivl %ecx
movl %edx, %eax
cltd
idivl %edi
leal -0x2(%r8), %ecx
cmpl $0x2, %ecx
jae 0x9677
testl %eax, %eax
jmp 0x9684
movb $0x1, %cl
cmpl $0x4, %r8d
jne 0x9687
testl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
sete %cl
movl %ecx, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/first_species_counterpoint.cpp
// Function: FirstSpeciesCounterpoint::dfs_generate_counterpoint(Song&, bool, int, int)
Song FirstSpeciesCounterpoint::dfs_generate_counterpoint(Song & c_song, bool ascendant, int paralels, int same_movements){
  song = &c_song;
  Song counterpoint(c_song.scale, c_song.time);
  if(song->size() > 200 || paralels > 4 || same_movements > 600)
    return Song();

  FirstSpeciesCounterpoint::solve(0, paralels, same_movements, counterpoint, ascendant);
  return counterpoint;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x9bf90f0(%rip), %r15   # 0x9c034a8
movq %rsi, (%r15)
addq $0x18, %rsi
leaq 0xd8(%rsp), %r13
movq %r13, %rdi
callq 0x98ec
movq 0xc8(%r12), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xc2ce
leaq 0xd8(%rsp), %rdi
callq 0x9946
movq (%r15), %rdi
callq 0x17ce4
cmpl $0x258, %ebp            # imm = 0x258
jg 0xa434
cmpl $0x4, %r14d
jg 0xa434
cmpl $0xc9, %eax
jae 0xa434
movzbl 0x4(%rsp), %r8d
leaq 0x8(%rsp), %rcx
xorl %edi, %edi
movl %r14d, %esi
movl %ebp, %edx
callq 0xa482
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xc356
jmp 0xa43c
movq %rbx, %rdi
callq 0xc30e
leaq 0x8(%rsp), %rdi
callq 0xc3b0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x9946
jmp 0xa47a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc3b0
movq %rbx, %rdi
callq 0x55d0
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/fourth_species_counterpoint.cpp
// Function: FourthSpeciesCounterpoint::dfs_generate_counterpoint(Song&, bool, int, int)
Song FourthSpeciesCounterpoint::dfs_generate_counterpoint(Song & c_song, bool ascendant, int paralels, int same_movements){
  song = &c_song;
  Song counterpoint(c_song.scale, c_song.time);
  if(song->size() > 200 || paralels > 4 || same_movements > 600)
    return Song();

  FourthSpeciesCounterpoint::solve(0, 0, paralels, same_movements, ascendant, counterpoint);
  FourthSpeciesCounterpoint::add_trailing_rests(counterpoint);
  return counterpoint;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x9bf6e38(%rip), %r15   # 0x9c034a8
movq %rsi, (%r15)
addq $0x18, %rsi
leaq 0xd8(%rsp), %r13
movq %r13, %rdi
callq 0x98ec
movq 0xc8(%r12), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xc2ce
leaq 0xd8(%rsp), %rdi
callq 0x9946
movq (%r15), %rdi
callq 0x17ce4
cmpl $0x258, %ebp            # imm = 0x258
jg 0xc6f8
cmpl $0x4, %r14d
jg 0xc6f8
cmpl $0xc9, %eax
jae 0xc6f8
movzbl 0x4(%rsp), %r8d
leaq 0x8(%rsp), %r9
xorl %edi, %edi
xorl %esi, %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0xc746
leaq 0x8(%rsp), %rdi
callq 0x968a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xc356
jmp 0xc700
movq %rbx, %rdi
callq 0xc30e
leaq 0x8(%rsp), %rdi
callq 0xc3b0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x9946
jmp 0xc73e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc3b0
movq %rbx, %rdi
callq 0x55d0
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/interval.cpp
// Function: Interval::Interval(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
Interval::Interval(string s_interval, bool ascendant){
  string s_quantitative = "", s_qualitative = "";
  bool is_on_number = false;
  this->direction = (ascendant ? 1 : -1);

  for(auto & c : s_interval){
    if(is_on_number)
      s_quantitative += c;
    else
      s_qualitative += c;

    if(c == 'd' || c == 'A' || c == 'm' || c == 'M' || c == 'P'){
      is_on_number = true;
    }
  }

  this->quantitative = stoi(s_quantitative);

  int note_diff = this->quantitative;
  int octave_diff = 0;
  if(note_diff > N_NOTES + 1){
    octave_diff = (note_diff - 2) / N_NOTES;
    while(note_diff > N_NOTES + 1)
      note_diff -= N_NOTES;
  }

  for(int i = 0; i < 17; ++i){
    if(intervals[note_diff][i] == s_qualitative){
      this->half_tones = i + octave_diff * N_SCALE;
      this->qualitative = s_qualitative;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, %r14
leaq 0x8(%rdi), %rax
movq %rax, 0x10(%rsp)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movb $0x0, 0x18(%rdi)
leaq 0x1a493(%rip), %rsi     # 0x2974a
leaq 0x38(%rsp), %r15
leaq 0x18(%rsp), %rdx
movq %r15, %rdi
callq 0x96e6
leaq 0x1a47a(%rip), %rsi     # 0x2974a
leaq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x96e6
movzbl %bpl, %eax
decl %eax
orl $0x1, %eax
movw %ax, 0x2c(%r14)
movq (%r13), %rbp
movq 0x8(%r13), %r13
xorl %ebx, %ebx
xorl %r12d, %r12d
cmpq %rbx, %r13
je 0xf33b
movq %r15, %rdi
testb $0x1, %r12b
jne 0xf30d
leaq 0x18(%rsp), %rdi
movsbl (%rbp,%rbx), %esi
callq 0x52f0
movb (%rbp,%rbx), %cl
addb $-0x41, %cl
cmpb $0x2c, %cl
ja 0xf336
movabsq $0x100800009001, %rax   # imm = 0x100800009001
shrq %cl, %rax
orb %r12b, %al
movl %eax, %r12d
incq %rbx
jmp 0xf2fa
leaq 0x38(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0xf881
movl %eax, %ecx
movl %eax, (%r14)
cmpl $0x9, %eax
movq 0x10(%rsp), %rbp
jl 0xf370
leal -0x2(%rcx), %eax
pushq $0x7
popq %rsi
xorl %edx, %edx
divl %esi
imull $-0x7, %eax, %edx
addl %ecx, %edx
imull $0xc, %eax, %r13d
movl %edx, %ecx
jmp 0xf373
xorl %r13d, %r13d
movslq %ecx, %rax
imulq $0x220, %rax, %rax      # imm = 0x220
leaq 0x9bf440c(%rip), %r15   # 0x9c03790
addq %rax, %r15
xorl %ebx, %ebx
leaq 0x18(%rsp), %r12
cmpq $0x11, %rbx
je 0xf3bf
movq %r15, %rdi
movq %r12, %rsi
callq 0xf89d
testb %al, %al
je 0xf3b6
leal (%rbx,%r13), %eax
movl %eax, 0x28(%r14)
movq %rbp, %rdi
movq %r12, %rsi
callq 0x5210
incq %rbx
addq $0x20, %r15
jmp 0xf38e
leaq 0x18(%rsp), %rdi
callq 0x51b0
leaq 0x38(%rsp), %rdi
callq 0x51b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf3f0
movq %rax, %r14
jmp 0xf3fd
movq %rax, %r14
jmp 0xf407
jmp 0xf3f0
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x51b0
leaq 0x38(%rsp), %rdi
callq 0x51b0
movq 0x10(%rsp), %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x55d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/interval.cpp
// Function: Interval::classify_qualitative()
void Interval::classify_qualitative(){
  int note_diff = this->quantitative;
  int note_with_accidental_diff = this->half_tones;

  // printf("%d %d x ", note_diff, note_with_accidental_diff);
  while(note_diff > N_NOTES + 1)
    note_diff -= N_NOTES;

  while(note_with_accidental_diff > min(expected_semi_tones[note_diff] + 5, 16))
    note_with_accidental_diff -= N_SCALE;

  // printf("%d %d\n", note_diff, note_with_accidental_diff);
  this->qualitative = intervals[note_diff][note_with_accidental_diff];
}

// Assembly:
movl (%rdi), %r8d
movl 0x28(%rdi), %esi
cmpl $0x8, %r8d
pushq $0x8
popq %rax
cmovll %r8d, %eax
movl %r8d, %ecx
subl %eax, %ecx
addl $0x6, %ecx
pushq $0x7
popq %r9
movl %ecx, %eax
xorl %edx, %edx
divl %r9d
subl %ecx, %edx
addl %r8d, %edx
movslq %edx, %r8
leaq 0x2aea1(%rip), %rax     # 0x3a360
movl (%rax,%r8,4), %eax
cmpl $0xb, %eax
pushq $0xb
popq %rdx
cmovll %eax, %edx
addl $0x5, %edx
cmpl %edx, %esi
cmovll %esi, %edx
movl %esi, %ecx
subl %edx, %ecx
addl $0xb, %ecx
pushq $0xc
popq %r9
movl %ecx, %eax
xorl %edx, %edx
divl %r9d
subl %ecx, %edx
addl %esi, %edx
movslq %edx, %rax
shlq $0x5, %rax
imulq $0x220, %r8, %rcx       # imm = 0x220
leaq 0x9bf4291(%rip), %rsi   # 0x9c03790
addq %rcx, %rsi
addq %rax, %rsi
addq $0x8, %rdi
jmp 0x5210
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/interval.cpp
// Function: Interval::is_dissonant()
bool Interval::is_dissonant(){
  // int quant = this->quantitative;
  int note_with_accidental_diff = this->half_tones;
  while(note_with_accidental_diff > N_SCALE)
    note_with_accidental_diff -= N_SCALE;


  // while(quant > N_NOTES + 1)
  //   quant -= N_NOTES;
  return dissonant_half_tones.find(note_with_accidental_diff) != dissonant_half_tones.end();
}

// Assembly:
pushq %rax
movl 0x28(%rdi), %esi
pushq $0xc
popq %rdi
cmpl %edi, %esi
movl %edi, %eax
cmovll %esi, %eax
movl %esi, %ecx
subl %eax, %ecx
addl $0xb, %ecx
movl %ecx, %eax
xorl %edx, %edx
divl %edi
subl %ecx, %edx
addl %esi, %edx
leaq 0x4(%rsp), %rsi
movl %edx, (%rsi)
leaq 0x9bf4139(%rip), %rdi   # 0x9c03750
callq 0xffe4
testq %rax, %rax
setne %al
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/interval.cpp
// Function: Interval::interval_to_note(Note, Interval)
Note Interval::interval_to_note(Note note, Interval interval){
  if(note.rest()){
    return note;
  }

  int midi_number = note.midi_number + interval.half_tones * interval.direction;
  int note_number = note.note_number + (interval.quantitative - 1) * interval.direction;
  Note n(midi_number);

  if(n.note_number == note_number){
    n.duration = note.duration;
    return n;
  }else{
    vector<Note> notes = n.enarmonies();
    for(auto & other_note : notes){
      if(other_note.note_number == note_number){
        other_note.duration = note.duration;
        return other_note;
      }
    }
  }

  return Note();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1302a
testb %al, %al
je 0xf77f
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12676
jmp 0xf822
movswl 0x2c(%r15), %eax
movl 0x28(%r15), %esi
imull %eax, %esi
addl 0x4c(%r14), %esi
movl (%r15), %ebp
decl %ebp
imull %eax, %ebp
addl 0x50(%r14), %ebp
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %edx, %edx
callq 0x12802
cmpl %ebp, 0x50(%r15)
jne 0xf7c4
movl (%r14), %eax
leaq 0x20(%rsp), %rsi
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x12676
jmp 0xf818
leaq 0x8(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x12dd6
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rax
cmpq %rax, %rsi
je 0xf7ed
cmpl %ebp, 0x50(%rsi)
je 0xf801
addq $0x58, %rsi
jmp 0xf7dd
leaq 0x8(%rsp), %rdi
callq 0x98ca
movq %rbx, %rdi
callq 0x12712
jmp 0xf818
movl (%r14), %eax
movl %eax, (%rsi)
movq %rbx, %rdi
callq 0x12676
leaq 0x8(%rsp), %rdi
callq 0x98ca
leaq 0x20(%rsp), %rdi
callq 0x979a
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x98ca
jmp 0xf844
jmp 0xf841
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x979a
movq %rbx, %rdi
callq 0x55d0
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/note.cpp
// Function: Note::Note(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, bool)
Note::Note(const string note, const string accidental, const int octave, const int duration, bool linked) {
  this->valid = true;
  this->note = note;

  this->accidental = accidental;
  this->duration = duration;
  this->linked = linked;

  if(note != "r"){
    this->octave = octave;
    this->midi_number = (octave + 1) * N_SCALE + notes_with_accidental_to_number[this->full_note()];
    this->note_number = (octave + 1) * N_NOTES + notes_to_number[this->note];
  }else{
    this->octave = 0;
    this->midi_number = 0;
    this->note_number = 0;
  }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %r12d
movl %r8d, %r13d
movl %ecx, %ebp
movq %rdx, %rbx
movq %rdi, %r14
andl $0x0, 0x4(%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, %r15
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
addq $0x8, %rdi
leaq 0x28(%r14), %rcx
movq %rcx, 0x10(%rsp)
movb %al, 0x38(%r14)
movw $0x1, 0x54(%r14)
movq %rdi, 0x8(%rsp)
callq 0x5210
movq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x5210
movl %r13d, (%r14)
movb %r12b, 0x55(%r14)
leaq 0x1768e(%rip), %rsi     # 0x29c45
movq %r15, %rdi
callq 0x982d
testb %al, %al
je 0x12612
movl %ebp, 0x48(%r14)
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x1265c
leaq 0x9bf24ed(%rip), %rdi   # 0x9c04ac8
leaq 0x18(%rsp), %rsi
callq 0x136c4
incl %ebp
imull $0xc, %ebp, %ecx
addl (%rax), %ecx
movl %ecx, 0x4c(%r14)
leaq 0x18(%rsp), %rdi
callq 0x51b0
leaq 0x9bf24ff(%rip), %rdi   # 0x9c04b00
movq 0x8(%rsp), %rsi
callq 0x137fc
imull $0x7, %ebp, %ecx
addl (%rax), %ecx
jmp 0x12619
andq $0x0, 0x48(%r14)
xorl %ecx, %ecx
movl %ecx, 0x50(%r14)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x51b0
jmp 0x12640
jmp 0x1263d
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0x51b0
movq 0x8(%rsp), %rdi
callq 0x51b0
movq %rbx, %rdi
callq 0x55d0
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/note.cpp
// Function: Note::Note(Note const&)
Note::Note(const Note & note){
  this->valid = true;
  this->duration = note.duration;
  this->note = note.note;
  this->accidental = note.accidental;
  this->octave = note.octave;
  this->midi_number = note.midi_number;
  this->note_number = note.note_number;
  this->linked = note.linked;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
andl $0x0, 0x4(%rdi)
movq %rsi, %r15
leaq 0x8(%rdi), %r14
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x28(%rdi), %r12
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
movw $0x1, 0x54(%rdi)
movl (%rsi), %eax
movl %eax, (%rdi)
addq $0x8, %rsi
movq %r14, %rdi
callq 0x5210
leaq 0x28(%r15), %rsi
movq %r12, %rdi
callq 0x5210
movq 0x48(%r15), %rax
movq %rax, 0x48(%rbx)
movl 0x50(%r15), %eax
movl %eax, 0x50(%rbx)
movb 0x55(%r15), %al
movb %al, 0x55(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r12, %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x51b0
movq %rbx, %rdi
callq 0x55d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/note.cpp
// Function: Note::Note()
Note::Note(){
  this->valid = false;
  this->duration = 0;
  this->note = "c";
  this->accidental = "";
  this->octave = BELOW_MIDDLE_C_OCTAVE;
  this->midi_number = (octave + 1) * N_SCALE + notes_with_accidental_to_number[this->full_note()];
  this->note_number = (octave + 1) * N_NOTES + notes_to_number[this->note];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r15
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x8(%rdi), %rbx
xorl %eax, %eax
movb %al, 0x18(%rdi)
leaq 0x38(%rdi), %rcx
movq %rcx, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %al, 0x38(%rdi)
andw $0x0, 0x54(%rdi)
leaq 0x28(%rdi), %r14
andq $0x0, (%rdi)
leaq 0x16dcf(%rip), %rsi     # 0x29528
movq %rbx, %rdi
callq 0x5630
leaq 0x16fe2(%rip), %rsi     # 0x2974a
movq %r14, %rdi
callq 0x5630
movl $0x3, 0x48(%r15)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1265c
leaq 0x9bf233c(%rip), %rdi   # 0x9c04ac8
leaq 0x8(%rsp), %rsi
callq 0x136c4
movl (%rax), %eax
addl $0x30, %eax
movl %eax, 0x4c(%r15)
leaq 0x8(%rsp), %rdi
callq 0x51b0
movl 0x48(%r15), %ebp
leaq 0x9bf234c(%rip), %rdi   # 0x9c04b00
movq %rbx, %rsi
callq 0x137fc
imull $0x7, %ebp, %ecx
movl (%rax), %eax
addl %ecx, %eax
addl $0x7, %eax
movl %eax, 0x50(%r15)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x51b0
jmp 0x127e9
jmp 0x127e6
movq %rax, %r15
movq %r14, %rdi
callq 0x51b0
movq %rbx, %rdi
callq 0x51b0
movq %r15, %rdi
callq 0x55d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/note.cpp
// Function: Note::Note(int, int)
Note::Note(int midi_number, int duration){
  this->valid = true;
  this->duration = duration;
  this->midi_number = midi_number;
  this->octave = (midi_number / N_SCALE) - 1;
  string note_with_accidental = number_to_notes_with_accidental[midi_number % N_SCALE];
  this->set_full_note(note_with_accidental);
  this->note_number = (octave + 1) * N_NOTES + notes_to_number[this->note];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %esi, %eax
movq %rdi, %rbx
andl $0x0, 0x4(%rdi)
leaq 0x18(%rdi), %rcx
movq %rcx, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
xorl %ecx, %ecx
movb %cl, 0x18(%rdi)
leaq 0x38(%rdi), %rsi
movq %rsi, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
movb %cl, 0x38(%rdi)
movw $0x1, 0x54(%rdi)
movl %edx, (%rdi)
movl %eax, 0x4c(%rdi)
pushq $0xc
popq %rcx
cltd
idivl %ecx
leaq 0x8(%rdi), %r14
decl %eax
movl %eax, 0x48(%rdi)
movslq %edx, %rax
shlq $0x5, %rax
leaq 0x9bf2421(%rip), %rsi   # 0x9c04c80
addq %rax, %rsi
leaq 0x28(%rsp), %rdi
callq 0x5480
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x5480
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x12904
leaq 0x8(%rsp), %rdi
callq 0x51b0
movl 0x48(%rbx), %ebp
leaq 0x9bf2264(%rip), %rdi   # 0x9c04b00
movq %r14, %rsi
callq 0x137fc
imull $0x7, %ebp, %ecx
movl (%rax), %eax
addl %ecx, %eax
addl $0x7, %eax
movl %eax, 0x50(%rbx)
leaq 0x28(%rsp), %rdi
callq 0x51b0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x51b0
jmp 0x128dd
movq %rax, %r15
jmp 0x128e7
movq %rax, %r15
leaq 0x28(%rsp), %rdi
callq 0x51b0
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x51b0
movq %r14, %rdi
callq 0x51b0
movq %r15, %rdi
callq 0x55d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/note.cpp
// Function: Note::set_full_note(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Note::set_full_note(string s){
  string only_note = "";
  only_note += s[0];
  this->note = only_note;
  s.erase(s.begin());
  this->accidental = s;
  this->midi_number = (octave + 1) * N_SCALE + notes_with_accidental_to_number[this->full_note()];
  this->note_number = (octave + 1) * N_NOTES + notes_to_number[this->note];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x16e2f(%rip), %rsi     # 0x2974a
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x96e6
movq (%r15), %rax
movsbl (%rax), %esi
movq %r14, %rdi
callq 0x52f0
leaq 0x8(%rbx), %r14
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x5210
movq (%r15), %rsi
movq %r15, %rdi
callq 0x5410
leaq 0x28(%rbx), %rdi
movq %r15, %rsi
callq 0x5210
imull $0xc, 0x48(%rbx), %ebp
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x1265c
leaq 0x9bf214d(%rip), %rdi   # 0x9c04ac8
leaq 0x8(%rsp), %rsi
callq 0x136c4
addl $0xc, %ebp
addl (%rax), %ebp
movl %ebp, 0x4c(%rbx)
leaq 0x8(%rsp), %rdi
callq 0x51b0
movl 0x48(%rbx), %ebp
leaq 0x9bf215f(%rip), %rdi   # 0x9c04b00
movq %r14, %rsi
callq 0x137fc
imull $0x7, %ebp, %ecx
movl (%rax), %eax
addl %ecx, %eax
addl $0x7, %eax
movl %eax, 0x50(%rbx)
leaq 0x28(%rsp), %rdi
callq 0x51b0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x51b0
jmp 0x129e1
jmp 0x129de
jmp 0x129de
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x51b0
movq %rbx, %rdi
callq 0x55d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/note.cpp
// Function: Note::enarmonies()
vector<Note> Note::enarmonies(){
  vector<Note> v;
  for(auto & p : notes_with_accidental_to_number){
    int note_position = notes_with_accidental_to_number[this->full_note()];
    if(p.first != this->full_note() &&
      (p.second % N_SCALE) == (note_position % N_SCALE)){
      Note n(*this);
      if(note_position > p.second)
        n.octave++;
      else if(note_position < p.second)
        n.octave--;

      n.set_full_note(p.first);
      v.push_back(n);
    }
  }

  return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r12
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movq %rdi, 0x8(%rsp)
movups %xmm0, (%rdi)
leaq 0x9bf1cd7(%rip), %r14   # 0x9c04ad8
leaq 0x40(%rsp), %r15
leaq 0x9bf1cbb(%rip), %r13   # 0x9c04ac8
movq (%r14), %r14
testq %r14, %r14
je 0x12f01
movq %r15, %rdi
movq %r12, %rsi
callq 0x1265c
movq %r13, %rdi
movq %r15, %rsi
callq 0x136c4
movl (%rax), %ebx
movq %r15, %rdi
callq 0x51b0
movq %r15, %rdi
movq %r12, %rsi
callq 0x1265c
leaq 0x8(%r14), %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0xf8c6
testb %al, %al
je 0x12ef4
movq %rbp, 0x18(%rsp)
movl 0x28(%r14), %eax
cltd
pushq $0xc
popq %rcx
idivl %ecx
movl %edx, 0x14(%rsp)
movl %ebx, %eax
cltd
idivl %ecx
movq %r13, %rbp
movq %r12, %r13
movl %edx, %r12d
movq %r15, %rdi
callq 0x51b0
cmpl %r12d, 0x14(%rsp)
movq %r13, %r12
movq %rbp, %r13
leaq 0x20(%rsp), %rbp
jne 0x12e0d
movq %r15, %rdi
movq %r12, %rsi
callq 0x12676
pushq $0x1
popq %rax
cmpl 0x28(%r14), %ebx
jg 0x12eb3
pushq $-0x1
popq %rax
jge 0x12eba
addl %eax, 0x88(%rsp)
movq %rbp, %rdi
movq 0x18(%rsp), %rsi
callq 0x5480
movq %r15, %rdi
movq %rbp, %rsi
callq 0x12904
movq %rbp, %rdi
callq 0x51b0
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x986e
movq %r15, %rdi
callq 0x979a
jmp 0x12e0d
movq %r15, %rdi
callq 0x51b0
jmp 0x12e0d
movq 0x8(%rsp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x51b0
jmp 0x12f2c
jmp 0x12f49
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x979a
jmp 0x12f4c
jmp 0x12f49
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x51b0
jmp 0x12f4c
movq %rax, %rbx
movq 0x8(%rsp), %rdi
callq 0x98ca
movq %rbx, %rdi
callq 0x55d0
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/scale.cpp
// Function: Scale::fill_note_set(Note, std::vector<Interval, std::allocator<Interval>>)
void Scale::fill_note_set(Note note, vector<Interval> intervals){
  permitted_notes.clear();
  permitted_notes.insert(note.full_note());

  for(auto & interval : intervals){
    note = Interval::interval_to_note(note, interval);
    permitted_notes.insert(note.full_note());
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
callq 0x9ae0
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1265c
movq %r14, (%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1456e
leaq 0x38(%rsp), %r12
movq %r12, %rdi
callq 0x51b0
movq (%r15), %r13
movq 0x8(%r15), %r14
leaq 0x90(%rsp), %rbp
leaq 0x8(%rsp), %r15
cmpq %r14, %r13
je 0x1425a
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x12676
movq %r15, %rdi
movq %r13, %rsi
callq 0x97b4
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xf750
movq %rbx, %rdi
movq %r12, %rsi
callq 0x97e8
movq %r12, %rdi
callq 0x979a
leaq 0x10(%rsp), %rdi
callq 0x51b0
movq %rbp, %rdi
callq 0x979a
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1265c
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x1456e
movq %r12, %rdi
callq 0x51b0
addq $0x30, %r13
jmp 0x141e7
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1429e
movq %rax, %rbx
jmp 0x1428f
movq %rax, %rbx
jmp 0x14285
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x979a
leaq 0x10(%rsp), %rdi
callq 0x51b0
leaq 0x90(%rsp), %rdi
callq 0x979a
jmp 0x142ab
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x51b0
movq %rbx, %rdi
callq 0x55d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/second_species_counterpoint.cpp
// Function: SecondSpeciesCounterpoint::dfs_generate_counterpoint(Song&, bool, int, int)
Song SecondSpeciesCounterpoint::dfs_generate_counterpoint(Song & c_song, bool ascendant, int paralels, int same_movements){
  song = &c_song;
  Song counterpoint(c_song.scale, c_song.time);
  if(song->size() > 200 || paralels > 4 || same_movements > 600)
    return Song();

  SecondSpeciesCounterpoint::solve(0, 0, paralels, same_movements, ascendant, counterpoint);
  SecondSpeciesCounterpoint::add_trailing_rests(counterpoint);
  return counterpoint;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movl %r8d, %ebp
movl %ecx, %r14d
movl %edx, 0x4(%rsp)
movq %rsi, %r12
movq %rdi, %rbx
leaq 0x9beeb10(%rip), %r15   # 0x9c034a8
movq %rsi, (%r15)
addq $0x18, %rsi
leaq 0xd8(%rsp), %r13
movq %r13, %rdi
callq 0x98ec
movq 0xc8(%r12), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0xc2ce
leaq 0xd8(%rsp), %rdi
callq 0x9946
movq (%r15), %rdi
callq 0x17ce4
cmpl $0x258, %ebp            # imm = 0x258
jg 0x14a20
cmpl $0x4, %r14d
jg 0x14a20
cmpl $0xc9, %eax
jae 0x14a20
movzbl 0x4(%rsp), %r8d
leaq 0x8(%rsp), %r9
xorl %edi, %edi
xorl %esi, %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x14a6e
leaq 0x8(%rsp), %rdi
callq 0x968a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xc356
jmp 0x14a28
movq %rbx, %rdi
callq 0xc30e
leaq 0x8(%rsp), %rdi
callq 0xc3b0
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0xd8(%rsp), %rdi
callq 0x9946
jmp 0x14a66
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0xc3b0
movq %rbx, %rdi
callq 0x55d0
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/song.cpp
// Function: Song::trailing_rests()
unsigned Song::trailing_rests(){
  int tr = 0;

  for(int i = (int) notes.size() - 1; i >= 0; ++i){
    if(notes[i].rest()) tr++;
    else break;
  }

  return tr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
subq (%rdi), %rax
pushq $0x58
popq %rcx
cqto
idivq %rcx
movq %rax, %r14
decl %r14d
imulq $0x58, %r14, %r15
xorl %ebp, %ebp
testl %r14d, %r14d
js 0x17d53
movq (%rbx), %rdi
addq %r15, %rdi
callq 0x1302a
testb %al, %al
je 0x17d53
incl %ebp
addq $0x58, %r15
jmp 0x17d37
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/joao18araujo[P]pierluigi/src/song.cpp
// Function: Song::back()
Note Song::back() {
  if(notes.size() > 0)
    return notes.back();
  else
    return Note();
}

// Assembly:
pushq %rbx
movq %rsi, %rax
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
cmpq (%rax), %rsi
je 0x17d7e
addq $-0x58, %rsi
movq %rbx, %rdi
callq 0x12676
jmp 0x17d86
movq %rbx, %rdi
callq 0x12712
movq %rbx, %rax
popq %rbx
retq
nop