#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 INT_MAX;
int INT_MIN;
int LONG_MAX;
int LONG_MIN;
int SCHAR_MAX;
int SCHAR_MIN;
int SHRT_MAX;
int SHRT_MIN;
int UCHAR_MAX;
int UINT_MAX;
int ULONG_MAX;
int USHRT_MAX;
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("该环境下各字符型、整型数值的范围");
  printf("char            :%d~%d\n", CHAR_MIN, CHAR_MAX);
  printf("singed char     :%d~%d\n", SCHAR_MIN, SCHAR_MAX);
  printf("unsigned char   :%d~%d\n", 0, UCHAR_MAX);
  printf("short           :%d~%d\n", SHRT_MIN, SHRT_MAX);
  printf("int             :%d~%d\n", INT_MIN, INT_MAX);
  printf("long            :%ld~%ld\n", LONG_MIN, LONG_MAX);
  printf("unsigned short  :%u~%u\n", 0, USHRT_MAX);
  printf("unsigned        :%u~%u\n", 0, UINT_MAX);
  printf("unsigned long   :%u~%lu\n", 0, ULONG_MAX);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e96(%rip),%rax
mov    (%rax),%esi
mov    0x2e95(%rip),%rax
mov    (%rax),%edx
lea    0xedd(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%esi
mov    0x2e2f(%rip),%rax
mov    (%rax),%edx
lea    0xed7(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e72(%rip),%rax
mov    (%rax),%edx
lea    0xeda(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%esi
mov    0x2de2(%rip),%rax
mov    (%rax),%edx
lea    0xed2(%rip),%rdi
call   1040 <printf@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%esi
mov    0x2e0c(%rip),%rax
mov    (%rax),%edx
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
mov    0x2de7(%rip),%rax
mov    (%rax),%esi
mov    0x2db6(%rip),%rax
mov    (%rax),%edx
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
mov    0x2de1(%rip),%rax
mov    (%rax),%edx
lea    0xecb(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    0x2dba(%rip),%rax
mov    (%rax),%edx
lea    0xecc(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    0x2d53(%rip),%rax
mov    (%rax),%edx
lea    0xecd(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%esi
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
lea    0xeeb(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e4e(%rip),%rax
mov    (%rax),%esi
mov    0x2e3d(%rip),%rax
mov    (%rax),%edx
lea    0xee5(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edx
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    0x2e01(%rip),%rax
mov    (%rax),%esi
mov    0x2df0(%rip),%rax
mov    (%rax),%edx
lea    0xee0(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e0b(%rip),%rax
mov    (%rax),%esi
mov    0x2e1a(%rip),%rax
mov    (%rax),%edx
lea    0xeda(%rip),%rdi
call   1040 <printf@plt>
mov    0x2df5(%rip),%rax
mov    (%rax),%esi
mov    0x2dc4(%rip),%rax
mov    (%rax),%edx
lea    0xed4(%rip),%rdi
call   1040 <printf@plt>
mov    0x2def(%rip),%rax
mov    (%rax),%edx
lea    0xed9(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    0x2dc8(%rip),%rax
mov    (%rax),%edx
lea    0xeda(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    0x2d61(%rip),%rax
mov    (%rax),%edx
lea    0xedb(%rip),%rdi
xor    %esi,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"\E8\AF\A5\E7\8E\AF\E5\A2\83\E4\B8\8B\E5\90\84\E5\AD\97\E7\AC\A6\E5\9E\8B\E3\80\81\E6\95\B4\E5\9E\8B\E6\95\B0\E5\80\BC\E7\9A\84\E8\8C\83\E5\9B\B4\00"
@.str.1 = [24 x i8] c"char :%d~%d\0A\00"
@CHAR_MIN = global i32 0
@CHAR_MAX = global i32 0
@.str.2 = [24 x i8] c"singed char :%d~%d\0A\00"
@SCHAR_MIN = global i32 0
@SCHAR_MAX = global i32 0
@.str.3 = [24 x i8] c"unsigned char :%d~%d\0A\00"
@UCHAR_MAX = global i32 0
@.str.4 = [24 x i8] c"short :%d~%d\0A\00"
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@.str.5 = [24 x i8] c"int :%d~%d\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.6 = [26 x i8] c"long :%ld~%ld\0A\00"
@LONG_MIN = global i32 0
@LONG_MAX = global i32 0
@.str.7 = [24 x i8] c"unsigned short :%u~%u\0A\00"
@USHRT_MAX = global i32 0
@.str.8 = [24 x i8] c"unsigned :%u~%u\0A\00"
@UINT_MAX = global i32 0
@.str.9 = [25 x i8] c"unsigned long :%u~%lu\0A\00"
@ULONG_MAX = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @CHAR_MIN
%4 = load i32, i32* @CHAR_MAX
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %4)
%6 = load i32, i32* @SCHAR_MIN
%7 = load i32, i32* @SCHAR_MAX
%8 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %7)
%9 = load i32, i32* @UCHAR_MAX
%10 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 %9)
%11 = load i32, i32* @SHRT_MIN
%12 = load i32, i32* @SHRT_MAX
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %12)
%14 = load i32, i32* @INT_MIN
%15 = load i32, i32* @INT_MAX
%16 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %14, i32 %15)
%17 = load i32, i32* @LONG_MIN
%18 = load i32, i32* @LONG_MAX
%19 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i32 %17, i32 %18)
%20 = load i32, i32* @USHRT_MAX
%21 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 %20)
%22 = load i32, i32* @UINT_MAX
%23 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i32 0, i32 %22)
%24 = load i32, i32* @ULONG_MAX
%25 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 0, i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"\E8\AF\A5\E7\8E\AF\E5\A2\83\E4\B8\8B\E5\90\84\E5\AD\97\E7\AC\A6\E5\9E\8B\E3\80\81\E6\95\B4\E5\9E\8B\E6\95\B0\E5\80\BC\E7\9A\84\E8\8C\83\E5\9B\B4\00"
@.str.1 = [24 x i8] c"char :%d~%d\0A\00"
@CHAR_MIN = global i32 0
@CHAR_MAX = global i32 0
@.str.2 = [24 x i8] c"singed char :%d~%d\0A\00"
@SCHAR_MIN = global i32 0
@SCHAR_MAX = global i32 0
@.str.3 = [24 x i8] c"unsigned char :%d~%d\0A\00"
@UCHAR_MAX = global i32 0
@.str.4 = [24 x i8] c"short :%d~%d\0A\00"
@SHRT_MIN = global i32 0
@SHRT_MAX = global i32 0
@.str.5 = [24 x i8] c"int :%d~%d\0A\00"
@INT_MIN = global i32 0
@INT_MAX = global i32 0
@.str.6 = [26 x i8] c"long :%ld~%ld\0A\00"
@LONG_MIN = global i32 0
@LONG_MAX = global i32 0
@.str.7 = [24 x i8] c"unsigned short :%u~%u\0A\00"
@USHRT_MAX = global i32 0
@.str.8 = [24 x i8] c"unsigned :%u~%u\0A\00"
@UINT_MAX = global i32 0
@.str.9 = [25 x i8] c"unsigned long :%u~%lu\0A\00"
@ULONG_MAX = global i32 0
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_MIN
%3 = load i32, i32* @CHAR_MAX
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %2, i32 %3)
%5 = load i32, i32* @SCHAR_MIN
%6 = load i32, i32* @SCHAR_MAX
%7 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @UCHAR_MAX
%9 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 %8)
%10 = load i32, i32* @SHRT_MIN
%11 = load i32, i32* @SHRT_MAX
%12 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %10, i32 %11)
%13 = load i32, i32* @INT_MIN
%14 = load i32, i32* @INT_MAX
%15 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %13, i32 %14)
%16 = load i32, i32* @LONG_MIN
%17 = load i32, i32* @LONG_MAX
%18 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.6, i64 0, i64 0), i32 %16, i32 %17)
%19 = load i32, i32* @USHRT_MAX
%20 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0), i32 0, i32 %19)
%21 = load i32, i32* @UINT_MAX
%22 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.8, i64 0, i64 0), i32 0, i32 %21)
%23 = load i32, i32* @ULONG_MAX
%24 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0), i32 0, i32 %23)
ret i32 0
}