#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 */
scalar_t__ CHAR_BIT;
scalar_t__ CHAR_MIN;
scalar_t__ SIZE_MAX;
scalar_t__ UCHAR_MAX;
scalar_t__ UINT_MAX;
scalar_t__ ULLONG_MAX;
scalar_t__ ULONG_MAX;
scalar_t__ USHRT_MAX;
int /*<<< orphan*/ printf(char *, char *, unsigned long, ...);
int main(void) {
  printf("%26s:  %3lu bits\n", "CHAR_BIT", (unsigned long)CHAR_BIT);
  printf("%26s: %4d (%ssigned)\n", "CHAR_MIN", (int)CHAR_MIN,
         (CHAR_MIN == 0 ? "un" : ""));
  printf("%26s:  %3lu bytes %25lu max\n", "sizeof(unsigned char)",
         (unsigned long)sizeof(unsigned char), (unsigned long)UCHAR_MAX);
  printf("%26s:  %3lu bytes %25lu max\n", "sizeof(unsigned short)",
         (unsigned long)sizeof(unsigned short), (unsigned long)USHRT_MAX);
  printf("%26s:  %3lu bytes %25lu max\n", "sizeof(unsigned int)",
         (unsigned long)sizeof(unsigned int), (unsigned long)UINT_MAX);
  printf("%26s:  %3lu bytes %25lu max\n", "sizeof(unsigned long)",
         (unsigned long)sizeof(unsigned long), (unsigned long)ULONG_MAX);
  printf("%26s:  %3lu bytes %25llu max\n", "sizeof(unsigned long long)",
         (unsigned long)sizeof(unsigned long long),
         (unsigned long long)ULLONG_MAX);
  printf("%26s:  %3lu bytes %25llu max\n", "sizeof(size_t)",
         (unsigned long)sizeof(size_t), (unsigned long long)SIZE_MAX);
  printf("%26s:  %3lu bytes\n", "sizeof(void *)",
         (unsigned long)sizeof(void *));
  printf("%26s:  %3lu bytes\n", "sizeof(float)", (unsigned long)sizeof(float));
  printf("%26s:  %3lu bytes\n", "sizeof(double)",
         (unsigned long)sizeof(double));
  printf("%26s:  %3lu bytes\n", "sizeof(long double)",
         (unsigned long)sizeof(long double));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e92(%rip),%rax
mov    (%rax),%rdx
lea    0xed0(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%rax
movslq %eax,%rdx
mov    0x2e8e(%rip),%rax
mov    (%rax),%rsi
lea    0xed4(%rip),%rcx
lea    0xed7(%rip),%rax
cmp    $0x0,%rsi
cmove  %rax,%rcx
lea    0xea9(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e69(%rip),%rax
mov    (%rax),%rcx
lea    0xeac(%rip),%rdi
lea    0xec2(%rip),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%rcx
lea    0xe88(%rip),%rdi
lea    0xeb4(%rip),%rsi
mov    $0x2,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2df9(%rip),%rax
mov    (%rax),%rcx
lea    0xe64(%rip),%rdi
lea    0xea7(%rip),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dad(%rip),%rax
mov    (%rax),%rcx
lea    0xe40(%rip),%rdi
lea    0xe98(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2dc1(%rip),%rax
mov    (%rax),%rcx
lea    0xe91(%rip),%rdi
lea    0xea8(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d6d(%rip),%rax
mov    (%rax),%rcx
lea    0xe6d(%rip),%rdi
lea    0xe9f(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe9b(%rip),%rdi
lea    0xea7(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe81(%rip),%rdi
lea    0xe9c(%rip),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe67(%rip),%rdi
lea    0xe90(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe4d(%rip),%rdi
lea    0xe85(%rip),%rsi
mov    $0x10,%edx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ea0(%rip),%rax
mov    (%rax),%rdx
lea    0xede(%rip),%rdi
lea    0xee9(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%rax
movslq %eax,%rdx
test   %rax,%rax
lea    0xef3(%rip),%rax
lea    0xee2(%rip),%rcx
cmove  %rax,%rcx
lea    0xec2(%rip),%rdi
lea    0xed1(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e82(%rip),%rax
mov    (%rax),%rcx
lea    0xec5(%rip),%rbx
lea    0xedb(%rip),%rsi
mov    $0x1,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%rcx
lea    0xed1(%rip),%rsi
mov    $0x2,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2e13(%rip),%rax
mov    (%rax),%rcx
lea    0xec8(%rip),%rsi
mov    $0x4,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2dcb(%rip),%rax
mov    (%rax),%rcx
lea    0xebd(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%rcx
lea    0xeb3(%rip),%rbx
lea    0xeca(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x2d8c(%rip),%rax
mov    (%rax),%rcx
lea    0xec5(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebe(%rip),%rbx
lea    0xeca(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec3(%rip),%rsi
mov    $0x4,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xebb(%rip),%rsi
mov    $0x8,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeb4(%rip),%rsi
mov    $0x10,%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"%26s: %3lu bits\0A\00"
@.str.1 = [9 x i8] c"CHAR_BIT\00"
@CHAR_BIT = global i64 0
@.str.2 = [22 x i8] c"%26s: %4d (%ssigned)\0A\00"
@.str.3 = [9 x i8] c"CHAR_MIN\00"
@CHAR_MIN = global i64 0
@.str.4 = [3 x i8] c"un\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [29 x i8] c"%26s: %3lu bytes %25lu max\0A\00"
@.str.7 = [22 x i8] c"sizeof(unsigned char)\00"
@UCHAR_MAX = global i64 0
@.str.8 = [23 x i8] c"sizeof(unsigned short)\00"
@USHRT_MAX = global i64 0
@.str.9 = [21 x i8] c"sizeof(unsigned int)\00"
@UINT_MAX = global i64 0
@.str.10 = [22 x i8] c"sizeof(unsigned long)\00"
@ULONG_MAX = global i64 0
@.str.11 = [30 x i8] c"%26s: %3lu bytes %25llu max\0A\00"
@.str.12 = [27 x i8] c"sizeof(unsigned long long)\00"
@ULLONG_MAX = global i64 0
@.str.13 = [15 x i8] c"sizeof(size_t)\00"
@SIZE_MAX = global i64 0
@.str.14 = [19 x i8] c"%26s: %3lu bytes\0A\00"
@.str.15 = [15 x i8] c"sizeof(void *)\00"
@.str.16 = [14 x i8] c"sizeof(float)\00"
@.str.17 = [15 x i8] c"sizeof(double)\00"
@.str.18 = [20 x i8] c"sizeof(long double)\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i64, i64* @CHAR_BIT
%3 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %2)
%4 = load i64, i64* @CHAR_MIN
%5 = trunc i64 %4 to i32
%6 = sext i32 %5 to i64
%7 = load i64, i64* @CHAR_MIN
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%11 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i64 %6, i8* %10)
%12 = load i64, i64* @UCHAR_MAX
%13 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i64 1, i64 %12)
%14 = load i64, i64* @USHRT_MAX
%15 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i64 2, i64 %14)
%16 = load i64, i64* @UINT_MAX
%17 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i64 4, i64 %16)
%18 = load i64, i64* @ULONG_MAX
%19 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i64 8, i64 %18)
%20 = load i64, i64* @ULLONG_MAX
%21 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i64 8, i64 %20)
%22 = load i64, i64* @SIZE_MAX
%23 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i64 8, i64 %22)
%24 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i64 8)
%25 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), i64 4)
%26 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0), i64 8)
%27 = call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0), i64 16)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"%26s: %3lu bits\0A\00"
@.str.1 = [9 x i8] c"CHAR_BIT\00"
@CHAR_BIT = global i64 0
@.str.2 = [22 x i8] c"%26s: %4d (%ssigned)\0A\00"
@.str.3 = [9 x i8] c"CHAR_MIN\00"
@CHAR_MIN = global i64 0
@.str.4 = [3 x i8] c"un\00"
@.str.5 = [1 x i8] zeroinitializer
@.str.6 = [29 x i8] c"%26s: %3lu bytes %25lu max\0A\00"
@.str.7 = [22 x i8] c"sizeof(unsigned char)\00"
@UCHAR_MAX = global i64 0
@.str.8 = [23 x i8] c"sizeof(unsigned short)\00"
@USHRT_MAX = global i64 0
@.str.9 = [21 x i8] c"sizeof(unsigned int)\00"
@UINT_MAX = global i64 0
@.str.10 = [22 x i8] c"sizeof(unsigned long)\00"
@ULONG_MAX = global i64 0
@.str.11 = [30 x i8] c"%26s: %3lu bytes %25llu max\0A\00"
@.str.12 = [27 x i8] c"sizeof(unsigned long long)\00"
@ULLONG_MAX = global i64 0
@.str.13 = [15 x i8] c"sizeof(size_t)\00"
@SIZE_MAX = global i64 0
@.str.14 = [19 x i8] c"%26s: %3lu bytes\0A\00"
@.str.15 = [15 x i8] c"sizeof(void *)\00"
@.str.16 = [14 x i8] c"sizeof(float)\00"
@.str.17 = [15 x i8] c"sizeof(double)\00"
@.str.18 = [20 x i8] c"sizeof(long double)\00"
define i32 @main() {
%1 = load i64, i64* @CHAR_BIT
%2 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i64 %1)
%3 = load i64, i64* @CHAR_MIN
%4 = shl i64 %3, 32
%5 = ashr exact i64 %4, 32
%6 = icmp eq i64 %3, 0
%7 = select i1 %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0)
%8 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i64 %5, i8* %7)
%9 = load i64, i64* @UCHAR_MAX
%10 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i64 1, i64 %9)
%11 = load i64, i64* @USHRT_MAX
%12 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i64 2, i64 %11)
%13 = load i64, i64* @UINT_MAX
%14 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i64 4, i64 %13)
%15 = load i64, i64* @ULONG_MAX
%16 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i64 8, i64 %15)
%17 = load i64, i64* @ULLONG_MAX
%18 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.12, i64 0, i64 0), i64 8, i64 %17)
%19 = load i64, i64* @SIZE_MAX
%20 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.13, i64 0, i64 0), i64 8, i64 %19)
%21 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i64 8)
%22 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), i64 4)
%23 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.17, i64 0, i64 0), i64 8)
%24 = tail call i32 (i8*, i8*, i64, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.18, i64 0, i64 0), i64 16)
ret i32 0
}