#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 */
typedef int /*<<< orphan*/ e;
typedef int /*<<< orphan*/ d;
typedef int /*<<< orphan*/ c;
typedef int /*<<< orphan*/ b;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int a = 10;
  short b = 10;
  printf("%d\n", sizeof(b));
  long c = 10;
  printf("%d\n", sizeof(c));
  long long d = 10;
  printf("%d\n", sizeof(d));
  unsigned int e = 10;
  printf("%d\n", sizeof(e));
  unsigned short abc = 0xffff;
  abc = abc + 1 + 99;
  printf("%d\n", abc);
  abc = 2;
  abc = abc - 5;
  printf("%d\n", abc);
  int i1 = 0x12345678;
  abc = i1;
  printf("%x\n", abc);
  short abc1 = -2;
  i1 = abc1;
  printf("%x\n", i1);
  unsigned short abc2 = 0;
  abc2 = abc2 - 1;
  printf("%d\n", abc2);
  int a1 = 0x12345678;
  printf("%p\n", &a1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0xa,-0x4(%rbp)
movw   $0xa,-0x6(%rbp)
lea    0xed4(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0xa,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0xa,-0x18(%rbp)
lea    0xe9e(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xa,-0x1c(%rbp)
lea    0xe84(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0xffff,-0x1e(%rbp)
movzwl -0x1e(%rbp),%eax
add    $0x1,%eax
add    $0x63,%eax
mov    %ax,-0x1e(%rbp)
movzwl -0x1e(%rbp),%esi
lea    0xe59(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x2,-0x1e(%rbp)
movzwl -0x1e(%rbp),%eax
sub    $0x5,%eax
mov    %ax,-0x1e(%rbp)
movzwl -0x1e(%rbp),%esi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x12345678,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %ax,-0x1e(%rbp)
movzwl -0x1e(%rbp),%esi
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0xfffe,-0x26(%rbp)
movswl -0x26(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movw   $0x0,-0x28(%rbp)
movzwl -0x28(%rbp),%eax
sub    $0x1,%eax
mov    %ax,-0x28(%rbp)
movzwl -0x28(%rbp),%esi
lea    0xdd5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x12345678,-0x2c(%rbp)
lea    0xdc8(%rip),%rdi
lea    -0x2c(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%rbx
mov    $0x2,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x8,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x4,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x63,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfffd,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe88(%rip),%r14
mov    %r14,%rdi
mov    $0x5678,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0xfffffffe,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xffff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x12345678,0x4(%rsp)
12
lea    0xe50(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
@.str.2 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca i16
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
store i32 10, i32* %1
store i16 10, i16* %2
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 2)
store i64 10, i64* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
store i64 10, i64* %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
store i32 10, i32* %5
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 4)
store i16 -1, i16* %6
%15 = load i16, i16* %6
%16 = zext i16 %15 to i32
%17 = add nsw i32 %16, 1
%18 = add nsw i32 %17, 99
%19 = trunc i32 %18 to i16
store i16 %19, i16* %6
%20 = load i16, i16* %6
%21 = zext i16 %20 to i32
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %21)
store i16 2, i16* %6
%23 = load i16, i16* %6
%24 = zext i16 %23 to i32
%25 = sub nsw i32 %24, 5
%26 = trunc i32 %25 to i16
store i16 %26, i16* %6
%27 = load i16, i16* %6
%28 = zext i16 %27 to i32
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %28)
store i32 305419896, i32* %7
%30 = load i32, i32* %7
%31 = trunc i32 %30 to i16
store i16 %31, i16* %6
%32 = load i16, i16* %6
%33 = zext i16 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %33)
store i16 -2, i16* %8
%35 = load i16, i16* %8
%36 = sext i16 %35 to i32
store i32 %36, i32* %7
%37 = load i32, i32* %7
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %37)
store i16 0, i16* %9
%39 = load i16, i16* %9
%40 = zext i16 %39 to i32
%41 = sub nsw i32 %40, 1
%42 = trunc i32 %41 to i16
store i16 %42, i16* %9
%43 = load i16, i16* %9
%44 = zext i16 %43 to i32
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %44)
store i32 305419896, i32* %10
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
@.str.2 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 2)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 8)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 99)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 65533)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 22136)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 -2)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 65535)
%11 = bitcast i32* %1 to i8*
store i32 305419896, i32* %1
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32* %1)
ret i32 0
}