#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*/ cls();
int /*<<< orphan*/ display();
int /*<<< orphan*/ outc(char);
int /*<<< orphan*/ outhex(unsigned int);
int /*<<< orphan*/ setAttr(int);
int main(int argc, char **argv) {
  int i, j;
  cls();
  setAttr(0x2e);
  unsigned val = 1;
  for (i = 0; i < 24; i++) {
    setAttr((i & 7) << 4);
    for (j = 0; j < i; j++) {
      outc(' ');
    }
    outc(65 + i);
    outc(97 + i);
    outc(' ');
    outhex(val);
    val += val;
    outc('\n');
  }
  display();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <cls@plt>
mov    $0x2e,%edi
call   1030 <setAttr@plt>
movl   $0x1,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x18,-0x14(%rbp)
jge    1217 <main+0xc7>
mov    -0x14(%rbp),%edi
and    $0x7,%edi
shl    $0x4,%edi
call   1030 <setAttr@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11c8 <main+0x78>
mov    $0x20,%edi
call   1070 <outc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a4 <main+0x54>
mov    -0x14(%rbp),%eax
add    $0x41,%eax
movsbl %al,%edi
call   1070 <outc@plt>
mov    -0x14(%rbp),%eax
add    $0x61,%eax
movsbl %al,%edi
call   1070 <outc@plt>
mov    $0x20,%edi
call   1070 <outc@plt>
mov    -0x1c(%rbp),%edi
call   1050 <outhex@plt>
mov    -0x1c(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0xa,%edi
call   1070 <outc@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1185 <main+0x35>
mov    $0x0,%al
call   1040 <display@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <cls@plt>
mov    $0x2e,%edi
call   1030 <setAttr@plt>
mov    $0x1,%r14d
jmp    11ad <main+0x5d>
nop
lea    0x41(%rbx),%eax
movsbl %al,%edi
call   1070 <outc@plt>
lea    0x61(%rbx),%eax
movsbl %al,%edi
call   1070 <outc@plt>
mov    $0x20,%edi
call   1070 <outc@plt>
mov    %r14d,%edi
call   1050 <outhex@plt>
add    %r14d,%r14d
mov    $0xa,%edi
call   1070 <outc@plt>
add    $0x1,%ebx
cmp    $0x18,%ebx
je     11d1 <main+0x81>
mov    %ebx,%edi
shl    $0x4,%edi
and    $0x70,%edi
call   1030 <setAttr@plt>
test   %ebx,%ebx
je     1170 <main+0x20>
mov    %ebx,%ebp
mov    $0x20,%edi
call   1070 <outc@plt>
add    $0xffffffff,%ebp
jne    11c0 <main+0x70>
jmp    1170 <main+0x20>
xor    %eax,%eax
call   1040 <display@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (...) @cls()
%10 = call i32 @setAttr(i32 46)
store i32 1, i32* %8
store i32 0, i32* %6
br label %11
11: ; preds = %44, %2
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 24
br i1 %13, label %14, label %47
14: ; preds = %11
%15 = load i32, i32* %6
%16 = and i32 %15, 7
%17 = shl i32 %16, 4
%18 = call i32 @setAttr(i32 %17)
store i32 0, i32* %7
br label %19
19: ; preds = %25, %14
%20 = load i32, i32* %7
%21 = load i32, i32* %6
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = call i32 @outc(i8 signext 32)
br label %25
25: ; preds = %23
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
br label %19
28: ; preds = %19
%29 = load i32, i32* %6
%30 = add nsw i32 65, %29
%31 = trunc i32 %30 to i8
%32 = call i32 @outc(i8 signext %31)
%33 = load i32, i32* %6
%34 = add nsw i32 97, %33
%35 = trunc i32 %34 to i8
%36 = call i32 @outc(i8 signext %35)
%37 = call i32 @outc(i8 signext 32)
%38 = load i32, i32* %8
%39 = call i32 @outhex(i32 %38)
%40 = load i32, i32* %8
%41 = load i32, i32* %8
%42 = add i32 %41, %40
store i32 %42, i32* %8
%43 = call i32 @outc(i8 signext 10)
br label %44
44: ; preds = %28
%45 = load i32, i32* %6
%46 = add nsw i32 %45, 1
store i32 %46, i32* %6
br label %11
47: ; preds = %11
%48 = call i32 (...) @display()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @cls()
%4 = tail call i32 @setAttr(i32 46)
br label %5
5: ; preds = %2, %17
%6 = phi i32 [ 1, %2 ], [ %25, %17 ]
%7 = phi i32 [ 0, %2 ], [ %27, %17 ]
%8 = shl nuw nsw i32 %7, 4
%9 = and i32 %8, 112
%10 = tail call i32 @setAttr(i32 %9)
%11 = icmp eq i32 %7, 0
br i1 %11, label %17, label %12
12: ; preds = %5, %12
%13 = phi i32 [ %15, %12 ], [ 0, %5 ]
%14 = tail call i32 @outc(i8 signext 32)
%15 = add nuw nsw i32 %13, 1
%16 = icmp eq i32 %15, %7
br i1 %16, label %17, label %12
17: ; preds = %12, %5
%18 = trunc i32 %7 to i8
%19 = add i8 %18, 65
%20 = tail call i32 @outc(i8 signext %19)
%21 = add i8 %18, 97
%22 = tail call i32 @outc(i8 signext %21)
%23 = tail call i32 @outc(i8 signext 32)
%24 = tail call i32 @outhex(i32 %6)
%25 = shl i32 %6, 1
%26 = tail call i32 @outc(i8 signext 10)
%27 = add nuw nsw i32 %7, 1
%28 = icmp eq i32 %27, 24
br i1 %28, label %29, label %5
29: ; preds = %17
%30 = tail call i32 (...) @display()
ret i32 0
}