#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 *, int, int, int);
int main() {
  int sum = 0;
  int a, b, A, B, N;
  N = 128;
  A = 1;
  B = 1;
  for (a = 0; a < A; a++)
    for (b = 0; b < B; b++)
      sum += (b + 1) * (N * (N - 1) / 2 + 14 * a * N);
  printf(" %d %d %d\n", A, B, sum);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x80,-0x1c(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11b7 <main+0xa7>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11a4 <main+0x94>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
imul   $0xe,-0xc(%rbp),%edx
imul   -0x1c(%rbp),%edx
add    %edx,%ecx
imul   %ecx,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1155 <main+0x45>
jmp    11a9 <main+0x99>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1142 <main+0x32>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe39(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    $0x1fc0,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c" %d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, i32 1, i32 8128)
ret i32 0
}