#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 */
int /*<<< orphan*/ predict(int *, float *, float *, float *);
char *strchr(char *, char const);
scalar_t__ strlen(char const *);
void predict_seq(char const *seq, float sm_arr[], float sb_arr[],
                 float sr_arr[]) {
  char *alphabet = "FIVWMLCHYAGNRTPDEQSK";
  char *p;
  int i, j, s[41];
  for (i = 0; i < 41; ++i)
    s[i] = 21 - 1;
  for (i = 0; i < (int)strlen(seq); ++i) {
    p = strchr(alphabet, seq[i]);
    if (p != NULL) {
      for (j = 1; j < 41; ++j)
        s[41 - j] = s[41 - j - 1];
      s[0] = p - alphabet;
      if (i >= (41 - 1) / 2) {
        predict(s, &sm_arr[i - (41 - 1) / 2], &sb_arr[i - (41 - 1) / 2],
                &sr_arr[i - (41 - 1) / 2]);
      }
    }
  }
  for (i = (int)strlen(seq) - (41 - 1) / 2; i < (int)strlen(seq); ++i) {
    for (j = 1; j < 41; ++j)
      s[41 - j] = s[41 - j - 1];
    s[0] = 21 - 1;
    predict(s, &sm_arr[i], &sb_arr[i], &sr_arr[i]);
  }
  return;
}


