#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 uint32_t;
typedef int uint16_t;
typedef int /*<<< orphan*/ realfile;
typedef int /*<<< orphan*/ linkfile;
typedef int /*<<< orphan*/ dirname;

/* Variables and functions */
scalar_t__ EEXIST;
char *convert_key(char *, int);
scalar_t__ errno;
int /*<<< orphan*/ fatal(char *, char *, char *, ...);
scalar_t__ mkdir(char *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, ...);
int /*<<< orphan*/ strerror(scalar_t__);
scalar_t__ symlink(char *, char *);
int /*<<< orphan*/ unlink(char *);
int /*<<< orphan*/ verbose(char *, char *, char *);
void make_service_root(char *paramDir, uint16_t service_id, char *kind,
                       uint16_t elementary_pid, uint32_t carousel_id,
                       uint16_t module_id, char *key, uint32_t key_size) {
  char dirname[4096];
  char *ascii_key;
  char realfile[4096];
  char linkfile[4096];
  snprintf(dirname, sizeof(dirname), "%s", paramDir);
  if (mkdir(dirname, 0755) < 0 && errno != EEXIST)
    fatal("Unable to create services directory '%s': %s", dirname,
          strerror(errno));
  snprintf(dirname, sizeof(dirname), "%s/%s", paramDir, "services");
  if (mkdir(dirname, 0755) < 0 && errno != EEXIST)
    fatal("Unable to create services directory '%s': %s", dirname,
          strerror(errno));
  ascii_key = convert_key(key, key_size);
  if (paramDir[0] == '/') {
    snprintf(realfile, sizeof(realfile), "../../%s/%s/%u/%u/%s-%u-%s",
             paramDir + 1, "carousels", elementary_pid, carousel_id, kind,
             module_id, ascii_key);
  } else {
    snprintf(realfile, sizeof(realfile), "../../%s/%s/%u/%u/%s-%u-%s", paramDir,
             "carousels", elementary_pid, carousel_id, kind, module_id,
             ascii_key);
  }
  snprintf(linkfile, sizeof(linkfile), "%s/%u", dirname, service_id);
  unlink(linkfile);
  if (symlink(realfile, linkfile) < 0 && errno != EEXIST)
    fatal("Unable to create link '%s' to '%s': %s", linkfile, realfile,
          strerror(errno));
  verbose("Added service root '%s' -> '%s'\n", linkfile, realfile);
  return;
}


