#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int N, money, hundred, fifty, twenty, ten, five, two, one;
  scanf("%d", &N);
  hundred = N / 100;
  money = N % 100;
  fifty = money / 50;
  money = money % 50;
  twenty = money / 20;
  money = money % 20;
  ten = money / 10;
  money = money % 10;
  five = money / 5;
  money = money % 5;
  two = money / 2;
  money = money % 2;
  one = money / 1;
  money = money % 1;
  printf("%d\n", N);
  printf("%d nota(s) de R$ 100,00\n", hundred);
  printf("%d nota(s) de R$ 50,00\n", fifty);
  printf("%d nota(s) de R$ 20,00\n", twenty);
  printf("%d nota(s) de R$ 10,00\n", ten);
  printf("%d nota(s) de R$ 5,00\n", five);
  printf("%d nota(s) de R$ 2,00\n", two);
  printf("%d nota(s) de R$ 1,00\n", one);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdf6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xdeb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xdfe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xe07(%rip),%rdi
call   1030 <printf@plt>
mov    -0x20(%rbp),%esi
lea    0xe10(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
lea    0xe18(%rip),%rdi
call   1030 <printf@plt>
mov    -0x28(%rbp),%esi
lea    0xe20(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x51eb851f,%rsi,%rbx
mov    %rbx,%rax
shr    $0x3f,%rax
sar    $0x25,%rbx
add    %eax,%ebx
imul   $0x64,%ebx,%ecx
mov    %esi,%eax
sub    %ecx,%eax
movsbl %al,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,8),%ecx
movzwl %cx,%ecx
movswl %cx,%edx
shr    $0xf,%ecx
shr    $0xb,%edx
add    %cl,%dl
movsbl %dl,%ecx
mov    %ecx,(%rsp)
movzbl %cl,%ecx
imul   $0x32,%ecx,%ecx
sub    %cl,%al
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0xb,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%r15d
movzbl %r15b,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0xa,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%r12d
movzbl %r12b,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0x9,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%ebp
movzbl %bpl,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
mov    %eax,%ecx
shr    $0x7,%cl
add    %al,%cl
mov    %ecx,%edx
sar    %dl
movsbl %dl,%r14d
and    $0xfe,%cl
sub    %cl,%al
movsbl %al,%r13d
lea    0xe05(%rip),%rdi
call   1030 <printf@plt>
lea    0xdfd(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xe08(%rip),%rdi
mov    (%rsp),%esi
call   1030 <printf@plt>
lea    0xe11(%rip),%rdi
mov    %r15d,%esi
call   1030 <printf@plt>
lea    0xe1a(%rip),%rdi
mov    %r12d,%esi
call   1030 <printf@plt>
lea    0xe23(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe2c(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
lea    0xe34(%rip),%rdi
mov    %r13d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [25 x i8] c"%d nota(s) de R$ 100,00\0A\00"
@.str.3 = [24 x i8] c"%d nota(s) de R$ 50,00\0A\00"
@.str.4 = [24 x i8] c"%d nota(s) de R$ 20,00\0A\00"
@.str.5 = [24 x i8] c"%d nota(s) de R$ 10,00\0A\00"
@.str.6 = [23 x i8] c"%d nota(s) de R$ 5,00\0A\00"
@.str.7 = [23 x i8] c"%d nota(s) de R$ 2,00\0A\00"
@.str.8 = [23 x i8] c"%d nota(s) de R$ 1,00\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%12 = load i32, i32* %2
%13 = sdiv i32 %12, 100
store i32 %13, i32* %4
%14 = load i32, i32* %2
%15 = srem i32 %14, 100
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = sdiv i32 %16, 50
store i32 %17, i32* %5
%18 = load i32, i32* %3
%19 = srem i32 %18, 50
store i32 %19, i32* %3
%20 = load i32, i32* %3
%21 = sdiv i32 %20, 20
store i32 %21, i32* %6
%22 = load i32, i32* %3
%23 = srem i32 %22, 20
store i32 %23, i32* %3
%24 = load i32, i32* %3
%25 = sdiv i32 %24, 10
store i32 %25, i32* %7
%26 = load i32, i32* %3
%27 = srem i32 %26, 10
store i32 %27, i32* %3
%28 = load i32, i32* %3
%29 = sdiv i32 %28, 5
store i32 %29, i32* %8
%30 = load i32, i32* %3
%31 = srem i32 %30, 5
store i32 %31, i32* %3
%32 = load i32, i32* %3
%33 = sdiv i32 %32, 2
store i32 %33, i32* %9
%34 = load i32, i32* %3
%35 = srem i32 %34, 2
store i32 %35, i32* %3
%36 = load i32, i32* %3
%37 = sdiv i32 %36, 1
store i32 %37, i32* %10
%38 = load i32, i32* %3
%39 = srem i32 %38, 1
store i32 %39, i32* %3
%40 = load i32, i32* %2
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %4
%43 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %42)
%44 = load i32, i32* %5
%45 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %44)
%46 = load i32, i32* %6
%47 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %46)
%48 = load i32, i32* %7
%49 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %8
%51 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %50)
%52 = load i32, i32* %9
%53 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %52)
%54 = load i32, i32* %10
%55 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %54)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [25 x i8] c"%d nota(s) de R$ 100,00\0A\00"
@.str.3 = [24 x i8] c"%d nota(s) de R$ 50,00\0A\00"
@.str.4 = [24 x i8] c"%d nota(s) de R$ 20,00\0A\00"
@.str.5 = [24 x i8] c"%d nota(s) de R$ 10,00\0A\00"
@.str.6 = [23 x i8] c"%d nota(s) de R$ 5,00\0A\00"
@.str.7 = [23 x i8] c"%d nota(s) de R$ 2,00\0A\00"
@.str.8 = [23 x i8] c"%d nota(s) de R$ 1,00\0A\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 = sdiv i32 %4, 100
%6 = srem i32 %4, 100
%7 = trunc i32 %6 to i8
%8 = sdiv i8 %7, 50
%9 = sext i8 %8 to i32
%10 = srem i8 %7, 50
%11 = sdiv i8 %10, 20
%12 = sext i8 %11 to i32
%13 = srem i8 %10, 20
%14 = sdiv i8 %13, 10
%15 = sext i8 %14 to i32
%16 = srem i8 %13, 10
%17 = sdiv i8 %16, 5
%18 = sext i8 %17 to i32
%19 = srem i8 %16, 5
%20 = sdiv i8 %19, 2
%21 = sext i8 %20 to i32
%22 = srem i8 %19, 2
%23 = sext i8 %22 to i32
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%25 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %5)
%26 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %9)
%27 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %12)
%28 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %15)
%29 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %18)
%30 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %21)
%31 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %23)
ret i32 0
}