#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*/ u_long;
typedef unsigned char u_char;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int C_IN;
int /*<<< orphan*/ PUTLONG(int, unsigned char *);
int /*<<< orphan*/ PUTSHORT(int, unsigned char *);
int T_A;
int dn_comp(char const *, unsigned char *, int, unsigned char **,
            unsigned char **);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputc(unsigned char, int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main() {
  FILE *f;
  u_char buf[1000];
  u_char *p;
  char *temp, *temp1;
  u_char *comp_dn, *comp_dn2;
  char exp_dn[200], exp_dn2[200];
  u_char **dnptrs, **lastdnptr, **dnptrs2;
  int i, len = 0, comp_size;
  u_long now;
  dnptrs = (unsigned char **)malloc(2 * sizeof(unsigned char *));
  dnptrs2 = (unsigned char **)malloc(2 * sizeof(unsigned char *));
  comp_dn = (unsigned char *)malloc(200 * sizeof(unsigned char));
  comp_dn2 = (unsigned char *)malloc(200 * sizeof(unsigned char));
  temp1 = (char *)malloc(400 * sizeof(char));
  temp = temp1;
  p = buf;
  PUTSHORT(65535, p);
  PUTSHORT(256 * 8, p);
  PUTSHORT(65535, p);
  PUTSHORT(65535, p);
  PUTSHORT(65535, p);
  PUTSHORT(65535, p);
  len += 12;
  strcpy(exp_dn, "lcs.mit.edu");
  *dnptrs++ = (u_char *)exp_dn;
  *dnptrs-- = NULL;
  lastdnptr = NULL;
  printf("Calling dn_comp..\n");
  comp_size = dn_comp((const char *)exp_dn, comp_dn, 200, dnptrs, lastdnptr);
  printf("uncomp_size = %d\n", strlen(exp_dn));
  printf("comp_size = %d\n", comp_size);
  printf("exp_dn = %s, comp_dn = %s\n", exp_dn, (char *)comp_dn);
  for (i = 0; i < comp_size; i++)
    *p++ = *comp_dn++;
  len += comp_size;
  PUTSHORT(T_A, p);
  PUTSHORT(C_IN, p);
  PUTLONG(255, p);
  PUTSHORT(4, p);
  PUTSHORT(255, p);
  PUTSHORT(255, p);
  len += 14;
  f = fopen("iquery-file", "w");
  p = buf;
  printf("len = %d\n", len);
  for (i = 0; i < len; i++, p++)
    fputc(*p, f);
  fclose(f);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x5f0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x5e0(%rbp)
mov    $0x10,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x5c8(%rbp)
mov    $0x10,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x5d8(%rbp)
mov    $0xc8,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x420(%rbp)
mov    $0xc8,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x428(%rbp)
mov    $0x190,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x418(%rbp)
mov    -0x418(%rbp),%rax
mov    %rax,-0x410(%rbp)
lea    -0x400(%rbp),%rax
mov    %rax,-0x408(%rbp)
mov    -0x408(%rbp),%rsi
mov    $0xffff,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0x800,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0xffff,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0xffff,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0xffff,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0xffff,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x5e0(%rbp),%eax
add    $0xc,%eax
mov    %eax,-0x5e0(%rbp)
lea    -0x4f0(%rbp),%rdi
lea    0xd50(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x4f0(%rbp),%rcx
mov    -0x5c8(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x5c8(%rbp)
mov    %rcx,(%rax)
mov    -0x5c8(%rbp),%rax
mov    %rax,%rcx
add    $0xfffffffffffffff8,%rcx
mov    %rcx,-0x5c8(%rbp)
movq   $0x0,(%rax)
movq   $0x0,-0x5d0(%rbp)
lea    0xd0a(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x4f0(%rbp),%rdi
mov    -0x420(%rbp),%rsi
mov    -0x5c8(%rbp),%rcx
mov    -0x5d0(%rbp),%r8
mov    $0xc8,%edx
call   1090 <dn_comp@plt>
mov    %eax,-0x5e4(%rbp)
lea    -0x4f0(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%esi
lea    0xcd5(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x5e4(%rbp),%esi
lea    0xcc3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x4f0(%rbp),%rsi
mov    -0x420(%rbp),%rdx
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x5dc(%rbp)
mov    -0x5dc(%rbp),%eax
cmp    -0x5e4(%rbp),%eax
jge    13df <main+0x23f>
mov    -0x420(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x420(%rbp)
mov    (%rax),%cl
mov    -0x408(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x408(%rbp)
mov    %cl,(%rax)
mov    -0x5dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5dc(%rbp)
jmp    138b <main+0x1eb>
mov    -0x5e4(%rbp),%eax
add    -0x5e0(%rbp),%eax
mov    %eax,-0x5e0(%rbp)
mov    0x2bf0(%rip),%rax
mov    (%rax),%edi
mov    -0x408(%rbp),%rsi
call   10c0 <PUTSHORT@plt>
mov    0x2bd3(%rip),%rax
mov    (%rax),%edi
mov    -0x408(%rbp),%rsi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0xff,%edi
call   1060 <PUTLONG@plt>
mov    -0x408(%rbp),%rsi
mov    $0x4,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0xff,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x408(%rbp),%rsi
mov    $0xff,%edi
call   10c0 <PUTSHORT@plt>
mov    -0x5e0(%rbp),%eax
add    $0xe,%eax
mov    %eax,-0x5e0(%rbp)
lea    0xbd7(%rip),%rdi
lea    0xbdc(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x10(%rbp)
lea    -0x400(%rbp),%rax
mov    %rax,-0x408(%rbp)
mov    -0x5e0(%rbp),%esi
lea    0xbba(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x5dc(%rbp)
mov    -0x5dc(%rbp),%eax
cmp    -0x5e0(%rbp),%eax
jge    14fe <main+0x35e>
mov    -0x408(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1080 <fputc@plt>
mov    -0x5dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5dc(%rbp)
mov    -0x408(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x408(%rbp)
jmp    14b1 <main+0x311>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x5f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x4c0,%rsp
mov    %rsp,%r15
mov    $0x10,%edi
call   10b0 <malloc@plt>
mov    %rax,%r14
mov    $0x10,%edi
call   10b0 <malloc@plt>
mov    $0xc8,%edi
call   10b0 <malloc@plt>
mov    %rax,%rbx
mov    $0xc8,%edi
call   10b0 <malloc@plt>
mov    $0x190,%edi
call   10b0 <malloc@plt>
mov    $0xffff,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0x800,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0xffff,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0xffff,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0xffff,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0xffff,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
lea    0xdb1(%rip),%rsi
lea    0x3f0(%rsp),%r12
mov    %r12,%rdi
call   1030 <strcpy@plt>
mov    %r12,(%r14)
movq   $0x0,0x8(%r14)
lea    0xde0(%rip),%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    $0xc8,%edx
mov    %r14,%rcx
xor    %r8d,%r8d
call   10a0 <dn_comp@plt>
mov    %eax,%r14d
mov    %r12,%rdi
call   1060 <strlen@plt>
lea    0xd6e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xd60(%rip),%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
lea    0xd5f(%rip),%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <printf@plt>
test   %r14d,%r14d
jle    1405 <main+0x255>
lea    -0x1(%r14),%eax
mov    %rsp,%r15
cmp    $0x1f,%eax
jb     13e8 <main+0x238>
lea    (%rbx,%rax,1),%rcx
add    $0x1,%rcx
cmp    %rcx,%r15
jae    1303 <main+0x153>
lea    (%rsp,%rax,1),%rcx
add    $0x1,%rcx
cmp    %rbx,%rcx
ja     13e8 <main+0x238>
lea    0x1(%rax),%r8
mov    %r8,%rcx
and    $0xffffffffffffffe0,%rcx
lea    -0x20(%rcx),%rdx
mov    %rdx,%rdi
shr    $0x5,%rdi
add    $0x1,%rdi
mov    %edi,%esi
and    $0x3,%esi
cmp    $0x60,%rdx
jae    132c <main+0x17c>
xor    %ebp,%ebp
jmp    1398 <main+0x1e8>
and    $0xfffffffffffffffc,%rdi
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups (%rbx,%rbp,1),%xmm0
movups 0x10(%rbx,%rbp,1),%xmm1
movaps %xmm0,(%rsp,%rbp,1)
movaps %xmm1,0x10(%rsp,%rbp,1)
movups 0x20(%rbx,%rbp,1),%xmm0
movups 0x30(%rbx,%rbp,1),%xmm1
movaps %xmm0,0x20(%rsp,%rbp,1)
movaps %xmm1,0x30(%rsp,%rbp,1)
movups 0x40(%rbx,%rbp,1),%xmm0
movups 0x50(%rbx,%rbp,1),%xmm1
movaps %xmm0,0x40(%rsp,%rbp,1)
movaps %xmm1,0x50(%rsp,%rbp,1)
movups 0x60(%rbx,%rbp,1),%xmm0
movups 0x70(%rbx,%rbp,1),%xmm1
movaps %xmm0,0x60(%rsp,%rbp,1)
movaps %xmm1,0x70(%rsp,%rbp,1)
sub    $0xffffffffffffff80,%rbp
add    $0xfffffffffffffffc,%rdi
jne    1340 <main+0x190>
test   %rsi,%rsi
je     13dc <main+0x22c>
lea    (%rbx,%rbp,1),%rdi
add    $0x10,%rdi
add    %rsp,%rbp
add    $0x10,%rbp
shl    $0x5,%rsi
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups -0x10(%rdi,%rdx,1),%xmm0
movups (%rdi,%rdx,1),%xmm1
movaps %xmm0,-0x10(%rbp,%rdx,1)
movaps %xmm1,0x0(%rbp,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rsi
jne    13c0 <main+0x210>
lea    (%rsp,%rcx,1),%r15
cmp    %rcx,%r8
je     1405 <main+0x255>
add    %rcx,%rbx
add    %rsp,%rax
mov    %r15,%rcx
xchg   %ax,%ax
movzbl (%rbx),%edx
add    $0x1,%rbx
lea    0x1(%rcx),%r15
mov    %dl,(%rcx)
cmp    %rax,%rcx
mov    %r15,%rcx
jne    13f0 <main+0x240>
mov    0x2bdc(%rip),%rax
mov    (%rax),%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    0x2bc3(%rip),%rax
mov    (%rax),%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0xff,%edi
mov    %r15,%rsi
call   1070 <PUTLONG@plt>
mov    $0x4,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0xff,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
mov    $0xff,%edi
mov    %r15,%rsi
call   10d0 <PUTSHORT@plt>
lea    0x1a(%r14),%r15d
lea    0xbd3(%rip),%rdi
lea    0xbd8(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,%r12
lea    0xbcb(%rip),%rdi
mov    %r15d,%esi
xor    %eax,%eax
call   1080 <printf@plt>
cmp    $0xffffffe7,%r14d
jl     14c5 <main+0x315>
cmp    $0x2,%r15d
mov    $0x1,%ebp
cmovge %r15d,%ebp
add    $0xffffffff,%ebp
add    $0x1,%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsp,%rbx,1),%edi
mov    %r12,%rsi
call   1090 <fputc@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    14b0 <main+0x300>
mov    %r12,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x4c0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"lcs.mit.edu\00"
@.str.1 = [19 x i8] c"Calling dn_comp..\0A\00"
@.str.2 = [18 x i8] c"uncomp_size = %d\0A\00"
@.str.3 = [16 x i8] c"comp_size = %d\0A\00"
@.str.4 = [27 x i8] c"exp_dn = %s, comp_dn = %s\0A\00"
@T_A = global i32 0
@C_IN = global i32 0
@.str.5 = [12 x i8] c"iquery-file\00"
@.str.6 = [2 x i8] c"w\00"
@.str.7 = [10 x i8] c"len = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca [1000 x i8]
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [200 x i8]
%10 = alloca [200 x i8]
%11 = alloca i8**
%12 = alloca i8**
%13 = alloca i8**
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %15
%18 = call i64 @malloc(i32 16)
%19 = inttoptr i64 %18 to i8**
store i8** %19, i8*** %11
%20 = call i64 @malloc(i32 16)
%21 = inttoptr i64 %20 to i8**
store i8** %21, i8*** %13
%22 = call i64 @malloc(i32 200)
%23 = inttoptr i64 %22 to i8*
store i8* %23, i8** %7
%24 = call i64 @malloc(i32 200)
%25 = inttoptr i64 %24 to i8*
store i8* %25, i8** %8
%26 = call i64 @malloc(i32 400)
%27 = inttoptr i64 %26 to i8*
store i8* %27, i8** %6
%28 = load i8*, i8** %6
store i8* %28, i8** %5
%29 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
store i8* %29, i8** %4
%30 = load i8*, i8** %4
%31 = call i32 @PUTSHORT(i32 65535, i8* %30)
%32 = load i8*, i8** %4
%33 = call i32 @PUTSHORT(i32 2048, i8* %32)
%34 = load i8*, i8** %4
%35 = call i32 @PUTSHORT(i32 65535, i8* %34)
%36 = load i8*, i8** %4
%37 = call i32 @PUTSHORT(i32 65535, i8* %36)
%38 = load i8*, i8** %4
%39 = call i32 @PUTSHORT(i32 65535, i8* %38)
%40 = load i8*, i8** %4
%41 = call i32 @PUTSHORT(i32 65535, i8* %40)
%42 = load i32, i32* %15
%43 = add nsw i32 %42, 12
store i32 %43, i32* %15
%44 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%45 = call i32 @strcpy(i8* %44, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%46 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%47 = load i8**, i8*** %11
%48 = getelementptr inbounds i8*, i8** %47, i32 1
store i8** %48, i8*** %11
store i8* %46, i8** %47
%49 = load i8**, i8*** %11
%50 = getelementptr inbounds i8*, i8** %49, i32 -1
store i8** %50, i8*** %11
store i8* null, i8** %49
store i8** null, i8*** %12
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%52 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%53 = load i8*, i8** %7
%54 = load i8**, i8*** %11
%55 = load i8**, i8*** %12
%56 = call i32 @dn_comp(i8* %52, i8* %53, i32 200, i8** %54, i8** %55)
store i32 %56, i32* %16
%57 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%58 = call i32 @strlen(i8* %57)
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %58)
%60 = load i32, i32* %16
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %60)
%62 = getelementptr inbounds [200 x i8], [200 x i8]* %9, i64 0, i64 0
%63 = load i8*, i8** %7
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %62, i8* %63)
store i32 0, i32* %14
br label %65
65: ; preds = %75, %0
%66 = load i32, i32* %14
%67 = load i32, i32* %16
%68 = icmp slt i32 %66, %67
br i1 %68, label %69, label %78
69: ; preds = %65
%70 = load i8*, i8** %7
%71 = getelementptr inbounds i8, i8* %70, i32 1
store i8* %71, i8** %7
%72 = load i8, i8* %70
%73 = load i8*, i8** %4
%74 = getelementptr inbounds i8, i8* %73, i32 1
store i8* %74, i8** %4
store i8 %72, i8* %73
br label %75
75: ; preds = %69
%76 = load i32, i32* %14
%77 = add nsw i32 %76, 1
store i32 %77, i32* %14
br label %65
78: ; preds = %65
%79 = load i32, i32* %16
%80 = load i32, i32* %15
%81 = add nsw i32 %80, %79
store i32 %81, i32* %15
%82 = load i32, i32* @T_A
%83 = load i8*, i8** %4
%84 = call i32 @PUTSHORT(i32 %82, i8* %83)
%85 = load i32, i32* @C_IN
%86 = load i8*, i8** %4
%87 = call i32 @PUTSHORT(i32 %85, i8* %86)
%88 = load i8*, i8** %4
%89 = call i32 @PUTLONG(i32 255, i8* %88)
%90 = load i8*, i8** %4
%91 = call i32 @PUTSHORT(i32 4, i8* %90)
%92 = load i8*, i8** %4
%93 = call i32 @PUTSHORT(i32 255, i8* %92)
%94 = load i8*, i8** %4
%95 = call i32 @PUTSHORT(i32 255, i8* %94)
%96 = load i32, i32* %15
%97 = add nsw i32 %96, 14
store i32 %97, i32* %15
%98 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
store i32* %98, i32** %2
%99 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
store i8* %99, i8** %4
%100 = load i32, i32* %15
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %100)
store i32 0, i32* %14
br label %102
102: ; preds = %111, %78
%103 = load i32, i32* %14
%104 = load i32, i32* %15
%105 = icmp slt i32 %103, %104
br i1 %105, label %106, label %116
106: ; preds = %102
%107 = load i8*, i8** %4
%108 = load i8, i8* %107
%109 = load i32*, i32** %2
%110 = call i32 @fputc(i8 zeroext %108, i32* %109)
br label %111
111: ; preds = %106
%112 = load i32, i32* %14
%113 = add nsw i32 %112, 1
store i32 %113, i32* %14
%114 = load i8*, i8** %4
%115 = getelementptr inbounds i8, i8* %114, i32 1
store i8* %115, i8** %4
br label %102
116: ; preds = %102
%117 = load i32*, i32** %2
%118 = call i32 @fclose(i32* %117)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"lcs.mit.edu\00"
@.str.2 = [18 x i8] c"uncomp_size = %d\0A\00"
@.str.3 = [16 x i8] c"comp_size = %d\0A\00"
@.str.4 = [27 x i8] c"exp_dn = %s, comp_dn = %s\0A\00"
@T_A = global i32 0
@C_IN = global i32 0
@.str.5 = [12 x i8] c"iquery-file\00"
@.str.6 = [2 x i8] c"w\00"
@.str.7 = [10 x i8] c"len = %d\0A\00"
@str = [18 x i8] c"Calling dn_comp..\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = alloca [200 x i8]
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%6 = tail call i64 @malloc(i32 16)
%7 = inttoptr i64 %6 to i8**
%8 = tail call i64 @malloc(i32 16)
%9 = tail call i64 @malloc(i32 200)
%10 = inttoptr i64 %9 to i8*
%11 = tail call i64 @malloc(i32 200)
%12 = tail call i64 @malloc(i32 400)
%13 = call i32 @PUTSHORT(i32 65535, i8* %4)
%14 = call i32 @PUTSHORT(i32 2048, i8* %4)
%15 = call i32 @PUTSHORT(i32 65535, i8* %4)
%16 = call i32 @PUTSHORT(i32 65535, i8* %4)
%17 = call i32 @PUTSHORT(i32 65535, i8* %4)
%18 = call i32 @PUTSHORT(i32 65535, i8* %4)
%19 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%20 = getelementptr inbounds i8*, i8** %7, i64 1
store i8* %5, i8** %7
store i8* null, i8** %20
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
%22 = call i32 @dn_comp(i8* %5, i8* %10, i32 200, i8** %7, i8** null)
%23 = call i32 @strlen(i8* %5)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %22)
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.4, i64 0, i64 0), i8* %5, i8* %10)
%27 = icmp sgt i32 %22, 0
br i1 %27, label %28, label %132
28: ; preds = %0
%29 = add nsw i32 %22, -1
%30 = zext i32 %29 to i64
%31 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %30
%32 = add nuw nsw i64 %30, 1
%33 = icmp ult i32 %29, 31
br i1 %33, label %122, label %34
34: ; preds = %28
%35 = add nuw nsw i64 %30, 1
%36 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %35
%37 = getelementptr i8, i8* %10, i64 %35
%38 = icmp ult i8* %2, %37
%39 = icmp ugt i8* %36, %10
%40 = and i1 %38, %39
br i1 %40, label %122, label %41
41: ; preds = %34
%42 = and i64 %32, 8589934560
%43 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %42
%44 = getelementptr i8, i8* %10, i64 %42
%45 = add nsw i64 %42, -32
%46 = lshr exact i64 %45, 5
%47 = add nuw nsw i64 %46, 1
%48 = and i64 %47, 3
%49 = icmp ult i64 %45, 96
br i1 %49, label %101, label %50
50: ; preds = %41
%51 = and i64 %47, 1152921504606846972
br label %52
52: ; preds = %52, %50
%53 = phi i64 [ 0, %50 ], [ %98, %52 ]
%54 = phi i64 [ 0, %50 ], [ %99, %52 ]
%55 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %53
%56 = getelementptr i8, i8* %10, i64 %53
%57 = bitcast i8* %56 to <16 x i8>*
%58 = load <16 x i8>, <16 x i8>* %57
%59 = getelementptr i8, i8* %56, i64 16
%60 = bitcast i8* %59 to <16 x i8>*
%61 = load <16 x i8>, <16 x i8>* %60
%62 = bitcast i8* %55 to <16 x i8>*
store <16 x i8> %58, <16 x i8>* %62
%63 = getelementptr i8, i8* %55, i64 16
%64 = bitcast i8* %63 to <16 x i8>*
store <16 x i8> %61, <16 x i8>* %64
%65 = or i64 %53, 32
%66 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %65
%67 = getelementptr i8, i8* %10, i64 %65
%68 = bitcast i8* %67 to <16 x i8>*
%69 = load <16 x i8>, <16 x i8>* %68
%70 = getelementptr i8, i8* %67, i64 16
%71 = bitcast i8* %70 to <16 x i8>*
%72 = load <16 x i8>, <16 x i8>* %71
%73 = bitcast i8* %66 to <16 x i8>*
store <16 x i8> %69, <16 x i8>* %73
%74 = getelementptr i8, i8* %66, i64 16
%75 = bitcast i8* %74 to <16 x i8>*
store <16 x i8> %72, <16 x i8>* %75
%76 = or i64 %53, 64
%77 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %76
%78 = getelementptr i8, i8* %10, i64 %76
%79 = bitcast i8* %78 to <16 x i8>*
%80 = load <16 x i8>, <16 x i8>* %79
%81 = getelementptr i8, i8* %78, i64 16
%82 = bitcast i8* %81 to <16 x i8>*
%83 = load <16 x i8>, <16 x i8>* %82
%84 = bitcast i8* %77 to <16 x i8>*
store <16 x i8> %80, <16 x i8>* %84
%85 = getelementptr i8, i8* %77, i64 16
%86 = bitcast i8* %85 to <16 x i8>*
store <16 x i8> %83, <16 x i8>* %86
%87 = or i64 %53, 96
%88 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %87
%89 = getelementptr i8, i8* %10, i64 %87
%90 = bitcast i8* %89 to <16 x i8>*
%91 = load <16 x i8>, <16 x i8>* %90
%92 = getelementptr i8, i8* %89, i64 16
%93 = bitcast i8* %92 to <16 x i8>*
%94 = load <16 x i8>, <16 x i8>* %93
%95 = bitcast i8* %88 to <16 x i8>*
store <16 x i8> %91, <16 x i8>* %95
%96 = getelementptr i8, i8* %88, i64 16
%97 = bitcast i8* %96 to <16 x i8>*
store <16 x i8> %94, <16 x i8>* %97
%98 = add nuw i64 %53, 128
%99 = add i64 %54, 4
%100 = icmp eq i64 %99, %51
br i1 %100, label %101, label %52
101: ; preds = %52, %41
%102 = phi i64 [ 0, %41 ], [ %98, %52 ]
%103 = icmp eq i64 %48, 0
br i1 %103, label %120, label %104
104: ; preds = %101, %104
%105 = phi i64 [ %117, %104 ], [ %102, %101 ]
%106 = phi i64 [ %118, %104 ], [ 0, %101 ]
%107 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %105
%108 = getelementptr i8, i8* %10, i64 %105
%109 = bitcast i8* %108 to <16 x i8>*
%110 = load <16 x i8>, <16 x i8>* %109
%111 = getelementptr i8, i8* %108, i64 16
%112 = bitcast i8* %111 to <16 x i8>*
%113 = load <16 x i8>, <16 x i8>* %112
%114 = bitcast i8* %107 to <16 x i8>*
store <16 x i8> %110, <16 x i8>* %114
%115 = getelementptr i8, i8* %107, i64 16
%116 = bitcast i8* %115 to <16 x i8>*
store <16 x i8> %113, <16 x i8>* %116
%117 = add nuw i64 %105, 32
%118 = add i64 %106, 1
%119 = icmp eq i64 %118, %48
br i1 %119, label %120, label %104
120: ; preds = %104, %101
%121 = icmp eq i64 %32, %42
br i1 %121, label %132, label %122
122: ; preds = %34, %28, %120
%123 = phi i8* [ %4, %34 ], [ %4, %28 ], [ %43, %120 ]
%124 = phi i8* [ %10, %34 ], [ %10, %28 ], [ %44, %120 ]
br label %125
125: ; preds = %122, %125
%126 = phi i8* [ %130, %125 ], [ %123, %122 ]
%127 = phi i8* [ %128, %125 ], [ %124, %122 ]
%128 = getelementptr inbounds i8, i8* %127, i64 1
%129 = load i8, i8* %127
%130 = getelementptr inbounds i8, i8* %126, i64 1
store i8 %129, i8* %126
%131 = icmp eq i8* %126, %31
br i1 %131, label %132, label %125
132: ; preds = %125, %120, %0
%133 = phi i8* [ %4, %0 ], [ %43, %120 ], [ %130, %125 ]
%134 = load i32, i32* @T_A
%135 = call i32 @PUTSHORT(i32 %134, i8* %133)
%136 = load i32, i32* @C_IN
%137 = call i32 @PUTSHORT(i32 %136, i8* %133)
%138 = call i32 @PUTLONG(i32 255, i8* %133)
%139 = call i32 @PUTSHORT(i32 4, i8* %133)
%140 = call i32 @PUTSHORT(i32 255, i8* %133)
%141 = call i32 @PUTSHORT(i32 255, i8* %133)
%142 = add i32 %22, 26
%143 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%144 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i32 %142)
%145 = icmp sgt i32 %22, -26
br i1 %145, label %146, label %157
146: ; preds = %132
%147 = call i32 @llvm.smax.i32(i32 %142, i32 1)
%148 = add nsw i32 %147, -1
%149 = zext i32 %148 to i64
%150 = getelementptr [1000 x i8], [1000 x i8]* %1, i64 0, i64 %149
br label %151
151: ; preds = %146, %151
%152 = phi i8* [ %155, %151 ], [ %4, %146 ]
%153 = load i8, i8* %152
%154 = call i32 @fputc(i8 zeroext %153, i32* %143)
%155 = getelementptr inbounds i8, i8* %152, i64 1
%156 = icmp eq i8* %152, %150
br i1 %156, label %157, label %151
157: ; preds = %151, %132
%158 = call i32 @fclose(i32* %143)
ret i32 0
}