#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 long, ...);
int main() {
  printf("Unsigned int: %d bytes\n", sizeof(unsigned int));
  printf("Unsigned long int: %d bytes\n", sizeof(unsigned long int));
  printf("Unsinged long long int: %d bytes\n", sizeof(unsigned long long int));
  unsigned long int a, b;
  unsigned long long int ans;
  a = 0x1 << 31;
  b = a;
  ans = (unsigned long long)a * (unsigned long long)b;
  printf("%lu %lu %llu\n", a, b, ans);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0xffffffff80000000,-0x10(%rbp)
80
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xecf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
movabs $0x4000000000000000,%rcx
mov    $0xffffffff80000000,%rsi
mov    $0xffffffff80000000,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Unsigned int: %d bytes\0A\00"
@.str.1 = [29 x i8] c"Unsigned long int: %d bytes\0A\00"
@.str.2 = [34 x i8] c"Unsinged long long int: %d bytes\0A\00"
@.str.3 = [14 x i8] c"%lu %lu %llu\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 4)
%6 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i64 8)
%7 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i64 8)
store i64 -2147483648, i64* %2
%8 = load i64, i64* %2
store i64 %8, i64* %3
%9 = load i64, i64* %2
%10 = load i64, i64* %3
%11 = mul i64 %9, %10
store i64 %11, i64* %4
%12 = load i64, i64* %2
%13 = load i64, i64* %3
%14 = load i64, i64* %4
%15 = call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i64 %12, i64 %13, i64 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Unsigned int: %d bytes\0A\00"
@.str.1 = [29 x i8] c"Unsigned long int: %d bytes\0A\00"
@.str.2 = [34 x i8] c"Unsinged long long int: %d bytes\0A\00"
@.str.3 = [14 x i8] c"%lu %lu %llu\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 4)
%2 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i64 8)
%3 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i64 8)
%4 = tail call i32 (i8*, i64, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i64 -2147483648, i64 -2147483648, i64 4611686018427387904)
ret i32 0
}