#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 money, num;
  printf("请输入小明的金额：\n");
  scanf("%d", &money);
  int num_100, num_25, num_5;
  num_100 = money / 100;
  num_25 = (money - num_100 * 100) / 25;
  num_5 = (money - num_100 * 100 - num_25 * 25) / 5;
  num = num_100 * 25 + num_25 * 6 + num_5;
  printf("%d\n", num);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x64,-0xc(%rbp),%ecx
sub    %ecx,%eax
mov    $0x19,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x64,-0xc(%rbp),%ecx
sub    %ecx,%eax
imul   $0x19,-0x10(%rbp),%ecx
sub    %ecx,%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
imul   $0x19,-0xc(%rbp),%eax
imul   $0x6,-0x10(%rbp),%ecx
add    %ecx,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe84(%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    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movslq 0x4(%rsp),%rcx
imul   $0x51eb851f,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0xffffff9c,%eax,%edx
add    %ecx,%edx
movslq %edx,%rcx
imul   $0x51eb851f,%rcx,%rdx
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0x23,%rdx
add    %esi,%edx
imul   $0xffffffe7,%edx,%esi
add    %esi,%ecx
movslq %ecx,%rcx
imul   $0x66666667,%rcx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x21,%rcx
add    %esi,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,4),%eax
lea    (%rdx,%rdx,2),%edx
lea    (%rax,%rdx,2),%esi
add    %ecx,%esi
lea    0xe4f(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@str = [28 x i8] c"\E8\AF\B7\E8\BE\93\E5\85\A5\E5\B0\8F\E6\98\8E\E7\9A\84\E9\87\91\E9\A2\9D\EF\BC\9A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sdiv i32 %5, 100
%7 = mul nsw i32 %6, -100
%8 = add i32 %7, %5
%9 = sdiv i32 %8, 25
%10 = mul nsw i32 %9, -25
%11 = add i32 %10, %8
%12 = sdiv i32 %11, 5
%13 = mul nsw i32 %6, 25
%14 = mul nsw i32 %9, 6
%15 = add nsw i32 %14, %13
%16 = add nsw i32 %15, %12
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %16)
ret i32 0
}