#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 *, unsigned int, int, int);
int main(void) {
  char j = 128, j2 = 1;
  printf("%02X = %016X =%02x\n", (unsigned char)(j), (long long)j, j2);
  char i = 0;
  for (i = 0; i < 8; i++) {
    int num = (j << 8) | (i);
    j++;
    printf("%04X = %04x = %d\n", (unsigned int)num, num, num);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x80,-0x5(%rbp)
movb   $0x1,-0x6(%rbp)
movzbl -0x5(%rbp),%esi
movsbq -0x5(%rbp),%rax
mov    %eax,%edx
movsbl -0x6(%rbp),%ecx
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movb   $0x0,-0x7(%rbp)
movb   $0x0,-0x7(%rbp)
movsbl -0x7(%rbp),%eax
cmp    $0x8,%eax
jge    1191 <main+0x81>
movsbl -0x5(%rbp),%eax
shl    $0x8,%eax
movsbl -0x7(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
mov    -0x7(%rbp),%al
add    $0x1,%al
mov    %al,-0x7(%rbp)
jmp    114a <main+0x3a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rdi
mov    $0x80,%esi
mov    $0xffffff80,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
lea    0xee1(%rip),%rbx
mov    %rbx,%rdi
mov    $0xffff8000,%esi
mov    $0xffff8000,%edx
mov    $0xffff8000,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff8101,%esi
mov    $0xffff8101,%edx
mov    $0xffff8101,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff8202,%esi
mov    $0xffff8202,%edx
mov    $0xffff8202,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff8303,%esi
mov    $0xffff8303,%edx
mov    $0xffff8303,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff8404,%esi
mov    $0xffff8404,%edx
mov    $0xffff8404,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff8505,%esi
mov    $0xffff8505,%edx
mov    $0xffff8505,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff8606,%esi
mov    $0xffff8606,%edx
mov    $0xffff8606,%ecx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff8707,%esi
mov    $0xffff8707,%edx
mov    $0xffff8707,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%02X = %016X =%02x\0A\00"
@.str.1 = [18 x i8] c"%04X = %04x = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
store i32 0, i32* %1
store i8 -128, i8* %2
store i8 1, i8* %3
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = load i8, i8* %2
%9 = sext i8 %8 to i64
%10 = trunc i64 %9 to i32
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %10, i32 %12)
store i8 0, i8* %4
store i8 0, i8* %4
br label %14
14: ; preds = %31, %0
%15 = load i8, i8* %4
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %16, 8
br i1 %17, label %18, label %34
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = shl i32 %20, 8
%22 = load i8, i8* %4
%23 = sext i8 %22 to i32
%24 = or i32 %21, %23
store i32 %24, i32* %5
%25 = load i8, i8* %2
%26 = add i8 %25, 1
store i8 %26, i8* %2
%27 = load i32, i32* %5
%28 = load i32, i32* %5
%29 = load i32, i32* %5
%30 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 %27, i32 %28, i32 %29)
br label %31
31: ; preds = %18
%32 = load i8, i8* %4
%33 = add i8 %32, 1
store i8 %33, i8* %4
br label %14
34: ; preds = %14
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"%02X = %016X =%02x\0A\00"
@.str.1 = [18 x i8] c"%04X = %04x = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 128, i32 -128, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -32768, i32 -32768, i32 -32768)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -32511, i32 -32511, i32 -32511)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -32254, i32 -32254, i32 -32254)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -31997, i32 -31997, i32 -31997)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -31740, i32 -31740, i32 -31740)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -31483, i32 -31483, i32 -31483)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -31226, i32 -31226, i32 -31226)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i32 -30969, i32 -30969, i32 -30969)
ret i32 0
}