#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 pid_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ md5_stream(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ perror(char *);
int readlink(char *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char);
int /*<<< orphan*/ strcat(char *, char *);
int calc_md5(pid_t pid, char *hash, char *real_path) {
  FILE *file;
  int err, i;
  char tmphash[40], tmp[10];
  char link_path[4096] = "/proc/";
  sprintf(tmp, "%d", pid);
  strcat(link_path, tmp);
  strcat(link_path, "/exe");
  if ((err = readlink(link_path, real_path, 4096)) == -1) {
    perror("      OOPS. Error when trying to readlink() /proc: ");
    return -1;
  }
  real_path[err] = '\0';
  if ((file = fopen(real_path, "r")) == NULL) {
    perror("      OOPS. Error when trying to fopen() /proc file: ");
    return -1;
  }
  md5_stream(file, tmphash);
  hash[0] = '\0';
  tmp[0] = '\0';
  for (i = 0; i < 16; i++) {
    sprintf(tmp, "%02x", tmphash[i] & 0xff);
    strcat(hash, tmp);
  }
  hash[32] = '\0';
  fclose(file);
  return 0;
}


x86 assembly (clang, -O0):
<calc_md5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1060,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1060(%rbp),%rdi
xor    %esi,%esi
mov    $0x1000,%edx
call   1050 <memset@plt>
movb   $0x2f,-0x1060(%rbp)
movb   $0x70,-0x105f(%rbp)
movb   $0x72,-0x105e(%rbp)
movb   $0x6f,-0x105d(%rbp)
movb   $0x63,-0x105c(%rbp)
movb   $0x2f,-0x105b(%rbp)
lea    -0x5a(%rbp),%rdi
mov    -0x8(%rbp),%eax
lea    0xe1f(%rip),%rsi
movsbl %al,%edx
call   10a0 <sprintf@plt>
lea    -0x1060(%rbp),%rdi
lea    -0x5a(%rbp),%rsi
call   1080 <strcat@plt>
lea    -0x1060(%rbp),%rdi
lea    0xdfc(%rip),%rsi
call   1080 <strcat@plt>
lea    -0x1060(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1000,%edx
call   1030 <readlink@plt>
mov    %eax,-0x24(%rbp)
cmp    $0xffffffff,%eax
jne    1245 <calc_md5+0xc5>
lea    0xdd4(%rip),%rdi
call   1070 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1304 <calc_md5+0x184>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
lea    0xde0(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1287 <calc_md5+0x107>
lea    0xdc8(%rip),%rdi
call   1070 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1304 <calc_md5+0x184>
mov    -0x20(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1090 <md5_stream@plt>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
movb   $0x0,-0x5a(%rbp)
movl   $0x0,-0x28(%rbp)
cmpl   $0x10,-0x28(%rbp)
jge    12ec <calc_md5+0x16c>
lea    -0x5a(%rbp),%rdi
movslq -0x28(%rbp),%rax
movsbl -0x50(%rbp,%rax,1),%eax
and    $0xff,%eax
lea    0xdab(%rip),%rsi
movsbl %al,%edx
call   10a0 <sprintf@plt>
mov    -0x10(%rbp),%rdi
lea    -0x5a(%rbp),%rsi
call   1080 <strcat@plt>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    12a6 <calc_md5+0x126>
mov    -0x10(%rbp),%rax
movb   $0x0,0x20(%rax)
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1060,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_md5>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1040,%rsp
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %edi,%ebp
lea    0x40(%rsp),%r14
mov    $0x1000,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
movl   $0x6f72702f,0x40(%rsp)
6f
movw   $0x2f63,0x44(%rsp)
movsbl %bpl,%edx
lea    0xe3b(%rip),%rsi
lea    0x36(%rsp),%rbp
mov    %rbp,%rdi
call   10a0 <sprintf@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
call   1080 <strcat@plt>
lea    0xe1f(%rip),%rsi
mov    %r14,%rdi
call   1080 <strcat@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x1000,%edx
call   1030 <readlink@plt>
cmp    $0xffffffff,%eax
je     1414 <calc_md5+0x294>
cltq
movb   $0x0,(%rbx,%rax,1)
lea    0xe2a(%rip),%rsi
mov    %rbx,%rdi
call   1060 <fopen@plt>
test   %rax,%rax
je     141d <calc_md5+0x29d>
mov    %rax,%r14
mov    %rsp,%rsi
mov    %rax,%rdi
call   1090 <md5_stream@plt>
movb   $0x0,(%r15)
movb   $0x0,0x36(%rsp)
movsbl (%rsp),%edx
lea    0xe2f(%rip),%r12
lea    0x36(%rsp),%rbx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x1(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x2(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x3(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x4(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x5(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x6(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x7(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x8(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0x9(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0xa(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0xb(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0xc(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0xd(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0xe(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movsbl 0xf(%rsp),%edx
mov    %rbx,%rdi
mov    %r12,%rsi
call   10a0 <sprintf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1080 <strcat@plt>
movb   $0x0,0x20(%r15)
mov    %r14,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x1040,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xbed(%rip),%rdi
jmp    1424 <calc_md5+0x2a4>
lea    0xc1a(%rip),%rdi
call   1070 <perror@plt>
mov    $0xffffffff,%eax
jmp    1404 <calc_md5+0x284>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"/exe\00"
@.str.2 = [52 x i8] c" OOPS. Error when trying to readlink() /proc: \00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [54 x i8] c" OOPS. Error when trying to fopen() /proc file: \00"
@.str.5 = [5 x i8] c"%02x\00"
define i32 @calc_md5(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca [40 x i8]
%12 = alloca [10 x i8]
%13 = alloca [4096 x i8]
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%14 = bitcast [4096 x i8]* %13 to i8*
%15 = bitcast i8* %14 to [4096 x i8]*
%16 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i32 0, i32 0
store i8 47, i8* %16
%17 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i32 0, i32 1
store i8 112, i8* %17
%18 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i32 0, i32 2
store i8 114, i8* %18
%19 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i32 0, i32 3
store i8 111, i8* %19
%20 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i32 0, i32 4
store i8 99, i8* %20
%21 = getelementptr inbounds [4096 x i8], [4096 x i8]* %15, i32 0, i32 5
store i8 47, i8* %21
%22 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%23 = load i32, i32* %5
%24 = trunc i32 %23 to i8
%25 = call i32 @sprintf(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %24)
%26 = getelementptr inbounds [4096 x i8], [4096 x i8]* %13, i64 0, i64 0
%27 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%28 = call i32 @strcat(i8* %26, i8* %27)
%29 = getelementptr inbounds [4096 x i8], [4096 x i8]* %13, i64 0, i64 0
%30 = call i32 @strcat(i8* %29, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%31 = getelementptr inbounds [4096 x i8], [4096 x i8]* %13, i64 0, i64 0
%32 = load i8*, i8** %7
%33 = call i32 @readlink(i8* %31, i8* %32, i32 4096)
store i32 %33, i32* %9
%34 = icmp eq i32 %33, -1
br i1 %34, label %35, label %37
35: ; preds = %3
%36 = call i32 @perror(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %4
br label %78
37: ; preds = %3
%38 = load i8*, i8** %7
%39 = load i32, i32* %9
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %38, i64 %40
store i8 0, i8* %41
%42 = load i8*, i8** %7
%43 = call i32* @fopen(i8* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %43, i32** %8
%44 = icmp eq i32* %43, null
br i1 %44, label %45, label %47
45: ; preds = %37
%46 = call i32 @perror(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
store i32 -1, i32* %4
br label %78
47: ; preds = %37
%48 = load i32*, i32** %8
%49 = getelementptr inbounds [40 x i8], [40 x i8]* %11, i64 0, i64 0
%50 = call i32 @md5_stream(i32* %48, i8* %49)
%51 = load i8*, i8** %6
%52 = getelementptr inbounds i8, i8* %51, i64 0
store i8 0, i8* %52
%53 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
store i8 0, i8* %53
store i32 0, i32* %10
br label %54
54: ; preds = %70, %47
%55 = load i32, i32* %10
%56 = icmp slt i32 %55, 16
br i1 %56, label %57, label %73
57: ; preds = %54
%58 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%59 = load i32, i32* %10
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [40 x i8], [40 x i8]* %11, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = and i32 %63, 255
%65 = trunc i32 %64 to i8
%66 = call i32 @sprintf(i8* %58, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %65)
%67 = load i8*, i8** %6
%68 = getelementptr inbounds [10 x i8], [10 x i8]* %12, i64 0, i64 0
%69 = call i32 @strcat(i8* %67, i8* %68)
br label %70
70: ; preds = %57
%71 = load i32, i32* %10
%72 = add nsw i32 %71, 1
store i32 %72, i32* %10
br label %54
73: ; preds = %54
%74 = load i8*, i8** %6
%75 = getelementptr inbounds i8, i8* %74, i64 32
store i8 0, i8* %75
%76 = load i32*, i32** %8
%77 = call i32 @fclose(i32* %76)
store i32 0, i32* %4
br label %78
78: ; preds = %73, %45, %35
%79 = load i32, i32* %4
ret i32 %79
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"/exe\00"
@.str.2 = [52 x i8] c" OOPS. Error when trying to readlink() /proc: \00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [54 x i8] c" OOPS. Error when trying to fopen() /proc file: \00"
@.str.5 = [5 x i8] c"%02x\00"
define i32 @calc_md5(i32 %0, i8* %1, i8* nocapture %2) {
%4 = alloca [40 x i8]
%5 = alloca [10 x i8]
%6 = alloca [4096 x i8]
%7 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
store i8 47, i8* %9
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 1
store i8 112, i8* %10
%11 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 2
store i8 114, i8* %11
%12 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 3
store i8 111, i8* %12
%13 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 4
store i8 99, i8* %13
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 5
store i8 47, i8* %14
%15 = trunc i32 %0 to i8
%16 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %15)
%17 = call i32 @strcat(i8* %9, i8* %8)
%18 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%19 = call i32 @readlink(i8* %9, i8* %2, i32 4096)
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %23
21: ; preds = %3
%22 = call i32 @perror(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0))
br label %97
23: ; preds = %3
%24 = sext i32 %19 to i64
%25 = getelementptr inbounds i8, i8* %2, i64 %24
store i8 0, i8* %25
%26 = call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%27 = icmp eq i32* %26, null
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = call i32 @perror(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.4, i64 0, i64 0))
br label %97
30: ; preds = %23
%31 = call i32 @md5_stream(i32* %26, i8* %7)
store i8 0, i8* %1
store i8 0, i8* %8
%32 = load i8, i8* %7
%33 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %32)
%34 = call i32 @strcat(i8* %1, i8* %8)
%35 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 1
%36 = load i8, i8* %35
%37 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %36)
%38 = call i32 @strcat(i8* %1, i8* %8)
%39 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 2
%40 = load i8, i8* %39
%41 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %40)
%42 = call i32 @strcat(i8* %1, i8* %8)
%43 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 3
%44 = load i8, i8* %43
%45 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %44)
%46 = call i32 @strcat(i8* %1, i8* %8)
%47 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 4
%48 = load i8, i8* %47
%49 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %48)
%50 = call i32 @strcat(i8* %1, i8* %8)
%51 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 5
%52 = load i8, i8* %51
%53 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %52)
%54 = call i32 @strcat(i8* %1, i8* %8)
%55 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 6
%56 = load i8, i8* %55
%57 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %56)
%58 = call i32 @strcat(i8* %1, i8* %8)
%59 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 7
%60 = load i8, i8* %59
%61 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %60)
%62 = call i32 @strcat(i8* %1, i8* %8)
%63 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 8
%64 = load i8, i8* %63
%65 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %64)
%66 = call i32 @strcat(i8* %1, i8* %8)
%67 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 9
%68 = load i8, i8* %67
%69 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %68)
%70 = call i32 @strcat(i8* %1, i8* %8)
%71 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 10
%72 = load i8, i8* %71
%73 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %72)
%74 = call i32 @strcat(i8* %1, i8* %8)
%75 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 11
%76 = load i8, i8* %75
%77 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %76)
%78 = call i32 @strcat(i8* %1, i8* %8)
%79 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 12
%80 = load i8, i8* %79
%81 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %80)
%82 = call i32 @strcat(i8* %1, i8* %8)
%83 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 13
%84 = load i8, i8* %83
%85 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %84)
%86 = call i32 @strcat(i8* %1, i8* %8)
%87 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 14
%88 = load i8, i8* %87
%89 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %88)
%90 = call i32 @strcat(i8* %1, i8* %8)
%91 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 15
%92 = load i8, i8* %91
%93 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8 signext %92)
%94 = call i32 @strcat(i8* %1, i8* %8)
%95 = getelementptr inbounds i8, i8* %1, i64 32
store i8 0, i8* %95
%96 = call i32 @fclose(i32* %26)
br label %97
97: ; preds = %30, %28, %21
%98 = phi i32 [ -1, %21 ], [ -1, %28 ], [ 0, %30 ]
ret i32 %98
}