int main() {
  double fullCash;
  int billCash, coinCash;
  int bills[6] = {100, 50, 20, 10, 5, 2};
  int coins[6] = {100, 50, 25, 10, 5, 1};
  char coinsStrs[6][5] = {"1.00", "0.50", "0.25", "0.10", "0.05", "0.01"};
  scanf("%lf", &fullCash);
  billCash = (int)fullCash;
  coinCash = (fullCash - billCash) * 100;
  int i;
  printf("NOTAS:\n");
  int billsQtt;
  for (i = 0; i < 6; i++) {
    billsQtt = billCash / bills[i];
    billCash = billCash % bills[i];
    printf("%d nota(s) de R$ %d.00\n", billsQtt, bills[i]);
  }
  if (billCash) {
    coinCash += 100;
  }
  printf("MOEDAS:\n");
  int coinsQtt;
  for (i = 0; i < 6; i++) {
    coinsQtt = coinCash / coins[i];
    coinCash = coinCash % coins[i];
    printf("%d moeda(s) de R$ %s\n", coinsQtt, coinsStrs[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xed2(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xecf(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xecd(%rip),%eax
mov    %eax,-0x58(%rbp)
mov    0xec7(%rip),%ax
mov    %ax,-0x54(%rbp)
lea    0xebe(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe27(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0x6,-0x74(%rbp)
jge    1248 <main+0x128>
mov    -0x14(%rbp),%eax
movslq -0x74(%rbp),%rcx
cltd
idivl  -0x30(%rbp,%rcx,4)
mov    %eax,-0x78(%rbp)
mov    -0x14(%rbp),%eax
movslq -0x74(%rbp),%rcx
cltd
idivl  -0x30(%rbp,%rcx,4)
mov    %edx,-0x14(%rbp)
mov    -0x78(%rbp),%esi
movslq -0x74(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xe47(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    11f9 <main+0xd9>
cmpl   $0x0,-0x14(%rbp)
je     125b <main+0x13b>
mov    -0x18(%rbp),%eax
add    $0x64,%eax
mov    %eax,-0x18(%rbp)
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0x6,-0x74(%rbp)
jge    12c6 <main+0x1a6>
mov    -0x18(%rbp),%eax
movslq -0x74(%rbp),%rcx
cltd
idivl  -0x50(%rbp,%rcx,4)
mov    %eax,-0x7c(%rbp)
mov    -0x18(%rbp),%eax
movslq -0x74(%rbp),%rcx
cltd
idivl  -0x50(%rbp,%rcx,4)
mov    %edx,-0x18(%rbp)
mov    -0x7c(%rbp),%esi
movslq -0x74(%rbp),%rax
lea    -0x70(%rbp),%rdx
imul   $0x5,%rax,%rax
add    %rax,%rdx
lea    0xdea(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1270 <main+0x150>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x48,%rsp
movups 0xee1(%rip),%xmm0
movups %xmm0,0xe(%rsp)
movaps 0xec7(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xeda(%rip),%rdi
lea    0x28(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsd  0x28(%rsp),%xmm1
cvttsd2si %xmm1,%ebx
cvttpd2dq %xmm1,%xmm0
cvtdq2pd %xmm0,%xmm0
subsd  %xmm0,%xmm1
mulsd  0xe82(%rip),%xmm1
movapd %xmm1,0x30(%rsp)
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
movslq %ebx,%rbp
imul   $0x51eb851f,%rbp,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x25,%rsi
add    %eax,%esi
imul   $0x64,%esi,%eax
sub    %eax,%ebp
lea    0xe7f(%rip),%rbx
mov    %rbx,%rdi
mov    $0x64,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%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
movzbl %sil,%eax
imul   $0x32,%eax,%eax
sub    %al,%bpl
mov    %rbx,%rdi
mov    $0x32,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%ebp
imul   $0x67,%ebp,%eax
movzwl %ax,%ecx
shr    $0xb,%eax
shr    $0xf,%ecx
add    %al,%cl
movsbl %cl,%esi
movzbl %sil,%eax
shl    $0x2,%eax
lea    (%rax,%rax,4),%eax
sub    %al,%bpl
mov    %rbx,%rdi
mov    $0x14,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%ebp
imul   $0x67,%ebp,%eax
movzwl %ax,%ecx
shr    $0xa,%eax
shr    $0xf,%ecx
add    %al,%cl
movsbl %cl,%esi
movzbl %sil,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %al,%bpl
mov    %rbx,%rdi
mov    $0xa,%edx
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%ebp
imul   $0x67,%ebp,%eax
movzwl %ax,%ecx
shr    $0x9,%eax
shr    $0xf,%ecx
add    %al,%cl
movsbl %cl,%esi
movzbl %sil,%eax
lea    (%rax,%rax,4),%eax
sub    %al,%bpl
mov    %rbx,%rdi
mov    $0x5,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,%eax
shr    $0x7,%al
add    %bpl,%al
sar    %al
movsbl %al,%esi
mov    %rbx,%rdi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
cvttsd2si 0x30(%rsp),%eax
lea    0x64(%rax),%ebx
test   $0x1,%bpl
cmove  %eax,%ebx
lea    0xdaf(%rip),%rdi
call   1030 <puts@plt>
movslq %ebx,%rbp
imul   $0x51eb851f,%rbp,%rsi
mov    %rsi,%rax
shr    $0x3f,%rax
sar    $0x25,%rsi
add    %eax,%esi
imul   $0x64,%esi,%eax
sub    %eax,%ebp
lea    0xd6a(%rip),%rbx
mov    %rsp,%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%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
movzbl %sil,%eax
imul   $0x32,%eax,%eax
sub    %al,%bpl
lea    0x5(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%ebp
lea    0x0(%rbp,%rbp,4),%eax
lea    0x0(%rbp,%rax,8),%eax
movzwl %ax,%ecx
shr    $0xa,%eax
shr    $0xf,%ecx
add    %al,%cl
movsbl %cl,%esi
movzbl %sil,%eax
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,4),%eax
sub    %al,%bpl
lea    0xa(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%ebp
imul   $0x67,%ebp,%eax
movzwl %ax,%ecx
shr    $0xa,%eax
shr    $0xf,%ecx
add    %al,%cl
movsbl %cl,%esi
movzbl %sil,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %al,%bpl
lea    0xf(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movsbl %bpl,%eax
imul   $0x67,%eax,%ecx
movzwl %cx,%edx
shr    $0x9,%ecx
shr    $0xf,%edx
add    %cl,%dl
movsbl %dl,%esi
movzbl %sil,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %cl,%al
movsbl %al,%ebp
lea    0x14(%rsp),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x19(%rsp),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.bills = [6 x i32] [i32 100, i32 50, i32 20, i32 10, i32 5, i32 2]
@__const.main.coins = [6 x i32] [i32 100, i32 50, i32 25, i32 10, i32 5, i32 1]
@__const.main.coinsStrs = [6 x [5 x i8]] [[5 x i8] c"1.00\00", [5 x i8] c"0.50\00", [5 x i8] c"0.25\00", [5 x i8] c"0.10\00", [5 x i8] c"0.05\00", [5 x i8] c"0.01\00"]
@.str = [4 x i8] c"%lf\00"
@.str.1 = [8 x i8] c"NOTAS:\0A\00"
@.str.2 = [24 x i8] c"%d nota(s) de R$ %d.00\0A\00"
@.str.3 = [9 x i8] c"MOEDAS:\0A\00"
@.str.4 = [22 x i8] c"%d moeda(s) de R$ %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
%5 = alloca [6 x i32]
%6 = alloca [6 x i32]
%7 = alloca [6 x [5 x i8]]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %1
%11 = bitcast [6 x i32]* %5 to i8*
%12 = bitcast [6 x i32]* %6 to i8*
%13 = bitcast [6 x [5 x i8]]* %7 to i8*
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%15 = load double, double* %2
%16 = fptosi double %15 to i32
store i32 %16, i32* %3
%17 = load double, double* %2
%18 = load i32, i32* %3
%19 = sitofp i32 %18 to double
%20 = fsub double %17, %19
%21 = fmul double %20, 1.000000e+02
%22 = fptosi double %21 to i32
store i32 %22, i32* %4
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %8
br label %24
24: ; preds = %46, %0
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 6
br i1 %26, label %27, label %49
27: ; preds = %24
%28 = load i32, i32* %3
%29 = load i32, i32* %8
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = sdiv i32 %28, %32
store i32 %33, i32* %9
%34 = load i32, i32* %3
%35 = load i32, i32* %8
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = srem i32 %34, %38
store i32 %39, i32* %3
%40 = load i32, i32* %9
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [6 x i32], [6 x i32]* %5, i64 0, i64 %42
%44 = load i32, i32* %43
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %40, i32 %44)
br label %46
46: ; preds = %27
%47 = load i32, i32* %8
%48 = add nsw i32 %47, 1
store i32 %48, i32* %8
br label %24
49: ; preds = %24
%50 = load i32, i32* %3
%51 = icmp ne i32 %50, 0
br i1 %51, label %52, label %55
52: ; preds = %49
%53 = load i32, i32* %4
%54 = add nsw i32 %53, 100
store i32 %54, i32* %4
br label %55
55: ; preds = %52, %49
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %8
br label %57
57: ; preds = %79, %55
%58 = load i32, i32* %8
%59 = icmp slt i32 %58, 6
br i1 %59, label %60, label %82
60: ; preds = %57
%61 = load i32, i32* %4
%62 = load i32, i32* %8
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 %63
%65 = load i32, i32* %64
%66 = sdiv i32 %61, %65
store i32 %66, i32* %10
%67 = load i32, i32* %4
%68 = load i32, i32* %8
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 %69
%71 = load i32, i32* %70
%72 = srem i32 %67, %71
store i32 %72, i32* %4
%73 = load i32, i32* %10
%74 = load i32, i32* %8
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %7, i64 0, i64 %75
%77 = getelementptr inbounds [5 x i8], [5 x i8]* %76, i64 0, i64 0
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %73, i8* %77)
br label %79
79: ; preds = %60
%80 = load i32, i32* %8
%81 = add nsw i32 %80, 1
store i32 %81, i32* %8
br label %57
82: ; preds = %57
ret i32 0
}

LLVM IR (-O2):
@__const.main.coinsStrs = [6 x [5 x i8]] [[5 x i8] c"1.00\00", [5 x i8] c"0.50\00", [5 x i8] c"0.25\00", [5 x i8] c"0.10\00", [5 x i8] c"0.05\00", [5 x i8] c"0.01\00"]
@.str = [4 x i8] c"%lf\00"
@.str.2 = [24 x i8] c"%d nota(s) de R$ %d.00\0A\00"
@.str.4 = [22 x i8] c"%d moeda(s) de R$ %s\0A\00"
@str = [7 x i8] c"NOTAS:\00"
@str.5 = [8 x i8] c"MOEDAS:\00"
define i32 @main() {
%1 = alloca double
%2 = alloca [6 x [5 x i8]]
%3 = bitcast double* %1 to i8*
%4 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %2, i64 0, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%6 = load double, double* %1
%7 = fptosi double %6 to i32
%8 = sitofp i32 %7 to double
%9 = fsub double %6, %8
%10 = fmul double %9, 1.000000e+02
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%12 = sdiv i32 %7, 100
%13 = srem i32 %7, 100
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %12, i32 100)
%15 = trunc i32 %13 to i8
%16 = sdiv i8 %15, 50
%17 = sext i8 %16 to i32
%18 = trunc i32 %13 to i8
%19 = srem i8 %18, 50
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %17, i32 50)
%21 = sdiv i8 %19, 20
%22 = sext i8 %21 to i32
%23 = srem i8 %19, 20
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %22, i32 20)
%25 = sdiv i8 %23, 10
%26 = sext i8 %25 to i32
%27 = srem i8 %23, 10
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %26, i32 10)
%29 = sdiv i8 %27, 5
%30 = sext i8 %29 to i32
%31 = srem i8 %27, 5
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 5)
%33 = sdiv i8 %31, 2
%34 = sext i8 %33 to i32
%35 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %34, i32 2)
%36 = fptosi double %10 to i32
%37 = and i8 %31, 1
%38 = icmp eq i8 %37, 0
%39 = add nsw i32 %36, 100
%40 = select i1 %38, i32 %36, i32 %39
%41 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0))
%42 = sdiv i32 %40, 100
%43 = srem i32 %40, 100
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %42, i8* %4)
%45 = trunc i32 %43 to i8
%46 = sdiv i8 %45, 50
%47 = sext i8 %46 to i32
%48 = trunc i32 %43 to i8
%49 = srem i8 %48, 50
%50 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %2, i64 0, i64 1, i64 0
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %47, i8* %50)
%52 = sdiv i8 %49, 25
%53 = sext i8 %52 to i32
%54 = srem i8 %49, 25
%55 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %2, i64 0, i64 2, i64 0
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %53, i8* %55)
%57 = sdiv i8 %54, 10
%58 = sext i8 %57 to i32
%59 = srem i8 %54, 10
%60 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %2, i64 0, i64 3, i64 0
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %58, i8* %60)
%62 = sdiv i8 %59, 5
%63 = sext i8 %62 to i32
%64 = srem i8 %59, 5
%65 = sext i8 %64 to i32
%66 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %2, i64 0, i64 4, i64 0
%67 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %63, i8* %66)
%68 = getelementptr inbounds [6 x [5 x i8]], [6 x [5 x i8]]* %2, i64 0, i64 5, i64 0
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i64 0, i64 0), i32 %65, i8* %68)
ret i32 0
}