#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*/ MS_RDONLY;
int /*<<< orphan*/ mount(char *, char *, char *, int /*<<< orphan*/, char *);
void do_mounts(void) {
  mount("hostfs", "/host", "9p", MS_RDONLY, "trans=virtio,version=9p2000.L");
  mount("", "/sys", "sysfs", 0, NULL);
  mount("proc", "/proc", "proc", 0, NULL);
  mount("devtmpfs", "/dev", "devtmpfs", 0, NULL);
}


x86 assembly (clang, -O0):
<do_mounts>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%ecx
lea    0xedc(%rip),%rdi
lea    0xedc(%rip),%rsi
lea    0xedb(%rip),%rdx
lea    0xed7(%rip),%r8
call   1030 <mount@plt>
lea    0xee8(%rip),%rdi
lea    0xee2(%rip),%rsi
lea    0xee0(%rip),%rdx
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <mount@plt>
lea    0xed4(%rip),%rdx
lea    0xecc(%rip),%rsi
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rdx,%rdi
call   1030 <mount@plt>
lea    0xebc(%rip),%rdx
lea    0xebe(%rip),%rsi
xor    %ecx,%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rdx,%rdi
call   1030 <mount@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_mounts>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%ecx
lea    0xedf(%rip),%rdi
lea    0xedf(%rip),%rsi
lea    0xede(%rip),%rdx
lea    0xeda(%rip),%r8
call   1030 <mount@plt>
lea    0xeeb(%rip),%rdi
lea    0xee5(%rip),%rsi
lea    0xee3(%rip),%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mount@plt>
lea    0xed8(%rip),%rsi
lea    0xed2(%rip),%rdi
mov    %rdi,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <mount@plt>
lea    0xecc(%rip),%rsi
lea    0xebc(%rip),%rdi
mov    %rdi,%rdx
xor    %ecx,%ecx
xor    %r8d,%r8d
pop    %rax
jmp    1030 <mount@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"hostfs\00"
@.str.1 = [6 x i8] c"/host\00"
@.str.2 = [3 x i8] c"9p\00"
@MS_RDONLY = global i32 0
@.str.3 = [30 x i8] c"trans=virtio,version=9p2000.L\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [5 x i8] c"/sys\00"
@.str.6 = [6 x i8] c"sysfs\00"
@.str.7 = [5 x i8] c"proc\00"
@.str.8 = [6 x i8] c"/proc\00"
@.str.9 = [9 x i8] c"devtmpfs\00"
@.str.10 = [5 x i8] c"/dev\00"
define void @do_mounts() {
%1 = load i32, i32* @MS_RDONLY
%2 = call i32 @mount(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%3 = call i32 @mount(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 0, i8* null)
%4 = call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 0, i8* null)
%5 = call i32 @mount(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 0, i8* null)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"hostfs\00"
@.str.1 = [6 x i8] c"/host\00"
@.str.2 = [3 x i8] c"9p\00"
@MS_RDONLY = global i32 0
@.str.3 = [30 x i8] c"trans=virtio,version=9p2000.L\00"
@.str.4 = [1 x i8] zeroinitializer
@.str.5 = [5 x i8] c"/sys\00"
@.str.6 = [6 x i8] c"sysfs\00"
@.str.7 = [5 x i8] c"proc\00"
@.str.8 = [6 x i8] c"/proc\00"
@.str.9 = [9 x i8] c"devtmpfs\00"
@.str.10 = [5 x i8] c"/dev\00"
define void @do_mounts() {
%1 = load i32, i32* @MS_RDONLY
%2 = tail call i32 @mount(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @mount(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i32 0, i8* null)
%4 = tail call i32 @mount(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i32 0, i8* null)
%5 = tail call i32 @mount(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 0, i8* null)
ret void
}