#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 */
struct RNAMemory {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_lmatrix(long **, int /*<<< orphan*/, int,
                                int /*<<< orphan*/, int);
long **lmatrix(int /*<<< orphan*/, int, int /*<<< orphan*/, int);
struct RNAMemory *rna(char *, long *, long **, long *);
struct RNAMemory *process_single_file(char *pdbFile) {
  long i, j, base_all;
  long type_stat[20];
  long **pair_stat;
  struct RNAMemory *r = 0;
  char dirLocation[512];
  pair_stat = lmatrix(0, 20, 0, 40);
  for (i = 0; i < 20; i++) {
    type_stat[i] = 0;
  }
  for (i = 0; i < 20; i++)
    for (j = 0; j < 40; j++)
      pair_stat[i][j] = 0;
  r = rna(pdbFile, type_stat, pair_stat, &base_all);
  free_lmatrix(pair_stat, 0, 20, 0, 40);
  return r;
}


x86 assembly (clang, -O0):
<process_single_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2d0,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0xd0(%rbp)
xor    %edx,%edx
mov    $0x14,%esi
mov    $0x28,%ecx
mov    %edx,%edi
call   1030 <lmatrix@plt>
mov    %rax,-0xc8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x14,-0x10(%rbp)
jge    1198 <process_single_file+0x68>
mov    -0x10(%rbp),%rax
movq   $0x0,-0xc0(%rbp,%rax,8)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    116c <process_single_file+0x3c>
movq   $0x0,-0x10(%rbp)
cmpq   $0x14,-0x10(%rbp)
jge    1200 <process_single_file+0xd0>
movq   $0x0,-0x18(%rbp)
cmpq   $0x28,-0x18(%rbp)
jge    11ea <process_single_file+0xba>
mov    -0xc8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x18(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    11b3 <process_single_file+0x83>
jmp    11ef <process_single_file+0xbf>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    11a0 <process_single_file+0x70>
mov    -0x8(%rbp),%rdi
lea    -0xc0(%rbp),%rsi
mov    -0xc8(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <rna@plt>
mov    %rax,-0xd0(%rbp)
mov    -0xc8(%rbp),%rdi
xor    %ecx,%ecx
mov    $0x14,%edx
mov    $0x28,%r8d
mov    %ecx,%esi
call   1050 <free_lmatrix@plt>
mov    -0xd0(%rbp),%rax
add    $0x2d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_single_file>:
push   %r14
push   %rbx
sub    $0xb8,%rsp
mov    %rdi,%r14
xor    %edi,%edi
mov    $0x14,%esi
xor    %edx,%edx
mov    $0x28,%ecx
call   1040 <lmatrix@plt>
mov    %rax,%rbx
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xa0(%rsp)
mov    (%rax),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x8(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x10(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x18(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x20(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x28(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x30(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x38(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x40(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x48(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x50(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x58(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x60(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x68(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x70(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x78(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x80(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x88(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x90(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    0x98(%rbx),%rdi
mov    $0x140,%edx
xor    %esi,%esi
call   1030 <memset@plt>
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    %r14,%rdi
mov    %rbx,%rdx
call   1050 <rna@plt>
mov    %rax,%r14
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x14,%edx
xor    %ecx,%ecx
mov    $0x28,%r8d
call   1060 <free_lmatrix@plt>
mov    %r14,%rax
add    $0xb8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.RNAMemory = type { i32 }
define %struct.RNAMemory* @process_single_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca [20 x i64]
%7 = alloca i64**
%8 = alloca %struct.RNAMemory*
%9 = alloca [512 x i8]
store i8* %0, i8** %2
store %struct.RNAMemory* null, %struct.RNAMemory** %8
%10 = call i64** @lmatrix(i32 0, i32 20, i32 0, i32 40)
store i64** %10, i64*** %7
store i64 0, i64* %3
br label %11
11: ; preds = %17, %1
%12 = load i64, i64* %3
%13 = icmp slt i64 %12, 20
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i64, i64* %3
%16 = getelementptr inbounds [20 x i64], [20 x i64]* %6, i64 0, i64 %15
store i64 0, i64* %16
br label %17
17: ; preds = %14
%18 = load i64, i64* %3
%19 = add nsw i64 %18, 1
store i64 %19, i64* %3
br label %11
20: ; preds = %11
store i64 0, i64* %3
br label %21
21: ; preds = %39, %20
%22 = load i64, i64* %3
%23 = icmp slt i64 %22, 20
br i1 %23, label %24, label %42
24: ; preds = %21
store i64 0, i64* %4
br label %25
25: ; preds = %35, %24
%26 = load i64, i64* %4
%27 = icmp slt i64 %26, 40
br i1 %27, label %28, label %38
28: ; preds = %25
%29 = load i64**, i64*** %7
%30 = load i64, i64* %3
%31 = getelementptr inbounds i64*, i64** %29, i64 %30
%32 = load i64*, i64** %31
%33 = load i64, i64* %4
%34 = getelementptr inbounds i64, i64* %32, i64 %33
store i64 0, i64* %34
br label %35
35: ; preds = %28
%36 = load i64, i64* %4
%37 = add nsw i64 %36, 1
store i64 %37, i64* %4
br label %25
38: ; preds = %25
br label %39
39: ; preds = %38
%40 = load i64, i64* %3
%41 = add nsw i64 %40, 1
store i64 %41, i64* %3
br label %21
42: ; preds = %21
%43 = load i8*, i8** %2
%44 = getelementptr inbounds [20 x i64], [20 x i64]* %6, i64 0, i64 0
%45 = load i64**, i64*** %7
%46 = call %struct.RNAMemory* @rna(i8* %43, i64* %44, i64** %45, i64* %5)
store %struct.RNAMemory* %46, %struct.RNAMemory** %8
%47 = load i64**, i64*** %7
%48 = call i32 @free_lmatrix(i64** %47, i32 0, i32 20, i32 0, i32 40)
%49 = load %struct.RNAMemory*, %struct.RNAMemory** %8
ret %struct.RNAMemory* %49
}

LLVM IR (-O2):
%struct.RNAMemory = type { i32 }
define %struct.RNAMemory* @process_single_file(i8* %0) {
%2 = alloca i64
%3 = alloca [20 x i64]
%4 = bitcast [20 x i64]* %3 to i8*
%5 = bitcast i64* %2 to i8*
%6 = tail call i64** @lmatrix(i32 0, i32 20, i32 0, i32 40)
%7 = bitcast i64** %6 to i8**
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i64*, i64** %6, i64 1
%10 = bitcast i64** %9 to i8**
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i64*, i64** %6, i64 2
%13 = bitcast i64** %12 to i8**
%14 = load i8*, i8** %13
%15 = getelementptr inbounds i64*, i64** %6, i64 3
%16 = bitcast i64** %15 to i8**
%17 = load i8*, i8** %16
%18 = getelementptr inbounds i64*, i64** %6, i64 4
%19 = bitcast i64** %18 to i8**
%20 = load i8*, i8** %19
%21 = getelementptr inbounds i64*, i64** %6, i64 5
%22 = bitcast i64** %21 to i8**
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i64*, i64** %6, i64 6
%25 = bitcast i64** %24 to i8**
%26 = load i8*, i8** %25
%27 = getelementptr inbounds i64*, i64** %6, i64 7
%28 = bitcast i64** %27 to i8**
%29 = load i8*, i8** %28
%30 = getelementptr inbounds i64*, i64** %6, i64 8
%31 = bitcast i64** %30 to i8**
%32 = load i8*, i8** %31
%33 = getelementptr inbounds i64*, i64** %6, i64 9
%34 = bitcast i64** %33 to i8**
%35 = load i8*, i8** %34
%36 = getelementptr inbounds i64*, i64** %6, i64 10
%37 = bitcast i64** %36 to i8**
%38 = load i8*, i8** %37
%39 = getelementptr inbounds i64*, i64** %6, i64 11
%40 = bitcast i64** %39 to i8**
%41 = load i8*, i8** %40
%42 = getelementptr inbounds i64*, i64** %6, i64 12
%43 = bitcast i64** %42 to i8**
%44 = load i8*, i8** %43
%45 = getelementptr inbounds i64*, i64** %6, i64 13
%46 = bitcast i64** %45 to i8**
%47 = load i8*, i8** %46
%48 = getelementptr inbounds i64*, i64** %6, i64 14
%49 = bitcast i64** %48 to i8**
%50 = load i8*, i8** %49
%51 = getelementptr inbounds i64*, i64** %6, i64 15
%52 = bitcast i64** %51 to i8**
%53 = load i8*, i8** %52
%54 = getelementptr inbounds i64*, i64** %6, i64 16
%55 = bitcast i64** %54 to i8**
%56 = load i8*, i8** %55
%57 = getelementptr inbounds i64*, i64** %6, i64 17
%58 = bitcast i64** %57 to i8**
%59 = load i8*, i8** %58
%60 = getelementptr inbounds i64*, i64** %6, i64 18
%61 = bitcast i64** %60 to i8**
%62 = load i8*, i8** %61
%63 = getelementptr inbounds i64*, i64** %6, i64 19
%64 = bitcast i64** %63 to i8**
%65 = load i8*, i8** %64
%66 = getelementptr inbounds [20 x i64], [20 x i64]* %3, i64 0, i64 0
%67 = call %struct.RNAMemory* @rna(i8* %0, i64* %66, i64** %6, i64* %2)
%68 = call i32 @free_lmatrix(i64** %6, i32 0, i32 20, i32 0, i32 40)
ret %struct.RNAMemory* %67
}