#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 epsg_dict {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int /*<<< orphan*/ atoi(char *);
int /*<<< orphan*/ epsg_insert(struct epsg_dict *, int /*<<< orphan*/, char *,
                               char const *);
int getc(int /*<<< orphan*/ *);
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
int parse_epsg(FILE *fl_epsg, struct epsg_dict *epsg) {
  char line[1024];
  char name[512];
  char *out = line;
  int odd_even = 0;
  int c;
  while ((c = getc(fl_epsg)) != EOF) {
    if (c == '\r')
      continue;
    if (c == '\n') {
      *out = '\0';
      if (odd_even) {
        int i;
        int len = strlen(line);
        char srid[16];
        char *p = srid;
        const char *proj4text = NULL;
        if (odd_even == 2) {
          if (*line == '#') {
            odd_even = 0;
            *name = '\0';
            out = line;
            continue;
          }
          return 0;
        }
        if (*name == '\0')
          return 0;
        if (strncmp(line, "# ", 2) == 0) {
          odd_even = 2;
          *name = '\0';
          out = line;
          continue;
        }
        if (*line != '<')
          return 0;
        if (strcmp(line + len - 2, "<>") != 0)
          return 0;
        line[len - 2] = '\0';
        for (i = 1; i < 10; i++) {
          if (line[i] == '>') {
            *p = '\0';
            proj4text = line + i + 2;
          }
          *p++ = line[i];
        }
        if (!proj4text)
          return 0;
        len = strlen(line);
        for (i = len - 1; i > 1; i--) {
          if (line[i] == ' ')
            line[i] = '\0';
          else
            break;
        }
        epsg_insert(epsg, atoi(srid), name, proj4text);
        odd_even = 0;
        *name = '\0';
      } else {
        if (strncmp(line, "# ", 2) != 0)
          return 0;
        strcpy(name, line + 2);
        odd_even = 1;
      }
      out = line;
      continue;
    }
    *out++ = c;
  }
  return 1;
}


