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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, char *);
void __parseerror(int errcode, int l_num, int l_offset) {
  static char *errstr[] = {
      "NUM_EXPECTED",    "SYM_EXPECTED",          "ADDR_EXPECTED",
      "SYM_TOLONG",      "TO_MANY_DEF_IN_MODULE", "TO_MANY_USE_IN_MODULE",
      "TO_MANY_SYMBOLS", "TO_MANY_INSTR",
  };
  printf("Parse Error line %d offset %d: %s\n", l_num, l_offset,
         errstr[errcode]);
}


x86 assembly (clang, -O0):
<__parseerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
movslq -0x4(%rbp),%rcx
lea    0x2efe(%rip),%rax
mov    (%rax,%rcx,8),%rcx
lea    0xf40(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__parseerror>:
movslq %edi,%rax
lea    0xee6(%rip),%rdi
movslq (%rdi,%rax,4),%rcx
add    %rdi,%rcx
lea    0xf75(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@__parseerror.errstr = internal global [8 x i8*] [i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i32 0, i32 0)]
@.str = [13 x i8] c"NUM_EXPECTED\00"
@.str.1 = [13 x i8] c"SYM_EXPECTED\00"
@.str.2 = [14 x i8] c"ADDR_EXPECTED\00"
@.str.3 = [11 x i8] c"SYM_TOLONG\00"
@.str.4 = [22 x i8] c"TO_MANY_DEF_IN_MODULE\00"
@.str.5 = [22 x i8] c"TO_MANY_USE_IN_MODULE\00"
@.str.6 = [16 x i8] c"TO_MANY_SYMBOLS\00"
@.str.7 = [14 x i8] c"TO_MANY_INSTR\00"
@.str.8 = [35 x i8] c"Parse Error line %d offset %d: %s\0A\00"
define void @__parseerror(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [8 x i8*], [8 x i8*]* @__parseerror.errstr, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %7, i32 %8, i8* %12)
ret void
}

LLVM IR (-O2):
@reltable.__parseerror = internal unnamed_addr constant [8 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([13 x i8]* @.str.1 to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.2 to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([11 x i8]* @.str.3 to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.4 to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([22 x i8]* @.str.5 to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([16 x i8]* @.str.6 to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([14 x i8]* @.str.7 to i64), i64 ptrtoint ([8 x i32]* @reltable.__parseerror to i64)) to i32)]
@.str = [13 x i8] c"NUM_EXPECTED\00"
@.str.1 = [13 x i8] c"SYM_EXPECTED\00"
@.str.2 = [14 x i8] c"ADDR_EXPECTED\00"
@.str.3 = [11 x i8] c"SYM_TOLONG\00"
@.str.4 = [22 x i8] c"TO_MANY_DEF_IN_MODULE\00"
@.str.5 = [22 x i8] c"TO_MANY_USE_IN_MODULE\00"
@.str.6 = [16 x i8] c"TO_MANY_SYMBOLS\00"
@.str.7 = [14 x i8] c"TO_MANY_INSTR\00"
@.str.8 = [35 x i8] c"Parse Error line %d offset %d: %s\0A\00"
define void @__parseerror(i32 %0, i32 %1, i32 %2) {
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([8 x i32]* @reltable.__parseerror to i8*), i64 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.8, i64 0, i64 0), i32 %1, i32 %2, i8* %6)
ret void
}