#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 *);
void print_answer(int c5, int c2) {
  while (c5--)
    printf("5");
  while (c2--)
    printf("0");
  printf("\n");
}


x86 assembly (clang, -O0):
<print_answer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1143 <print_answer+0x33>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
jmp    111e <print_answer+0xe>
jmp    1148 <print_answer+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     116d <print_answer+0x5d>
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
jmp    1148 <print_answer+0x38>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_answer>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
test   %edi,%edi
je     112f <print_answer+0x1f>
mov    %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x35,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1120 <print_answer+0x10>
test   %ebx,%ebx
je     114f <print_answer+0x3f>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x30,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1140 <print_answer+0x30>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"5\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @print_answer(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, -1
store i32 %7, i32* %3
%8 = icmp ne i32 %6, 0
br i1 %8, label %9, label %11
9: ; preds = %5
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %5
11: ; preds = %5
br label %12
12: ; preds = %16, %11
%13 = load i32, i32* %4
%14 = add nsw i32 %13, -1
store i32 %14, i32* %4
%15 = icmp ne i32 %13, 0
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %12
18: ; preds = %12
%19 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @print_answer(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %6, %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %16, label %11
6: ; preds = %2, %6
%7 = phi i32 [ %8, %6 ], [ %0, %2 ]
%8 = add nsw i32 %7, -1
%9 = tail call i32 @putchar(i32 53)
%10 = icmp eq i32 %8, 0
br i1 %10, label %4, label %6
11: ; preds = %4, %11
%12 = phi i32 [ %13, %11 ], [ %1, %4 ]
%13 = add nsw i32 %12, -1
%14 = tail call i32 @putchar(i32 48)
%15 = icmp eq i32 %13, 0
br i1 %15, label %16, label %11
16: ; preds = %11, %4
%17 = tail call i32 @putchar(i32 10)
ret void
}