#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*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ sscanf(char *, char *, ...);
char *strtok(char *, char *);
int read_coords_oskar(const char *filename, unsigned long int ncoords,
                      double *x, double *y, double *lenu, double *lenv) {
  FILE *fp;
  char *token;
  char line[100];
  unsigned long int index, i = 0;
  double maxx = 0.;
  double minx = 0.;
  double maxy = 0.;
  double miny = 0.;
  fp = fopen(filename, "r");
  if (!fp) {
    printf("ERROR: Unable to open the file %s\n", filename);
    exit(EXIT_FAILURE);
    return 1;
  }
  while (!feof(fp) && i < ncoords) {
    fgets(line, 100, fp);
    token = strtok(line, " ,\n");
    if (token && (token[0] != '#')) {
      if (token)
        sscanf(token, "%lu", &index);
      token = strtok(NULL, " ,\n");
      if (token) {
        sscanf(token, "%lf", &x[i]);
        if (x[i] > maxx)
          maxx = x[i];
        if (x[i] < minx)
          minx = x[i];
      }
      token = strtok(NULL, " ,\n");
      if (token) {
        sscanf(token, "%lf", &y[i]);
        if (y[i] > maxy)
          maxy = y[i];
        if (y[i] < miny)
          miny = y[i];
        i++;
      }
    }
  }
  if (maxx > -minx)
    *lenu = maxx;
  else
    *lenu = -minx;
  if (maxy > -miny)
    *lenv = maxy;
  else
    *lenv = -miny;
  fclose(fp);
  return i;
}


