#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(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, const char *argv[]) {
  printf("Hello, World!\n");
  int num = 12321;
  bool isPalidrome = isPalindrome(num);
  if (isPalidrome) {
    printf("%d是回文字符串\n", num);
  } else {
    printf("%d不是回文字符串\n", num);
  }
  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
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x3021,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <isPalindrome@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1176 <main+0x56>
mov    -0x14(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1187 <main+0x67>
mov    -0x14(%rbp),%esi
lea    0xea5(%rip),%rdi
mov    $0x0,%al
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>
mov    $0x3021,%edi
call   1050 <isPalindrome@plt>
test   %eax,%eax
lea    0xec6(%rip),%rax
lea    0xea9(%rip),%rdi
cmove  %rax,%rdi
mov    $0x3021,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
@.str.1 = [22 x i8] c"%d\E6\98\AF\E5\9B\9E\E6\96\87\E5\AD\97\E7\AC\A6\E4\B8\B2\0A\00"
@.str.2 = [25 x i8] c"%d\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 i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 12321, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @isPalindrome(i32 %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* %6
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i32 %14)
br label %19
16: ; preds = %2
%17 = load i32, i32* %6
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %17)
br label %19
19: ; preds = %16, %13
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"%d\E6\98\AF\E5\9B\9E\E6\96\87\E5\AD\97\E7\AC\A6\E4\B8\B2\0A\00"
@.str.2 = [25 x i8] c"%d\E4\B8\8D\E6\98\AF\E5\9B\9E\E6\96\87\E5\AD\97\E7\AC\A6\E4\B8\B2\0A\00"
@str = [14 x i8] c"Hello, World!\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(i32 12321)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %6, i32 12321)
ret i32 0
}