#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*/ ERR_cleanUp();
int ERR_dump();
int /*<<< orphan*/ ERR_initialize();
int /*<<< orphan*/ H_create();
int /*<<< orphan*/ H_destroy();
int /*<<< orphan*/ convertMatrices();
int /*<<< orphan*/ initParser();
int /*<<< orphan*/ printf(char *);
int yyparse();
int readMDPFile(FILE *file) {
  int returnValue, dump_status;
  extern FILE *yyin;
  initParser();
  ERR_initialize();
  H_create();
  yyin = file;
  returnValue = yyparse();
  if (returnValue != 0) {
    printf("\nParameter file contains syntax errors!\n");
  }
  dump_status = ERR_dump();
  ERR_cleanUp();
  H_destroy();
  if (dump_status || returnValue)
    return (0);
  convertMatrices();
  return (1);
}


x86 assembly (clang, -O0):
<readMDPFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   10b0 <initParser@plt>
mov    $0x0,%al
call   1080 <ERR_initialize@plt>
mov    $0x0,%al
call   10a0 <H_create@plt>
mov    -0x10(%rbp),%rcx
mov    0x2e24(%rip),%rax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1040 <yyparse@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11df <readMDPFile+0x4f>
lea    0xe26(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1060 <ERR_dump@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <ERR_cleanUp@plt>
mov    $0x0,%al
call   1090 <H_destroy@plt>
cmpl   $0x0,-0x18(%rbp)
jne    120b <readMDPFile+0x7b>
cmpl   $0x0,-0x14(%rbp)
je     1217 <readMDPFile+0x87>
movl   $0x0,-0x4(%rbp)
jmp    1225 <readMDPFile+0x95>
mov    $0x0,%al
call   1070 <convertMatrices@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readMDPFile>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbp
xor    %r14d,%r14d
xor    %eax,%eax
call   10b0 <initParser@plt>
xor    %eax,%eax
call   1080 <ERR_initialize@plt>
xor    %eax,%eax
call   10a0 <H_create@plt>
mov    0x2e2a(%rip),%rax
mov    %rbp,(%rax)
xor    %eax,%eax
call   1050 <yyparse@plt>
mov    %eax,%ebp
test   %eax,%eax
je     11d2 <readMDPFile+0x42>
lea    0xe33(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1060 <ERR_dump@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <ERR_cleanUp@plt>
xor    %eax,%eax
call   1090 <H_destroy@plt>
or     %ebp,%ebx
jne    11fa <readMDPFile+0x6a>
xor    %eax,%eax
call   1070 <convertMatrices@plt>
mov    $0x1,%r14d
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@yyin = external global i32*
@.str = [41 x i8] c"\0AParameter file contains syntax errors!\0A\00"
define i32 @readMDPFile(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
%6 = call i32 (...) @initParser()
%7 = call i32 (...) @ERR_initialize()
%8 = call i32 (...) @H_create()
%9 = load i32*, i32** %3
store i32* %9, i32** @yyin
%10 = call i32 (...) @yyparse()
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %1
%16 = call i32 (...) @ERR_dump()
store i32 %16, i32* %5
%17 = call i32 (...) @ERR_cleanUp()
%18 = call i32 (...) @H_destroy()
%19 = load i32, i32* %5
%20 = icmp ne i32 %19, 0
br i1 %20, label %24, label %21
21: ; preds = %15
%22 = load i32, i32* %4
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %21, %15
store i32 0, i32* %2
br label %27
25: ; preds = %21
%26 = call i32 (...) @convertMatrices()
store i32 1, i32* %2
br label %27
27: ; preds = %25, %24
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
@yyin = external global i32*
@str = [40 x i8] c"\0AParameter file contains syntax errors!\00"
define i32 @readMDPFile(i32* %0) {
%2 = tail call i32 (...) @initParser()
%3 = tail call i32 (...) @ERR_initialize()
%4 = tail call i32 (...) @H_create()
store i32* %0, i32** @yyin
%5 = tail call i32 (...) @yyparse()
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = tail call i32 (...) @ERR_dump()
%11 = tail call i32 (...) @ERR_cleanUp()
%12 = tail call i32 (...) @H_destroy()
%13 = icmp ne i32 %10, 0
%14 = select i1 %13, i1 true, i1 %6
br i1 %14, label %17, label %15
15: ; preds = %9
%16 = tail call i32 (...) @convertMatrices()
br label %17
17: ; preds = %9, %15
%18 = phi i32 [ 1, %15 ], [ 0, %9 ]
ret i32 %18
}