#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 */
unsigned int atoi(char const *);
int /*<<< orphan*/ bmount(char const *);
int /*<<< orphan*/ bumount();
int /*<<< orphan*/ imprimirInodoInfo(unsigned int);
int /*<<< orphan*/ mi_truncar_f(unsigned int, unsigned int);
int /*<<< orphan*/ puts(char *);
int main(int argc, char const *argv[]) {
  if (argc != 4) {
    puts("Uso: truncar <nombre_dispositivo> <ninodo> <nbytes>");
    return -1;
  }
  bmount(argv[1]);
  unsigned int ninodo = atoi(argv[2]), nbytes = atoi(argv[3]);
  mi_truncar_f(ninodo, nbytes);
  imprimirInodoInfo(ninodo);
  bumount();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     1198 <main+0x38>
lea    0xe79(%rip),%rdi
call   1040 <puts@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11e6 <main+0x86>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <bmount@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1080 <atoi@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <mi_truncar_f@plt>
mov    -0x14(%rbp),%edi
call   1070 <imprimirInodoInfo@plt>
mov    $0x0,%al
call   1050 <bumount@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
cmp    $0x4,%edi
jne    11a3 <main+0x43>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1060 <bmount@plt>
mov    0x10(%rbx),%rdi
call   1080 <atoi@plt>
mov    %eax,%ebp
mov    0x18(%rbx),%rdi
call   1080 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <mi_truncar_f@plt>
mov    %ebp,%edi
call   1070 <imprimirInodoInfo@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1050 <bumount@plt>
jmp    11b4 <main+0x54>
lea    0xe56(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [52 x i8] c"Uso: truncar <nombre_dispositivo> <ninodo> <nbytes>\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 4
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %31
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @bmount(i8* %15)
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @atoi(i8* %19)
store i32 %20, i32* %6
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 3
%23 = load i8*, i8** %22
%24 = call i32 @atoi(i8* %23)
store i32 %24, i32* %7
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = call i32 @mi_truncar_f(i32 %25, i32 %26)
%28 = load i32, i32* %6
%29 = call i32 @imprimirInodoInfo(i32 %28)
%30 = call i32 (...) @bumount()
store i32 0, i32* %3
br label %31
31: ; preds = %12, %10
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@.str = [52 x i8] c"Uso: truncar <nombre_dispositivo> <ninodo> <nbytes>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 4
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
br label %19
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @bmount(i8* %8)
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i32 @atoi(i8* %11)
%13 = getelementptr inbounds i8*, i8** %1, i64 3
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
%16 = tail call i32 @mi_truncar_f(i32 %12, i32 %15)
%17 = tail call i32 @imprimirInodoInfo(i32 %12)
%18 = tail call i32 (...) @bumount()
br label %19
19: ; preds = %6, %4
%20 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %20
}