#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 */
void arg_sprint_marker(size_t i, size_t n, char *ErrMark) {
  while (i-- > 0)
    *ErrMark++ = ' ';
  while (n-- > 0)
    *ErrMark++ = '^';
  *ErrMark = '\0';
}


x86 assembly (clang, -O0):
<arg_sprint_marker>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x8(%rbp)
cmp    $0x0,%rax
jbe    1140 <arg_sprint_marker+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x20,(%rax)
jmp    1110 <arg_sprint_marker+0x10>
jmp    1145 <arg_sprint_marker+0x45>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
cmp    $0x0,%rax
jbe    1175 <arg_sprint_marker+0x75>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x5e,(%rax)
jmp    1145 <arg_sprint_marker+0x45>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_sprint_marker>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r14
test   %rdi,%rdi
je     1136 <arg_sprint_marker+0x26>
mov    %rdi,%r15
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %r15,%rdx
call   1030 <memset@plt>
add    %r15,%rbx
test   %r14,%r14
je     114e <arg_sprint_marker+0x3e>
mov    %rbx,%rdi
mov    $0x5e,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
add    %r14,%rbx
movb   $0x0,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @arg_sprint_marker(i64 %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8* %2, i8** %6
br label %7
7: ; preds = %11, %3
%8 = load i64, i64* %4
%9 = add i64 %8, -1
store i64 %9, i64* %4
%10 = icmp ugt i64 %8, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8*, i8** %6
%13 = getelementptr inbounds i8, i8* %12, i32 1
store i8* %13, i8** %6
store i8 32, i8* %12
br label %7
14: ; preds = %7
br label %15
15: ; preds = %19, %14
%16 = load i64, i64* %5
%17 = add i64 %16, -1
store i64 %17, i64* %5
%18 = icmp ugt i64 %16, 0
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i8*, i8** %6
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %6
store i8 94, i8* %20
br label %15
22: ; preds = %15
%23 = load i8*, i8** %6
store i8 0, i8* %23
ret void
}

LLVM IR (-O2):
define void @arg_sprint_marker(i64 %0, i64 %1, i8* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = getelementptr i8, i8* %2, i64 %0
br label %7
7: ; preds = %5, %3
%8 = phi i8* [ %2, %3 ], [ %6, %5 ]
%9 = icmp eq i64 %1, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = getelementptr i8, i8* %8, i64 %1
br label %12
12: ; preds = %10, %7
%13 = phi i8* [ %8, %7 ], [ %11, %10 ]
store i8 0, i8* %13
ret void
}