#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 */
scalar_t__ mi_unlink(char *);
int /*<<< orphan*/ mount(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ unmount(char *);
int main(int argc, char **argv) {
  if (argc == 3) {
    mount(argv[1]);
    if (mi_unlink(argv[2]) < 0) {
      printf("ERROR (mi_rm.c): Fallo al ejecutar mi_unlink(%s).\n", argv[2]);
      return (-1);
    }
    unmount(argv[1]);
  } else {
    printf("Error en los parámetros de mi_rm\n");
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    11b8 <main+0x78>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <mount@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1060 <mi_unlink@plt>
cmp    $0x0,%rax
jge    11a6 <main+0x66>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xe6d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11cd <main+0x8d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <unmount@plt>
jmp    11c6 <main+0x86>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x3,%edi
jne    117b <main+0x2b>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <mount@plt>
mov    0x10(%rbx),%rdi
call   1070 <mi_unlink@plt>
test   %rax,%rax
js     118b <main+0x3b>
mov    0x8(%rbx),%rdi
call   1040 <unmount@plt>
jmp    1187 <main+0x37>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    0x10(%rbx),%rsi
lea    0xe6a(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [51 x i8] c"ERROR (mi_rm.c): Fallo al ejecutar mi_unlink(%s).\0A\00"
@.str.1 = [35 x i8] c"Error en los par\C3\A1metros de mi_rm\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 3
br i1 %7, label %8, label %28
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @mount(i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i64 @mi_unlink(i8* %15)
%17 = icmp slt i64 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %8
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %21)
store i32 -1, i32* %3
br label %31
23: ; preds = %8
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @unmount(i8* %26)
br label %30
28: ; preds = %2
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
br label %30
30: ; preds = %28, %23
store i32 0, i32* %3
br label %31
31: ; preds = %30, %18
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
@.str = [51 x i8] c"ERROR (mi_rm.c): Fallo al ejecutar mi_unlink(%s).\0A\00"
@str = [34 x i8] c"Error en los par\C3\A1metros de mi_rm\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %18
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @mount(i8* %6)
%8 = getelementptr inbounds i8*, i8** %1, i64 2
%9 = load i8*, i8** %8
%10 = tail call i64 @mi_unlink(i8* %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %4
%13 = load i8*, i8** %8
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %20
15: ; preds = %4
%16 = load i8*, i8** %5
%17 = tail call i32 @unmount(i8* %16)
br label %20
18: ; preds = %2
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
br label %20
20: ; preds = %15, %18, %12
%21 = phi i32 [ -1, %12 ], [ 0, %18 ], [ 0, %15 ]
ret i32 %21
}