#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;
  scanf("%d", &n);
  printf("%d\n", n);
  printf("%d nota(s) de R$ 100,00\n", (n / 100));
  n %= 100;
  printf("%d nota(s) de R$ 50,00\n", (n / 50));
  n %= 50;
  printf("%d nota(s) de R$ 20,00\n", (n / 20));
  n %= 20;
  printf("%d nota(s) de R$ 10,00\n", (n / 10));
  n %= 10;
  printf("%d nota(s) de R$ 5,00\n", (n / 5));
  n %= 5;
  printf("%d nota(s) de R$ 2,00\n", (n / 2));
  n %= 2;
  printf("%d nota(s) de R$ 1,00\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe97(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe88(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe54(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x51eb851f,%rax,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x25,%rsi
add    %eax,%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rcx
add    %edx,%ecx
imul   $0x64,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
movsbl %al,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rcx,8),%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0xb,%ecx
add    %al,%cl
movsbl %cl,%esi
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x32,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
movsbl %al,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0xb,%ecx
add    %al,%cl
movsbl %cl,%esi
lea    0xe49(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
movsbl %al,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0xa,%ecx
add    %al,%cl
movsbl %cl,%esi
lea    0xe19(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
movsbl %al,%eax
imul   $0x67,%eax,%eax
movzwl %ax,%eax
movswl %ax,%ecx
shr    $0xf,%eax
shr    $0x9,%ecx
add    %al,%cl
movsbl %cl,%esi
lea    0xdea(%rip),%rdi
call   1030 <printf@plt>
movslq 0x4(%rsp),%rax
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
mov    %eax,%ecx
shr    $0x7,%cl
add    %al,%cl
sar    %cl
movsbl %cl,%esi
lea    0xdc7(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
mov    %esi,%eax
shr    $0x1f,%eax
add    %esi,%eax
and    $0xfffffffe,%eax
sub    %eax,%esi
mov    %esi,0x4(%rsp)
lea    0xdbe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
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
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 100
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %2
%10 = srem i32 %9, 100
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = sdiv i32 %11, 50
%13 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%14 = load i32, i32* %2
%15 = srem i32 %14, 50
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = sdiv i32 %16, 20
%18 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%19 = load i32, i32* %2
%20 = srem i32 %19, 20
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = sdiv i32 %21, 10
%23 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %2
%25 = srem i32 %24, 10
store i32 %25, i32* %2
%26 = load i32, i32* %2
%27 = sdiv i32 %26, 5
%28 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %27)
%29 = load i32, i32* %2
%30 = srem i32 %29, 5
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = sdiv i32 %31, 2
%33 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %32)
%34 = load i32, i32* %2
%35 = srem i32 %34, 2
store i32 %35, i32* %2
%36 = load i32, i32* %2
%37 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %36)
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 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = sdiv i32 %6, 100
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %1
%10 = srem i32 %9, 100
store i32 %10, i32* %1
%11 = trunc i32 %10 to i8
%12 = sdiv i8 %11, 50
%13 = sext i8 %12 to i32
%14 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %1
%16 = srem i32 %15, 50
store i32 %16, i32* %1
%17 = trunc i32 %16 to i8
%18 = sdiv i8 %17, 20
%19 = sext i8 %18 to i32
%20 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %1
%22 = srem i32 %21, 20
store i32 %22, i32* %1
%23 = trunc i32 %22 to i8
%24 = sdiv i8 %23, 10
%25 = sext i8 %24 to i32
%26 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 %25)
%27 = load i32, i32* %1
%28 = srem i32 %27, 10
store i32 %28, i32* %1
%29 = trunc i32 %28 to i8
%30 = sdiv i8 %29, 5
%31 = sext i8 %30 to i32
%32 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.6, i64 0, i64 0), i32 %31)
%33 = load i32, i32* %1
%34 = srem i32 %33, 5
store i32 %34, i32* %1
%35 = trunc i32 %34 to i8
%36 = sdiv i8 %35, 2
%37 = sext i8 %36 to i32
%38 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.7, i64 0, i64 0), i32 %37)
%39 = load i32, i32* %1
%40 = srem i32 %39, 2
store i32 %40, i32* %1
%41 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i32 %40)
ret i32 0
}