#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 long MS_BIND;
unsigned long MS_MOVE;
unsigned long MS_PRIVATE;
unsigned long MS_REC;
unsigned long MS_SHARED;
unsigned long MS_SLAVE;
unsigned long MS_UNBINDABLE;
int /*<<< orphan*/ sc_mount_opt2str(char *, int, unsigned long);
int /*<<< orphan*/ sc_string_append(char *, size_t, char const *);
int /*<<< orphan*/ sc_string_init(char *, size_t);
scalar_t__ strncmp(char const *, char *, int);
const char *sc_mount_cmd(char *buf, size_t buf_size, const char *source,
                         const char *target, const char *fs_type,
                         unsigned long mountflags, const void *data) {
  sc_string_init(buf, buf_size);
  sc_string_append(buf, buf_size, "mount");
  if (fs_type != NULL && strncmp(fs_type, "none", 5) != 0) {
    sc_string_append(buf, buf_size, " -t ");
    sc_string_append(buf, buf_size, fs_type);
  }
  int used_special_flags = 0;
  if (mountflags & MS_BIND) {
    if (mountflags & MS_REC) {
      sc_string_append(buf, buf_size, " --rbind");
      used_special_flags |= MS_REC;
    } else {
      sc_string_append(buf, buf_size, " --bind");
    }
    used_special_flags |= MS_BIND;
  }
  if (mountflags & MS_MOVE) {
    sc_string_append(buf, buf_size, " --move");
    used_special_flags |= MS_MOVE;
  }
  if (MS_SHARED & mountflags) {
    if (mountflags & MS_REC) {
      sc_string_append(buf, buf_size, " --make-rshared");
      used_special_flags |= MS_REC;
    } else {
      sc_string_append(buf, buf_size, " --make-shared");
    }
    used_special_flags |= MS_SHARED;
  }
  if (MS_SLAVE & mountflags) {
    if (mountflags & MS_REC) {
      sc_string_append(buf, buf_size, " --make-rslave");
      used_special_flags |= MS_REC;
    } else {
      sc_string_append(buf, buf_size, " --make-slave");
    }
    used_special_flags |= MS_SLAVE;
  }
  if (MS_PRIVATE & mountflags) {
    if (mountflags & MS_REC) {
      sc_string_append(buf, buf_size, " --make-rprivate");
      used_special_flags |= MS_REC;
    } else {
      sc_string_append(buf, buf_size, " --make-private");
    }
    used_special_flags |= MS_PRIVATE;
  }
  if (MS_UNBINDABLE & mountflags) {
    if (mountflags & MS_REC) {
      sc_string_append(buf, buf_size, " --make-runbindable");
      used_special_flags |= MS_REC;
    } else {
      sc_string_append(buf, buf_size, " --make-unbindable");
    }
    used_special_flags |= MS_UNBINDABLE;
  }
  if (mountflags & ~used_special_flags) {
    char opts_buf[1000] = {0};
    sc_mount_opt2str(opts_buf, sizeof opts_buf,
                     mountflags & ~used_special_flags);
    sc_string_append(buf, buf_size, " -o ");
    sc_string_append(buf, buf_size, opts_buf);
  }
  if (source != NULL && strncmp(source, "none", 5) != 0) {
    sc_string_append(buf, buf_size, " ");
    sc_string_append(buf, buf_size, source);
  }
  if (target != NULL && strncmp(target, "none", 5) != 0) {
    sc_string_append(buf, buf_size, " ");
    sc_string_append(buf, buf_size, target);
  }
  return buf;
}


