int main() {
  unsigned char buf[1000] = {
      "731671765313306249192251196744265747423553491949349698352031277450632623"
      "957831801698480186947885184385861560789112949495459501737958331952853208"
      "805511125406987471585238630507156932909632952274430435576689664895044524"
      "452316173185640309871112172238311362229893423380308135336276614282806444"
      "486645238749303589072962904915604407723907138105158593079608667017242712"
      "188399879790879227492190169972088809377665727333001053367881220235421809"
      "751254540594752243525849077116705560136048395864467063244157221553975369"
      "781797784617406495514929086256932197846862248283972241375657056057490261"
      "407972968652414535100474821663704844031998900088952434506585412275886668"
      "811642717147992444292823086346567481391912316282458617866458359124566529"
      "476545682848912883142607690042242190226710556263211111093705442175069416"
      "589604080719840385096245544436298123098787992724428490918884580156166097"
      "919133875499200524063689912560717606058861164671094050775410022569831552"
      "0005593572972571636269561882670428252483600823257530420752963450"};
  int i, j;
  int max, tmp_max;
  for (i = 0; i < 1000 - 5; i++) {
    tmp_max = 1;
    for (j = 0; j < 5; j++) {
      tmp_max *= uchar2int(buf[i + j]);
    }
    if (tmp_max > max)
      max = tmp_max;
  }
  printf("%d", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x3e8,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x3f4(%rbp)
cmpl   $0x3e3,-0x3f4(%rbp)
jge    120a <main+0xda>
movl   $0x1,-0x400(%rbp)
movl   $0x0,-0x3f8(%rbp)
cmpl   $0x5,-0x3f8(%rbp)
jge    11d3 <main+0xa3>
mov    -0x3f4(%rbp),%eax
add    -0x3f8(%rbp),%eax
cltq
movzbl -0x3f0(%rbp,%rax,1),%edi
ff
mov    $0x0,%al
call   1040 <uchar2int@plt>
imul   -0x400(%rbp),%eax
mov    %eax,-0x400(%rbp)
mov    -0x3f8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3f8(%rbp)
jmp    1188 <main+0x58>
mov    -0x400(%rbp),%eax
cmp    -0x3fc(%rbp),%eax
jle    11f1 <main+0xc1>
mov    -0x400(%rbp),%eax
mov    %eax,-0x3fc(%rbp)
jmp    11f6 <main+0xc6>
mov    -0x3f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3f4(%rbp)
jmp    1164 <main+0x34>
mov    -0x3fc(%rbp),%esi
lea    0x11d1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x37,%r13b
mov    $0x4,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,0x4(%rsp)
movzbl %r13b,%edi
xor    %eax,%eax
call   1040 <uchar2int@plt>
mov    %eax,%ebx
lea    0xea8(%rip),%r12
movzbl -0x3(%rbp,%r12,1),%r13d
movzbl %r13b,%edi
xor    %eax,%eax
call   1040 <uchar2int@plt>
mov    %eax,%r14d
movzbl -0x2(%rbp,%r12,1),%edi
xor    %eax,%eax
call   1040 <uchar2int@plt>
mov    %eax,%r15d
imul   %ebx,%r15d
movzbl -0x1(%rbp,%r12,1),%edi
xor    %eax,%eax
call   1040 <uchar2int@plt>
mov    %eax,%ebx
imul   %r14d,%ebx
movzbl 0x0(%rbp,%r12,1),%edi
xor    %eax,%eax
call   1040 <uchar2int@plt>
imul   %r15d,%eax
imul   %ebx,%eax
mov    0x4(%rsp),%ecx
cmp    %ecx,%eax
cmovle %ecx,%eax
add    $0x1,%rbp
cmp    $0x3e7,%rbp
jne    1140 <main+0x20>
lea    0x1224(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@__const.main.buf = [1000 x i8] c"7316717653133062491922511967442657474235534919493496983520312774506326239578318016984801869478851843858615607891129494954595017379583319528532088055111254069874715852386305071569329096329522744304355766896648950445244523161731856403098711121722383113622298934233803081353362766142828064444866452387493035890729629049156044077239071381051585930796086670172427121883998797908792274921901699720888093776657273330010533678812202354218097512545405947522435258490771167055601360483958644670632441572215539753697817977846174064955149290862569321978468622482839722413756570560574902614079729686524145351004748216637048440319989000889524345065854122758866688116427171479924442928230863465674813919123162824586178664583591245665294765456828489128831426076900422421902267105562632111110937054421750694165896040807198403850962455444362981230987879927244284909188845801561660979191338754992005240636899125607176060588611646710940507754100225698315520005593572972571636269561882670428252483600823257530420752963450"
@.str = [3 x i8] c"%d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i8 [ 55, %0 ], [ %9, %1 ]
%3 = phi i64 [ 0, %0 ], [ %7, %1 ]
%4 = phi i32 [ undef, %0 ], [ %32, %1 ]
%5 = zext i8 %2 to i32
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @uchar2int to i32 (i32, ...)*)(i32 %5)
%7 = add nuw nsw i64 %3, 1
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* @__const.main.buf, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @uchar2int to i32 (i32, ...)*)(i32 %10)
%12 = mul nsw i32 %11, %6
%13 = add nuw nsw i64 %3, 2
%14 = getelementptr inbounds [1000 x i8], [1000 x i8]* @__const.main.buf, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = tail call i32 (i32, ...) bitcast (i32 (...)* @uchar2int to i32 (i32, ...)*)(i32 %16)
%18 = mul nsw i32 %17, %12
%19 = add nuw nsw i64 %3, 3
%20 = getelementptr inbounds [1000 x i8], [1000 x i8]* @__const.main.buf, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = tail call i32 (i32, ...) bitcast (i32 (...)* @uchar2int to i32 (i32, ...)*)(i32 %22)
%24 = mul nsw i32 %23, %18
%25 = add nuw nsw i64 %3, 4
%26 = getelementptr inbounds [1000 x i8], [1000 x i8]* @__const.main.buf, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = zext i8 %27 to i32
%29 = tail call i32 (i32, ...) bitcast (i32 (...)* @uchar2int to i32 (i32, ...)*)(i32 %28)
%30 = mul nsw i32 %29, %24
%31 = icmp sgt i32 %30, %4
%32 = select i1 %31, i32 %30, i32 %4
%33 = icmp eq i64 %7, 995
br i1 %33, label %34, label %1
34: ; preds = %1
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
ret i32 0
}