#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*/ write_to_console(char *, int, int, int);
void print_infos() {
  write_to_console("\npicalc          -          a pi calculator\n", 0x1, 1, 0);
  write_to_console("\nDeveloped by Niccolo' Ferrari\n", 0x1 | 0x2, 1, 0);
  write_to_console("\n\nOPTIONS:\n", 0x0, 1, 0);
  write_to_console("\n\t-c <num_cfr>\n\t\tSpecify the number of pi digit that "
                   "you want to calculate.\n\n\t-o <file_out>\n\t\tSpecify the "
                   "output file where save pi digits\n",
                   0x0, 0, 0);
  write_to_console(
      "\n\t-t\n\t\tPrint digits on file and on console. [OPTIONAL].\n\n\t-p "
      "<hop>\n\t\tSpecify when refresh progress percentage. [OPTIONAL].\n",
      0x0, 0, 0);
  write_to_console("\n\t-h\n\t\tPrint help.\n", 0x0, 0, 0);
  write_to_console("\n\t-v\n\t\tPrint version and license.\n", 0x0, 0, 0);
  write_to_console("\n\t-z\n\t\tRecognize your OS.\n", 0x0, 0, 0);
  write_to_console("\n\nCONTACT:\n", 0x0, 1, 0);
  write_to_console("\n\tniccolo.ferrari@hotmail.it\n", 0x1 | 0x4, 1, 1);
}


x86 assembly (clang, -O0):
<print_infos>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %edx,%esi
call   1030 <write_to_console@plt>
lea    0xefd(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xf05(%rip),%rdi
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
call   1030 <write_to_console@plt>
lea    0xefc(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <write_to_console@plt>
lea    0xf76(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <write_to_console@plt>
lea    0xfe0(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <write_to_console@plt>
lea    0xfe2(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <write_to_console@plt>
lea    0xff3(%rip),%rdi
xor    %ecx,%ecx
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <write_to_console@plt>
lea    0xffc(%rip),%rdi
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%esi
call   1030 <write_to_console@plt>
lea    0xff3(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%ecx
mov    %ecx,%edx
call   1030 <write_to_console@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_infos>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xefd(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xf05(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xefc(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xf76(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xfe0(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xfe2(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xff3(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xffc(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <write_to_console@plt>
lea    0xff3(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
pop    %rax
jmp    1030 <write_to_console@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"\0Apicalc - a pi calculator\0A\00"
@.str.1 = [32 x i8] c"\0ADeveloped by Niccolo' Ferrari\0A\00"
@.str.2 = [12 x i8] c"\0A\0AOPTIONS:\0A\00"
@.str.3 = [140 x i8] c"\0A\09-c <num_cfr>\0A\09\09Specify the number of pi digit that you want to calculate.\0A\0A\09-o <file_out>\0A\09\09Specify the output file where save pi digits\0A\00"
@.str.4 = [124 x i8] c"\0A\09-t\0A\09\09Print digits on file and on console. [OPTIONAL].\0A\0A\09-p <hop>\0A\09\09Specify when refresh progress percentage. [OPTIONAL].\0A\00"
@.str.5 = [20 x i8] c"\0A\09-h\0A\09\09Print help.\0A\00"
@.str.6 = [35 x i8] c"\0A\09-v\0A\09\09Print version and license.\0A\00"
@.str.7 = [27 x i8] c"\0A\09-z\0A\09\09Recognize your OS.\0A\00"
@.str.8 = [12 x i8] c"\0A\0ACONTACT:\0A\00"
@.str.9 = [30 x i8] c"\0A\09niccolo.ferrari@hotmail.it\0A\00"
define void @print_infos() {
%1 = call i32 @write_to_console(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 0)
%2 = call i32 @write_to_console(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 1, i32 0)
%3 = call i32 @write_to_console(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1, i32 0)
%4 = call i32 @write_to_console(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 0, i32 0)
%5 = call i32 @write_to_console(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 0, i32 0)
%6 = call i32 @write_to_console(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 0, i32 0, i32 0)
%7 = call i32 @write_to_console(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 0, i32 0, i32 0)
%8 = call i32 @write_to_console(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 0, i32 0)
%9 = call i32 @write_to_console(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 0, i32 1, i32 0)
%10 = call i32 @write_to_console(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 5, i32 1, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"\0Apicalc - a pi calculator\0A\00"
@.str.1 = [32 x i8] c"\0ADeveloped by Niccolo' Ferrari\0A\00"
@.str.2 = [12 x i8] c"\0A\0AOPTIONS:\0A\00"
@.str.3 = [140 x i8] c"\0A\09-c <num_cfr>\0A\09\09Specify the number of pi digit that you want to calculate.\0A\0A\09-o <file_out>\0A\09\09Specify the output file where save pi digits\0A\00"
@.str.4 = [124 x i8] c"\0A\09-t\0A\09\09Print digits on file and on console. [OPTIONAL].\0A\0A\09-p <hop>\0A\09\09Specify when refresh progress percentage. [OPTIONAL].\0A\00"
@.str.5 = [20 x i8] c"\0A\09-h\0A\09\09Print help.\0A\00"
@.str.6 = [35 x i8] c"\0A\09-v\0A\09\09Print version and license.\0A\00"
@.str.7 = [27 x i8] c"\0A\09-z\0A\09\09Recognize your OS.\0A\00"
@.str.8 = [12 x i8] c"\0A\0ACONTACT:\0A\00"
@.str.9 = [30 x i8] c"\0A\09niccolo.ferrari@hotmail.it\0A\00"
define void @print_infos() {
%1 = tail call i32 @write_to_console(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 0)
%2 = tail call i32 @write_to_console(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 1, i32 0)
%3 = tail call i32 @write_to_console(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 1, i32 0)
%4 = tail call i32 @write_to_console(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 0, i32 0)
%5 = tail call i32 @write_to_console(i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 0, i32 0)
%6 = tail call i32 @write_to_console(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i32 0, i32 0, i32 0)
%7 = tail call i32 @write_to_console(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.6, i64 0, i64 0), i32 0, i32 0, i32 0)
%8 = tail call i32 @write_to_console(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 0, i32 0)
%9 = tail call i32 @write_to_console(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i32 0, i32 1, i32 0)
%10 = tail call i32 @write_to_console(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.9, i64 0, i64 0), i32 5, i32 1, i32 1)
ret void
}