#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 */
int /*<<< orphan*/ err(int, char *, char *);
scalar_t__ mkdir(char *, int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ rmdir(char *);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
int strlen(char const *);
int main(void) {
  int i;
  const char *onename = "testdir";
  char dirname[512];
  strcpy(dirname, onename);
  for (i = 0; i < 5; i++) {
    printf("Creating directory: %s\n", dirname);
    if (mkdir(dirname, 0755)) {
      err(1, "%s: mkdir", dirname);
    }
    strcat(dirname, "/");
    strcat(dirname, onename);
  }
  printf("Passed directory creation test.\n");
  for (i = 0; i < 5; i++) {
    dirname[strlen(dirname) - strlen(onename) - 1] = 0;
    printf("Removing directory: %s\n", dirname);
    if (rmdir(dirname)) {
      err(1, "%s: rmdir", dirname);
    }
  }
  printf("Passed directory removal test.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe77(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    1227 <main+0xb7>
lea    -0x210(%rbp),%rsi
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x210(%rbp),%rdi
mov    $0x1ed,%esi
call   1040 <mkdir@plt>
cmp    $0x0,%rax
je     11f6 <main+0x86>
lea    -0x210(%rbp),%rdx
mov    $0x1,%edi
lea    0xe2f(%rip),%rsi
call   1080 <err@plt>
lea    -0x210(%rbp),%rdi
lea    0xe26(%rip),%rsi
call   1090 <strcat@plt>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1090 <strcat@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a4 <main+0x34>
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jge    12ce <main+0x15e>
lea    -0x210(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x214(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x214(%rbp),%eax
sub    %ecx,%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x210(%rbp,%rax,1)
lea    -0x210(%rbp),%rsi
lea    0xdc7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x210(%rbp),%rdi
call   1050 <rmdir@plt>
cmp    $0x0,%rax
je     12bb <main+0x14b>
lea    -0x210(%rbp),%rdx
mov    $0x1,%edi
lea    0xdaf(%rip),%rsi
call   1080 <err@plt>
jmp    12c0 <main+0x150>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    123c <main+0xcc>
lea    0xd9a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
xor    %eax,%eax
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x200,%rsp
lea    0xe6e(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe64(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    $0x1ed,%esi
call   1040 <mkdir@plt>
test   %rax,%rax
je     11d4 <main+0x54>
lea    0xe59(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
lea    0xe4f(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xe13(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xe0c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    $0x1ed,%esi
call   1040 <mkdir@plt>
test   %rax,%rax
je     122c <main+0xac>
lea    0xe01(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
lea    0xdf7(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xdbb(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xdb4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    $0x1ed,%esi
call   1040 <mkdir@plt>
test   %rax,%rax
je     1284 <main+0x104>
lea    0xda9(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
lea    0xd9f(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xd63(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xd5c(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    $0x1ed,%esi
call   1040 <mkdir@plt>
test   %rax,%rax
je     12dc <main+0x15c>
lea    0xd51(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
lea    0xd47(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xd0b(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xd04(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
mov    $0x1ed,%esi
call   1040 <mkdir@plt>
test   %rax,%rax
je     1334 <main+0x1b4>
lea    0xcf9(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
lea    0xcef(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   10a0 <strcat@plt>
lea    0xcb3(%rip),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   10a0 <strcat@plt>
lea    0xcef(%rip),%rdi
call   1050 <puts@plt>
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1070 <strlen@plt>
not    %eax
add    %ebp,%eax
cltq
movb   $0x0,(%rsp,%rax,1)
lea    0xca5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   1060 <rmdir@plt>
test   %rax,%rax
je     13b2 <main+0x232>
lea    0xc9f(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %eax,%ebp
lea    0xc3a(%rip),%rdi
call   1070 <strlen@plt>
not    %eax
add    %ebp,%eax
cltq
movb   $0x0,(%rsp,%rax,1)
lea    0xc50(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   1060 <rmdir@plt>
test   %rax,%rax
je     1407 <main+0x287>
lea    0xc4a(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %eax,%ebp
lea    0xbe5(%rip),%rdi
call   1070 <strlen@plt>
not    %eax
add    %ebp,%eax
cltq
movb   $0x0,(%rsp,%rax,1)
lea    0xbfb(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   1060 <rmdir@plt>
test   %rax,%rax
je     145c <main+0x2dc>
lea    0xbf5(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %eax,%ebp
lea    0xb90(%rip),%rdi
call   1070 <strlen@plt>
not    %eax
add    %ebp,%eax
cltq
movb   $0x0,(%rsp,%rax,1)
lea    0xba6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   1060 <rmdir@plt>
test   %rax,%rax
je     14b1 <main+0x331>
lea    0xba0(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1070 <strlen@plt>
mov    %eax,%ebp
lea    0xb3b(%rip),%rdi
call   1070 <strlen@plt>
not    %eax
add    %ebp,%eax
cltq
movb   $0x0,(%rsp,%rax,1)
lea    0xb51(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1080 <printf@plt>
mov    %rbx,%rdi
call   1060 <rmdir@plt>
test   %rax,%rax
je     1506 <main+0x386>
lea    0xb4b(%rip),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1090 <err@plt>
lea    0xb61(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"testdir\00"
@.str.1 = [24 x i8] c"Creating directory: %s\0A\00"
@.str.2 = [10 x i8] c"%s: mkdir\00"
@.str.3 = [2 x i8] c"/\00"
@.str.4 = [33 x i8] c"Passed directory creation test.\0A\00"
@.str.5 = [24 x i8] c"Removing directory: %s\0A\00"
@.str.6 = [10 x i8] c"%s: rmdir\00"
@.str.7 = [32 x i8] c"Passed directory removal test.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [512 x i8]
store i32 0, i32* %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = load i8*, i8** %3
%7 = call i32 @strcpy(i8* %5, i8* %6)
store i32 0, i32* %2
br label %8
8: ; preds = %26, %0
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 5
br i1 %10, label %11, label %29
11: ; preds = %8
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%15 = call i64 @mkdir(i8* %14, i32 493)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %11
%18 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%19 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %18)
br label %20
20: ; preds = %17, %11
%21 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%22 = call i32 @strcat(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%23 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%24 = load i8*, i8** %3
%25 = call i32 @strcat(i8* %23, i8* %24)
br label %26
26: ; preds = %20
%27 = load i32, i32* %2
%28 = add nsw i32 %27, 1
store i32 %28, i32* %2
br label %8
29: ; preds = %8
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %2
br label %31
31: ; preds = %52, %29
%32 = load i32, i32* %2
%33 = icmp slt i32 %32, 5
br i1 %33, label %34, label %55
34: ; preds = %31
%35 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%36 = call i32 @strlen(i8* %35)
%37 = load i8*, i8** %3
%38 = call i32 @strlen(i8* %37)
%39 = sub nsw i32 %36, %38
%40 = sub nsw i32 %39, 1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 %41
store i8 0, i8* %42
%43 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %43)
%45 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%46 = call i64 @rmdir(i8* %45)
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %34
%49 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%50 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %49)
br label %51
51: ; preds = %48, %34
br label %52
52: ; preds = %51
%53 = load i32, i32* %2
%54 = add nsw i32 %53, 1
store i32 %54, i32* %2
br label %31
55: ; preds = %31
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.7, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"testdir\00"
@.str.1 = [24 x i8] c"Creating directory: %s\0A\00"
@.str.2 = [10 x i8] c"%s: mkdir\00"
@.str.3 = [2 x i8] c"/\00"
@.str.5 = [24 x i8] c"Removing directory: %s\0A\00"
@.str.6 = [10 x i8] c"%s: rmdir\00"
@str = [32 x i8] c"Passed directory creation test.\00"
@str.8 = [31 x i8] c"Passed directory removal test.\00"
define i32 @main() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i64 @mkdir(i8* %2, i32 493)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %9
9: ; preds = %7, %0
%10 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%13 = call i64 @mkdir(i8* %2, i32 493)
%14 = icmp eq i64 %13, 0
br i1 %14, label %17, label %15
15: ; preds = %9
%16 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %17
17: ; preds = %15, %9
%18 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%21 = call i64 @mkdir(i8* %2, i32 493)
%22 = icmp eq i64 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %17
%24 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %25
25: ; preds = %23, %17
%26 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%27 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%29 = call i64 @mkdir(i8* %2, i32 493)
%30 = icmp eq i64 %29, 0
br i1 %30, label %33, label %31
31: ; preds = %25
%32 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %33
33: ; preds = %31, %25
%34 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%37 = call i64 @mkdir(i8* %2, i32 493)
%38 = icmp eq i64 %37, 0
br i1 %38, label %41, label %39
39: ; preds = %33
%40 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* %2)
br label %41
41: ; preds = %39, %33
%42 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%43 = call i32 @strcat(i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%44 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%45 = call i32 @strlen(i8* %2)
%46 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%47 = xor i32 %46, -1
%48 = add i32 %45, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %49
store i8 0, i8* %50
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%52 = call i64 @rmdir(i8* %2)
%53 = icmp eq i64 %52, 0
br i1 %53, label %56, label %54
54: ; preds = %41
%55 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %56
56: ; preds = %41, %54
%57 = call i32 @strlen(i8* %2)
%58 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%59 = xor i32 %58, -1
%60 = add i32 %57, %59
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %61
store i8 0, i8* %62
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%64 = call i64 @rmdir(i8* %2)
%65 = icmp eq i64 %64, 0
br i1 %65, label %68, label %66
66: ; preds = %56
%67 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %68
68: ; preds = %66, %56
%69 = call i32 @strlen(i8* %2)
%70 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%71 = xor i32 %70, -1
%72 = add i32 %69, %71
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %73
store i8 0, i8* %74
%75 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%76 = call i64 @rmdir(i8* %2)
%77 = icmp eq i64 %76, 0
br i1 %77, label %80, label %78
78: ; preds = %68
%79 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %80
80: ; preds = %78, %68
%81 = call i32 @strlen(i8* %2)
%82 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%83 = xor i32 %82, -1
%84 = add i32 %81, %83
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %85
store i8 0, i8* %86
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%88 = call i64 @rmdir(i8* %2)
%89 = icmp eq i64 %88, 0
br i1 %89, label %92, label %90
90: ; preds = %80
%91 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %92
92: ; preds = %90, %80
%93 = call i32 @strlen(i8* %2)
%94 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%95 = xor i32 %94, -1
%96 = add i32 %93, %95
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 %97
store i8 0, i8* %98
%99 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %2)
%100 = call i64 @rmdir(i8* %2)
%101 = icmp eq i64 %100, 0
br i1 %101, label %104, label %102
102: ; preds = %92
%103 = call i32 @err(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0), i8* %2)
br label %104
104: ; preds = %102, %92
%105 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.8, i64 0, i64 0))
ret i32 0
}