#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*/ fgets(char *, int, int /*<<< orphan*/);
char getchar();
int /*<<< orphan*/ printf(char *, int, float);
int /*<<< orphan*/ sscanf(char *, char *, int *, float *);
int /*<<< orphan*/ stdin;
int main(void) {
  int x;
  float f;
  {
    char buffer[255 + 1 + 1] = {[255 + 1 - 1] = '\0'};
    fgets(buffer, 255 + 1 + 1, stdin);
    if ((buffer[255 + 1 - 1] != '\0') && (buffer[255 + 1 - 1] != '\n'))
      while (getchar() != '\n')
        ;
    sscanf(buffer, "%d %g", &x, &f);
  };
  printf("Your input was: x == %d\t\t f == %g", x, f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x101,%edx
call   1040 <memset@plt>
lea    -0x110(%rbp),%rdi
mov    0x2e65(%rip),%rax
mov    (%rax),%edx
mov    $0x101,%esi
call   1050 <fgets@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x0,%eax
je     11cb <main+0x7b>
movsbl -0x11(%rbp),%eax
cmp    $0xa,%eax
je     11cb <main+0x7b>
jmp    11ae <main+0x5e>
mov    $0x0,%al
call   1060 <getchar@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     11c6 <main+0x76>
jmp    11ae <main+0x5e>
jmp    11cb <main+0x7b>
lea    -0x110(%rbp),%rdi
lea    0xe27(%rip),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1070 <sscanf@plt>
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x120,%rsp
lea    0x10(%rsp),%rbx
mov    $0x101,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x2e75(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x101,%esi
call   1050 <fgets@plt>
mov    0x10f(%rsp),%al
test   %al,%al
je     119f <main+0x4f>
nopl   (%rax)
cmp    $0xa,%al
je     119f <main+0x4f>
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    $0xa,%al
jne    1194 <main+0x44>
lea    0xe5a(%rip),%rsi
lea    0x10(%rsp),%rdi
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1070 <sscanf@plt>
mov    0xc(%rsp),%esi
movss  0x8(%rsp),%xmm0
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [6 x i8] c"%d %g\00"
@.str.1 = [34 x i8] c"Your input was: x == %d\09\09 f == %g\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca [257 x i8]
store i32 0, i32* %1
%5 = bitcast [257 x i8]* %4 to i8*
%6 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 0
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %6, i32 257, i32 %7)
%9 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 255
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %25
13: ; preds = %0
%14 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 255
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 10
br i1 %17, label %18, label %25
18: ; preds = %13
br label %19
19: ; preds = %23, %18
%20 = call signext i8 (...) @getchar()
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 10
br i1 %22, label %23, label %24
23: ; preds = %19
br label %19
24: ; preds = %19
br label %25
25: ; preds = %24, %13, %0
%26 = getelementptr inbounds [257 x i8], [257 x i8]* %4, i64 0, i64 0
%27 = call i32 @sscanf(i8* %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %2, float* %3)
%28 = load i32, i32* %2
%29 = load float, float* %3
%30 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %28, float %29)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [6 x i8] c"%d %g\00"
@.str.1 = [34 x i8] c"Your input was: x == %d\09\09 f == %g\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca [257 x i8]
%4 = bitcast i32* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = getelementptr inbounds [257 x i8], [257 x i8]* %3, i64 0, i64 0
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %6, i32 257, i32 %7)
%9 = getelementptr inbounds [257 x i8], [257 x i8]* %3, i64 0, i64 255
%10 = load i8, i8* %9
switch i8 %10, label %11 [
i8 10, label %14
i8 0, label %14
]
11: ; preds = %0, %11
%12 = call signext i8 (...) @getchar()
%13 = icmp eq i8 %12, 10
br i1 %13, label %14, label %11
14: ; preds = %11, %0, %0
%15 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, float* %2)
%16 = load i32, i32* %1
%17 = load float, float* %2
%18 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 %16, float %17)
ret i32 0
}