#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 /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long *);
int main() {
  long ge, shi, qian, wan, x;
  printf("请输入５个数字:");
  scanf("%ld", &x);
  wan = x / 10000;
  qian = x % 10000 / 1000;
  shi = x % 100 / 10;
  ge = x % 10;
  if (ge == wan && shi == qian) {
    printf("这是回文数\n");
  } else {
    printf("这不是回文数\n");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x30(%rbp),%rax
mov    $0x2710,%ecx
cqto
idiv   %rcx
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
mov    $0x2710,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%rax
mov    $0x64,%ecx
cqto
idiv   %rcx
mov    %rdx,%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x30(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    11da <main+0xba>
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jne    11da <main+0xba>
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
jmp    11e6 <main+0xc6>
lea    0xe4b(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    %rsp,%rsi
call   1050 <scanf@plt>
mov    (%rsp),%rcx
movabs $0x346dc5d63886594b,%rdx
c5 6d 34
mov    %rcx,%rax
imul   %rdx
mov    %rdx,%rsi
movabs $0x6666666666666667,%rdx
66 66 66
mov    %rcx,%rax
imul   %rdx
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0xb,%rsi
add    %rax,%rsi
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
add    %rdx,%rdx
lea    (%rdx,%rdx,4),%rax
mov    %rcx,%rdx
sub    %rax,%rdx
cmp    %rsi,%rdx
jne    1213 <main+0xe3>
imul   $0x2710,%rsi,%rax
mov    %rcx,%rsi
sub    %rax,%rsi
movabs $0xa3d70a3d70a3d70b,%rdx
0a d7 a3
mov    %rcx,%rax
imul   %rdx
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x6,%edx
add    %eax,%edx
imul   $0x64,%edx,%eax
sub    %eax,%ecx
movsbl %cl,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0xa,%ecx
add    %al,%cl
movswl %si,%eax
imul   $0xffff8313,%eax,%eax
shr    $0x10,%eax
add    %esi,%eax
movzwl %ax,%eax
movswl %ax,%edx
shr    $0xf,%eax
sar    $0x9,%edx
add    %eax,%edx
movsbl %cl,%eax
cmp    %ax,%dx
jne    1213 <main+0xe3>
lea    0xe1d(%rip),%rdi
jmp    121a <main+0xea>
lea    0xe01(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\EF\BC\95\E4\B8\AA\E6\95\B0\E5\AD\97:\00"
@.str.1 = [4 x i8] c"%ld\00"
@.str.2 = [17 x i8] c"\E8\BF\99\E6\98\AF\E5\9B\9E\E6\96\87\E6\95\B0\0A\00"
@.str.3 = [20 x i8] c"\E8\BF\99\E4\B8\8D\E6\98\AF\E5\9B\9E\E6\96\87\E6\95\B0\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i32 0, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %6)
%9 = load i64, i64* %6
%10 = sdiv i64 %9, 10000
store i64 %10, i64* %5
%11 = load i64, i64* %6
%12 = srem i64 %11, 10000
%13 = sdiv i64 %12, 1000
store i64 %13, i64* %4
%14 = load i64, i64* %6
%15 = srem i64 %14, 100
%16 = sdiv i64 %15, 10
store i64 %16, i64* %3
%17 = load i64, i64* %6
%18 = srem i64 %17, 10
store i64 %18, i64* %2
%19 = load i64, i64* %2
%20 = load i64, i64* %5
%21 = icmp eq i64 %19, %20
br i1 %21, label %22, label %28
22: ; preds = %0
%23 = load i64, i64* %3
%24 = load i64, i64* %4
%25 = icmp eq i64 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
br label %30
28: ; preds = %22, %0
%29 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
%31 = load i32, i32* %1
ret i32 %31
}

LLVM IR (-O2):
@.str = [23 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\EF\BC\95\E4\B8\AA\E6\95\B0\E5\AD\97:\00"
@.str.1 = [4 x i8] c"%ld\00"
@str = [19 x i8] c"\E8\BF\99\E4\B8\8D\E6\98\AF\E5\9B\9E\E6\96\87\E6\95\B0\00"
@str.4 = [16 x i8] c"\E8\BF\99\E6\98\AF\E5\9B\9E\E6\96\87\E6\95\B0\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = sdiv i64 %5, 10000
%7 = srem i64 %5, 10000
%8 = srem i64 %5, 10
%9 = icmp eq i64 %8, %6
br i1 %9, label %10, label %18
10: ; preds = %0
%11 = srem i64 %5, 100
%12 = trunc i64 %11 to i8
%13 = sdiv i8 %12, 10
%14 = trunc i64 %7 to i16
%15 = sdiv i16 %14, 1000
%16 = sext i8 %13 to i16
%17 = icmp eq i16 %15, %16
br i1 %17, label %19, label %18
18: ; preds = %10, %0
br label %19
19: ; preds = %10, %18
%20 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0), %18 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.4, i64 0, i64 0), %10 ]
%21 = call i32 @puts(i8* dereferenceable(1) %20)
ret i32 0
}