#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 */
scalar_t__ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fscanf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ seky_delete(int);
int /*<<< orphan*/ seky_findinterval(int, int);
int /*<<< orphan*/ seky_findpoint(int);
int /*<<< orphan*/ seky_insert(int, int, int);
void seky_parser() {
  char prikaz[100];
  int p[3];
  FILE *f;
  f = fopen("subor.txt", "r");
  while (1) {
    fscanf(f, "%s", prikaz);
    if (prikaz == NULL || feof(f) || prikaz[0] == 'Q') {
      return;
    }
    if (prikaz[0] == 'I') {
      fscanf(f, "%d", &p[0]);
      fscanf(f, "%d", &p[1]);
      fscanf(f, "%d", &p[2]);
      seky_insert(p[0], p[1], p[2]);
    } else if (prikaz[0] == 'F' && prikaz[4] == 'I') {
      fscanf(f, "%d", &p[0]);
      fscanf(f, "%d", &p[1]);
      fscanf(f, "%d", &p[2]);
      seky_findinterval(p[0], p[1]);
    } else if (prikaz[0] == 'F' && prikaz[4] == 'P') {
      fscanf(f, "%d", &p[0]);
      seky_findpoint(p[0]);
    } else if (prikaz[0] == 'D') {
      fscanf(f, "%d", &p[0]);
      seky_delete(p[0]);
    } else {
      printf("Error");
    }
  }
}


