#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 */
long double __scan_float_uint(char const **, int);
long double __scan_float_int(const char **_str, int flags) {
  if (**_str == '-') {
    (*_str)++;
    return -__scan_float_uint(_str, flags);
  } else if (**_str == '+') {
    (*_str)++;
    return __scan_float_uint(_str, flags);
  } else {
    return __scan_float_uint(_str, flags);
  }
}


x86 assembly (clang, -O0):
<__scan_float_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    1156 <__scan_float_int+0x46>
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <__scan_float_uint@plt>
fchs
fstpt  -0x10(%rbp)
jmp    119a <__scan_float_int+0x8a>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    118b <__scan_float_int+0x7b>
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <__scan_float_uint@plt>
fstpt  -0x10(%rbp)
jmp    119a <__scan_float_int+0x8a>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1030 <__scan_float_uint@plt>
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__scan_float_int>:
push   %rax
mov    (%rdi),%rax
mov    (%rax),%cl
cmp    $0x2b,%cl
je     1130 <__scan_float_int+0x20>
cmp    $0x2d,%cl
jne    1137 <__scan_float_int+0x27>
add    $0x1,%rax
mov    %rax,(%rdi)
call   1030 <__scan_float_uint@plt>
fchs
pop    %rax
ret
add    $0x1,%rax
mov    %rax,(%rdi)
pop    %rax
jmp    1030 <__scan_float_uint@plt>

LLVM IR (-O0):
define x86_fp80 @__scan_float_int(i8** %0, i32 %1) {
%3 = alloca x86_fp80
%4 = alloca i8**
%5 = alloca i32
store i8** %0, i8*** %4
store i32 %1, i32* %5
%6 = load i8**, i8*** %4
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %19
11: ; preds = %2
%12 = load i8**, i8*** %4
%13 = load i8*, i8** %12
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %12
%15 = load i8**, i8*** %4
%16 = load i32, i32* %5
%17 = call x86_fp80 @__scan_float_uint(i8** %15, i32 %16)
%18 = fneg x86_fp80 %17
store x86_fp80 %18, x86_fp80* %3
br label %36
19: ; preds = %2
%20 = load i8**, i8*** %4
%21 = load i8*, i8** %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 43
br i1 %24, label %25, label %32
25: ; preds = %19
%26 = load i8**, i8*** %4
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %26
%29 = load i8**, i8*** %4
%30 = load i32, i32* %5
%31 = call x86_fp80 @__scan_float_uint(i8** %29, i32 %30)
store x86_fp80 %31, x86_fp80* %3
br label %36
32: ; preds = %19
%33 = load i8**, i8*** %4
%34 = load i32, i32* %5
%35 = call x86_fp80 @__scan_float_uint(i8** %33, i32 %34)
store x86_fp80 %35, x86_fp80* %3
br label %36
36: ; preds = %32, %25, %11
%37 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %37
}

LLVM IR (-O2):
define x86_fp80 @__scan_float_int(i8** %0, i32 %1) {
%3 = load i8*, i8** %0
%4 = load i8, i8* %3
switch i8 %4, label %12 [
i8 45, label %5
i8 43, label %9
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %6, i8** %0
%7 = tail call x86_fp80 @__scan_float_uint(i8** %0, i32 %1)
%8 = fneg x86_fp80 %7
br label %14
9: ; preds = %2
%10 = getelementptr inbounds i8, i8* %3, i64 1
store i8* %10, i8** %0
%11 = tail call x86_fp80 @__scan_float_uint(i8** %0, i32 %1)
br label %14
12: ; preds = %2
%13 = tail call x86_fp80 @__scan_float_uint(i8** %0, i32 %1)
br label %14
14: ; preds = %12, %9, %5
%15 = phi x86_fp80 [ %8, %5 ], [ %11, %9 ], [ %13, %12 ]
ret x86_fp80 %15
}