#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*/ exit(int);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char *);
int /*<<< orphan*/ strlen(char *);
scalar_t__ write(int, char *, int /*<<< orphan*/);
void regexp_error(const char *s) {
  char buf[132];
  strcpy(buf, "regexp_error: ");
  strcat(buf, s);
  strcat(buf, "\n");
  if (write(2, buf, strlen(buf)) < 0)
    ;
  exit(1);
}


x86 assembly (clang, -O0):
<regexp_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
lea    0xe93(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1060 <strcat@plt>
lea    -0x90(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1060 <strcat@plt>
lea    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
lea    -0x90(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x98(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1040 <write@plt>
cmp    $0x0,%rax
jge    11d1 <regexp_error+0x81>
jmp    11d1 <regexp_error+0x81>
mov    $0x1,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<regexp_error>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rdi,%r14
lea    0xe9c(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <strcat@plt>
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcat@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"regexp_error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @regexp_error(i8* %0) {
%2 = alloca i8*
%3 = alloca [132 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [132 x i8], [132 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [132 x i8], [132 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @strcat(i8* %6, i8* %7)
%9 = getelementptr inbounds [132 x i8], [132 x i8]* %3, i64 0, i64 0
%10 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = getelementptr inbounds [132 x i8], [132 x i8]* %3, i64 0, i64 0
%12 = getelementptr inbounds [132 x i8], [132 x i8]* %3, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
%14 = call i64 @write(i32 2, i8* %11, i32 %13)
%15 = icmp slt i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %1
br label %17
17: ; preds = %16, %1
%18 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"regexp_error: \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @regexp_error(i8* %0) {
%2 = alloca [132 x i8]
%3 = getelementptr inbounds [132 x i8], [132 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strcat(i8* %3, i8* %0)
%6 = call i32 @strcat(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @strlen(i8* %3)
%8 = call i64 @write(i32 2, i8* %3, i32 %7)
%9 = call i32 @exit(i32 1)
unreachable
}