#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_MIN;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
int main(void) {
  printf("这个编译器中的char型是");
  if (CHAR_MIN) {
    puts("有符号的。");
    printf("%d\n", CHAR_MIN);
  } else
    puts("无符号的。");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2ea4(%rip),%rax
cmpl   $0x0,(%rax)
je     1175 <main+0x55>
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1181 <main+0x61>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2eb2(%rip),%rbx
cmpl   $0x0,(%rbx)
je     1159 <main+0x39>
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1165 <main+0x45>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"\E8\BF\99\E4\B8\AA\E7\BC\96\E8\AF\91\E5\99\A8\E4\B8\AD\E7\9A\84char\E5\9E\8B\E6\98\AF\00"
@CHAR_MIN = global i32 0
@.str.1 = [16 x i8] c"\E6\9C\89\E7\AC\A6\E5\8F\B7\E7\9A\84\E3\80\82\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [16 x i8] c"\E6\97\A0\E7\AC\A6\E5\8F\B7\E7\9A\84\E3\80\82\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @CHAR_MIN
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @CHAR_MIN
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %7)
br label %11
9: ; preds = %0
%10 = call i32 @puts(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
ret i32 0
}

LLVM IR (-O2):
@.str = [32 x i8] c"\E8\BF\99\E4\B8\AA\E7\BC\96\E8\AF\91\E5\99\A8\E4\B8\AD\E7\9A\84char\E5\9E\8B\E6\98\AF\00"
@CHAR_MIN = global i32 0
@.str.1 = [16 x i8] c"\E6\9C\89\E7\AC\A6\E5\8F\B7\E7\9A\84\E3\80\82\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [16 x i8] c"\E6\97\A0\E7\AC\A6\E5\8F\B7\E7\9A\84\E3\80\82\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @CHAR_MIN
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %0
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @CHAR_MIN
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %6)
br label %10
8: ; preds = %0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %10
10: ; preds = %8, %4
ret i32 0
}