#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 thrackle_size(int);
int thrackle_size_lower_bound(int);
int thrackle_size_upper_bound(int);
void thrackle_size_print(int n) {
  int i = 3;
  while (i <= n) {
    if (i < 9) {
      printf("T_%d: %d\n", i, thrackle_size(i));
    } else {
      printf("T_%d: %d-%d\n", i, thrackle_size_lower_bound(i),
             thrackle_size_upper_bound(i));
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<thrackle_size_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     11cb <thrackle_size_print+0x8b>
cmpl   $0x9,-0x8(%rbp)
jge    118e <thrackle_size_print+0x4e>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <thrackle_size@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bd <thrackle_size_print+0x7d>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%edi
call   1060 <thrackle_size_lower_bound@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <thrackle_size_upper_bound@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <thrackle_size_print+0x12>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thrackle_size_print>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x3,%edi
jl     1283 <thrackle_size_print+0x143>
mov    %edi,%r15d
lea    0x1(%r15),%ebx
mov    $0x3,%edi
call   1050 <thrackle_size@plt>
lea    0xe98(%rip),%rdi
mov    $0x3,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x4,%ebx
je     1283 <thrackle_size_print+0x143>
mov    $0x4,%edi
call   1050 <thrackle_size@plt>
lea    0xe70(%rip),%rdi
mov    $0x4,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x5,%ebx
je     1283 <thrackle_size_print+0x143>
mov    $0x5,%edi
call   1050 <thrackle_size@plt>
lea    0xe48(%rip),%rdi
mov    $0x5,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x6,%ebx
je     1283 <thrackle_size_print+0x143>
mov    $0x6,%edi
call   1050 <thrackle_size@plt>
lea    0xe20(%rip),%rdi
mov    $0x6,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x7,%ebx
je     1283 <thrackle_size_print+0x143>
mov    $0x7,%edi
call   1050 <thrackle_size@plt>
lea    0xdf8(%rip),%rdi
mov    $0x7,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x8,%ebx
je     1283 <thrackle_size_print+0x143>
mov    $0x8,%edi
call   1050 <thrackle_size@plt>
lea    0xdd4(%rip),%rdi
mov    $0x8,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x9,%ebx
je     1283 <thrackle_size_print+0x143>
neg    %r15d
mov    $0x9,%ebx
lea    0xdbc(%rip),%r14
xchg   %ax,%ax
mov    %ebx,%edi
call   1060 <thrackle_size_lower_bound@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <thrackle_size_upper_bound@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    (%r15,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1250 <thrackle_size_print+0x110>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"T_%d: %d\0A\00"
@.str.1 = [13 x i8] c"T_%d: %d-%d\0A\00"
define void @thrackle_size_print(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 3, i32* %3
br label %4
4: ; preds = %23, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp sle i32 %5, %6
br i1 %7, label %8, label %26
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 9
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = load i32, i32* %3
%13 = load i32, i32* %3
%14 = call i32 @thrackle_size(i32 %13)
%15 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %14)
br label %23
16: ; preds = %8
%17 = load i32, i32* %3
%18 = load i32, i32* %3
%19 = call i32 @thrackle_size_lower_bound(i32 %18)
%20 = load i32, i32* %3
%21 = call i32 @thrackle_size_upper_bound(i32 %20)
%22 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %19, i32 %21)
br label %23
23: ; preds = %16, %11
%24 = load i32, i32* %3
%25 = add nsw i32 %24, 1
store i32 %25, i32* %3
br label %4
26: ; preds = %4
ret void
}

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