#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 CHAR_MAX;
double DBL_MAX;
int DBL_MAX_EXP;
double FLT_MAX;
int FLT_MAX_EXP;
int INT_MAX;
int LONG_MAX;
int SHRT_MAX;
int UCHAR_MAX;
scalar_t__ UINT_MAX;
scalar_t__ ULONG_MAX;
int USHRT_MAX;
int /*<<< orphan*/ printf(char *, ...);
void show_limits() {
  printf("Type limits:\n");
  printf("\tchar max: %d\n", CHAR_MAX);
  printf("\tunsigned char max: %d\n", UCHAR_MAX);
  printf("\tshort max: %d\n", SHRT_MAX);
  printf("\tunsigned short max: %d\n", USHRT_MAX);
  printf("\tint max: %d\n", INT_MAX);
  printf("\tunsigned int max: %g\n", (double)UINT_MAX);
  printf("\tlong max: %li\n", LONG_MAX);
  printf("\tunsigned long max: %g\n", (double)ULONG_MAX);
  printf("\tfloat max: %g\n", FLT_MAX);
  printf("\tfloat exp max: %d\n", FLT_MAX_EXP);
  printf("\tdouble max: %g\n", DBL_MAX);
  printf("\tdouble exp max: %d\n", DBL_MAX_EXP);
}


x86 assembly (clang, -O0):
<show_limits>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xed4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%esi
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%esi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e43(%rip),%rax
mov    (%rax),%esi
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e1c(%rip),%rax
cvtsi2sdq (%rax),%xmm0
lea    0xec4(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2dea(%rip),%rax
mov    (%rax),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2db3(%rip),%rax
cvtsi2sdq (%rax),%xmm0
lea    0xeba(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2dc9(%rip),%rax
movsd  (%rax),%xmm0
lea    0xeb9(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2dc0(%rip),%rax
mov    (%rax),%esi
lea    0xeb2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d79(%rip),%rax
movsd  (%rax),%xmm0
lea    0xead(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    0x2da8(%rip),%rax
mov    (%rax),%esi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_limits>:
push   %rax
lea    0xfbf(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
lea    0xec3(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e36(%rip),%rax
mov    (%rax),%esi
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%esi
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e38(%rip),%rax
mov    (%rax),%esi
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2e11(%rip),%rax
cvtsi2sdq (%rax),%xmm0
lea    0xeab(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%esi
lea    0xeab(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2da8(%rip),%rax
xorps  %xmm0,%xmm0
cvtsi2sdq (%rax),%xmm0
lea    0xe9e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2dbb(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe9d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2db2(%rip),%rax
mov    (%rax),%esi
lea    0xe96(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2d6b(%rip),%rax
movsd  (%rax),%xmm0
lea    0xe91(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%esi
lea    0xe8b(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Type limits:\0A\00"
@.str.1 = [15 x i8] c"\09char max: %d\0A\00"
@CHAR_MAX = global i32 0
@.str.2 = [24 x i8] c"\09unsigned char max: %d\0A\00"
@UCHAR_MAX = global i32 0
@.str.3 = [16 x i8] c"\09short max: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.4 = [25 x i8] c"\09unsigned short max: %d\0A\00"
@USHRT_MAX = global i32 0
@.str.5 = [14 x i8] c"\09int max: %d\0A\00"
@INT_MAX = global i32 0
@.str.6 = [23 x i8] c"\09unsigned int max: %g\0A\00"
@UINT_MAX = global i64 0
@.str.7 = [16 x i8] c"\09long max: %li\0A\00"
@LONG_MAX = global i32 0
@.str.8 = [24 x i8] c"\09unsigned long max: %g\0A\00"
@ULONG_MAX = global i64 0
@.str.9 = [16 x i8] c"\09float max: %g\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.10 = [20 x i8] c"\09float exp max: %d\0A\00"
@FLT_MAX_EXP = global i32 0
@.str.11 = [17 x i8] c"\09double max: %g\0A\00"
@DBL_MAX = global double 0.000000e+00
@.str.12 = [21 x i8] c"\09double exp max: %d\0A\00"
@DBL_MAX_EXP = global i32 0
define void @show_limits() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_MAX
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @UCHAR_MAX
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @SHRT_MAX
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @USHRT_MAX
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @INT_MAX
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %10)
%12 = load i64, i64* @UINT_MAX
%13 = sitofp i64 %12 to double
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), double %13)
%15 = load i32, i32* @LONG_MAX
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = load i64, i64* @ULONG_MAX
%18 = sitofp i64 %17 to double
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), double %18)
%20 = load double, double* @FLT_MAX
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), double %20)
%22 = load i32, i32* @FLT_MAX_EXP
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %22)
%24 = load double, double* @DBL_MAX
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), double %24)
%26 = load i32, i32* @DBL_MAX_EXP
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i32 %26)
ret void
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"\09char max: %d\0A\00"
@CHAR_MAX = global i32 0
@.str.2 = [24 x i8] c"\09unsigned char max: %d\0A\00"
@UCHAR_MAX = global i32 0
@.str.3 = [16 x i8] c"\09short max: %d\0A\00"
@SHRT_MAX = global i32 0
@.str.4 = [25 x i8] c"\09unsigned short max: %d\0A\00"
@USHRT_MAX = global i32 0
@.str.5 = [14 x i8] c"\09int max: %d\0A\00"
@INT_MAX = global i32 0
@.str.6 = [23 x i8] c"\09unsigned int max: %g\0A\00"
@UINT_MAX = global i64 0
@.str.7 = [16 x i8] c"\09long max: %li\0A\00"
@LONG_MAX = global i32 0
@.str.8 = [24 x i8] c"\09unsigned long max: %g\0A\00"
@ULONG_MAX = global i64 0
@.str.9 = [16 x i8] c"\09float max: %g\0A\00"
@FLT_MAX = global double 0.000000e+00
@.str.10 = [20 x i8] c"\09float exp max: %d\0A\00"
@FLT_MAX_EXP = global i32 0
@.str.11 = [17 x i8] c"\09double max: %g\0A\00"
@DBL_MAX = global double 0.000000e+00
@.str.12 = [21 x i8] c"\09double exp max: %d\0A\00"
@DBL_MAX_EXP = global i32 0
@str = [13 x i8] c"Type limits:\00"
define void @show_limits() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_MAX
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @UCHAR_MAX
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %4)
%6 = load i32, i32* @SHRT_MAX
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @USHRT_MAX
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @INT_MAX
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0), i32 %10)
%12 = load i64, i64* @UINT_MAX
%13 = sitofp i64 %12 to double
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), double %13)
%15 = load i32, i32* @LONG_MAX
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i32 %15)
%17 = load i64, i64* @ULONG_MAX
%18 = sitofp i64 %17 to double
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), double %18)
%20 = load double, double* @FLT_MAX
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.9, i64 0, i64 0), double %20)
%22 = load i32, i32* @FLT_MAX_EXP
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0), i32 %22)
%24 = load double, double* @DBL_MAX
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), double %24)
%26 = load i32, i32* @DBL_MAX_EXP
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i32 %26)
ret void
}