#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;
int CHAR_MIN;
int DBL_MAX;
int FLT_MAX;
int INT_MAX;
int INT_MIN;
int LDBL_MAX;
int LONG_MAX;
int LONG_MIN;
int UCHAR_MAX;
int UINT_MAX;
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  printf("Min and Max of char: %d and %d\n", CHAR_MIN, CHAR_MAX);
  printf("Min and Max of unsigned char: %d and %d\n", 0, UCHAR_MAX);
  printf("Min and Max of int: %d and %d\n", INT_MIN, INT_MAX);
  printf("Min and Max of unsigned int: %d and %lld\n", 0, UINT_MAX);
  printf("Min and Max of long: %d and %d\n", LONG_MIN, LONG_MAX);
  printf("Min and Max of float: %lld and %lld\n", -FLT_MAX, FLT_MAX);
  printf("Min and Max of double: %lld and %lld\n", -DBL_MAX, DBL_MAX);
  printf("Min and Max of long double: %lf and %lf\n", -LDBL_MAX, LDBL_MAX);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%esi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
lea    0xed3(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%esi
mov    0x2e6c(%rip),%rax
mov    (%rax),%edx
lea    0xedc(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edx
lea    0xee6(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x2e30(%rip),%rax
mov    (%rax),%esi
mov    0x2dff(%rip),%rax
mov    (%rax),%edx
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
mov    0x2e00(%rip),%rax
sub    (%rax),%esi
mov    0x2df7(%rip),%rax
mov    (%rax),%edx
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
mov    0x2dc0(%rip),%rax
sub    (%rax),%esi
mov    0x2db7(%rip),%rax
mov    (%rax),%edx
lea    0xef5(%rip),%rdi
call   1030 <printf@plt>
xor    %esi,%esi
mov    0x2db0(%rip),%rax
sub    (%rax),%esi
mov    0x2da7(%rip),%rax
mov    (%rax),%edx
lea    0xefb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
lea    0xee1(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%esi
mov    0x2e7a(%rip),%rax
mov    (%rax),%edx
lea    0xeea(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5d(%rip),%rax
mov    (%rax),%edx
lea    0xef4(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%esi
mov    0x2e0d(%rip),%rax
mov    (%rax),%edx
lea    0xefe(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%edx
mov    %edx,%esi
neg    %esi
lea    0xf05(%rip),%rdi
call   1030 <printf@plt>
mov    0x2dd7(%rip),%rax
mov    (%rax),%edx
mov    %edx,%esi
neg    %esi
lea    0xf11(%rip),%rdi
call   1030 <printf@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edx
mov    %edx,%esi
neg    %esi
lea    0xf1e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Min and Max of char: %d and %d\0A\00"
@CHAR_MIN = global i32 0
@CHAR_MAX = global i32 0
@.str.1 = [41 x i8] c"Min and Max of unsigned char: %d and %d\0A\00"
@UCHAR_MAX = global i32 0
@.str.2 = [31 x i8] c"Min and Max of int: %d and %d\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.3 = [42 x i8] c"Min and Max of unsigned int: %d and %lld\0A\00"
@UINT_MAX = global i32 0
@.str.4 = [32 x i8] c"Min and Max of long: %d and %d\0A\00"
@LONG_MIN = global i32 0
@LONG_MAX = global i32 0
@.str.5 = [37 x i8] c"Min and Max of float: %lld and %lld\0A\00"
@FLT_MAX = global i32 0
@.str.6 = [38 x i8] c"Min and Max of double: %lld and %lld\0A\00"
@DBL_MAX = global i32 0
@.str.7 = [41 x i8] c"Min and Max of long double: %lf and %lf\0A\00"
@LDBL_MAX = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @CHAR_MIN
%3 = load i32, i32* @CHAR_MAX
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = load i32, i32* @UCHAR_MAX
%6 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %5)
%7 = load i32, i32* @INT_MIN
%8 = load i32, i32* @INT_MAX
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8)
%10 = load i32, i32* @UINT_MAX
%11 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 %10)
%12 = load i32, i32* @LONG_MIN
%13 = load i32, i32* @LONG_MAX
%14 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %12, i32 %13)
%15 = load i32, i32* @FLT_MAX
%16 = sub nsw i32 0, %15
%17 = load i32, i32* @FLT_MAX
%18 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 %16, i32 %17)
%19 = load i32, i32* @DBL_MAX
%20 = sub nsw i32 0, %19
%21 = load i32, i32* @DBL_MAX
%22 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %20, i32 %21)
%23 = load i32, i32* @LDBL_MAX
%24 = sub nsw i32 0, %23
%25 = load i32, i32* @LDBL_MAX
%26 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i32 %24, i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"Min and Max of char: %d and %d\0A\00"
@CHAR_MIN = global i32 0
@CHAR_MAX = global i32 0
@.str.1 = [41 x i8] c"Min and Max of unsigned char: %d and %d\0A\00"
@UCHAR_MAX = global i32 0
@.str.2 = [31 x i8] c"Min and Max of int: %d and %d\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.3 = [42 x i8] c"Min and Max of unsigned int: %d and %lld\0A\00"
@UINT_MAX = global i32 0
@.str.4 = [32 x i8] c"Min and Max of long: %d and %d\0A\00"
@LONG_MIN = global i32 0
@LONG_MAX = global i32 0
@.str.5 = [37 x i8] c"Min and Max of float: %lld and %lld\0A\00"
@FLT_MAX = global i32 0
@.str.6 = [38 x i8] c"Min and Max of double: %lld and %lld\0A\00"
@DBL_MAX = global i32 0
@.str.7 = [41 x i8] c"Min and Max of long double: %lf and %lf\0A\00"
@LDBL_MAX = global i32 0
define i32 @main() {
%1 = load i32, i32* @CHAR_MIN
%2 = load i32, i32* @CHAR_MAX
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = load i32, i32* @UCHAR_MAX
%5 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 0, i32 %4)
%6 = load i32, i32* @INT_MIN
%7 = load i32, i32* @INT_MAX
%8 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* @UINT_MAX
%10 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 %9)
%11 = load i32, i32* @LONG_MIN
%12 = load i32, i32* @LONG_MAX
%13 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* @FLT_MAX
%15 = sub nsw i32 0, %14
%16 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.5, i64 0, i64 0), i32 %15, i32 %14)
%17 = load i32, i32* @DBL_MAX
%18 = sub nsw i32 0, %17
%19 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i32 %18, i32 %17)
%20 = load i32, i32* @LDBL_MAX
%21 = sub nsw i32 0, %20
%22 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), i32 %21, i32 %20)
ret i32 0
}