#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int atoi(char *);
int /*<<< orphan*/ backend_span_domain(int, int);
int /*<<< orphan*/ bomp_custom_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ bomp_synchronize();
size_t omp_get_thread_num();
int /*<<< orphan*/ omp_set_num_threads(int);
int /*<<< orphan*/ printf(char *, ...);
int rdtsc();
int main(int argc, char *argv[]) {
  int nthreads;
  if (argc == 2) {
    nthreads = atoi(argv[1]);
    backend_span_domain(14, (64 * 1024));
    bomp_custom_init(NULL);
    omp_set_num_threads(nthreads);
  } else {
    assert(!"Specify number of threads");
  }
  volatile uint64_t workcnt[32] = {0};
  uint64_t last = rdtsc();
  volatile uint64_t exittime[10] = {0};
  for (int iter = 0;; iter = (iter + 1) % 10) {
    static uint64_t starta[16][5000000];
#pragma omp parallel
    { bomp_synchronize(); }
#pragma omp parallel
    for (uint64_t i = 0;; i++) {
      uint64_t lasta = rdtsc();
#pragma omp barrier
      if (i < 5000000) {
        starta[omp_get_thread_num()][i] = rdtsc() - lasta;
      }
      workcnt[omp_get_thread_num()]++;
#pragma omp master
      if (rdtsc() >= last + 2500000000UL) {
        printf("%lu: threads %d (%s), progress ", rdtsc(), nthreads, "static");
        for (int n = 0; n < 32; n++) {
          printf("%lu ", workcnt[n]);
        }
        printf("\n");
        last += 2500000000UL;
        if (exittime[iter] == 0) {
          exittime[iter] = i + 3;
          exittime[(iter + 10 - 2) % 10] = 0;
        }
      }
      if (exittime[iter] != 0 && exittime[iter] == i) {
        break;
      }
    }
    static uint64_t hgram[15] = {0};
    printf("exittime = %lu\n", exittime[iter]);
    assert(exittime[iter] <= 5000000);
    uint64_t endtime = exittime[iter] < 5000000 ? exittime[iter] : 5000000;
    for (int i = 0; i < endtime; i++) {
      for (int n = 0; n < nthreads; n++) {
        uint64_t val = starta[n][i];
        for (int j = 0; j < 15; j++) {
          val /= 10;
          if (val == 0) {
            hgram[j]++;
            break;
          }
        }
      }
    }
    uint64_t val = 1;
    for (int i = 0; i < 15; i++) {
      val *= 10;
      printf("%lu\t%lu\n", val, hgram[i]);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    11e8 <main+0x58>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10b0 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    $0xe,%edi
mov    $0x10000,%esi
call   1090 <backend_span_domain@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <bomp_custom_init@plt>
mov    -0x14(%rbp),%edi
call   1080 <omp_set_num_threads@plt>
jmp    11ef <main+0x5f>
xor    %edi,%edi
call   1070 <assert@plt>
lea    -0xa0(%rbp),%rax
mov    %rax,-0x118(%rbp)
xorps  %xmm0,%xmm0
movaps %xmm0,-0x110(%rbp)
movaps %xmm0,0x70(%rax)
movaps %xmm0,0x60(%rax)
movaps %xmm0,0x50(%rax)
movaps %xmm0,0x40(%rax)
movaps %xmm0,0x30(%rax)
movaps %xmm0,0x20(%rax)
movaps %xmm0,0x10(%rax)
movaps %xmm0,(%rax)
mov    $0x0,%al
call   1060 <rdtsc@plt>
mov    %eax,-0xa4(%rbp)
lea    -0xd0(%rbp),%rax
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rax)
movaps %xmm0,(%rax)
movq   $0x0,0x20(%rax)
movl   $0x0,-0xd4(%rbp)
mov    $0x0,%al
call   10a0 <bomp_synchronize@plt>
movl   $0x0,-0xd8(%rbp)
mov    $0x0,%al
call   1060 <rdtsc@plt>
mov    %eax,-0xdc(%rbp)
cmpl   $0x4c4b40,-0xd8(%rbp)
jge    12c2 <main+0x132>
mov    $0x0,%al
call   1060 <rdtsc@plt>
sub    -0xdc(%rbp),%eax
mov    %eax,-0x11c(%rbp)
mov    $0x0,%al
call   1040 <omp_get_thread_num@plt>
mov    -0x11c(%rbp),%edx
mov    %rax,%rcx
lea    0x2dd2(%rip),%rax
imul   $0x1312d00,%rcx,%rcx
add    %rcx,%rax
movslq -0xd8(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0x0,%al
call   1040 <omp_get_thread_num@plt>
mov    -0xa0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0xa0(%rbp,%rax,4)
mov    $0x0,%al
call   1060 <rdtsc@plt>
cltq
movslq -0xa4(%rbp),%rcx
movabs $0x9502f900,%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jb     13e5 <main+0x255>
mov    $0x0,%al
call   1060 <rdtsc@plt>
mov    %eax,%esi
mov    -0x14(%rbp),%edx
lea    0xd07(%rip),%rdi
lea    0xd20(%rip),%rcx
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xe0(%rbp)
cmpl   $0x20,-0xe0(%rbp)
jge    1368 <main+0x1d8>
movslq -0xe0(%rbp),%rax
mov    -0xa0(%rbp,%rax,4),%esi
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xe0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe0(%rbp)
jmp    132b <main+0x19b>
lea    0xcee(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movslq -0xa4(%rbp),%rax
movabs $0x9502f900,%rcx
add    %rcx,%rax
mov    %eax,-0xa4(%rbp)
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%eax
cmp    $0x0,%eax
jne    13e0 <main+0x250>
mov    -0xd8(%rbp),%ecx
add    $0x3,%ecx
movslq -0xd4(%rbp),%rax
mov    %ecx,-0xd0(%rbp,%rax,4)
mov    -0xd4(%rbp),%eax
add    $0xa,%eax
sub    $0x2,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
movl   $0x0,-0xd0(%rbp,%rax,4)
jmp    13e5 <main+0x255>
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%eax
cmp    $0x0,%eax
je     141b <main+0x28b>
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%eax
cmp    -0xd8(%rbp),%eax
jne    141b <main+0x28b>
jmp    1434 <main+0x2a4>
jmp    1420 <main+0x290>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    1267 <main+0xd7>
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%esi
lea    0xbfd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%eax
cmp    $0x4c4b40,%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%eax
cmp    $0x4c4b40,%eax
jge    14a2 <main+0x312>
movslq -0xd4(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%eax
mov    %eax,-0x120(%rbp)
jmp    14b2 <main+0x322>
mov    $0x4c4b40,%eax
mov    %eax,-0x120(%rbp)
jmp    14b2 <main+0x322>
mov    -0x120(%rbp),%eax
mov    %eax,-0xe4(%rbp)
movl   $0x0,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
cmp    -0xe4(%rbp),%eax
jge    15c1 <main+0x431>
movl   $0x0,-0xec(%rbp)
mov    -0xec(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    15a8 <main+0x418>
movslq -0xec(%rbp),%rcx
lea    0x2b7f(%rip),%rax
imul   $0x1312d00,%rcx,%rcx
add    %rcx,%rax
movslq -0xe8(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xf0(%rbp)
movl   $0x0,-0xf4(%rbp)
cmpl   $0xf,-0xf4(%rbp)
jge    158f <main+0x3ff>
mov    -0xf0(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xf0(%rbp)
cmpl   $0x0,-0xf0(%rbp)
jne    1576 <main+0x3e6>
movslq -0xf4(%rbp),%rcx
lea    0x1312fb1f(%rip),%rax
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
lea    0x1312fb12(%rip),%rax
mov    %edx,(%rax,%rcx,4)
jmp    158f <main+0x3ff>
jmp    157b <main+0x3eb>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1525 <main+0x395>
jmp    1594 <main+0x404>
mov    -0xec(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xec(%rbp)
jmp    14e4 <main+0x354>
jmp    15ad <main+0x41d>
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    14c8 <main+0x338>
movl   $0x1,-0xf8(%rbp)
movl   $0x0,-0xfc(%rbp)
cmpl   $0xf,-0xfc(%rbp)
jge    1628 <main+0x498>
imul   $0xa,-0xf8(%rbp),%eax
mov    %eax,-0xf8(%rbp)
mov    -0xf8(%rbp),%esi
movslq -0xfc(%rbp),%rcx
lea    0x1312fa7d(%rip),%rax
mov    (%rax,%rcx,4),%edx
lea    0xa49(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xfc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfc(%rbp)
jmp    15d5 <main+0x445>
jmp    162d <main+0x49d>
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xd4(%rbp)
jmp    1256 <main+0xc6>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
cmp    $0x2,%edi
jne    11e2 <main+0x42>
mov    0x8(%rsi),%rdi
call   10c0 <atoi@plt>
mov    %eax,%r12d
mov    $0xe,%edi
mov    $0x10000,%esi
call   10a0 <backend_span_domain@plt>
xor    %edi,%edi
call   1030 <bomp_custom_init@plt>
mov    %r12d,%edi
call   1090 <omp_set_num_threads@plt>
jmp    11e9 <main+0x49>
xor    %edi,%edi
call   1080 <assert@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1070 <rdtsc@plt>
mov    %eax,0x4(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movq   $0x0,0xb0(%rsp)
mov    %r12d,%eax
imul   $0x1312d00,%rax,%r13
lea    0xdd5(%rip),%r14
xor    %ebx,%ebx
jmp    13cb <main+0x22b>
nopl   0x0(%rax)
mov    0x1312fe1a(%rip),%edx
lea    0xdcf(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fe02(%rip),%edx
mov    %rbx,%rdi
mov    $0x64,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fdf1(%rip),%edx
mov    %rbx,%rdi
mov    $0x3e8,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fde0(%rip),%edx
mov    %rbx,%rdi
mov    $0x2710,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fdcf(%rip),%edx
mov    %rbx,%rdi
mov    $0x186a0,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fdbe(%rip),%edx
mov    %rbx,%rdi
mov    $0xf4240,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fdad(%rip),%edx
mov    %rbx,%rdi
mov    $0x989680,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd9c(%rip),%edx
mov    %rbx,%rdi
mov    $0x5f5e100,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd8b(%rip),%edx
mov    %rbx,%rdi
mov    $0x3b9aca00,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd7a(%rip),%edx
mov    %rbx,%rdi
mov    $0x540be400,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd69(%rip),%edx
mov    %rbx,%rdi
mov    $0x4876e800,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd58(%rip),%edx
mov    %rbx,%rdi
mov    $0xd4a51000,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd47(%rip),%edx
mov    %rbx,%rdi
mov    $0x4e72a000,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd36(%rip),%edx
mov    %rbx,%rdi
mov    $0x107a4000,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1312fd25(%rip),%edx
mov    %rbx,%rdi
mov    $0xa4c68000,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xc0(%rsp),%rbx
add    $0x1,%ebx
movslq %ebx,%rbx
imul   $0x66666667,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
xor    %eax,%eax
call   10b0 <bomp_synchronize@plt>
mov    %rbx,0xc0(%rsp)
movslq %ebx,%rax
mov    %rax,0xd0(%rsp)
add    $0x8,%eax
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0xa,%ecx
shr    $0xf,%edx
add    %cl,%dl
movzbl %dl,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbq %al,%rax
mov    %rax,0xc8(%rsp)
lea    0x2c6a(%rip),%rax
mov    %rax,0x8(%rsp)
xor    %ebp,%ebp
jmp    142a <main+0x28a>
nop
add    $0x1,%rbp
addq   $0x4,0x8(%rsp)
xor    %eax,%eax
call   1070 <rdtsc@plt>
cmp    $0x4c4b3f,%rbp
ja     1467 <main+0x2c7>
mov    %eax,%r15d
xor    %eax,%eax
call   1070 <rdtsc@plt>
mov    %r12d,%ebx
mov    %eax,%r12d
sub    %r15d,%r12d
xor    %eax,%eax
call   1050 <omp_get_thread_num@plt>
imul   $0x1312d00,%rax,%rax
mov    0x8(%rsp),%rcx
mov    %r12d,(%rcx,%rax,1)
mov    %ebx,%r12d
xor    %eax,%eax
call   1050 <omp_get_thread_num@plt>
addl   $0x1,0x10(%rsp,%rax,4)
xor    %eax,%eax
call   1070 <rdtsc@plt>
cltq
movslq 0x4(%rsp),%rbx
mov    $0x9502f900,%ecx
add    %rcx,%rbx
cmp    %rax,%rbx
mov    0xd0(%rsp),%r15
ja     16c0 <main+0x520>
xor    %eax,%eax
call   1070 <rdtsc@plt>
lea    0xb58(%rip),%rdi
mov    %eax,%esi
mov    %r12d,%edx
lea    0xb6c(%rip),%rcx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x10(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x14(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x18(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x20(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x24(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x28(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x30(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x34(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x38(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x3c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x40(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x44(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x48(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x4c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x50(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x54(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x58(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x5c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x60(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x64(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x68(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x6c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x70(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x74(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x78(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x7c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x80(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x84(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x88(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x8c(%rsp),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
cmpl   $0x0,0x90(%rsp,%r15,4)
jne    16ba <main+0x51a>
lea    0x3(%rbp),%eax
mov    %eax,0x90(%rsp,%r15,4)
mov    0xc8(%rsp),%rax
movl   $0x0,0x90(%rsp,%rax,4)
mov    %ebx,%eax
mov    %ebx,0x4(%rsp)
cmpl   $0x0,0x90(%rsp,%r15,4)
je     1420 <main+0x280>
mov    0x90(%rsp,%r15,4),%eax
cmp    %rax,%rbp
jne    1420 <main+0x280>
mov    0x90(%rsp,%r15,4),%esi
lea    0x93d(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x90(%rsp,%r15,4),%eax
xor    %edi,%edi
cmp    $0x4c4b41,%eax
setl   %dil
call   1080 <assert@plt>
mov    0x90(%rsp,%r15,4),%ecx
mov    $0x4c4b40,%eax
cmp    $0x4c4b3f,%ecx
lea    0x1312f958(%rip),%rbp
jg     173a <main+0x59a>
mov    0x90(%rsp,%r15,4),%eax
test   %eax,%eax
jle    1260 <main+0xc0>
mov    %eax,%r8d
lea    0x293c(%rip),%rcx
xor    %edx,%edx
jmp    1761 <main+0x5c1>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
add    $0x4,%rcx
cmp    %r8,%rdx
je     1260 <main+0xc0>
test   %r12d,%r12d
jle    1750 <main+0x5b0>
xor    %esi,%esi
jmp    1783 <main+0x5e3>
nopw   0x0(%rax,%rax,1)
xor    %ebx,%ebx
addl   $0x1,0x0(%rbp,%rbx,4)
add    $0x1312d00,%rsi
cmp    %rsi,%r13
je     1750 <main+0x5b0>
mov    (%rcx,%rsi,1),%edi
lea    0x9(%rdi),%ebx
cmp    $0x13,%ebx
jb     1770 <main+0x5d0>
movslq %edi,%rdi
imul   $0x66666667,%rdi,%rbx
mov    %rbx,%rax
sar    $0x22,%rax
shr    $0x3f,%rbx
add    %ebx,%eax
add    $0x9,%eax
mov    $0x1,%ebx
cmp    $0x13,%eax
jb     1772 <main+0x5d2>
imul   $0x51eb851f,%rdi,%rax
mov    %rax,%rbx
sar    $0x25,%rbx
shr    $0x3f,%rax
add    %ebx,%eax
add    $0x9,%eax
mov    $0x2,%ebx
cmp    $0x13,%eax
jb     1772 <main+0x5d2>
imul   $0x10624dd3,%rdi,%rax
mov    %rax,%rbx
sar    $0x26,%rbx
shr    $0x3f,%rax
add    %ebx,%eax
add    $0x9,%eax
mov    $0x3,%ebx
cmp    $0x13,%eax
jb     1772 <main+0x5d2>
imul   $0x68db8bad,%rdi,%rax
mov    %rax,%rbx
sar    $0x2c,%rbx
shr    $0x3f,%rax
add    %ebx,%eax
add    $0x9,%eax
mov    $0x4,%ebx
cmp    $0x13,%eax
jb     1772 <main+0x5d2>
imul   $0x14f8b589,%rdi,%rax
mov    %rax,%rbx
sar    $0x2d,%rbx
shr    $0x3f,%rax
add    %ebx,%eax
add    $0x9,%eax
mov    $0x5,%ebx
cmp    $0x13,%eax
jb     1772 <main+0x5d2>
imul   $0x431bde83,%rdi,%rax
mov    %rax,%rbx
sar    $0x32,%rbx
shr    $0x3f,%rax
add    %ebx,%eax
add    $0x9,%eax
mov    $0x6,%ebx
cmp    $0x13,%eax
jb     1772 <main+0x5d2>
imul   $0x6b5fca6b,%rdi,%rax
mov    %rax,%rbx
sar    $0x36,%rbx
shr    $0x3f,%rax
add    %ebx,%eax
add    $0x9,%eax
mov    $0x7,%ebx
cmp    $0x13,%eax
jb     1772 <main+0x5d2>
imul   $0x55e63b89,%rdi,%rax
mov    %rax,%rdi
sar    $0x39,%rdi
shr    $0x3f,%rax
add    %edi,%eax
add    $0x9,%eax
cmp    $0x13,%eax
mov    $0x9,%ebx
sbb    $0x0,%rbx
jmp    1772 <main+0x5d2>

LLVM IR (-O0):
@.str = [26 x i8] c"Specify number of threads\00"
@main.starta = internal global [16 x [5000000 x i32]] zeroinitializer
@.str.1 = [32 x i8] c"%lu: threads %d (%s), progress \00"
@.str.2 = [7 x i8] c"static\00"
@.str.3 = [5 x i8] c"%lu \00"
@.str.4 = [2 x i8] c"\0A\00"
@main.hgram = internal global [15 x i32] zeroinitializer
@.str.5 = [16 x i8] c"exittime = %lu\0A\00"
@.str.6 = [9 x i8] c"%lu\09%lu\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [32 x i32]
%8 = alloca i32
%9 = alloca [10 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%21 = load i32, i32* %4
%22 = icmp eq i32 %21, 2
br i1 %22, label %23, label %32
23: ; preds = %2
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @atoi(i8* %26)
store i32 %27, i32* %6
%28 = call i32 @backend_span_domain(i32 14, i32 65536)
%29 = call i32 @bomp_custom_init(i32* null)
%30 = load i32, i32* %6
%31 = call i32 @omp_set_num_threads(i32 %30)
br label %34
32: ; preds = %2
%33 = call i32 @assert(i32 0)
br label %34
34: ; preds = %32, %23
%35 = bitcast [32 x i32]* %7 to i8*
%36 = call i32 (...) @rdtsc()
store i32 %36, i32* %8
%37 = bitcast [10 x i32]* %9 to i8*
store i32 0, i32* %10
br label %38
38: ; preds = %208, %34
%39 = call i32 (...) @bomp_synchronize()
store i32 0, i32* %11
br label %40
40: ; preds = %119, %38
%41 = call i32 (...) @rdtsc()
store i32 %41, i32* %12
%42 = load i32, i32* %11
%43 = icmp slt i32 %42, 5000000
br i1 %43, label %44, label %53
44: ; preds = %40
%45 = call i32 (...) @rdtsc()
%46 = load i32, i32* %12
%47 = sub nsw i32 %45, %46
%48 = call i64 (...) @omp_get_thread_num()
%49 = getelementptr inbounds [16 x [5000000 x i32]], [16 x [5000000 x i32]]* @main.starta, i64 0, i64 %48
%50 = load i32, i32* %11
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [5000000 x i32], [5000000 x i32]* %49, i64 0, i64 %51
store i32 %47, i32* %52
br label %53
53: ; preds = %44, %40
%54 = call i64 (...) @omp_get_thread_num()
%55 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 %54
%56 = load volatile i32, i32* %55
%57 = add nsw i32 %56, 1
store volatile i32 %57, i32* %55
%58 = call i32 (...) @rdtsc()
%59 = sext i32 %58 to i64
%60 = load i32, i32* %8
%61 = sext i32 %60 to i64
%62 = add i64 %61, 2500000000
%63 = icmp uge i64 %59, %62
br i1 %63, label %64, label %104
64: ; preds = %53
%65 = call i32 (...) @rdtsc()
%66 = load i32, i32* %6
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %65, i32 %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %13
br label %68
68: ; preds = %77, %64
%69 = load i32, i32* %13
%70 = icmp slt i32 %69, 32
br i1 %70, label %71, label %80
71: ; preds = %68
%72 = load i32, i32* %13
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 %73
%75 = load volatile i32, i32* %74
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %75)
br label %77
77: ; preds = %71
%78 = load i32, i32* %13
%79 = add nsw i32 %78, 1
store i32 %79, i32* %13
br label %68
80: ; preds = %68
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%82 = load i32, i32* %8
%83 = sext i32 %82 to i64
%84 = add i64 %83, 2500000000
%85 = trunc i64 %84 to i32
store i32 %85, i32* %8
%86 = load i32, i32* %10
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %87
%89 = load volatile i32, i32* %88
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %103
91: ; preds = %80
%92 = load i32, i32* %11
%93 = add nsw i32 %92, 3
%94 = load i32, i32* %10
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %95
store volatile i32 %93, i32* %96
%97 = load i32, i32* %10
%98 = add nsw i32 %97, 10
%99 = sub nsw i32 %98, 2
%100 = srem i32 %99, 10
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %101
store volatile i32 0, i32* %102
br label %103
103: ; preds = %91, %80
br label %104
104: ; preds = %103, %53
%105 = load i32, i32* %10
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %106
%108 = load volatile i32, i32* %107
%109 = icmp ne i32 %108, 0
br i1 %109, label %110, label %118
110: ; preds = %104
%111 = load i32, i32* %10
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %112
%114 = load volatile i32, i32* %113
%115 = load i32, i32* %11
%116 = icmp eq i32 %114, %115
br i1 %116, label %117, label %118
117: ; preds = %110
br label %122
118: ; preds = %110, %104
br label %119
119: ; preds = %118
%120 = load i32, i32* %11
%121 = add nsw i32 %120, 1
store i32 %121, i32* %11
br label %40
122: ; preds = %117
%123 = load i32, i32* %10
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %124
%126 = load volatile i32, i32* %125
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %126)
%128 = load i32, i32* %10
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %129
%131 = load volatile i32, i32* %130
%132 = icmp sle i32 %131, 5000000
%133 = zext i1 %132 to i32
%134 = call i32 @assert(i32 %133)
%135 = load i32, i32* %10
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %136
%138 = load volatile i32, i32* %137
%139 = icmp slt i32 %138, 5000000
br i1 %139, label %140, label %145
140: ; preds = %122
%141 = load i32, i32* %10
%142 = sext i32 %141 to i64
%143 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 %142
%144 = load volatile i32, i32* %143
br label %146
145: ; preds = %122
br label %146
146: ; preds = %145, %140
%147 = phi i32 [ %144, %140 ], [ 5000000, %145 ]
store i32 %147, i32* %14
store i32 0, i32* %15
br label %148
148: ; preds = %188, %146
%149 = load i32, i32* %15
%150 = load i32, i32* %14
%151 = icmp slt i32 %149, %150
br i1 %151, label %152, label %191
152: ; preds = %148
store i32 0, i32* %16
br label %153
153: ; preds = %184, %152
%154 = load i32, i32* %16
%155 = load i32, i32* %6
%156 = icmp slt i32 %154, %155
br i1 %156, label %157, label %187
157: ; preds = %153
%158 = load i32, i32* %16
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [16 x [5000000 x i32]], [16 x [5000000 x i32]]* @main.starta, i64 0, i64 %159
%161 = load i32, i32* %15
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds [5000000 x i32], [5000000 x i32]* %160, i64 0, i64 %162
%164 = load i32, i32* %163
store i32 %164, i32* %17
store i32 0, i32* %18
br label %165
165: ; preds = %180, %157
%166 = load i32, i32* %18
%167 = icmp slt i32 %166, 15
br i1 %167, label %168, label %183
168: ; preds = %165
%169 = load i32, i32* %17
%170 = sdiv i32 %169, 10
store i32 %170, i32* %17
%171 = load i32, i32* %17
%172 = icmp eq i32 %171, 0
br i1 %172, label %173, label %179
173: ; preds = %168
%174 = load i32, i32* %18
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds [15 x i32], [15 x i32]* @main.hgram, i64 0, i64 %175
%177 = load i32, i32* %176
%178 = add nsw i32 %177, 1
store i32 %178, i32* %176
br label %183
179: ; preds = %168
br label %180
180: ; preds = %179
%181 = load i32, i32* %18
%182 = add nsw i32 %181, 1
store i32 %182, i32* %18
br label %165
183: ; preds = %173, %165
br label %184
184: ; preds = %183
%185 = load i32, i32* %16
%186 = add nsw i32 %185, 1
store i32 %186, i32* %16
br label %153
187: ; preds = %153
br label %188
188: ; preds = %187
%189 = load i32, i32* %15
%190 = add nsw i32 %189, 1
store i32 %190, i32* %15
br label %148
191: ; preds = %148
store i32 1, i32* %19
store i32 0, i32* %20
br label %192
192: ; preds = %204, %191
%193 = load i32, i32* %20
%194 = icmp slt i32 %193, 15
br i1 %194, label %195, label %207
195: ; preds = %192
%196 = load i32, i32* %19
%197 = mul nsw i32 %196, 10
store i32 %197, i32* %19
%198 = load i32, i32* %19
%199 = load i32, i32* %20
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds [15 x i32], [15 x i32]* @main.hgram, i64 0, i64 %200
%202 = load i32, i32* %201
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %198, i32 %202)
br label %204
204: ; preds = %195
%205 = load i32, i32* %20
%206 = add nsw i32 %205, 1
store i32 %206, i32* %20
br label %192
207: ; preds = %192
br label %208
208: ; preds = %207
%209 = load i32, i32* %10
%210 = add nsw i32 %209, 1
%211 = srem i32 %210, 10
store i32 %211, i32* %10
br label %38
}

LLVM IR (-O2):
@main.starta = internal unnamed_addr global [16 x [5000000 x i32]] zeroinitializer
@.str.1 = [32 x i8] c"%lu: threads %d (%s), progress \00"
@.str.2 = [7 x i8] c"static\00"
@.str.3 = [5 x i8] c"%lu \00"
@main.hgram = internal unnamed_addr global [15 x i32] zeroinitializer
@.str.5 = [16 x i8] c"exittime = %lu\0A\00"
@.str.6 = [9 x i8] c"%lu\09%lu\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [32 x i32]
%4 = alloca [10 x i32]
%5 = icmp eq i32 %0, 2
br i1 %5, label %6, label %13
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = tail call i32 @backend_span_domain(i32 14, i32 65536)
%11 = tail call i32 @bomp_custom_init(i32* null)
%12 = tail call i32 @omp_set_num_threads(i32 %9)
br label %15
13: ; preds = %2
%14 = tail call i32 @assert(i32 0)
br label %15
15: ; preds = %13, %6
%16 = phi i32 [ %9, %6 ], [ undef, %13 ]
%17 = bitcast [32 x i32]* %3 to i8*
%18 = tail call i32 (...) @rdtsc()
%19 = bitcast [10 x i32]* %4 to i8*
%20 = icmp sgt i32 %16, 0
%21 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 0
%22 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 1
%23 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 2
%24 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 3
%25 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 4
%26 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 5
%27 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 6
%28 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 7
%29 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 8
%30 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 9
%31 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 10
%32 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 11
%33 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 12
%34 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 13
%35 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 14
%36 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 15
%37 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 16
%38 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 17
%39 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 18
%40 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 19
%41 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 20
%42 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 21
%43 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 22
%44 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 23
%45 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 24
%46 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 25
%47 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 26
%48 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 27
%49 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 28
%50 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 29
%51 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 30
%52 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 31
%53 = zext i32 %16 to i64
br label %54
54: ; preds = %184, %15
%55 = phi i32 [ 0, %15 ], [ %216, %184 ]
%56 = phi i32 [ %18, %15 ], [ %160, %184 ]
%57 = tail call i32 (...) @bomp_synchronize()
%58 = sext i32 %55 to i64
%59 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %58
%60 = trunc i32 %55 to i8
%61 = add i8 %60, 8
%62 = srem i8 %61, 10
%63 = sext i8 %62 to i64
%64 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 %63
br label %65
65: ; preds = %167, %54
%66 = phi i64 [ %168, %167 ], [ 0, %54 ]
%67 = phi i32 [ %160, %167 ], [ %56, %54 ]
%68 = tail call i32 (...) @rdtsc()
%69 = icmp ult i64 %66, 5000000
br i1 %69, label %70, label %75
70: ; preds = %65
%71 = tail call i32 (...) @rdtsc()
%72 = sub nsw i32 %71, %68
%73 = tail call i64 (...) @omp_get_thread_num()
%74 = getelementptr inbounds [16 x [5000000 x i32]], [16 x [5000000 x i32]]* @main.starta, i64 0, i64 %73, i64 %66
store i32 %72, i32* %74
br label %75
75: ; preds = %70, %65
%76 = tail call i64 (...) @omp_get_thread_num()
%77 = getelementptr inbounds [32 x i32], [32 x i32]* %3, i64 0, i64 %76
%78 = load volatile i32, i32* %77
%79 = add nsw i32 %78, 1
store volatile i32 %79, i32* %77
%80 = tail call i32 (...) @rdtsc()
%81 = sext i32 %80 to i64
%82 = sext i32 %67 to i64
%83 = add nsw i64 %82, 2500000000
%84 = icmp ugt i64 %83, %81
br i1 %84, label %159, label %85
85: ; preds = %75
%86 = tail call i32 (...) @rdtsc()
%87 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i32 %86, i32 %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%88 = load volatile i32, i32* %21
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %88)
%90 = load volatile i32, i32* %22
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %90)
%92 = load volatile i32, i32* %23
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %92)
%94 = load volatile i32, i32* %24
%95 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %94)
%96 = load volatile i32, i32* %25
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %96)
%98 = load volatile i32, i32* %26
%99 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %98)
%100 = load volatile i32, i32* %27
%101 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %100)
%102 = load volatile i32, i32* %28
%103 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %102)
%104 = load volatile i32, i32* %29
%105 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %104)
%106 = load volatile i32, i32* %30
%107 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %106)
%108 = load volatile i32, i32* %31
%109 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %108)
%110 = load volatile i32, i32* %32
%111 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %110)
%112 = load volatile i32, i32* %33
%113 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %112)
%114 = load volatile i32, i32* %34
%115 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %114)
%116 = load volatile i32, i32* %35
%117 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %116)
%118 = load volatile i32, i32* %36
%119 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %118)
%120 = load volatile i32, i32* %37
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %120)
%122 = load volatile i32, i32* %38
%123 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %122)
%124 = load volatile i32, i32* %39
%125 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %124)
%126 = load volatile i32, i32* %40
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %126)
%128 = load volatile i32, i32* %41
%129 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %128)
%130 = load volatile i32, i32* %42
%131 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %130)
%132 = load volatile i32, i32* %43
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %132)
%134 = load volatile i32, i32* %44
%135 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %134)
%136 = load volatile i32, i32* %45
%137 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %136)
%138 = load volatile i32, i32* %46
%139 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %138)
%140 = load volatile i32, i32* %47
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %140)
%142 = load volatile i32, i32* %48
%143 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %142)
%144 = load volatile i32, i32* %49
%145 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %144)
%146 = load volatile i32, i32* %50
%147 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %146)
%148 = load volatile i32, i32* %51
%149 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %148)
%150 = load volatile i32, i32* %52
%151 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %150)
%152 = tail call i32 @putchar(i32 10)
%153 = trunc i64 %83 to i32
%154 = load volatile i32, i32* %59
%155 = icmp eq i32 %154, 0
br i1 %155, label %156, label %159
156: ; preds = %85
%157 = trunc i64 %66 to i32
%158 = add i32 %157, 3
store volatile i32 %158, i32* %59
store volatile i32 0, i32* %64
br label %159
159: ; preds = %85, %156, %75
%160 = phi i32 [ %153, %156 ], [ %153, %85 ], [ %67, %75 ]
%161 = load volatile i32, i32* %59
%162 = icmp eq i32 %161, 0
br i1 %162, label %167, label %163
163: ; preds = %159
%164 = load volatile i32, i32* %59
%165 = zext i32 %164 to i64
%166 = icmp eq i64 %66, %165
br i1 %166, label %169, label %167
167: ; preds = %159, %163
%168 = add nuw i64 %66, 1
br label %65
169: ; preds = %163
%170 = load volatile i32, i32* %59
%171 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i32 %170)
%172 = load volatile i32, i32* %59
%173 = icmp slt i32 %172, 5000001
%174 = zext i1 %173 to i32
%175 = tail call i32 @assert(i32 %174)
%176 = load volatile i32, i32* %59
%177 = icmp slt i32 %176, 5000000
br i1 %177, label %178, label %181
178: ; preds = %169
%179 = load volatile i32, i32* %59
%180 = icmp sgt i32 %179, 0
br i1 %180, label %181, label %184
181: ; preds = %169, %178
%182 = phi i32 [ %179, %178 ], [ 5000000, %169 ]
%183 = zext i32 %182 to i64
br label %217
184: ; preds = %219, %178
%185 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 0)
%186 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 10, i32 %185)
%187 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 1)
%188 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 100, i32 %187)
%189 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 2)
%190 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 1000, i32 %189)
%191 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 3)
%192 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 10000, i32 %191)
%193 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 4)
%194 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 100000, i32 %193)
%195 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 5)
%196 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 1000000, i32 %195)
%197 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 6)
%198 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 10000000, i32 %197)
%199 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 7)
%200 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 100000000, i32 %199)
%201 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 8)
%202 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 1000000000, i32 %201)
%203 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 9)
%204 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 1410065408, i32 %203)
%205 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 10)
%206 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 1215752192, i32 %205)
%207 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 11)
%208 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 -727379968, i32 %207)
%209 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 12)
%210 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 1316134912, i32 %209)
%211 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 13)
%212 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 276447232, i32 %211)
%213 = load i32, i32* getelementptr inbounds ([15 x i32], [15 x i32]* @main.hgram, i64 0, i64 14)
%214 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 -1530494976, i32 %213)
%215 = add nsw i32 %55, 1
%216 = srem i32 %215, 10
br label %54
217: ; preds = %181, %219
%218 = phi i64 [ 0, %181 ], [ %220, %219 ]
br i1 %20, label %222, label %219
219: ; preds = %261, %217
%220 = add nuw nsw i64 %218, 1
%221 = icmp eq i64 %220, %183
br i1 %221, label %184, label %217
222: ; preds = %217, %261
%223 = phi i64 [ %266, %261 ], [ 0, %217 ]
%224 = getelementptr inbounds [16 x [5000000 x i32]], [16 x [5000000 x i32]]* @main.starta, i64 0, i64 %223, i64 %218
%225 = load i32, i32* %224
%226 = add i32 %225, 9
%227 = icmp ult i32 %226, 19
br i1 %227, label %261, label %228
228: ; preds = %222
%229 = sdiv i32 %225, 10
%230 = add nsw i32 %229, 9
%231 = icmp ult i32 %230, 19
br i1 %231, label %261, label %232
232: ; preds = %228
%233 = sdiv i32 %225, 100
%234 = add nsw i32 %233, 9
%235 = icmp ult i32 %234, 19
br i1 %235, label %261, label %236
236: ; preds = %232
%237 = sdiv i32 %225, 1000
%238 = add nsw i32 %237, 9
%239 = icmp ult i32 %238, 19
br i1 %239, label %261, label %240
240: ; preds = %236
%241 = sdiv i32 %225, 10000
%242 = add nsw i32 %241, 9
%243 = icmp ult i32 %242, 19
br i1 %243, label %261, label %244
244: ; preds = %240
%245 = sdiv i32 %225, 100000
%246 = add nsw i32 %245, 9
%247 = icmp ult i32 %246, 19
br i1 %247, label %261, label %248
248: ; preds = %244
%249 = sdiv i32 %225, 1000000
%250 = add nsw i32 %249, 9
%251 = icmp ult i32 %250, 19
br i1 %251, label %261, label %252
252: ; preds = %248
%253 = sdiv i32 %225, 10000000
%254 = add nsw i32 %253, 9
%255 = icmp ult i32 %254, 19
br i1 %255, label %261, label %256
256: ; preds = %252
%257 = sdiv i32 %225, 100000000
%258 = add nsw i32 %257, 9
%259 = icmp ult i32 %258, 19
%260 = select i1 %259, i64 8, i64 9
br label %261
261: ; preds = %256, %222, %228, %232, %236, %240, %244, %248, %252
%262 = phi i64 [ 0, %222 ], [ 1, %228 ], [ 2, %232 ], [ 3, %236 ], [ 4, %240 ], [ 5, %244 ], [ 6, %248 ], [ 7, %252 ], [ %260, %256 ]
%263 = getelementptr inbounds [15 x i32], [15 x i32]* @main.hgram, i64 0, i64 %262
%264 = load i32, i32* %263
%265 = add nsw i32 %264, 1
store i32 %265, i32* %263
%266 = add nuw nsw i64 %223, 1
%267 = icmp eq i64 %266, %53
br i1 %267, label %219, label %222
}