x86 assembly (clang, -O0):
<predict_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
lea    0xeae(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x29,-0x34(%rbp)
jge    1184 <predict_seq+0x54>
movslq -0x34(%rbp),%rax
movl   $0x14,-0xe0(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    115d <predict_seq+0x2d>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0xe4(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0xe4(%rbp),%eax
cmp    %ecx,%eax
jge    128e <predict_seq+0x15e>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
call   1040 <strchr@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     127b <predict_seq+0x14b>
movl   $0x1,-0x38(%rbp)
cmpl   $0x29,-0x38(%rbp)
jge    1216 <predict_seq+0xe6>
mov    $0x29,%eax
sub    -0x38(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xe0(%rbp,%rax,4),%ecx
mov    $0x29,%eax
sub    -0x38(%rbp),%eax
cltq
mov    %ecx,-0xe0(%rbp,%rax,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11d9 <predict_seq+0xa9>
mov    -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0xe0(%rbp)
cmpl   $0x14,-0x34(%rbp)
jl     1276 <predict_seq+0x146>
lea    -0xe0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x34(%rbp),%eax
sub    $0x14,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
mov    -0x34(%rbp),%eax
sub    $0x14,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x20(%rbp),%rcx
mov    -0x34(%rbp),%eax
sub    $0x14,%eax
cltq
shl    $0x2,%rax
add    %rax,%rcx
call   1050 <predict@plt>
jmp    127b <predict_seq+0x14b>
jmp    1280 <predict_seq+0x150>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    118b <predict_seq+0x5b>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x14,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0xe8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0xe8(%rbp),%eax
cmp    %ecx,%eax
jge    1355 <predict_seq+0x225>
movl   $0x1,-0x38(%rbp)
cmpl   $0x29,-0x38(%rbp)
jge    1304 <predict_seq+0x1d4>
mov    $0x29,%eax
sub    -0x38(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xe0(%rbp,%rax,4),%ecx
mov    $0x29,%eax
sub    -0x38(%rbp),%eax
cltq
mov    %ecx,-0xe0(%rbp,%rax,4)
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12c7 <predict_seq+0x197>
movl   $0x14,-0xe0(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    -0x18(%rbp),%rdx
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
mov    -0x20(%rbp),%rcx
movslq -0x34(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rcx
call   1050 <predict@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    129d <predict_seq+0x16d>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<predict_seq>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %rcx,0x10(%rsp)
mov    %rdx,0x8(%rsp)
mov    %rsi,(%rsp)
mov    %rdi,%r12
lea    0x24(%rsp),%r14
movaps 0xe92(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0xb0(%rsp)
call   1030 <strlen@plt>
mov    %rax,%rbx
test   %ebx,%ebx
jle    1240 <predict_seq+0x100>
xor    %r13d,%r13d
lea    0xe4a(%rip),%rbp
lea    0x20(%rsp),%r15
jmp    11e7 <predict_seq+0xa7>
nopl   (%rax)
add    $0x1,%r13
mov    %r12,%rdi
call   1030 <strlen@plt>
mov    %rax,%rbx
movslq %ebx,%rax
cmp    %rax,%r13
jge    1240 <predict_seq+0x100>
movsbl (%r12,%r13,1),%esi
mov    %rbp,%rdi
call   1040 <strchr@plt>
test   %rax,%rax
je     11d0 <predict_seq+0x90>
mov    %rax,%rbx
mov    $0xa0,%edx
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <memmove@plt>
sub    %ebp,%ebx
mov    %ebx,0x20(%rsp)
cmp    $0x14,%r13
jb     11d0 <predict_seq+0x90>
lea    -0x14(%r13),%eax
mov    (%rsp),%rcx
lea    (%rcx,%rax,4),%rsi
mov    0x8(%rsp),%rcx
lea    (%rcx,%rax,4),%rdx
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,4),%rcx
mov    %r15,%rdi
call   1050 <predict@plt>
jmp    11d0 <predict_seq+0x90>
add    $0xffffffec,%ebx
mov    %r12,%rdi
call   1030 <strlen@plt>
cmp    %eax,%ebx
jge    12d2 <predict_seq+0x192>
mov    %r14,%r13
movslq %ebx,%r14
mov    (%rsp),%rax
lea    (%rax,%r14,4),%r15
mov    0x8(%rsp),%rax
lea    (%rax,%r14,4),%rbx
mov    0x10(%rsp),%rax
lea    (%rax,%r14,4),%rbp
mov    %r12,0x18(%rsp)
nopl   0x0(%rax,%rax,1)
mov    $0xa0,%edx
mov    %r13,%rdi
lea    0x20(%rsp),%r12
mov    %r12,%rsi
call   1060 <memmove@plt>
movl   $0x14,0x20(%rsp)
mov    %r12,%rdi
mov    0x18(%rsp),%r12
mov    %r15,%rsi
mov    %rbx,%rdx
mov    %rbp,%rcx
call   1050 <predict@plt>
add    $0x1,%r14
mov    %r12,%rdi
call   1030 <strlen@plt>
cltq
add    $0x4,%r15
add    $0x4,%rbx
add    $0x4,%rbp
cmp    %rax,%r14
jl     1280 <predict_seq+0x140>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [21 x i8] c"FIVWMLCHYAGNRTPDEQSK\00"
define void @predict_seq(i8* nocapture %0, float* %1, float* %2, float* %3) {
%5 = alloca [41 x i32]
%6 = bitcast [41 x i32]* %5 to i8*
%7 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 0
%8 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 1
%9 = bitcast [41 x i32]* %5 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %9
%10 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 4
%11 = bitcast i32* %10 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %11
%12 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 8
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %13
%14 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 12
%15 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %15
%16 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 16
%17 = bitcast i32* %16 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %17
%18 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 20
%19 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %19
%20 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 24
%21 = bitcast i32* %20 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %21
%22 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 28
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %23
%24 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 32
%25 = bitcast i32* %24 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %25
%26 = getelementptr inbounds [41 x i32], [41 x i32]* %5, i64 0, i64 36
%27 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> <i32 20, i32 20, i32 20, i32 20>, <4 x i32>* %27
%28 = call i64 @strlen(i8* dereferenceable(1) %0)
%29 = trunc i64 %28 to i32
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %59
31: ; preds = %4
%32 = bitcast i32* %8 to i8*
br label %33
33: ; preds = %31, %51
%34 = phi i64 [ 0, %31 ], [ %52, %51 ]
%35 = getelementptr inbounds i8, i8* %0, i64 %34
%36 = load i8, i8* %35
%37 = call i8* @strchr(i8* dereferenceable(21) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8 signext %36)
%38 = icmp eq i8* %37, null
br i1 %38, label %51, label %39
39: ; preds = %33
%40 = ptrtoint i8* %37 to i64
%41 = trunc i64 %40 to i32
%42 = sub i32 %41, ptrtoint ([21 x i8]* @.str to i32)
store i32 %42, i32* %7
%43 = icmp ugt i64 %34, 19
br i1 %43, label %44, label %51
44: ; preds = %39
%45 = add nuw i64 %34, 4294967276
%46 = and i64 %45, 4294967295
%47 = getelementptr inbounds float, float* %1, i64 %46
%48 = getelementptr inbounds float, float* %2, i64 %46
%49 = getelementptr inbounds float, float* %3, i64 %46
%50 = call i32 @predict(i32* %7, float* %47, float* %48, float* %49)
br label %51
51: ; preds = %33, %44, %39
%52 = add nuw nsw i64 %34, 1
%53 = call i64 @strlen(i8* dereferenceable(1) %0)
%54 = shl i64 %53, 32
%55 = ashr exact i64 %54, 32
%56 = icmp slt i64 %52, %55
br i1 %56, label %33, label %57
57: ; preds = %51
%58 = trunc i64 %53 to i32
br label %59
59: ; preds = %57, %4
%60 = phi i32 [ %58, %57 ], [ %29, %4 ]
%61 = add i32 %60, -20
%62 = call i64 @strlen(i8* dereferenceable(1) %0)
%63 = trunc i64 %62 to i32
%64 = icmp slt i32 %61, %63
br i1 %64, label %65, label %79
65: ; preds = %59
%66 = bitcast i32* %8 to i8*
%67 = sext i32 %61 to i64
br label %68
68: ; preds = %65, %68
%69 = phi i64 [ %67, %65 ], [ %74, %68 ]
store i32 20, i32* %7
%70 = getelementptr inbounds float, float* %1, i64 %69
%71 = getelementptr inbounds float, float* %2, i64 %69
%72 = getelementptr inbounds float, float* %3, i64 %69
%73 = call i32 @predict(i32* %7, float* %70, float* %71, float* %72)
%74 = add nsw i64 %69, 1
%75 = call i64 @strlen(i8* dereferenceable(1) %0)
%76 = shl i64 %75, 32
%77 = ashr exact i64 %76, 32
%78 = icmp slt i64 %74, %77
br i1 %78, label %68, label %79
79: ; preds = %68, %59
ret void
}