#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 get_clen(int);
int getline(char **, size_t *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int, int);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *);
int /*<<< orphan*/ stdin;
int main() {
  char *line = NULL;
  int a, b, x, best, cur, switched;
  size_t linelen;
  while (getline(&line, &linelen, stdin) > 1) {
    sscanf(line, "%d %d", &a, &b);
    best = 0;
    if (a <= b) {
      switched = 0;
    } else {
      switched = 1;
      x = a;
      a = b;
      b = x;
    }
    for (x = a; x <= b; x++) {
      cur = get_clen(x);
      if (cur > best)
        best = cur;
    }
    if (switched) {
      printf("%d %d %d\n", b, a, best);
    } else {
      printf("%d %d %d\n", a, b, best);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <getline@plt>
cmp    $0x1,%eax
jle    1246 <main+0x106>
mov    -0x10(%rbp),%rdi
lea    0xe7f(%rip),%rsi
lea    -0x14(%rbp),%rdx
lea    -0x18(%rbp),%rcx
call   1040 <sscanf@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     11ad <main+0x6d>
movl   $0x0,-0x28(%rbp)
jmp    11c6 <main+0x86>
movl   $0x1,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jg     1208 <main+0xc8>
mov    -0x1c(%rbp),%edi
call   1060 <get_clen@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jle    11f5 <main+0xb5>
mov    -0x24(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    11fa <main+0xba>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11cc <main+0x8c>
cmpl   $0x0,-0x28(%rbp)
je     122c <main+0xec>
mov    -0x18(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xde4(%rip),%rdi
call   1030 <printf@plt>
jmp    1241 <main+0x101>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xdca(%rip),%rdi
call   1030 <printf@plt>
jmp    1157 <main+0x17>
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
sub    $0x18,%rsp
movq   $0x0,0x8(%rsp)
mov    0x2e8a(%rip),%rax
mov    (%rax),%edx
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1050 <getline@plt>
cmp    $0x2,%eax
jl     123b <main+0xfb>
lea    0x8(%rsp),%rbx
lea    0x10(%rsp),%rbp
jmp    11b7 <main+0x77>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %eax,%esi
mov    %r14d,%ecx
call   1030 <printf@plt>
mov    0x2e47(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1050 <getline@plt>
cmp    $0x1,%eax
jle    123b <main+0xfb>
mov    0x8(%rsp),%rdi
lea    0xe3d(%rip),%rsi
lea    0x4(%rsp),%rdx
mov    %rsp,%rcx
call   1040 <sscanf@plt>
mov    0x4(%rsp),%r12d
mov    (%rsp),%r13d
mov    %r13d,%edx
mov    %r12d,%r15d
cmp    %r13d,%r12d
jle    11f3 <main+0xb3>
mov    %r13d,0x4(%rsp)
mov    %r12d,(%rsp)
mov    %r12d,%edx
mov    %r13d,%r15d
xor    %r14d,%r14d
cmp    %edx,%r15d
jg     121e <main+0xde>
xor    %r14d,%r14d
xchg   %ax,%ax
mov    %r15d,%edi
call   1060 <get_clen@plt>
cmp    %r14d,%eax
cmovg  %eax,%r14d
lea    0x1(%r15),%eax
mov    (%rsp),%edx
cmp    %edx,%r15d
mov    %eax,%r15d
jl     1200 <main+0xc0>
mov    0x4(%rsp),%eax
lea    0xddd(%rip),%rdi
cmp    %r13d,%r12d
jle    1190 <main+0x50>
mov    %edx,%esi
mov    %eax,%edx
jmp    1192 <main+0x52>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
store i32 0, i32* %1
store i8* null, i8** %2
br label %10
10: ; preds = %56, %0
%11 = load i32, i32* @stdin
%12 = call i32 @getline(i8** %2, i64* %9, i32 %11)
%13 = icmp sgt i32 %12, 1
br i1 %13, label %14, label %57
14: ; preds = %10
%15 = load i8*, i8** %2
%16 = call i32 @sscanf(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
store i32 0, i32* %6
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = icmp sle i32 %17, %18
br i1 %19, label %20, label %21
20: ; preds = %14
store i32 0, i32* %8
br label %25
21: ; preds = %14
store i32 1, i32* %8
%22 = load i32, i32* %3
store i32 %22, i32* %5
%23 = load i32, i32* %4
store i32 %23, i32* %3
%24 = load i32, i32* %5
store i32 %24, i32* %4
br label %25
25: ; preds = %21, %20
%26 = load i32, i32* %3
store i32 %26, i32* %5
br label %27
27: ; preds = %40, %25
%28 = load i32, i32* %5
%29 = load i32, i32* %4
%30 = icmp sle i32 %28, %29
br i1 %30, label %31, label %43
31: ; preds = %27
%32 = load i32, i32* %5
%33 = call i32 @get_clen(i32 %32)
store i32 %33, i32* %7
%34 = load i32, i32* %7
%35 = load i32, i32* %6
%36 = icmp sgt i32 %34, %35
br i1 %36, label %37, label %39
37: ; preds = %31
%38 = load i32, i32* %7
store i32 %38, i32* %6
br label %39
39: ; preds = %37, %31
br label %40
40: ; preds = %39
%41 = load i32, i32* %5
%42 = add nsw i32 %41, 1
store i32 %42, i32* %5
br label %27
43: ; preds = %27
%44 = load i32, i32* %8
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %43
%47 = load i32, i32* %4
%48 = load i32, i32* %3
%49 = load i32, i32* %6
%50 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %47, i32 %48, i32 %49)
br label %56
51: ; preds = %43
%52 = load i32, i32* %3
%53 = load i32, i32* %4
%54 = load i32, i32* %6
%55 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %52, i32 %53, i32 %54)
br label %56
56: ; preds = %51, %46
br label %10
57: ; preds = %10
ret i32 0
}

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