#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 main() {
  int temp = 0;
  int b = 1, k = 0;
  int i;
  for (i = 1; i <= 200; i++) {
    temp = b + 3 * k;
    if (i == temp) {
      b = 2;
      k = 0;
      continue;
    } else if (i - temp == 1) {
      b = 1;
      k = 0;
      continue;
    }
    k++;
  }
  printf("%d, %d\n", 200, temp);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0xc8,-0x14(%rbp)
jg     11b1 <main+0xa1>
mov    -0xc(%rbp),%eax
imul   $0x3,-0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1173 <main+0x63>
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
jmp    11a3 <main+0x93>
mov    -0x14(%rbp),%eax
sub    -0x8(%rbp),%eax
cmp    $0x1,%eax
jne    1195 <main+0x85>
movl   $0x1,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
jmp    11a3 <main+0x93>
jmp    119a <main+0x8a>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113b <main+0x2b>
mov    -0x8(%rbp),%edx
lea    0xe45(%rip),%rdi
mov    $0xc8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %r9d,%r9d
mov    $0x1,%r8d
mov    $0x1,%r11d
xor    %eax,%eax
mov    $0x1,%ecx
jmp    1141 <main+0x31>
nopl   0x0(%rax)
add    $0x1,%ebx
mov    %ebx,%r11d
mov    %r10d,%ecx
cmp    $0xc9,%ebx
je     1192 <main+0x82>
lea    (%rax,%rax,2),%ebx
add    %ecx,%ebx
mov    $0x2,%r10d
mov    %r11d,%edx
mov    $0x2,%esi
mov    $0x0,%edi
sub    %ebx,%edx
je     116e <main+0x5e>
add    $0x1,%eax
cmp    $0x1,%edx
cmove  %edx,%ecx
cmove  %r9d,%eax
mov    %ecx,%esi
mov    %eax,%edi
lea    (%rdi,%rdi,2),%edx
add    %esi,%edx
lea    0x1(%r11),%ebx
xor    %eax,%eax
cmp    %edx,%ebx
je     1130 <main+0x20>
add    $0x1,%edi
cmp    %r11d,%edx
cmove  %r8d,%esi
cmove  %r9d,%edi
mov    %esi,%r10d
mov    %edi,%eax
jmp    1130 <main+0x20>
lea    0xe67(%rip),%rdi
mov    $0xc8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

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