#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__ EEXIST;
scalar_t__ ENOENT;
int ENOTSUP;
int /*<<< orphan*/ MS_BIND;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
scalar_t__ creat(char *, int);
int /*<<< orphan*/ criu_get_image_dir();
scalar_t__ errno;
char *getenv(char *);
scalar_t__ mount(char *, char *, int /*<<< orphan*/ *, int /*<<< orphan*/,
                 int /*<<< orphan*/ *);
int openat(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ print_on_level(int, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int cr_plugin_restore_ext_mount(int id, char *mountpoint, char *old_root,
                                int *is_file) {
  int fd;
  char img[64], src[256], *src_file;
  print_on_level((3), "Restoring my mount %d?\n", id);
  sprintf(img, "ext-mount-test-%d.img", id);
  fd = openat(criu_get_image_dir(), img, O_RDONLY);
  if (fd < 0) {
    if (errno == ENOENT)
      return -ENOTSUP;
    print_on_level((1),
                   "Error (%s:%d): "
                   "Can't open my image"
                   ": %m\n",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/"
                   "heads/master/test/mounts/ext/ext-mount.c",
                   72);
    return -1;
  }
  close(fd);
  src_file = getenv("sfpath");
  if (!src_file) {
    print_on_level((1),
                   "Error (%s:%d): "
                   "Can't get sfpath env\n",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/"
                   "heads/master/test/mounts/ext/ext-mount.c",
                   79);
    return -1;
  }
  if (creat(mountpoint, 0600) < 0) {
    if (errno != EEXIST) {
      print_on_level((1),
                     "Error (%s:%d): "
                     "Can't make mountpoint"
                     ": %m\n",
                     "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/"
                     "heads/master/test/mounts/ext/ext-mount.c",
                     85);
      return -1;
    }
  }
  if (is_file)
    *is_file = 1;
  sprintf(src, "/%s/%s", old_root, src_file);
  print_on_level((3), "Mount %s -> %s\n", src, mountpoint);
  if (mount(src, mountpoint, NULL, MS_BIND, NULL) < 0) {
    print_on_level((1),
                   "Error (%s:%d): "
                   "Can't bind mount"
                   ": %m\n",
                   "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/"
                   "heads/master/test/mounts/ext/ext-mount.c",
                   96);
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<cr_plugin_restore_ext_mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%edx
mov    $0x3,%edi
lea    0xe57(%rip),%rsi
mov    $0x0,%al
call   10a0 <print_on_level@plt>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xe5a(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
mov    $0x0,%al
call   1070 <criu_get_image_dir@plt>
mov    %eax,%edi
lea    -0x70(%rbp),%rsi
mov    0x2e0f(%rip),%rax
mov    (%rax),%edx
call   1050 <openat@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    1245 <cr_plugin_restore_ext_mount+0xc5>
mov    0x2dcc(%rip),%rax
mov    (%rax),%rax
mov    0x2db2(%rip),%rcx
cmp    (%rcx),%rax
jne    121a <cr_plugin_restore_ext_mount+0x9a>
xor    %eax,%eax
mov    0x2dc8(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    13ab <cr_plugin_restore_ext_mount+0x22b>
mov    $0x1,%edi
lea    0xe08(%rip),%rsi
lea    0xe29(%rip),%rdx
mov    $0x48,%ecx
mov    $0x0,%al
call   10a0 <print_on_level@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ab <cr_plugin_restore_ext_mount+0x22b>
mov    -0x24(%rbp),%edi
call   1060 <close@plt>
lea    0xe99(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x178(%rbp)
cmpq   $0x0,-0x178(%rbp)
jne    1299 <cr_plugin_restore_ext_mount+0x119>
mov    $0x1,%edi
lea    0xe7a(%rip),%rsi
lea    0xdd5(%rip),%rdx
mov    $0x4f,%ecx
mov    $0x0,%al
call   10a0 <print_on_level@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ab <cr_plugin_restore_ext_mount+0x22b>
mov    -0x10(%rbp),%rdi
mov    $0x180,%esi
call   1080 <creat@plt>
cmp    $0x0,%rax
jge    12fb <cr_plugin_restore_ext_mount+0x17b>
mov    0x2d08(%rip),%rax
mov    (%rax),%rax
mov    0x2d06(%rip),%rcx
cmp    (%rcx),%rax
je     12f6 <cr_plugin_restore_ext_mount+0x176>
mov    $0x1,%edi
lea    0xe42(%rip),%rsi
lea    0xd78(%rip),%rdx
mov    $0x55,%ecx
mov    $0x0,%al
call   10a0 <print_on_level@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ab <cr_plugin_restore_ext_mount+0x22b>
jmp    12fb <cr_plugin_restore_ext_mount+0x17b>
cmpq   $0x0,-0x20(%rbp)
je     1310 <cr_plugin_restore_ext_mount+0x190>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
lea    -0x170(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x178(%rbp),%rcx
lea    0xe1a(%rip),%rsi
mov    $0x0,%al
call   1090 <sprintf@plt>
lea    -0x170(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x3,%edi
lea    0xe03(%rip),%rsi
mov    $0x0,%al
call   10a0 <print_on_level@plt>
lea    -0x170(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2c80(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
call   1040 <mount@plt>
cmp    $0x0,%rax
jge    13a4 <cr_plugin_restore_ext_mount+0x224>
mov    $0x1,%edi
lea    0xdd5(%rip),%rsi
lea    0xcca(%rip),%rdx
mov    $0x60,%ecx
mov    $0x0,%al
call   10a0 <print_on_level@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13ab <cr_plugin_restore_ext_mount+0x22b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cr_plugin_restore_ext_mount>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x140,%rsp
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%r12
mov    %edi,%ebx
lea    0xe5e(%rip),%rsi
mov    $0x3,%edi
mov    %ebx,%edx
xor    %eax,%eax
call   10a0 <print_on_level@plt>
lea    0xe61(%rip),%rsi
mov    %rsp,%r13
mov    %r13,%rdi
mov    %ebx,%edx
xor    %eax,%eax
call   1090 <sprintf@plt>
xor    %eax,%eax
call   1070 <criu_get_image_dir@plt>
mov    0x2e14(%rip),%rcx
mov    (%rcx),%edx
mov    %eax,%edi
mov    %r13,%rsi
call   1050 <openat@plt>
test   %eax,%eax
js     12b2 <cr_plugin_restore_ext_mount+0x132>
mov    %eax,%edi
call   1060 <close@plt>
lea    0xef7(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     12d5 <cr_plugin_restore_ext_mount+0x155>
mov    %rax,%r13
mov    %r12,%rdi
mov    $0x180,%esi
call   1080 <creat@plt>
test   %rax,%rax
jns    1233 <cr_plugin_restore_ext_mount+0xb3>
mov    0x2da0(%rip),%rax
mov    (%rax),%rax
mov    0x2d9e(%rip),%rcx
cmp    (%rcx),%rax
jne    1309 <cr_plugin_restore_ext_mount+0x189>
test   %r15,%r15
je     123f <cr_plugin_restore_ext_mount+0xbf>
movl   $0x1,(%r15)
lea    0xefd(%rip),%rsi
xor    %ebx,%ebx
lea    0x40(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   1090 <sprintf@plt>
lea    0xee6(%rip),%rsi
mov    $0x3,%edi
mov    %r15,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   10a0 <print_on_level@plt>
mov    0x2d63(%rip),%rax
mov    (%rax),%ecx
mov    %r15,%rdi
mov    %r12,%rsi
xor    %edx,%edx
xor    %r8d,%r8d
call   1040 <mount@plt>
test   %rax,%rax
jns    132d <cr_plugin_restore_ext_mount+0x1ad>
lea    0xebb(%rip),%rsi
lea    0xdb0(%rip),%rdx
mov    $0x1,%edi
mov    $0x60,%ecx
jmp    1321 <cr_plugin_restore_ext_mount+0x1a1>
mov    0x2d07(%rip),%rax
mov    (%rax),%rax
mov    0x2ced(%rip),%rcx
cmp    (%rcx),%rax
jne    12ef <cr_plugin_restore_ext_mount+0x16f>
mov    0x2d09(%rip),%rax
xor    %ebx,%ebx
sub    (%rax),%ebx
jmp    132d <cr_plugin_restore_ext_mount+0x1ad>
lea    0xe18(%rip),%rsi
lea    0xd73(%rip),%rdx
mov    $0x1,%edi
mov    $0x4f,%ecx
jmp    1321 <cr_plugin_restore_ext_mount+0x1a1>
lea    0xd38(%rip),%rsi
lea    0xd59(%rip),%rdx
mov    $0x1,%edi
mov    $0x48,%ecx
jmp    1321 <cr_plugin_restore_ext_mount+0x1a1>
lea    0xe09(%rip),%rsi
lea    0xd3f(%rip),%rdx
mov    $0x1,%edi
mov    $0x55,%ecx
xor    %eax,%eax
call   10a0 <print_on_level@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x140,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Restoring my mount %d?\0A\00"
@.str.1 = [22 x i8] c"ext-mount-test-%d.img\00"
@O_RDONLY = global i32 0
@errno = global i64 0
@ENOENT = global i64 0
@ENOTSUP = global i32 0
@.str.2 = [40 x i8] c"Error (%s:%d): Can't open my image: %m\0A\00"
@.str.3 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/heads/master/test/mounts/ext/ext-mount.c\00"
@.str.4 = [7 x i8] c"sfpath\00"
@.str.5 = [37 x i8] c"Error (%s:%d): Can't get sfpath env\0A\00"
@EEXIST = global i64 0
@.str.6 = [42 x i8] c"Error (%s:%d): Can't make mountpoint: %m\0A\00"
@.str.7 = [7 x i8] c"/%s/%s\00"
@.str.8 = [16 x i8] c"Mount %s -> %s\0A\00"
@MS_BIND = global i32 0
@.str.9 = [37 x i8] c"Error (%s:%d): Can't bind mount: %m\0A\00"
define i32 @cr_plugin_restore_ext_mount(i32 %0, i8* %1, i8* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca [64 x i8]
%12 = alloca [256 x i8]
%13 = alloca i8*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32* %3, i32** %9
%14 = load i32, i32* %6
%15 = call i32 (i32, i8*, ...) @print_on_level(i32 3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%17 = load i32, i32* %6
%18 = call i32 (i8*, i8*, ...) @sprintf(i8* %16, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %17)
%19 = call i32 (...) @criu_get_image_dir()
%20 = getelementptr inbounds [64 x i8], [64 x i8]* %11, i64 0, i64 0
%21 = load i32, i32* @O_RDONLY
%22 = call i32 @openat(i32 %19, i8* %20, i32 %21)
store i32 %22, i32* %10
%23 = load i32, i32* %10
%24 = icmp slt i32 %23, 0
br i1 %24, label %25, label %34
25: ; preds = %4
%26 = load i64, i64* @errno
%27 = load i64, i64* @ENOENT
%28 = icmp eq i64 %26, %27
br i1 %28, label %29, label %32
29: ; preds = %25
%30 = load i32, i32* @ENOTSUP
%31 = sub nsw i32 0, %30
store i32 %31, i32* %5
br label %74
32: ; preds = %25
%33 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 72)
store i32 -1, i32* %5
br label %74
34: ; preds = %4
%35 = load i32, i32* %10
%36 = call i32 @close(i32 %35)
%37 = call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
store i8* %37, i8** %13
%38 = load i8*, i8** %13
%39 = icmp ne i8* %38, null
br i1 %39, label %42, label %40
40: ; preds = %34
%41 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 79)
store i32 -1, i32* %5
br label %74
42: ; preds = %34
%43 = load i8*, i8** %7
%44 = call i64 @creat(i8* %43, i32 384)
%45 = icmp slt i64 %44, 0
br i1 %45, label %46, label %53
46: ; preds = %42
%47 = load i64, i64* @errno
%48 = load i64, i64* @EEXIST
%49 = icmp ne i64 %47, %48
br i1 %49, label %50, label %52
50: ; preds = %46
%51 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 85)
store i32 -1, i32* %5
br label %74
52: ; preds = %46
br label %53
53: ; preds = %52, %42
%54 = load i32*, i32** %9
%55 = icmp ne i32* %54, null
br i1 %55, label %56, label %58
56: ; preds = %53
%57 = load i32*, i32** %9
store i32 1, i32* %57
br label %58
58: ; preds = %56, %53
%59 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%60 = load i8*, i8** %8
%61 = load i8*, i8** %13
%62 = call i32 (i8*, i8*, ...) @sprintf(i8* %59, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* %60, i8* %61)
%63 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%64 = load i8*, i8** %7
%65 = call i32 (i32, i8*, ...) @print_on_level(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %63, i8* %64)
%66 = getelementptr inbounds [256 x i8], [256 x i8]* %12, i64 0, i64 0
%67 = load i8*, i8** %7
%68 = load i32, i32* @MS_BIND
%69 = call i64 @mount(i8* %66, i8* %67, i32* null, i32 %68, i32* null)
%70 = icmp slt i64 %69, 0
br i1 %70, label %71, label %73
71: ; preds = %58
%72 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 96)
store i32 -1, i32* %5
br label %74
73: ; preds = %58
store i32 0, i32* %5
br label %74
74: ; preds = %73, %71, %50, %40, %32, %29
%75 = load i32, i32* %5
ret i32 %75
}

LLVM IR (-O2):
@.str = [24 x i8] c"Restoring my mount %d?\0A\00"
@.str.1 = [22 x i8] c"ext-mount-test-%d.img\00"
@O_RDONLY = global i32 0
@errno = global i64 0
@ENOENT = global i64 0
@ENOTSUP = global i32 0
@.str.2 = [40 x i8] c"Error (%s:%d): Can't open my image: %m\0A\00"
@.str.3 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/kawamuray/criu/refs/heads/master/test/mounts/ext/ext-mount.c\00"
@.str.4 = [7 x i8] c"sfpath\00"
@.str.5 = [37 x i8] c"Error (%s:%d): Can't get sfpath env\0A\00"
@EEXIST = global i64 0
@.str.6 = [42 x i8] c"Error (%s:%d): Can't make mountpoint: %m\0A\00"
@.str.7 = [7 x i8] c"/%s/%s\00"
@.str.8 = [16 x i8] c"Mount %s -> %s\0A\00"
@MS_BIND = global i32 0
@.str.9 = [37 x i8] c"Error (%s:%d): Can't bind mount: %m\0A\00"
define i32 @cr_plugin_restore_ext_mount(i32 %0, i8* %1, i8* %2, i32* writeonly %3) {
%5 = alloca [64 x i8]
%6 = alloca [256 x i8]
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%9 = tail call i32 (i32, i8*, ...) @print_on_level(i32 3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %0)
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%11 = tail call i32 (...) @criu_get_image_dir()
%12 = load i32, i32* @O_RDONLY
%13 = call i32 @openat(i32 %11, i8* %7, i32 %12)
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %24
15: ; preds = %4
%16 = load i64, i64* @errno
%17 = load i64, i64* @ENOENT
%18 = icmp eq i64 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* @ENOTSUP
%21 = sub nsw i32 0, %20
br label %50
22: ; preds = %15
%23 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 72)
br label %50
24: ; preds = %4
%25 = call i32 @close(i32 %13)
%26 = call i8* @getenv(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%27 = icmp eq i8* %26, null
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 79)
br label %50
30: ; preds = %24
%31 = call i64 @creat(i8* %1, i32 384)
%32 = icmp slt i64 %31, 0
br i1 %32, label %33, label %39
33: ; preds = %30
%34 = load i64, i64* @errno
%35 = load i64, i64* @EEXIST
%36 = icmp eq i64 %34, %35
br i1 %36, label %39, label %37
37: ; preds = %33
%38 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 85)
br label %50
39: ; preds = %33, %30
%40 = icmp eq i32* %3, null
br i1 %40, label %42, label %41
41: ; preds = %39
store i32 1, i32* %3
br label %42
42: ; preds = %41, %39
%43 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* %2, i8* %26)
%44 = call i32 (i32, i8*, ...) @print_on_level(i32 3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.8, i64 0, i64 0), i8* %8, i8* %1)
%45 = load i32, i32* @MS_BIND
%46 = call i64 @mount(i8* %8, i8* %1, i32* null, i32 %45, i32* null)
%47 = icmp slt i64 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %42
%49 = call i32 (i32, i8*, ...) @print_on_level(i32 1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.3, i64 0, i64 0), i32 96)
br label %50
50: ; preds = %42, %48, %37, %28, %22, %19
%51 = phi i32 [ %21, %19 ], [ -1, %22 ], [ -1, %37 ], [ -1, %48 ], [ -1, %28 ], [ 0, %42 ]
ret i32 %51
}