#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 dlr_snprintf_pretty_error(char *, int, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
void dlr_print_pretty_error(const char *context) {
  char buf[2048];
  int r;
  r = dlr_snprintf_pretty_error(buf, 2048, context);
  if (r == 0) {
    return;
  } else if (r < 0) {
    strcpy(buf, "Unable to pretty print DLRestrictions error.");
  }
  fputs(buf, stderr);
  fprintf(stderr, "\n");
}


x86 assembly (clang, -O0):
<dlr_print_pretty_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x810(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x800,%esi
call   1060 <dlr_snprintf_pretty_error@plt>
mov    %eax,-0x814(%rbp)
cmpl   $0x0,-0x814(%rbp)
jne    117c <dlr_print_pretty_error+0x3c>
jmp    11cb <dlr_print_pretty_error+0x8b>
cmpl   $0x0,-0x814(%rbp)
jge    119c <dlr_print_pretty_error+0x5c>
lea    -0x810(%rbp),%rdi
lea    0xe69(%rip),%rsi
call   1030 <strcpy@plt>
jmp    11a1 <dlr_print_pretty_error+0x61>
lea    -0x810(%rbp),%rdi
mov    0x2e31(%rip),%rax
mov    (%rax),%esi
call   1040 <fputs@plt>
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
lea    0xe67(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlr_print_pretty_error>:
push   %rbx
sub    $0x800,%rsp
mov    %rdi,%rdx
mov    %rsp,%rdi
mov    $0x800,%esi
call   1060 <dlr_snprintf_pretty_error@plt>
test   %eax,%eax
je     118c <dlr_print_pretty_error+0x4c>
jns    116d <dlr_print_pretty_error+0x2d>
lea    0xe9b(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
mov    0x2e6c(%rip),%rbx
mov    (%rbx),%esi
mov    %rsp,%rdi
call   1040 <fputs@plt>
mov    (%rbx),%edi
lea    0xea6(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Unable to pretty print DLRestrictions error.\00"
@stderr = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @dlr_print_pretty_error(i8* %0) {
%2 = alloca i8*
%3 = alloca [2048 x i8]
%4 = alloca i32
store i8* %0, i8** %2
%5 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%6 = load i8*, i8** %2
%7 = call i32 @dlr_snprintf_pretty_error(i8* %5, i32 2048, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
br label %24
11: ; preds = %1
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%16 = call i32 @strcpy(i8* %15, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %14, %11
br label %18
18: ; preds = %17
%19 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%20 = load i32, i32* @stderr
%21 = call i32 @fputs(i8* %19, i32 %20)
%22 = load i32, i32* @stderr
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %18, %10
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"Unable to pretty print DLRestrictions error.\00"
@stderr = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @dlr_print_pretty_error(i8* %0) {
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%4 = call i32 @dlr_snprintf_pretty_error(i8* %3, i32 2048, i8* %0)
%5 = icmp eq i32 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = icmp slt i32 %4, 0
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %6, %8
%11 = load i32, i32* @stderr
%12 = call i32 @fputs(i8* %3, i32 %11)
%13 = load i32, i32* @stderr
%14 = call i32 @fprintf(i32 %13, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %1, %10
ret void
}