x86 assembly (clang, -O0):
<parse_epsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x670,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x628(%rbp)
movl   $0x0,-0x62c(%rbp)
mov    -0x10(%rbp),%rdi
call   1090 <getc@plt>
mov    %eax,-0x630(%rbp)
mov    0x2e37(%rip),%rcx
cmp    (%rcx),%eax
je     151e <parse_epsg+0x3ae>
cmpl   $0xd,-0x630(%rbp)
jne    11cb <parse_epsg+0x5b>
jmp    119b <parse_epsg+0x2b>
cmpl   $0xa,-0x630(%rbp)
jne    14fa <parse_epsg+0x38a>
mov    -0x628(%rbp),%rax
movb   $0x0,(%rax)
cmpl   $0x0,-0x62c(%rbp)
je     1498 <parse_epsg+0x328>
lea    -0x420(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x638(%rbp)
lea    -0x650(%rbp),%rax
mov    %rax,-0x658(%rbp)
movq   $0x0,-0x660(%rbp)
cmpl   $0x2,-0x62c(%rbp)
jne    1267 <parse_epsg+0xf7>
movsbl -0x420(%rbp),%eax
cmp    $0x23,%eax
jne    125b <parse_epsg+0xeb>
movl   $0x0,-0x62c(%rbp)
movb   $0x0,-0x620(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x628(%rbp)
jmp    119b <parse_epsg+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1525 <parse_epsg+0x3b5>
movsbl -0x620(%rbp),%eax
cmp    $0x0,%eax
jne    1283 <parse_epsg+0x113>
movl   $0x0,-0x4(%rbp)
jmp    1525 <parse_epsg+0x3b5>
lea    -0x420(%rbp),%rdi
lea    0xd6f(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12c9 <parse_epsg+0x159>
movl   $0x2,-0x62c(%rbp)
movb   $0x0,-0x620(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x628(%rbp)
jmp    119b <parse_epsg+0x2b>
movsbl -0x420(%rbp),%eax
cmp    $0x3c,%eax
je     12e5 <parse_epsg+0x175>
movl   $0x0,-0x4(%rbp)
jmp    1525 <parse_epsg+0x3b5>
lea    -0x420(%rbp),%rdi
movslq -0x638(%rbp),%rax
add    %rax,%rdi
add    $0xfffffffffffffffe,%rdi
lea    0xd02(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     131c <parse_epsg+0x1ac>
movl   $0x0,-0x4(%rbp)
jmp    1525 <parse_epsg+0x3b5>
mov    -0x638(%rbp),%eax
sub    $0x2,%eax
cltq
movb   $0x0,-0x420(%rbp,%rax,1)
movl   $0x1,-0x634(%rbp)
cmpl   $0xa,-0x634(%rbp)
jge    13bd <parse_epsg+0x24d>
movslq -0x634(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x3e,%eax
jne    1384 <parse_epsg+0x214>
mov    -0x658(%rbp),%rax
movb   $0x0,(%rax)
lea    -0x420(%rbp),%rax
movslq -0x634(%rbp),%rcx
add    %rcx,%rax
add    $0x2,%rax
mov    %rax,-0x660(%rbp)
movslq -0x634(%rbp),%rax
mov    -0x420(%rbp,%rax,1),%cl
mov    -0x658(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x658(%rbp)
mov    %cl,(%rax)
mov    -0x634(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x634(%rbp)
jmp    1339 <parse_epsg+0x1c9>
cmpq   $0x0,-0x660(%rbp)
jne    13d7 <parse_epsg+0x267>
movl   $0x0,-0x4(%rbp)
jmp    1525 <parse_epsg+0x3b5>
lea    -0x420(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x638(%rbp)
mov    -0x638(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x634(%rbp)
cmpl   $0x1,-0x634(%rbp)
jle    144f <parse_epsg+0x2df>
movslq -0x634(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x20,%eax
jne    1431 <parse_epsg+0x2c1>
movslq -0x634(%rbp),%rax
movb   $0x0,-0x420(%rbp,%rax,1)
jmp    1436 <parse_epsg+0x2c6>
jmp    144f <parse_epsg+0x2df>
jmp    143b <parse_epsg+0x2cb>
mov    -0x634(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x634(%rbp)
jmp    13f8 <parse_epsg+0x288>
mov    -0x18(%rbp),%rax
mov    %rax,-0x668(%rbp)
lea    -0x650(%rbp),%rdi
call   1080 <atoi@plt>
mov    -0x668(%rbp),%rdi
mov    %eax,%esi
lea    -0x620(%rbp),%rdx
mov    -0x660(%rbp),%rcx
call   1050 <epsg_insert@plt>
movl   $0x0,-0x62c(%rbp)
movb   $0x0,-0x620(%rbp)
jmp    14e7 <parse_epsg+0x377>
lea    -0x420(%rbp),%rdi
lea    0xb5a(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     14c6 <parse_epsg+0x356>
movl   $0x0,-0x4(%rbp)
jmp    1525 <parse_epsg+0x3b5>
lea    -0x620(%rbp),%rdi
lea    -0x420(%rbp),%rsi
add    $0x2,%rsi
call   1040 <strcpy@plt>
movl   $0x1,-0x62c(%rbp)
lea    -0x420(%rbp),%rax
mov    %rax,-0x628(%rbp)
jmp    119b <parse_epsg+0x2b>
mov    -0x630(%rbp),%eax
mov    %al,%cl
mov    -0x628(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x628(%rbp)
mov    %cl,(%rax)
jmp    119b <parse_epsg+0x2b>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x670,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_epsg>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x628,%rsp
mov    %rsi,0x18(%rsp)
mov    %rdi,%rbx
lea    0x22(%rsp),%r15
xor    %r14d,%r14d
lea    0x20(%rsp),%r12
mov    0x2e4b(%rip),%r13
mov    %r12,%rbp
mov    %rbx,%rdi
call   1090 <getc@plt>
cmp    0x0(%r13),%eax
je     13ca <parse_epsg+0x25a>
cmp    $0xd,%eax
je     11a0 <parse_epsg+0x30>
cmp    $0xa,%eax
je     11d0 <parse_epsg+0x60>
mov    %al,0x0(%rbp)
add    $0x1,%rbp
jmp    11a0 <parse_epsg+0x30>
cs nopw 0x0(%rax,%rax,1)
nop
movb   $0x0,0x0(%rbp)
mov    %r12,%rdi
test   %r14d,%r14d
je     137d <parse_epsg+0x20d>
call   1060 <strlen@plt>
cmp    $0x2,%r14d
je     13ae <parse_epsg+0x23e>
cmpb   $0x0,0x420(%rsp)
je     13e1 <parse_epsg+0x271>
mov    %eax,%r15d
mov    $0x2,%r14d
mov    %r12,%rdi
lea    0xdf0(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13b8 <parse_epsg+0x248>
cmpb   $0x3c,0x20(%rsp)
jne    13e1 <parse_epsg+0x271>
movslq %r15d,%rbp
lea    (%rsp,%rbp,1),%rdi
add    $0x1e,%rdi
lea    0xdc3(%rip),%rsi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    13e1 <parse_epsg+0x271>
movb   $0x0,-0x2(%rbp,%r12,1)
mov    0x21(%rsp),%cl
mov    0x22(%rsp),%dl
cmp    $0x3e,%cl
mov    $0x0,%eax
lea    0x23(%rsp),%rsi
cmove  %rsi,%rax
mov    %cl,(%rsp)
cmp    $0x3e,%dl
lea    0x24(%rsp),%rcx
cmove  %rcx,%rax
mov    %dl,0x1(%rsp)
mov    0x23(%rsp),%cl
cmp    $0x3e,%cl
lea    0x25(%rsp),%rdx
cmove  %rdx,%rax
mov    %cl,0x2(%rsp)
mov    0x24(%rsp),%cl
cmp    $0x3e,%cl
lea    0x26(%rsp),%rdx
cmove  %rdx,%rax
mov    0x25(%rsp),%dl
cmp    $0x3e,%dl
lea    0x27(%rsp),%rsi
cmove  %rsi,%rax
mov    %cl,0x3(%rsp)
mov    %dl,0x4(%rsp)
mov    0x26(%rsp),%cl
cmp    $0x3e,%cl
lea    0x28(%rsp),%rdx
cmove  %rdx,%rax
mov    %cl,0x5(%rsp)
mov    0x27(%rsp),%cl
cmp    $0x3e,%cl
lea    0x29(%rsp),%rdx
cmove  %rdx,%rax
mov    %cl,0x6(%rsp)
mov    0x28(%rsp),%cl
cmp    $0x3e,%cl
lea    0x2a(%rsp),%rdx
cmove  %rdx,%rax
mov    %cl,0x7(%rsp)
mov    0x29(%rsp),%cl
mov    %cl,0x8(%rsp)
lea    0x2b(%rsp),%r15
cmp    $0x3e,%cl
je     1316 <parse_epsg+0x1a6>
mov    %rax,%r15
test   %rax,%rax
je     13e1 <parse_epsg+0x271>
mov    %r12,%rdi
call   1060 <strlen@plt>
cmp    $0x3,%eax
jl     1349 <parse_epsg+0x1d9>
mov    %eax,%eax
add    $0x1,%rax
nopl   0x0(%rax)
lea    -0x2(%rax),%ecx
cmpb   $0x20,0x20(%rsp,%rcx,1)
jne    1349 <parse_epsg+0x1d9>
movb   $0x0,0x20(%rsp,%rcx,1)
add    $0xffffffffffffffff,%rax
cmp    $0x3,%rax
ja     1330 <parse_epsg+0x1c0>
mov    %rsp,%rdi
call   1080 <atoi@plt>
mov    0x18(%rsp),%rdi
mov    %eax,%esi
lea    0x420(%rsp),%rdx
mov    %r15,%rcx
call   1050 <epsg_insert@plt>
movb   $0x0,0x420(%rsp)
xor    %r14d,%r14d
lea    0x22(%rsp),%r15
jmp    119d <parse_epsg+0x2d>
lea    0xc7c(%rip),%rsi
mov    $0x2,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    13e1 <parse_epsg+0x271>
lea    0x420(%rsp),%rdi
mov    %r15,%rsi
call   1040 <strcpy@plt>
mov    $0x1,%r14d
jmp    119d <parse_epsg+0x2d>
xor    %r14d,%r14d
cmpb   $0x23,0x20(%rsp)
jne    13e1 <parse_epsg+0x271>
movb   $0x0,0x420(%rsp)
lea    0x22(%rsp),%r15
jmp    119d <parse_epsg+0x2d>
mov    $0x1,%eax
add    $0x628,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
jmp    13cf <parse_epsg+0x25f>

LLVM IR (-O0):
%struct.epsg_dict = type { i32 }
@EOF = global i32 0
@.str = [3 x i8] c"# \00"
@.str.1 = [3 x i8] c"<>\00"
define i32 @parse_epsg(i32* %0, %struct.epsg_dict* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca %struct.epsg_dict*
%6 = alloca [1024 x i8]
%7 = alloca [512 x i8]
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [16 x i8]
%14 = alloca i8*
%15 = alloca i8*
store i32* %0, i32** %4
store %struct.epsg_dict* %1, %struct.epsg_dict** %5
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
store i8* %16, i8** %8
store i32 0, i32* %9
br label %17
17: ; preds = %156, %154, %58, %44, %25, %2
%18 = load i32*, i32** %4
%19 = call i32 @getc(i32* %18)
store i32 %19, i32* %10
%20 = load i32, i32* @EOF
%21 = icmp ne i32 %19, %20
br i1 %21, label %22, label %161
22: ; preds = %17
%23 = load i32, i32* %10
%24 = icmp eq i32 %23, 13
br i1 %24, label %25, label %26
25: ; preds = %22
br label %17
26: ; preds = %22
%27 = load i32, i32* %10
%28 = icmp eq i32 %27, 10
br i1 %28, label %29, label %156
29: ; preds = %26
%30 = load i8*, i8** %8
store i8 0, i8* %30
%31 = load i32, i32* %9
%32 = icmp ne i32 %31, 0
br i1 %32, label %33, label %144
33: ; preds = %29
%34 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%35 = call i32 @strlen(i8* %34)
store i32 %35, i32* %12
%36 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
store i8* %36, i8** %14
store i8* null, i8** %15
%37 = load i32, i32* %9
%38 = icmp eq i32 %37, 2
br i1 %38, label %39, label %48
39: ; preds = %33
%40 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%41 = load i8, i8* %40
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 35
br i1 %43, label %44, label %47
44: ; preds = %39
store i32 0, i32* %9
%45 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
store i8 0, i8* %45
%46 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
store i8* %46, i8** %8
br label %17
47: ; preds = %39
store i32 0, i32* %3
br label %162
48: ; preds = %33
%49 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp eq i32 %51, 0
br i1 %52, label %53, label %54
53: ; preds = %48
store i32 0, i32* %3
br label %162
54: ; preds = %48
%55 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%56 = call i64 @strncmp(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %54
store i32 2, i32* %9
%59 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
store i8 0, i8* %59
%60 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
store i8* %60, i8** %8
br label %17
61: ; preds = %54
%62 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = icmp ne i32 %64, 60
br i1 %65, label %66, label %67
66: ; preds = %61
store i32 0, i32* %3
br label %162
67: ; preds = %61
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%69 = load i32, i32* %12
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %68, i64 %70
%72 = getelementptr inbounds i8, i8* %71, i64 -2
%73 = call i64 @strcmp(i8* %72, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%74 = icmp ne i64 %73, 0
br i1 %74, label %75, label %76
75: ; preds = %67
store i32 0, i32* %3
br label %162
76: ; preds = %67
%77 = load i32, i32* %12
%78 = sub nsw i32 %77, 2
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %79
store i8 0, i8* %80
store i32 1, i32* %11
br label %81
81: ; preds = %105, %76
%82 = load i32, i32* %11
%83 = icmp slt i32 %82, 10
br i1 %83, label %84, label %108
84: ; preds = %81
%85 = load i32, i32* %11
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %86
%88 = load i8, i8* %87
%89 = sext i8 %88 to i32
%90 = icmp eq i32 %89, 62
br i1 %90, label %91, label %98
91: ; preds = %84
%92 = load i8*, i8** %14
store i8 0, i8* %92
%93 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%94 = load i32, i32* %11
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8, i8* %93, i64 %95
%97 = getelementptr inbounds i8, i8* %96, i64 2
store i8* %97, i8** %15
br label %98
98: ; preds = %91, %84
%99 = load i32, i32* %11
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %100
%102 = load i8, i8* %101
%103 = load i8*, i8** %14
%104 = getelementptr inbounds i8, i8* %103, i32 1
store i8* %104, i8** %14
store i8 %102, i8* %103
br label %105
105: ; preds = %98
%106 = load i32, i32* %11
%107 = add nsw i32 %106, 1
store i32 %107, i32* %11
br label %81
108: ; preds = %81
%109 = load i8*, i8** %15
%110 = icmp ne i8* %109, null
br i1 %110, label %112, label %111
111: ; preds = %108
store i32 0, i32* %3
br label %162
112: ; preds = %108
%113 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%114 = call i32 @strlen(i8* %113)
store i32 %114, i32* %12
%115 = load i32, i32* %12
%116 = sub nsw i32 %115, 1
store i32 %116, i32* %11
br label %117
117: ; preds = %133, %112
%118 = load i32, i32* %11
%119 = icmp sgt i32 %118, 1
br i1 %119, label %120, label %136
120: ; preds = %117
%121 = load i32, i32* %11
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %122
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %125, 32
br i1 %126, label %127, label %131
127: ; preds = %120
%128 = load i32, i32* %11
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 %129
store i8 0, i8* %130
br label %132
131: ; preds = %120
br label %136
132: ; preds = %127
br label %133
133: ; preds = %132
%134 = load i32, i32* %11
%135 = add nsw i32 %134, -1
store i32 %135, i32* %11
br label %117
136: ; preds = %131, %117
%137 = load %struct.epsg_dict*, %struct.epsg_dict** %5
%138 = getelementptr inbounds [16 x i8], [16 x i8]* %13, i64 0, i64 0
%139 = call i32 @atoi(i8* %138)
%140 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%141 = load i8*, i8** %15
%142 = call i32 @epsg_insert(%struct.epsg_dict* %137, i32 %139, i8* %140, i8* %141)
store i32 0, i32* %9
%143 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
store i8 0, i8* %143
br label %154
144: ; preds = %29
%145 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%146 = call i64 @strncmp(i8* %145, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%147 = icmp ne i64 %146, 0
br i1 %147, label %148, label %149
148: ; preds = %144
store i32 0, i32* %3
br label %162
149: ; preds = %144
%150 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%151 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
%152 = getelementptr inbounds i8, i8* %151, i64 2
%153 = call i32 @strcpy(i8* %150, i8* %152)
store i32 1, i32* %9
br label %154
154: ; preds = %149, %136
%155 = getelementptr inbounds [1024 x i8], [1024 x i8]* %6, i64 0, i64 0
store i8* %155, i8** %8
br label %17
156: ; preds = %26
%157 = load i32, i32* %10
%158 = trunc i32 %157 to i8
%159 = load i8*, i8** %8
%160 = getelementptr inbounds i8, i8* %159, i32 1
store i8* %160, i8** %8
store i8 %158, i8* %159
br label %17
161: ; preds = %17
store i32 1, i32* %3
br label %162
162: ; preds = %161, %148, %111, %75, %66, %53, %47
%163 = load i32, i32* %3
ret i32 %163
}

LLVM IR (-O2):
%struct.epsg_dict = type { i32 }
@EOF = global i32 0
@.str = [3 x i8] c"# \00"
@.str.1 = [3 x i8] c"<>\00"
define i32 @parse_epsg(i32* nocapture %0, %struct.epsg_dict* %1) {
%3 = alloca [1024 x i8]
%4 = alloca [512 x i8]
%5 = alloca [16 x i8]
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 2
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 1
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 3
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 1
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 4
%14 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 2
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 3
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 5
%17 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 3
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 4
%19 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 6
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 4
%21 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 5
%22 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 7
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 5
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 6
%25 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 8
%26 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 6
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 7
%28 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 9
%29 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 7
%30 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 8
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 10
%32 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 8
%33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 9
%34 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 11
br label %35
35: ; preds = %125, %2
%36 = phi i32 [ 0, %2 ], [ %126, %125 ]
br label %37
37: ; preds = %35, %127
%38 = phi i8* [ %129, %127 ], [ %6, %35 ]
br label %39
39: ; preds = %37, %43
%40 = call i32 @getc(i32* %0)
%41 = load i32, i32* @EOF
%42 = icmp eq i32 %40, %41
br i1 %42, label %130, label %43
43: ; preds = %39
switch i32 %40, label %127 [
i32 13, label %39
i32 10, label %44
]
44: ; preds = %43
store i8 0, i8* %38
%45 = icmp eq i32 %36, 0
br i1 %45, label %120, label %46
46: ; preds = %44
%47 = call i32 @strlen(i8* %6)
%48 = icmp eq i32 %36, 2
br i1 %48, label %49, label %52
49: ; preds = %46
%50 = load i8, i8* %6
%51 = icmp eq i8 %50, 35
br i1 %51, label %118, label %117
52: ; preds = %46
%53 = load i8, i8* %7
%54 = icmp eq i8 %53, 0
br i1 %54, label %117, label %55
55: ; preds = %52
%56 = call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%57 = icmp eq i64 %56, 0
br i1 %57, label %118, label %58
58: ; preds = %55
%59 = load i8, i8* %6
%60 = icmp eq i8 %59, 60
br i1 %60, label %61, label %117
61: ; preds = %58
%62 = sext i32 %47 to i64
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %62
%64 = getelementptr inbounds i8, i8* %63, i64 -2
%65 = call i64 @strcmp(i8* %64, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %117
67: ; preds = %61
%68 = add nsw i32 %47, -2
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %69
store i8 0, i8* %70
%71 = load i8, i8* %10
%72 = icmp eq i8 %71, 62
%73 = select i1 %72, i8* %11, i8* null
store i8 %71, i8* %8
%74 = load i8, i8* %9
%75 = icmp eq i8 %74, 62
%76 = select i1 %75, i8* %13, i8* %73
store i8 %74, i8* %12
%77 = load i8, i8* %15
%78 = icmp eq i8 %77, 62
%79 = select i1 %78, i8* %16, i8* %76
store i8 %77, i8* %14
%80 = load i8, i8* %18
%81 = icmp eq i8 %80, 62
%82 = select i1 %81, i8* %19, i8* %79
store i8 %80, i8* %17
%83 = load i8, i8* %21
%84 = icmp eq i8 %83, 62
%85 = select i1 %84, i8* %22, i8* %82
store i8 %83, i8* %20
%86 = load i8, i8* %24
%87 = icmp eq i8 %86, 62
%88 = select i1 %87, i8* %25, i8* %85
store i8 %86, i8* %23
%89 = load i8, i8* %27
%90 = icmp eq i8 %89, 62
%91 = select i1 %90, i8* %28, i8* %88
store i8 %89, i8* %26
%92 = load i8, i8* %30
%93 = icmp eq i8 %92, 62
%94 = select i1 %93, i8* %31, i8* %91
store i8 %92, i8* %29
%95 = load i8, i8* %33
%96 = icmp eq i8 %95, 62
store i8 %95, i8* %32
br i1 %96, label %99, label %97
97: ; preds = %67
%98 = icmp eq i8* %94, null
br i1 %98, label %117, label %99
99: ; preds = %67, %97
%100 = phi i8* [ %94, %97 ], [ %34, %67 ]
%101 = call i32 @strlen(i8* %6)
%102 = icmp sgt i32 %101, 2
br i1 %102, label %103, label %114
103: ; preds = %99
%104 = zext i32 %101 to i64
br label %105
105: ; preds = %103, %112
%106 = phi i64 [ %104, %103 ], [ %107, %112 ]
%107 = add nsw i64 %106, -1
%108 = and i64 %107, 4294967295
%109 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 %108
%110 = load i8, i8* %109
%111 = icmp eq i8 %110, 32
br i1 %111, label %112, label %114
112: ; preds = %105
store i8 0, i8* %109
%113 = icmp ugt i64 %106, 3
br i1 %113, label %105, label %114
114: ; preds = %105, %112, %99
%115 = call i32 @atoi(i8* %8)
%116 = call i32 @epsg_insert(%struct.epsg_dict* %1, i32 %115, i8* %7, i8* %100)
store i8 0, i8* %7
br label %125
117: ; preds = %49, %52, %58, %61, %97
br label %130
118: ; preds = %55, %49
%119 = phi i32 [ 0, %49 ], [ 2, %55 ]
store i8 0, i8* %7
br label %125
120: ; preds = %44
%121 = call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
%122 = icmp eq i64 %121, 0
br i1 %122, label %123, label %130
123: ; preds = %120
%124 = call i32 @strcpy(i8* %7, i8* %9)
br label %125
125: ; preds = %123, %114, %118
%126 = phi i32 [ %119, %118 ], [ 1, %123 ], [ 0, %114 ]
br label %35
127: ; preds = %43
%128 = trunc i32 %40 to i8
%129 = getelementptr inbounds i8, i8* %38, i64 1
store i8 %128, i8* %38
br label %37
130: ; preds = %120, %39, %117
%131 = phi i32 [ 0, %117 ], [ 1, %39 ], [ 0, %120 ]
ret i32 %131
}