x86 assembly (clang, -O0):
<sc_mount_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1070 <sc_string_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe6d(%rip),%rdx
call   1060 <sc_string_append@plt>
cmpq   $0x0,-0x28(%rbp)
je     11e7 <sc_mount_cmd+0x97>
mov    -0x28(%rbp),%rdi
lea    0xe58(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     11e7 <sc_mount_cmd+0x97>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe3a(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1060 <sc_string_append@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x30(%rbp),%rax
mov    0x2de7(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     1273 <sc_mount_cmd+0x123>
mov    -0x30(%rbp),%rax
mov    0x2dbf(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     124b <sc_mount_cmd+0xfb>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xde3(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2d97(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
jmp    125f <sc_mount_cmd+0x10f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xdbf(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2d7a(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
mov    0x2d3a(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     12b3 <sc_mount_cmd+0x163>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xd87(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2d12(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    0x2d1e(%rip),%rax
mov    (%rax),%rax
and    -0x30(%rbp),%rax
cmp    $0x0,%rax
je     1338 <sc_mount_cmd+0x1e8>
mov    -0x30(%rbp),%rax
mov    0x2cfa(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     1310 <sc_mount_cmd+0x1c0>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xd37(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2cd2(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
jmp    1324 <sc_mount_cmd+0x1d4>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xd1a(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2cad(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    0x2c71(%rip),%rax
mov    (%rax),%rax
and    -0x30(%rbp),%rax
cmp    $0x0,%rax
je     13bd <sc_mount_cmd+0x26d>
mov    -0x30(%rbp),%rax
mov    0x2c75(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     1395 <sc_mount_cmd+0x245>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xcd1(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2c4d(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
jmp    13a9 <sc_mount_cmd+0x259>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xcb3(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2c00(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    0x2bfc(%rip),%rax
mov    (%rax),%rax
and    -0x30(%rbp),%rax
cmp    $0x0,%rax
je     1442 <sc_mount_cmd+0x2f2>
mov    -0x30(%rbp),%rax
mov    0x2bf0(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     141a <sc_mount_cmd+0x2ca>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xc69(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2bc8(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
jmp    142e <sc_mount_cmd+0x2de>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xc4d(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2b8b(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    0x2b9f(%rip),%rax
mov    (%rax),%rax
and    -0x30(%rbp),%rax
cmp    $0x0,%rax
je     14c7 <sc_mount_cmd+0x377>
mov    -0x30(%rbp),%rax
mov    0x2b6b(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
je     149f <sc_mount_cmd+0x34f>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xc05(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2b43(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
jmp    14b3 <sc_mount_cmd+0x363>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xbec(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    0x2b2e(%rip),%rax
mov    (%rax),%rcx
movslq -0x34(%rbp),%rax
or     %rcx,%rax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x34(%rbp),%ecx
xor    $0xffffffff,%ecx
movslq %ecx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     153c <sc_mount_cmd+0x3ec>
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1050 <memset@plt>
lea    -0x420(%rbp),%rdi
mov    -0x30(%rbp),%rdx
mov    -0x34(%rbp),%eax
xor    $0xffffffff,%eax
cltq
and    %rax,%rdx
mov    $0x3e8,%esi
call   1040 <sc_mount_opt2str@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xb8a(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x420(%rbp),%rdx
call   1060 <sc_string_append@plt>
cmpq   $0x0,-0x18(%rbp)
je     158b <sc_mount_cmd+0x43b>
mov    -0x18(%rbp),%rdi
lea    0xab4(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     158b <sc_mount_cmd+0x43b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xb3b(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1060 <sc_string_append@plt>
cmpq   $0x0,-0x20(%rbp)
je     15da <sc_mount_cmd+0x48a>
mov    -0x20(%rbp),%rdi
lea    0xa65(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     15da <sc_mount_cmd+0x48a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xaec(%rip),%rdx
call   1060 <sc_string_append@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1060 <sc_string_append@plt>
mov    -0x8(%rbp),%rax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sc_mount_cmd>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3f8,%rsp
mov    %r9,%rbx
mov    %r8,%rbp
mov    %rcx,(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,%r15
mov    %rdi,%r13
call   1070 <sc_string_init@plt>
lea    0xe7e(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
test   %rbp,%rbp
je     11cb <sc_mount_cmd+0x7b>
lea    0xe6d(%rip),%rsi
mov    %rbp,%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11cb <sc_mount_cmd+0x7b>
lea    0xe59(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rbp,%rdx
call   1060 <sc_string_append@plt>
mov    0x2e0e(%rip),%r14
test   %rbx,(%r14)
je     11fc <sc_mount_cmd+0xac>
mov    0x2df2(%rip),%rbp
test   %rbx,0x0(%rbp)
je     1200 <sc_mount_cmd+0xb0>
lea    0xe25(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
mov    0x0(%rbp),%rbp
jmp    1214 <sc_mount_cmd+0xc4>
xor    %ebp,%ebp
jmp    1217 <sc_mount_cmd+0xc7>
lea    0xe12(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
xor    %ebp,%ebp
or     (%r14),%ebp
mov    0x2d9a(%rip),%r14
test   %rbx,(%r14)
je     1238 <sc_mount_cmd+0xe8>
lea    0xdf7(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r14),%ebp
mov    0x2d99(%rip),%r14
test   %rbx,(%r14)
je     127e <sc_mount_cmd+0x12e>
mov    0x2d85(%rip),%r12
test   %rbx,(%r12)
je     1269 <sc_mount_cmd+0x119>
lea    0xdd1(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r12),%ebp
jmp    127b <sc_mount_cmd+0x12b>
lea    0xdc9(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r14),%ebp
mov    0x2d2b(%rip),%r14
test   %rbx,(%r14)
je     12c4 <sc_mount_cmd+0x174>
mov    0x2d3f(%rip),%r12
test   %rbx,(%r12)
je     12af <sc_mount_cmd+0x15f>
lea    0xdaa(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r12),%ebp
jmp    12c1 <sc_mount_cmd+0x171>
lea    0xda1(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r14),%ebp
mov    0x2cf5(%rip),%r14
test   %rbx,(%r14)
je     130a <sc_mount_cmd+0x1ba>
mov    0x2cf9(%rip),%r12
test   %rbx,(%r12)
je     12f5 <sc_mount_cmd+0x1a5>
lea    0xd81(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r12),%ebp
jmp    1307 <sc_mount_cmd+0x1b7>
lea    0xd7a(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r14),%ebp
mov    0x2cd7(%rip),%r14
test   %rbx,(%r14)
je     1350 <sc_mount_cmd+0x200>
mov    0x2cb3(%rip),%r12
test   %rbx,(%r12)
je     133b <sc_mount_cmd+0x1eb>
lea    0xd5c(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r12),%ebp
jmp    134d <sc_mount_cmd+0x1fd>
lea    0xd58(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
or     (%r14),%ebp
mov    (%rsp),%r14
not    %ebp
movslq %ebp,%rbp
and    %rbx,%rbp
je     13a2 <sc_mount_cmd+0x252>
lea    0x10(%rsp),%rbx
mov    $0x3e8,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
mov    %rbp,%rdx
call   1040 <sc_mount_opt2str@plt>
lea    0xd24(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1060 <sc_string_append@plt>
mov    0x8(%rsp),%rbx
test   %rbx,%rbx
je     13e5 <sc_mount_cmd+0x295>
lea    0xc53(%rip),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13e5 <sc_mount_cmd+0x295>
lea    0xce4(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1060 <sc_string_append@plt>
test   %r14,%r14
je     1423 <sc_mount_cmd+0x2d3>
lea    0xc15(%rip),%rsi
mov    %r14,%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1423 <sc_mount_cmd+0x2d3>
lea    0xca6(%rip),%rdx
mov    %r13,%rdi
mov    %r15,%rsi
call   1060 <sc_string_append@plt>
mov    %r13,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1060 <sc_string_append@plt>
mov    %r13,%rax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"mount\00"
@.str.1 = [5 x i8] c"none\00"
@.str.2 = [5 x i8] c" -t \00"
@MS_BIND = global i64 0
@MS_REC = global i64 0
@.str.3 = [9 x i8] c" --rbind\00"
@.str.4 = [8 x i8] c" --bind\00"
@MS_MOVE = global i64 0
@.str.5 = [8 x i8] c" --move\00"
@MS_SHARED = global i64 0
@.str.6 = [16 x i8] c" --make-rshared\00"
@.str.7 = [15 x i8] c" --make-shared\00"
@MS_SLAVE = global i64 0
@.str.8 = [15 x i8] c" --make-rslave\00"
@.str.9 = [14 x i8] c" --make-slave\00"
@MS_PRIVATE = global i64 0
@.str.10 = [17 x i8] c" --make-rprivate\00"
@.str.11 = [16 x i8] c" --make-private\00"
@MS_UNBINDABLE = global i64 0
@.str.12 = [20 x i8] c" --make-runbindable\00"
@.str.13 = [19 x i8] c" --make-unbindable\00"
@.str.14 = [5 x i8] c" -o \00"
@.str.15 = [2 x i8] c" \00"
define i8* @sc_mount_cmd(i8* %0, i64 %1, i8* %2, i8* %3, i8* %4, i64 %5, i8* %6) {
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i32
%16 = alloca [1000 x i8]
store i8* %0, i8** %8
store i64 %1, i64* %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
%17 = load i8*, i8** %8
%18 = load i64, i64* %9
%19 = call i32 @sc_string_init(i8* %17, i64 %18)
%20 = load i8*, i8** %8
%21 = load i64, i64* %9
%22 = call i32 @sc_string_append(i8* %20, i64 %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%23 = load i8*, i8** %12
%24 = icmp ne i8* %23, null
br i1 %24, label %25, label %37
25: ; preds = %7
%26 = load i8*, i8** %12
%27 = call i64 @strncmp(i8* %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%28 = icmp ne i64 %27, 0
br i1 %28, label %29, label %37
29: ; preds = %25
%30 = load i8*, i8** %8
%31 = load i64, i64* %9
%32 = call i32 @sc_string_append(i8* %30, i64 %31, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%33 = load i8*, i8** %8
%34 = load i64, i64* %9
%35 = load i8*, i8** %12
%36 = call i32 @sc_string_append(i8* %33, i64 %34, i8* %35)
br label %37
37: ; preds = %29, %25, %7
store i32 0, i32* %15
%38 = load i64, i64* %13
%39 = load i64, i64* @MS_BIND
%40 = and i64 %38, %39
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %66
42: ; preds = %37
%43 = load i64, i64* %13
%44 = load i64, i64* @MS_REC
%45 = and i64 %43, %44
%46 = icmp ne i64 %45, 0
br i1 %46, label %47, label %56
47: ; preds = %42
%48 = load i8*, i8** %8
%49 = load i64, i64* %9
%50 = call i32 @sc_string_append(i8* %48, i64 %49, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%51 = load i64, i64* @MS_REC
%52 = load i32, i32* %15
%53 = sext i32 %52 to i64
%54 = or i64 %53, %51
%55 = trunc i64 %54 to i32
store i32 %55, i32* %15
br label %60
56: ; preds = %42
%57 = load i8*, i8** %8
%58 = load i64, i64* %9
%59 = call i32 @sc_string_append(i8* %57, i64 %58, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %60
60: ; preds = %56, %47
%61 = load i64, i64* @MS_BIND
%62 = load i32, i32* %15
%63 = sext i32 %62 to i64
%64 = or i64 %63, %61
%65 = trunc i64 %64 to i32
store i32 %65, i32* %15
br label %66
66: ; preds = %60, %37
%67 = load i64, i64* %13
%68 = load i64, i64* @MS_MOVE
%69 = and i64 %67, %68
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %80
71: ; preds = %66
%72 = load i8*, i8** %8
%73 = load i64, i64* %9
%74 = call i32 @sc_string_append(i8* %72, i64 %73, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%75 = load i64, i64* @MS_MOVE
%76 = load i32, i32* %15
%77 = sext i32 %76 to i64
%78 = or i64 %77, %75
%79 = trunc i64 %78 to i32
store i32 %79, i32* %15
br label %80
80: ; preds = %71, %66
%81 = load i64, i64* @MS_SHARED
%82 = load i64, i64* %13
%83 = and i64 %81, %82
%84 = icmp ne i64 %83, 0
br i1 %84, label %85, label %109
85: ; preds = %80
%86 = load i64, i64* %13
%87 = load i64, i64* @MS_REC
%88 = and i64 %86, %87
%89 = icmp ne i64 %88, 0
br i1 %89, label %90, label %99
90: ; preds = %85
%91 = load i8*, i8** %8
%92 = load i64, i64* %9
%93 = call i32 @sc_string_append(i8* %91, i64 %92, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%94 = load i64, i64* @MS_REC
%95 = load i32, i32* %15
%96 = sext i32 %95 to i64
%97 = or i64 %96, %94
%98 = trunc i64 %97 to i32
store i32 %98, i32* %15
br label %103
99: ; preds = %85
%100 = load i8*, i8** %8
%101 = load i64, i64* %9
%102 = call i32 @sc_string_append(i8* %100, i64 %101, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
br label %103
103: ; preds = %99, %90
%104 = load i64, i64* @MS_SHARED
%105 = load i32, i32* %15
%106 = sext i32 %105 to i64
%107 = or i64 %106, %104
%108 = trunc i64 %107 to i32
store i32 %108, i32* %15
br label %109
109: ; preds = %103, %80
%110 = load i64, i64* @MS_SLAVE
%111 = load i64, i64* %13
%112 = and i64 %110, %111
%113 = icmp ne i64 %112, 0
br i1 %113, label %114, label %138
114: ; preds = %109
%115 = load i64, i64* %13
%116 = load i64, i64* @MS_REC
%117 = and i64 %115, %116
%118 = icmp ne i64 %117, 0
br i1 %118, label %119, label %128
119: ; preds = %114
%120 = load i8*, i8** %8
%121 = load i64, i64* %9
%122 = call i32 @sc_string_append(i8* %120, i64 %121, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%123 = load i64, i64* @MS_REC
%124 = load i32, i32* %15
%125 = sext i32 %124 to i64
%126 = or i64 %125, %123
%127 = trunc i64 %126 to i32
store i32 %127, i32* %15
br label %132
128: ; preds = %114
%129 = load i8*, i8** %8
%130 = load i64, i64* %9
%131 = call i32 @sc_string_append(i8* %129, i64 %130, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
br label %132
132: ; preds = %128, %119
%133 = load i64, i64* @MS_SLAVE
%134 = load i32, i32* %15
%135 = sext i32 %134 to i64
%136 = or i64 %135, %133
%137 = trunc i64 %136 to i32
store i32 %137, i32* %15
br label %138
138: ; preds = %132, %109
%139 = load i64, i64* @MS_PRIVATE
%140 = load i64, i64* %13
%141 = and i64 %139, %140
%142 = icmp ne i64 %141, 0
br i1 %142, label %143, label %167
143: ; preds = %138
%144 = load i64, i64* %13
%145 = load i64, i64* @MS_REC
%146 = and i64 %144, %145
%147 = icmp ne i64 %146, 0
br i1 %147, label %148, label %157
148: ; preds = %143
%149 = load i8*, i8** %8
%150 = load i64, i64* %9
%151 = call i32 @sc_string_append(i8* %149, i64 %150, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%152 = load i64, i64* @MS_REC
%153 = load i32, i32* %15
%154 = sext i32 %153 to i64
%155 = or i64 %154, %152
%156 = trunc i64 %155 to i32
store i32 %156, i32* %15
br label %161
157: ; preds = %143
%158 = load i8*, i8** %8
%159 = load i64, i64* %9
%160 = call i32 @sc_string_append(i8* %158, i64 %159, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
br label %161
161: ; preds = %157, %148
%162 = load i64, i64* @MS_PRIVATE
%163 = load i32, i32* %15
%164 = sext i32 %163 to i64
%165 = or i64 %164, %162
%166 = trunc i64 %165 to i32
store i32 %166, i32* %15
br label %167
167: ; preds = %161, %138
%168 = load i64, i64* @MS_UNBINDABLE
%169 = load i64, i64* %13
%170 = and i64 %168, %169
%171 = icmp ne i64 %170, 0
br i1 %171, label %172, label %196
172: ; preds = %167
%173 = load i64, i64* %13
%174 = load i64, i64* @MS_REC
%175 = and i64 %173, %174
%176 = icmp ne i64 %175, 0
br i1 %176, label %177, label %186
177: ; preds = %172
%178 = load i8*, i8** %8
%179 = load i64, i64* %9
%180 = call i32 @sc_string_append(i8* %178, i64 %179, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%181 = load i64, i64* @MS_REC
%182 = load i32, i32* %15
%183 = sext i32 %182 to i64
%184 = or i64 %183, %181
%185 = trunc i64 %184 to i32
store i32 %185, i32* %15
br label %190
186: ; preds = %172
%187 = load i8*, i8** %8
%188 = load i64, i64* %9
%189 = call i32 @sc_string_append(i8* %187, i64 %188, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0))
br label %190
190: ; preds = %186, %177
%191 = load i64, i64* @MS_UNBINDABLE
%192 = load i32, i32* %15
%193 = sext i32 %192 to i64
%194 = or i64 %193, %191
%195 = trunc i64 %194 to i32
store i32 %195, i32* %15
br label %196
196: ; preds = %190, %167
%197 = load i64, i64* %13
%198 = load i32, i32* %15
%199 = xor i32 %198, -1
%200 = sext i32 %199 to i64
%201 = and i64 %197, %200
%202 = icmp ne i64 %201, 0
br i1 %202, label %203, label %219
203: ; preds = %196
%204 = bitcast [1000 x i8]* %16 to i8*
%205 = getelementptr inbounds [1000 x i8], [1000 x i8]* %16, i64 0, i64 0
%206 = load i64, i64* %13
%207 = load i32, i32* %15
%208 = xor i32 %207, -1
%209 = sext i32 %208 to i64
%210 = and i64 %206, %209
%211 = call i32 @sc_mount_opt2str(i8* %205, i32 1000, i64 %210)
%212 = load i8*, i8** %8
%213 = load i64, i64* %9
%214 = call i32 @sc_string_append(i8* %212, i64 %213, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
%215 = load i8*, i8** %8
%216 = load i64, i64* %9
%217 = getelementptr inbounds [1000 x i8], [1000 x i8]* %16, i64 0, i64 0
%218 = call i32 @sc_string_append(i8* %215, i64 %216, i8* %217)
br label %219
219: ; preds = %203, %196
%220 = load i8*, i8** %10
%221 = icmp ne i8* %220, null
br i1 %221, label %222, label %234
222: ; preds = %219
%223 = load i8*, i8** %10
%224 = call i64 @strncmp(i8* %223, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%225 = icmp ne i64 %224, 0
br i1 %225, label %226, label %234
226: ; preds = %222
%227 = load i8*, i8** %8
%228 = load i64, i64* %9
%229 = call i32 @sc_string_append(i8* %227, i64 %228, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%230 = load i8*, i8** %8
%231 = load i64, i64* %9
%232 = load i8*, i8** %10
%233 = call i32 @sc_string_append(i8* %230, i64 %231, i8* %232)
br label %234
234: ; preds = %226, %222, %219
%235 = load i8*, i8** %11
%236 = icmp ne i8* %235, null
br i1 %236, label %237, label %249
237: ; preds = %234
%238 = load i8*, i8** %11
%239 = call i64 @strncmp(i8* %238, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%240 = icmp ne i64 %239, 0
br i1 %240, label %241, label %249
241: ; preds = %237
%242 = load i8*, i8** %8
%243 = load i64, i64* %9
%244 = call i32 @sc_string_append(i8* %242, i64 %243, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%245 = load i8*, i8** %8
%246 = load i64, i64* %9
%247 = load i8*, i8** %11
%248 = call i32 @sc_string_append(i8* %245, i64 %246, i8* %247)
br label %249
249: ; preds = %241, %237, %234
%250 = load i8*, i8** %8
ret i8* %250
}

LLVM IR (-O2):
@.str = [6 x i8] c"mount\00"
@.str.1 = [5 x i8] c"none\00"
@.str.2 = [5 x i8] c" -t \00"
@MS_BIND = global i64 0
@MS_REC = global i64 0
@.str.3 = [9 x i8] c" --rbind\00"
@.str.4 = [8 x i8] c" --bind\00"
@MS_MOVE = global i64 0
@.str.5 = [8 x i8] c" --move\00"
@MS_SHARED = global i64 0
@.str.6 = [16 x i8] c" --make-rshared\00"
@.str.7 = [15 x i8] c" --make-shared\00"
@MS_SLAVE = global i64 0
@.str.8 = [15 x i8] c" --make-rslave\00"
@.str.9 = [14 x i8] c" --make-slave\00"
@MS_PRIVATE = global i64 0
@.str.10 = [17 x i8] c" --make-rprivate\00"
@.str.11 = [16 x i8] c" --make-private\00"
@MS_UNBINDABLE = global i64 0
@.str.12 = [20 x i8] c" --make-runbindable\00"
@.str.13 = [19 x i8] c" --make-unbindable\00"
@.str.14 = [5 x i8] c" -o \00"
@.str.15 = [2 x i8] c" \00"
define i8* @sc_mount_cmd(i8* returned %0, i64 %1, i8* %2, i8* %3, i8* %4, i64 %5, i8* nocapture readnone %6) {
%8 = alloca [1000 x i8]
%9 = tail call i32 @sc_string_init(i8* %0, i64 %1)
%10 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i8* %4, null
br i1 %11, label %18, label %12
12: ; preds = %7
%13 = tail call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%14 = icmp eq i64 %13, 0
br i1 %14, label %18, label %15
15: ; preds = %12
%16 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%17 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* %4)
br label %18
18: ; preds = %15, %12, %7
%19 = load i64, i64* @MS_BIND
%20 = and i64 %19, %5
%21 = icmp eq i64 %20, 0
br i1 %21, label %36, label %22
22: ; preds = %18
%23 = load i64, i64* @MS_REC
%24 = and i64 %23, %5
%25 = icmp eq i64 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %22
%27 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%28 = load i64, i64* @MS_REC
br label %31
29: ; preds = %22
%30 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
%32 = phi i64 [ %28, %26 ], [ 0, %29 ]
%33 = load i64, i64* @MS_BIND
%34 = or i64 %33, %32
%35 = trunc i64 %34 to i32
br label %36
36: ; preds = %31, %18
%37 = phi i32 [ %35, %31 ], [ 0, %18 ]
%38 = load i64, i64* @MS_MOVE
%39 = and i64 %38, %5
%40 = icmp eq i64 %39, 0
br i1 %40, label %46, label %41
41: ; preds = %36
%42 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%43 = load i64, i64* @MS_MOVE
%44 = trunc i64 %43 to i32
%45 = or i32 %37, %44
br label %46
46: ; preds = %41, %36
%47 = phi i32 [ %45, %41 ], [ %37, %36 ]
%48 = load i64, i64* @MS_SHARED
%49 = and i64 %48, %5
%50 = icmp eq i64 %49, 0
br i1 %50, label %67, label %51
51: ; preds = %46
%52 = load i64, i64* @MS_REC
%53 = and i64 %52, %5
%54 = icmp eq i64 %53, 0
br i1 %54, label %60, label %55
55: ; preds = %51
%56 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i64 0, i64 0))
%57 = load i64, i64* @MS_REC
%58 = trunc i64 %57 to i32
%59 = or i32 %47, %58
br label %62
60: ; preds = %51
%61 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0))
br label %62
62: ; preds = %60, %55
%63 = phi i32 [ %59, %55 ], [ %47, %60 ]
%64 = load i64, i64* @MS_SHARED
%65 = trunc i64 %64 to i32
%66 = or i32 %63, %65
br label %67
67: ; preds = %62, %46
%68 = phi i32 [ %66, %62 ], [ %47, %46 ]
%69 = load i64, i64* @MS_SLAVE
%70 = and i64 %69, %5
%71 = icmp eq i64 %70, 0
br i1 %71, label %88, label %72
72: ; preds = %67
%73 = load i64, i64* @MS_REC
%74 = and i64 %73, %5
%75 = icmp eq i64 %74, 0
br i1 %75, label %81, label %76
76: ; preds = %72
%77 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%78 = load i64, i64* @MS_REC
%79 = trunc i64 %78 to i32
%80 = or i32 %68, %79
br label %83
81: ; preds = %72
%82 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
br label %83
83: ; preds = %81, %76
%84 = phi i32 [ %80, %76 ], [ %68, %81 ]
%85 = load i64, i64* @MS_SLAVE
%86 = trunc i64 %85 to i32
%87 = or i32 %84, %86
br label %88
88: ; preds = %83, %67
%89 = phi i32 [ %87, %83 ], [ %68, %67 ]
%90 = load i64, i64* @MS_PRIVATE
%91 = and i64 %90, %5
%92 = icmp eq i64 %91, 0
br i1 %92, label %109, label %93
93: ; preds = %88
%94 = load i64, i64* @MS_REC
%95 = and i64 %94, %5
%96 = icmp eq i64 %95, 0
br i1 %96, label %102, label %97
97: ; preds = %93
%98 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.10, i64 0, i64 0))
%99 = load i64, i64* @MS_REC
%100 = trunc i64 %99 to i32
%101 = or i32 %89, %100
br label %104
102: ; preds = %93
%103 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0))
br label %104
104: ; preds = %102, %97
%105 = phi i32 [ %101, %97 ], [ %89, %102 ]
%106 = load i64, i64* @MS_PRIVATE
%107 = trunc i64 %106 to i32
%108 = or i32 %105, %107
br label %109
109: ; preds = %104, %88
%110 = phi i32 [ %108, %104 ], [ %89, %88 ]
%111 = load i64, i64* @MS_UNBINDABLE
%112 = and i64 %111, %5
%113 = icmp eq i64 %112, 0
br i1 %113, label %130, label %114
114: ; preds = %109
%115 = load i64, i64* @MS_REC
%116 = and i64 %115, %5
%117 = icmp eq i64 %116, 0
br i1 %117, label %123, label %118
118: ; preds = %114
%119 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0))
%120 = load i64, i64* @MS_REC
%121 = trunc i64 %120 to i32
%122 = or i32 %110, %121
br label %125
123: ; preds = %114
%124 = tail call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0))
br label %125
125: ; preds = %123, %118
%126 = phi i32 [ %122, %118 ], [ %110, %123 ]
%127 = load i64, i64* @MS_UNBINDABLE
%128 = trunc i64 %127 to i32
%129 = or i32 %126, %128
br label %130
130: ; preds = %125, %109
%131 = phi i32 [ %129, %125 ], [ %110, %109 ]
%132 = xor i32 %131, -1
%133 = sext i32 %132 to i64
%134 = and i64 %133, %5
%135 = icmp eq i64 %134, 0
br i1 %135, label %141, label %136
136: ; preds = %130
%137 = getelementptr inbounds [1000 x i8], [1000 x i8]* %8, i64 0, i64 0
%138 = call i32 @sc_mount_opt2str(i8* %137, i32 1000, i64 %134)
%139 = call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.14, i64 0, i64 0))
%140 = call i32 @sc_string_append(i8* %0, i64 %1, i8* %137)
br label %141
141: ; preds = %136, %130
%142 = icmp eq i8* %2, null
br i1 %142, label %149, label %143
143: ; preds = %141
%144 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%145 = icmp eq i64 %144, 0
br i1 %145, label %149, label %146
146: ; preds = %143
%147 = call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%148 = call i32 @sc_string_append(i8* %0, i64 %1, i8* %2)
br label %149
149: ; preds = %146, %143, %141
%150 = icmp eq i8* %3, null
br i1 %150, label %157, label %151
151: ; preds = %149
%152 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 5)
%153 = icmp eq i64 %152, 0
br i1 %153, label %157, label %154
154: ; preds = %151
%155 = call i32 @sc_string_append(i8* %0, i64 %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
%156 = call i32 @sc_string_append(i8* %0, i64 %1, i8* %3)
br label %157
157: ; preds = %154, %151, %149
ret i8* %0
}