#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;
  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] == 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    1734 <seek_forward+0x614>
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x58(%rbp)
sub    $0x6,%eax
ja     12a2 <seek_forward+0x182>
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    12cc <seek_forward+0x1ac>
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    12cc <seek_forward+0x1ac>
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    12cc <seek_forward+0x1ac>
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    12cc <seek_forward+0x1ac>
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    12cc <seek_forward+0x1ac>
movl   $0x4,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
movl   $0x4,-0x2c(%rbp)
movl   $0x4,-0x30(%rbp)
movl   $0x4,-0x34(%rbp)
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    12f4 <seek_forward+0x1d4>
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    1304 <seek_forward+0x1e4>
jmp    1519 <seek_forward+0x3f9>
movl   $0x0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0xff,(%rax,%rcx,4)
jl     1354 <seek_forward+0x234>
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     13ac <seek_forward+0x28c>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x7a,(%rax,%rcx,4)
jg     13ac <seek_forward+0x28c>
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     1404 <seek_forward+0x2e4>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x5a,(%rax,%rcx,4)
jg     1404 <seek_forward+0x2e4>
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     145c <seek_forward+0x33c>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x39,(%rax,%rcx,4)
jg     145c <seek_forward+0x33c>
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    14a2 <seek_forward+0x382>
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    14d9 <seek_forward+0x3b9>
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     1506 <seek_forward+0x3e6>
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    150b <seek_forward+0x3eb>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12d2 <seek_forward+0x1b2>
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    1546 <seek_forward+0x426>
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    1556 <seek_forward+0x436>
jmp    1596 <seek_forward+0x476>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x13,(%rax,%rcx,4)
jne    1583 <seek_forward+0x463>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x10,(%rax,%rcx,4)
jne    1583 <seek_forward+0x463>
mov    -0x34(%rbp),%eax
sub    $0xd,%eax
mov    %eax,-0x34(%rbp)
jmp    1588 <seek_forward+0x468>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    151f <seek_forward+0x3ff>
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    15c3 <seek_forward+0x4a3>
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    15d3 <seek_forward+0x4b3>
jmp    165b <seek_forward+0x53b>
mov    -0x38(%rbp),%eax
cmp    -0x48(%rbp),%eax
je     1648 <seek_forward+0x528>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x30,(%rax,%rcx,4)
jl     1643 <seek_forward+0x523>
mov    -0x10(%rbp),%rax
movslq -0x38(%rbp),%rcx
cmpl   $0x39,(%rax,%rcx,4)
jg     1643 <seek_forward+0x523>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x30,(%rax,%rcx,4)
jl     1643 <seek_forward+0x523>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
cmpl   $0x39,(%rax,%rcx,4)
jg     1643 <seek_forward+0x523>
mov    -0x34(%rbp),%eax
sub    $0xd,%eax
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x48(%rbp)
jmp    1648 <seek_forward+0x528>
jmp    164d <seek_forward+0x52d>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    159c <seek_forward+0x47c>
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     16a4 <seek_forward+0x584>
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    0x980(%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     16ca <seek_forward+0x5aa>
mov    -0x24(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x6,-0x3c(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     16e3 <seek_forward+0x5c3>
mov    -0x28(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x4,-0x3c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     16fc <seek_forward+0x5dc>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x3,-0x3c(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     1715 <seek_forward+0x5f5>
mov    -0x30(%rbp),%eax
mov    %eax,-0x44(%rbp)
movl   $0x2,-0x3c(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x44(%rbp),%eax
jg     172e <seek_forward+0x60e>
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    $0x28,%rsp
movslq %edx,%r15
mov    (%rdi,%r15,4),%r9d
mov    $0x7,%eax
cmp    $0xff,%r9d
jg     13bc <seek_forward+0x2ac>
add    $0xffffffff,%ecx
cmp    $0x6,%ecx
ja     1189 <seek_forward+0x79>
movslq %ecx,%rax
lea    0xeb7(%rip),%rcx
mov    (%rcx,%rax,8),%rcx
mov    %rcx,0x10(%rsp)
lea    0xedf(%rip),%rcx
mov    (%rcx,%rax,4),%r14d
lea    0xef0(%rip),%rcx
mov    (%rcx,%rax,4),%ebx
lea    0xf02(%rip),%rcx
mov    (%rcx,%rax,4),%ebp
lea    0xf14(%rip),%rcx
mov    (%rcx,%rax,4),%r12d
lea    0xf25(%rip),%rcx
mov    (%rcx,%rax,4),%r13d
jmp    11af <seek_forward+0x9f>
mov    $0x4,%r14d
mov    $0x4,%eax
mov    %rax,0x10(%rsp)
mov    $0x4,%ebx
mov    $0x4,%ebp
mov    $0x4,%r12d
mov    $0x4,%r13d
cmp    %esi,%edx
mov    %rdx,0x8(%rsp)
mov    %rsi,(%rsp)
jge    1305 <seek_forward+0x1f5>
lea    0x8(%rdx),%ecx
movslq %esi,%rax
mov    %rax,0x20(%rsp)
movslq %ecx,%rax
mov    %rax,0x18(%rsp)
add    $0xd,%r13d
mov    %r15,%r8
mov    %r14d,%esi
cmp    $0xff,%r9d
jl     1210 <seek_forward+0x100>
cs nopw 0x0(%rax,%rax,1)
add    $0x11,%esi
mov    $0x12,%r11d
mov    $0x17,%r14d
mov    $0x12,%r10d
jmp    12a0 <seek_forward+0x190>
nopw   0x0(%rax,%rax,1)
lea    -0x61(%r9),%ecx
cmp    $0x19,%ecx
ja     1230 <seek_forward+0x120>
add    $0x8,%esi
mov    $0x5,%r10d
mov    $0xa,%r11d
mov    $0x6,%r14d
jmp    12a0 <seek_forward+0x190>
lea    -0x41(%r9),%ecx
cmp    $0x19,%ecx
ja     1250 <seek_forward+0x140>
add    $0x8,%esi
mov    $0xa,%r10d
mov    $0x5,%r11d
mov    $0x6,%r14d
jmp    12a0 <seek_forward+0x190>
lea    -0x30(%r9),%ecx
add    $0x8,%esi
cmp    $0x9,%ecx
ja     1270 <seek_forward+0x160>
mov    $0x8,%r11d
mov    $0x6,%r14d
mov    $0x8,%r10d
jmp    12a0 <seek_forward+0x190>
xor    %ecx,%ecx
cmp    $0x20,%r9d
setne  %cl
mov    $0x10,%r14d
mov    $0x6,%eax
cmove  %eax,%r14d
lea    0x5(,%rcx,8),%r11d
mov    %r11d,%r10d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    (%rbx,%r14,1),%ecx
lea    (%r11,%rbp,1),%edx
lea    (%r12,%r10,1),%eax
cmp    $0x7f,%r9d
lea    0x14(%rbx,%r14,1),%ebx
lea    0x14(%rbp,%r11,1),%ebp
lea    0x14(%r12,%r10,1),%r12d
cmovl  %ecx,%ebx
cmovl  %edx,%ebp
cmovl  %eax,%r12d
lea    0x1(%r8),%rcx
cmp    0x20(%rsp),%rcx
jge    12f9 <seek_forward+0x1e9>
cmp    0x18(%rsp),%r8
jge    12f9 <seek_forward+0x1e9>
mov    0x4(%rdi,%r8,4),%r9d
add    $0xd,%r13d
mov    %rcx,%r8
cmp    $0xff,%r9d
jl     1210 <seek_forward+0x100>
jmp    11f0 <seek_forward+0xe0>
mov    %esi,%r14d
mov    0x8(%rsp),%rdx
mov    (%rsp),%rsi
lea    -0x1(%rsi),%eax
cmp    %edx,%eax
jle    1360 <seek_forward+0x250>
lea    0x7(%rdx),%ecx
movslq %eax,%r8
movslq %ecx,%r9
mov    $0xffffffff,%ecx
nopw   0x0(%rax,%rax,1)
cmp    %ecx,%r15d
je     134f <seek_forward+0x23f>
mov    (%rdi,%r15,4),%edx
add    $0xffffffd0,%edx
cmp    $0x9,%edx
ja     134f <seek_forward+0x23f>
mov    0x4(%rdi,%r15,4),%edx
add    $0xffffffd0,%edx
lea    -0xd(%r13),%eax
lea    0x1(%r15),%r10d
cmp    $0xa,%edx
cmovae %r13d,%eax
cmovb  %r10d,%ecx
mov    %eax,%r13d
lea    0x1(%r15),%rdx
cmp    %r8,%rdx
jge    1360 <seek_forward+0x250>
cmp    %r9,%r15
mov    %rdx,%r15
jl     1320 <seek_forward+0x210>
mov    (%rsp),%rsi
mov    0x8(%rsp),%rdx
call   1030 <number_lat@plt>
mov    0x10(%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    $0x28,%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 %339
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 %37
37: ; preds = %29, %36
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, %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 = %226, %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 %229
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 %225
215: ; preds = %208
%216 = load i32*, i32** %6
%217 = load i32, i32* %16
%218 = sext i32 %217 to i64
%219 = getelementptr inbounds i32, i32* %216, i64 %218
%220 = load i32, i32* %219
%221 = icmp eq i32 %220, 16
br i1 %221, label %222, label %225
222: ; preds = %215
%223 = load i32, i32* %15
%224 = sub nsw i32 %223, 13
store i32 %224, i32* %15
br label %225
225: ; preds = %222, %215, %208
br label %226
226: ; preds = %225
%227 = load i32, i32* %16
%228 = add nsw i32 %227, 1
store i32 %228, i32* %16
br label %196
229: ; preds = %206
%230 = load i32, i32* %8
store i32 %230, i32* %16
br label %231
231: ; preds = %284, %229
%232 = load i32, i32* %16
%233 = load i32, i32* %7
%234 = sub nsw i32 %233, 1
%235 = icmp slt i32 %232, %234
br i1 %235, label %236, label %241
236: ; preds = %231
%237 = load i32, i32* %16
%238 = load i32, i32* %8
%239 = add nsw i32 %238, 7
%240 = icmp sle i32 %237, %239
br label %241
241: ; preds = %236, %231
%242 = phi i1 [ false, %231 ], [ %240, %236 ]
br i1 %242, label %243, label %287
243: ; preds = %241
%244 = load i32, i32* %16
%245 = load i32, i32* %20
%246 = icmp ne i32 %244, %245
br i1 %246, label %247, label %283
247: ; preds = %243
%248 = load i32*, i32** %6
%249 = load i32, i32* %16
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds i32, i32* %248, i64 %250
%252 = load i32, i32* %251
%253 = icmp sge i32 %252, 48
br i1 %253, label %254, label %282
254: ; preds = %247
%255 = load i32*, i32** %6
%256 = load i32, i32* %16
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds i32, i32* %255, i64 %257
%259 = load i32, i32* %258
%260 = icmp sle i32 %259, 57
br i1 %260, label %261, label %282
261: ; preds = %254
%262 = load i32*, i32** %6
%263 = load i32, i32* %16
%264 = add nsw i32 %263, 1
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds i32, i32* %262, i64 %265
%267 = load i32, i32* %266
%268 = icmp sge i32 %267, 48
br i1 %268, label %269, label %282
269: ; preds = %261
%270 = load i32*, i32** %6
%271 = load i32, i32* %16
%272 = add nsw i32 %271, 1
%273 = sext i32 %272 to i64
%274 = getelementptr inbounds i32, i32* %270, i64 %273
%275 = load i32, i32* %274
%276 = icmp sle i32 %275, 57
br i1 %276, label %277, label %282
277: ; preds = %269
%278 = load i32, i32* %15
%279 = sub nsw i32 %278, 13
store i32 %279, i32* %15
%280 = load i32, i32* %16
%281 = add nsw i32 %280, 1
store i32 %281, i32* %20
br label %282
282: ; preds = %277, %269, %261, %254, %247
br label %283
283: ; preds = %282, %243
br label %284
284: ; preds = %283
%285 = load i32, i32* %16
%286 = add nsw i32 %285, 1
store i32 %286, i32* %16
br label %231
287: ; preds = %241
%288 = load i32*, i32** %6
%289 = load i32, i32* %7
%290 = load i32, i32* %8
%291 = call i64 @number_lat(i32* %288, i32 %289, i32 %290)
%292 = load i32, i32* %10
%293 = sext i32 %292 to i64
%294 = add nsw i64 %293, %291
%295 = trunc i64 %294 to i32
store i32 %295, i32* %10
%296 = load i32, i32* %21
%297 = icmp ne i32 %296, 0
br i1 %297, label %298, label %306
298: ; preds = %287
%299 = load i32, i32* %15
%300 = load i32, i32* %11
%301 = load i32, i32* %12
%302 = load i32, i32* %13
%303 = load i32, i32* %14
%304 = load i32, i32* %10
%305 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %299, i32 %300, i32 %301, i32 %302, i32 %303, i32 %304)
br label %306
306: ; preds = %298, %287
%307 = load i32, i32* %15
store i32 %307, i32* %19
store i32 7, i32* %17
%308 = load i32, i32* %11
%309 = load i32, i32* %19
%310 = icmp sle i32 %308, %309
br i1 %310, label %311, label %313
311: ; preds = %306
%312 = load i32, i32* %11
store i32 %312, i32* %19
store i32 6, i32* %17
br label %313
313: ; preds = %311, %306
%314 = load i32, i32* %12
%315 = load i32, i32* %19
%316 = icmp sle i32 %314, %315
br i1 %316, label %317, label %319
317: ; preds = %313
%318 = load i32, i32* %12
store i32 %318, i32* %19
store i32 4, i32* %17
br label %319
319: ; preds = %317, %313
%320 = load i32, i32* %13
%321 = load i32, i32* %19
%322 = icmp sle i32 %320, %321
br i1 %322, label %323, label %325
323: ; preds = %319
%324 = load i32, i32* %13
store i32 %324, i32* %19
store i32 3, i32* %17
br label %325
325: ; preds = %323, %319
%326 = load i32, i32* %14
%327 = load i32, i32* %19
%328 = icmp sle i32 %326, %327
br i1 %328, label %329, label %331
329: ; preds = %325
%330 = load i32, i32* %14
store i32 %330, i32* %19
store i32 2, i32* %17
br label %331
331: ; preds = %329, %325
%332 = load i32, i32* %10
%333 = load i32, i32* %19
%334 = icmp sle i32 %332, %333
br i1 %334, label %335, label %337
335: ; preds = %331
%336 = load i32, i32* %10
store i32 %336, i32* %19
store i32 1, i32* %17
br label %337
337: ; preds = %335, %331
%338 = load i32, i32* %17
store i32 %338, i32* %5
br label %339
339: ; preds = %337, %28
%340 = load i32, i32* %5
ret i32 %340
}

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 4, 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 %156, 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 %51
43: ; preds = %82, %31
%44 = phi i32 [ %33, %31 ], [ %86, %82 ]
%45 = phi i32 [ %34, %31 ], [ %95, %82 ]
%46 = phi i32 [ %35, %31 ], [ %96, %82 ]
%47 = phi i32 [ %36, %31 ], [ %97, %82 ]
%48 = phi i32 [ %37, %31 ], [ %90, %82 ]
%49 = add nsw i32 %1, -1
%50 = icmp sgt i32 %49, %2
br i1 %50, label %105, label %137
51: ; preds = %102, %39
%52 = phi i32 [ %7, %39 ], [ %104, %102 ]
%53 = phi i64 [ %5, %39 ], [ %98, %102 ]
%54 = phi i32 [ %37, %39 ], [ %90, %102 ]
%55 = phi i32 [ %36, %39 ], [ %97, %102 ]
%56 = phi i32 [ %35, %39 ], [ %96, %102 ]
%57 = phi i32 [ %34, %39 ], [ %95, %102 ]
%58 = phi i32 [ %33, %39 ], [ %86, %102 ]
%59 = icmp sgt i32 %52, 254
br i1 %59, label %60, label %62
60: ; preds = %51
%61 = add nsw i32 %58, 17
br label %82
62: ; preds = %51
%63 = add i32 %52, -97
%64 = icmp ult i32 %63, 26
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = add nsw i32 %58, 8
br label %82
67: ; preds = %62
%68 = add i32 %52, -65
%69 = icmp ult i32 %68, 26
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = add nsw i32 %58, 8
br label %82
72: ; preds = %67
%73 = add i32 %52, -48
%74 = icmp ult i32 %73, 10
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = add nsw i32 %58, 8
br label %82
77: ; preds = %72
%78 = icmp eq i32 %52, 32
%79 = add nsw i32 %58, 8
%80 = select i1 %78, i32 6, i32 16
%81 = select i1 %78, i32 5, i32 13
br label %82
82: ; preds = %77, %65, %60, %70, %75
%83 = phi i32 [ 6, %65 ], [ 23, %60 ], [ 6, %70 ], [ 6, %75 ], [ %80, %77 ]
%84 = phi i32 [ 10, %65 ], [ 18, %60 ], [ 5, %70 ], [ 8, %75 ], [ %81, %77 ]
%85 = phi i32 [ 5, %65 ], [ 18, %60 ], [ 10, %70 ], [ 8, %75 ], [ %81, %77 ]
%86 = phi i32 [ %66, %65 ], [ %61, %60 ], [ %71, %70 ], [ %76, %75 ], [ %79, %77 ]
%87 = add nsw i32 %57, %83
%88 = add nsw i32 %56, %84
%89 = add nsw i32 %55, %85
%90 = add nuw nsw i32 %54, 13
%91 = icmp sgt i32 %52, 126
%92 = add nsw i32 %87, 20
%93 = add nsw i32 %88, 20
%94 = add nsw i32 %89, 20
%95 = select i1 %91, i32 %92, i32 %87
%96 = select i1 %91, i32 %93, i32 %88
%97 = select i1 %91, i32 %94, i32 %89
%98 = add nsw i64 %53, 1
%99 = icmp slt i64 %98, %41
%100 = icmp slt i64 %53, %42
%101 = select i1 %99, i1 %100, i1 false
br i1 %101, label %102, label %43
102: ; preds = %82
%103 = getelementptr inbounds i32, i32* %0, i64 %98
%104 = load i32, i32* %103
br label %51
105: ; preds = %43
%106 = add nsw i32 %2, 7
%107 = sext i32 %49 to i64
%108 = sext i32 %106 to i64
br label %109
109: ; preds = %105, %130
%110 = phi i64 [ %5, %105 ], [ %133, %130 ]
%111 = phi i32 [ -1, %105 ], [ %132, %130 ]
%112 = phi i32 [ %48, %105 ], [ %131, %130 ]
%113 = trunc i64 %110 to i32
%114 = icmp eq i32 %111, %113
br i1 %114, label %130, label %115
115: ; preds = %109
%116 = getelementptr inbounds i32, i32* %0, i64 %110
%117 = load i32, i32* %116
%118 = add i32 %117, -48
%119 = icmp ult i32 %118, 10
br i1 %119, label %120, label %130
120: ; preds = %115
%121 = add nsw i64 %110, 1
%122 = getelementptr inbounds i32, i32* %0, i64 %121
%123 = load i32, i32* %122
%124 = add i32 %123, -48
%125 = icmp ult i32 %124, 10
%126 = add nsw i32 %112, -13
%127 = select i1 %125, i32 %126, i32 %112
%128 = trunc i64 %121 to i32
%129 = select i1 %125, i32 %128, i32 %111
br label %130
130: ; preds = %120, %109, %115
%131 = phi i32 [ %112, %115 ], [ %112, %109 ], [ %127, %120 ]
%132 = phi i32 [ %111, %115 ], [ %111, %109 ], [ %129, %120 ]
%133 = add nsw i64 %110, 1
%134 = icmp slt i64 %133, %107
%135 = icmp slt i64 %110, %108
%136 = select i1 %134, i1 %135, i1 false
br i1 %136, label %109, label %137
137: ; preds = %130, %43
%138 = phi i32 [ %48, %43 ], [ %131, %130 ]
%139 = tail call i64 @number_lat(i32* %0, i32 %1, i32 %2)
%140 = add nsw i64 %139, %32
%141 = trunc i64 %140 to i32
%142 = icmp sgt i32 %44, %138
%143 = select i1 %142, i32 7, i32 6
%144 = select i1 %142, i32 %138, i32 %44
%145 = icmp sgt i32 %45, %144
%146 = select i1 %145, i32 %143, i32 4
%147 = select i1 %145, i32 %144, i32 %45
%148 = icmp sgt i32 %46, %147
%149 = select i1 %148, i32 %146, i32 3
%150 = select i1 %148, i32 %147, i32 %46
%151 = icmp sgt i32 %47, %150
%152 = select i1 %151, i32 %149, i32 2
%153 = select i1 %151, i32 %150, i32 %47
%154 = icmp slt i32 %153, %141
%155 = select i1 %154, i32 %152, i32 1
br label %156
156: ; preds = %4, %137
%157 = phi i32 [ %155, %137 ], [ 7, %4 ]
ret i32 %157
}