#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 */
int /*<<< orphan*/ printf(char *);
void greetingsMsg() {
  printf("This is the program to give out solution for a cubic function in "
         "Latex form.\n");
  printf("The program will accept integer or rational number(x/y with x,y are "
         "integers).\n");
  printf("_____________________________________________________________________"
         "___________\n");
  printf("The program use integer as a base starage type for operation.\n");
  printf("It can reduce fractions to its irreducible form.\n");
  printf("Root reduction is not an available feature.\n");
  printf("The result is in Latex format.\n");
  printf("Please copy the result in this program to https "
         "://www.codecogs.com/latex/eqneditor.php \nin order to get a "
         "mathematical expression of that result.\n");
  printf("Accepted input methods: a, a/b with a, b are integers.\n");
  printf("_____________________________________________________________________"
         "___________\n");
  printf("Equation to solve: A*X^3 + B*X^2 + C*X + D = 0\n");
}


x86 assembly (clang, -O0):
<greetingsMsg>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf27(%rip),%rdi
call   1030 <printf@plt>
lea    0xf6b(%rip),%rdi
call   1030 <printf@plt>
lea    0xfb1(%rip),%rdi
call   1030 <printf@plt>
lea    0xfe4(%rip),%rdi
call   1030 <printf@plt>
lea    0x100a(%rip),%rdi
call   1030 <printf@plt>
lea    0x102b(%rip),%rdi
call   1030 <printf@plt>
lea    0x103f(%rip),%rdi
call   1030 <printf@plt>
lea    0x10c7(%rip),%rdi
call   1030 <printf@plt>
lea    0xf17(%rip),%rdi
call   1030 <printf@plt>
lea    0x10e7(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<greetingsMsg>:
push   %rbx
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0x10f0(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf5d(%rip),%rdi
call   1030 <puts@plt>
lea    0xf8f(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfd4(%rip),%rdi
call   1030 <puts@plt>
lea    0xfe7(%rip),%rdi
call   1030 <puts@plt>
lea    0x106e(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x10e2(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [78 x i8] c"This is the program to give out solution for a cubic function in Latex form.\0A\00"
@.str.1 = [80 x i8] c"The program will accept integer or rational number(x/y with x,y are integers).\0A\00"
@.str.2 = [82 x i8] c"________________________________________________________________________________\0A\00"
@.str.3 = [63 x i8] c"The program use integer as a base starage type for operation.\0A\00"
@.str.4 = [50 x i8] c"It can reduce fractions to its irreducible form.\0A\00"
@.str.5 = [45 x i8] c"Root reduction is not an available feature.\0A\00"
@.str.6 = [32 x i8] c"The result is in Latex format.\0A\00"
@.str.7 = [148 x i8] c"Please copy the result in this program to https ://www.codecogs.com/latex/eqneditor.php \0Ain order to get a mathematical expression of that result.\0A\00"
@.str.8 = [56 x i8] c"Accepted input methods: a, a/b with a, b are integers.\0A\00"
@.str.9 = [48 x i8] c"Equation to solve: A*X^3 + B*X^2 + C*X + D = 0\0A\00"
define void @greetingsMsg() {
%1 = call i32 @printf(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.7, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.8, i64 0, i64 0))
%10 = call i32 @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [77 x i8] c"This is the program to give out solution for a cubic function in Latex form.\00"
@str.10 = [79 x i8] c"The program will accept integer or rational number(x/y with x,y are integers).\00"
@str.12 = [62 x i8] c"The program use integer as a base starage type for operation.\00"
@str.13 = [49 x i8] c"It can reduce fractions to its irreducible form.\00"
@str.14 = [44 x i8] c"Root reduction is not an available feature.\00"
@str.15 = [31 x i8] c"The result is in Latex format.\00"
@str.16 = [147 x i8] c"Please copy the result in this program to https ://www.codecogs.com/latex/eqneditor.php \0Ain order to get a mathematical expression of that result.\00"
@str.17 = [55 x i8] c"Accepted input methods: a, a/b with a, b are integers.\00"
@str.18 = [81 x i8] c"________________________________________________________________________________\00"
@str.19 = [47 x i8] c"Equation to solve: A*X^3 + B*X^2 + C*X + D = 0\00"
define void @greetingsMsg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str.10, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.18, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.12, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.13, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.14, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.15, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([147 x i8], [147 x i8]* @str.16, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.17, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str.18, i64 0, i64 0))
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.19, i64 0, i64 0))
ret void
}