#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
scalar_t__ umount(char *);
int umount_dump_device(void) {
  int rc = 0;
  if (umount("/mnt") != 0) {
    {
      fprintf(stderr, "ERROR: ");
      fprintf(stderr, "umount failed");
      perror("");
    };
    rc = -1;
    goto out;
  }
out:
  return rc;
}


x86 assembly (clang, -O0):
<umount_dump_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <umount@plt>
cmp    $0x0,%rax
je     1197 <umount_dump_device+0x67>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6f(%rip),%rax
mov    (%rax),%edi
lea    0xe93(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xe86(%rip),%rdi
call   1050 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    119c <umount_dump_device+0x6c>
jmp    119c <umount_dump_device+0x6c>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umount_dump_device>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <umount@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1149 <umount_dump_device+0x19>
pop    %rbx
ret
mov    0x2e90(%rip),%rbx
mov    (%rbx),%edi
lea    0xeac(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xea6(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xe99(%rip),%rdi
call   1050 <perror@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"/mnt\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"ERROR: \00"
@.str.2 = [14 x i8] c"umount failed\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @umount_dump_device() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @umount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
store i32 -1, i32* %1
br label %11
10: ; preds = %0
br label %11
11: ; preds = %10, %4
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [5 x i8] c"/mnt\00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"ERROR: \00"
@.str.2 = [14 x i8] c"umount failed\00"
@.str.3 = [1 x i8] zeroinitializer
define i32 @umount_dump_device() {
%1 = tail call i64 @umount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %9
9: ; preds = %0, %3
%10 = phi i32 [ -1, %3 ], [ 0, %0 ]
ret i32 %10
}