#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 */
scalar_t__ number_lat(int *, int, int);
int /*<<< orphan*/ printf(char *, int, int, int, int, int, int);
int seek_forward(int gbdata[], int length, int position, int current_mode) {
  int number_count, byte_count, mixed_count, upper_count, lower_count,
      chinese_count;
  int sp, best_mode, done;
  int best_count, last = -1;
  int debug = 0;
  if (gbdata[position] > 0xff) {
    return 7;
  }
  switch (current_mode) {
  case 7:
    number_count = 13;
    byte_count = 13;
    mixed_count = 13;
    upper_count = 13;
    lower_count = 13;
    chinese_count = 0;
    break;
  case 1:
    number_count = 0;
    byte_count = 10;
    mixed_count = 10;
    upper_count = 10;
    lower_count = 10;
    chinese_count = 10;
    break;
  case 2:
    number_count = 5;
    byte_count = 7;
    mixed_count = 7;
    upper_count = 5;
    lower_count = 0;
    chinese_count = 5;
    break;
  case 3:
    number_count = 5;
    byte_count = 7;
    mixed_count = 7;
    upper_count = 0;
    lower_count = 5;
    chinese_count = 5;
    break;
  case 4:
    number_count = 10;
    byte_count = 10;
    mixed_count = 0;
    upper_count = 10;
    lower_count = 10;
    chinese_count = 10;
    break;
  case 6:
    number_count = 4;
    byte_count = 0;
    mixed_count = 4;
    upper_count = 4;
    lower_count = 4;
    chinese_count = 4;
    break;
  default:
    number_count = 4;
    byte_count = 4;
    mixed_count = 4;
    upper_count = 4;
    lower_count = 4;
    chinese_count = 4;
  }
  for (sp = position; (sp < length) && (sp <= (position + 8)); sp++) {
    done = 0;
    if (gbdata[sp] >= 0xff) {
      byte_count += 17;
      mixed_count += 23;
      upper_count += 18;
      lower_count += 18;
      chinese_count += 13;
      done = 1;
    }
    if ((gbdata[sp] >= 'a') && (gbdata[sp] <= 'z')) {
      byte_count += 8;
      mixed_count += 6;
      upper_count += 10;
      lower_count += 5;
      chinese_count += 13;
      done = 1;
    }
    if ((gbdata[sp] >= 'A') && (gbdata[sp] <= 'Z')) {
      byte_count += 8;
      mixed_count += 6;
      upper_count += 5;
      lower_count += 10;
      chinese_count += 13;
      done = 1;
    }
    if ((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) {
      byte_count += 8;
      mixed_count += 6;
      upper_count += 8;
      lower_count += 8;
      chinese_count += 13;
      done = 1;
    }
    if (gbdata[sp] == ' ') {
      byte_count += 8;
      mixed_count += 6;
      upper_count += 5;
      lower_count += 5;
      chinese_count += 13;
      done = 1;
    }
    if (done == 0) {
      byte_count += 8;
      mixed_count += 16;
      upper_count += 13;
      lower_count += 13;
      chinese_count += 13;
    }
    if (gbdata[sp] >= 0x7f) {
      mixed_count += 20;
      upper_count += 20;
      lower_count += 20;
    }
  }
  for (sp = position; (sp < (length - 1)) && (sp <= (position + 7)); sp++) {
    if ((gbdata[sp] == 0x13) && (gbdata[sp + 1] == 0x10)) {
      chinese_count -= 13;
    }
  }
  for (sp = position; (sp < (length - 1)) && (sp <= (position + 7)); sp++) {
    if (sp != last) {
      if (((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) &&
          ((gbdata[sp + 1] >= '0') && (gbdata[sp + 1] <= '9'))) {
        chinese_count -= 13;
        last = sp + 1;
      }
    }
  }
  number_count += number_lat(gbdata, length, position);
  if (debug) {
    printf("C %d / B %d / M %d / U %d / L %d / N %d\n", chinese_count,
           byte_count, mixed_count, upper_count, lower_count, number_count);
  }
  best_count = chinese_count;
  best_mode = 7;
  if (byte_count <= best_count) {
    best_count = byte_count;
    best_mode = 6;
  }
  if (mixed_count <= best_count) {
    best_count = mixed_count;
    best_mode = 4;
  }
  if (upper_count <= best_count) {
    best_count = upper_count;
    best_mode = 3;
  }
  if (lower_count <= best_count) {
    best_count = lower_count;
    best_mode = 2;
  }
  if (number_count <= best_count) {
    best_count = number_count;
    best_mode = 1;
  }
  return best_mode;
}


x86 assembly (clang, -O0):
<seek_forward>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0xffffffff,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0xff,(%rax,%rcx,4)
jle    1164 <seek_forward+0x44>
movl   $0x7,-0x4(%rbp)
jmp    173e <seek_forward+0x61e>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x6,%eax
ja     12a7 <seek_forward+0x187>
mov    -0x58(%rbp),%rax
lea    0xe7c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0xd,-0x20(%rbp)
movl   $0xd,-0x24(%rbp)
movl   $0xd,-0x28(%rbp)
movl   $0xd,-0x2c(%rbp)
movl   $0xd,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
jmp    12d1 <seek_forward+0x1b1>
movl   $0x0,-0x20(%rbp)
movl   $0xa,-0x24(%rbp)
movl   $0xa,-0x28(%rbp)
movl   $0xa,-0x2c(%rbp)
movl   $0xa,-0x30(%rbp)
movl   $0xa,-0x34(%rbp)
jmp    12d1 <seek_forward+0x1b1>
movl   $0x5,-0x20(%rbp)
movl   $0x7,-0x24(%rbp)
movl   $0x7,-0x28(%rbp)
movl   $0x5,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x5,-0x34(%rbp)
jmp    12d1 <seek_forward+0x1b1>
movl   $0x5,-0x20(%rbp)
movl   $0x7,-0x24(%rbp)
movl   $0x7,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x5,-0x30(%rbp)
movl   $0x5,-0x34(%rbp)
jmp    12d1 <seek_forward+0x1b1>
movl   $0xa,-0x20(%rbp)
movl   $0xa,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0xa,-0x2c(%rbp)
movl   $0xa,-0x30(%rbp)
movl   $0xa,-0x34(%rbp)
jmp    12d1 <seek_forward+0x1b1>
movl   $0x4,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
movl   $0x4,-0x30(%rbp)
movl   $0x4,-0x34(%rbp)
jmp    12d1 <seek_forward+0x1b1>
movl   $0x4,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
movl   $0x4,-0x30(%rbp)
movl   $0x4,-0x34(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%ecx
xor    %eax,%eax
cmp    -0x14(%rbp),%ecx
mov    %al,-0x59(%rbp)
jge    12f9 <seek_forward+0x1d9>
mov    -0x38(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x8,%ecx
cmp    %ecx,%eax
setle  %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
test   $0x1,%al
jne    1309 <seek_forward+0x1e9>
jmp    151e <seek_forward+0x3fe>
movl   $0x0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0xff,(%rax,%rcx,4)
jl     1359 <seek_forward+0x239>
mov    -0x24(%rbp),%eax
add    $0x11,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x17,%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x12,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x12,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x61,(%rax,%rcx,4)
jl     13b1 <seek_forward+0x291>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x7a,(%rax,%rcx,4)
jg     13b1 <seek_forward+0x291>
mov    -0x24(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x41,(%rax,%rcx,4)
jl     1409 <seek_forward+0x2e9>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x5a,(%rax,%rcx,4)
jg     1409 <seek_forward+0x2e9>
mov    -0x24(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x30,(%rax,%rcx,4)
jl     1461 <seek_forward+0x341>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x39,(%rax,%rcx,4)
jg     1461 <seek_forward+0x341>
mov    -0x24(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x20,(%rax,%rcx,4)
jne    14a7 <seek_forward+0x387>
mov    -0x24(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x6,%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x40(%rbp)
cmpl   $0x0,-0x40(%rbp)
jne    14de <seek_forward+0x3be>
mov    -0x24(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x30(%rbp)
mov    -0x34(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x7f,(%rax,%rcx,4)
jl     150b <seek_forward+0x3eb>
mov    -0x28(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x30(%rbp)
jmp    1510 <seek_forward+0x3f0>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12d7 <seek_forward+0x1b7>
mov    -0x18(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x5a(%rbp)
jge    154b <seek_forward+0x42b>
mov    -0x38(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x7,%ecx
cmp    %ecx,%eax
setle  %al
mov    %al,-0x5a(%rbp)
mov    -0x5a(%rbp),%al
test   $0x1,%al
jne    155b <seek_forward+0x43b>
jmp    15a0 <seek_forward+0x480>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x13,(%rax,%rcx,4)
jne    158d <seek_forward+0x46d>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x10,(%rax,%rcx,4)
jne    158d <seek_forward+0x46d>
mov    -0x34(%rbp),%eax
sub    $0xd,%eax
mov    %eax,-0x34(%rbp)
jmp    1592 <seek_forward+0x472>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1524 <seek_forward+0x404>
mov    -0x18(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x5b(%rbp)
jge    15cd <seek_forward+0x4ad>
mov    -0x38(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x7,%ecx
cmp    %ecx,%eax
setle  %al
mov    %al,-0x5b(%rbp)
mov    -0x5b(%rbp),%al
test   $0x1,%al
jne    15dd <seek_forward+0x4bd>
jmp    1665 <seek_forward+0x545>
mov    -0x38(%rbp),%eax
cmp    -0x48(%rbp),%eax
je     1652 <seek_forward+0x532>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x30,(%rax,%rcx,4)
jl     164d <seek_forward+0x52d>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x39,(%rax,%rcx,4)
jg     164d <seek_forward+0x52d>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x30,(%rax,%rcx,4)
jl     164d <seek_forward+0x52d>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x39,(%rax,%rcx,4)
jg     164d <seek_forward+0x52d>
mov    -0x34(%rbp),%eax
sub    $0xd,%eax
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1652 <seek_forward+0x532>
jmp    1657 <seek_forward+0x537>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    15a6 <seek_forward+0x486>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
call   1040 <number_lat@plt>
mov    %rax,%rcx
movslq -0x20(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x4c(%rbp)
je     16ae <seek_forward+0x58e>
mov    -0x34(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x28(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x30(%rbp),%r9d
mov    -0x20(%rbp),%eax
lea    0x976(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x7,-0x3c(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     16d4 <seek_forward+0x5b4>
mov    -0x24(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x6,-0x3c(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     16ed <seek_forward+0x5cd>
mov    -0x28(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x4,-0x3c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     1706 <seek_forward+0x5e6>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x3,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     171f <seek_forward+0x5ff>
mov    -0x30(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x2,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     1738 <seek_forward+0x618>
mov    -0x20(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seek_forward>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
movslq %edx,%r8
mov    (%rdi,%r8,4),%ebp
mov    $0x7,%eax
cmp    $0xff,%ebp
jg     142f <seek_forward+0x31f>
mov    %ebp,0x14(%rsp)
add    $0xffffffff,%ecx
cmp    $0x6,%ecx
ja     118c <seek_forward+0x7c>
movslq %ecx,%rax
lea    0xeb4(%rip),%rcx
mov    (%rcx,%rax,8),%rcx
mov    %rcx,0x18(%rsp)
lea    0xedc(%rip),%rcx
mov    (%rcx,%rax,4),%r14d
lea    0xeed(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
lea    0xeff(%rip),%rcx
mov    (%rcx,%rax,4),%ebp
lea    0xf11(%rip),%rcx
mov    (%rcx,%rax,4),%r12d
lea    0xf22(%rip),%rcx
mov    (%rcx,%rax,4),%r13d
jmp    11b2 <seek_forward+0xa2>
mov    $0x4,%r14d
mov    $0x4,%eax
mov    %rax,0x18(%rsp)
mov    $0x4,%ebx
mov    $0x4,%ebp
mov    $0x4,%r12d
mov    $0x4,%r13d
cmp    %esi,%edx
mov    %rsi,0x8(%rsp)
mov    %rdx,0x20(%rsp)
jge    1326 <seek_forward+0x216>
lea    0x8(%rdx),%ecx
movslq %esi,%rax
mov    %rax,0x30(%rsp)
movslq %ecx,%rax
mov    %rax,0x28(%rsp)
add    $0xd,%r13d
mov    0x14(%rsp),%eax
mov    %eax,%r10d
mov    %r8,%rcx
cmp    $0xff,%r10d
jl     1227 <seek_forward+0x117>
jmp    12d0 <seek_forward+0x1c0>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    0x28(%rsp),%rcx
jge    131e <seek_forward+0x20e>
mov    0x4(%rdi,%rcx,4),%r10d
add    $0xd,%r13d
mov    %rsi,%rcx
mov    %r9d,%r14d
cmp    $0xff,%r10d
jge    12d0 <seek_forward+0x1c0>
lea    -0x61(%r10),%esi
cmp    $0x19,%esi
ja     1250 <seek_forward+0x140>
add    $0x8,%r14d
mov    %r14d,%r9d
mov    $0x5,%r14d
mov    $0xa,%esi
mov    $0x6,%r11d
jmp    12e8 <seek_forward+0x1d8>
nopl   (%rax)
lea    -0x41(%r10),%esi
cmp    $0x19,%esi
ja     1280 <seek_forward+0x170>
add    $0x8,%r14d
mov    %r14d,%r9d
mov    $0xa,%r14d
mov    $0x5,%esi
mov    $0x6,%r11d
jmp    12e8 <seek_forward+0x1d8>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    -0x30(%r10),%esi
add    $0x8,%r14d
mov    %r14d,%r9d
cmp    $0x9,%esi
ja     12a3 <seek_forward+0x193>
mov    $0x8,%esi
mov    $0x6,%r11d
mov    $0x8,%r14d
jmp    12e8 <seek_forward+0x1d8>
xor    %esi,%esi
cmp    $0x20,%r10d
setne  %sil
mov    $0x10,%r11d
mov    $0x6,%eax
cmove  %eax,%r11d
lea    0x5(,%rsi,8),%esi
mov    %esi,%r14d
jmp    12e8 <seek_forward+0x1d8>
nopl   0x0(%rax,%rax,1)
add    $0x11,%r14d
mov    %r14d,%r9d
mov    $0x12,%esi
mov    $0x17,%r11d
mov    $0x12,%r14d
lea    (%rbx,%r11,1),%edx
lea    (%rsi,%rbp,1),%eax
lea    (%r12,%r14,1),%r15d
cmp    $0x7f,%r10d
lea    0x14(%rbx,%r11,1),%ebx
lea    0x14(%rbp,%rsi,1),%ebp
lea    0x14(%r12,%r14,1),%r12d
cmovl  %edx,%ebx
cmovl  %eax,%ebp
cmovl  %r15d,%r12d
lea    0x1(%rcx),%rsi
cmp    0x30(%rsp),%rsi
jl     1200 <seek_forward+0xf0>
mov    %r9d,%r14d
mov    0x8(%rsp),%rsi
lea    -0x1(%rsi),%r10d
mov    0x20(%rsp),%rdx
cmp    %edx,%r10d
jle    13d7 <seek_forward+0x2c7>
mov    %rdx,%r9
lea    0x7(%rdx),%ecx
movslq %r10d,%r15
movslq %ecx,%r11
mov    %r8,%rsi
mov    0x14(%rsp),%eax
nopl   0x0(%rax,%rax,1)
lea    0x1(%rsi),%rdx
cmp    $0x13,%eax
jne    1369 <seek_forward+0x259>
lea    -0xd(%r13),%ecx
cmpl   $0x10,0x4(%rdi,%rsi,4)
cmovne %r13d,%ecx
mov    %ecx,%r13d
cmp    %r15,%rdx
jge    137c <seek_forward+0x26c>
cmp    %r11,%rsi
jge    137c <seek_forward+0x26c>
mov    0x4(%rdi,%rsi,4),%eax
mov    %rdx,%rsi
jmp    1350 <seek_forward+0x240>
cmp    %r9d,%r10d
mov    %r9,%rdx
jle    13d7 <seek_forward+0x2c7>
mov    $0xffffffff,%r9d
mov    0x8(%rsp),%rsi
nop
cmp    %r9d,%r8d
je     13c4 <seek_forward+0x2b4>
mov    (%rdi,%r8,4),%ecx
add    $0xffffffd0,%ecx
cmp    $0x9,%ecx
ja     13c4 <seek_forward+0x2b4>
mov    0x4(%rdi,%r8,4),%ecx
add    $0xffffffd0,%ecx
lea    -0xd(%r13),%eax
lea    0x1(%r8),%r10d
cmp    $0xa,%ecx
cmovae %r13d,%eax
cmovb  %r10d,%r9d
mov    0x8(%rsp),%rsi
mov    %eax,%r13d
lea    0x1(%r8),%rcx
cmp    %r15,%rcx
jge    13dc <seek_forward+0x2cc>
cmp    %r11,%r8
mov    %rcx,%r8
jl     1390 <seek_forward+0x280>
jmp    13dc <seek_forward+0x2cc>
mov    0x8(%rsp),%rsi
call   1030 <number_lat@plt>
mov    0x18(%rsp),%rdx
add    %eax,%edx
xor    %eax,%eax
cmp    %r13d,%r14d
cmovg  %r13d,%r14d
setg   %al
or     $0x6,%eax
cmp    %r14d,%ebx
mov    $0x4,%ecx
cmovg  %eax,%ecx
cmovle %ebx,%r14d
cmp    %r14d,%ebp
mov    $0x3,%eax
cmovg  %ecx,%eax
cmovle %ebp,%r14d
cmp    %r14d,%r12d
mov    $0x2,%ecx
cmovg  %eax,%ecx
cmovle %r12d,%r14d
cmp    %edx,%r14d
mov    $0x1,%eax
cmovl  %ecx,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [41 x i8] c"C %d / B %d / M %d / U %d / L %d / N %d\0A\00"
define i32 @seek_forward(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca 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
%21 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 -1, i32* %20
store i32 0, i32* %21
%22 = load i32*, i32** %6
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i32, i32* %22, i64 %24
%26 = load i32, i32* %25
%27 = icmp sgt i32 %26, 255
br i1 %27, label %28, label %29
28: ; preds = %4
store i32 7, i32* %5
br label %340
29: ; preds = %4
%30 = load i32, i32* %9
switch i32 %30, label %37 [
i32 7, label %31
i32 1, label %32
i32 2, label %33
i32 3, label %34
i32 4, label %35
i32 6, label %36
]
31: ; preds = %29
store i32 13, i32* %10
store i32 13, i32* %11
store i32 13, i32* %12
store i32 13, i32* %13
store i32 13, i32* %14
store i32 0, i32* %15
br label %38
32: ; preds = %29
store i32 0, i32* %10
store i32 10, i32* %11
store i32 10, i32* %12
store i32 10, i32* %13
store i32 10, i32* %14
store i32 10, i32* %15
br label %38
33: ; preds = %29
store i32 5, i32* %10
store i32 7, i32* %11
store i32 7, i32* %12
store i32 5, i32* %13
store i32 0, i32* %14
store i32 5, i32* %15
br label %38
34: ; preds = %29
store i32 5, i32* %10
store i32 7, i32* %11
store i32 7, i32* %12
store i32 0, i32* %13
store i32 5, i32* %14
store i32 5, i32* %15
br label %38
35: ; preds = %29
store i32 10, i32* %10
store i32 10, i32* %11
store i32 0, i32* %12
store i32 10, i32* %13
store i32 10, i32* %14
store i32 10, i32* %15
br label %38
36: ; preds = %29
store i32 4, i32* %10
store i32 0, i32* %11
store i32 4, i32* %12
store i32 4, i32* %13
store i32 4, i32* %14
store i32 4, i32* %15
br label %38
37: ; preds = %29
store i32 4, i32* %10
store i32 4, i32* %11
store i32 4, i32* %12
store i32 4, i32* %13
store i32 4, i32* %14
store i32 4, i32* %15
br label %38
38: ; preds = %37, %36, %35, %34, %33, %32, %31
%39 = load i32, i32* %8
store i32 %39, i32* %16
br label %40
40: ; preds = %191, %38
%41 = load i32, i32* %16
%42 = load i32, i32* %7
%43 = icmp slt i32 %41, %42
br i1 %43, label %44, label %49
44: ; preds = %40
%45 = load i32, i32* %16
%46 = load i32, i32* %8
%47 = add nsw i32 %46, 8
%48 = icmp sle i32 %45, %47
br label %49
49: ; preds = %44, %40
%50 = phi i1 [ false, %40 ], [ %48, %44 ]
br i1 %50, label %51, label %194
51: ; preds = %49
store i32 0, i32* %18
%52 = load i32*, i32** %6
%53 = load i32, i32* %16
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i32, i32* %52, i64 %54
%56 = load i32, i32* %55
%57 = icmp sge i32 %56, 255
br i1 %57, label %58, label %69
58: ; preds = %51
%59 = load i32, i32* %11
%60 = add nsw i32 %59, 17
store i32 %60, i32* %11
%61 = load i32, i32* %12
%62 = add nsw i32 %61, 23
store i32 %62, i32* %12
%63 = load i32, i32* %13
%64 = add nsw i32 %63, 18
store i32 %64, i32* %13
%65 = load i32, i32* %14
%66 = add nsw i32 %65, 18
store i32 %66, i32* %14
%67 = load i32, i32* %15
%68 = add nsw i32 %67, 13
store i32 %68, i32* %15
store i32 1, i32* %18
br label %69
69: ; preds = %58, %51
%70 = load i32*, i32** %6
%71 = load i32, i32* %16
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %70, i64 %72
%74 = load i32, i32* %73
%75 = icmp sge i32 %74, 97
br i1 %75, label %76, label %94
76: ; preds = %69
%77 = load i32*, i32** %6
%78 = load i32, i32* %16
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i32, i32* %77, i64 %79
%81 = load i32, i32* %80
%82 = icmp sle i32 %81, 122
br i1 %82, label %83, label %94
83: ; preds = %76
%84 = load i32, i32* %11
%85 = add nsw i32 %84, 8
store i32 %85, i32* %11
%86 = load i32, i32* %12
%87 = add nsw i32 %86, 6
store i32 %87, i32* %12
%88 = load i32, i32* %13
%89 = add nsw i32 %88, 10
store i32 %89, i32* %13
%90 = load i32, i32* %14
%91 = add nsw i32 %90, 5
store i32 %91, i32* %14
%92 = load i32, i32* %15
%93 = add nsw i32 %92, 13
store i32 %93, i32* %15
store i32 1, i32* %18
br label %94
94: ; preds = %83, %76, %69
%95 = load i32*, i32** %6
%96 = load i32, i32* %16
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds i32, i32* %95, i64 %97
%99 = load i32, i32* %98
%100 = icmp sge i32 %99, 65
br i1 %100, label %101, label %119
101: ; preds = %94
%102 = load i32*, i32** %6
%103 = load i32, i32* %16
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i32, i32* %102, i64 %104
%106 = load i32, i32* %105
%107 = icmp sle i32 %106, 90
br i1 %107, label %108, label %119
108: ; preds = %101
%109 = load i32, i32* %11
%110 = add nsw i32 %109, 8
store i32 %110, i32* %11
%111 = load i32, i32* %12
%112 = add nsw i32 %111, 6
store i32 %112, i32* %12
%113 = load i32, i32* %13
%114 = add nsw i32 %113, 5
store i32 %114, i32* %13
%115 = load i32, i32* %14
%116 = add nsw i32 %115, 10
store i32 %116, i32* %14
%117 = load i32, i32* %15
%118 = add nsw i32 %117, 13
store i32 %118, i32* %15
store i32 1, i32* %18
br label %119
119: ; preds = %108, %101, %94
%120 = load i32*, i32** %6
%121 = load i32, i32* %16
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i32, i32* %120, i64 %122
%124 = load i32, i32* %123
%125 = icmp sge i32 %124, 48
br i1 %125, label %126, label %144
126: ; preds = %119
%127 = load i32*, i32** %6
%128 = load i32, i32* %16
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i32, i32* %127, i64 %129
%131 = load i32, i32* %130
%132 = icmp sle i32 %131, 57
br i1 %132, label %133, label %144
133: ; preds = %126
%134 = load i32, i32* %11
%135 = add nsw i32 %134, 8
store i32 %135, i32* %11
%136 = load i32, i32* %12
%137 = add nsw i32 %136, 6
store i32 %137, i32* %12
%138 = load i32, i32* %13
%139 = add nsw i32 %138, 8
store i32 %139, i32* %13
%140 = load i32, i32* %14
%141 = add nsw i32 %140, 8
store i32 %141, i32* %14
%142 = load i32, i32* %15
%143 = add nsw i32 %142, 13
store i32 %143, i32* %15
store i32 1, i32* %18
br label %144
144: ; preds = %133, %126, %119
%145 = load i32*, i32** %6
%146 = load i32, i32* %16
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i32, i32* %145, i64 %147
%149 = load i32, i32* %148
%150 = icmp eq i32 %149, 32
br i1 %150, label %151, label %162
151: ; preds = %144
%152 = load i32, i32* %11
%153 = add nsw i32 %152, 8
store i32 %153, i32* %11
%154 = load i32, i32* %12
%155 = add nsw i32 %154, 6
store i32 %155, i32* %12
%156 = load i32, i32* %13
%157 = add nsw i32 %156, 5
store i32 %157, i32* %13
%158 = load i32, i32* %14
%159 = add nsw i32 %158, 5
store i32 %159, i32* %14
%160 = load i32, i32* %15
%161 = add nsw i32 %160, 13
store i32 %161, i32* %15
store i32 1, i32* %18
br label %162
162: ; preds = %151, %144
%163 = load i32, i32* %18
%164 = icmp eq i32 %163, 0
br i1 %164, label %165, label %176
165: ; preds = %162
%166 = load i32, i32* %11
%167 = add nsw i32 %166, 8
store i32 %167, i32* %11
%168 = load i32, i32* %12
%169 = add nsw i32 %168, 16
store i32 %169, i32* %12
%170 = load i32, i32* %13
%171 = add nsw i32 %170, 13
store i32 %171, i32* %13
%172 = load i32, i32* %14
%173 = add nsw i32 %172, 13
store i32 %173, i32* %14
%174 = load i32, i32* %15
%175 = add nsw i32 %174, 13
store i32 %175, i32* %15
br label %176
176: ; preds = %165, %162
%177 = load i32*, i32** %6
%178 = load i32, i32* %16
%179 = sext i32 %178 to i64
%180 = getelementptr inbounds i32, i32* %177, i64 %179
%181 = load i32, i32* %180
%182 = icmp sge i32 %181, 127
br i1 %182, label %183, label %190
183: ; preds = %176
%184 = load i32, i32* %12
%185 = add nsw i32 %184, 20
store i32 %185, i32* %12
%186 = load i32, i32* %13
%187 = add nsw i32 %186, 20
store i32 %187, i32* %13
%188 = load i32, i32* %14
%189 = add nsw i32 %188, 20
store i32 %189, i32* %14
br label %190
190: ; preds = %183, %176
br label %191
191: ; preds = %190
%192 = load i32, i32* %16
%193 = add nsw i32 %192, 1
store i32 %193, i32* %16
br label %40
194: ; preds = %49
%195 = load i32, i32* %8
store i32 %195, i32* %16
br label %196
196: ; preds = %227, %194
%197 = load i32, i32* %16
%198 = load i32, i32* %7
%199 = sub nsw i32 %198, 1
%200 = icmp slt i32 %197, %199
br i1 %200, label %201, label %206
201: ; preds = %196
%202 = load i32, i32* %16
%203 = load i32, i32* %8
%204 = add nsw i32 %203, 7
%205 = icmp sle i32 %202, %204
br label %206
206: ; preds = %201, %196
%207 = phi i1 [ false, %196 ], [ %205, %201 ]
br i1 %207, label %208, label %230
208: ; preds = %206
%209 = load i32*, i32** %6
%210 = load i32, i32* %16
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds i32, i32* %209, i64 %211
%213 = load i32, i32* %212
%214 = icmp eq i32 %213, 19
br i1 %214, label %215, label %226
215: ; preds = %208
%216 = load i32*, i32** %6
%217 = load i32, i32* %16
%218 = add nsw i32 %217, 1
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds i32, i32* %216, i64 %219
%221 = load i32, i32* %220
%222 = icmp eq i32 %221, 16
br i1 %222, label %223, label %226
223: ; preds = %215
%224 = load i32, i32* %15
%225 = sub nsw i32 %224, 13
store i32 %225, i32* %15
br label %226
226: ; preds = %223, %215, %208
br label %227
227: ; preds = %226
%228 = load i32, i32* %16
%229 = add nsw i32 %228, 1
store i32 %229, i32* %16
br label %196
230: ; preds = %206
%231 = load i32, i32* %8
store i32 %231, i32* %16
br label %232
232: ; preds = %285, %230
%233 = load i32, i32* %16
%234 = load i32, i32* %7
%235 = sub nsw i32 %234, 1
%236 = icmp slt i32 %233, %235
br i1 %236, label %237, label %242
237: ; preds = %232
%238 = load i32, i32* %16
%239 = load i32, i32* %8
%240 = add nsw i32 %239, 7
%241 = icmp sle i32 %238, %240
br label %242
242: ; preds = %237, %232
%243 = phi i1 [ false, %232 ], [ %241, %237 ]
br i1 %243, label %244, label %288
244: ; preds = %242
%245 = load i32, i32* %16
%246 = load i32, i32* %20
%247 = icmp ne i32 %245, %246
br i1 %247, label %248, label %284
248: ; preds = %244
%249 = load i32*, i32** %6
%250 = load i32, i32* %16
%251 = sext i32 %250 to i64
%252 = getelementptr inbounds i32, i32* %249, i64 %251
%253 = load i32, i32* %252
%254 = icmp sge i32 %253, 48
br i1 %254, label %255, label %283
255: ; preds = %248
%256 = load i32*, i32** %6
%257 = load i32, i32* %16
%258 = sext i32 %257 to i64
%259 = getelementptr inbounds i32, i32* %256, i64 %258
%260 = load i32, i32* %259
%261 = icmp sle i32 %260, 57
br i1 %261, label %262, label %283
262: ; preds = %255
%263 = load i32*, i32** %6
%264 = load i32, i32* %16
%265 = add nsw i32 %264, 1
%266 = sext i32 %265 to i64
%267 = getelementptr inbounds i32, i32* %263, i64 %266
%268 = load i32, i32* %267
%269 = icmp sge i32 %268, 48
br i1 %269, label %270, label %283
270: ; preds = %262
%271 = load i32*, i32** %6
%272 = load i32, i32* %16
%273 = add nsw i32 %272, 1
%274 = sext i32 %273 to i64
%275 = getelementptr inbounds i32, i32* %271, i64 %274
%276 = load i32, i32* %275
%277 = icmp sle i32 %276, 57
br i1 %277, label %278, label %283
278: ; preds = %270
%279 = load i32, i32* %15
%280 = sub nsw i32 %279, 13
store i32 %280, i32* %15
%281 = load i32, i32* %16
%282 = add nsw i32 %281, 1
store i32 %282, i32* %20
br label %283
283: ; preds = %278, %270, %262, %255, %248
br label %284
284: ; preds = %283, %244
br label %285
285: ; preds = %284
%286 = load i32, i32* %16
%287 = add nsw i32 %286, 1
store i32 %287, i32* %16
br label %232
288: ; preds = %242
%289 = load i32*, i32** %6
%290 = load i32, i32* %7
%291 = load i32, i32* %8
%292 = call i64 @number_lat(i32* %289, i32 %290, i32 %291)
%293 = load i32, i32* %10
%294 = sext i32 %293 to i64
%295 = add nsw i64 %294, %292
%296 = trunc i64 %295 to i32
store i32 %296, i32* %10
%297 = load i32, i32* %21
%298 = icmp ne i32 %297, 0
br i1 %298, label %299, label %307
299: ; preds = %288
%300 = load i32, i32* %15
%301 = load i32, i32* %11
%302 = load i32, i32* %12
%303 = load i32, i32* %13
%304 = load i32, i32* %14
%305 = load i32, i32* %10
%306 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %300, i32 %301, i32 %302, i32 %303, i32 %304, i32 %305)
br label %307
307: ; preds = %299, %288
%308 = load i32, i32* %15
store i32 %308, i32* %19
store i32 7, i32* %17
%309 = load i32, i32* %11
%310 = load i32, i32* %19
%311 = icmp sle i32 %309, %310
br i1 %311, label %312, label %314
312: ; preds = %307
%313 = load i32, i32* %11
store i32 %313, i32* %19
store i32 6, i32* %17
br label %314
314: ; preds = %312, %307
%315 = load i32, i32* %12
%316 = load i32, i32* %19
%317 = icmp sle i32 %315, %316
br i1 %317, label %318, label %320
318: ; preds = %314
%319 = load i32, i32* %12
store i32 %319, i32* %19
store i32 4, i32* %17
br label %320
320: ; preds = %318, %314
%321 = load i32, i32* %13
%322 = load i32, i32* %19
%323 = icmp sle i32 %321, %322
br i1 %323, label %324, label %326
324: ; preds = %320
%325 = load i32, i32* %13
store i32 %325, i32* %19
store i32 3, i32* %17
br label %326
326: ; preds = %324, %320
%327 = load i32, i32* %14
%328 = load i32, i32* %19
%329 = icmp sle i32 %327, %328
br i1 %329, label %330, label %332
330: ; preds = %326
%331 = load i32, i32* %14
store i32 %331, i32* %19
store i32 2, i32* %17
br label %332
332: ; preds = %330, %326
%333 = load i32, i32* %10
%334 = load i32, i32* %19
%335 = icmp sle i32 %333, %334
br i1 %335, label %336, label %338
336: ; preds = %332
%337 = load i32, i32* %10
store i32 %337, i32* %19
store i32 1, i32* %17
br label %338
338: ; preds = %336, %332
%339 = load i32, i32* %17
store i32 %339, i32* %5
br label %340
340: ; preds = %338, %28
%341 = load i32, i32* %5
ret i32 %341
}

LLVM IR (-O2):
@switch.table.seek_forward = [7 x i64] [i64 0, i64 5, i64 5, i64 10, i64 4, i64 4, i64 13]
@switch.table.seek_forward.1 = [7 x i32] [i32 10, i32 7, i32 7, i32 10, i32 4, i32 0, i32 13]
@switch.table.seek_forward.2 = [7 x i32] [i32 10, i32 7, i32 7, i32 0, i32 4, i32 4, i32 13]
@switch.table.seek_forward.3 = [7 x i32] [i32 10, i32 5, i32 0, i32 10, i32 4, i32 4, i32 13]
@switch.table.seek_forward.4 = [7 x i32] [i32 10, i32 0, i32 5, i32 10, i32 4, i32 4, i32 13]
@switch.table.seek_forward.5 = [7 x i32] [i32 10, i32 5, i32 5, i32 10, i32 4, i32 4, i32 0]
define i32 @seek_forward(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, 255
br i1 %8, label %180, label %9
9: ; preds = %4
%10 = add i32 %3, -1
%11 = icmp ult i32 %10, 7
br i1 %11, label %12, label %31
12: ; preds = %9
%13 = sext i32 %10 to i64
%14 = getelementptr inbounds [7 x i64], [7 x i64]* @switch.table.seek_forward, i64 0, i64 %13
%15 = load i64, i64* %14
%16 = sext i32 %10 to i64
%17 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.seek_forward.1, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = sext i32 %10 to i64
%20 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.seek_forward.2, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = sext i32 %10 to i64
%23 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.seek_forward.3, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = sext i32 %10 to i64
%26 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.seek_forward.4, i64 0, i64 %25
%27 = load i32, i32* %26
%28 = sext i32 %10 to i64
%29 = getelementptr inbounds [7 x i32], [7 x i32]* @switch.table.seek_forward.5, i64 0, i64 %28
%30 = load i32, i32* %29
br label %31
31: ; preds = %9, %12
%32 = phi i64 [ %15, %12 ], [ 4, %9 ]
%33 = phi i32 [ %18, %12 ], [ 4, %9 ]
%34 = phi i32 [ %21, %12 ], [ 4, %9 ]
%35 = phi i32 [ %24, %12 ], [ 4, %9 ]
%36 = phi i32 [ %27, %12 ], [ 4, %9 ]
%37 = phi i32 [ %30, %12 ], [ 4, %9 ]
%38 = icmp slt i32 %2, %1
br i1 %38, label %39, label %43
39: ; preds = %31
%40 = add nsw i32 %2, 8
%41 = sext i32 %1 to i64
%42 = sext i32 %40 to i64
br label %55
43: ; preds = %86, %31
%44 = phi i32 [ %33, %31 ], [ %90, %86 ]
%45 = phi i32 [ %34, %31 ], [ %99, %86 ]
%46 = phi i32 [ %35, %31 ], [ %100, %86 ]
%47 = phi i32 [ %36, %31 ], [ %101, %86 ]
%48 = phi i32 [ %37, %31 ], [ %94, %86 ]
%49 = add nsw i32 %1, -1
%50 = add nsw i32 %2, 7
%51 = icmp sgt i32 %49, %2
br i1 %51, label %52, label %161
52: ; preds = %43
%53 = sext i32 %49 to i64
%54 = sext i32 %50 to i64
br label %113
55: ; preds = %106, %39
%56 = phi i32 [ %7, %39 ], [ %108, %106 ]
%57 = phi i64 [ %5, %39 ], [ %102, %106 ]
%58 = phi i32 [ %37, %39 ], [ %94, %106 ]
%59 = phi i32 [ %36, %39 ], [ %101, %106 ]
%60 = phi i32 [ %35, %39 ], [ %100, %106 ]
%61 = phi i32 [ %34, %39 ], [ %99, %106 ]
%62 = phi i32 [ %33, %39 ], [ %90, %106 ]
%63 = icmp sgt i32 %56, 254
br i1 %63, label %64, label %66
64: ; preds = %55
%65 = add nsw i32 %62, 17
br label %86
66: ; preds = %55
%67 = add i32 %56, -97
%68 = icmp ult i32 %67, 26
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = add nsw i32 %62, 8
br label %86
71: ; preds = %66
%72 = add i32 %56, -65
%73 = icmp ult i32 %72, 26
br i1 %73, label %74, label %76
74: ; preds = %71
%75 = add nsw i32 %62, 8
br label %86
76: ; preds = %71
%77 = add i32 %56, -48
%78 = icmp ult i32 %77, 10
br i1 %78, label %79, label %81
79: ; preds = %76
%80 = add nsw i32 %62, 8
br label %86
81: ; preds = %76
%82 = icmp eq i32 %56, 32
%83 = add nsw i32 %62, 8
%84 = select i1 %82, i32 6, i32 16
%85 = select i1 %82, i32 5, i32 13
br label %86
86: ; preds = %81, %69, %64, %74, %79
%87 = phi i32 [ 6, %69 ], [ 23, %64 ], [ 6, %74 ], [ 6, %79 ], [ %84, %81 ]
%88 = phi i32 [ 10, %69 ], [ 18, %64 ], [ 5, %74 ], [ 8, %79 ], [ %85, %81 ]
%89 = phi i32 [ 5, %69 ], [ 18, %64 ], [ 10, %74 ], [ 8, %79 ], [ %85, %81 ]
%90 = phi i32 [ %70, %69 ], [ %65, %64 ], [ %75, %74 ], [ %80, %79 ], [ %83, %81 ]
%91 = add nsw i32 %61, %87
%92 = add nsw i32 %60, %88
%93 = add nsw i32 %59, %89
%94 = add nuw nsw i32 %58, 13
%95 = icmp sgt i32 %56, 126
%96 = add nsw i32 %91, 20
%97 = add nsw i32 %92, 20
%98 = add nsw i32 %93, 20
%99 = select i1 %95, i32 %96, i32 %91
%100 = select i1 %95, i32 %97, i32 %92
%101 = select i1 %95, i32 %98, i32 %93
%102 = add nsw i64 %57, 1
%103 = icmp slt i64 %102, %41
%104 = icmp slt i64 %57, %42
%105 = select i1 %103, i1 %104, i1 false
br i1 %105, label %106, label %43
106: ; preds = %86
%107 = getelementptr inbounds i32, i32* %0, i64 %102
%108 = load i32, i32* %107
br label %55
109: ; preds = %125
br i1 %51, label %110, label %161
110: ; preds = %109
%111 = sext i32 %49 to i64
%112 = sext i32 %50 to i64
br label %133
113: ; preds = %130, %52
%114 = phi i32 [ %7, %52 ], [ %132, %130 ]
%115 = phi i64 [ %5, %52 ], [ %118, %130 ]
%116 = phi i32 [ %48, %52 ], [ %126, %130 ]
%117 = icmp eq i32 %114, 19
%118 = add nsw i64 %115, 1
br i1 %117, label %119, label %125
119: ; preds = %113
%120 = getelementptr inbounds i32, i32* %0, i64 %118
%121 = load i32, i32* %120
%122 = icmp eq i32 %121, 16
%123 = add nsw i32 %116, -13
%124 = select i1 %122, i32 %123, i32 %116
br label %125
125: ; preds = %113, %119
%126 = phi i32 [ %124, %119 ], [ %116, %113 ]
%127 = icmp slt i64 %118, %53
%128 = icmp slt i64 %115, %54
%129 = select i1 %127, i1 %128, i1 false
br i1 %129, label %130, label %109
130: ; preds = %125
%131 = getelementptr inbounds i32, i32* %0, i64 %118
%132 = load i32, i32* %131
br label %113
133: ; preds = %110, %154
%134 = phi i64 [ %5, %110 ], [ %157, %154 ]
%135 = phi i32 [ -1, %110 ], [ %156, %154 ]
%136 = phi i32 [ %126, %110 ], [ %155, %154 ]
%137 = trunc i64 %134 to i32
%138 = icmp eq i32 %135, %137
br i1 %138, label %154, label %139
139: ; preds = %133
%140 = getelementptr inbounds i32, i32* %0, i64 %134
%141 = load i32, i32* %140
%142 = add i32 %141, -48
%143 = icmp ult i32 %142, 10
br i1 %143, label %144, label %154
144: ; preds = %139
%145 = add nsw i64 %134, 1
%146 = getelementptr inbounds i32, i32* %0, i64 %145
%147 = load i32, i32* %146
%148 = add i32 %147, -48
%149 = icmp ult i32 %148, 10
%150 = add nsw i32 %136, -13
%151 = select i1 %149, i32 %150, i32 %136
%152 = trunc i64 %145 to i32
%153 = select i1 %149, i32 %152, i32 %135
br label %154
154: ; preds = %144, %133, %139
%155 = phi i32 [ %136, %139 ], [ %136, %133 ], [ %151, %144 ]
%156 = phi i32 [ %135, %139 ], [ %135, %133 ], [ %153, %144 ]
%157 = add nsw i64 %134, 1
%158 = icmp slt i64 %157, %111
%159 = icmp slt i64 %134, %112
%160 = select i1 %158, i1 %159, i1 false
br i1 %160, label %133, label %161
161: ; preds = %154, %43, %109
%162 = phi i32 [ %126, %109 ], [ %48, %43 ], [ %155, %154 ]
%163 = tail call i64 @number_lat(i32* %0, i32 %1, i32 %2)
%164 = add nsw i64 %163, %32
%165 = trunc i64 %164 to i32
%166 = icmp sgt i32 %44, %162
%167 = select i1 %166, i32 7, i32 6
%168 = select i1 %166, i32 %162, i32 %44
%169 = icmp sgt i32 %45, %168
%170 = select i1 %169, i32 %167, i32 4
%171 = select i1 %169, i32 %168, i32 %45
%172 = icmp sgt i32 %46, %171
%173 = select i1 %172, i32 %170, i32 3
%174 = select i1 %172, i32 %171, i32 %46
%175 = icmp sgt i32 %47, %174
%176 = select i1 %175, i32 %173, i32 2
%177 = select i1 %175, i32 %174, i32 %47
%178 = icmp slt i32 %177, %165
%179 = select i1 %178, i32 %176, i32 1
br label %180
180: ; preds = %4, %161
%181 = phi i32 [ %179, %161 ], [ 7, %4 ]
ret i32 %181
}