x86 assembly (clang, -O0):
<read_coords_oskar>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movq   $0x0,-0xc0(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x8(%rbp),%rdi
lea    0xe1b(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1217 <read_coords_oskar+0x97>
mov    -0x8(%rbp),%rsi
lea    0xdfe(%rip),%rdi
call   1040 <printf@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    121c <read_coords_oskar+0x9c>
mov    -0x38(%rbp),%rdi
call   1060 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xe1(%rbp)
jne    124c <read_coords_oskar+0xcc>
mov    -0xc0(%rbp),%rax
cmp    -0x10(%rbp),%rax
setb   %al
mov    %al,-0xe1(%rbp)
mov    -0xe1(%rbp),%al
test   $0x1,%al
jne    125f <read_coords_oskar+0xdf>
jmp    1451 <read_coords_oskar+0x2d1>
lea    -0xb0(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    $0x64,%esi
call   1050 <fgets@plt>
lea    -0xb0(%rbp),%rdi
lea    0xda3(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     144c <read_coords_oskar+0x2cc>
mov    -0x40(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     144c <read_coords_oskar+0x2cc>
cmpq   $0x0,-0x40(%rbp)
je     12ca <read_coords_oskar+0x14a>
mov    -0x40(%rbp),%rdi
lea    0xd6d(%rip),%rsi
lea    -0xb8(%rbp),%rdx
mov    $0x0,%al
call   1070 <sscanf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd50(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     1382 <read_coords_oskar+0x202>
mov    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0xc0(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xd27(%rip),%rsi
mov    $0x0,%al
call   1070 <sscanf@plt>
mov    -0x18(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0xc8(%rbp),%xmm0
ff
jbe    1343 <read_coords_oskar+0x1c3>
mov    -0x18(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
mov    -0x18(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    137d <read_coords_oskar+0x1fd>
mov    -0x18(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1382 <read_coords_oskar+0x202>
xor    %eax,%eax
mov    %eax,%edi
lea    0xc98(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     1447 <read_coords_oskar+0x2c7>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0xc0(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdx
lea    0xc6f(%rip),%rsi
mov    $0x0,%al
call   1070 <sscanf@plt>
mov    -0x20(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0xd8(%rbp),%xmm0
ff
jbe    13fb <read_coords_oskar+0x27b>
mov    -0x20(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x20(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0xe0(%rbp),%xmm0
ff
ucomisd %xmm1,%xmm0
jbe    1435 <read_coords_oskar+0x2b5>
mov    -0x20(%rbp),%rax
mov    -0xc0(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0xc0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xc0(%rbp)
jmp    144c <read_coords_oskar+0x2cc>
jmp    121c <read_coords_oskar+0x9c>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xd0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jbe    1497 <read_coords_oskar+0x317>
movsd  -0xc8(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14be <read_coords_oskar+0x33e>
movsd  -0xd0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xd8(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
ucomisd %xmm1,%xmm0
jbe    1504 <read_coords_oskar+0x384>
movsd  -0xd8(%rbp),%xmm0
ff
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    152b <read_coords_oskar+0x3ab>
movsd  -0xe0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0xc0(%rbp),%rax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_coords_oskar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
mov    %r9,%r15
mov    %r8,%rbp
mov    %rcx,0x60(%rsp)
mov    %rdx,0x58(%rsp)
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xe62(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     140d <read_coords_oskar+0x28d>
mov    %rax,%r12
mov    %rbp,0x48(%rsp)
mov    %r15,0x50(%rsp)
mov    %rax,%rdi
call   1060 <feof@plt>
xor    %ebx,%ebx
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
test   %eax,%eax
jne    1397 <read_coords_oskar+0x217>
movapd %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
test   %r14,%r14
je     13b0 <read_coords_oskar+0x230>
xorpd  %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
lea    0x70(%rsp),%r15
lea    0xe14(%rip),%rbp
xorpd  %xmm0,%xmm0
movapd %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
xor    %ebx,%ebx
mov    %r15,%rdi
mov    $0x64,%esi
mov    %r12,%rdx
call   1050 <fgets@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   1090 <strtok@plt>
test   %rax,%rax
je     1380 <read_coords_oskar+0x200>
cmpb   $0x23,(%rax)
je     1380 <read_coords_oskar+0x200>
mov    %rax,%rdi
lea    0xdc2(%rip),%rsi
lea    0x68(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
xor    %edi,%edi
mov    %rbp,%rsi
call   1090 <strtok@plt>
test   %rax,%rax
je     12de <read_coords_oskar+0x15e>
mov    %rbp,%r13
mov    0x58(%rsp),%rbp
lea    0x0(,%rbx,8),%rdx
add    %rbp,%rdx
mov    %rax,%rdi
lea    0xd8e(%rip),%rsi
xor    %eax,%eax
call   1070 <sscanf@plt>
movsd  0x0(%rbp,%rbx,8),%xmm2
movapd %xmm2,%xmm1
maxsd  0x10(%rsp),%xmm1
movapd (%rsp),%xmm0
ucomisd %xmm2,%xmm0
movsd  %xmm1,0x10(%rsp)
jbe    12f5 <read_coords_oskar+0x175>
movsd  %xmm2,(%rsp)
jmp    12fa <read_coords_oskar+0x17a>
movaps 0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd (%rsp),%xmm0
movsd  %xmm0,(%rsp)
jmp    12fd <read_coords_oskar+0x17d>
movsd  %xmm0,(%rsp)
mov    %r13,%rbp
xor    %edi,%edi
mov    %rbp,%rsi
call   1090 <strtok@plt>
test   %rax,%rax
je     136b <read_coords_oskar+0x1eb>
mov    0x60(%rsp),%r13
lea    0x0(,%rbx,8),%rdx
add    %r13,%rdx
mov    %rax,%rdi
lea    0xd17(%rip),%rsi
xor    %eax,%eax
call   1070 <sscanf@plt>
movsd  0x0(%r13,%rbx,8),%xmm0
movapd %xmm0,%xmm1
maxsd  0x20(%rsp),%xmm1
minsd  0x30(%rsp),%xmm0
add    $0x1,%rbx
movsd  0x10(%rsp),%xmm2
movaps %xmm2,0x10(%rsp)
movsd  (%rsp),%xmm2
movapd %xmm2,(%rsp)
movapd %xmm1,0x20(%rsp)
movapd %xmm0,0x30(%rsp)
jmp    1380 <read_coords_oskar+0x200>
movsd  0x10(%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
movapd %xmm0,(%rsp)
mov    %r12,%rdi
call   1060 <feof@plt>
test   %eax,%eax
jne    13b0 <read_coords_oskar+0x230>
cmp    %r14,%rbx
jb     1240 <read_coords_oskar+0xc0>
jmp    13b0 <read_coords_oskar+0x230>
movapd %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x20(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
movapd 0xc48(%rip),%xmm0
movapd (%rsp),%xmm2
xorpd  %xmm0,%xmm2
movapd 0x10(%rsp),%xmm1
maxsd  %xmm2,%xmm1
mov    0x48(%rsp),%rax
movsd  %xmm1,(%rax)
movapd 0x30(%rsp),%xmm1
xorpd  %xmm0,%xmm1
movapd 0x20(%rsp),%xmm0
maxsd  %xmm1,%xmm0
mov    0x50(%rsp),%rax
movsd  %xmm0,(%rax)
mov    %r12,%rdi
call   1030 <fclose@plt>
mov    %ebx,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xbfe(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    0x2bbd(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [35 x i8] c"ERROR: Unable to open the file %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [4 x i8] c" ,\0A\00"
@.str.3 = [4 x i8] c"%lu\00"
@.str.4 = [4 x i8] c"%lf\00"
define i32 @read_coords_oskar(i8* %0, i64 %1, double* %2, double* %3, double* %4, double* %5) {
%7 = alloca i8*
%8 = alloca i64
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
%13 = alloca i32*
%14 = alloca i8*
%15 = alloca [100 x i8]
%16 = alloca i64
%17 = alloca i64
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
store i8* %0, i8** %7
store i64 %1, i64* %8
store double* %2, double** %9
store double* %3, double** %10
store double* %4, double** %11
store double* %5, double** %12
store i64 0, i64* %17
store double 0.000000e+00, double* %18
store double 0.000000e+00, double* %19
store double 0.000000e+00, double* %20
store double 0.000000e+00, double* %21
%22 = load i8*, i8** %7
%23 = call i32* @fopen(i8* %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %23, i32** %13
%24 = load i32*, i32** %13
%25 = icmp ne i32* %24, null
br i1 %25, label %31, label %26
26: ; preds = %6
%27 = load i8*, i8** %7
%28 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %27)
%29 = load i32, i32* @EXIT_FAILURE
%30 = call i32 @exit(i32 %29)
unreachable
31: ; preds = %6
br label %32
32: ; preds = %133, %31
%33 = load i32*, i32** %13
%34 = call i32 @feof(i32* %33)
%35 = icmp ne i32 %34, 0
br i1 %35, label %40, label %36
36: ; preds = %32
%37 = load i64, i64* %17
%38 = load i64, i64* %8
%39 = icmp ult i64 %37, %38
br label %40
40: ; preds = %36, %32
%41 = phi i1 [ false, %32 ], [ %39, %36 ]
br i1 %41, label %42, label %134
42: ; preds = %40
%43 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%44 = load i32*, i32** %13
%45 = call i32 @fgets(i8* %43, i32 100, i32* %44)
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %15, i64 0, i64 0
%47 = call i8* @strtok(i8* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %47, i8** %14
%48 = load i8*, i8** %14
%49 = icmp ne i8* %48, null
br i1 %49, label %50, label %133
50: ; preds = %42
%51 = load i8*, i8** %14
%52 = getelementptr inbounds i8, i8* %51, i64 0
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp ne i32 %54, 35
br i1 %55, label %56, label %133
56: ; preds = %50
%57 = load i8*, i8** %14
%58 = icmp ne i8* %57, null
br i1 %58, label %59, label %62
59: ; preds = %56
%60 = load i8*, i8** %14
%61 = call i32 (i8*, i8*, ...) @sscanf(i8* %60, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64* %16)
br label %62
62: ; preds = %59, %56
%63 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %63, i8** %14
%64 = load i8*, i8** %14
%65 = icmp ne i8* %64, null
br i1 %65, label %66, label %96
66: ; preds = %62
%67 = load i8*, i8** %14
%68 = load double*, double** %9
%69 = load i64, i64* %17
%70 = getelementptr inbounds double, double* %68, i64 %69
%71 = call i32 (i8*, i8*, ...) @sscanf(i8* %67, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %70)
%72 = load double*, double** %9
%73 = load i64, i64* %17
%74 = getelementptr inbounds double, double* %72, i64 %73
%75 = load double, double* %74
%76 = load double, double* %18
%77 = fcmp ogt double %75, %76
br i1 %77, label %78, label %83
78: ; preds = %66
%79 = load double*, double** %9
%80 = load i64, i64* %17
%81 = getelementptr inbounds double, double* %79, i64 %80
%82 = load double, double* %81
store double %82, double* %18
br label %83
83: ; preds = %78, %66
%84 = load double*, double** %9
%85 = load i64, i64* %17
%86 = getelementptr inbounds double, double* %84, i64 %85
%87 = load double, double* %86
%88 = load double, double* %19
%89 = fcmp olt double %87, %88
br i1 %89, label %90, label %95
90: ; preds = %83
%91 = load double*, double** %9
%92 = load i64, i64* %17
%93 = getelementptr inbounds double, double* %91, i64 %92
%94 = load double, double* %93
store double %94, double* %19
br label %95
95: ; preds = %90, %83
br label %96
96: ; preds = %95, %62
%97 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i8* %97, i8** %14
%98 = load i8*, i8** %14
%99 = icmp ne i8* %98, null
br i1 %99, label %100, label %132
100: ; preds = %96
%101 = load i8*, i8** %14
%102 = load double*, double** %10
%103 = load i64, i64* %17
%104 = getelementptr inbounds double, double* %102, i64 %103
%105 = call i32 (i8*, i8*, ...) @sscanf(i8* %101, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %104)
%106 = load double*, double** %10
%107 = load i64, i64* %17
%108 = getelementptr inbounds double, double* %106, i64 %107
%109 = load double, double* %108
%110 = load double, double* %20
%111 = fcmp ogt double %109, %110
br i1 %111, label %112, label %117
112: ; preds = %100
%113 = load double*, double** %10
%114 = load i64, i64* %17
%115 = getelementptr inbounds double, double* %113, i64 %114
%116 = load double, double* %115
store double %116, double* %20
br label %117
117: ; preds = %112, %100
%118 = load double*, double** %10
%119 = load i64, i64* %17
%120 = getelementptr inbounds double, double* %118, i64 %119
%121 = load double, double* %120
%122 = load double, double* %21
%123 = fcmp olt double %121, %122
br i1 %123, label %124, label %129
124: ; preds = %117
%125 = load double*, double** %10
%126 = load i64, i64* %17
%127 = getelementptr inbounds double, double* %125, i64 %126
%128 = load double, double* %127
store double %128, double* %21
br label %129
129: ; preds = %124, %117
%130 = load i64, i64* %17
%131 = add i64 %130, 1
store i64 %131, i64* %17
br label %132
132: ; preds = %129, %96
br label %133
133: ; preds = %132, %50, %42
br label %32
134: ; preds = %40
%135 = load double, double* %18
%136 = load double, double* %19
%137 = fneg double %136
%138 = fcmp ogt double %135, %137
br i1 %138, label %139, label %142
139: ; preds = %134
%140 = load double, double* %18
%141 = load double*, double** %11
store double %140, double* %141
br label %146
142: ; preds = %134
%143 = load double, double* %19
%144 = fneg double %143
%145 = load double*, double** %11
store double %144, double* %145
br label %146
146: ; preds = %142, %139
%147 = load double, double* %20
%148 = load double, double* %21
%149 = fneg double %148
%150 = fcmp ogt double %147, %149
br i1 %150, label %151, label %154
151: ; preds = %146
%152 = load double, double* %20
%153 = load double*, double** %12
store double %152, double* %153
br label %158
154: ; preds = %146
%155 = load double, double* %21
%156 = fneg double %155
%157 = load double*, double** %12
store double %156, double* %157
br label %158
158: ; preds = %154, %151
%159 = load i32*, i32** %13
%160 = call i32 @fclose(i32* %159)
%161 = load i64, i64* %17
%162 = trunc i64 %161 to i32
ret i32 %162
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [35 x i8] c"ERROR: Unable to open the file %s\0A\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [4 x i8] c" ,\0A\00"
@.str.3 = [4 x i8] c"%lu\00"
@.str.4 = [4 x i8] c"%lf\00"
define i32 @read_coords_oskar(i8* %0, i64 %1, double* %2, double* %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = alloca [100 x i8]
%8 = alloca i64
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%10 = bitcast i64* %8 to i8*
%11 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i32* %11, null
br i1 %12, label %18, label %13
13: ; preds = %6
%14 = call i32 @feof(i32* %11)
%15 = icmp eq i32 %14, 0
%16 = icmp ne i64 %1, 0
%17 = and i1 %15, %16
br i1 %17, label %22, label %70
18: ; preds = %6
%19 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%20 = load i32, i32* @EXIT_FAILURE
%21 = tail call i32 @exit(i32 %20)
unreachable
22: ; preds = %13, %60
%23 = phi double [ %65, %60 ], [ 0.000000e+00, %13 ]
%24 = phi double [ %64, %60 ], [ 0.000000e+00, %13 ]
%25 = phi double [ %63, %60 ], [ 0.000000e+00, %13 ]
%26 = phi double [ %62, %60 ], [ 0.000000e+00, %13 ]
%27 = phi i64 [ %61, %60 ], [ 0, %13 ]
%28 = call i32 @fgets(i8* %9, i32 100, i32* %11)
%29 = call i8* @strtok(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%30 = icmp eq i8* %29, null
br i1 %30, label %60, label %31
31: ; preds = %22
%32 = load i8, i8* %29
%33 = icmp eq i8 %32, 35
br i1 %33, label %60, label %34
34: ; preds = %31
%35 = call i32 (i8*, i8*, ...) @sscanf(i8* %29, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i64* %8)
%36 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%37 = icmp eq i8* %36, null
br i1 %37, label %46, label %38
38: ; preds = %34
%39 = getelementptr inbounds double, double* %2, i64 %27
%40 = call i32 (i8*, i8*, ...) @sscanf(i8* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %39)
%41 = load double, double* %39
%42 = fcmp ogt double %41, %26
%43 = select i1 %42, double %41, double %26
%44 = fcmp olt double %41, %25
br i1 %44, label %45, label %46
45: ; preds = %38
br label %46
46: ; preds = %38, %45, %34
%47 = phi double [ %43, %45 ], [ %43, %38 ], [ %26, %34 ]
%48 = phi double [ %41, %45 ], [ %25, %38 ], [ %25, %34 ]
%49 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%50 = icmp eq i8* %49, null
br i1 %50, label %60, label %51
51: ; preds = %46
%52 = getelementptr inbounds double, double* %3, i64 %27
%53 = call i32 (i8*, i8*, ...) @sscanf(i8* %49, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), double* %52)
%54 = load double, double* %52
%55 = fcmp ogt double %54, %24
%56 = select i1 %55, double %54, double %24
%57 = fcmp olt double %54, %23
%58 = select i1 %57, double %54, double %23
%59 = add nuw i64 %27, 1
br label %60
60: ; preds = %46, %51, %31, %22
%61 = phi i64 [ %59, %51 ], [ %27, %46 ], [ %27, %31 ], [ %27, %22 ]
%62 = phi double [ %47, %51 ], [ %47, %46 ], [ %26, %31 ], [ %26, %22 ]
%63 = phi double [ %48, %51 ], [ %48, %46 ], [ %25, %31 ], [ %25, %22 ]
%64 = phi double [ %56, %51 ], [ %24, %46 ], [ %24, %31 ], [ %24, %22 ]
%65 = phi double [ %58, %51 ], [ %23, %46 ], [ %23, %31 ], [ %23, %22 ]
%66 = call i32 @feof(i32* %11)
%67 = icmp eq i32 %66, 0
%68 = icmp ult i64 %61, %1
%69 = select i1 %67, i1 %68, i1 false
br i1 %69, label %22, label %70
70: ; preds = %60, %13
%71 = phi i64 [ 0, %13 ], [ %61, %60 ]
%72 = phi double [ 0.000000e+00, %13 ], [ %62, %60 ]
%73 = phi double [ 0.000000e+00, %13 ], [ %63, %60 ]
%74 = phi double [ 0.000000e+00, %13 ], [ %64, %60 ]
%75 = phi double [ 0.000000e+00, %13 ], [ %65, %60 ]
%76 = fneg double %73
%77 = fcmp ogt double %72, %76
%78 = select i1 %77, double %72, double %76
store double %78, double* %4
%79 = fneg double %75
%80 = fcmp ogt double %74, %79
%81 = select i1 %80, double %74, double %79
store double %81, double* %5
%82 = call i32 @fclose(i32* %11)
%83 = trunc i64 %71 to i32
ret i32 %83
}