#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 valorTotal, cem, cinquenta, dez, um;
  scanf("%i", &valorTotal);
  cem = valorTotal / 100;
  int quociente1 = valorTotal % 100;
  cinquenta = quociente1 / 50;
  int quociente2 = quociente1 % 50;
  dez = quociente2 / 10;
  um = quociente2 % 10;
  printf("NOTAS DE 100 = %i\n", cem);
  printf("NOTAS DE 50 = %i\n", cinquenta);
  printf("NOTAS DE 10 = %i\n", dez);
  printf("NOTAS DE 1 = %i\n", um);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    %edx,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x20(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe6d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe70(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
imul   $0x51eb851f,%rax,%rsi
mov    %rsi,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rsi
add    %ecx,%esi
imul   $0x64,%esi,%ecx
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,%ebx
movzbl %bl,%ecx
imul   $0x32,%ecx,%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,%ebp
movzbl %bpl,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%r14d
lea    0xe60(%rip),%rdi
call   1030 <printf@plt>
lea    0xe67(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xe6b(%rip),%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
lea    0xe6f(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
@.str.1 = [19 x i8] c"NOTAS DE 100 = %i\0A\00"
@.str.2 = [18 x i8] c"NOTAS DE 50 = %i\0A\00"
@.str.3 = [18 x i8] c"NOTAS DE 10 = %i\0A\00"
@.str.4 = [17 x i8] c"NOTAS DE 1 = %i\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
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 100
store i32 %11, i32* %3
%12 = load i32, i32* %2
%13 = srem i32 %12, 100
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = sdiv i32 %14, 50
store i32 %15, i32* %4
%16 = load i32, i32* %7
%17 = srem i32 %16, 50
store i32 %17, i32* %8
%18 = load i32, i32* %8
%19 = sdiv i32 %18, 10
store i32 %19, i32* %5
%20 = load i32, i32* %8
%21 = srem i32 %20, 10
store i32 %21, i32* %6
%22 = load i32, i32* %3
%23 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %22)
%24 = load i32, i32* %4
%25 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = load i32, i32* %5
%27 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %6
%29 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %28)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [19 x i8] c"NOTAS DE 100 = %i\0A\00"
@.str.2 = [18 x i8] c"NOTAS DE 50 = %i\0A\00"
@.str.3 = [18 x i8] c"NOTAS DE 10 = %i\0A\00"
@.str.4 = [17 x i8] c"NOTAS DE 1 = %i\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, 10
%12 = sext i8 %11 to i32
%13 = srem i8 %10, 10
%14 = sext i8 %13 to i32
%15 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%16 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %9)
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), i32 %12)
%18 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0), i32 %14)
ret i32 0
}