#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 *, float);
int /*<<< orphan*/ scanf(char *, ...);
void main() {
  char a;
  do {
    scanf("%2c", &a);
    printf("%c\n", a);
  } while (a != '?');
  int aa = 3;
  float ff;
  double dd;
  scanf("%3f", &ff);
  printf("%5.2f\n", ff);
  getchar();
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    0xec1(%rip),%rdi
xor    %eax,%eax
lea    -0x1(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x1(%rbp),%eax
cvtsi2ss %eax,%xmm0
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x3f,%eax
jne    1138 <main+0x8>
movl   $0x3,-0x8(%rbp)
lea    0xe8f(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%r14
lea    0xb(%rsp),%r15
lea    0xeb8(%rip),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movsbl 0xb(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
cmpb   $0x3f,0xb(%rsp)
jne    1150 <main+0x20>
lea    0xe89(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
lea    0xe74(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%2c\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [4 x i8] c"%3f\00"
@.str.3 = [7 x i8] c"%5.2f\0A\00"
define void @main() {
%1 = alloca i8
%2 = alloca float
br label %3
3: ; preds = %3, %0
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%5 = load i8, i8* %1
%6 = sitofp i8 %5 to float
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), float %6)
%8 = load i8, i8* %1
%9 = icmp eq i8 %8, 63
br i1 %9, label %10, label %3
10: ; preds = %3
%11 = bitcast float* %2 to i8*
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), float* %2)
%13 = load float, float* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), float %13)
%15 = call i32 (...) @getchar()
%16 = call i32 (...) @getchar()
ret void
}