#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 compute_len(int);
int /*<<< orphan*/ printf(char *, int, ...);
scalar_t__ scanf(char *, int *, int *);
int main(void) {
  int i, j, k, len, maxlen;
  while (scanf("%d %d", &i, &j) != EOF) {
    printf("%d %d ", i, j);
    if (i > j)
      i ^= j ^= i ^= j;
    maxlen = 0;
    for (k = i; k <= j; k++) {
      len = compute_len(k);
      if (len > maxlen)
        maxlen = len;
    }
    printf("%d\n", maxlen);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <scanf@plt>
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%rax
je     11f7 <main+0xc7>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1198 <main+0x68>
mov    -0xc(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11e1 <main+0xb1>
mov    -0x10(%rbp),%edi
call   1030 <compute_len@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jle    11ce <main+0x9e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11d3 <main+0xa3>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11a5 <main+0x75>
mov    -0x18(%rbp),%esi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x20,%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   1050 <scanf@plt>
mov    0x2e92(%rip),%r15
cmp    (%r15),%rax
jne    116c <main+0x3c>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe8d(%rip),%r12
lea    0x4(%rsp),%r13
mov    %rsp,%rbx
jmp    11a4 <main+0x74>
nopl   (%rax)
lea    0xe86(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %rbx,%rdx
call   1050 <scanf@plt>
cmp    (%r15),%rax
je     115b <main+0x2b>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xe54(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rsp),%eax
mov    (%rsp),%ebp
cmp    %ebp,%eax
jle    11d0 <main+0xa0>
mov    %eax,(%rsp)
mov    %ebp,0x4(%rsp)
mov    %eax,%ecx
jmp    11d4 <main+0xa4>
nop
mov    %ebp,%ecx
mov    %eax,%ebp
xor    %r14d,%r14d
cmp    %ecx,%ebp
jg     1180 <main+0x50>
xor    %r14d,%r14d
xchg   %ax,%ax
mov    %ebp,%edi
call   1030 <compute_len@plt>
cmp    %r14d,%eax
cmovg  %eax,%r14d
lea    0x1(%rbp),%eax
cmp    (%rsp),%ebp
mov    %eax,%ebp
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 = [7 x i8] c"%d %d \00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
br label %7
7: ; preds = %44, %0
%8 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%9 = load i64, i64* @EOF
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %47
11: ; preds = %7
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
%15 = load i32, i32* %2
%16 = load i32, i32* %3
%17 = icmp sgt i32 %15, %16
br i1 %17, label %18, label %26
18: ; preds = %11
%19 = load i32, i32* %3
%20 = load i32, i32* %2
%21 = xor i32 %20, %19
store i32 %21, i32* %2
%22 = load i32, i32* %3
%23 = xor i32 %22, %21
store i32 %23, i32* %3
%24 = load i32, i32* %2
%25 = xor i32 %24, %23
store i32 %25, i32* %2
br label %26
26: ; preds = %18, %11
store i32 0, i32* %6
%27 = load i32, i32* %2
store i32 %27, i32* %4
br label %28
28: ; preds = %41, %26
%29 = load i32, i32* %4
%30 = load i32, i32* %3
%31 = icmp sle i32 %29, %30
br i1 %31, label %32, label %44
32: ; preds = %28
%33 = load i32, i32* %4
%34 = call i32 @compute_len(i32 %33)
store i32 %34, i32* %5
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = icmp sgt i32 %35, %36
br i1 %37, label %38, label %40
38: ; preds = %32
%39 = load i32, i32* %5
store i32 %39, i32* %6
br label %40
40: ; preds = %38, %32
br label %41
41: ; preds = %40
%42 = load i32, i32* %4
%43 = add nsw i32 %42, 1
store i32 %43, i32* %4
br label %28
44: ; preds = %28
%45 = load i32, i32* %6
%46 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %45)
br label %7
47: ; preds = %7
ret i32 0
}

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