#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__ sscanf(char *, char *, float *);
int strlen(char *);
char *returner(char *s) {
  float f;
  if (strlen(s) <= 1)
    return "Nothing";
  else if (sscanf(s, "%f", &f))
    return "Float";
  else
    return "String";
}


x86 assembly (clang, -O0):
<returner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jg     114e <returner+0x2e>
lea    0xebb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1187 <returner+0x67>
mov    -0x10(%rbp),%rdi
lea    0xeaf(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
cmp    $0x0,%rax
je     117c <returner+0x5c>
lea    0xe98(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1187 <returner+0x67>
lea    0xe8e(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<returner>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1030 <strlen@plt>
cmp    $0x2,%eax
jge    113b <returner+0x1b>
lea    0xec7(%rip),%rax
jmp    1164 <returner+0x44>
lea    0xec6(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1040 <sscanf@plt>
test   %rax,%rax
lea    0xeb8(%rip),%rcx
lea    0xeab(%rip),%rax
cmove  %rcx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Nothing\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [6 x i8] c"Float\00"
@.str.3 = [7 x i8] c"String\00"
define i8* @returner(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = icmp sle i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8** %2
br label %15
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i64 @sscanf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %4)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %9
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %15
14: ; preds = %9
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %15
15: ; preds = %14, %13, %8
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
@.str = [8 x i8] c"Nothing\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [6 x i8] c"Float\00"
@.str.3 = [7 x i8] c"String\00"
define i8* @returner(i8* %0) {
%2 = alloca float
%3 = bitcast float* %2 to i8*
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp slt i32 %4, 2
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = call i64 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
br label %10
10: ; preds = %6, %1
%11 = phi i8* [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), %1 ], [ %9, %6 ]
ret i8* %11
}