#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 INT_MAX;
int INT_MIN;
int /*<<< orphan*/ LLONG_MAX;
int /*<<< orphan*/ LLONG_MIN;
int /*<<< orphan*/ LONG_MAX;
int /*<<< orphan*/ LONG_MIN;
int SCHAR_MAX;
int SCHAR_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
int UINT_MAX;
int /*<<< orphan*/ ULLONG_MAX;
int /*<<< orphan*/ ULONG_MAX;
int USHRT_MAX;
int intFindMaxHex(int);
int /*<<< orphan*/ printf(char *, short, short, short, short, short,
                          unsigned short, int, int, unsigned int, long, long,
                          unsigned long, ...);
int uintFindMaxHex(int);
int ulongFindMaxHex(int);
int unsignedshortFindMaxHex(int);
int main() {
  printf("Printed Values:\n"
         "Min/Max Signed char:%d/%d\nMax Unsigned char:%d\n"
         "Min/Max Signed short:%d/%d\nMax Unsigned short:%d\n"
         "Min/Max Int:%d/%d\nMax Unsigned Int:%u\n"
         "Min/Max Signed Long:%ld/%ld\nMax Unsigned Long:%lu\n"
         "Min/Max Signed Long Long:%lld/%lldd\nMax Unsigned Long Long:%llu\n",
         SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, SHRT_MIN, SHRT_MAX, USHRT_MAX,
         INT_MIN, INT_MAX, UINT_MAX, LONG_MIN, LONG_MAX, ULONG_MAX, LLONG_MIN,
         LLONG_MAX, ULLONG_MAX);
  short schar_min, schar_max, uchar_max, shrt_min, shrt_max;
  unsigned short ushrt_max;
  int int_min, int_max;
  unsigned int uint_max;
  long long_min, long_max;
  unsigned long ulong_max;
  long long llong_min, llong_max;
  unsigned long long ullong_max;
  schar_min = (schar_max = (uchar_max = intFindMaxHex(2) - 1) / 2) * -1 - 1;
  shrt_min =
      (shrt_max = (ushrt_max = unsignedshortFindMaxHex(4) - 1) / 2) * -1 - 1;
  int_min = (int_max = (uint_max = uintFindMaxHex(8) - 1) / 2) * -1 - 1;
  long_min = (long_max = (ulong_max = ulongFindMaxHex(16) - 1) / 2) * -1 - 1;
  printf("Computed values:\n"
         "Min/Max Signed char:%d/%d\nMax Unsigned char:%d\n"
         "Min/Max Signed short:%d/%d\nMax Unsigned short:%d\n"
         "Min/Max Int:%d/%d\nMax Unsigned Int:%u\n"
         "Min/Max Signed Long:%ld/%ld\nMax Unsigned Long:%lu\n"
         "Long long is the same as Long for our System",
         schar_min, schar_max, uchar_max, shrt_min, shrt_max, ushrt_max,
         int_min, int_max, uint_max, long_min, long_max, ulong_max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xa8,%rsp
movl   $0x0,-0x2c(%rbp)
mov    0x2e2e(%rip),%rax
mov    (%rax),%eax
mov    %ax,%si
mov    0x2e1a(%rip),%rax
mov    (%rax),%eax
mov    %ax,%dx
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
mov    %ax,%cx
mov    0x2dea(%rip),%rax
mov    (%rax),%eax
mov    %ax,%r8w
mov    0x2dd5(%rip),%rax
mov    (%rax),%eax
mov    %ax,%r9w
mov    0x2e28(%rip),%rax
mov    (%rax),%eax
mov    0x2dff(%rip),%rdi
mov    (%rdi),%edi
mov    %edi,-0x80(%rbp)
mov    0x2e0b(%rip),%rdi
mov    (%rdi),%r13d
mov    0x2df9(%rip),%rdi
mov    (%rdi),%r12d
mov    0x2de7(%rip),%rdi
movslq (%rdi),%r15
mov    0x2da5(%rip),%rdi
movslq (%rdi),%r14
mov    0x2d7b(%rip),%rdi
movslq (%rdi),%rbx
mov    0x2d99(%rip),%rdi
mov    (%rdi),%r11d
mov    0x2daf(%rip),%rdi
mov    (%rdi),%r10d
mov    0x2dd5(%rip),%rdi
mov    (%rdi),%edi
mov    %edi,-0x7c(%rbp)
lea    0xde9(%rip),%rdi
movswl %si,%esi
movswl %dx,%edx
movswl %cx,%ecx
movswl %r8w,%r8d
movswl %r9w,%r9d
movzwl %ax,%eax
mov    %eax,(%rsp)
mov    -0x80(%rbp),%eax
mov    %eax,0x8(%rsp)
mov    -0x7c(%rbp),%eax
mov    %r13d,0x10(%rsp)
mov    %r12d,0x18(%rsp)
mov    %r15,0x20(%rsp)
mov    %r14,0x28(%rsp)
mov    %rbx,0x30(%rsp)
mov    %r11d,0x38(%rsp)
mov    %r10d,0x40(%rsp)
mov    %eax,0x48(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x2,%edi
call   1030 <intFindMaxHex@plt>
sub    $0x1,%eax
mov    %ax,-0x32(%rbp)
cwtl
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %ax,-0x30(%rbp)
cwtl
imul   $0xffffffff,%eax,%eax
sub    $0x1,%eax
mov    %ax,-0x2e(%rbp)
mov    $0x4,%edi
call   1060 <unsignedshortFindMaxHex@plt>
sub    $0x1,%eax
mov    %ax,-0x38(%rbp)
movzwl %ax,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %ax,-0x36(%rbp)
cwtl
imul   $0xffffffff,%eax,%eax
sub    $0x1,%eax
mov    %ax,-0x34(%rbp)
mov    $0x8,%edi
call   1040 <uintFindMaxHex@plt>
sub    $0x1,%eax
mov    %eax,-0x44(%rbp)
shr    $0x1,%eax
mov    %eax,-0x40(%rbp)
imul   $0xffffffff,%eax,%eax
sub    $0x1,%eax
mov    %eax,-0x3c(%rbp)
mov    $0x10,%edi
call   1070 <ulongFindMaxHex@plt>
sub    $0x1,%eax
cltq
mov    %rax,-0x60(%rbp)
shr    $0x1,%rax
mov    %rax,-0x58(%rbp)
imul   $0xffffffffffffffff,%rax,%rax
sub    $0x1,%rax
mov    %rax,-0x50(%rbp)
mov    -0x2e(%rbp),%si
mov    -0x30(%rbp),%dx
mov    -0x32(%rbp),%cx
mov    -0x34(%rbp),%r8w
mov    -0x36(%rbp),%r9w
mov    -0x38(%rbp),%r12w
mov    -0x3c(%rbp),%r15d
mov    -0x40(%rbp),%r14d
mov    -0x44(%rbp),%ebx
mov    -0x50(%rbp),%r11
mov    -0x58(%rbp),%r10
mov    -0x60(%rbp),%rax
lea    0xdd0(%rip),%rdi
movswl %si,%esi
movswl %dx,%edx
movswl %cx,%ecx
movswl %r8w,%r8d
movswl %r9w,%r9d
movzwl %r12w,%r12d
mov    %r12d,(%rsp)
mov    %r15d,0x8(%rsp)
mov    %r14d,0x10(%rsp)
mov    %ebx,0x18(%rsp)
mov    %r11,0x20(%rsp)
mov    %r10,0x28(%rsp)
mov    %rax,0x30(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    0x2e3b(%rip),%rax
movswl (%rax),%esi
mov    0x2e29(%rip),%rax
movswl (%rax),%edx
mov    0x2e77(%rip),%rax
movswl (%rax),%ecx
mov    0x2dfd(%rip),%rax
movswl (%rax),%r8d
mov    0x2dea(%rip),%rax
movswl (%rax),%r9d
mov    0x2e3f(%rip),%rax
movzwl (%rax),%eax
mov    %rax,0x10(%rsp)
mov    0x2e10(%rip),%rax
mov    (%rax),%eax
mov    %rax,0x8(%rsp)
mov    0x2e1a(%rip),%rax
mov    (%rax),%r14d
mov    0x2e08(%rip),%rax
mov    (%rax),%r15d
mov    0x2df6(%rip),%rax
movslq (%rax),%r12
mov    0x2db4(%rip),%rax
movslq (%rax),%r13
mov    0x2d8a(%rip),%rax
movslq (%rax),%rbp
mov    0x2da8(%rip),%rax
mov    (%rax),%ebx
mov    0x2dbf(%rip),%rax
mov    (%rax),%r11d
mov    0x2de5(%rip),%rax
mov    (%rax),%r10d
lea    0xdfb(%rip),%rdi
xor    %eax,%eax
push   %r10
push   %r11
push   %rbx
push   %rbp
push   %r13
push   %r12
push   %r15
push   %r14
push   0x48(%rsp)
push   0x58(%rsp)
call   1050 <printf@plt>
add    $0x50,%rsp
mov    $0x2,%edi
call   1030 <intFindMaxHex@plt>
add    $0xffffffff,%eax
movzwl %ax,%ecx
mov    %ecx,0x1c(%rsp)
mov    %ecx,%eax
shr    $0xf,%eax
add    %ecx,%eax
cwtl
sar    %eax
mov    %eax,0x8(%rsp)
not    %eax
mov    %eax,0x18(%rsp)
mov    $0x4,%edi
call   1060 <unsignedshortFindMaxHex@plt>
add    $0xffffffff,%eax
movzwl %ax,%eax
mov    %rax,0x10(%rsp)
mov    %eax,%r12d
shr    %r12d
mov    %r12d,%r14d
not    %r14d
mov    $0x8,%edi
call   1040 <uintFindMaxHex@plt>
mov    %eax,%r13d
add    $0xffffffff,%r13d
mov    %r13d,%r15d
shr    %r15d
mov    %r15d,%eax
not    %eax
mov    %rax,0x20(%rsp)
mov    $0x10,%edi
call   1070 <ulongFindMaxHex@plt>
add    $0xffffffff,%eax
movslq %eax,%r10
mov    %r10,%rbx
shr    %rbx
mov    %rbx,%rbp
not    %rbp
sub    $0x8,%rsp
movswl 0x20(%rsp),%esi
movswl 0x24(%rsp),%ecx
movswl %r14w,%r8d
lea    0xe44(%rip),%rdi
mov    0x10(%rsp),%edx
mov    %r12d,%r9d
mov    $0x0,%eax
push   %r10
push   %rbx
push   %rbp
push   %r13
push   %r15
push   0x50(%rsp)
push   0x48(%rsp)
call   1050 <printf@plt>
add    $0x40,%rsp
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [265 x i8] c"Printed Values:\0AMin/Max Signed char:%d/%d\0AMax Unsigned char:%d\0AMin/Max Signed short:%d/%d\0AMax Unsigned short:%d\0AMin/Max Int:%d/%d\0AMax Unsigned Int:%u\0AMin/Max Signed Long:%ld/%ld\0AMax Unsigned Long:%lu\0AMin/Max Signed Long Long:%lld/%lldd\0AMax Unsigned Long Long:%llu\0A\00"
@SCHAR_MIN = global i32 0
@SCHAR_MAX = global i32 0
@UCHAR_MAX = global i32 0
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@USHRT_MAX = global i32 0
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@UINT_MAX = global i32 0
@LONG_MIN = global i32 0
@LONG_MAX = global i32 0
@ULONG_MAX = global i32 0
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
@ULLONG_MAX = global i32 0
@.str.1 = [246 x i8] c"Computed values:\0AMin/Max Signed char:%d/%d\0AMax Unsigned char:%d\0AMin/Max Signed short:%d/%d\0AMax Unsigned short:%d\0AMin/Max Int:%d/%d\0AMax Unsigned Int:%u\0AMin/Max Signed Long:%ld/%ld\0AMax Unsigned Long:%lu\0ALong long is the same as Long for our System\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
store i32 0, i32* %1
%17 = load i32, i32* @SCHAR_MIN
%18 = trunc i32 %17 to i16
%19 = load i32, i32* @SCHAR_MAX
%20 = trunc i32 %19 to i16
%21 = load i32, i32* @UCHAR_MAX
%22 = trunc i32 %21 to i16
%23 = load i32, i32* @SHRT_MIN
%24 = trunc i32 %23 to i16
%25 = load i32, i32* @SHRT_MAX
%26 = trunc i32 %25 to i16
%27 = load i32, i32* @USHRT_MAX
%28 = trunc i32 %27 to i16
%29 = load i32, i32* @INT_MIN
%30 = load i32, i32* @INT_MAX
%31 = load i32, i32* @UINT_MAX
%32 = load i32, i32* @LONG_MIN
%33 = sext i32 %32 to i64
%34 = load i32, i32* @LONG_MAX
%35 = sext i32 %34 to i64
%36 = load i32, i32* @ULONG_MAX
%37 = sext i32 %36 to i64
%38 = load i32, i32* @LLONG_MIN
%39 = load i32, i32* @LLONG_MAX
%40 = load i32, i32* @ULLONG_MAX
%41 = call i32 (i8*, i16, i16, i16, i16, i16, i16, i32, i32, i32, i64, i64, i64, ...) @printf(i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str, i64 0, i64 0), i16 signext %18, i16 signext %20, i16 signext %22, i16 signext %24, i16 signext %26, i16 zeroext %28, i32 %29, i32 %30, i32 %31, i64 %33, i64 %35, i64 %37, i32 %38, i32 %39, i32 %40)
%42 = call i32 @intFindMaxHex(i32 2)
%43 = sub nsw i32 %42, 1
%44 = trunc i32 %43 to i16
store i16 %44, i16* %4
%45 = sext i16 %44 to i32
%46 = sdiv i32 %45, 2
%47 = trunc i32 %46 to i16
store i16 %47, i16* %3
%48 = sext i16 %47 to i32
%49 = mul nsw i32 %48, -1
%50 = sub nsw i32 %49, 1
%51 = trunc i32 %50 to i16
store i16 %51, i16* %2
%52 = call i32 @unsignedshortFindMaxHex(i32 4)
%53 = sub nsw i32 %52, 1
%54 = trunc i32 %53 to i16
store i16 %54, i16* %7
%55 = zext i16 %54 to i32
%56 = sdiv i32 %55, 2
%57 = trunc i32 %56 to i16
store i16 %57, i16* %6
%58 = sext i16 %57 to i32
%59 = mul nsw i32 %58, -1
%60 = sub nsw i32 %59, 1
%61 = trunc i32 %60 to i16
store i16 %61, i16* %5
%62 = call i32 @uintFindMaxHex(i32 8)
%63 = sub nsw i32 %62, 1
store i32 %63, i32* %10
%64 = udiv i32 %63, 2
store i32 %64, i32* %9
%65 = mul nsw i32 %64, -1
%66 = sub nsw i32 %65, 1
store i32 %66, i32* %8
%67 = call i32 @ulongFindMaxHex(i32 16)
%68 = sub nsw i32 %67, 1
%69 = sext i32 %68 to i64
store i64 %69, i64* %13
%70 = udiv i64 %69, 2
store i64 %70, i64* %12
%71 = mul nsw i64 %70, -1
%72 = sub nsw i64 %71, 1
store i64 %72, i64* %11
%73 = load i16, i16* %2
%74 = load i16, i16* %3
%75 = load i16, i16* %4
%76 = load i16, i16* %5
%77 = load i16, i16* %6
%78 = load i16, i16* %7
%79 = load i32, i32* %8
%80 = load i32, i32* %9
%81 = load i32, i32* %10
%82 = load i64, i64* %11
%83 = load i64, i64* %12
%84 = load i64, i64* %13
%85 = call i32 (i8*, i16, i16, i16, i16, i16, i16, i32, i32, i32, i64, i64, i64, ...) @printf(i8* getelementptr inbounds ([246 x i8], [246 x i8]* @.str.1, i64 0, i64 0), i16 signext %73, i16 signext %74, i16 signext %75, i16 signext %76, i16 signext %77, i16 zeroext %78, i32 %79, i32 %80, i32 %81, i64 %82, i64 %83, i64 %84)
ret i32 0
}

LLVM IR (-O2):
@.str = [265 x i8] c"Printed Values:\0AMin/Max Signed char:%d/%d\0AMax Unsigned char:%d\0AMin/Max Signed short:%d/%d\0AMax Unsigned short:%d\0AMin/Max Int:%d/%d\0AMax Unsigned Int:%u\0AMin/Max Signed Long:%ld/%ld\0AMax Unsigned Long:%lu\0AMin/Max Signed Long Long:%lld/%lldd\0AMax Unsigned Long Long:%llu\0A\00"
@SCHAR_MIN = global i32 0
@SCHAR_MAX = global i32 0
@UCHAR_MAX = global i32 0
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@USHRT_MAX = global i32 0
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@UINT_MAX = global i32 0
@LONG_MIN = global i32 0
@LONG_MAX = global i32 0
@ULONG_MAX = global i32 0
@LLONG_MIN = global i32 0
@LLONG_MAX = global i32 0
@ULLONG_MAX = global i32 0
@.str.1 = [246 x i8] c"Computed values:\0AMin/Max Signed char:%d/%d\0AMax Unsigned char:%d\0AMin/Max Signed short:%d/%d\0AMax Unsigned short:%d\0AMin/Max Int:%d/%d\0AMax Unsigned Int:%u\0AMin/Max Signed Long:%ld/%ld\0AMax Unsigned Long:%lu\0ALong long is the same as Long for our System\00"
define i32 @main() {
%1 = load i32, i32* @SCHAR_MIN
%2 = trunc i32 %1 to i16
%3 = load i32, i32* @SCHAR_MAX
%4 = trunc i32 %3 to i16
%5 = load i32, i32* @UCHAR_MAX
%6 = trunc i32 %5 to i16
%7 = load i32, i32* @SHRT_MIN
%8 = trunc i32 %7 to i16
%9 = load i32, i32* @SHRT_MAX
%10 = trunc i32 %9 to i16
%11 = load i32, i32* @USHRT_MAX
%12 = trunc i32 %11 to i16
%13 = load i32, i32* @INT_MIN
%14 = load i32, i32* @INT_MAX
%15 = load i32, i32* @UINT_MAX
%16 = load i32, i32* @LONG_MIN
%17 = sext i32 %16 to i64
%18 = load i32, i32* @LONG_MAX
%19 = sext i32 %18 to i64
%20 = load i32, i32* @ULONG_MAX
%21 = sext i32 %20 to i64
%22 = load i32, i32* @LLONG_MIN
%23 = load i32, i32* @LLONG_MAX
%24 = load i32, i32* @ULLONG_MAX
%25 = tail call i32 (i8*, i16, i16, i16, i16, i16, i16, i32, i32, i32, i64, i64, i64, ...) @printf(i8* getelementptr inbounds ([265 x i8], [265 x i8]* @.str, i64 0, i64 0), i16 signext %2, i16 signext %4, i16 signext %6, i16 signext %8, i16 signext %10, i16 zeroext %12, i32 %13, i32 %14, i32 %15, i64 %17, i64 %19, i64 %21, i32 %22, i32 %23, i32 %24)
%26 = tail call i32 @intFindMaxHex(i32 2)
%27 = trunc i32 %26 to i16
%28 = add i16 %27, -1
%29 = sdiv i16 %28, 2
%30 = xor i16 %29, -1
%31 = tail call i32 @unsignedshortFindMaxHex(i32 4)
%32 = trunc i32 %31 to i16
%33 = add i16 %32, -1
%34 = lshr i16 %33, 1
%35 = xor i16 %34, -1
%36 = tail call i32 @uintFindMaxHex(i32 8)
%37 = add nsw i32 %36, -1
%38 = lshr i32 %37, 1
%39 = xor i32 %38, -1
%40 = tail call i32 @ulongFindMaxHex(i32 16)
%41 = add nsw i32 %40, -1
%42 = sext i32 %41 to i64
%43 = lshr i64 %42, 1
%44 = xor i64 %43, -1
%45 = tail call i32 (i8*, i16, i16, i16, i16, i16, i16, i32, i32, i32, i64, i64, i64, ...) @printf(i8* getelementptr inbounds ([246 x i8], [246 x i8]* @.str.1, i64 0, i64 0), i16 signext %30, i16 signext %29, i16 signext %28, i16 signext %35, i16 signext %34, i16 zeroext %33, i32 %39, i32 %38, i32 %37, i64 %44, i64 %43, i64 %42)
ret i32 0
}