#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void cfg_parse_error_stderr(const char *error, const char *filename,
                            const char *line, int lineno, int colno) {
  fprintf(stderr, "%s:%d:%d: %s\n", filename, lineno, colno, error);
  fprintf(stderr, "\n%s\n", line);
  for (int i = 0; i < colno - 1; i++)
    fputc(' ', stderr);
  fprintf(stderr, "^\n\n");
}


x86 assembly (clang, -O0):
<cfg_parse_error_stderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x8(%rbp),%r9
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0xe99(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    11b5 <cfg_parse_error_stderr+0x95>
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
mov    $0x20,%edi
call   1030 <fputc@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1183 <cfg_parse_error_stderr+0x63>
mov    0x2e24(%rip),%rax
mov    (%rax),%edi
lea    0xe4e(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_parse_error_stderr>:
push   %r15
push   %r14
push   %rbx
mov    %r8d,%ebx
mov    %rdx,%r14
mov    %rsi,%rdx
mov    %rdi,%r9
mov    0x2ea8(%rip),%r15
mov    (%r15),%edi
lea    0xebe(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r15),%edi
lea    0xebb(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
cmp    $0x2,%ebx
jl     1182 <cfg_parse_error_stderr+0x62>
add    $0xffffffff,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r15),%esi
mov    $0x20,%edi
call   1030 <fputc@plt>
add    $0xffffffff,%ebx
jne    1170 <cfg_parse_error_stderr+0x50>
mov    (%r15),%edi
lea    0xe87(%rip),%rsi
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"%s:%d:%d: %s\0A\00"
@.str.1 = [5 x i8] c"\0A%s\0A\00"
@.str.2 = [4 x i8] c"^\0A\0A\00"
define void @cfg_parse_error_stderr(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %7
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = load i8*, i8** %6
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i32 %15, i8* %16)
%18 = load i32, i32* @stderr
%19 = load i8*, i8** %8
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %19)
store i32 0, i32* %11
br label %21
21: ; preds = %29, %5
%22 = load i32, i32* %11
%23 = load i32, i32* %10
%24 = sub nsw i32 %23, 1
%25 = icmp slt i32 %22, %24
br i1 %25, label %26, label %32
26: ; preds = %21
%27 = load i32, i32* @stderr
%28 = call i32 @fputc(i8 signext 32, i32 %27)
br label %29
29: ; preds = %26
%30 = load i32, i32* %11
%31 = add nsw i32 %30, 1
store i32 %31, i32* %11
br label %21
32: ; preds = %21
%33 = load i32, i32* @stderr
%34 = call i32 (i32, i8*, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"%s:%d:%d: %s\0A\00"
@.str.1 = [5 x i8] c"\0A%s\0A\00"
@.str.2 = [4 x i8] c"^\0A\0A\00"
define void @cfg_parse_error_stderr(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3, i32 %4, i8* %0)
%8 = load i32, i32* @stderr
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%10 = add i32 %4, -1
%11 = icmp sgt i32 %4, 1
br i1 %11, label %15, label %12
12: ; preds = %15, %5
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
ret void
15: ; preds = %5, %15
%16 = phi i32 [ %19, %15 ], [ 0, %5 ]
%17 = load i32, i32* @stderr
%18 = tail call i32 @fputc(i8 signext 32, i32 %17)
%19 = add nuw nsw i32 %16, 1
%20 = icmp eq i32 %19, %10
br i1 %20, label %12, label %15
}