#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 print_input_indicator(const char *input, const size_t index) {
  static const char *prefix = ": ";
  fprintf(stderr, "%s%s\n%s", prefix, input, prefix);
  for (size_t i = 0; i < index; ++i) {
    fputc(' ', stderr);
  }
  fprintf(stderr, "^\n");
}


x86 assembly (clang, -O0):
<print_input_indicator>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    0x2ef0(%rip),%rdx
mov    -0x8(%rbp),%rcx
mov    0x2ee5(%rip),%r8
lea    0xeb1(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1193 <print_input_indicator+0x73>
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
mov    $0x20,%edi
call   1030 <fputc@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1161 <print_input_indicator+0x41>
mov    0x2e46(%rip),%rax
mov    (%rax),%edi
lea    0xe68(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_input_indicator>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%rcx
mov    0x2eaf(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
lea    0xebe(%rip),%rdx
mov    %rdx,%r8
xor    %eax,%eax
call   1040 <fprintf@plt>
test   %rbx,%rbx
je     1173 <print_input_indicator+0x53>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14),%esi
mov    $0x20,%edi
call   1030 <fputc@plt>
add    $0xffffffffffffffff,%rbx
jne    1160 <print_input_indicator+0x40>
mov    (%r14),%edi
lea    0xe8e(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@print_input_indicator.prefix = internal global i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i32 0, i32 0)
@.str = [3 x i8] c": \00"
@stderr = global i32 0
@.str.1 = [8 x i8] c"%s%s\0A%s\00"
@.str.2 = [3 x i8] c"^\0A\00"
define void @print_input_indicator(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i32, i32* @stderr
%7 = load i8*, i8** @print_input_indicator.prefix
%8 = load i8*, i8** %3
%9 = load i8*, i8** @print_input_indicator.prefix
%10 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
store i64 0, i64* %5
br label %11
11: ; preds = %18, %2
%12 = load i64, i64* %5
%13 = load i64, i64* %4
%14 = icmp ult i64 %12, %13
br i1 %14, label %15, label %21
15: ; preds = %11
%16 = load i32, i32* @stderr
%17 = call i32 @fputc(i8 signext 32, i32 %16)
br label %18
18: ; preds = %15
%19 = load i64, i64* %5
%20 = add i64 %19, 1
store i64 %20, i64* %5
br label %11
21: ; preds = %11
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

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