#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, float *);
int main(void) {
  float price;
  while (scanf("%f", &price) != EOF) {
    for (int i = 0; i < (int)price; i++)
      printf("%c", '*');
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     119a <main+0x7a>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cvttss2si -0x8(%rbp),%ecx
cmp    %ecx,%eax
jge    1187 <main+0x67>
lea    0xe96(%rip),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1156 <main+0x36>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea9(%rip),%r15
cmp    (%r15),%rax
jne    1151 <main+0x31>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xea8(%rip),%r14
lea    0x4(%rsp),%rbx
jmp    117a <main+0x5a>
nop
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r15),%rax
je     1144 <main+0x24>
cvttss2si 0x4(%rsp),%eax
test   %eax,%eax
jle    1160 <main+0x40>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cvttss2si 0x4(%rsp),%eax
cmp    %eax,%ebp
jl     1190 <main+0x70>
jmp    1160 <main+0x40>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %22, label %6
6: ; preds = %0, %10
%7 = load float, float* %1
%8 = fptosi float %7 to i32
%9 = icmp sgt i32 %8, 0
br i1 %9, label %15, label %10
10: ; preds = %15, %6
%11 = call i32 @putchar(i32 10)
%12 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%13 = load i64, i64* @EOF
%14 = icmp eq i64 %12, %13
br i1 %14, label %22, label %6
15: ; preds = %6, %15
%16 = phi i32 [ %18, %15 ], [ 0, %6 ]
%17 = call i32 @putchar(i32 42)
%18 = add nuw nsw i32 %16, 1
%19 = load float, float* %1
%20 = fptosi float %19 to i32
%21 = icmp slt i32 %18, %20
br i1 %21, label %15, label %10
22: ; preds = %10, %0
ret i32 0
}