#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__ ispantagon(int);
int pantagon(int);
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  int i = 1900;
  int found = 0;
  while (!found) {
    i++;
    int j = 1;
    while (pantagon(i) >= 3 * j + 1) {
      printf("%d\t%d\n", i, j);
      if (ispantagon(pantagon(i) + pantagon(j)) &&
          ispantagon(pantagon(i) + 2 * pantagon(j))) {
        printf("%d\n", i);
        found = 1;
        break;
      }
      j++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x76c,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1163 <main+0x33>
jmp    121f <main+0xef>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <pantagon@plt>
imul   $0x3,-0x10(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jl     121a <main+0xea>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <pantagon@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <pantagon@plt>
mov    -0x14(%rbp),%edi
add    %eax,%edi
call   1050 <ispantagon@plt>
cmp    $0x0,%rax
je     120c <main+0xdc>
mov    -0x8(%rbp),%edi
call   1030 <pantagon@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <pantagon@plt>
mov    -0x18(%rbp),%edi
shl    $0x1,%eax
add    %eax,%edi
call   1050 <ispantagon@plt>
cmp    $0x0,%rax
je     120c <main+0xdc>
mov    -0x8(%rbp),%esi
lea    0xe0a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0xc(%rbp)
jmp    121a <main+0xea>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1173 <main+0x43>
jmp    114d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x76c,%r15d
lea    0xebb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%r15d
mov    %r15d,%edi
call   1030 <pantagon@plt>
cmp    $0x4,%eax
jl     1150 <main+0x20>
mov    $0x1,%ebp
mov    $0x3,%r12d
jmp    1184 <main+0x54>
xchg   %ax,%ax
add    $0x1,%ebp
mov    %r15d,%edi
call   1030 <pantagon@plt>
add    $0x3,%r12d
cmp    %r12d,%eax
jle    1150 <main+0x20>
mov    %r14,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15d,%edi
call   1030 <pantagon@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <pantagon@plt>
add    %eax,%ebx
mov    %ebx,%edi
call   1050 <ispantagon@plt>
test   %rax,%rax
je     1170 <main+0x40>
mov    %r15d,%edi
call   1030 <pantagon@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <pantagon@plt>
lea    (%rbx,%rax,2),%edi
call   1050 <ispantagon@plt>
test   %rax,%rax
je     1170 <main+0x40>
lea    0xe2c(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %6, %0
%2 = phi i32 [ 1900, %0 ], [ %3, %6 ]
%3 = add nuw nsw i32 %2, 1
%4 = tail call i32 @pantagon(i32 %3)
%5 = icmp sgt i32 %4, 3
br i1 %5, label %7, label %6
6: ; preds = %22, %1
br label %1
7: ; preds = %1, %22
%8 = phi i32 [ %23, %22 ], [ 1, %1 ]
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %8)
%10 = tail call i32 @pantagon(i32 %3)
%11 = tail call i32 @pantagon(i32 %8)
%12 = add nsw i32 %11, %10
%13 = tail call i64 @ispantagon(i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %22, label %15
15: ; preds = %7
%16 = tail call i32 @pantagon(i32 %3)
%17 = tail call i32 @pantagon(i32 %8)
%18 = shl nsw i32 %17, 1
%19 = add nsw i32 %18, %16
%20 = tail call i64 @ispantagon(i32 %19)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %27
22: ; preds = %15, %7
%23 = add nuw nsw i32 %8, 1
%24 = tail call i32 @pantagon(i32 %3)
%25 = mul nsw i32 %23, 3
%26 = icmp sgt i32 %24, %25
br i1 %26, label %7, label %6
27: ; preds = %15
%28 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}