#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 LexGetCurrentColumnCount();
char *LexGetCurrentLine();
int LexGetCurrentLineCount();
char *LexGetErrorMessage();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ puts(char *);
void PrintErrorMessage(void) {
  printf("Error: Line: %d, Column: %d", LexGetCurrentLineCount(),
         LexGetCurrentColumnCount());
  puts("");
  printf("%s", LexGetCurrentLine());
  int i;
  for (i = 0; i < LexGetCurrentColumnCount() - 1; i++) {
    printf(" ");
  }
  printf("^ ");
  puts(LexGetErrorMessage());
}


x86 assembly (clang, -O0):
<PrintErrorMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1080 <LexGetCurrentLineCount@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <LexGetCurrentColumnCount@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0xe8e(%rip),%rdi
call   1040 <puts@plt>
mov    $0x0,%al
call   1070 <LexGetCurrentLine@plt>
mov    %rax,%rsi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <LexGetCurrentColumnCount@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11f0 <PrintErrorMessage+0x90>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11b7 <PrintErrorMessage+0x57>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <LexGetErrorMessage@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintErrorMessage>:
push   %rbx
xor    %eax,%eax
call   1090 <LexGetCurrentLineCount@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <LexGetCurrentColumnCount@plt>
lea    0xe78(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1080 <LexGetCurrentLine@plt>
lea    0xe71(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1060 <LexGetCurrentColumnCount@plt>
cmp    $0x2,%eax
jl     11eb <PrintErrorMessage+0x7b>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0x1,%ebx
xor    %eax,%eax
call   1060 <LexGetCurrentColumnCount@plt>
add    $0xffffffff,%eax
cmp    %eax,%ebx
jl     11d0 <PrintErrorMessage+0x60>
lea    0xe2d(%rip),%rdi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1040 <LexGetErrorMessage@plt>
mov    %rax,%rdi
pop    %rbx
jmp    1050 <puts@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Error: Line: %d, Column: %d\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [2 x i8] c" \00"
@.str.4 = [3 x i8] c"^ \00"
define void @PrintErrorMessage() {
%1 = alloca i32
%2 = call i32 (...) @LexGetCurrentLineCount()
%3 = call i32 (...) @LexGetCurrentColumnCount()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%6 = call i8* (...) @LexGetCurrentLine()
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6)
store i32 0, i32* %1
br label %8
8: ; preds = %15, %0
%9 = load i32, i32* %1
%10 = call i32 (...) @LexGetCurrentColumnCount()
%11 = sub nsw i32 %10, 1
%12 = icmp slt i32 %9, %11
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %15
15: ; preds = %13
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
store i32 %17, i32* %1
br label %8
18: ; preds = %8
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%20 = call i8* (...) @LexGetErrorMessage()
%21 = call i32 @puts(i8* %20)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Error: Line: %d, Column: %d\00"
@.str.2 = [3 x i8] c"%s\00"
@.str.4 = [3 x i8] c"^ \00"
define void @PrintErrorMessage() {
%1 = tail call i32 (...) @LexGetCurrentLineCount()
%2 = tail call i32 (...) @LexGetCurrentColumnCount()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i8* (...) @LexGetCurrentLine()
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%7 = tail call i32 (...) @LexGetCurrentColumnCount()
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %16
9: ; preds = %0, %9
%10 = phi i32 [ %12, %9 ], [ 0, %0 ]
%11 = tail call i32 @putchar(i32 32)
%12 = add nuw nsw i32 %10, 1
%13 = tail call i32 (...) @LexGetCurrentColumnCount()
%14 = add nsw i32 %13, -1
%15 = icmp slt i32 %12, %14
br i1 %15, label %9, label %16
16: ; preds = %9, %0
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%18 = tail call i8* (...) @LexGetErrorMessage()
%19 = tail call i32 @puts(i8* dereferenceable(1) %18)
ret void
}