#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 EOF;
int /*<<< orphan*/ WrMessage(char *);
scalar_t__ atof(char *);
int errno;
int /*<<< orphan*/ printf(char *, ...);
int sscanf(char *, char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
char *strerror(int);
void WrInputFeatures(void) {
  int check;
  int result;
  int err_no;
  float float_val;
  char input_string[20];
  char string1[20];
  char string2[20];
  WrMessage("@INPUT-FEATURES");
  check = 0;
  WrMessage("@INPUT-SSCANF-RETURN-REGULAR");
  strcpy(input_string, "A B");
  result = sscanf(input_string, "%s %s", string1, string2);
  printf("Result: %d - expected 2\n\n", result);
  if (result == 2) {
    check++;
  }
  WrMessage("@INPUT-SSCANF-RETURN-EOF");
  strcpy(input_string, "A");
  errno = 0;
  result = sscanf(input_string, "%10s %10s", string1, string2);
  err_no = errno;
  printf("Result: %d - expected 1 or 'EOF' (%d)\n\n", result, EOF);
  printf("System error: %s\n\n", strerror(err_no));
  if (result == 1 || result == EOF) {
    check++;
  }
  WrMessage("@INPUT-SSCANF-RETURN-INVALID");
  strcpy(input_string, "A");
  errno = 0;
  float_val = 1.23;
  result = sscanf(input_string, "%f", &float_val);
  err_no = errno;
  printf("New value: %g - original: 1.23\n", float_val);
  printf("Result: %d - expected 0\n", result);
  printf("System error: %s\n\n", strerror(err_no));
  if (result == 0) {
    check++;
  }
  if (check == 3) {
    WrMessage("@INPUT-SSCANF-COMPLIANT");
  } else {
    WrMessage("@INPUT-SSCANF-NON-COMPLIANT");
  }
  WrMessage("@INPUT-ATOF-INVALID-INPUT");
  strcpy(input_string, "A");
  errno = 0;
  float_val = (float)atof(input_string);
  err_no = errno;
  printf("Float value: %f\n", float_val);
  printf("System error: %s\n\n", strerror(err_no));
  if (err_no == 0) {
    WrMessage("@INPUT-NO-ERROR");
  }
  return;
}


x86 assembly (clang, -O0):
<WrInputFeatures>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    0xe95(%rip),%rdi
call   1070 <WrMessage@plt>
movl   $0x0,-0x4(%rbp)
lea    0xe92(%rip),%rdi
call   1070 <WrMessage@plt>
lea    -0x30(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    -0x70(%rbp),%rcx
lea    0xe8b(%rip),%rsi
mov    $0x0,%al
call   1060 <sscanf@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x2,-0x8(%rbp)
jne    11d8 <WrInputFeatures+0x78>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xe76(%rip),%rdi
call   1070 <WrMessage@plt>
lea    -0x30(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x2ddd(%rip),%rax
movl   $0x0,(%rax)
lea    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rdx
lea    -0x70(%rbp),%rcx
lea    0xe5c(%rip),%rsi
mov    $0x0,%al
call   1060 <sscanf@plt>
mov    %eax,-0x8(%rbp)
mov    0x2db3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    0x2db4(%rip),%rax
mov    (%rax),%edx
lea    0xe3d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
call   1080 <strerror@plt>
mov    %rax,%rsi
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x1,-0x8(%rbp)
je     1279 <WrInputFeatures+0x119>
mov    -0x8(%rbp),%eax
mov    0x2d77(%rip),%rcx
cmp    (%rcx),%eax
jne    1282 <WrInputFeatures+0x122>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
lea    0xe2c(%rip),%rdi
call   1070 <WrMessage@plt>
lea    -0x30(%rbp),%rdi
lea    0xdd5(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x2d33(%rip),%rax
movl   $0x0,(%rax)
movss  0xd4d(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xe0f(%rip),%rsi
lea    -0x10(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
mov    %eax,-0x8(%rbp)
mov    0x2d00(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xde8(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xdf7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
call   1080 <strerror@plt>
mov    %rax,%rsi
lea    0xd8b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
jne    1331 <WrInputFeatures+0x1d1>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jne    134c <WrInputFeatures+0x1ec>
lea    0xdcc(%rip),%rdi
call   1070 <WrMessage@plt>
jmp    1358 <WrInputFeatures+0x1f8>
lea    0xdd3(%rip),%rdi
call   1070 <WrMessage@plt>
lea    0xde3(%rip),%rdi
call   1070 <WrMessage@plt>
lea    -0x30(%rbp),%rdi
lea    0xcff(%rip),%rsi
call   1030 <strcpy@plt>
mov    0x2c5d(%rip),%rax
movl   $0x0,(%rax)
lea    -0x30(%rbp),%rdi
call   1040 <atof@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    0x2c3d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xdac(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
call   1080 <strerror@plt>
mov    %rax,%rsi
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    13e6 <WrInputFeatures+0x286>
lea    0xd8c(%rip),%rdi
call   1070 <WrMessage@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WrInputFeatures>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xe8b(%rip),%rdi
call   1070 <WrMessage@plt>
lea    0xe8f(%rip),%rdi
call   1070 <WrMessage@plt>
lea    0xea0(%rip),%rsi
lea    0x50(%rsp),%r13
mov    %r13,%rdi
call   1030 <strcpy@plt>
lea    0xe90(%rip),%rsi
lea    0x30(%rsp),%rbx
lea    0x10(%rsp),%r12
mov    %r13,%rdi
mov    %rbx,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1060 <sscanf@plt>
mov    %eax,%ebp
lea    0xe73(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %r14d,%r14d
cmp    $0x2,%ebp
sete   %r14b
lea    0xe73(%rip),%rdi
call   1070 <WrMessage@plt>
lea    0xe80(%rip),%rsi
mov    %r13,%rdi
call   1030 <strcpy@plt>
mov    0x2ddf(%rip),%r15
movl   $0x0,(%r15)
lea    0xe65(%rip),%rsi
mov    %r13,%rdi
mov    %rbx,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1060 <sscanf@plt>
mov    %eax,%ebp
mov    (%r15),%ebx
mov    0x2dc5(%rip),%r12
mov    (%r12),%edx
lea    0xe48(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebx,%edi
call   1080 <strerror@plt>
lea    0xe59(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x1(%r14),%eax
cmp    (%r12),%ebp
cmove  %eax,%r14d
cmp    $0x1,%ebp
cmove  %eax,%r14d
lea    0xe48(%rip),%rdi
call   1070 <WrMessage@plt>
mov    %r13,%rdi
lea    0xdf2(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x0,(%r15)
movl   $0x3f9d70a4,0xc(%rsp)
3f
lea    0xe3b(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %r13,%rdi
xor    %eax,%eax
call   1060 <sscanf@plt>
mov    %eax,%ebx
mov    (%r15),%ebp
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe19(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
lea    0xe2b(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,%edi
call   1080 <strerror@plt>
lea    0xdc1(%rip),%rbp
mov    %rbp,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
cmp    $0x1,%ebx
adc    $0x0,%r14d
cmp    $0x3,%r14d
lea    0xe0e(%rip),%rax
lea    0xe1f(%rip),%rdi
cmove  %rax,%rdi
call   1070 <WrMessage@plt>
lea    0xe2b(%rip),%rdi
call   1070 <WrMessage@plt>
mov    %r13,%rdi
lea    0xd48(%rip),%rsi
call   1030 <strcpy@plt>
movl   $0x0,(%r15)
mov    %r13,%rdi
call   1040 <atof@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm0
lea    0xe09(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   1080 <strerror@plt>
mov    %rbp,%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdf8(%rip),%rdi
call   1070 <WrMessage@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"@INPUT-FEATURES\00"
@.str.1 = [29 x i8] c"@INPUT-SSCANF-RETURN-REGULAR\00"
@.str.2 = [4 x i8] c"A B\00"
@.str.3 = [6 x i8] c"%s %s\00"
@.str.4 = [26 x i8] c"Result: %d - expected 2\0A\0A\00"
@.str.5 = [25 x i8] c"@INPUT-SSCANF-RETURN-EOF\00"
@.str.6 = [2 x i8] c"A\00"
@errno = global i32 0
@.str.7 = [10 x i8] c"%10s %10s\00"
@.str.8 = [40 x i8] c"Result: %d - expected 1 or 'EOF' (%d)\0A\0A\00"
@EOF = global i32 0
@.str.9 = [19 x i8] c"System error: %s\0A\0A\00"
@.str.10 = [29 x i8] c"@INPUT-SSCANF-RETURN-INVALID\00"
@.str.11 = [3 x i8] c"%f\00"
@.str.12 = [32 x i8] c"New value: %g - original: 1.23\0A\00"
@.str.13 = [25 x i8] c"Result: %d - expected 0\0A\00"
@.str.14 = [24 x i8] c"@INPUT-SSCANF-COMPLIANT\00"
@.str.15 = [28 x i8] c"@INPUT-SSCANF-NON-COMPLIANT\00"
@.str.16 = [26 x i8] c"@INPUT-ATOF-INVALID-INPUT\00"
@.str.17 = [17 x i8] c"Float value: %f\0A\00"
@.str.18 = [16 x i8] c"@INPUT-NO-ERROR\00"
define void @WrInputFeatures() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca [20 x i8]
%6 = alloca [20 x i8]
%7 = alloca [20 x i8]
%8 = call i32 @WrMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
%9 = call i32 @WrMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%10 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%13 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%15 = call i32 (i8*, i8*, ...) @sscanf(i8* %12, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %13, i8* %14)
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 2
br i1 %19, label %20, label %23
20: ; preds = %0
%21 = load i32, i32* %1
%22 = add nsw i32 %21, 1
store i32 %22, i32* %1
br label %23
23: ; preds = %20, %0
%24 = call i32 @WrMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
%25 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%26 = call i32 @strcpy(i8* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* @errno
%27 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%28 = getelementptr inbounds [20 x i8], [20 x i8]* %6, i64 0, i64 0
%29 = getelementptr inbounds [20 x i8], [20 x i8]* %7, i64 0, i64 0
%30 = call i32 (i8*, i8*, ...) @sscanf(i8* %27, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %28, i8* %29)
store i32 %30, i32* %2
%31 = load i32, i32* @errno
store i32 %31, i32* %3
%32 = load i32, i32* %2
%33 = load i32, i32* @EOF
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i32 %32, i32 %33)
%35 = load i32, i32* %3
%36 = call i8* @strerror(i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %36)
%38 = load i32, i32* %2
%39 = icmp eq i32 %38, 1
br i1 %39, label %44, label %40
40: ; preds = %23
%41 = load i32, i32* %2
%42 = load i32, i32* @EOF
%43 = icmp eq i32 %41, %42
br i1 %43, label %44, label %47
44: ; preds = %40, %23
%45 = load i32, i32* %1
%46 = add nsw i32 %45, 1
store i32 %46, i32* %1
br label %47
47: ; preds = %44, %40
%48 = call i32 @WrMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%49 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%50 = call i32 @strcpy(i8* %49, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* @errno
store float 0x3FF3AE1480000000, float* %4
%51 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%52 = call i32 (i8*, i8*, ...) @sscanf(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), float* %4)
store i32 %52, i32* %2
%53 = load i32, i32* @errno
store i32 %53, i32* %3
%54 = load float, float* %4
%55 = fpext float %54 to double
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), double %55)
%57 = load i32, i32* %2
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %57)
%59 = load i32, i32* %3
%60 = call i8* @strerror(i32 %59)
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %60)
%62 = load i32, i32* %2
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %47
%65 = load i32, i32* %1
%66 = add nsw i32 %65, 1
store i32 %66, i32* %1
br label %67
67: ; preds = %64, %47
%68 = load i32, i32* %1
%69 = icmp eq i32 %68, 3
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = call i32 @WrMessage(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0))
br label %74
72: ; preds = %67
%73 = call i32 @WrMessage(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0))
br label %74
74: ; preds = %72, %70
%75 = call i32 @WrMessage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0))
%76 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%77 = call i32 @strcpy(i8* %76, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* @errno
%78 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%79 = call i64 @atof(i8* %78)
%80 = sitofp i64 %79 to float
store float %80, float* %4
%81 = load i32, i32* @errno
store i32 %81, i32* %3
%82 = load float, float* %4
%83 = fpext float %82 to double
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0), double %83)
%85 = load i32, i32* %3
%86 = call i8* @strerror(i32 %85)
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %86)
%88 = load i32, i32* %3
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %74
%91 = call i32 @WrMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.18, i64 0, i64 0))
br label %92
92: ; preds = %90, %74
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"@INPUT-FEATURES\00"
@.str.1 = [29 x i8] c"@INPUT-SSCANF-RETURN-REGULAR\00"
@.str.2 = [4 x i8] c"A B\00"
@.str.3 = [6 x i8] c"%s %s\00"
@.str.4 = [26 x i8] c"Result: %d - expected 2\0A\0A\00"
@.str.5 = [25 x i8] c"@INPUT-SSCANF-RETURN-EOF\00"
@.str.6 = [2 x i8] c"A\00"
@errno = global i32 0
@.str.7 = [10 x i8] c"%10s %10s\00"
@.str.8 = [40 x i8] c"Result: %d - expected 1 or 'EOF' (%d)\0A\0A\00"
@EOF = global i32 0
@.str.9 = [19 x i8] c"System error: %s\0A\0A\00"
@.str.10 = [29 x i8] c"@INPUT-SSCANF-RETURN-INVALID\00"
@.str.11 = [3 x i8] c"%f\00"
@.str.12 = [32 x i8] c"New value: %g - original: 1.23\0A\00"
@.str.13 = [25 x i8] c"Result: %d - expected 0\0A\00"
@.str.14 = [24 x i8] c"@INPUT-SSCANF-COMPLIANT\00"
@.str.15 = [28 x i8] c"@INPUT-SSCANF-NON-COMPLIANT\00"
@.str.16 = [26 x i8] c"@INPUT-ATOF-INVALID-INPUT\00"
@.str.17 = [17 x i8] c"Float value: %f\0A\00"
@.str.18 = [16 x i8] c"@INPUT-NO-ERROR\00"
define void @WrInputFeatures() {
%1 = alloca float
%2 = alloca [20 x i8]
%3 = alloca [20 x i8]
%4 = alloca [20 x i8]
%5 = bitcast float* %1 to i8*
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %4, i64 0, i64 0
%9 = tail call i32 @WrMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @WrMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* %7, i8* %8)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.4, i64 0, i64 0), i32 %12)
%14 = icmp eq i32 %12, 2
%15 = zext i1 %14 to i32
%16 = call i32 @WrMessage(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0))
%17 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* @errno
%18 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %7, i8* %8)
%19 = load i32, i32* @errno
%20 = load i32, i32* @EOF
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.8, i64 0, i64 0), i32 %18, i32 %20)
%22 = call i8* @strerror(i32 %19)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %22)
%24 = icmp eq i32 %18, 1
%25 = load i32, i32* @EOF
%26 = icmp eq i32 %18, %25
%27 = select i1 %24, i1 true, i1 %26
%28 = select i1 %14, i32 2, i32 1
%29 = select i1 %27, i32 %28, i32 %15
%30 = call i32 @WrMessage(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.10, i64 0, i64 0))
%31 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* @errno
store float 0x3FF3AE1480000000, float* %1
%32 = call i32 (i8*, i8*, ...) @sscanf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), float* %1)
%33 = load i32, i32* @errno
%34 = load float, float* %1
%35 = fpext float %34 to double
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.12, i64 0, i64 0), double %35)
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.13, i64 0, i64 0), i32 %32)
%38 = call i8* @strerror(i32 %33)
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %38)
%40 = icmp eq i32 %32, 0
%41 = zext i1 %40 to i32
%42 = add nuw nsw i32 %29, %41
%43 = icmp eq i32 %42, 3
%44 = select i1 %43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.14, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.15, i64 0, i64 0)
%45 = call i32 @WrMessage(i8* %44)
%46 = call i32 @WrMessage(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.16, i64 0, i64 0))
%47 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* @errno
%48 = call i64 @atof(i8* %6)
%49 = sitofp i64 %48 to float
store float %49, float* %1
%50 = fpext float %49 to double
%51 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.17, i64 0, i64 0), double %50)
%52 = call i8* @strerror(i32 0)
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i8* %52)
%54 = call i32 @WrMessage(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.18, i64 0, i64 0))
ret void
}