#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*/ mount(char const *, char const *, char const *,
                         unsigned long, void const *);
int /*<<< orphan*/ my_check_posix(char *, int, int /*<<< orphan*/, char *,
                                  char const *, char const *, char const *);
void mountx(char *file, int line, const char *source, const char *target,
            const char *filesystemtype, unsigned long mountflags,
            const void *data) {
  my_check_posix(
      file, line, mount(source, target, filesystemtype, mountflags, data),
      "mounting %s as %s (%s) failed", source, target, filesystemtype);
}


x86 assembly (clang, -O0):
<mountx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    0x10(%rbp),%r8
call   1030 <mount@plt>
mov    -0x40(%rbp),%rdi
mov    -0x34(%rbp),%esi
mov    %eax,%edx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x28(%rbp),%rax
lea    0xe7a(%rip),%rcx
mov    %rax,(%rsp)
call   1040 <my_check_posix@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mountx>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%r12d
mov    %rdi,%rbp
mov    0x40(%rsp),%r8
mov    %rdx,%rdi
mov    %rcx,%rsi
mov    %rbx,%rdx
mov    %r9,%rcx
call   1030 <mount@plt>
mov    %rbx,(%rsp)
lea    0xea4(%rip),%rcx
mov    %rbp,%rdi
mov    %r12d,%esi
mov    %eax,%edx
mov    %r15,%r8
mov    %r14,%r9
call   1040 <my_check_posix@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"mounting %s as %s (%s) failed\00"
define void @mountx(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i64 %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
store i8* %0, i8** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i64 %5, i64* %13
store i8* %6, i8** %14
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = load i8*, i8** %10
%18 = load i8*, i8** %11
%19 = load i8*, i8** %12
%20 = load i64, i64* %13
%21 = load i8*, i8** %14
%22 = call i32 @mount(i8* %17, i8* %18, i8* %19, i64 %20, i8* %21)
%23 = load i8*, i8** %10
%24 = load i8*, i8** %11
%25 = load i8*, i8** %12
%26 = call i32 @my_check_posix(i8* %15, i32 %16, i32 %22, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %23, i8* %24, i8* %25)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"mounting %s as %s (%s) failed\00"
define void @mountx(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i64 %5, i8* %6) {
%8 = tail call i32 @mount(i8* %2, i8* %3, i8* %4, i64 %5, i8* %6)
%9 = tail call i32 @my_check_posix(i8* %0, i32 %1, i32 %8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %4)
ret void
}