#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 *, int *);
int main(int argc, const char *argv[]) {
  int a;
  printf("输入一个三位数：");
  scanf("%d", &a);
  int bai = a / 100;
  int shi = a % 100 / 10;
  int ge = a % 100 % 10;
  printf("倒序的三位数是：%d", ge * 100 + shi * 10 + bai);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
imul   $0x64,-0x20(%rbp),%esi
imul   $0xa,-0x1c(%rbp),%eax
add    %eax,%esi
add    -0x18(%rbp),%esi
lea    0xe7a(%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    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x51eb851f,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%ecx
sub    %ecx,%esi
movsbl %sil,%ecx
imul   $0x67,%ecx,%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xa,%edx
add    %cl,%dl
movzbl %dl,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
mov    %esi,%edx
sub    %cl,%dl
movsbl %dl,%ecx
imul   $0x64,%ecx,%edx
add    %eax,%esi
sub    %ecx,%esi
add    %edx,%esi
lea    0xe87(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E4\B8\89\E4\BD\8D\E6\95\B0\EF\BC\9A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"\E5\80\92\E5\BA\8F\E7\9A\84\E4\B8\89\E4\BD\8D\E6\95\B0\E6\98\AF\EF\BC\9A%d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %5)
%11 = load i32, i32* %5
%12 = sdiv i32 %11, 100
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = srem i32 %13, 100
%15 = sdiv i32 %14, 10
store i32 %15, i32* %7
%16 = load i32, i32* %5
%17 = srem i32 %16, 100
%18 = srem i32 %17, 10
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = mul nsw i32 %19, 100
%21 = load i32, i32* %7
%22 = mul nsw i32 %21, 10
%23 = add nsw i32 %20, %22
%24 = load i32, i32* %6
%25 = add nsw i32 %23, %24
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"\E8\BE\93\E5\85\A5\E4\B8\80\E4\B8\AA\E4\B8\89\E4\BD\8D\E6\95\B0\EF\BC\9A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [27 x i8] c"\E5\80\92\E5\BA\8F\E7\9A\84\E4\B8\89\E4\BD\8D\E6\95\B0\E6\98\AF\EF\BC\9A%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = sdiv i32 %7, 100
%9 = srem i32 %7, 100
%10 = trunc i32 %9 to i8
%11 = srem i8 %10, 10
%12 = sext i8 %11 to i32
%13 = mul nsw i32 %12, 100
%14 = add nsw i32 %8, %9
%15 = sub nsw i32 %14, %12
%16 = add nsw i32 %15, %13
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32 %16)
ret i32 0
}