#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 *);
main() {
  int a, b, c, d, e, i, j;
  scanf("%d", &a);
  b = 100 - a;
  if (b < 10) {
    if (b >= 5)
      printf("$20 bills: 0\n$10 bills: 0\n $5 bills: 1\n $1 bills: %d", b - 5);
    else
      printf("$20 bills: 0\n$10 bills: 0\n $5 bills: 0\n $1 bills: %d", b);
    return 0;
  }
  if (b >= 10)
    if (b % 10 >= 5)
      printf("$20 bills: %d\n$10 bills: %d\n $5 bills: 1\n $1 bills: %d",
             b / 20, (b - b / 20 * 20) / 10, b - b / 10 * 10 - 5);
    else
      printf("$20 bills: %d\n$10 bills: %d\n $5 bills: 0\n $1 bills: %d",
             b / 20, (b - b / 20 * 20) / 10, b - b / 10 * 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf31(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    $0x64,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1194 <main+0x74>
cmpl   $0x5,-0xc(%rbp)
jl     1177 <main+0x57>
mov    -0xc(%rbp),%esi
sub    $0x5,%esi
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1188 <main+0x68>
mov    -0xc(%rbp),%esi
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1274 <main+0x154>
cmpl   $0xa,-0xc(%rbp)
jl     126d <main+0x14d>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x5,%edx
jl     1211 <main+0xf1>
mov    -0xc(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
imul   $0x14,%ecx,%ecx
sub    %ecx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    $0xa,%edi
cltd
idiv   %edi
mov    -0x24(%rbp),%edx
imul   $0xa,%eax,%eax
sub    %eax,%ecx
sub    $0x5,%ecx
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1268 <main+0x148>
mov    -0xc(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0xc(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
imul   $0x14,%ecx,%ecx
sub    %ecx,%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0xc(%rbp),%eax
mov    $0xa,%edi
cltd
idiv   %edi
mov    -0x2c(%rbp),%edx
imul   $0xa,%eax,%eax
sub    %eax,%ecx
lea    0xe40(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    126d <main+0x14d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf3f(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
mov    $0x64,%esi
sub    %eax,%esi
cmp    $0x5b,%eax
jl     1157 <main+0x37>
cmp    $0x5f,%eax
ja     11b3 <main+0x93>
mov    $0x5f,%esi
sub    %eax,%esi
lea    0xeab(%rip),%rdi
jmp    11ba <main+0x9a>
movslq %esi,%rax
imul   $0x66666667,%rax,%rsi
mov    %rsi,%rcx
sar    $0x22,%rcx
mov    %rsi,%rdx
shr    $0x3f,%rdx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%edi
mov    %eax,%ecx
sub    %edi,%ecx
sar    $0x23,%rsi
add    %edx,%esi
lea    0x0(,%rsi,4),%edx
lea    (%rdx,%rdx,4),%edx
sub    %edx,%eax
cltq
imul   $0x66666667,%rax,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x22,%rdx
add    %eax,%edx
cmp    $0x5,%ecx
jl     11c3 <main+0xa3>
add    $0xfffffffb,%ecx
lea    0xeb9(%rip),%rdi
jmp    11ca <main+0xaa>
lea    0xe7b(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
jmp    11d1 <main+0xb1>
lea    0xed7(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [53 x i8] c"$20 bills: 0\0A$10 bills: 0\0A $5 bills: 1\0A $1 bills: %d\00"
@.str.2 = [53 x i8] c"$20 bills: 0\0A$10 bills: 0\0A $5 bills: 0\0A $1 bills: %d\00"
@.str.3 = [55 x i8] c"$20 bills: %d\0A$10 bills: %d\0A $5 bills: 1\0A $1 bills: %d\00"
@.str.4 = [55 x i8] c"$20 bills: %d\0A$10 bills: %d\0A $5 bills: 0\0A $1 bills: %d\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 = sub nsw i32 100, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = icmp slt i32 %12, 10
br i1 %13, label %14, label %25
14: ; preds = %0
%15 = load i32, i32* %3
%16 = icmp sge i32 %15, 5
br i1 %16, label %17, label %21
17: ; preds = %14
%18 = load i32, i32* %3
%19 = sub nsw i32 %18, 5
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %24
21: ; preds = %14
%22 = load i32, i32* %3
%23 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0), i32 %22)
br label %24
24: ; preds = %21, %17
store i32 0, i32* %1
br label %65
25: ; preds = %0
%26 = load i32, i32* %3
%27 = icmp sge i32 %26, 10
br i1 %27, label %28, label %64
28: ; preds = %25
%29 = load i32, i32* %3
%30 = srem i32 %29, 10
%31 = icmp sge i32 %30, 5
br i1 %31, label %32, label %48
32: ; preds = %28
%33 = load i32, i32* %3
%34 = sdiv i32 %33, 20
%35 = load i32, i32* %3
%36 = load i32, i32* %3
%37 = sdiv i32 %36, 20
%38 = mul nsw i32 %37, 20
%39 = sub nsw i32 %35, %38
%40 = sdiv i32 %39, 10
%41 = load i32, i32* %3
%42 = load i32, i32* %3
%43 = sdiv i32 %42, 10
%44 = mul nsw i32 %43, 10
%45 = sub nsw i32 %41, %44
%46 = sub nsw i32 %45, 5
%47 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 %34, i32 %40, i32 %46)
br label %63
48: ; preds = %28
%49 = load i32, i32* %3
%50 = sdiv i32 %49, 20
%51 = load i32, i32* %3
%52 = load i32, i32* %3
%53 = sdiv i32 %52, 20
%54 = mul nsw i32 %53, 20
%55 = sub nsw i32 %51, %54
%56 = sdiv i32 %55, 10
%57 = load i32, i32* %3
%58 = load i32, i32* %3
%59 = sdiv i32 %58, 10
%60 = mul nsw i32 %59, 10
%61 = sub nsw i32 %57, %60
%62 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %50, i32 %56, i32 %61)
br label %63
63: ; preds = %48, %32
br label %64
64: ; preds = %63, %25
store i32 0, i32* %1
br label %65
65: ; preds = %64, %24
%66 = load i32, i32* %1
ret i32 %66
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [53 x i8] c"$20 bills: 0\0A$10 bills: 0\0A $5 bills: 1\0A $1 bills: %d\00"
@.str.2 = [53 x i8] c"$20 bills: 0\0A$10 bills: 0\0A $5 bills: 0\0A $1 bills: %d\00"
@.str.3 = [55 x i8] c"$20 bills: %d\0A$10 bills: %d\0A $5 bills: 1\0A $1 bills: %d\00"
@.str.4 = [55 x i8] c"$20 bills: %d\0A$10 bills: %d\0A $5 bills: 0\0A $1 bills: %d\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 = sub nsw i32 100, %4
%6 = icmp sgt i32 %4, 90
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = icmp ult i32 %4, 96
br i1 %8, label %9, label %12
9: ; preds = %7
%10 = sub nuw nsw i32 95, %4
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 %10)
br label %26
12: ; preds = %7
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %26
14: ; preds = %0
%15 = srem i32 %5, 10
%16 = icmp sgt i32 %15, 4
%17 = sdiv i32 %5, 20
%18 = mul nsw i32 %17, -20
%19 = add i32 %18, %5
%20 = sdiv i32 %19, 10
br i1 %16, label %21, label %24
21: ; preds = %14
%22 = add nsw i32 %15, -5
%23 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 %17, i32 %20, i32 %22)
br label %26
24: ; preds = %14
%25 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0), i32 %17, i32 %20, i32 %15)
br label %26
26: ; preds = %24, %21, %9, %12
ret i32 0
}