#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*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ sscanf(char *, char *, ...);
scalar_t__ strncmp(char *, char *, int);
char *strtok(char *, char *);
int main() {
  FILE *fp;
  char *pch;
  char buff[100];
  unsigned long i = 0;
  fp = fopen("nurbs/1509077_Samsonite.nurbs", "r");
  if (fp == NULL)
    perror("Error opening file.");
  else {
    while (fgets(buff, 100, fp) != NULL) {
      pch = strtok(buff, " :\n");
      if (strncmp("SPLINE", pch, 10) == 0) {
        printf("SPLINE\n");
      } else if (strncmp("n_ctrlp", pch, 10) == 0) {
        pch = strtok(NULL, " :\n");
        int n_ctrlp;
        sscanf(pch, "%d", &n_ctrlp);
        printf("n_ctrlp: %d\n", n_ctrlp);
      } else if (strncmp("ctrlp", pch, 10) == 0) {
        pch = strtok(NULL, " :\n");
        int i;
        float ctrlp[3];
        for (i = 0; i < 3 && pch != NULL; i++) {
          sscanf(pch, "%f", ctrlp + i);
          pch = strtok(NULL, " :\n");
        }
        printf("ctrlp: %f %f %f\n", ctrlp[0], ctrlp[1], ctrlp[2]);
      } else if (strncmp("knot", pch, 10) == 0) {
        pch = strtok(NULL, " :\n");
        float knot;
        sscanf(pch, "%f", &knot);
        printf("knot: %f\n", knot);
      } else if (strncmp("u_min", pch, 10) == 0) {
        pch = strtok(NULL, " :\n");
        float u_min;
        sscanf(pch, "%f", &u_min);
        printf("u_min: %f\n", u_min);
      } else if (strncmp("u_max", pch, 10) == 0) {
        pch = strtok(NULL, " :\n");
        float u_max;
        sscanf(pch, "%f", &u_max);
        printf("u_max: %f\n", u_max);
      } else {
        printf("Parsing error: %s\n", pch);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x88(%rbp)
lea    0xe6c(%rip),%rdi
lea    0xe83(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11c0 <main+0x50>
lea    0xe6a(%rip),%rdi
call   1080 <perror@plt>
jmp    14fb <main+0x38b>
jmp    11c5 <main+0x55>
lea    -0x80(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x64,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     14f6 <main+0x386>
lea    -0x80(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe38(%rip),%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1227 <main+0xb7>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14f1 <main+0x381>
mov    -0x18(%rbp),%rsi
lea    0xe15(%rip),%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    128c <main+0x11c>
xor    %eax,%eax
mov    %eax,%edi
lea    0xde3(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xdea(%rip),%rsi
lea    -0x8c(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
mov    -0x8c(%rbp),%esi
lea    0xdd2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14ec <main+0x37c>
mov    -0x18(%rbp),%rsi
lea    0xdb2(%rip),%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1385 <main+0x215>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd7e(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x90(%rbp)
xor    %eax,%eax
cmpl   $0x3,-0x90(%rbp)
mov    %al,-0xa9(%rbp)
jge    12ec <main+0x17c>
cmpq   $0x0,-0x18(%rbp)
setne  %al
mov    %al,-0xa9(%rbp)
mov    -0xa9(%rbp),%al
test   $0x1,%al
jne    12ff <main+0x18f>
jmp    134e <main+0x1de>
mov    -0x18(%rbp),%rdi
lea    -0x9c(%rbp),%rdx
movslq -0x90(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xd40(%rip),%rsi
mov    $0x0,%al
call   1060 <sscanf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd03(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x90(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x90(%rbp)
jmp    12c9 <main+0x159>
movss  -0x9c(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movss  -0x98(%rbp),%xmm1
ff
cvtss2sd %xmm1,%xmm1
movss  -0x94(%rbp),%xmm2
ff
cvtss2sd %xmm2,%xmm2
lea    0xce9(%rip),%rdi
mov    $0x3,%al
call   1040 <printf@plt>
jmp    14e7 <main+0x377>
mov    -0x18(%rbp),%rsi
lea    0xce3(%rip),%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13f0 <main+0x280>
xor    %eax,%eax
mov    %eax,%edi
lea    0xc85(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xc9c(%rip),%rsi
lea    -0xa0(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
movss  -0xa0(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc94(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    14e2 <main+0x372>
mov    -0x18(%rbp),%rsi
lea    0xc87(%rip),%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    145b <main+0x2eb>
xor    %eax,%eax
mov    %eax,%edi
lea    0xc1a(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xc31(%rip),%rsi
lea    -0xa4(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
movss  -0xa4(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc39(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    14dd <main+0x36d>
mov    -0x18(%rbp),%rsi
lea    0xc2d(%rip),%rdi
mov    $0xa,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14c6 <main+0x356>
xor    %eax,%eax
mov    %eax,%edi
lea    0xbaf(%rip),%rsi
call   1090 <strtok@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xbc6(%rip),%rsi
lea    -0xa8(%rbp),%rdx
mov    $0x0,%al
call   1060 <sscanf@plt>
movss  -0xa8(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xbdf(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    14d8 <main+0x368>
mov    -0x18(%rbp),%rsi
lea    0xbd3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    14dd <main+0x36d>
jmp    14e2 <main+0x372>
jmp    14e7 <main+0x377>
jmp    14ec <main+0x37c>
jmp    14f1 <main+0x381>
jmp    11c5 <main+0x55>
jmp    14fb <main+0x38b>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xe6b(%rip),%rdi
lea    0xe82(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     142f <main+0x2af>
mov    %rax,%r14
lea    0x10(%rsp),%rdi
mov    $0x64,%esi
mov    %rax,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     143b <main+0x2bb>
lea    0xe65(%rip),%r15
lea    0x10(%rsp),%rbx
lea    0xecd(%rip),%rbp
lea    0xe6e(%rip),%r12
jmp    1211 <main+0x91>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     143b <main+0x2bb>
mov    %rbx,%rdi
mov    %r15,%rsi
call   10a0 <strtok@plt>
mov    %rax,%r13
mov    %rbp,%rdi
mov    %rax,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11f0 <main+0x70>
lea    0xdfd(%rip),%rdi
mov    %r13,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12e0 <main+0x160>
lea    0xde2(%rip),%rdi
mov    %r13,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1317 <main+0x197>
lea    0xdef(%rip),%rdi
mov    %r13,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1398 <main+0x218>
lea    0xde1(%rip),%rdi
mov    %r13,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13c7 <main+0x247>
lea    0xdd5(%rip),%rdi
mov    %r13,%rsi
mov    $0xa,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13f6 <main+0x276>
lea    0xdc9(%rip),%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11f8 <main+0x78>
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rdi
lea    0xd4c(%rip),%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
mov    0x4(%rsp),%esi
lea    0xd38(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11f8 <main+0x78>
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <strtok@plt>
test   %rax,%rax
je     136d <main+0x1ed>
mov    %rbx,%r13
lea    0x4(%rsp),%rbp
xor    %ebx,%ebx
mov    %rax,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <strtok@plt>
cmp    $0x1,%rbx
ja     135d <main+0x1dd>
add    $0x1,%rbx
add    $0x4,%rbp
test   %rax,%rax
jne    1330 <main+0x1b0>
movss  0x4(%rsp),%xmm0
mov    %r13,%rbx
lea    0xd3b(%rip),%rbp
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
movss  0xc(%rsp),%xmm2
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
lea    0xcc7(%rip),%rdi
mov    $0x3,%al
call   1050 <printf@plt>
jmp    11f8 <main+0x78>
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rdi
mov    %r12,%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xca4(%rip),%rdi
jmp    1423 <main+0x2a3>
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rdi
mov    %r12,%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc85(%rip),%rdi
jmp    1423 <main+0x2a3>
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rdi
mov    %r12,%rsi
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1070 <sscanf@plt>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xc67(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
jmp    11f8 <main+0x78>
lea    0xbea(%rip),%rdi
call   1090 <perror@plt>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"nurbs/1509077_Samsonite.nurbs\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [20 x i8] c"Error opening file.\00"
@.str.3 = [4 x i8] c" :\0A\00"
@.str.4 = [7 x i8] c"SPLINE\00"
@.str.5 = [8 x i8] c"SPLINE\0A\00"
@.str.6 = [8 x i8] c"n_ctrlp\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [13 x i8] c"n_ctrlp: %d\0A\00"
@.str.9 = [6 x i8] c"ctrlp\00"
@.str.10 = [3 x i8] c"%f\00"
@.str.11 = [17 x i8] c"ctrlp: %f %f %f\0A\00"
@.str.12 = [5 x i8] c"knot\00"
@.str.13 = [10 x i8] c"knot: %f\0A\00"
@.str.14 = [6 x i8] c"u_min\00"
@.str.15 = [11 x i8] c"u_min: %f\0A\00"
@.str.16 = [6 x i8] c"u_max\00"
@.str.17 = [11 x i8] c"u_max: %f\0A\00"
@.str.18 = [19 x i8] c"Parsing error: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8*
%4 = alloca [100 x i8]
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = alloca [3 x float]
%9 = alloca float
%10 = alloca float
%11 = alloca float
store i32 0, i32* %1
store i64 0, i64* %5
%12 = call i32* @fopen(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %12, i32** %2
%13 = load i32*, i32** %2
%14 = icmp eq i32* %13, null
br i1 %14, label %15, label %17
15: ; preds = %0
%16 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %120
17: ; preds = %0
br label %18
18: ; preds = %118, %17
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%20 = load i32*, i32** %2
%21 = call i32* @fgets(i8* %19, i32 100, i32* %20)
%22 = icmp ne i32* %21, null
br i1 %22, label %23, label %119
23: ; preds = %18
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%25 = call i8* @strtok(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %25, i8** %3
%26 = load i8*, i8** %3
%27 = call i64 @strncmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %26, i32 10)
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %23
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %118
31: ; preds = %23
%32 = load i8*, i8** %3
%33 = call i64 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %32, i32 10)
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %41
35: ; preds = %31
%36 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %36, i8** %3
%37 = load i8*, i8** %3
%38 = call i32 (i8*, i8*, ...) @sscanf(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %6)
%39 = load i32, i32* %6
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %39)
br label %117
41: ; preds = %31
%42 = load i8*, i8** %3
%43 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %42, i32 10)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %77
45: ; preds = %41
%46 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %46, i8** %3
store i32 0, i32* %7
br label %47
47: ; preds = %63, %45
%48 = load i32, i32* %7
%49 = icmp slt i32 %48, 3
br i1 %49, label %50, label %53
50: ; preds = %47
%51 = load i8*, i8** %3
%52 = icmp ne i8* %51, null
br label %53
53: ; preds = %50, %47
%54 = phi i1 [ false, %47 ], [ %52, %50 ]
br i1 %54, label %55, label %66
55: ; preds = %53
%56 = load i8*, i8** %3
%57 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%58 = load i32, i32* %7
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds float, float* %57, i64 %59
%61 = call i32 (i8*, i8*, ...) @sscanf(i8* %56, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %60)
%62 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %62, i8** %3
br label %63
63: ; preds = %55
%64 = load i32, i32* %7
%65 = add nsw i32 %64, 1
store i32 %65, i32* %7
br label %47
66: ; preds = %53
%67 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 0
%68 = load float, float* %67
%69 = fpext float %68 to double
%70 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 1
%71 = load float, float* %70
%72 = fpext float %71 to double
%73 = getelementptr inbounds [3 x float], [3 x float]* %8, i64 0, i64 2
%74 = load float, float* %73
%75 = fpext float %74 to double
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), double %69, double %72, double %75)
br label %116
77: ; preds = %41
%78 = load i8*, i8** %3
%79 = call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* %78, i32 10)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %88
81: ; preds = %77
%82 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %82, i8** %3
%83 = load i8*, i8** %3
%84 = call i32 (i8*, i8*, ...) @sscanf(i8* %83, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %9)
%85 = load float, float* %9
%86 = fpext float %85 to double
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), double %86)
br label %115
88: ; preds = %77
%89 = load i8*, i8** %3
%90 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %89, i32 10)
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %99
92: ; preds = %88
%93 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %93, i8** %3
%94 = load i8*, i8** %3
%95 = call i32 (i8*, i8*, ...) @sscanf(i8* %94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %10)
%96 = load float, float* %10
%97 = fpext float %96 to double
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), double %97)
br label %114
99: ; preds = %88
%100 = load i8*, i8** %3
%101 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* %100, i32 10)
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %110
103: ; preds = %99
%104 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
store i8* %104, i8** %3
%105 = load i8*, i8** %3
%106 = call i32 (i8*, i8*, ...) @sscanf(i8* %105, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %11)
%107 = load float, float* %11
%108 = fpext float %107 to double
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0), double %108)
br label %113
110: ; preds = %99
%111 = load i8*, i8** %3
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %111)
br label %113
113: ; preds = %110, %103
br label %114
114: ; preds = %113, %92
br label %115
115: ; preds = %114, %81
br label %116
116: ; preds = %115, %66
br label %117
117: ; preds = %116, %35
br label %118
118: ; preds = %117, %29
br label %18
119: ; preds = %18
br label %120
120: ; preds = %119, %15
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"nurbs/1509077_Samsonite.nurbs\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [20 x i8] c"Error opening file.\00"
@.str.3 = [4 x i8] c" :\0A\00"
@.str.6 = [8 x i8] c"n_ctrlp\00"
@.str.7 = [3 x i8] c"%d\00"
@.str.8 = [13 x i8] c"n_ctrlp: %d\0A\00"
@.str.9 = [6 x i8] c"ctrlp\00"
@.str.10 = [3 x i8] c"%f\00"
@.str.11 = [17 x i8] c"ctrlp: %f %f %f\0A\00"
@.str.12 = [5 x i8] c"knot\00"
@.str.13 = [10 x i8] c"knot: %f\0A\00"
@.str.14 = [6 x i8] c"u_min\00"
@.str.15 = [11 x i8] c"u_min: %f\0A\00"
@.str.16 = [6 x i8] c"u_max\00"
@.str.17 = [11 x i8] c"u_max: %f\0A\00"
@.str.18 = [19 x i8] c"Parsing error: %s\0A\00"
@str = [7 x i8] c"SPLINE\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = alloca i32
%3 = alloca [3 x float]
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%8 = tail call i32* @fopen(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i32* %8, null
br i1 %9, label %22, label %10
10: ; preds = %0
%11 = call i32* @fgets(i8* %7, i32 100, i32* %8)
%12 = icmp eq i32* %11, null
br i1 %12, label %96, label %13
13: ; preds = %10
%14 = bitcast float* %6 to i8*
%15 = bitcast float* %5 to i8*
%16 = bitcast float* %4 to i8*
%17 = bitcast [3 x float]* %3 to i8*
%18 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%19 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 1
%20 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 2
%21 = bitcast i32* %2 to i8*
br label %24
22: ; preds = %0
%23 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %96
24: ; preds = %13, %93
%25 = call i8* @strtok(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%26 = call i64 @strncmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0), i8* %25, i32 10)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
br label %93
30: ; preds = %24
%31 = call i64 @strncmp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* %25, i32 10)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %38
33: ; preds = %30
%34 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%35 = call i32 (i8*, i8*, ...) @sscanf(i8* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32* %2)
%36 = load i32, i32* %2
%37 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %36)
br label %93
38: ; preds = %30
%39 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.9, i64 0, i64 0), i8* %25, i32 10)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %64
41: ; preds = %38
%42 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%43 = icmp eq i8* %42, null
br i1 %43, label %56, label %44
44: ; preds = %41, %44
%45 = phi i64 [ %50, %44 ], [ 0, %41 ]
%46 = phi i8* [ %49, %44 ], [ %42, %41 ]
%47 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 %45
%48 = call i32 (i8*, i8*, ...) @sscanf(i8* %46, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %47)
%49 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%50 = add nuw nsw i64 %45, 1
%51 = icmp ult i64 %45, 2
%52 = icmp ne i8* %49, null
%53 = select i1 %51, i1 %52, i1 false
br i1 %53, label %44, label %54
54: ; preds = %44
%55 = load float, float* %18
br label %56
56: ; preds = %54, %41
%57 = phi float [ %55, %54 ], [ undef, %41 ]
%58 = fpext float %57 to double
%59 = load float, float* %19
%60 = fpext float %59 to double
%61 = load float, float* %20
%62 = fpext float %61 to double
%63 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), double %58, double %60, double %62)
br label %93
64: ; preds = %38
%65 = call i64 @strncmp(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.12, i64 0, i64 0), i8* %25, i32 10)
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %73
67: ; preds = %64
%68 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%69 = call i32 (i8*, i8*, ...) @sscanf(i8* %68, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %4)
%70 = load float, float* %4
%71 = fpext float %70 to double
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), double %71)
br label %93
73: ; preds = %64
%74 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %25, i32 10)
%75 = icmp eq i64 %74, 0
br i1 %75, label %76, label %82
76: ; preds = %73
%77 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%78 = call i32 (i8*, i8*, ...) @sscanf(i8* %77, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %5)
%79 = load float, float* %5
%80 = fpext float %79 to double
%81 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0), double %80)
br label %93
82: ; preds = %73
%83 = call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* %25, i32 10)
%84 = icmp eq i64 %83, 0
br i1 %84, label %85, label %91
85: ; preds = %82
%86 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%87 = call i32 (i8*, i8*, ...) @sscanf(i8* %86, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), float* %6)
%88 = load float, float* %6
%89 = fpext float %88 to double
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0), double %89)
br label %93
91: ; preds = %82
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.18, i64 0, i64 0), i8* %25)
br label %93
93: ; preds = %33, %67, %85, %91, %76, %56, %28
%94 = call i32* @fgets(i8* %7, i32 100, i32* %8)
%95 = icmp eq i32* %94, null
br i1 %95, label %96, label %24
96: ; preds = %93, %10, %22
ret i32 0
}