x86 assembly (clang, -O0):
<seky_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    0xe6e(%rip),%rdi
lea    0xe7b(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rdi
lea    -0x70(%rbp),%rdx
lea    0xe53(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x88(%rbp),%rdi
call   1080 <feof@plt>
cmp    $0x0,%rax
jne    11e1 <seky_parser+0x61>
movsbl -0x70(%rbp),%eax
cmp    $0x51,%eax
jne    11ea <seky_parser+0x6a>
add    $0x90,%rsp
pop    %rbp
ret
movsbl -0x70(%rbp),%eax
cmp    $0x49,%eax
jne    125d <seky_parser+0xdd>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
lea    0xe04(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
add    $0x4,%rdx
lea    0xde7(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
add    $0x8,%rdx
lea    0xdca(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x7c(%rbp),%edi
mov    -0x78(%rbp),%esi
mov    -0x74(%rbp),%edx
call   1030 <seky_insert@plt>
jmp    1368 <seky_parser+0x1e8>
movsbl -0x70(%rbp),%eax
cmp    $0x46,%eax
jne    12da <seky_parser+0x15a>
movsbl -0x6c(%rbp),%eax
cmp    $0x49,%eax
jne    12da <seky_parser+0x15a>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
lea    0xd84(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
add    $0x4,%rdx
lea    0xd67(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
add    $0x8,%rdx
lea    0xd4a(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x7c(%rbp),%edi
mov    -0x78(%rbp),%esi
call   1090 <seky_findinterval@plt>
jmp    1363 <seky_parser+0x1e3>
movsbl -0x70(%rbp),%eax
cmp    $0x46,%eax
jne    131a <seky_parser+0x19a>
movsbl -0x6c(%rbp),%eax
cmp    $0x50,%eax
jne    131a <seky_parser+0x19a>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
lea    0xd07(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x7c(%rbp),%edi
call   1040 <seky_findpoint@plt>
jmp    135e <seky_parser+0x1de>
movsbl -0x70(%rbp),%eax
cmp    $0x44,%eax
jne    134d <seky_parser+0x1cd>
mov    -0x88(%rbp),%rdi
lea    -0x7c(%rbp),%rdx
lea    0xcd4(%rip),%rsi
mov    $0x0,%al
call   1070 <fscanf@plt>
mov    -0x7c(%rbp),%edi
call   1060 <seky_delete@plt>
jmp    1359 <seky_parser+0x1d9>
lea    0xcbc(%rip),%rdi
call   1050 <printf@plt>
jmp    135e <seky_parser+0x1de>
jmp    1363 <seky_parser+0x1e3>
jmp    1368 <seky_parser+0x1e8>
jmp    11a5 <seky_parser+0x25>

x86 assembly (clang, -O2):
<seky_parser>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
lea    0xe6b(%rip),%rdi
lea    0xe78(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbx
lea    0xe5f(%rip),%rsi
lea    0x10(%rsp),%rdx
mov    %rax,%rdi
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    131a <seky_parser+0x19a>
mov    0x10(%rsp),%al
cmp    $0x51,%al
je     131a <seky_parser+0x19a>
lea    0xc(%rsp),%r15
lea    0xe2a(%rip),%r12
lea    0x4(%rsp),%r13
lea    0xe1b(%rip),%rbp
lea    0x10(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0x49,%al
jne    1250 <seky_parser+0xd0>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x4(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
call   1030 <seky_insert@plt>
jmp    12f0 <seky_parser+0x170>
nopl   0x0(%rax)
movzbl 0x14(%rsp),%ecx
cmp    $0x46,%al
jne    12a0 <seky_parser+0x120>
cmp    $0x49,%cl
jne    12a0 <seky_parser+0x120>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
lea    0x8(%rsp),%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x4(%rsp),%edi
mov    0x8(%rsp),%esi
call   1090 <seky_findinterval@plt>
jmp    12f0 <seky_parser+0x170>
nop
cmp    $0x46,%al
jne    12c4 <seky_parser+0x144>
cmp    $0x50,%cl
jne    12c4 <seky_parser+0x144>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x4(%rsp),%edi
call   1040 <seky_findpoint@plt>
jmp    12f0 <seky_parser+0x170>
cmp    $0x44,%al
jne    12e3 <seky_parser+0x163>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    0x4(%rsp),%edi
call   1060 <seky_delete@plt>
jmp    12f0 <seky_parser+0x170>
lea    0xd26(%rip),%rdi
call   1050 <printf@plt>
nop
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <fscanf@plt>
mov    %rbx,%rdi
call   1080 <feof@plt>
test   %rax,%rax
jne    131a <seky_parser+0x19a>
movzbl 0x10(%rsp),%eax
cmp    $0x51,%al
jne    1200 <seky_parser+0x80>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"subor.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [6 x i8] c"Error\00"
define void @seky_parser() {
%1 = alloca [100 x i8]
%2 = alloca [3 x i32]
%3 = alloca i32*
%4 = call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
br label %5
5: ; preds = %0, %99
%6 = load i32*, i32** %3
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%8 = call i32 (i32*, i8*, ...) @fscanf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = load i32*, i32** %3
%10 = call i64 @feof(i32* %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %5
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 81
br i1 %16, label %17, label %18
17: ; preds = %12, %5
ret void
18: ; preds = %12
%19 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 73
br i1 %22, label %23, label %40
23: ; preds = %18
%24 = load i32*, i32** %3
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%26 = call i32 (i32*, i8*, ...) @fscanf(i32* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %25)
%27 = load i32*, i32** %3
%28 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%29 = call i32 (i32*, i8*, ...) @fscanf(i32* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %28)
%30 = load i32*, i32** %3
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%32 = call i32 (i32*, i8*, ...) @fscanf(i32* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %31)
%33 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%34 = load i32, i32* %33
%35 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%36 = load i32, i32* %35
%37 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%38 = load i32, i32* %37
%39 = call i32 @seky_insert(i32 %34, i32 %36, i32 %38)
br label %99
40: ; preds = %18
%41 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 70
br i1 %44, label %45, label %65
45: ; preds = %40
%46 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 4
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp eq i32 %48, 73
br i1 %49, label %50, label %65
50: ; preds = %45
%51 = load i32*, i32** %3
%52 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%53 = call i32 (i32*, i8*, ...) @fscanf(i32* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %52)
%54 = load i32*, i32** %3
%55 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%56 = call i32 (i32*, i8*, ...) @fscanf(i32* %54, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %55)
%57 = load i32*, i32** %3
%58 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
%59 = call i32 (i32*, i8*, ...) @fscanf(i32* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %58)
%60 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%61 = load i32, i32* %60
%62 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%63 = load i32, i32* %62
%64 = call i32 @seky_findinterval(i32 %61, i32 %63)
br label %98
65: ; preds = %45, %40
%66 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = icmp eq i32 %68, 70
br i1 %69, label %70, label %82
70: ; preds = %65
%71 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 4
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %73, 80
br i1 %74, label %75, label %82
75: ; preds = %70
%76 = load i32*, i32** %3
%77 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%78 = call i32 (i32*, i8*, ...) @fscanf(i32* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %77)
%79 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%80 = load i32, i32* %79
%81 = call i32 @seky_findpoint(i32 %80)
br label %97
82: ; preds = %70, %65
%83 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 68
br i1 %86, label %87, label %94
87: ; preds = %82
%88 = load i32*, i32** %3
%89 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%90 = call i32 (i32*, i8*, ...) @fscanf(i32* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %89)
%91 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%92 = load i32, i32* %91
%93 = call i32 @seky_delete(i32 %92)
br label %96
94: ; preds = %82
%95 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %96
96: ; preds = %94, %87
br label %97
97: ; preds = %96, %75
br label %98
98: ; preds = %97, %50
br label %99
99: ; preds = %98, %23
br label %5
}

LLVM IR (-O2):
@.str = [10 x i8] c"subor.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [6 x i8] c"Error\00"
define void @seky_parser() {
%1 = alloca [100 x i8]
%2 = alloca [3 x i32]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%4 = bitcast [3 x i32]* %2 to i8*
%5 = tail call i32* @fopen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%7 = call i64 @feof(i32* %5)
%8 = icmp ne i64 %7, 0
%9 = load i8, i8* %3
%10 = icmp eq i8 %9, 81
%11 = select i1 %8, i1 true, i1 %10
br i1 %11, label %17, label %12
12: ; preds = %0
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 4
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 1
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 2
br label %18
17: ; preds = %56, %0
ret void
18: ; preds = %12, %56
%19 = phi i8 [ %9, %12 ], [ %60, %56 ]
%20 = icmp eq i8 %19, 73
br i1 %20, label %21, label %29
21: ; preds = %18
%22 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%23 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %15)
%24 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %16)
%25 = load i32, i32* %14
%26 = load i32, i32* %15
%27 = load i32, i32* %16
%28 = call i32 @seky_insert(i32 %25, i32 %26, i32 %27)
br label %56
29: ; preds = %18
%30 = icmp eq i8 %19, 70
%31 = load i8, i8* %13
%32 = icmp eq i8 %31, 73
%33 = select i1 %30, i1 %32, i1 false
br i1 %33, label %34, label %41
34: ; preds = %29
%35 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%36 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %15)
%37 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %16)
%38 = load i32, i32* %14
%39 = load i32, i32* %15
%40 = call i32 @seky_findinterval(i32 %38, i32 %39)
br label %56
41: ; preds = %29
%42 = icmp eq i8 %31, 80
%43 = select i1 %30, i1 %42, i1 false
br i1 %43, label %44, label %48
44: ; preds = %41
%45 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%46 = load i32, i32* %14
%47 = call i32 @seky_findpoint(i32 %46)
br label %56
48: ; preds = %41
%49 = icmp eq i8 %19, 68
br i1 %49, label %50, label %54
50: ; preds = %48
%51 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %14)
%52 = load i32, i32* %14
%53 = call i32 @seky_delete(i32 %52)
br label %56
54: ; preds = %48
%55 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %56
56: ; preds = %34, %50, %54, %44, %21
%57 = call i32 (i32*, i8*, ...) @fscanf(i32* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%58 = call i64 @feof(i32* %5)
%59 = icmp ne i64 %58, 0
%60 = load i8, i8* %3
%61 = icmp eq i8 %60, 81
%62 = select i1 %59, i1 true, i1 %61
br i1 %62, label %17, label %18
}