#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 */
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ *member_2;
  int /*<<< orphan*/ member_1;
};

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt_long(int, char **, char *, struct option *, int *);
char *optarg;
scalar_t__ optind;
int /*<<< orphan*/ parseUnsigned(char *, int *);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ required_argument;
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  char *begin = "[", *empty = "_", *fill = "#", *end = "]";
  int a, b, p, size_max, opt, option_index;
  a = b = p = option_index = opt = size_max = -1;
  struct option long_options[] = {{"min", required_argument, NULL, 'm'},
                                  {"max", required_argument, NULL, 'M'},
                                  {"size", required_argument, NULL, 's'},
                                  {"begin", required_argument, NULL, 'b'},
                                  {"null", required_argument, NULL, 'n'},
                                  {"fill", required_argument, NULL, 'f'},
                                  {"end", required_argument, NULL, 'e'},
                                  {0, 0, 0, 0}};
  optind = 0;
  while ((opt = getopt_long(argc, argv, "m:M:b:n:f:e", long_options,
                            &option_index)) != -1) {
    switch (opt) {
    case 'm':
      if (!parseUnsigned(optarg, &a)) {
        fprintf(stderr,
                "invalid argument: all numbers must to be unsigned int\n");
        return EXIT_FAILURE;
      }
      break;
    case 'M':
      if (!parseUnsigned(optarg, &b)) {
        fprintf(stderr,
                "invalid argument: all numbers must to be unsigned int\n");
        return EXIT_FAILURE;
      } else if (b == 0) {
        fprintf(stderr, "invalid argument: can't divide by zero\n");
        return EXIT_FAILURE;
      }
      break;
    case 's':
      if (!parseUnsigned(optarg, &size_max) || size_max == 0) {
        fprintf(stderr,
                "invalid argument: size must to be an unsigned int > 0\n");
        return EXIT_FAILURE;
      }
      break;
    case 'b':
      begin = optarg;
      break;
    case 'n':
      empty = optarg;
      break;
    case 'f':
      fill = optarg;
      break;
    case 'e':
      end = optarg;
      break;
    default:
      fprintf(stderr,
              "usage:\n"
              "\t-m|--min   ~ the minimum value, it must to be unsigned and "
              "smaller then max (required)\n"
              "\t-M|--max   ~ the maximum value, it must to be unsigned and "
              "bigger (required)\n"
              "\t-s|--size  ~ the maximum size of progress bar, it must to be "
              "unsigned (required)\n"
              "\t-b|--begin ~ the begin frame of progress bar\n"
              "\t-n|--null  ~ ....\n"
              "\t-f|--fill  ~ ....\n"
              "\t-e|--end   ~ the ending frame progress bar\n\n"
              "example:\n"
              "\t%s --min 10 --max 100 --begin $ --null _ --fill @ --end $\n\n",
              argv[0]);
      ;
      return EXIT_FAILURE;
    }
  }
  if (a < 0 || b < 0 || b < a) {
    fprintf(stderr,
            "usage:\n"
            "\t-m|--min   ~ the minimum value, it must to be unsigned and "
            "smaller then max (required)\n"
            "\t-M|--max   ~ the maximum value, it must to be unsigned and "
            "bigger (required)\n"
            "\t-s|--size  ~ the maximum size of progress bar, it must to be "
            "unsigned (required)\n"
            "\t-b|--begin ~ the begin frame of progress bar\n"
            "\t-n|--null  ~ ....\n"
            "\t-f|--fill  ~ ....\n"
            "\t-e|--end   ~ the ending frame progress bar\n\n"
            "example:\n"
            "\t%s --min 10 --max 100 --begin $ --null _ --fill @ --end $\n\n",
            argv[0]);
    ;
    return EXIT_FAILURE;
  }
  p = (size_max * a / b);
  printf("%s", begin);
  for (int i = 0; i < size_max; i++)
    printf("%s", ((i + 1 <= p) ? fill : empty));
  printf("%s %d\%\n", end, (100 * a / b));
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xf2c(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xf23(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xf1a(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xf11(%rip),%rax
mov    %rax,-0x30(%rbp)
movl   $0xffffffff,-0x40(%rbp)
movl   $0xffffffff,-0x44(%rbp)
movl   $0xffffffff,-0x48(%rbp)
movl   $0xffffffff,-0x3c(%rbp)
movl   $0xffffffff,-0x38(%rbp)
movl   $0xffffffff,-0x34(%rbp)
lea    -0x150(%rbp),%rdi
lea    0xed7(%rip),%rax
mov    %rax,-0x150(%rbp)
mov    0x2dfd(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x148(%rbp)
movq   $0x0,-0x140(%rbp)
movl   $0x6d,-0x138(%rbp)
add    $0x20,%rdi
lea    0xea5(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0x2dc7(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x128(%rbp)
movq   $0x0,-0x120(%rbp)
movl   $0x4d,-0x118(%rbp)
add    $0x20,%rdi
lea    0xe73(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0x2d91(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x108(%rbp)
movq   $0x0,-0x100(%rbp)
movl   $0x73,-0xf8(%rbp)
add    $0x20,%rdi
lea    0xe42(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0x2d5b(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xe8(%rbp)
movq   $0x0,-0xe0(%rbp)
movl   $0x62,-0xd8(%rbp)
add    $0x20,%rdi
lea    0xe12(%rip),%rax
mov    %rax,-0xd0(%rbp)
mov    0x2d25(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xc8(%rbp)
movq   $0x0,-0xc0(%rbp)
movl   $0x6e,-0xb8(%rbp)
add    $0x20,%rdi
lea    0xde1(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0x2cef(%rip),%rax
mov    (%rax),%eax
mov    %al,-0xa8(%rbp)
movq   $0x0,-0xa0(%rbp)
movl   $0x66,-0x98(%rbp)
add    $0x20,%rdi
lea    0xdb0(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0x2cb9(%rip),%rax
mov    (%rax),%eax
mov    %al,-0x88(%rbp)
movq   $0x0,-0x80(%rbp)
movl   $0x65,-0x78(%rbp)
add    $0x20,%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1050 <memset@plt>
mov    0x2c93(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x150(%rbp),%rcx
lea    0xd5c(%rip),%rdx
lea    -0x48(%rbp),%r8
call   1030 <getopt_long@plt>
mov    %eax,-0x44(%rbp)
cmp    $0xffffffff,%eax
je     1549 <main+0x3f9>
mov    -0x44(%rbp),%eax
add    $0xffffffb3,%eax
mov    %eax,%ecx
mov    %rcx,-0x160(%rbp)
sub    $0x26,%eax
ja     1515 <main+0x3c5>
mov    -0x160(%rbp),%rax
lea    0xc5c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2c44(%rip),%rax
mov    (%rax),%rdi
lea    -0x34(%rbp),%rsi
call   1070 <parseUnsigned@plt>
cmp    $0x0,%eax
jne    13f1 <main+0x2a1>
mov    0x2bf8(%rip),%rax
mov    (%rax),%edi
lea    0xcf8(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2bd9(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    164f <main+0x4ff>
jmp    1544 <main+0x3f4>
mov    0x2bfb(%rip),%rax
mov    (%rax),%rdi
lea    -0x38(%rbp),%rsi
call   1070 <parseUnsigned@plt>
cmp    $0x0,%eax
jne    143a <main+0x2ea>
mov    0x2baf(%rip),%rax
mov    (%rax),%edi
lea    0xcaf(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2b90(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    164f <main+0x4ff>
cmpl   $0x0,-0x38(%rbp)
jne    146c <main+0x31c>
mov    0x2b7d(%rip),%rax
mov    (%rax),%edi
lea    0xcb4(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2b5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    164f <main+0x4ff>
jmp    1471 <main+0x321>
jmp    1544 <main+0x3f4>
mov    0x2b7b(%rip),%rax
mov    (%rax),%rdi
lea    -0x40(%rbp),%rsi
call   1070 <parseUnsigned@plt>
cmp    $0x0,%eax
je     149c <main+0x34c>
cmpl   $0x0,-0x40(%rbp)
jne    14c4 <main+0x374>
mov    0x2b25(%rip),%rax
mov    (%rax),%edi
lea    0xc84(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2b06(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    164f <main+0x4ff>
jmp    1544 <main+0x3f4>
mov    0x2b28(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1544 <main+0x3f4>
mov    0x2b15(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1544 <main+0x3f4>
mov    0x2b02(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
jmp    1544 <main+0x3f4>
mov    0x2aef(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    1544 <main+0x3f4>
mov    0x2aac(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2a86(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    164f <main+0x4ff>
jmp    1354 <main+0x204>
cmpl   $0x0,-0x34(%rbp)
jl     1569 <main+0x419>
cmpl   $0x0,-0x38(%rbp)
jl     1569 <main+0x419>
mov    -0x38(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1598 <main+0x448>
mov    0x2a58(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xbe7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    0x2a32(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    164f <main+0x4ff>
mov    -0x40(%rbp),%eax
imul   -0x34(%rbp),%eax
cltd
idivl  -0x38(%rbp)
mov    %eax,-0x3c(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xd7c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x154(%rbp)
mov    -0x154(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    1627 <main+0x4d7>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
cmp    -0x3c(%rbp),%eax
jg     15f3 <main+0x4a3>
mov    -0x28(%rbp),%rax
mov    %rax,-0x168(%rbp)
jmp    15fe <main+0x4ae>
mov    -0x20(%rbp),%rax
mov    %rax,-0x168(%rbp)
mov    -0x168(%rbp),%rsi
lea    0xd21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x154(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x154(%rbp)
jmp    15c2 <main+0x472>
mov    -0x30(%rbp),%rsi
imul   $0x64,-0x34(%rbp),%eax
cltd
idivl  -0x38(%rbp)
mov    %eax,%edx
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x296e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
movl   $0xffffffff,(%rsp)
movl   $0xffffffff,0xc(%rsp)
ff
movl   $0xffffffff,0x4(%rsp)
ff
movl   $0xffffffff,0x8(%rsp)
ff
lea    0xf28(%rip),%rax
mov    %rax,0x30(%rsp)
mov    0x2e50(%rip),%rax
mov    (%rax),%al
mov    %al,0x38(%rsp)
movq   $0x0,0x40(%rsp)
movl   $0x6d,0x48(%rsp)
lea    0xf02(%rip),%rcx
mov    %rcx,0x50(%rsp)
mov    %al,0x58(%rsp)
movq   $0x0,0x60(%rsp)
movl   $0x4d,0x68(%rsp)
lea    0xee5(%rip),%rcx
mov    %rcx,0x70(%rsp)
mov    %al,0x78(%rsp)
movq   $0x0,0x80(%rsp)
movl   $0x73,0x88(%rsp)
lea    0xec3(%rip),%rcx
mov    %rcx,0x90(%rsp)
mov    %al,0x98(%rsp)
movq   $0x0,0xa0(%rsp)
movl   $0x62,0xa8(%rsp)
lea    0xe9c(%rip),%rcx
mov    %rcx,0xb0(%rsp)
mov    %al,0xb8(%rsp)
movq   $0x0,0xc0(%rsp)
movl   $0x6e,0xc8(%rsp)
lea    0xe74(%rip),%rcx
mov    %rcx,0xd0(%rsp)
mov    %al,0xd8(%rsp)
movq   $0x0,0xe0(%rsp)
movl   $0x66,0xe8(%rsp)
lea    0xe4c(%rip),%rcx
mov    %rcx,0xf0(%rsp)
mov    %al,0xf8(%rsp)
movq   $0x0,0x100(%rsp)
movl   $0x65,0x108(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
mov    0x2d2b(%rip),%rax
movq   $0x0,(%rax)
lea    0xddf(%rip),%rax
mov    %rax,0x28(%rsp)
lea    0xdd1(%rip),%rax
mov    %rax,0x20(%rsp)
lea    0xdc3(%rip),%rax
mov    %rax,0x18(%rsp)
lea    0xdb5(%rip),%rax
mov    %rax,0x10(%rsp)
lea    0xdd2(%rip),%r12
lea    0x30(%rsp),%r13
lea    0xc(%rsp),%r14
lea    0xcfc(%rip),%r15
jmp    132c <main+0x1ec>
cs nopw 0x0(%rax,%rax,1)
mov    0x2ce1(%rip),%rax
mov    (%rax),%rdi
lea    0x8(%rsp),%rsi
call   1060 <parseUnsigned@plt>
test   %eax,%eax
je     13f5 <main+0x2b5>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r13,%rcx
mov    %r14,%r8
call   1030 <getopt_long@plt>
lea    -0x4d(%rax),%ecx
cmp    $0x26,%ecx
ja     140a <main+0x2ca>
movslq (%r15,%rcx,4),%rax
add    %r15,%rax
jmp    *%rax
mov    0x2c9d(%rip),%rax
mov    (%rax),%rdi
lea    0x4(%rsp),%rsi
call   1060 <parseUnsigned@plt>
test   %eax,%eax
je     13f5 <main+0x2b5>
cmpl   $0x0,0x4(%rsp)
jne    132c <main+0x1ec>
jmp    14e4 <main+0x3a4>
nopl   0x0(%rax)
mov    0x2c71(%rip),%rax
mov    (%rax),%rdi
mov    %rsp,%rsi
call   1060 <parseUnsigned@plt>
test   %eax,%eax
je     14d2 <main+0x392>
cmpl   $0x0,(%rsp)
jne    132c <main+0x1ec>
jmp    14d2 <main+0x392>
mov    0x2c4c(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x10(%rsp)
jmp    132c <main+0x1ec>
mov    0x2c38(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x28(%rsp)
jmp    132c <main+0x1ec>
mov    0x2c24(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x20(%rsp)
jmp    132c <main+0x1ec>
mov    0x2c10(%rip),%rax
mov    (%rax),%rax
mov    %rax,0x18(%rsp)
jmp    132c <main+0x1ec>
mov    0x2bcc(%rip),%rax
mov    (%rax),%edi
lea    0xccc(%rip),%rsi
jmp    14f4 <main+0x3b4>
cmp    $0xffffffff,%eax
jne    14b6 <main+0x376>
mov    0x8(%rsp),%eax
test   %eax,%eax
js     14b6 <main+0x376>
mov    0x4(%rsp),%ecx
test   %ecx,%ecx
js     14b6 <main+0x376>
cmp    %eax,%ecx
jl     14b6 <main+0x376>
imul   (%rsp),%eax
cltd
idiv   %ecx
mov    %eax,%r15d
lea    0xee9(%rip),%rdi
mov    0x10(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,(%rsp)
mov    0x20(%rsp),%r12
mov    0x18(%rsp),%rbx
jle    148e <main+0x34e>
lea    0xec6(%rip),%r14
xor    %eax,%eax
nopl   0x0(%rax)
lea    0x1(%rax),%ebp
cmp    %r15d,%eax
mov    %rbx,%rsi
cmovl  %r12,%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%eax
cmp    (%rsp),%ebp
jl     1470 <main+0x330>
imul   $0x64,0x8(%rsp),%eax
cltd
idivl  0x4(%rsp)
lea    0xe91(%rip),%rdi
mov    0x28(%rsp),%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2b04(%rip),%rax
jmp    1502 <main+0x3c2>
mov    0x2b0b(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xc9e(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    14fb <main+0x3bb>
mov    0x2aef(%rip),%rax
mov    (%rax),%edi
lea    0xc4e(%rip),%rsi
jmp    14f4 <main+0x3b4>
mov    0x2add(%rip),%rax
mov    (%rax),%edi
lea    0xc14(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2abe(%rip),%rax
mov    (%rax),%eax
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [2 x i8] c"[\00"
@.str.1 = [2 x i8] c"_\00"
@.str.2 = [2 x i8] c"#\00"
@.str.3 = [2 x i8] c"]\00"
@.str.4 = [4 x i8] c"min\00"
@required_argument = global i32 0
@.str.5 = [4 x i8] c"max\00"
@.str.6 = [5 x i8] c"size\00"
@.str.7 = [6 x i8] c"begin\00"
@.str.8 = [5 x i8] c"null\00"
@.str.9 = [5 x i8] c"fill\00"
@.str.10 = [4 x i8] c"end\00"
@optind = global i64 0
@.str.11 = [12 x i8] c"m:M:b:n:f:e\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.12 = [55 x i8] c"invalid argument: all numbers must to be unsigned int\0A\00"
@EXIT_FAILURE = global i32 0
@.str.13 = [40 x i8] c"invalid argument: can't divide by zero\0A\00"
@.str.14 = [55 x i8] c"invalid argument: size must to be an unsigned int > 0\0A\00"
@.str.15 = [454 x i8] c"usage:\0A\09-m|--min ~ the minimum value, it must to be unsigned and smaller then max (required)\0A\09-M|--max ~ the maximum value, it must to be unsigned and bigger (required)\0A\09-s|--size ~ the maximum size of progress bar, it must to be unsigned (required)\0A\09-b|--begin ~ the begin frame of progress bar\0A\09-n|--null ~ ....\0A\09-f|--fill ~ ....\0A\09-e|--end ~ the ending frame progress bar\0A\0Aexample:\0A\09%s --min 10 --max 100 --begin $ --null _ --fill @ --end $\0A\0A\00"
@.str.16 = [3 x i8] c"%s\00"
@.str.17 = [8 x i8] c"%s %d%\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca [8 x %struct.option]
%17 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i8** %8
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8** %9
store i32 -1, i32* %13
store i32 -1, i32* %14
store i32 -1, i32* %15
store i32 -1, i32* %12
store i32 -1, i32* %11
store i32 -1, i32* %10
%18 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %16, i64 0, i64 0
%19 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %19
%20 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 1
%21 = load i32, i32* @required_argument
%22 = trunc i32 %21 to i8
store i8 %22, i8* %20
%23 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 2
store i32* null, i32** %23
%24 = getelementptr inbounds %struct.option, %struct.option* %18, i32 0, i32 3
store i32 109, i32* %24
%25 = getelementptr inbounds %struct.option, %struct.option* %18, i64 1
%26 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %26
%27 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 1
%28 = load i32, i32* @required_argument
%29 = trunc i32 %28 to i8
store i8 %29, i8* %27
%30 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 2
store i32* null, i32** %30
%31 = getelementptr inbounds %struct.option, %struct.option* %25, i32 0, i32 3
store i32 77, i32* %31
%32 = getelementptr inbounds %struct.option, %struct.option* %25, i64 1
%33 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %33
%34 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 1
%35 = load i32, i32* @required_argument
%36 = trunc i32 %35 to i8
store i8 %36, i8* %34
%37 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 2
store i32* null, i32** %37
%38 = getelementptr inbounds %struct.option, %struct.option* %32, i32 0, i32 3
store i32 115, i32* %38
%39 = getelementptr inbounds %struct.option, %struct.option* %32, i64 1
%40 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 1
%42 = load i32, i32* @required_argument
%43 = trunc i32 %42 to i8
store i8 %43, i8* %41
%44 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 2
store i32* null, i32** %44
%45 = getelementptr inbounds %struct.option, %struct.option* %39, i32 0, i32 3
store i32 98, i32* %45
%46 = getelementptr inbounds %struct.option, %struct.option* %39, i64 1
%47 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8** %47
%48 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 1
%49 = load i32, i32* @required_argument
%50 = trunc i32 %49 to i8
store i8 %50, i8* %48
%51 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 2
store i32* null, i32** %51
%52 = getelementptr inbounds %struct.option, %struct.option* %46, i32 0, i32 3
store i32 110, i32* %52
%53 = getelementptr inbounds %struct.option, %struct.option* %46, i64 1
%54 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %54
%55 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 1
%56 = load i32, i32* @required_argument
%57 = trunc i32 %56 to i8
store i8 %57, i8* %55
%58 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 2
store i32* null, i32** %58
%59 = getelementptr inbounds %struct.option, %struct.option* %53, i32 0, i32 3
store i32 102, i32* %59
%60 = getelementptr inbounds %struct.option, %struct.option* %53, i64 1
%61 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %61
%62 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 1
%63 = load i32, i32* @required_argument
%64 = trunc i32 %63 to i8
store i8 %64, i8* %62
%65 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 2
store i32* null, i32** %65
%66 = getelementptr inbounds %struct.option, %struct.option* %60, i32 0, i32 3
store i32 101, i32* %66
%67 = getelementptr inbounds %struct.option, %struct.option* %60, i64 1
%68 = bitcast %struct.option* %67 to i8*
store i64 0, i64* @optind
br label %69
69: ; preds = %130, %2
%70 = load i32, i32* %4
%71 = load i8**, i8*** %5
%72 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %16, i64 0, i64 0
%73 = call i32 @getopt_long(i32 %70, i8** %71, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), %struct.option* %72, i32* %15)
store i32 %73, i32* %14
%74 = icmp ne i32 %73, -1
br i1 %74, label %75, label %131
75: ; preds = %69
%76 = load i32, i32* %14
switch i32 %76, label %123 [
i32 109, label %77
i32 77, label %86
i32 115, label %103
i32 98, label %115
i32 110, label %117
i32 102, label %119
i32 101, label %121
]
77: ; preds = %75
%78 = load i8*, i8** @optarg
%79 = call i32 @parseUnsigned(i8* %78, i32* %10)
%80 = icmp ne i32 %79, 0
br i1 %80, label %85, label %81
81: ; preds = %77
%82 = load i32, i32* @stderr
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.12, i64 0, i64 0))
%84 = load i32, i32* @EXIT_FAILURE
store i32 %84, i32* %3
br label %183
85: ; preds = %77
br label %130
86: ; preds = %75
%87 = load i8*, i8** @optarg
%88 = call i32 @parseUnsigned(i8* %87, i32* %11)
%89 = icmp ne i32 %88, 0
br i1 %89, label %94, label %90
90: ; preds = %86
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.12, i64 0, i64 0))
%93 = load i32, i32* @EXIT_FAILURE
store i32 %93, i32* %3
br label %183
94: ; preds = %86
%95 = load i32, i32* %11
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %101
97: ; preds = %94
%98 = load i32, i32* @stderr
%99 = call i32 (i32, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
%100 = load i32, i32* @EXIT_FAILURE
store i32 %100, i32* %3
br label %183
101: ; preds = %94
br label %102
102: ; preds = %101
br label %130
103: ; preds = %75
%104 = load i8*, i8** @optarg
%105 = call i32 @parseUnsigned(i8* %104, i32* %13)
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %110
107: ; preds = %103
%108 = load i32, i32* %13
%109 = icmp eq i32 %108, 0
br i1 %109, label %110, label %114
110: ; preds = %107, %103
%111 = load i32, i32* @stderr
%112 = call i32 (i32, i8*, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0))
%113 = load i32, i32* @EXIT_FAILURE
store i32 %113, i32* %3
br label %183
114: ; preds = %107
br label %130
115: ; preds = %75
%116 = load i8*, i8** @optarg
store i8* %116, i8** %6
br label %130
117: ; preds = %75
%118 = load i8*, i8** @optarg
store i8* %118, i8** %7
br label %130
119: ; preds = %75
%120 = load i8*, i8** @optarg
store i8* %120, i8** %8
br label %130
121: ; preds = %75
%122 = load i8*, i8** @optarg
store i8* %122, i8** %9
br label %130
123: ; preds = %75
%124 = load i32, i32* @stderr
%125 = load i8**, i8*** %5
%126 = getelementptr inbounds i8*, i8** %125, i64 0
%127 = load i8*, i8** %126
%128 = call i32 (i32, i8*, ...) @fprintf(i32 %124, i8* getelementptr inbounds ([454 x i8], [454 x i8]* @.str.15, i64 0, i64 0), i8* %127)
%129 = load i32, i32* @EXIT_FAILURE
store i32 %129, i32* %3
br label %183
130: ; preds = %121, %119, %117, %115, %114, %102, %85
br label %69
131: ; preds = %69
%132 = load i32, i32* %10
%133 = icmp slt i32 %132, 0
br i1 %133, label %141, label %134
134: ; preds = %131
%135 = load i32, i32* %11
%136 = icmp slt i32 %135, 0
br i1 %136, label %141, label %137
137: ; preds = %134
%138 = load i32, i32* %11
%139 = load i32, i32* %10
%140 = icmp slt i32 %138, %139
br i1 %140, label %141, label %148
141: ; preds = %137, %134, %131
%142 = load i32, i32* @stderr
%143 = load i8**, i8*** %5
%144 = getelementptr inbounds i8*, i8** %143, i64 0
%145 = load i8*, i8** %144
%146 = call i32 (i32, i8*, ...) @fprintf(i32 %142, i8* getelementptr inbounds ([454 x i8], [454 x i8]* @.str.15, i64 0, i64 0), i8* %145)
%147 = load i32, i32* @EXIT_FAILURE
store i32 %147, i32* %3
br label %183
148: ; preds = %137
%149 = load i32, i32* %13
%150 = load i32, i32* %10
%151 = mul nsw i32 %149, %150
%152 = load i32, i32* %11
%153 = sdiv i32 %151, %152
store i32 %153, i32* %12
%154 = load i8*, i8** %6
%155 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %154)
store i32 0, i32* %17
br label %156
156: ; preds = %172, %148
%157 = load i32, i32* %17
%158 = load i32, i32* %13
%159 = icmp slt i32 %157, %158
br i1 %159, label %160, label %175
160: ; preds = %156
%161 = load i32, i32* %17
%162 = add nsw i32 %161, 1
%163 = load i32, i32* %12
%164 = icmp sle i32 %162, %163
br i1 %164, label %165, label %167
165: ; preds = %160
%166 = load i8*, i8** %8
br label %169
167: ; preds = %160
%168 = load i8*, i8** %7
br label %169
169: ; preds = %167, %165
%170 = phi i8* [ %166, %165 ], [ %168, %167 ]
%171 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %170)
br label %172
172: ; preds = %169
%173 = load i32, i32* %17
%174 = add nsw i32 %173, 1
store i32 %174, i32* %17
br label %156
175: ; preds = %156
%176 = load i8*, i8** %9
%177 = load i32, i32* %10
%178 = mul nsw i32 100, %177
%179 = load i32, i32* %11
%180 = sdiv i32 %178, %179
%181 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8* %176, i32 %180)
%182 = load i32, i32* @EXIT_SUCCESS
store i32 %182, i32* %3
br label %183
183: ; preds = %175, %141, %123, %110, %97, %90, %81
%184 = load i32, i32* %3
ret i32 %184
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32*, i32 }
@.str = [2 x i8] c"[\00"
@.str.1 = [2 x i8] c"_\00"
@.str.2 = [2 x i8] c"#\00"
@.str.3 = [2 x i8] c"]\00"
@.str.4 = [4 x i8] c"min\00"
@required_argument = global i32 0
@.str.5 = [4 x i8] c"max\00"
@.str.6 = [5 x i8] c"size\00"
@.str.7 = [6 x i8] c"begin\00"
@.str.8 = [5 x i8] c"null\00"
@.str.9 = [5 x i8] c"fill\00"
@.str.10 = [4 x i8] c"end\00"
@optind = global i64 0
@.str.11 = [12 x i8] c"m:M:b:n:f:e\00"
@optarg = global i8* null
@stderr = global i32 0
@.str.12 = [55 x i8] c"invalid argument: all numbers must to be unsigned int\0A\00"
@EXIT_FAILURE = global i32 0
@.str.13 = [40 x i8] c"invalid argument: can't divide by zero\0A\00"
@.str.14 = [55 x i8] c"invalid argument: size must to be an unsigned int > 0\0A\00"
@.str.15 = [454 x i8] c"usage:\0A\09-m|--min ~ the minimum value, it must to be unsigned and smaller then max (required)\0A\09-M|--max ~ the maximum value, it must to be unsigned and bigger (required)\0A\09-s|--size ~ the maximum size of progress bar, it must to be unsigned (required)\0A\09-b|--begin ~ the begin frame of progress bar\0A\09-n|--null ~ ....\0A\09-f|--fill ~ ....\0A\09-e|--end ~ the ending frame progress bar\0A\0Aexample:\0A\09%s --min 10 --max 100 --begin $ --null _ --fill @ --end $\0A\0A\00"
@.str.16 = [3 x i8] c"%s\00"
@.str.17 = [8 x i8] c"%s %d%\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [8 x %struct.option]
%8 = bitcast i32* %3 to i8*
%9 = bitcast i32* %4 to i8*
%10 = bitcast i32* %5 to i8*
%11 = bitcast i32* %6 to i8*
store i32 -1, i32* %5
store i32 -1, i32* %6
store i32 -1, i32* %4
store i32 -1, i32* %3
%12 = bitcast [8 x %struct.option]* %7 to i8*
%13 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 0
%14 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8** %14
%15 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 0, i32 1
%16 = load i32, i32* @required_argument
%17 = trunc i32 %16 to i8
store i8 %17, i8* %15
%18 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 0, i32 2
store i32* null, i32** %18
%19 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 0, i32 3
store i32 109, i32* %19
%20 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 1, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8** %20
%21 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 1, i32 1
store i8 %17, i8* %21
%22 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 1, i32 2
store i32* null, i32** %22
%23 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 1, i32 3
store i32 77, i32* %23
%24 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 2, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i8** %24
%25 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 2, i32 1
store i8 %17, i8* %25
%26 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 2, i32 2
store i32* null, i32** %26
%27 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 2, i32 3
store i32 115, i32* %27
%28 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 3, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8** %28
%29 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 3, i32 1
store i8 %17, i8* %29
%30 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 3, i32 2
store i32* null, i32** %30
%31 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 3, i32 3
store i32 98, i32* %31
%32 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 4, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8** %32
%33 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 4, i32 1
store i8 %17, i8* %33
%34 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 4, i32 2
store i32* null, i32** %34
%35 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 4, i32 3
store i32 110, i32* %35
%36 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 5, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i8** %36
%37 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 5, i32 1
store i8 %17, i8* %37
%38 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 5, i32 2
store i32* null, i32** %38
%39 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 5, i32 3
store i32 102, i32* %39
%40 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 6, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i64 0, i64 0), i8** %40
%41 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 6, i32 1
store i8 %17, i8* %41
%42 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 6, i32 2
store i32* null, i32** %42
%43 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 6, i32 3
store i32 101, i32* %43
%44 = getelementptr inbounds [8 x %struct.option], [8 x %struct.option]* %7, i64 0, i64 7
%45 = bitcast %struct.option* %44 to i8*
store i64 0, i64* @optind
br label %46
46: ; preds = %93, %2
%47 = phi i8* [ %94, %93 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), %2 ]
%48 = phi i8* [ %52, %93 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), %2 ]
%49 = phi i8* [ %56, %93 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), %2 ]
%50 = phi i8* [ %59, %93 ], [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), %2 ]
br label %51
51: ; preds = %46, %95
%52 = phi i8* [ %48, %46 ], [ %96, %95 ]
%53 = phi i8* [ %49, %46 ], [ %56, %95 ]
%54 = phi i8* [ %50, %46 ], [ %59, %95 ]
br label %55
55: ; preds = %51, %97
%56 = phi i8* [ %53, %51 ], [ %98, %97 ]
%57 = phi i8* [ %54, %51 ], [ %59, %97 ]
br label %58
58: ; preds = %55, %99
%59 = phi i8* [ %57, %55 ], [ %100, %99 ]
br label %60
60: ; preds = %89, %58
%61 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0), %struct.option* %13, i32* %6)
switch i32 %61, label %101 [
i32 -1, label %105
i32 109, label %62
i32 77, label %69
i32 115, label %82
i32 98, label %93
i32 110, label %95
i32 102, label %97
i32 101, label %99
]
62: ; preds = %60
%63 = load i8*, i8** @optarg
%64 = call i32 @parseUnsigned(i8* %63, i32* %3)
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %89
66: ; preds = %62
%67 = load i32, i32* @stderr
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.12, i64 0, i64 0))
br label %138
69: ; preds = %60
%70 = load i8*, i8** @optarg
%71 = call i32 @parseUnsigned(i8* %70, i32* %4)
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %76
73: ; preds = %69
%74 = load i32, i32* @stderr
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.12, i64 0, i64 0))
br label %138
76: ; preds = %69
%77 = load i32, i32* %4
%78 = icmp eq i32 %77, 0
br i1 %78, label %79, label %89
79: ; preds = %76
%80 = load i32, i32* @stderr
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %80, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.13, i64 0, i64 0))
br label %138
82: ; preds = %60
%83 = load i8*, i8** @optarg
%84 = call i32 @parseUnsigned(i8* %83, i32* %5)
%85 = icmp eq i32 %84, 0
%86 = load i32, i32* %5
%87 = icmp eq i32 %86, 0
%88 = select i1 %85, i1 true, i1 %87
br i1 %88, label %90, label %89
89: ; preds = %82, %76, %62
br label %60
90: ; preds = %82
%91 = load i32, i32* @stderr
%92 = call i32 (i32, i8*, ...) @fprintf(i32 %91, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.14, i64 0, i64 0))
br label %138
93: ; preds = %60
%94 = load i8*, i8** @optarg
br label %46
95: ; preds = %60
%96 = load i8*, i8** @optarg
br label %51
97: ; preds = %60
%98 = load i8*, i8** @optarg
br label %55
99: ; preds = %60
%100 = load i8*, i8** @optarg
br label %58
101: ; preds = %60
%102 = load i32, i32* @stderr
%103 = load i8*, i8** %1
%104 = call i32 (i32, i8*, ...) @fprintf(i32 %102, i8* getelementptr inbounds ([454 x i8], [454 x i8]* @.str.15, i64 0, i64 0), i8* %103)
br label %138
105: ; preds = %60
%106 = load i32, i32* %3
%107 = icmp slt i32 %106, 0
%108 = load i32, i32* %4
%109 = icmp slt i32 %108, 0
%110 = select i1 %107, i1 true, i1 %109
%111 = icmp slt i32 %108, %106
%112 = select i1 %110, i1 true, i1 %111
br i1 %112, label %113, label %117
113: ; preds = %105
%114 = load i32, i32* @stderr
%115 = load i8*, i8** %1
%116 = call i32 (i32, i8*, ...) @fprintf(i32 %114, i8* getelementptr inbounds ([454 x i8], [454 x i8]* @.str.15, i64 0, i64 0), i8* %115)
br label %138
117: ; preds = %105
%118 = load i32, i32* %5
%119 = mul nsw i32 %118, %106
%120 = sdiv i32 %119, %108
%121 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %47)
%122 = load i32, i32* %5
%123 = icmp sgt i32 %122, 0
br i1 %123, label %130, label %124
124: ; preds = %130, %117
%125 = load i32, i32* %3
%126 = mul nsw i32 %125, 100
%127 = load i32, i32* %4
%128 = sdiv i32 %126, %127
%129 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.17, i64 0, i64 0), i8* %59, i32 %128)
br label %138
130: ; preds = %117, %130
%131 = phi i32 [ %132, %130 ], [ 0, %117 ]
%132 = add nuw nsw i32 %131, 1
%133 = icmp slt i32 %131, %120
%134 = select i1 %133, i8* %56, i8* %52
%135 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.16, i64 0, i64 0), i8* %134)
%136 = load i32, i32* %5
%137 = icmp slt i32 %132, %136
br i1 %137, label %130, label %124
138: ; preds = %124, %113, %101, %90, %79, %73, %66
%139 = phi i32* [ @EXIT_FAILURE, %101 ], [ @EXIT_FAILURE, %90 ], [ @EXIT_FAILURE, %79 ], [ @EXIT_FAILURE, %73 ], [ @EXIT_FAILURE, %66 ], [ @EXIT_FAILURE, %113 ], [ @EXIT_SUCCESS, %124 ]
%140 = load i32, i32* %139
ret i32 %140
}