#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 Section1(double, double, double, double, double, double);
int /*<<< orphan*/ Section2(long);
long Section3();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  double x1, y1, z1, x2, y2, z2;
  long cents;
  printf("\n1.- * * * Manhattan - Taxicab * * *\nInsert first point "
         "coordinates (x,y,z) separated by commas: ");
  scanf("%lf,%lf,%lf", &x1, &y1, &z1);
  printf("Insert second point coordinates (x,y,z) separated by commas: ");
  scanf("%lf,%lf,%lf", &x2, &y2, &z2);
  printf("The Manhattan distance is: %g.\n\n",
         Section1(x1, y1, z1, x2, y2, z2));
  printf("2.- * * * Cents to Euros * * *\nInsert the ammount of cents: ");
  scanf("%ld", &cents);
  Section2(cents);
  printf("3.- * * * Euros to Cents * * *\n");
  cents = Section3();
  printf("Equivalent in cents: %ld\n\n", cents);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeee(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xee0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x38(%rbp),%rcx
mov    $0x0,%al
call   1070 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
call   1050 <Section1@plt>
lea    0xed3(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xee6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xf15(%rip),%rdi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    -0x40(%rbp),%rdi
call   1030 <Section2@plt>
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1060 <Section3@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rsi
lea    0xf01(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
lea    0xe94(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xee8(%rip),%rbx
lea    0x38(%rsp),%rsi
lea    0x30(%rsp),%rdx
lea    0x28(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <scanf@plt>
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x20(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
mov    %rbx,%rdi
xor    %eax,%eax
call   1080 <scanf@plt>
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x28(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x10(%rsp),%xmm5
call   1060 <Section1@plt>
lea    0xec2(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xf04(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1080 <scanf@plt>
mov    0x8(%rsp),%rdi
call   1040 <Section2@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1070 <Section3@plt>
mov    %rax,0x8(%rsp)
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [98 x i8] c"\0A1.- * * * Manhattan - Taxicab * * *\0AInsert first point coordinates (x,y,z) separated by commas: \00"
@.str.1 = [12 x i8] c"%lf,%lf,%lf\00"
@.str.2 = [62 x i8] c"Insert second point coordinates (x,y,z) separated by commas: \00"
@.str.3 = [33 x i8] c"The Manhattan distance is: %g.\0A\0A\00"
@.str.4 = [61 x i8] c"2.- * * * Cents to Euros * * *\0AInsert the ammount of cents: \00"
@.str.5 = [4 x i8] c"%ld\00"
@.str.6 = [32 x i8] c"3.- * * * Euros to Cents * * *\0A\00"
@.str.7 = [27 x i8] c"Equivalent in cents: %ld\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i64
store i32 0, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %2, double* %3, double* %4)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %5, double* %6, double* %7)
%13 = load double, double* %2
%14 = load double, double* %3
%15 = load double, double* %4
%16 = load double, double* %5
%17 = load double, double* %6
%18 = load double, double* %7
%19 = call double @Section1(double %13, double %14, double %15, double %16, double %17, double %18)
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), double %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%22 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64* %8)
%23 = load i64, i64* %8
%24 = call i32 @Section2(i64 %23)
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0))
%26 = call i64 (...) @Section3()
store i64 %26, i64* %8
%27 = load i64, i64* %8
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i64 %27)
ret i32 0
}

LLVM IR (-O2):
@.str = [98 x i8] c"\0A1.- * * * Manhattan - Taxicab * * *\0AInsert first point coordinates (x,y,z) separated by commas: \00"
@.str.1 = [12 x i8] c"%lf,%lf,%lf\00"
@.str.2 = [62 x i8] c"Insert second point coordinates (x,y,z) separated by commas: \00"
@.str.3 = [33 x i8] c"The Manhattan distance is: %g.\0A\0A\00"
@.str.4 = [61 x i8] c"2.- * * * Cents to Euros * * *\0AInsert the ammount of cents: \00"
@.str.5 = [4 x i8] c"%ld\00"
@.str.7 = [27 x i8] c"Equivalent in cents: %ld\0A\0A\00"
@str = [31 x i8] c"3.- * * * Euros to Cents * * *\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca i64
%8 = bitcast double* %1 to i8*
%9 = bitcast double* %2 to i8*
%10 = bitcast double* %3 to i8*
%11 = bitcast double* %4 to i8*
%12 = bitcast double* %5 to i8*
%13 = bitcast double* %6 to i8*
%14 = bitcast i64* %7 to i8*
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %1, double* %2, double* %3)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @.str.2, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), double* %4, double* %5, double* %6)
%19 = load double, double* %1
%20 = load double, double* %2
%21 = load double, double* %3
%22 = load double, double* %4
%23 = load double, double* %5
%24 = load double, double* %6
%25 = call double @Section1(double %19, double %20, double %21, double %22, double %23, double %24)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), double %25)
%27 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([61 x i8], [61 x i8]* @.str.4, i64 0, i64 0))
%28 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i64* %7)
%29 = load i64, i64* %7
%30 = call i32 @Section2(i64 %29)
%31 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%32 = call i64 (...) @Section3()
store i64 %32, i64* %7
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i64 %32)
ret i32 0
}