#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*/ print_byte_i(int);
int /*<<< orphan*/ print_byte_l(long);
int /*<<< orphan*/ print_byte_sh(short);
int /*<<< orphan*/ print_byte_ui(unsigned int);
int /*<<< orphan*/ printf(char *, long);
int main() {
  unsigned int u1;
  short u2;
  int u3;
  long u4;
  u1 = 0x1234abcd;
  u2 = 0x1234;
  u3 = 0x1234abcd;
  u4 = 0x1234567890abcdef;
  printf("u1 = %x : ", u1);
  print_byte_ui(u1);
  printf("u2 = %x : ", u2);
  print_byte_sh(u2);
  printf("u3 = %x : ", u3);
  print_byte_i(u3);
  printf("u4 = %lx : ", u4);
  print_byte_l(u4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1234abcd,-0x8(%rbp)
movw   $0x1234,-0xa(%rbp)
movl   $0x1234abcd,-0x10(%rbp)
movabs $0x1234567890abcdef,%rax
56 34 12
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%esi
lea    0xe73(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%edi
call   1030 <print_byte_ui@plt>
movswq -0xa(%rbp),%rsi
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
movswl -0xa(%rbp),%edi
call   1050 <print_byte_sh@plt>
movslq -0x10(%rbp),%rsi
lea    0xe57(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%edi
call   1070 <print_byte_i@plt>
mov    -0x18(%rbp),%rsi
lea    0xe4a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1060 <print_byte_l@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea8(%rip),%rdi
mov    $0x1234abcd,%esi
call   1040 <printf@plt>
mov    $0x1234abcd,%edi
call   1030 <print_byte_ui@plt>
lea    0xe98(%rip),%rdi
mov    $0x1234,%esi
call   1040 <printf@plt>
mov    $0x1234,%edi
call   1050 <print_byte_sh@plt>
lea    0xe88(%rip),%rdi
mov    $0x1234abcd,%esi
call   1040 <printf@plt>
mov    $0x1234abcd,%edi
call   1070 <print_byte_i@plt>
lea    0xe78(%rip),%rdi
movabs $0x1234567890abcdef,%rbx
56 34 12
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1060 <print_byte_l@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"u1 = %x : \00"
@.str.1 = [11 x i8] c"u2 = %x : \00"
@.str.2 = [11 x i8] c"u3 = %x : \00"
@.str.3 = [12 x i8] c"u4 = %lx : \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i16
%4 = alloca i32
%5 = alloca i64
store i32 0, i32* %1
store i32 305441741, i32* %2
store i16 4660, i16* %3
store i32 305441741, i32* %4
store i64 1311768467294899695, i64* %5
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = load i32, i32* %2
%10 = call i32 @print_byte_ui(i32 %9)
%11 = load i16, i16* %3
%12 = sext i16 %11 to i64
%13 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 %12)
%14 = load i16, i16* %3
%15 = call i32 @print_byte_sh(i16 signext %14)
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i64 %17)
%19 = load i32, i32* %4
%20 = call i32 @print_byte_i(i32 %19)
%21 = load i64, i64* %5
%22 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i64 %21)
%23 = load i64, i64* %5
%24 = call i32 @print_byte_l(i64 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"u1 = %x : \00"
@.str.1 = [11 x i8] c"u2 = %x : \00"
@.str.2 = [11 x i8] c"u3 = %x : \00"
@.str.3 = [12 x i8] c"u4 = %lx : \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 305441741)
%2 = tail call i32 @print_byte_ui(i32 305441741)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i64 4660)
%4 = tail call i32 @print_byte_sh(i16 signext 4660)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i64 305441741)
%6 = tail call i32 @print_byte_i(i32 305441741)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i64 1311768467294899695)
%8 = tail call i32 @print_byte_l(i64 1311768467294899695)
ret i32 0
}