#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double *deriveEq(double *, size_t);
double *integrateEq(double *, size_t);
int /*<<< orphan*/ printEquation(double *, size_t);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ solvePrintEq(double *, size_t);
void printInfo(double *equation, size_t degree) {
  printf("%s\n", "Equation:");
  printEquation(equation, degree);
  printf("\n%s\n", "Solutions:");
  solvePrintEq(equation, degree);
  printf("\n%s\n", "Derivative:");
  printEquation(deriveEq(equation, degree), degree - 1);
  printf("\n%s\n", "Integral:");
  printEquation(integrateEq(equation, degree), degree + 1);
}


x86 assembly (clang, -O0):
<printInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea4(%rip),%rdi
lea    0xe92(%rip),%rsi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <printEquation@plt>
lea    0xe83(%rip),%rdi
lea    0xe81(%rip),%rsi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <solvePrintEq@plt>
lea    0xe63(%rip),%rdi
lea    0xe6c(%rip),%rsi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1060 <deriveEq@plt>
mov    %rax,%rdi
mov    -0x10(%rbp),%rsi
sub    $0x1,%rsi
call   1030 <printEquation@plt>
lea    0xe33(%rip),%rdi
lea    0xe48(%rip),%rsi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <integrateEq@plt>
mov    %rax,%rdi
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
call   1030 <printEquation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printInfo>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xea9(%rip),%rdi
lea    0xe97(%rip),%rsi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printEquation@plt>
lea    0xe8a(%rip),%r15
lea    0xe88(%rip),%rsi
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <solvePrintEq@plt>
lea    0xe79(%rip),%rsi
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <deriveEq@plt>
lea    -0x1(%rbx),%rsi
mov    %rax,%rdi
call   1030 <printEquation@plt>
lea    0xe5f(%rip),%rsi
mov    %r15,%rdi
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <integrateEq@plt>
add    $0x1,%rbx
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printEquation@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [10 x i8] c"Equation:\00"
@.str.2 = [5 x i8] c"\0A%s\0A\00"
@.str.3 = [11 x i8] c"Solutions:\00"
@.str.4 = [12 x i8] c"Derivative:\00"
@.str.5 = [10 x i8] c"Integral:\00"
define void @printInfo(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
store double* %0, double** %3
store i64 %1, i64* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%6 = load double*, double** %3
%7 = load i64, i64* %4
%8 = call i32 @printEquation(double* %6, i64 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%10 = load double*, double** %3
%11 = load i64, i64* %4
%12 = call i32 @solvePrintEq(double* %10, i64 %11)
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%14 = load double*, double** %3
%15 = load i64, i64* %4
%16 = call double* @deriveEq(double* %14, i64 %15)
%17 = load i64, i64* %4
%18 = sub i64 %17, 1
%19 = call i32 @printEquation(double* %16, i64 %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%21 = load double*, double** %3
%22 = load i64, i64* %4
%23 = call double* @integrateEq(double* %21, i64 %22)
%24 = load i64, i64* %4
%25 = add i64 %24, 1
%26 = call i32 @printEquation(double* %23, i64 %25)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [10 x i8] c"Equation:\00"
@.str.2 = [5 x i8] c"\0A%s\0A\00"
@.str.3 = [11 x i8] c"Solutions:\00"
@.str.4 = [12 x i8] c"Derivative:\00"
@.str.5 = [10 x i8] c"Integral:\00"
define void @printInfo(double* %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printEquation(double* %0, i64 %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @solvePrintEq(double* %0, i64 %1)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call double* @deriveEq(double* %0, i64 %1)
%9 = add i64 %1, -1
%10 = tail call i32 @printEquation(double* %8, i64 %9)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call double* @integrateEq(double* %0, i64 %1)
%13 = add i64 %1, 1
%14 = tail call i32 @printEquation(double* %12, i64 %13)
ret void
}