#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 */
typedef int key_t;

/* Variables and functions */
int errno;
int /*<<< orphan*/ printf(char *, ...);
char *shmat(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int shmget(int, int, int);
char *strerror(int);
int shm_rd() {
  int shmid;
  key_t key;
  char *shm, *s;
  key = 0x01122;
  errno = 0;
  if ((shmid = shmget(key, 27, 0666)) < 0) {
    do {
      printf("%s %d ",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/"
             "linux/process/shm/read.c",
             44);
      printf("errno = [%d], error = [%s]\n", errno, strerror(errno));
    } while (0);
    return -1;
  }
  errno = 0;
  if ((shm = shmat(shmid, NULL, 0)) == (char *)-1) {
    do {
      printf("%s %d ",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/"
             "linux/process/shm/read.c",
             50);
      printf("errno = [%d], error = [%s]\n", errno, strerror(errno));
    } while (0);
    return -2;
  }
  s = shm;
  int i = 0;
  for (i = 0; i < 27 - 1; i++)
    printf("%c ", *(s + i));
  printf("\n");
  s = NULL;
  return 0;
}


x86 assembly (clang, -O0):
<shm_rd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x1122,-0xc(%rbp)
mov    0x2e8a(%rip),%rax
movl   $0x0,(%rax)
mov    -0xc(%rbp),%edi
mov    $0x1b,%esi
mov    $0x1b6,%edx
call   1050 <shmget@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jge    11d3 <shm_rd+0x93>
jmp    117f <shm_rd+0x3f>
lea    0xe7a(%rip),%rdi
lea    0xe7a(%rip),%rsi
mov    $0x2c,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2e34(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x28(%rbp),%esi
mov    %rax,%rdx
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    12c0 <shm_rd+0x180>
mov    0x2e06(%rip),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1040 <shmat@plt>
mov    %rax,-0x18(%rbp)
mov    $0xffffffffffffffff,%rcx
cmp    %rcx,%rax
jne    125b <shm_rd+0x11b>
jmp    1207 <shm_rd+0xc7>
lea    0xdf2(%rip),%rdi
lea    0xdf2(%rip),%rsi
mov    $0x32,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2db8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    0x2dac(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    -0x2c(%rbp),%esi
mov    %rax,%rdx
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    12c0 <shm_rd+0x180>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x1a,-0x24(%rbp)
jge    12a3 <shm_rd+0x163>
mov    -0x20(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1271 <shm_rd+0x131>
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shm_rd>:
push   %r15
push   %r14
push   %rbx
mov    0x2e84(%rip),%r15
movl   $0x0,(%r15)
mov    $0x1122,%edi
mov    $0x1b,%esi
mov    $0x1b6,%edx
call   1060 <shmget@plt>
test   %eax,%eax
js     131f <shm_rd+0x1cf>
movl   $0x0,(%r15)
xor    %r14d,%r14d
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <shmat@plt>
cmp    $0xffffffffffffffff,%rax
je     135e <shm_rd+0x20e>
mov    %rax,%rbx
movsbl (%rax),%esi
lea    0xf12(%rip),%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x1(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x2(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x3(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x4(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x5(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x6(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x7(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x8(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x9(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xa(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xb(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xc(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xd(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xe(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0xf(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x10(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x11(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x12(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x13(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x14(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x15(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x16(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x17(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x18(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl 0x19(%rbx),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    139b <shm_rd+0x24b>
lea    0xcda(%rip),%rdi
lea    0xcda(%rip),%rsi
mov    $0x2c,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%ebx
mov    %ebx,%edi
call   1070 <strerror@plt>
lea    0xd57(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xffffffff,%r14d
jmp    139b <shm_rd+0x24b>
lea    0xc9b(%rip),%rdi
lea    0xc9b(%rip),%rsi
mov    $0x32,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r15),%ebx
mov    %ebx,%edi
call   1070 <strerror@plt>
lea    0xd18(%rip),%rdi
mov    %ebx,%esi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xfffffffe,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@errno = global i32 0
@.str = [7 x i8] c"%s %d \00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/linux/process/shm/read.c\00"
@.str.2 = [28 x i8] c"errno = [%d], error = [%s]\0A\00"
@.str.3 = [4 x i8] c"%c \00"
@.str.4 = [2 x i8] c"\0A\00"
define i32 @shm_rd() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i32 4386, i32* %3
store i32 0, i32* @errno
%7 = load i32, i32* %3
%8 = call i32 @shmget(i32 %7, i32 27, i32 438)
store i32 %8, i32* %2
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %0
br label %11
11: ; preds = %10
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0), i32 44)
%13 = load i32, i32* @errno
%14 = load i32, i32* @errno
%15 = call i8* @strerror(i32 %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %13, i8* %15)
br label %17
17: ; preds = %11
store i32 -1, i32* %1
br label %48
18: ; preds = %0
store i32 0, i32* @errno
%19 = load i32, i32* %2
%20 = call i8* @shmat(i32 %19, i32* null, i32 0)
store i8* %20, i8** %4
%21 = icmp eq i8* %20, inttoptr (i64 -1 to i8*)
br i1 %21, label %22, label %30
22: ; preds = %18
br label %23
23: ; preds = %22
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0), i32 50)
%25 = load i32, i32* @errno
%26 = load i32, i32* @errno
%27 = call i8* @strerror(i32 %26)
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %25, i8* %27)
br label %29
29: ; preds = %23
store i32 -2, i32* %1
br label %48
30: ; preds = %18
%31 = load i8*, i8** %4
store i8* %31, i8** %5
store i32 0, i32* %6
store i32 0, i32* %6
br label %32
32: ; preds = %43, %30
%33 = load i32, i32* %6
%34 = icmp slt i32 %33, 26
br i1 %34, label %35, label %46
35: ; preds = %32
%36 = load i8*, i8** %5
%37 = load i32, i32* %6
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %35
%44 = load i32, i32* %6
%45 = add nsw i32 %44, 1
store i32 %45, i32* %6
br label %32
46: ; preds = %32
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i8* null, i8** %5
store i32 0, i32* %1
br label %48
48: ; preds = %46, %29, %17
%49 = load i32, i32* %1
ret i32 %49
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [7 x i8] c"%s %d \00"
@.str.1 = [154 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/linux/process/shm/read.c\00"
@.str.2 = [28 x i8] c"errno = [%d], error = [%s]\0A\00"
@.str.3 = [4 x i8] c"%c \00"
define i32 @shm_rd() {
store i32 0, i32* @errno
%1 = tail call i32 @shmget(i32 4386, i32 27, i32 438)
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0), i32 44)
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %5, i8* %6)
br label %121
8: ; preds = %0
store i32 0, i32* @errno
%9 = tail call i8* @shmat(i32 %1, i32* null, i32 0)
%10 = icmp eq i8* %9, inttoptr (i64 -1 to i8*)
br i1 %10, label %116, label %11
11: ; preds = %8
%12 = load i8, i8* %9
%13 = sext i8 %12 to i32
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds i8, i8* %9, i64 1
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds i8, i8* %9, i64 2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = getelementptr inbounds i8, i8* %9, i64 3
%24 = load i8, i8* %23
%25 = sext i8 %24 to i32
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %25)
%27 = getelementptr inbounds i8, i8* %9, i64 4
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = getelementptr inbounds i8, i8* %9, i64 5
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %33)
%35 = getelementptr inbounds i8, i8* %9, i64 6
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %37)
%39 = getelementptr inbounds i8, i8* %9, i64 7
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %41)
%43 = getelementptr inbounds i8, i8* %9, i64 8
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds i8, i8* %9, i64 9
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %49)
%51 = getelementptr inbounds i8, i8* %9, i64 10
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %53)
%55 = getelementptr inbounds i8, i8* %9, i64 11
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %57)
%59 = getelementptr inbounds i8, i8* %9, i64 12
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %61)
%63 = getelementptr inbounds i8, i8* %9, i64 13
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %65)
%67 = getelementptr inbounds i8, i8* %9, i64 14
%68 = load i8, i8* %67
%69 = sext i8 %68 to i32
%70 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %69)
%71 = getelementptr inbounds i8, i8* %9, i64 15
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %73)
%75 = getelementptr inbounds i8, i8* %9, i64 16
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %77)
%79 = getelementptr inbounds i8, i8* %9, i64 17
%80 = load i8, i8* %79
%81 = sext i8 %80 to i32
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %81)
%83 = getelementptr inbounds i8, i8* %9, i64 18
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %85)
%87 = getelementptr inbounds i8, i8* %9, i64 19
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %89)
%91 = getelementptr inbounds i8, i8* %9, i64 20
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %93)
%95 = getelementptr inbounds i8, i8* %9, i64 21
%96 = load i8, i8* %95
%97 = sext i8 %96 to i32
%98 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %97)
%99 = getelementptr inbounds i8, i8* %9, i64 22
%100 = load i8, i8* %99
%101 = sext i8 %100 to i32
%102 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %101)
%103 = getelementptr inbounds i8, i8* %9, i64 23
%104 = load i8, i8* %103
%105 = sext i8 %104 to i32
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %105)
%107 = getelementptr inbounds i8, i8* %9, i64 24
%108 = load i8, i8* %107
%109 = sext i8 %108 to i32
%110 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %109)
%111 = getelementptr inbounds i8, i8* %9, i64 25
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %113)
%115 = tail call i32 @putchar(i32 10)
br label %121
116: ; preds = %8
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([154 x i8], [154 x i8]* @.str.1, i64 0, i64 0), i32 50)
%118 = load i32, i32* @errno
%119 = tail call i8* @strerror(i32 %118)
%120 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0), i32 %118, i8* %119)
br label %121
121: ; preds = %11, %116, %3
%122 = phi i32 [ -1, %3 ], [ -2, %116 ], [ 0, %11 ]
ret i32 %122
}