#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ info(char *, int, ...);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  FILE *pred = fopen("out.txt", "r");
  FILE *tar = fopen("label.txt", "r");
  FILE *new = fopen("roc.txt", "w");
  fprintf(new, "{");
  int *predict;
  int target;
  double p;
  for (double i = -0.8; i <= 1.8; i = i + 0.02) {
    int TP = 0;
    int TN = 0;
    int FP = 0;
    int FN = 0;
    int correct = 0;
    int total = 0;
    while (fscanf(pred, "%lf\n", &p) != -1 &&
           fscanf(tar, "%d\n", &target) != -1) {
      if (p <= i) {
        if (target == 0) {
          TP++;
        } else {
          FP++;
        }
      } else {
        if (target == 1) {
          TN++;
        } else {
          FN++;
        }
      }
    }
    correct = TP + TN;
    total = correct + FP + FN;
    printf("************************************%lf****************************"
           "********\n",
           i);
    info("Accuracy = %g%% (%d/%d)  ", (double)correct / total * 100, correct,
         total);
    fprintf(new, "{%lf, %lf},", (double)FP / (FP + TN), (double)TP / (TP + FN));
    double p = (double)TP / (TP + FP);
    double r = (double)TP / (TP + FN);
    double lzb_F1 = 2.0 * r * p / (r + p);
    info("F1 = %g  ", lzb_F1);
    info("TP = %d  ", TP);
    info("FP = %d  ", FP);
    info("TN = %d  ", TN);
    info("FN = %d\n", FN);
    rewind(pred);
    rewind(tar);
  }
  fprintf(new, "}");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea8(%rip),%rdi
