#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*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
double strtod(char const *, char **);
int stoF8(const char *X, double *ptr_valF8) {
  int status = 0;
  char *endptr;
  if ((X == NULL) || (*X == '\0')) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 69,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
  *ptr_valF8 = strtod(X, &endptr);
  if ((*endptr != '\0') && (*endptr != '\n')) {
    {
      {
        fprintf(stderr, "Line %3d of File %s \n", 71,
                "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                "outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/"
                "master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c");
      };
      status = -1;
      goto BYE;
    };
  }
BYE:
  return status;
}


x86 assembly (clang, -O0):
<stoF8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1152 <stoF8+0x32>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    117f <stoF8+0x5f>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
lea    0xe9e(%rip),%rsi
mov    $0x45,%edx
lea    0xea8(%rip),%rcx
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x14(%rbp)
jmp    11e6 <stoF8+0xc6>
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <strtod@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     11e1 <stoF8+0xc1>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     11e1 <stoF8+0xc1>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
lea    0xe3c(%rip),%rsi
mov    $0x47,%edx
lea    0xe46(%rip),%rcx
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x14(%rbp)
jmp    11e6 <stoF8+0xc6>
jmp    11e6 <stoF8+0xc6>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stoF8>:
push   %rbx
sub    $0x10,%rsp
mov    $0x45,%edx
test   %rdi,%rdi
je     115c <stoF8+0x3c>
cmpb   $0x0,(%rdi)
je     115c <stoF8+0x3c>
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <strtod@plt>
movsd  %xmm0,(%rbx)
mov    0x8(%rsp),%rax
mov    (%rax),%cl
xor    %eax,%eax
test   %cl,%cl
je     117d <stoF8+0x5d>
mov    $0x47,%edx
cmp    $0xa,%cl
je     117d <stoF8+0x5d>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
lea    0xea3(%rip),%rcx
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c\00"
define i32 @stoF8(i8* %0, double* %1) {
%3 = alloca i8*
%4 = alloca double*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store double* %1, double** %4
store i32 0, i32* %5
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %9, %2
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 69, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %5
br label %34
17: ; preds = %9
%18 = load i8*, i8** %3
%19 = call double @strtod(i8* %18, i8** %6)
%20 = load double*, double** %4
store double %19, double* %20
%21 = load i8*, i8** %6
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %33
25: ; preds = %17
%26 = load i8*, i8** %6
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %28, 10
br i1 %29, label %30, label %33
30: ; preds = %25
%31 = load i32, i32* @stderr
%32 = call i32 @fprintf(i32 %31, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 71, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %5
br label %34
33: ; preds = %25, %17
br label %34
34: ; preds = %33, %30, %14
%35 = load i32, i32* %5
ret i32 %35
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"Line %3d of File %s \0A\00"
@.str.1 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/NerdWalletOSS/Q/refs/heads/master/DEPRECATED_Q2/BAK.4.23.2015.PARSER/auxil.c\00"
define i32 @stoF8(i8* %0, double* nocapture writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = icmp eq i8* %0, null
br i1 %5, label %13, label %6
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %6
%10 = call double @strtod(i8* %0, i8** %3)
store double %10, double* %1
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
switch i8 %12, label %13 [
i8 0, label %17
i8 10, label %17
]
13: ; preds = %9, %2, %6
%14 = phi i32 [ 69, %6 ], [ 69, %2 ], [ 71, %9 ]
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %14, i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %13, %9, %9
%18 = phi i32 [ 0, %9 ], [ 0, %9 ], [ -1, %13 ]
ret i32 %18
}