#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*/ clr();
int /*<<< orphan*/ newraid(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ readchar();
char *readln(int);
int /*<<< orphan*/ scanf(char *, int *);
void menuNewRaid() {
  clr();
  int n;
  printf("\n\tNueva Unidad RAID\n\n");
  printf("Ingrese la ruta de la nueva unidad\n");
  printf("raid-manager> ");
  char *path = readln(256);
  printf(
      "\n %s Ruta Seleccionada!\nIngrese el tamaño de la nueva unidad (mb) \n",
      path);
  printf("Min: 2(mb) Max: 10(mb)\n");
  scanf("%i", &n);
  newraid(path, n);
  printf("\nPresione cualquier tecla para continuar...");
  readchar();
}


x86 assembly (clang, -O0):
<menuNewRaid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <clr@plt>
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe92(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x100,%edi
call   1060 <readln@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xed8(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1070 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1080 <newraid@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <readchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<menuNewRaid>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <clr@plt>
lea    0xf00(%rip),%rdi
call   1050 <puts@plt>
lea    0xf09(%rip),%rdi
call   1050 <puts@plt>
lea    0xe65(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x100,%edi
call   1070 <readln@plt>
mov    %rax,%rbx
lea    0xe59(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xef4(%rip),%rdi
call   1050 <puts@plt>
lea    0xe81(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1080 <scanf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1090 <newraid@plt>
lea    0xe67(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1030 <readchar@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0A\09Nueva Unidad RAID\0A\0A\00"
@.str.1 = [36 x i8] c"Ingrese la ruta de la nueva unidad\0A\00"
@.str.2 = [15 x i8] c"raid-manager> \00"
@.str.3 = [69 x i8] c"\0A %s Ruta Seleccionada!\0AIngrese el tama\C3\B1o de la nueva unidad (mb) \0A\00"
@.str.4 = [24 x i8] c"Min: 2(mb) Max: 10(mb)\0A\00"
@.str.5 = [3 x i8] c"%i\00"
@.str.6 = [44 x i8] c"\0APresione cualquier tecla para continuar...\00"
define void @menuNewRaid() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i32 (...) @clr()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%7 = call i8* @readln(i32 256)
store i8* %7, i8** %2
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.3, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%12 = load i8*, i8** %2
%13 = load i32, i32* %1
%14 = call i32 @newraid(i8* %12, i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 (...) @readchar()
ret void
}

LLVM IR (-O2):
@.str.2 = [15 x i8] c"raid-manager> \00"
@.str.3 = [69 x i8] c"\0A %s Ruta Seleccionada!\0AIngrese el tama\C3\B1o de la nueva unidad (mb) \0A\00"
@.str.5 = [3 x i8] c"%i\00"
@.str.6 = [44 x i8] c"\0APresione cualquier tecla para continuar...\00"
@str = [21 x i8] c"\0A\09Nueva Unidad RAID\0A\00"
@str.7 = [35 x i8] c"Ingrese la ruta de la nueva unidad\00"
@str.8 = [23 x i8] c"Min: 2(mb) Max: 10(mb)\00"
define void @menuNewRaid() {
%1 = alloca i32
%2 = tail call i32 (...) @clr()
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str.7, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i8* @readln(i32 256)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.8, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32* %1)
%11 = load i32, i32* %1
%12 = call i32 @newraid(i8* %7, i32 %11)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str.6, i64 0, i64 0))
%14 = call i32 (...) @readchar()
ret void
}