#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*/ getchar();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main(void) {
  float number;
  int factor = 5;
  char option = 'Y';
  do {
    printf("Type a n: ");
    scanf("%f", &number);
    printf("%.0f x %d: %.0f\n", number, factor, number * factor);
    printf("Continue? (y/n) ");
    getchar();
    scanf("%c", &option);
  } while (option == 'Y' || option == 'y');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0xc(%rbp)
movb   $0x59,-0xd(%rbp)
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeac(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0xc(%rbp),%esi
movss  -0x8(%rbp),%xmm1
cvtsi2ssl -0xc(%rbp),%xmm2
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe7f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
lea    0xe82(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    0xe7e(%rip),%rdi
lea    -0xd(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movsbl -0xd(%rbp),%ecx
mov    $0x1,%al
cmp    $0x59,%ecx
mov    %al,-0xe(%rbp)
je     11dc <main+0xac>
movsbl -0xd(%rbp),%eax
cmp    $0x79,%eax
sete   %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
test   $0x1,%al
jne    114a <main+0x1a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movb   $0x59,0x3(%rsp)
lea    0xec8(%rip),%r15
lea    0x4(%rsp),%r12
lea    0xebf(%rip),%r13
lea    0xec9(%rip),%rbx
lea    0xed3(%rip),%rbp
lea    0x3(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
lea    0xe8d(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
mulss  0xe60(%rip),%xmm1
cvtss2sd %xmm1,%xmm1
mov    %r13,%rdi
mov    $0x5,%esi
mov    $0x2,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movzbl 0x3(%rsp),%eax
and    $0xdf,%al
cmp    $0x59,%al
je     1170 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [11 x i8] c"Type a n: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [17 x i8] c"%.0f x %d: %.0f\0A\00"
@.str.3 = [17 x i8] c"Continue? (y/n) \00"
@.str.4 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca i32
%4 = alloca i8
store i32 0, i32* %1
store i32 5, i32* %3
store i8 89, i8* %4
br label %5
5: ; preds = %28, %0
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = load i32, i32* %3
%11 = load float, float* %2
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to float
%14 = fmul float %11, %13
%15 = fpext float %14 to double
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %9, i32 %10, double %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 (...) @getchar()
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %4)
br label %20
20: ; preds = %5
%21 = load i8, i8* %4
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 89
br i1 %23, label %28, label %24
24: ; preds = %20
%25 = load i8, i8* %4
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 121
br label %28
28: ; preds = %24, %20
%29 = phi i1 [ true, %20 ], [ %27, %24 ]
br i1 %29, label %5, label %30
30: ; preds = %28
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"Type a n: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [17 x i8] c"%.0f x %d: %.0f\0A\00"
@.str.3 = [17 x i8] c"Continue? (y/n) \00"
@.str.4 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca float
%2 = alloca i8
%3 = bitcast float* %1 to i8*
store i8 89, i8* %2
br label %4
4: ; preds = %4, %0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%7 = load float, float* %1
%8 = fpext float %7 to double
%9 = fmul float %7, 5.000000e+00
%10 = fpext float %9 to double
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), double %8, i32 5, double %10)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 (...) @getchar()
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8* %2)
%15 = load i8, i8* %2
%16 = and i8 %15, -33
%17 = icmp eq i8 %16, 89
br i1 %17, label %4, label %18
18: ; preds = %4
ret i32 0
}