int str_path_basedirname_t(void) {
  int i, rc = 0;
  char *dirname, *basename;
  struct test {
    const char *path;
    const char *dirname;
    const char *basename;
  } T[] = {
      {"/usr/lib", "/usr", "lib"},
      {"/usr/", "/", "usr"},
      {"usr", ".", "usr"},
      {"/", "/", "/"},
      {".", ".", "."},
      {"..", ".", ".."},
      {"/////", "/", "/"},
      {"//f//", "/", "f"},
      {"//f//g", "/f", "g"},
      {"../..//.", "../..", "."},
  };
  int TS = sizeof(T) / sizeof(T[0]);
  for (i = 0; i < TS; i++) {
    basename = str_path_basename(T[i].path);
    dirname = str_path_dirname(T[i].path);
    if (basename && dirname &&
        (strcmp(basename, T[i].basename) != 0 ||
         strcmp(dirname, T[i].dirname) != 0))
      rc += log_error("[%s/%02d] E[%s,%s] R[%s,%s]", __FUNCTION__, i,
                      T[i].dirname, T[i].basename, dirname, basename);
    if (basename)
      free(basename);
    if (dirname)
      free(dirname);
  }
  return rc;
}


x86 assembly (clang, -O0):
<str_path_basedirname_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x8(%rbp)
lea    -0x110(%rbp),%rdi
lea    0x2bb0(%rip),%rsi
mov    $0xf0,%edx
call   1070 <memcpy@plt>
movl   $0xa,-0x114(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x114(%rbp),%eax
jge    12e5 <str_path_basedirname_t+0x185>
movslq -0x4(%rbp),%rcx
lea    -0x110(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1030 <str_path_basename@plt>
cltq
mov    %rax,-0x18(%rbp)
movslq -0x4(%rbp),%rcx
lea    -0x110(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%rdi
mov    $0x0,%al
call   1080 <str_path_dirname@plt>
cltq
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     12aa <str_path_basedirname_t+0x14a>
cmpq   $0x0,-0x10(%rbp)
je     12aa <str_path_basedirname_t+0x14a>
mov    -0x18(%rbp),%rdi
movslq -0x4(%rbp),%rcx
lea    -0x110(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1254 <str_path_basedirname_t+0xf4>
mov    -0x10(%rbp),%rdi
movslq -0x4(%rbp),%rcx
lea    -0x110(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     12aa <str_path_basedirname_t+0x14a>
mov    -0x4(%rbp),%edx
movslq -0x4(%rbp),%rcx
lea    -0x110(%rbp),%rax
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rcx
movslq -0x4(%rbp),%rsi
lea    -0x110(%rbp),%rax
imul   $0x18,%rsi,%rsi
add    %rsi,%rax
mov    0x10(%rax),%r8
mov    -0x10(%rbp),%r9
mov    -0x18(%rbp),%rax
lea    0xda7(%rip),%rdi
lea    0xdbc(%rip),%rsi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <log_error@plt>
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     12be <str_path_basedirname_t+0x15e>
mov    -0x18(%rbp),%rdi
call   1040 <free@plt>
cmpq   $0x0,-0x10(%rbp)
je     12d2 <str_path_basedirname_t+0x172>
mov    -0x10(%rbp),%rdi
call   1040 <free@plt>
jmp    12d7 <str_path_basedirname_t+0x177>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    119b <str_path_basedirname_t+0x3b>
mov    -0x8(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_path_basedirname_t>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0x2bdb(%rip),%r12
xor    %ebx,%ebx
movl   $0x0,0x14(%rsp)
jmp    1192 <str_path_basedirname_t+0x42>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
add    $0x18,%r12
cmp    $0xa,%rbx
je     1252 <str_path_basedirname_t+0x102>
mov    -0x10(%r12),%rbp
mov    %rbp,%rdi
xor    %eax,%eax
call   1030 <str_path_basename@plt>
mov    %eax,%r15d
movslq %eax,%r13
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <str_path_dirname@plt>
mov    %eax,%r14d
movslq %eax,%rbp
test   %r13d,%r13d
je     1223 <str_path_basedirname_t+0xd3>
test   %r14d,%r14d
je     1223 <str_path_basedirname_t+0xd3>
mov    %rbp,0x18(%rsp)
mov    (%r12),%rbp
mov    %r13,%rdi
mov    %rbp,%rsi
call   1060 <strcmp@plt>
mov    -0x8(%r12),%rcx
test   %eax,%eax
jne    11f9 <str_path_basedirname_t+0xa9>
mov    0x18(%rsp),%rdi
mov    %rcx,%rsi
mov    %rcx,0x20(%rsp)
call   1060 <strcmp@plt>
mov    0x20(%rsp),%rcx
test   %eax,%eax
je     1246 <str_path_basedirname_t+0xf6>
mov    %r13,(%rsp)
lea    0xe35(%rip),%rdi
lea    0xe4a(%rip),%rsi
mov    %ebx,%edx
mov    %rbp,%r8
mov    0x18(%rsp),%rbp
mov    %rbp,%r9
xor    %eax,%eax
call   1050 <log_error@plt>
add    %eax,0x14(%rsp)
test   %r15d,%r15d
je     1230 <str_path_basedirname_t+0xe0>
mov    %r13,%rdi
call   1040 <free@plt>
test   %r14d,%r14d
je     1180 <str_path_basedirname_t+0x30>
mov    %rbp,%rdi
call   1040 <free@plt>
jmp    1180 <str_path_basedirname_t+0x30>
mov    0x18(%rsp),%rbp
test   %r15d,%r15d
jne    1228 <str_path_basedirname_t+0xd8>
jmp    1230 <str_path_basedirname_t+0xe0>
mov    0x14(%rsp),%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.test = type { i8*, i8*, i8* }
@.str = [9 x i8] c"/usr/lib\00"
@.str.1 = [5 x i8] c"/usr\00"
@.str.2 = [4 x i8] c"lib\00"
@.str.3 = [6 x i8] c"/usr/\00"
@.str.4 = [2 x i8] c"/\00"
@.str.5 = [4 x i8] c"usr\00"
@.str.6 = [2 x i8] c".\00"
@.str.7 = [3 x i8] c"..\00"
@.str.8 = [6 x i8] c"/////\00"
@.str.9 = [6 x i8] c"//f//\00"
@.str.10 = [2 x i8] c"f\00"
@.str.11 = [7 x i8] c"//f//g\00"
@.str.12 = [3 x i8] c"/f\00"
@.str.13 = [2 x i8] c"g\00"
@.str.14 = [9 x i8] c"../..//.\00"
@.str.15 = [6 x i8] c"../..\00"
@__const.str_path_basedirname_t.T = [10 x %struct.test] [%struct.test { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0) }]
@.str.16 = [28 x i8] c"[%s/%02d] E[%s,%s] R[%s,%s]\00"
@__FUNCTION__.str_path_basedirname_t = [23 x i8] c"str_path_basedirname_t\00"
define i32 @str_path_basedirname_t() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [10 x %struct.test]
%6 = alloca i32
store i32 0, i32* %2
%7 = bitcast [10 x %struct.test]* %5 to i8*
store i32 10, i32* %6
store i32 0, i32* %1
br label %8
8: ; preds = %80, %0
%9 = load i32, i32* %1
%10 = load i32, i32* %6
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %83
12: ; preds = %8
%13 = load i32, i32* %1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* %5, i64 0, i64 %14
%16 = getelementptr inbounds %struct.test, %struct.test* %15, i32 0, i32 0
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @str_path_basename to i32 (i8*, ...)*)(i8* %17)
%19 = sext i32 %18 to i64
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %4
%21 = load i32, i32* %1
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* %5, i64 0, i64 %22
%24 = getelementptr inbounds %struct.test, %struct.test* %23, i32 0, i32 0
%25 = load i8*, i8** %24
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @str_path_dirname to i32 (i8*, ...)*)(i8* %25)
%27 = sext i32 %26 to i64
%28 = inttoptr i64 %27 to i8*
store i8* %28, i8** %3
%29 = load i8*, i8** %4
%30 = icmp ne i8* %29, null
br i1 %30, label %31, label %69
31: ; preds = %12
%32 = load i8*, i8** %3
%33 = icmp ne i8* %32, null
br i1 %33, label %34, label %69
34: ; preds = %31
%35 = load i8*, i8** %4
%36 = load i32, i32* %1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* %5, i64 0, i64 %37
%39 = getelementptr inbounds %struct.test, %struct.test* %38, i32 0, i32 2
%40 = load i8*, i8** %39
%41 = call i32 @strcmp(i8* %35, i8* %40)
%42 = icmp ne i32 %41, 0
br i1 %42, label %52, label %43
43: ; preds = %34
%44 = load i8*, i8** %3
%45 = load i32, i32* %1
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* %5, i64 0, i64 %46
%48 = getelementptr inbounds %struct.test, %struct.test* %47, i32 0, i32 1
%49 = load i8*, i8** %48
%50 = call i32 @strcmp(i8* %44, i8* %49)
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %69
52: ; preds = %43, %34
%53 = load i32, i32* %1
%54 = load i32, i32* %1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* %5, i64 0, i64 %55
%57 = getelementptr inbounds %struct.test, %struct.test* %56, i32 0, i32 1
%58 = load i8*, i8** %57
%59 = load i32, i32* %1
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* %5, i64 0, i64 %60
%62 = getelementptr inbounds %struct.test, %struct.test* %61, i32 0, i32 2
%63 = load i8*, i8** %62
%64 = load i8*, i8** %3
%65 = load i8*, i8** %4
%66 = call i32 (i8*, i8*, i32, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @log_error to i32 (i8*, i8*, i32, i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.str_path_basedirname_t, i64 0, i64 0), i32 %53, i8* %58, i8* %63, i8* %64, i8* %65)
%67 = load i32, i32* %2
%68 = add nsw i32 %67, %66
store i32 %68, i32* %2
br label %69
69: ; preds = %52, %43, %31, %12
%70 = load i8*, i8** %4
%71 = icmp ne i8* %70, null
br i1 %71, label %72, label %74
72: ; preds = %69
%73 = load i8*, i8** %4
br label %74
74: ; preds = %72, %69
%75 = load i8*, i8** %3
%76 = icmp ne i8* %75, null
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = load i8*, i8** %3
br label %79
79: ; preds = %77, %74
br label %80
80: ; preds = %79
%81 = load i32, i32* %1
%82 = add nsw i32 %81, 1
store i32 %82, i32* %1
br label %8
83: ; preds = %8
%84 = load i32, i32* %2
ret i32 %84
}

LLVM IR (-O2):
%struct.test = type { i8*, i8*, i8* }
@.str = [9 x i8] c"/usr/lib\00"
@.str.1 = [5 x i8] c"/usr\00"
@.str.2 = [4 x i8] c"lib\00"
@.str.3 = [6 x i8] c"/usr/\00"
@.str.4 = [2 x i8] c"/\00"
@.str.5 = [4 x i8] c"usr\00"
@.str.6 = [2 x i8] c".\00"
@.str.7 = [3 x i8] c"..\00"
@.str.8 = [6 x i8] c"/////\00"
@.str.9 = [6 x i8] c"//f//\00"
@.str.10 = [2 x i8] c"f\00"
@.str.11 = [7 x i8] c"//f//g\00"
@.str.12 = [3 x i8] c"/f\00"
@.str.13 = [2 x i8] c"g\00"
@.str.14 = [9 x i8] c"../..//.\00"
@.str.15 = [6 x i8] c"../..\00"
@__const.str_path_basedirname_t.T = [10 x %struct.test] [%struct.test { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0) }, %struct.test { i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0) }]
@.str.16 = [28 x i8] c"[%s/%02d] E[%s,%s] R[%s,%s]\00"
@__FUNCTION__.str_path_basedirname_t = [23 x i8] c"str_path_basedirname_t\00"
define i32 @str_path_basedirname_t() {
br label %1
1: ; preds = %0, %34
%2 = phi i64 [ 0, %0 ], [ %35, %34 ]
%3 = phi i32 [ 0, %0 ], [ %30, %34 ]
%4 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* @__const.str_path_basedirname_t.T, i64 0, i64 %2, i32 0
%5 = load i8*, i8** %4
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_path_basename to i32 (i8*, ...)*)(i8* %5)
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @str_path_dirname to i32 (i8*, ...)*)(i8* %5)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
%12 = icmp ne i32 %6, 0
%13 = icmp ne i32 %9, 0
%14 = select i1 %12, i1 %13, i1 false
br i1 %14, label %15, label %29
15: ; preds = %1
%16 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* @__const.str_path_basedirname_t.T, i64 0, i64 %2, i32 2
%17 = load i8*, i8** %16
%18 = tail call i32 @strcmp(i8* %8, i8* dereferenceable(1) %17)
%19 = icmp eq i32 %18, 0
%20 = getelementptr inbounds [10 x %struct.test], [10 x %struct.test]* @__const.str_path_basedirname_t.T, i64 0, i64 %2, i32 1
%21 = load i8*, i8** %20
br i1 %19, label %22, label %25
22: ; preds = %15
%23 = tail call i32 @strcmp(i8* %11, i8* dereferenceable(1) %21)
%24 = icmp eq i32 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %15, %22
%26 = trunc i64 %2 to i32
%27 = tail call i32 (i8*, i8*, i32, i8*, i8*, i8*, i8*, ...) bitcast (i32 (...)* @log_error to i32 (i8*, i8*, i32, i8*, i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.16, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__FUNCTION__.str_path_basedirname_t, i64 0, i64 0), i32 %26, i8* %21, i8* %17, i8* %11, i8* %8)
%28 = add nsw i32 %27, %3
br label %29
29: ; preds = %25, %22, %1
%30 = phi i32 [ %28, %25 ], [ %3, %22 ], [ %3, %1 ]
br i1 %12, label %31, label %32
31: ; preds = %29
tail call void @free(i8* %8)
br label %32
32: ; preds = %31, %29
br i1 %13, label %33, label %34
33: ; preds = %32
tail call void @free(i8* %11)
br label %34
34: ; preds = %32, %33
%35 = add nuw nsw i64 %2, 1
%36 = icmp eq i64 %35, 10
br i1 %36, label %37, label %1
37: ; preds = %34
ret i32 %30
}