#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*/ real_pcre;

/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
scalar_t__ malloc(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ read(int, int *, int);
int main(int argc, char **argv) {
  int size = 0;
  int length = 0;
  int name_count = 0;
  int max_name_size = 0;
  char *re;
  char real_pcre[128];
  int infile;
  infile = open(argv[1], O_RDONLY);
  read(infile, &name_count, sizeof(int));
  read(infile, &max_name_size, sizeof(int));
  size = length + sizeof(real_pcre) + name_count * (max_name_size + 3);
  re = (char *)malloc(size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    0x2e74(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%edi
lea    -0x1c(%rbp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
mov    -0xb4(%rbp),%edi
lea    -0x20(%rbp),%rsi
mov    $0x4,%edx
call   1030 <read@plt>
movslq -0x18(%rbp),%rax
add    $0x80,%rax
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%edx
add    $0x3,%edx
imul   %edx,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
mov    0x8(%rsi),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,%ebx
lea    0xc(%rsp),%rsi
mov    %eax,%edi
mov    $0x4,%edx
call   1030 <read@plt>
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
mov    $0x4,%edx
call   1030 <read@plt>
mov    0x8(%rsp),%edi
add    $0x3,%edi
imul   0xc(%rsp),%edi
sub    $0xffffff80,%edi
call   1040 <malloc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca [128 x i8]
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i32, i32* @O_RDONLY
%17 = call i32 @open(i8* %15, i32 %16)
store i32 %17, i32* %12
%18 = load i32, i32* %12
%19 = call i32 @read(i32 %18, i32* %8, i32 4)
%20 = load i32, i32* %12
%21 = call i32 @read(i32 %20, i32* %9, i32 4)
%22 = load i32, i32* %7
%23 = sext i32 %22 to i64
%24 = add i64 %23, 128
%25 = load i32, i32* %8
%26 = load i32, i32* %9
%27 = add nsw i32 %26, 3
%28 = mul nsw i32 %25, %27
%29 = sext i32 %28 to i64
%30 = add i64 %24, %29
%31 = trunc i64 %30 to i32
store i32 %31, i32* %6
%32 = load i32, i32* %6
%33 = call i64 @malloc(i32 %32)
%34 = inttoptr i64 %33 to i8*
store i8* %34, i8** %10
ret i32 0
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = load i32, i32* @O_RDONLY
%10 = tail call i32 @open(i8* %8, i32 %9)
%11 = call i32 @read(i32 %10, i32* %3, i32 4)
%12 = call i32 @read(i32 %10, i32* %4, i32 4)
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 3
%16 = mul nsw i32 %15, %13
%17 = add i32 %16, 128
%18 = tail call i64 @malloc(i32 %17)
ret i32 0
}