lea    0xea9(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x18(%rbp)
lea    0xe9b(%rip),%rdi
lea    0xe92(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x20(%rbp)
lea    0xe8e(%rip),%rdi
lea    0xe8f(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
lea    0xe7d(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movsd  0xe28(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe23(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
jb     1439 <main+0x2d9>
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe23(%rip),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x79(%rbp)
je     125f <main+0xff>
mov    -0x20(%rbp),%rdi
lea    0xea2(%rip),%rsi
lea    -0x34(%rbp),%rdx
mov    $0x0,%al
call   1050 <fscanf@plt>
cmp    $0xffffffff,%eax
setne  %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    126f <main+0x10f>
jmp    12d4 <main+0x174>
movsd  -0x40(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     12a9 <main+0x149>
cmpl   $0x0,-0x34(%rbp)
jne    129b <main+0x13b>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    12a4 <main+0x144>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    12cf <main+0x16f>
cmpl   $0x1,-0x34(%rbp)
jne    12c1 <main+0x161>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    12ca <main+0x16a>
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    12cf <main+0x16f>
jmp    121a <main+0xba>
mov    -0x4c(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
add    -0x54(%rbp),%eax
add    -0x58(%rbp),%eax
mov    %eax,-0x60(%rbp)
movsd  -0x48(%rbp),%xmm0
lea    0xd58(%rip),%rdi
call   1030 <printf@plt>
cvtsi2sdl -0x5c(%rbp),%xmm0
cvtsi2sdl -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  0xd08(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
mov    -0x5c(%rbp),%edx
mov    -0x60(%rbp),%ecx
lea    0xd75(%rip),%rdi
mov    $0x0,%al
call   1080 <info@plt>
mov    -0x28(%rbp),%rdi
cvtsi2sdl -0x54(%rbp),%xmm0
mov    -0x54(%rbp),%eax
add    -0x50(%rbp),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x4c(%rbp),%xmm1
mov    -0x4c(%rbp),%eax
add    -0x58(%rbp),%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
lea    0xd57(%rip),%rsi
mov    $0x2,%al
call   1060 <fprintf@plt>
cvtsi2sdl -0x4c(%rbp),%xmm0
mov    -0x4c(%rbp),%eax
add    -0x54(%rbp),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
cvtsi2sdl -0x4c(%rbp),%xmm0
mov    -0x4c(%rbp),%eax
add    -0x58(%rbp),%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xc74(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
addsd  -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
cvttsd2si -0x78(%rbp),%esi
lea    0xcfb(%rip),%rdi
mov    $0x0,%al
call   1080 <info@plt>
mov    -0x4c(%rbp),%esi
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1080 <info@plt>
mov    -0x54(%rbp),%esi
lea    0xced(%rip),%rdi
mov    $0x0,%al
call   1080 <info@plt>
mov    -0x50(%rbp),%esi
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1080 <info@plt>
mov    -0x58(%rbp),%esi
lea    0xcdf(%rip),%rdi
mov    $0x0,%al
call   1080 <info@plt>
mov    -0x18(%rbp),%rdi
call   1040 <rewind@plt>
mov    -0x20(%rbp),%rdi
call   1040 <rewind@plt>
movsd  0xbf6(%rip),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    11dd <main+0x7d>
mov    -0x28(%rbp),%rdi
lea    0xcad(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0xe9b(%rip),%rdi
lea    0xe9c(%rip),%rbp
mov    %rbp,%rsi
call   1080 <fopen@plt>
mov    %rax,%rbx
lea    0xe8c(%rip),%rdi
mov    %rbp,%rsi
call   1080 <fopen@plt>
mov    %rax,%r15
lea    0xe84(%rip),%rdi
lea    0xe85(%rip),%rsi
call   1080 <fopen@plt>
mov    $0x7b,%edi
mov    %rax,0x20(%rsp)
mov    %rax,%rsi
call   1060 <fputc@plt>
movsd  0xe2a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0xe5b(%rip),%r14
mov    %rbx,0x38(%rsp)
mov    %r15,0x30(%rsp)
jmp    1375 <main+0x205>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%r15
lea    0x0(%rbp,%r13,1),%r14d
mov    %r13,0x50(%rsp)
mov    0x8(%rsp),%rax
lea    (%rax,%r12,1),%ebx
add    %r14d,%ebx
lea    0xe23(%rip),%rdi
movsd  0x10(%rsp),%xmm0
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
divsd  %xmm1,%xmm0
mulsd  0xdc2(%rip),%xmm0
cvttsd2si %xmm0,%esi
lea    0xe3f(%rip),%rdi
mov    %r14d,%edx
mov    %r15,%r14
mov    0x30(%rsp),%r15
mov    %ebx,%ecx
mov    0x38(%rsp),%rbx
xor    %eax,%eax
call   1090 <info@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
lea    (%r12,%r13,1),%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  %xmm1,0x48(%rsp)
mov    0x8(%rsp),%r13
lea    0x0(%rbp,%r13,1),%eax
cvtsi2sd %eax,%xmm2
divsd  %xmm2,%xmm1
movsd  %xmm1,0x40(%rsp)
mov    0x20(%rsp),%rdi
lea    0xdf8(%rip),%rsi
mov    $0x2,%al
call   1070 <fprintf@plt>
lea    (%r12,%rbp,1),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x48(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  0x40(%rsp),%xmm2
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    0xdc3(%rip),%rdi
xor    %eax,%eax
call   1090 <info@plt>
lea    0xdbf(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1090 <info@plt>
lea    0xdb9(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1090 <info@plt>
lea    0xdb2(%rip),%rdi
mov    0x50(%rsp),%rsi
xor    %eax,%eax
call   1090 <info@plt>
lea    0xda9(%rip),%rdi
mov    %r13d,%esi
xor    %eax,%eax
call   1090 <info@plt>
mov    %rbx,%rdi
call   1040 <rewind@plt>
mov    %r15,%rdi
call   1040 <rewind@plt>
movsd  0x10(%rsp),%xmm1
addsd  0xcb3(%rip),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xcad(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     143f <main+0x2cf>
mov    %rbx,%rdi
mov    %r14,%rsi
lea    0x28(%rsp),%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
mov    $0x0,%r12d
mov    $0x0,%ecx
mov    %rcx,0x8(%rsp)
mov    $0x0,%r13d
mov    $0x0,%ebp
cmp    $0xffffffff,%eax
je     1200 <main+0x90>
xor    %ebp,%ebp
xor    %r13d,%r13d
xor    %eax,%eax
mov    %rax,0x8(%rsp)
xor    %r12d,%r12d
jmp    13e8 <main+0x278>
nopl   0x0(%rax)
mov    0x8(%rsp),%rax
add    $0x1,%eax
mov    %rax,0x8(%rsp)
mov    %rbx,%rdi
mov    %r14,%rsi
lea    0x28(%rsp),%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmp    $0xffffffff,%eax
je     1200 <main+0x90>
mov    %r15,%rdi
lea    0xcf1(%rip),%rsi
lea    0x1c(%rsp),%rdx
xor    %eax,%eax
call   1050 <fscanf@plt>
cmp    $0xffffffff,%eax
je     1200 <main+0x90>
movsd  0x10(%rsp),%xmm0
ucomisd 0x28(%rsp),%xmm0
mov    0x1c(%rsp),%eax
jae    1430 <main+0x2c0>
cmp    $0x1,%eax
jne    13c0 <main+0x250>
add    $0x1,%r13d
jmp    13cd <main+0x25d>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
test   %eax,%eax
je     143a <main+0x2ca>
add    $0x1,%r12d
jmp    13cd <main+0x25d>
add    $0x1,%ebp
jmp    13cd <main+0x25d>
mov    $0x7d,%edi
mov    0x20(%rsp),%rsi
call   1060 <fputc@plt>
xor    %eax,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"out.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"label.txt\00"
@.str.3 = [8 x i8] c"roc.txt\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [2 x i8] c"{\00"
@.str.6 = [5 x i8] c"%lf\0A\00"
@.str.7 = [4 x i8] c"%d\0A\00"
@.str.8 = [77 x i8] c"************************************%lf************************************\0A\00"
@.str.9 = [26 x i8] c"Accuracy = %g%% (%d/%d) \00"
@.str.10 = [12 x i8] c"{%lf, %lf},\00"
@.str.11 = [10 x i8] c"F1 = %g \00"
@.str.12 = [10 x i8] c"TP = %d \00"
@.str.13 = [10 x i8] c"FP = %d \00"
@.str.14 = [10 x i8] c"TN = %d \00"
@.str.15 = [9 x i8] c"FN = %d\0A\00"
@.str.16 = [2 x i8] c"}\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%22 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %6
%23 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %23, i32** %7
%24 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %24, i32** %8
%25 = load i32*, i32** %8
%26 = call i32 (i32*, i8*, ...) @fprintf(i32* %25, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store double -8.000000e-01, double* %12
br label %27
27: ; preds = %140, %2
%28 = load double, double* %12
%29 = fcmp ole double %28, 1.800000e+00
br i1 %29, label %30, label %143
30: ; preds = %27
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store i32 0, i32* %17
store i32 0, i32* %18
br label %31
31: ; preds = %65, %30
%32 = load i32*, i32** %6
%33 = call i32 (i32*, i8*, ...) @fscanf(i32* %32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double* %11)
%34 = icmp ne i32 %33, -1
br i1 %34, label %35, label %39
35: ; preds = %31
%36 = load i32*, i32** %7
%37 = call i32 (i32*, i8*, ...) @fscanf(i32* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %10)
%38 = icmp ne i32 %37, -1
br label %39
39: ; preds = %35, %31
%40 = phi i1 [ false, %31 ], [ %38, %35 ]
br i1 %40, label %41, label %66
41: ; preds = %39
%42 = load double, double* %11
%43 = load double, double* %12
%44 = fcmp ole double %42, %43
br i1 %44, label %45, label %55
45: ; preds = %41
%46 = load i32, i32* %10
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %45
%49 = load i32, i32* %13
%50 = add nsw i32 %49, 1
store i32 %50, i32* %13
br label %54
51: ; preds = %45
%52 = load i32, i32* %15
%53 = add nsw i32 %52, 1
store i32 %53, i32* %15
br label %54
54: ; preds = %51, %48
br label %65
55: ; preds = %41
%56 = load i32, i32* %10
%57 = icmp eq i32 %56, 1
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = load i32, i32* %14
%60 = add nsw i32 %59, 1
store i32 %60, i32* %14
br label %64
61: ; preds = %55
%62 = load i32, i32* %16
%63 = add nsw i32 %62, 1
store i32 %63, i32* %16
br label %64
64: ; preds = %61, %58
br label %65
65: ; preds = %64, %54
br label %31
66: ; preds = %39
%67 = load i32, i32* %13
%68 = load i32, i32* %14
%69 = add nsw i32 %67, %68
store i32 %69, i32* %17
%70 = load i32, i32* %17
%71 = load i32, i32* %15
%72 = add nsw i32 %70, %71
%73 = load i32, i32* %16
%74 = add nsw i32 %72, %73
store i32 %74, i32* %18
%75 = load double, double* %12
%76 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0), double %75)
%77 = load i32, i32* %17
%78 = sitofp i32 %77 to double
%79 = load i32, i32* %18
%80 = sitofp i32 %79 to double
%81 = fdiv double %78, %80
%82 = fmul double %81, 1.000000e+02
%83 = fptosi double %82 to i32
%84 = load i32, i32* %17
%85 = load i32, i32* %18
%86 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %83, i32 %84, i32 %85)
%87 = load i32*, i32** %8
%88 = load i32, i32* %15
%89 = sitofp i32 %88 to double
%90 = load i32, i32* %15
%91 = load i32, i32* %14
%92 = add nsw i32 %90, %91
%93 = sitofp i32 %92 to double
%94 = fdiv double %89, %93
%95 = load i32, i32* %13
%96 = sitofp i32 %95 to double
%97 = load i32, i32* %13
%98 = load i32, i32* %16
%99 = add nsw i32 %97, %98
%100 = sitofp i32 %99 to double
%101 = fdiv double %96, %100
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %87, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), double %94, double %101)
%103 = load i32, i32* %13
%104 = sitofp i32 %103 to double
%105 = load i32, i32* %13
%106 = load i32, i32* %15
%107 = add nsw i32 %105, %106
%108 = sitofp i32 %107 to double
%109 = fdiv double %104, %108
store double %109, double* %19
%110 = load i32, i32* %13
%111 = sitofp i32 %110 to double
%112 = load i32, i32* %13
%113 = load i32, i32* %16
%114 = add nsw i32 %112, %113
%115 = sitofp i32 %114 to double
%116 = fdiv double %111, %115
store double %116, double* %20
%117 = load double, double* %20
%118 = fmul double 2.000000e+00, %117
%119 = load double, double* %19
%120 = fmul double %118, %119
%121 = load double, double* %20
%122 = load double, double* %19
%123 = fadd double %121, %122
%124 = fdiv double %120, %123
store double %124, double* %21
%125 = load double, double* %21
%126 = fptosi double %125 to i32
%127 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 %126)
%128 = load i32, i32* %13
%129 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %128)
%130 = load i32, i32* %15
%131 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i32 %130)
%132 = load i32, i32* %14
%133 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 %132)
%134 = load i32, i32* %16
%135 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %134)
%136 = load i32*, i32** %6
%137 = call i32 @rewind(i32* %136)
%138 = load i32*, i32** %7
%139 = call i32 @rewind(i32* %138)
br label %140
140: ; preds = %66
%141 = load double, double* %12
%142 = fadd double %141, 2.000000e-02
store double %142, double* %12
br label %27
143: ; preds = %27
%144 = load i32*, i32** %8
%145 = call i32 (i32*, i8*, ...) @fprintf(i32* %144, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"out.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [10 x i8] c"label.txt\00"
@.str.3 = [8 x i8] c"roc.txt\00"
@.str.4 = [2 x i8] c"w\00"
@.str.6 = [5 x i8] c"%lf\0A\00"
@.str.7 = [4 x i8] c"%d\0A\00"
@.str.8 = [77 x i8] c"************************************%lf************************************\0A\00"
@.str.9 = [26 x i8] c"Accuracy = %g%% (%d/%d) \00"
@.str.10 = [12 x i8] c"{%lf, %lf},\00"
@.str.11 = [10 x i8] c"F1 = %g \00"
@.str.12 = [10 x i8] c"TP = %d \00"
@.str.13 = [10 x i8] c"FP = %d \00"
@.str.14 = [10 x i8] c"TN = %d \00"
@.str.15 = [9 x i8] c"FN = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca double
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 @fputc(i32 123, i32* %7)
%9 = bitcast i32* %3 to i8*
%10 = bitcast double* %4 to i8*
br label %11
11: ; preds = %2, %47
%12 = phi double [ -8.000000e-01, %2 ], [ %86, %47 ]
%13 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double* %4)
%14 = icmp eq i32 %13, -1
br i1 %14, label %47, label %17
15: ; preds = %47
%16 = call i32 @fputc(i32 125, i32* %7)
ret i32 0
17: ; preds = %11, %40
%18 = phi i32 [ %44, %40 ], [ 0, %11 ]
%19 = phi i32 [ %43, %40 ], [ 0, %11 ]
%20 = phi i32 [ %42, %40 ], [ 0, %11 ]
%21 = phi i32 [ %41, %40 ], [ 0, %11 ]
%22 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i32* %3)
%23 = icmp eq i32 %22, -1
br i1 %23, label %47, label %24
24: ; preds = %17
%25 = load double, double* %4
%26 = fcmp ugt double %25, %12
%27 = load i32, i32* %3
br i1 %26, label %34, label %28
28: ; preds = %24
%29 = icmp eq i32 %27, 0
br i1 %29, label %30, label %32
30: ; preds = %28
%31 = add nsw i32 %18, 1
br label %40
32: ; preds = %28
%33 = add nsw i32 %21, 1
br label %40
34: ; preds = %24
%35 = icmp eq i32 %27, 1
br i1 %35, label %36, label %38
36: ; preds = %34
%37 = add nsw i32 %19, 1
br label %40
38: ; preds = %34
%39 = add nsw i32 %20, 1
br label %40
40: ; preds = %36, %38, %30, %32
%41 = phi i32 [ %21, %30 ], [ %33, %32 ], [ %21, %36 ], [ %21, %38 ]
%42 = phi i32 [ %20, %30 ], [ %20, %32 ], [ %20, %36 ], [ %39, %38 ]
%43 = phi i32 [ %19, %30 ], [ %19, %32 ], [ %37, %36 ], [ %19, %38 ]
%44 = phi i32 [ %31, %30 ], [ %18, %32 ], [ %18, %36 ], [ %18, %38 ]
%45 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), double* %4)
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %17
47: ; preds = %17, %40, %11
%48 = phi i32 [ 0, %11 ], [ %41, %40 ], [ %21, %17 ]
%49 = phi i32 [ 0, %11 ], [ %42, %40 ], [ %20, %17 ]
%50 = phi i32 [ 0, %11 ], [ %43, %40 ], [ %19, %17 ]
%51 = phi i32 [ 0, %11 ], [ %44, %40 ], [ %18, %17 ]
%52 = add nsw i32 %51, %50
%53 = add i32 %49, %48
%54 = add i32 %53, %52
%55 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.8, i64 0, i64 0), double %12)
%56 = sitofp i32 %52 to double
%57 = sitofp i32 %54 to double
%58 = fdiv double %56, %57
%59 = fmul double %58, 1.000000e+02
%60 = fptosi double %59 to i32
%61 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.9, i64 0, i64 0), i32 %60, i32 %52, i32 %54)
%62 = sitofp i32 %48 to double
%63 = add nsw i32 %50, %48
%64 = sitofp i32 %63 to double
%65 = fdiv double %62, %64
%66 = sitofp i32 %51 to double
%67 = add nsw i32 %51, %49
%68 = sitofp i32 %67 to double
%69 = fdiv double %66, %68
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.10, i64 0, i64 0), double %65, double %69)
%71 = add nsw i32 %51, %48
%72 = sitofp i32 %71 to double
%73 = fdiv double %66, %72
%74 = fmul double %69, 2.000000e+00
%75 = fmul double %73, %74
%76 = fadd double %69, %73
%77 = fdiv double %75, %76
%78 = fptosi double %77 to i32
%79 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i32 %78)
%80 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %51)
%81 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i32 %48)
%82 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.14, i64 0, i64 0), i32 %50)
%83 = call i32 (i8*, i32, ...) @info(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.15, i64 0, i64 0), i32 %49)
%84 = call i32 @rewind(i32* %5)
%85 = call i32 @rewind(i32* %6)
%86 = fadd double %12, 2.000000e-02
%87 = fcmp ugt double %86, 1.800000e+00
br i1 %87, label %15, label %11
}