#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(void) {
  int a, b, c, trans, ori;
  scanf("%d", &ori);
  c = ori / 100, b = ori % 100 / 10, a = ori % 10;
  trans = a * 100 + b * 10 + c;
  if (a != 0)
    printf("After changing,the new number is %d", trans);
  else
    printf("The number can't be changed.");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeeb(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x18(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
imul   $0x64,-0x8(%rbp),%eax
imul   $0xa,-0xc(%rbp),%ecx
add    %ecx,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     11a3 <main+0x83>
mov    -0x14(%rbp),%esi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b1 <main+0x91>
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    0xef9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x66666667,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    %esi,%ecx
sub    %eax,%ecx
je     11ad <main+0x8d>
imul   $0x51eb851f,%rsi,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0x64,%eax,%edx
sub    %edx,%esi
imul   $0x64,%ecx,%ecx
movsbl %sil,%edx
imul   $0x67,%edx,%edx
movzwl %dx,%edx
movswl %dx,%edi
shr    $0xf,%edx
shr    $0xa,%edi
add    %dl,%dil
movzbl %dil,%edx
add    %edx,%edx
lea    (%rdx,%rdx,4),%edx
sub    %sil,%dl
movsbl %dl,%edx
add    %eax,%esi
add    %ecx,%esi
add    %edx,%esi
lea    0xe5c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11bb <main+0x9b>
lea    0xe70(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [36 x i8] c"After changing,the new number is %d\00"
@.str.2 = [29 x i8] c"The number can't be changed.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
%8 = load i32, i32* %6
%9 = sdiv i32 %8, 100
store i32 %9, i32* %4
%10 = load i32, i32* %6
%11 = srem i32 %10, 100
%12 = sdiv i32 %11, 10
store i32 %12, i32* %3
%13 = load i32, i32* %6
%14 = srem i32 %13, 10
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = mul nsw i32 %15, 100
%17 = load i32, i32* %3
%18 = mul nsw i32 %17, 10
%19 = add nsw i32 %16, %18
%20 = load i32, i32* %4
%21 = add nsw i32 %19, %20
store i32 %21, i32* %5
%22 = load i32, i32* %2
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %0
%25 = load i32, i32* %5
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %25)
br label %29
27: ; preds = %0
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %24
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [36 x i8] c"After changing,the new number is %d\00"
@.str.2 = [29 x i8] c"The number can't be changed.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = srem i32 %4, 100
%6 = sdiv i32 %4, 100
%7 = srem i32 %4, 10
%8 = icmp eq i32 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %0
%10 = mul nsw i32 %7, 100
%11 = trunc i32 %5 to i8
%12 = srem i8 %11, 10
%13 = sub nsw i8 0, %12
%14 = sext i8 %13 to i32
%15 = add nsw i32 %6, %5
%16 = add nsw i32 %15, %10
%17 = add nsw i32 %16, %14
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %17)
br label %21
19: ; preds = %0
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
br label %21
21: ; preds = %19, %9
ret i32 0
}