#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 isPalindrome(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  char *s = "A man, a plan, a canal: Panama";
  bool res = isPalindrome(s);
  if (res) {
    printf("是回文字符串\n");
  } else {
    printf("不是回文字符串\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <isPalindrome@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1174 <main+0x54>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x60>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef7(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <isPalindrome@plt>
test   %eax,%eax
lea    0xeeb(%rip),%rax
lea    0xee7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@.str.1 = [31 x i8] c"A man, a plan, a canal: Panama\00"
@.str.2 = [20 x i8] c"\E6\98\AF\E5\9B\9E\E6\96\87\E5\AD\97\E7\AC\A6\E4\B8\B2\0A\00"
@.str.3 = [23 x i8] c"\E4\B8\8D\E6\98\AF\E5\9B\9E\E6\96\87\E5\AD\97\E7\AC\A6\E4\B8\B2\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0), i8** %6
%9 = load i8*, i8** %6
%10 = call i32 @isPalindrome(i8* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %17
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
br label %17
17: ; preds = %15, %13
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [31 x i8] c"A man, a plan, a canal: Panama\00"
@str = [14 x i8] c"Hello, World!\00"
@str.4 = [22 x i8] c"\E4\B8\8D\E6\98\AF\E5\9B\9E\E6\96\87\E5\AD\97\E7\AC\A6\E4\B8\B2\00"
@str.5 = [19 x i8] c"\E6\98\AF\E5\9B\9E\E6\96\87\E5\AD\97\E7\AC\A6\E4\B8\B2\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @isPalindrome(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @str.5, i64 0, i64 0)
%7 = tail call i32 @puts(i8* dereferenceable(1) %6)
ret i32 0
}