#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__ EOF;
int cycle(int);
int /*<<< orphan*/ printf(char *, int, int, int);
scalar_t__ scanf(char *, int *, int *);
int main() {
  int i, j, oi, oj;
  int k;
  int temp;
  int now, max;
  while (scanf("%d %d", &i, &j) != EOF) {
    max = 0;
    oi = i;
    oj = j;
    if (i > j) {
      temp = i;
      i = j;
      j = temp;
    }
    for (k = i; k <= j; k++) {
      now = cycle(k);
      if (now > max) {
        max = now;
      }
    }
    printf("%d %d %d\n", oi, oj, max);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     11f0 <main+0xc0>
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1194 <main+0x64>
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11d6 <main+0xa6>
mov    -0x18(%rbp),%edi
call   1050 <cycle@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x24(%rbp),%eax
jle    11c3 <main+0x93>
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    11c8 <main+0x98>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    119a <main+0x6a>
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xe20(%rip),%rdi
call   1030 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x2e92(%rip),%r12
cmp    (%r12),%rax
jne    116d <main+0x3d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rsp,%r13
jmp    11ad <main+0x7d>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0xe7f(%rip),%rdi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
call   1030 <printf@plt>
lea    0xe66(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %r13,%rdx
call   1040 <scanf@plt>
cmp    (%r12),%rax
je     115c <main+0x2c>
mov    0x4(%rsp),%ebp
mov    (%rsp),%ebx
mov    %ebx,%eax
mov    %ebp,%r15d
cmp    %ebx,%ebp
jle    11c9 <main+0x99>
mov    %ebx,0x4(%rsp)
mov    %ebp,(%rsp)
mov    %ebp,%eax
mov    %ebx,%r15d
xor    %r14d,%r14d
cmp    %eax,%r15d
jg     1180 <main+0x50>
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15d,%edi
call   1050 <cycle@plt>
cmp    %r14d,%eax
cmovg  %eax,%r14d
lea    0x1(%r15),%eax
cmp    (%rsp),%r15d
mov    %eax,%r15d
jl     11e0 <main+0xb0>
jmp    1180 <main+0x50>

LLVM IR (-O0):
@.str = [6 x i8] c"%d %d\00"
@EOF = global i64 0
@.str.1 = [10 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
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
br label %10
10: ; preds = %42, %0
%11 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%12 = load i64, i64* @EOF
%13 = icmp ne i64 %11, %12
br i1 %13, label %14, label %47
14: ; preds = %10
store i32 0, i32* %9
%15 = load i32, i32* %2
store i32 %15, i32* %4
%16 = load i32, i32* %3
store i32 %16, i32* %5
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = icmp sgt i32 %17, %18
br i1 %19, label %20, label %24
20: ; preds = %14
%21 = load i32, i32* %2
store i32 %21, i32* %7
%22 = load i32, i32* %3
store i32 %22, i32* %2
%23 = load i32, i32* %7
store i32 %23, i32* %3
br label %24
24: ; preds = %20, %14
%25 = load i32, i32* %2
store i32 %25, i32* %6
br label %26
26: ; preds = %39, %24
%27 = load i32, i32* %6
%28 = load i32, i32* %3
%29 = icmp sle i32 %27, %28
br i1 %29, label %30, label %42
30: ; preds = %26
%31 = load i32, i32* %6
%32 = call i32 @cycle(i32 %31)
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %9
%35 = icmp sgt i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %30
%37 = load i32, i32* %8
store i32 %37, i32* %9
br label %38
38: ; preds = %36, %30
br label %39
39: ; preds = %38
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
store i32 %41, i32* %6
br label %26
42: ; preds = %26
%43 = load i32, i32* %4
%44 = load i32, i32* %5
%45 = load i32, i32* %9
%46 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %43, i32 %44, i32 %45)
br label %10
47: ; preds = %10
ret i32 0
}

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