x86 assembly (clang, -O0):
<make_service_root>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x3078,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
mov    %r8d,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
lea    -0x1030(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1000,%esi
lea    0xecb(%rip),%rdx
mov    $0x0,%al
call   1070 <snprintf@plt>
lea    -0x1030(%rbp),%rdi
mov    $0x1ed,%esi
call   1050 <mkdir@plt>
cmp    $0x0,%rax
jge    1231 <make_service_root+0xb1>
mov    0x2def(%rip),%rax
mov    (%rax),%rax
mov    0x2ded(%rip),%rcx
cmp    (%rcx),%rax
je     1231 <make_service_root+0xb1>
lea    -0x1030(%rbp),%rax
mov    %rax,-0x3048(%rbp)
mov    0x2dc7(%rip),%rax
mov    (%rax),%rdi
call   1090 <strerror@plt>
mov    -0x3048(%rbp),%rsi
movslq %eax,%rdx
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   10a0 <fatal@plt>
lea    -0x1030(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1000,%esi
lea    0xde5(%rip),%rdx
lea    0xde4(%rip),%r8
mov    $0x0,%al
call   1070 <snprintf@plt>
lea    -0x1030(%rbp),%rdi
mov    $0x1ed,%esi
call   1050 <mkdir@plt>
cmp    $0x0,%rax
jge    12c0 <make_service_root+0x140>
mov    0x2d60(%rip),%rax
mov    (%rax),%rax
mov    0x2d5e(%rip),%rcx
cmp    (%rcx),%rax
je     12c0 <make_service_root+0x140>
lea    -0x1030(%rbp),%rax
mov    %rax,-0x3050(%rbp)
mov    0x2d38(%rip),%rax
mov    (%rax),%rdi
call   1090 <strerror@plt>
mov    -0x3050(%rbp),%rsi
movslq %eax,%rdx
lea    0xd47(%rip),%rdi
mov    $0x0,%al
call   10a0 <fatal@plt>
mov    0x10(%rbp),%rdi
mov    0x18(%rbp),%esi
call   1040 <convert_key@plt>
mov    %rax,-0x1038(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1339 <make_service_root+0x1b9>
lea    -0x2040(%rbp),%rdi
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%ebx
mov    -0x20(%rbp),%r11
mov    -0x2c(%rbp),%r10d
mov    -0x1038(%rbp),%rax
mov    $0x1000,%esi
lea    0xd28(%rip),%rdx
lea    0xd3c(%rip),%r8
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1070 <snprintf@plt>
jmp    1386 <make_service_root+0x206>
lea    -0x2040(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x24(%rbp),%r9d
mov    -0x28(%rbp),%ebx
mov    -0x20(%rbp),%r11
mov    -0x2c(%rbp),%r10d
mov    -0x1038(%rbp),%rax
mov    $0x1000,%esi
lea    0xcd6(%rip),%rdx
lea    0xcea(%rip),%r8
mov    %ebx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
mov    $0x0,%al
call   1070 <snprintf@plt>
lea    -0x3040(%rbp),%rdi
lea    -0x1030(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x1000,%esi
lea    0xcbd(%rip),%rdx
mov    $0x0,%al
call   1070 <snprintf@plt>
lea    -0x3040(%rbp),%rdi
call   1030 <unlink@plt>
lea    -0x2040(%rbp),%rdi
lea    -0x3040(%rbp),%rsi
call   1060 <symlink@plt>
cmp    $0x0,%rax
jge    1437 <make_service_root+0x2b7>
mov    0x2bfd(%rip),%rax
mov    (%rax),%rax
mov    0x2bfb(%rip),%rcx
cmp    (%rcx),%rax
je     1437 <make_service_root+0x2b7>
lea    -0x3040(%rbp),%rax
mov    %rax,-0x3060(%rbp)
lea    -0x2040(%rbp),%rax
mov    %rax,-0x3058(%rbp)
mov    0x2bc7(%rip),%rax
mov    (%rax),%rdi
call   1090 <strerror@plt>
mov    -0x3060(%rbp),%rsi
mov    -0x3058(%rbp),%rdx
mov    %eax,%ecx
lea    0xc37(%rip),%rdi
mov    $0x0,%al
call   10a0 <fatal@plt>
lea    -0x3040(%rbp),%rsi
lea    -0x2040(%rbp),%rdx
lea    0xc42(%rip),%rdi
call   1080 <verbose@plt>
add    $0x3078,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_service_root>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3028,%rsp
mov    %r9,0x10(%rsp)
mov    %r8,0x18(%rsp)
mov    %ecx,%r12d
mov    %rdx,%r13
mov    %esi,0xc(%rsp)
mov    %rdi,%rbx
lea    0xedc(%rip),%rdx
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x1000,%esi
mov    %rbx,%rcx
xor    %eax,%eax
call   1070 <snprintf@plt>
mov    %rbp,%rdi
mov    $0x1ed,%esi
call   1050 <mkdir@plt>
test   %rax,%rax
jns    1209 <make_service_root+0x89>
mov    0x2df9(%rip),%rax
mov    (%rax),%rdi
mov    0x2df7(%rip),%rax
cmp    (%rax),%rdi
je     1209 <make_service_root+0x89>
call   1090 <strerror@plt>
movslq %eax,%rdx
lea    0xe03(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   10a0 <fatal@plt>
mov    0x3068(%rsp),%r14d
mov    0x3060(%rsp),%r15
lea    0xe0d(%rip),%rdx
lea    0xe0c(%rip),%r8
lea    0x20(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x1000,%esi
mov    %rbx,%rcx
xor    %eax,%eax
call   1070 <snprintf@plt>
mov    %rbp,%rdi
mov    $0x1ed,%esi
call   1050 <mkdir@plt>
test   %rax,%rax
jns    1281 <make_service_root+0x101>
mov    0x2d81(%rip),%rax
mov    (%rax),%rdi
mov    0x2d7f(%rip),%rax
cmp    (%rax),%rdi
je     1281 <make_service_root+0x101>
call   1090 <strerror@plt>
movslq %eax,%rdx
lea    0xd8b(%rip),%rdi
lea    0x20(%rsp),%rsi
xor    %eax,%eax
call   10a0 <fatal@plt>
mov    %r15,%rdi
mov    %r14d,%esi
call   1040 <convert_key@plt>
mov    %rax,%rbp
xor    %ecx,%ecx
cmpb   $0x2f,(%rbx)
sete   %cl
add    %rbx,%rcx
lea    0xd9b(%rip),%rdx
lea    0xdaf(%rip),%r8
lea    0x2020(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1000,%esi
mov    %r12d,%r9d
xor    %eax,%eax
push   %rbp
push   0x18(%rsp)
push   %r13
push   0x30(%rsp)
call   1070 <snprintf@plt>
add    $0x20,%rsp
lea    0xd89(%rip),%rdx
lea    0x1020(%rsp),%rbp
lea    0x20(%rsp),%rcx
mov    %rbp,%rdi
mov    $0x1000,%esi
mov    0xc(%rsp),%r8d
xor    %eax,%eax
call   1070 <snprintf@plt>
mov    %rbp,%rdi
call   1030 <unlink@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1060 <symlink@plt>
test   %rax,%rax
jns    134c <make_service_root+0x1cc>
mov    0x2cc0(%rip),%rax
mov    (%rax),%rdi
mov    0x2cbe(%rip),%rax
cmp    (%rax),%rdi
je     134c <make_service_root+0x1cc>
call   1090 <strerror@plt>
lea    0xd34(%rip),%rdi
lea    0x1020(%rsp),%rsi
lea    0x2020(%rsp),%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   10a0 <fatal@plt>
lea    0xd3b(%rip),%rdi
lea    0x1020(%rsp),%rsi
lea    0x2020(%rsp),%rdx
call   1080 <verbose@plt>
add    $0x3028,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@errno = global i64 0
@EEXIST = global i64 0
@.str.1 = [45 x i8] c"Unable to create services directory '%s': %s\00"
@.str.2 = [6 x i8] c"%s/%s\00"
@.str.3 = [9 x i8] c"services\00"
@.str.4 = [27 x i8] c"../../%s/%s/%u/%u/%s-%u-%s\00"
@.str.5 = [10 x i8] c"carousels\00"
@.str.6 = [6 x i8] c"%s/%u\00"
@.str.7 = [39 x i8] c"Unable to create link '%s' to '%s': %s\00"
@.str.8 = [33 x i8] c"Added service root '%s' -> '%s'\0A\00"
define void @make_service_root(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca [4096 x i8]
%18 = alloca i8*
%19 = alloca [4096 x i8]
%20 = alloca [4096 x i8]
store i8* %0, i8** %9
store i32 %1, i32* %10
store i8* %2, i8** %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i8* %6, i8** %15
store i32 %7, i32* %16
%21 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%22 = load i8*, i8** %9
%23 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %21, i32 4096, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%25 = call i64 @mkdir(i8* %24, i32 493)
%26 = icmp slt i64 %25, 0
br i1 %26, label %27, label %38
27: ; preds = %8
%28 = load i64, i64* @errno
%29 = load i64, i64* @EEXIST
%30 = icmp ne i64 %28, %29
br i1 %30, label %31, label %38
31: ; preds = %27
%32 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%33 = load i64, i64* @errno
%34 = call i32 @strerror(i64 %33)
%35 = sext i32 %34 to i64
%36 = inttoptr i64 %35 to i8*
%37 = call i32 (i8*, i8*, i8*, ...) @fatal(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %32, i8* %36)
br label %38
38: ; preds = %31, %27, %8
%39 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%40 = load i8*, i8** %9
%41 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %39, i32 4096, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %40, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%42 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%43 = call i64 @mkdir(i8* %42, i32 493)
%44 = icmp slt i64 %43, 0
br i1 %44, label %45, label %56
45: ; preds = %38
%46 = load i64, i64* @errno
%47 = load i64, i64* @EEXIST
%48 = icmp ne i64 %46, %47
br i1 %48, label %49, label %56
49: ; preds = %45
%50 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%51 = load i64, i64* @errno
%52 = call i32 @strerror(i64 %51)
%53 = sext i32 %52 to i64
%54 = inttoptr i64 %53 to i8*
%55 = call i32 (i8*, i8*, i8*, ...) @fatal(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %50, i8* %54)
br label %56
56: ; preds = %49, %45, %38
%57 = load i8*, i8** %15
%58 = load i32, i32* %16
%59 = call i8* @convert_key(i8* %57, i32 %58)
store i8* %59, i8** %18
%60 = load i8*, i8** %9
%61 = getelementptr inbounds i8, i8* %60, i64 0
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 47
br i1 %64, label %65, label %75
65: ; preds = %56
%66 = getelementptr inbounds [4096 x i8], [4096 x i8]* %19, i64 0, i64 0
%67 = load i8*, i8** %9
%68 = getelementptr inbounds i8, i8* %67, i64 1
%69 = load i32, i32* %12
%70 = load i32, i32* %13
%71 = load i8*, i8** %11
%72 = load i32, i32* %14
%73 = load i8*, i8** %18
%74 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %66, i32 4096, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %68, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %69, i32 %70, i8* %71, i32 %72, i8* %73)
br label %84
75: ; preds = %56
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* %19, i64 0, i64 0
%77 = load i8*, i8** %9
%78 = load i32, i32* %12
%79 = load i32, i32* %13
%80 = load i8*, i8** %11
%81 = load i32, i32* %14
%82 = load i8*, i8** %18
%83 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %76, i32 4096, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %77, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %78, i32 %79, i8* %80, i32 %81, i8* %82)
br label %84
84: ; preds = %75, %65
%85 = getelementptr inbounds [4096 x i8], [4096 x i8]* %20, i64 0, i64 0
%86 = getelementptr inbounds [4096 x i8], [4096 x i8]* %17, i64 0, i64 0
%87 = load i32, i32* %10
%88 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %85, i32 4096, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %86, i32 %87)
%89 = getelementptr inbounds [4096 x i8], [4096 x i8]* %20, i64 0, i64 0
%90 = call i32 @unlink(i8* %89)
%91 = getelementptr inbounds [4096 x i8], [4096 x i8]* %19, i64 0, i64 0
%92 = getelementptr inbounds [4096 x i8], [4096 x i8]* %20, i64 0, i64 0
%93 = call i64 @symlink(i8* %91, i8* %92)
%94 = icmp slt i64 %93, 0
br i1 %94, label %95, label %105
95: ; preds = %84
%96 = load i64, i64* @errno
%97 = load i64, i64* @EEXIST
%98 = icmp ne i64 %96, %97
br i1 %98, label %99, label %105
99: ; preds = %95
%100 = getelementptr inbounds [4096 x i8], [4096 x i8]* %20, i64 0, i64 0
%101 = getelementptr inbounds [4096 x i8], [4096 x i8]* %19, i64 0, i64 0
%102 = load i64, i64* @errno
%103 = call i32 @strerror(i64 %102)
%104 = call i32 (i8*, i8*, i8*, ...) @fatal(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i8* %100, i8* %101, i32 %103)
br label %105
105: ; preds = %99, %95, %84
%106 = getelementptr inbounds [4096 x i8], [4096 x i8]* %20, i64 0, i64 0
%107 = getelementptr inbounds [4096 x i8], [4096 x i8]* %19, i64 0, i64 0
%108 = call i32 @verbose(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i8* %106, i8* %107)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@errno = global i64 0
@EEXIST = global i64 0
@.str.1 = [45 x i8] c"Unable to create services directory '%s': %s\00"
@.str.2 = [6 x i8] c"%s/%s\00"
@.str.3 = [9 x i8] c"services\00"
@.str.4 = [27 x i8] c"../../%s/%s/%u/%u/%s-%u-%s\00"
@.str.5 = [10 x i8] c"carousels\00"
@.str.6 = [6 x i8] c"%s/%u\00"
@.str.7 = [39 x i8] c"Unable to create link '%s' to '%s': %s\00"
@.str.8 = [33 x i8] c"Added service root '%s' -> '%s'\0A\00"
define void @make_service_root(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 %5, i8* %6, i32 %7) {
%9 = alloca [4096 x i8]
%10 = alloca [4096 x i8]
%11 = alloca [4096 x i8]
%12 = getelementptr inbounds [4096 x i8], [4096 x i8]* %9, i64 0, i64 0
%13 = getelementptr inbounds [4096 x i8], [4096 x i8]* %10, i64 0, i64 0
%14 = getelementptr inbounds [4096 x i8], [4096 x i8]* %11, i64 0, i64 0
%15 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %12, i32 4096, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%16 = call i64 @mkdir(i8* %12, i32 493)
%17 = icmp slt i64 %16, 0
br i1 %17, label %18, label %27
18: ; preds = %8
%19 = load i64, i64* @errno
%20 = load i64, i64* @EEXIST
%21 = icmp eq i64 %19, %20
br i1 %21, label %27, label %22
22: ; preds = %18
%23 = call i32 @strerror(i64 %19)
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to i8*
%26 = call i32 (i8*, i8*, i8*, ...) @fatal(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %12, i8* %25)
br label %27
27: ; preds = %22, %18, %8
%28 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %12, i32 4096, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%29 = call i64 @mkdir(i8* %12, i32 493)
%30 = icmp slt i64 %29, 0
br i1 %30, label %31, label %40
31: ; preds = %27
%32 = load i64, i64* @errno
%33 = load i64, i64* @EEXIST
%34 = icmp eq i64 %32, %33
br i1 %34, label %40, label %35
35: ; preds = %31
%36 = call i32 @strerror(i64 %32)
%37 = sext i32 %36 to i64
%38 = inttoptr i64 %37 to i8*
%39 = call i32 (i8*, i8*, i8*, ...) @fatal(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0), i8* %12, i8* %38)
br label %40
40: ; preds = %35, %31, %27
%41 = call i8* @convert_key(i8* %6, i32 %7)
%42 = load i8, i8* %0
%43 = icmp eq i8 %42, 47
%44 = zext i1 %43 to i64
%45 = getelementptr i8, i8* %0, i64 %44
%46 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %13, i32 4096, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %45, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0), i32 %3, i32 %4, i8* %2, i32 %5, i8* %41)
%47 = call i32 (i8*, i32, i8*, i8*, ...) @snprintf(i8* %14, i32 4096, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %12, i32 %1)
%48 = call i32 @unlink(i8* %14)
%49 = call i64 @symlink(i8* %13, i8* %14)
%50 = icmp slt i64 %49, 0
br i1 %50, label %51, label %58
51: ; preds = %40
%52 = load i64, i64* @errno
%53 = load i64, i64* @EEXIST
%54 = icmp eq i64 %52, %53
br i1 %54, label %58, label %55
55: ; preds = %51
%56 = call i32 @strerror(i64 %52)
%57 = call i32 (i8*, i8*, i8*, ...) @fatal(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.7, i64 0, i64 0), i8* %14, i8* %13, i32 %56)
br label %58
58: ; preds = %55, %51, %40
%59 = call i32 @verbose(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.8, i64 0, i64 0), i8* %14, i8* %13)
ret void
}