#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*/ printf(char *, unsigned long long);
int main() {
  char *number =
      "731671765313306249192251196744265747423553491949349698352031277450632623"
      "957831801698480186947885184385861560789112949495459501737958331952853208"
      "805511125406987471585238630507156932909632952274430435576689664895044524"
      "452316173185640309871112172238311362229893423380308135336276614282806444"
      "486645238749303589072962904915604407723907138105158593079608667017242712"
      "188399879790879227492190169972088809377665727333001053367881220235421809"
      "751254540594752243525849077116705560136048395864467063244157221553975369"
      "781797784617406495514929086256932197846862248283972241375657056057490261"
      "407972968652414535100474821663704844031998900088952434506585412275886668"
      "811642717147992444292823086346567481391912316282458617866458359124566529"
      "476545682848912883142607690042242190226710556263211111093705442175069416"
      "589604080719840385096245544436298123098787992724428490918884580156166097"
      "919133875499200524063689912560717606058861164671094050775410022569831552"
      "0005593572972571636269561882670428252483600823257530420752963450";
  int i;
  long long unsigned int j = 0;
  long long unsigned int k = 0;
  int pos = 0;
  while (pos < 987) {
    j = 1;
    for (i = pos; i < (pos + 13); i++) {
      j *= *(number + i) - '0';
      if (j > k) {
        k = j;
      }
    }
    pos++;
  }
  printf("%llu", k);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rax
mov    %rax,-0x10(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x3db,-0x2c(%rbp)
jge    11be <main+0xae>
movq   $0x1,-0x20(%rbp)
mov    -0x2c(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0xd,%ecx
cmp    %ecx,%eax
jge    11b0 <main+0xa0>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
cltq
imul   -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jbe    119d <main+0x8d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    11a2 <main+0x92>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    115c <main+0x4c>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1141 <main+0x31>
mov    -0x28(%rbp),%rsi
lea    0x1220(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x37,%r8b
mov    $0xc,%eax
xor    %esi,%esi
lea    0xede(%rip),%r9
jmp    1140 <main+0x30>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%rax
cmp    $0x3e7,%rax
je     1284 <main+0x174>
movsbq %r8b,%rcx
add    $0xffffffffffffffd0,%rcx
mov    %rcx,%rdx
cmp    %rsi,%rcx
ja     1153 <main+0x43>
mov    %rsi,%rdx
movsbq -0xb(%rax,%r9,1),%r8
lea    -0x30(%r8),%rdi
imul   %rcx,%rdi
mov    %rdi,%r10
cmp    %rdx,%rdi
ja     116c <main+0x5c>
mov    %rdx,%r10
movsbq -0xa(%rax,%r9,1),%rsi
add    $0xffffffffffffffd0,%rsi
imul   %rdi,%rsi
mov    %rsi,%rcx
cmp    %r10,%rsi
ja     1185 <main+0x75>
mov    %r10,%rcx
movsbq -0x9(%rax,%r9,1),%rdi
add    $0xffffffffffffffd0,%rdi
imul   %rsi,%rdi
mov    %rdi,%rdx
cmp    %rcx,%rdi
ja     119e <main+0x8e>
mov    %rcx,%rdx
movsbq -0x8(%rax,%r9,1),%rsi
add    $0xffffffffffffffd0,%rsi
imul   %rdi,%rsi
mov    %rsi,%rcx
cmp    %rdx,%rsi
ja     11b7 <main+0xa7>
mov    %rdx,%rcx
movsbq -0x7(%rax,%r9,1),%rdi
add    $0xffffffffffffffd0,%rdi
imul   %rsi,%rdi
mov    %rdi,%rdx
cmp    %rcx,%rdi
ja     11d0 <main+0xc0>
mov    %rcx,%rdx
movsbq -0x6(%rax,%r9,1),%rsi
add    $0xffffffffffffffd0,%rsi
imul   %rdi,%rsi
mov    %rsi,%rcx
cmp    %rdx,%rsi
ja     11e9 <main+0xd9>
mov    %rdx,%rcx
movsbq -0x5(%rax,%r9,1),%rdi
add    $0xffffffffffffffd0,%rdi
imul   %rsi,%rdi
mov    %rdi,%rdx
cmp    %rcx,%rdi
ja     1202 <main+0xf2>
mov    %rcx,%rdx
movsbq -0x4(%rax,%r9,1),%rsi
add    $0xffffffffffffffd0,%rsi
imul   %rdi,%rsi
mov    %rsi,%rcx
cmp    %rdx,%rsi
ja     121b <main+0x10b>
mov    %rdx,%rcx
movsbq -0x3(%rax,%r9,1),%rdi
add    $0xffffffffffffffd0,%rdi
imul   %rsi,%rdi
mov    %rdi,%rdx
cmp    %rcx,%rdi
ja     1234 <main+0x124>
mov    %rcx,%rdx
movsbq -0x2(%rax,%r9,1),%rsi
add    $0xffffffffffffffd0,%rsi
imul   %rdi,%rsi
mov    %rsi,%rcx
cmp    %rdx,%rsi
ja     124d <main+0x13d>
mov    %rdx,%rcx
movsbq -0x1(%rax,%r9,1),%rdi
add    $0xffffffffffffffd0,%rdi
imul   %rsi,%rdi
mov    %rdi,%rdx
cmp    %rcx,%rdi
ja     1266 <main+0x156>
mov    %rcx,%rdx
movsbq (%rax,%r9,1),%rsi
add    $0xffffffffffffffd0,%rsi
imul   %rdi,%rsi
cmp    %rdx,%rsi
ja     1130 <main+0x20>
mov    %rdx,%rsi
jmp    1130 <main+0x20>
lea    0x115e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1001 x i8] c"7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450\00"
@.str.1 = [5 x i8] c"%llu\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([1001 x i8], [1001 x i8]* @.str, i64 0, i64 0), i8** %2
store i64 0, i64* %4
store i64 0, i64* %5
store i32 0, i32* %6
br label %7
7: ; preds = %37, %0
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 987
br i1 %9, label %10, label %40
10: ; preds = %7
store i64 1, i64* %4
%11 = load i32, i32* %6
store i32 %11, i32* %3
br label %12
12: ; preds = %34, %10
%13 = load i32, i32* %3
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 13
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %37
17: ; preds = %12
%18 = load i8*, i8** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = sub nsw i32 %23, 48
%25 = sext i32 %24 to i64
%26 = load i64, i64* %4
%27 = mul i64 %26, %25
store i64 %27, i64* %4
%28 = load i64, i64* %4
%29 = load i64, i64* %5
%30 = icmp ugt i64 %28, %29
br i1 %30, label %31, label %33
31: ; preds = %17
%32 = load i64, i64* %4
store i64 %32, i64* %5
br label %33
33: ; preds = %31, %17
br label %34
34: ; preds = %33
%35 = load i32, i32* %3
%36 = add nsw i32 %35, 1
store i32 %36, i32* %3
br label %12
37: ; preds = %12
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %7
40: ; preds = %7
%41 = load i64, i64* %5
%42 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %41)
%43 = load i32, i32* %1
ret i32 %43
}

LLVM IR (-O2):
@.str = [1001 x i8] c"7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450\00"
@.str.1 = [5 x i8] c"%llu\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i8 [ 55, %0 ], [ %11, %1 ]
%3 = phi i64 [ 0, %0 ], [ %9, %1 ]
%4 = phi i64 [ 0, %0 ], [ %104, %1 ]
%5 = sext i8 %2 to i64
%6 = add nsw i64 %5, -48
%7 = icmp ugt i64 %6, %4
%8 = select i1 %7, i64 %6, i64 %4
%9 = add nuw nsw i64 %3, 1
%10 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i64
%13 = add nsw i64 %12, -48
%14 = mul nsw i64 %13, %6
%15 = icmp ugt i64 %14, %8
%16 = select i1 %15, i64 %14, i64 %8
%17 = add nuw nsw i64 %3, 2
%18 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i64
%21 = add nsw i64 %20, -48
%22 = mul nsw i64 %21, %14
%23 = icmp ugt i64 %22, %16
%24 = select i1 %23, i64 %22, i64 %16
%25 = add nuw nsw i64 %3, 3
%26 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i64
%29 = add nsw i64 %28, -48
%30 = mul nsw i64 %29, %22
%31 = icmp ugt i64 %30, %24
%32 = select i1 %31, i64 %30, i64 %24
%33 = add nuw nsw i64 %3, 4
%34 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i64
%37 = add nsw i64 %36, -48
%38 = mul nsw i64 %37, %30
%39 = icmp ugt i64 %38, %32
%40 = select i1 %39, i64 %38, i64 %32
%41 = add nuw nsw i64 %3, 5
%42 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i64
%45 = add nsw i64 %44, -48
%46 = mul nsw i64 %45, %38
%47 = icmp ugt i64 %46, %40
%48 = select i1 %47, i64 %46, i64 %40
%49 = add nuw nsw i64 %3, 6
%50 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i64
%53 = add nsw i64 %52, -48
%54 = mul nsw i64 %53, %46
%55 = icmp ugt i64 %54, %48
%56 = select i1 %55, i64 %54, i64 %48
%57 = add nuw nsw i64 %3, 7
%58 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %57
%59 = load i8, i8* %58
%60 = sext i8 %59 to i64
%61 = add nsw i64 %60, -48
%62 = mul nsw i64 %61, %54
%63 = icmp ugt i64 %62, %56
%64 = select i1 %63, i64 %62, i64 %56
%65 = add nuw nsw i64 %3, 8
%66 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %65
%67 = load i8, i8* %66
%68 = sext i8 %67 to i64
%69 = add nsw i64 %68, -48
%70 = mul i64 %69, %62
%71 = icmp ugt i64 %70, %64
%72 = select i1 %71, i64 %70, i64 %64
%73 = add nuw nsw i64 %3, 9
%74 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %73
%75 = load i8, i8* %74
%76 = sext i8 %75 to i64
%77 = add nsw i64 %76, -48
%78 = mul i64 %77, %70
%79 = icmp ugt i64 %78, %72
%80 = select i1 %79, i64 %78, i64 %72
%81 = add nuw nsw i64 %3, 10
%82 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = sext i8 %83 to i64
%85 = add nsw i64 %84, -48
%86 = mul i64 %85, %78
%87 = icmp ugt i64 %86, %80
%88 = select i1 %87, i64 %86, i64 %80
%89 = add nuw nsw i64 %3, 11
%90 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %89
%91 = load i8, i8* %90
%92 = sext i8 %91 to i64
%93 = add nsw i64 %92, -48
%94 = mul i64 %93, %86
%95 = icmp ugt i64 %94, %88
%96 = select i1 %95, i64 %94, i64 %88
%97 = add nuw nsw i64 %3, 12
%98 = getelementptr inbounds [1001 x i8], [1001 x i8]* @.str, i64 0, i64 %97
%99 = load i8, i8* %98
%100 = sext i8 %99 to i64
%101 = add nsw i64 %100, -48
%102 = mul i64 %101, %94
%103 = icmp ugt i64 %102, %96
%104 = select i1 %103, i64 %102, i64 %96
%105 = icmp eq i64 %9, 987
br i1 %105, label %106, label %1
106: ; preds = %1
%107 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %104)
ret i32 0
}