#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 */
unsigned int fio_get_kb_base(void *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ strcmp(char *, char *);
char *strdup(char const *);
unsigned int strlen(char *);
char tolower(char);
unsigned long long __get_mult_bytes(const char *p, void *data, int *percent) {
  unsigned int kb_base = fio_get_kb_base(data);
  unsigned long long ret = 1;
  unsigned int i, pow = 0, mult = kb_base;
  char *c;
  if (!p)
    return 1;
  c = strdup(p);
  for (i = 0; i < strlen(c); i++)
    c[i] = tolower(c[i]);
  if (!strcmp("pib", c)) {
    pow = 5;
    mult = 1000;
  } else if (!strcmp("tib", c)) {
    pow = 4;
    mult = 1000;
  } else if (!strcmp("gib", c)) {
    pow = 3;
    mult = 1000;
  } else if (!strcmp("mib", c)) {
    pow = 2;
    mult = 1000;
  } else if (!strcmp("kib", c)) {
    pow = 1;
    mult = 1000;
  } else if (!strcmp("p", c) || !strcmp("pb", c))
    pow = 5;
  else if (!strcmp("t", c) || !strcmp("tb", c))
    pow = 4;
  else if (!strcmp("g", c) || !strcmp("gb", c))
    pow = 3;
  else if (!strcmp("m", c) || !strcmp("mb", c))
    pow = 2;
  else if (!strcmp("k", c) || !strcmp("kb", c))
    pow = 1;
  else if (!strcmp("%", c)) {
    *percent = 1;
    free(c);
    return ret;
  }
  while (pow--)
    ret *= (unsigned long long)mult;
  free(c);
  return ret;
}


x86 assembly (clang, -O0):
<__get_mult_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <fio_get_kb_base@plt>
mov    %eax,-0x24(%rbp)
movq   $0x1,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x3c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11ad <__get_mult_bytes+0x4d>
movq   $0x1,-0x8(%rbp)
jmp    14bf <__get_mult_bytes+0x35f>
mov    -0x10(%rbp),%rdi
call   1080 <strdup@plt>
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x4c(%rbp),%eax
cmp    %ecx,%eax
jae    1207 <__get_mult_bytes+0xa7>
mov    -0x48(%rbp),%rax
mov    -0x34(%rbp),%ecx
movsbl (%rax,%rcx,1),%edi
call   1070 <tolower@plt>
mov    %al,%dl
mov    -0x48(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11c1 <__get_mult_bytes+0x61>
mov    -0x48(%rbp),%rsi
lea    0xdee(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1233 <__get_mult_bytes+0xd3>
movl   $0x5,-0x38(%rbp)
movl   $0x3e8,-0x3c(%rbp)
jmp    1484 <__get_mult_bytes+0x324>
mov    -0x48(%rbp),%rsi
lea    0xdc6(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    125f <__get_mult_bytes+0xff>
movl   $0x4,-0x38(%rbp)
movl   $0x3e8,-0x3c(%rbp)
jmp    147f <__get_mult_bytes+0x31f>
mov    -0x48(%rbp),%rsi
lea    0xd9e(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    128b <__get_mult_bytes+0x12b>
movl   $0x3,-0x38(%rbp)
movl   $0x3e8,-0x3c(%rbp)
jmp    147a <__get_mult_bytes+0x31a>
mov    -0x48(%rbp),%rsi
lea    0xd76(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    12b7 <__get_mult_bytes+0x157>
movl   $0x2,-0x38(%rbp)
movl   $0x3e8,-0x3c(%rbp)
jmp    1475 <__get_mult_bytes+0x315>
mov    -0x48(%rbp),%rsi
lea    0xd4e(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    12e3 <__get_mult_bytes+0x183>
movl   $0x1,-0x38(%rbp)
movl   $0x3e8,-0x3c(%rbp)
jmp    1470 <__get_mult_bytes+0x310>
mov    -0x48(%rbp),%rsi
lea    0xd26(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     1315 <__get_mult_bytes+0x1b5>
mov    -0x48(%rbp),%rsi
lea    0xd0f(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1321 <__get_mult_bytes+0x1c1>
movl   $0x5,-0x38(%rbp)
jmp    146b <__get_mult_bytes+0x30b>
mov    -0x48(%rbp),%rsi
lea    0xced(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     1353 <__get_mult_bytes+0x1f3>
mov    -0x48(%rbp),%rsi
lea    0xcd6(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    135f <__get_mult_bytes+0x1ff>
movl   $0x4,-0x38(%rbp)
jmp    1466 <__get_mult_bytes+0x306>
mov    -0x48(%rbp),%rsi
lea    0xcb4(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     1391 <__get_mult_bytes+0x231>
mov    -0x48(%rbp),%rsi
lea    0xc9d(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    139d <__get_mult_bytes+0x23d>
movl   $0x3,-0x38(%rbp)
jmp    1461 <__get_mult_bytes+0x301>
mov    -0x48(%rbp),%rsi
lea    0xc7b(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     13cf <__get_mult_bytes+0x26f>
mov    -0x48(%rbp),%rsi
lea    0xc64(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    13db <__get_mult_bytes+0x27b>
movl   $0x2,-0x38(%rbp)
jmp    145c <__get_mult_bytes+0x2fc>
mov    -0x48(%rbp),%rsi
lea    0xc42(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     140d <__get_mult_bytes+0x2ad>
mov    -0x48(%rbp),%rsi
lea    0xc2b(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1419 <__get_mult_bytes+0x2b9>
movl   $0x1,-0x38(%rbp)
jmp    1457 <__get_mult_bytes+0x2f7>
mov    -0x48(%rbp),%rsi
lea    0xc09(%rip),%rdi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1452 <__get_mult_bytes+0x2f2>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    14bf <__get_mult_bytes+0x35f>
jmp    1457 <__get_mult_bytes+0x2f7>
jmp    145c <__get_mult_bytes+0x2fc>
jmp    1461 <__get_mult_bytes+0x301>
jmp    1466 <__get_mult_bytes+0x306>
jmp    146b <__get_mult_bytes+0x30b>
jmp    1470 <__get_mult_bytes+0x310>
jmp    1475 <__get_mult_bytes+0x315>
jmp    147a <__get_mult_bytes+0x31a>
jmp    147f <__get_mult_bytes+0x31f>
jmp    1484 <__get_mult_bytes+0x324>
jmp    1489 <__get_mult_bytes+0x329>
mov    -0x38(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x38(%rbp)
cmp    $0x0,%eax
je     14ae <__get_mult_bytes+0x34e>
mov    -0x3c(%rbp),%eax
imul   -0x30(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    1489 <__get_mult_bytes+0x329>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__get_mult_bytes>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r13
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1050 <fio_get_kb_base@plt>
test   %rbx,%rbx
je     1344 <__get_mult_bytes+0x1e4>
mov    %eax,%r12d
mov    %rbx,%rdi
call   1080 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
je     11bf <__get_mult_bytes+0x5f>
xor    %ebp,%ebp
xchg   %ax,%ax
movsbl (%rbx,%rbp,1),%edi
call   1070 <tolower@plt>
mov    %al,(%rbx,%rbp,1)
add    $0x1,%rbp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%eax
cmp    %rax,%rbp
jb     11a0 <__get_mult_bytes+0x40>
lea    0xe3a(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
mov    $0x3e8,%ebp
test   %eax,%eax
je     136f <__get_mult_bytes+0x20f>
lea    0xe22(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     134b <__get_mult_bytes+0x1eb>
lea    0xe0f(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1359 <__get_mult_bytes+0x1f9>
lea    0xdfc(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1364 <__get_mult_bytes+0x204>
lea    0xde9(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     13c5 <__get_mult_bytes+0x265>
lea    0xdd6(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     136c <__get_mult_bytes+0x20c>
lea    0xdc1(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     136c <__get_mult_bytes+0x20c>
lea    0xdad(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
mov    $0x1,%r15b
test   %eax,%eax
je     13ca <__get_mult_bytes+0x26a>
lea    0xd95(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     13ca <__get_mult_bytes+0x26a>
lea    0xd81(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
mov    $0x1,%r14b
test   %eax,%eax
je     13d2 <__get_mult_bytes+0x272>
lea    0xd69(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     13d2 <__get_mult_bytes+0x272>
mov    %r13,%r14
lea    0xd52(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
mov    $0x1,%r13b
mov    %r12d,%ebp
test   %eax,%eax
je     1367 <__get_mult_bytes+0x207>
lea    0xd37(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1367 <__get_mult_bytes+0x207>
lea    0xd27(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
mov    $0x1,%r12b
test   %eax,%eax
je     1372 <__get_mult_bytes+0x212>
lea    0xd13(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1372 <__get_mult_bytes+0x212>
lea    0xd03(%rip),%rdi
mov    %rbx,%rsi
call   1060 <strcmp@plt>
mov    $0x1,%ebp
test   %eax,%eax
jne    13ab <__get_mult_bytes+0x24b>
movl   $0x1,(%r14)
jmp    13ab <__get_mult_bytes+0x24b>
mov    $0x1,%ebp
jmp    13b3 <__get_mult_bytes+0x253>
mov    $0x1,%r15b
xor    %r12d,%r12d
xor    %r13d,%r13d
xor    %r14d,%r14d
jmp    137b <__get_mult_bytes+0x21b>
mov    $0x1,%r14b
xor    %r12d,%r12d
xor    %r13d,%r13d
jmp    1378 <__get_mult_bytes+0x218>
mov    $0x1,%r13b
xor    %r12d,%r12d
jmp    1375 <__get_mult_bytes+0x215>
mov    %r12d,%ebp
xor    %r12d,%r12d
xor    %r13d,%r13d
xor    %r14d,%r14d
xor    %r15d,%r15d
mov    %ebp,%ebp
test   %r12b,%r12b
jne    13ab <__get_mult_bytes+0x24b>
mov    %rbp,%rax
imul   %rbp,%rax
test   %r13b,%r13b
jne    1397 <__get_mult_bytes+0x237>
imul   %rbp,%rax
test   %r14b,%r14b
je     139c <__get_mult_bytes+0x23c>
mov    %rax,%rbp
jmp    13ab <__get_mult_bytes+0x24b>
imul   %rbp,%rax
imul   %rax,%rbp
test   %r15b,%r15b
cmovne %rax,%rbp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%r12b
jmp    1372 <__get_mult_bytes+0x212>
mov    %r12d,%ebp
jmp    134e <__get_mult_bytes+0x1ee>
mov    %r12d,%ebp
jmp    135c <__get_mult_bytes+0x1fc>

LLVM IR (-O0):
@.str = [4 x i8] c"pib\00"
@.str.1 = [4 x i8] c"tib\00"
@.str.2 = [4 x i8] c"gib\00"
@.str.3 = [4 x i8] c"mib\00"
@.str.4 = [4 x i8] c"kib\00"
@.str.5 = [2 x i8] c"p\00"
@.str.6 = [3 x i8] c"pb\00"
@.str.7 = [2 x i8] c"t\00"
@.str.8 = [3 x i8] c"tb\00"
@.str.9 = [2 x i8] c"g\00"
@.str.10 = [3 x i8] c"gb\00"
@.str.11 = [2 x i8] c"m\00"
@.str.12 = [3 x i8] c"mb\00"
@.str.13 = [2 x i8] c"k\00"
@.str.14 = [3 x i8] c"kb\00"
@.str.15 = [2 x i8] c"%\00"
define i64 @__get_mult_bytes(i8* %0, i8* %1, i32* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
%14 = load i8*, i8** %6
%15 = call i32 @fio_get_kb_base(i8* %14)
store i32 %15, i32* %8
store i64 1, i64* %9
store i32 0, i32* %11
%16 = load i32, i32* %8
store i32 %16, i32* %12
%17 = load i8*, i8** %5
%18 = icmp ne i8* %17, null
br i1 %18, label %20, label %19
19: ; preds = %3
store i64 1, i64* %4
br label %145
20: ; preds = %3
%21 = load i8*, i8** %5
%22 = call i8* @strdup(i8* %21)
store i8* %22, i8** %13
store i32 0, i32* %10
br label %23
23: ; preds = %39, %20
%24 = load i32, i32* %10
%25 = load i8*, i8** %13
%26 = call i32 @strlen(i8* %25)
%27 = icmp ult i32 %24, %26
br i1 %27, label %28, label %42
28: ; preds = %23
%29 = load i8*, i8** %13
%30 = load i32, i32* %10
%31 = zext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
%33 = load i8, i8* %32
%34 = call signext i8 @tolower(i8 signext %33)
%35 = load i8*, i8** %13
%36 = load i32, i32* %10
%37 = zext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 %37
store i8 %34, i8* %38
br label %39
39: ; preds = %28
%40 = load i32, i32* %10
%41 = add i32 %40, 1
store i32 %41, i32* %10
br label %23
42: ; preds = %23
%43 = load i8*, i8** %13
%44 = call i32 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %43)
%45 = icmp ne i32 %44, 0
br i1 %45, label %47, label %46
46: ; preds = %42
store i32 5, i32* %11
store i32 1000, i32* %12
br label %131
47: ; preds = %42
%48 = load i8*, i8** %13
%49 = call i32 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %48)
%50 = icmp ne i32 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %47
store i32 4, i32* %11
store i32 1000, i32* %12
br label %130
52: ; preds = %47
%53 = load i8*, i8** %13
%54 = call i32 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %53)
%55 = icmp ne i32 %54, 0
br i1 %55, label %57, label %56
56: ; preds = %52
store i32 3, i32* %11
store i32 1000, i32* %12
br label %129
57: ; preds = %52
%58 = load i8*, i8** %13
%59 = call i32 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* %58)
%60 = icmp ne i32 %59, 0
br i1 %60, label %62, label %61
61: ; preds = %57
store i32 2, i32* %11
store i32 1000, i32* %12
br label %128
62: ; preds = %57
%63 = load i8*, i8** %13
%64 = call i32 @strcmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %63)
%65 = icmp ne i32 %64, 0
br i1 %65, label %67, label %66
66: ; preds = %62
store i32 1, i32* %11
store i32 1000, i32* %12
br label %127
67: ; preds = %62
%68 = load i8*, i8** %13
%69 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* %68)
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %75
71: ; preds = %67
%72 = load i8*, i8** %13
%73 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %72)
%74 = icmp ne i32 %73, 0
br i1 %74, label %76, label %75
75: ; preds = %71, %67
store i32 5, i32* %11
br label %126
76: ; preds = %71
%77 = load i8*, i8** %13
%78 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* %77)
%79 = icmp ne i32 %78, 0
br i1 %79, label %80, label %84
80: ; preds = %76
%81 = load i8*, i8** %13
%82 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* %81)
%83 = icmp ne i32 %82, 0
br i1 %83, label %85, label %84
84: ; preds = %80, %76
store i32 4, i32* %11
br label %125
85: ; preds = %80
%86 = load i8*, i8** %13
%87 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* %86)
%88 = icmp ne i32 %87, 0
br i1 %88, label %89, label %93
89: ; preds = %85
%90 = load i8*, i8** %13
%91 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %90)
%92 = icmp ne i32 %91, 0
br i1 %92, label %94, label %93
93: ; preds = %89, %85
store i32 3, i32* %11
br label %124
94: ; preds = %89
%95 = load i8*, i8** %13
%96 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* %95)
%97 = icmp ne i32 %96, 0
br i1 %97, label %98, label %102
98: ; preds = %94
%99 = load i8*, i8** %13
%100 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* %99)
%101 = icmp ne i32 %100, 0
br i1 %101, label %103, label %102
102: ; preds = %98, %94
store i32 2, i32* %11
br label %123
103: ; preds = %98
%104 = load i8*, i8** %13
%105 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* %104)
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %111
107: ; preds = %103
%108 = load i8*, i8** %13
%109 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8* %108)
%110 = icmp ne i32 %109, 0
br i1 %110, label %112, label %111
111: ; preds = %107, %103
store i32 1, i32* %11
br label %122
112: ; preds = %107
%113 = load i8*, i8** %13
%114 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i8* %113)
%115 = icmp ne i32 %114, 0
br i1 %115, label %121, label %116
116: ; preds = %112
%117 = load i32*, i32** %7
store i32 1, i32* %117
%118 = load i8*, i8** %13
%119 = call i32 @free(i8* %118)
%120 = load i64, i64* %9
store i64 %120, i64* %4
br label %145
121: ; preds = %112
br label %122
122: ; preds = %121, %111
br label %123
123: ; preds = %122, %102
br label %124
124: ; preds = %123, %93
br label %125
125: ; preds = %124, %84
br label %126
126: ; preds = %125, %75
br label %127
127: ; preds = %126, %66
br label %128
128: ; preds = %127, %61
br label %129
129: ; preds = %128, %56
br label %130
130: ; preds = %129, %51
br label %131
131: ; preds = %130, %46
br label %132
132: ; preds = %136, %131
%133 = load i32, i32* %11
%134 = add i32 %133, -1
store i32 %134, i32* %11
%135 = icmp ne i32 %133, 0
br i1 %135, label %136, label %141
136: ; preds = %132
%137 = load i32, i32* %12
%138 = zext i32 %137 to i64
%139 = load i64, i64* %9
%140 = mul i64 %139, %138
store i64 %140, i64* %9
br label %132
141: ; preds = %132
%142 = load i8*, i8** %13
%143 = call i32 @free(i8* %142)
%144 = load i64, i64* %9
store i64 %144, i64* %4
br label %145
145: ; preds = %141, %116, %19
%146 = load i64, i64* %4
ret i64 %146
}

LLVM IR (-O2):
@.str = [4 x i8] c"pib\00"
@.str.1 = [4 x i8] c"tib\00"
@.str.2 = [4 x i8] c"gib\00"
@.str.3 = [4 x i8] c"mib\00"
@.str.4 = [4 x i8] c"kib\00"
@.str.5 = [2 x i8] c"p\00"
@.str.6 = [3 x i8] c"pb\00"
@.str.7 = [2 x i8] c"t\00"
@.str.8 = [3 x i8] c"tb\00"
@.str.9 = [2 x i8] c"g\00"
@.str.10 = [3 x i8] c"gb\00"
@.str.11 = [2 x i8] c"m\00"
@.str.12 = [3 x i8] c"mb\00"
@.str.13 = [2 x i8] c"k\00"
@.str.14 = [3 x i8] c"kb\00"
@.str.15 = [2 x i8] c"%\00"
define i64 @__get_mult_bytes(i8* %0, i8* %1, i32* nocapture writeonly %2) {
%4 = tail call i32 @fio_get_kb_base(i8* %1)
%5 = icmp eq i8* %0, null
br i1 %5, label %86, label %6
6: ; preds = %3
%7 = tail call i8* @strdup(i8* %0)
%8 = tail call i32 @strlen(i8* %7)
%9 = icmp eq i32 %8, 0
br i1 %9, label %19, label %10
10: ; preds = %6, %10
%11 = phi i64 [ %15, %10 ], [ 0, %6 ]
%12 = getelementptr inbounds i8, i8* %7, i64 %11
%13 = load i8, i8* %12
%14 = tail call signext i8 @tolower(i8 signext %13)
store i8 %14, i8* %12
%15 = add nuw nsw i64 %11, 1
%16 = tail call i32 @strlen(i8* %7)
%17 = zext i32 %16 to i64
%18 = icmp ult i64 %15, %17
br i1 %18, label %10, label %19
19: ; preds = %10, %6
%20 = tail call i32 @strcmp(i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* dereferenceable(1) %7)
%21 = icmp eq i32 %20, 0
br i1 %21, label %68, label %22
22: ; preds = %19
%23 = tail call i32 @strcmp(i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* dereferenceable(1) %7)
%24 = icmp eq i32 %23, 0
br i1 %24, label %68, label %25
25: ; preds = %22
%26 = tail call i32 @strcmp(i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* dereferenceable(1) %7)
%27 = icmp eq i32 %26, 0
br i1 %27, label %68, label %28
28: ; preds = %25
%29 = tail call i32 @strcmp(i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* dereferenceable(1) %7)
%30 = icmp eq i32 %29, 0
br i1 %30, label %68, label %31
31: ; preds = %28
%32 = tail call i32 @strcmp(i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* dereferenceable(1) %7)
%33 = icmp eq i32 %32, 0
br i1 %33, label %68, label %34
34: ; preds = %31
%35 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* dereferenceable(1) %7)
%36 = icmp eq i32 %35, 0
br i1 %36, label %68, label %37
37: ; preds = %34
%38 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* dereferenceable(1) %7)
%39 = icmp eq i32 %38, 0
br i1 %39, label %68, label %40
40: ; preds = %37
%41 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0), i8* dereferenceable(1) %7)
%42 = icmp eq i32 %41, 0
br i1 %42, label %68, label %43
43: ; preds = %40
%44 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* dereferenceable(1) %7)
%45 = icmp eq i32 %44, 0
br i1 %45, label %68, label %46
46: ; preds = %43
%47 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0), i8* dereferenceable(1) %7)
%48 = icmp eq i32 %47, 0
br i1 %48, label %68, label %49
49: ; preds = %46
%50 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* dereferenceable(1) %7)
%51 = icmp eq i32 %50, 0
br i1 %51, label %68, label %52
52: ; preds = %49
%53 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i8* dereferenceable(1) %7)
%54 = icmp eq i32 %53, 0
br i1 %54, label %68, label %55
55: ; preds = %52
%56 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i8* dereferenceable(1) %7)
%57 = icmp eq i32 %56, 0
br i1 %57, label %68, label %58
58: ; preds = %55
%59 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* dereferenceable(1) %7)
%60 = icmp eq i32 %59, 0
br i1 %60, label %68, label %61
61: ; preds = %58
%62 = tail call i32 @strcmp(i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.14, i64 0, i64 0), i8* dereferenceable(1) %7)
%63 = icmp eq i32 %62, 0
br i1 %63, label %68, label %64
64: ; preds = %61
%65 = tail call i32 @strcmp(i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0), i8* dereferenceable(1) %7)
%66 = icmp eq i32 %65, 0
br i1 %66, label %67, label %83
67: ; preds = %64
store i32 1, i32* %2
br label %83
68: ; preds = %58, %61, %52, %55, %46, %49, %40, %43, %34, %37, %31, %28, %25, %22, %19
%69 = phi i1 [ true, %58 ], [ true, %61 ], [ false, %52 ], [ false, %55 ], [ false, %46 ], [ false, %49 ], [ false, %40 ], [ false, %43 ], [ false, %34 ], [ false, %37 ], [ true, %31 ], [ false, %28 ], [ false, %25 ], [ false, %22 ], [ false, %19 ]
%70 = phi i1 [ false, %58 ], [ false, %61 ], [ true, %52 ], [ true, %55 ], [ false, %46 ], [ false, %49 ], [ false, %40 ], [ false, %43 ], [ false, %34 ], [ false, %37 ], [ false, %31 ], [ true, %28 ], [ false, %25 ], [ false, %22 ], [ false, %19 ]
%71 = phi i1 [ false, %58 ], [ false, %61 ], [ false, %52 ], [ false, %55 ], [ true, %46 ], [ true, %49 ], [ false, %40 ], [ false, %43 ], [ false, %34 ], [ false, %37 ], [ false, %31 ], [ false, %28 ], [ true, %25 ], [ false, %22 ], [ false, %19 ]
%72 = phi i1 [ false, %58 ], [ false, %61 ], [ false, %52 ], [ false, %55 ], [ false, %46 ], [ false, %49 ], [ true, %40 ], [ true, %43 ], [ false, %34 ], [ false, %37 ], [ false, %31 ], [ false, %28 ], [ false, %25 ], [ true, %22 ], [ false, %19 ]
%73 = phi i32 [ %4, %58 ], [ %4, %61 ], [ %4, %52 ], [ %4, %55 ], [ %4, %46 ], [ %4, %49 ], [ %4, %40 ], [ %4, %43 ], [ %4, %34 ], [ %4, %37 ], [ 1000, %31 ], [ 1000, %28 ], [ 1000, %25 ], [ 1000, %22 ], [ 1000, %19 ]
%74 = zext i32 %73 to i64
br i1 %69, label %83, label %75
75: ; preds = %68
%76 = mul nuw i64 %74, %74
br i1 %70, label %83, label %77
77: ; preds = %75
%78 = mul i64 %76, %74
br i1 %71, label %83, label %79
79: ; preds = %77
%80 = mul i64 %78, %74
%81 = mul i64 %80, %74
%82 = select i1 %72, i64 %80, i64 %81
br label %83
83: ; preds = %79, %68, %75, %77, %64, %67
%84 = phi i64 [ 1, %67 ], [ 1, %64 ], [ %74, %68 ], [ %76, %75 ], [ %78, %77 ], [ %82, %79 ]
%85 = tail call i32 @free(i8* %7)
br label %86
86: ; preds = %83, %3
%87 = phi i64 [ 1, %3 ], [ %84, %83 ]
ret i64 %87
}