#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*/ abort();
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
void x_perror(const char *s) {
  fprintf(stderr, "%s:%d: ",
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/paulgriffiths/curses_games/refs/heads/"
          "master/pgcommon/util.c",
          138);
  fprintf(stderr, "%s: %s", s, strerror(errno));
  fputc('\n', stderr);
  fflush(stderr);
  abort();
  ;
}


x86 assembly (clang, -O0):
<x_perror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
lea    0xe95(%rip),%rdx
mov    $0x8a,%ecx
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e5a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
call   1070 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %rax,%rcx
lea    0xeed(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e20(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<x_perror>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    0x2e82(%rip),%rbx
mov    (%rbx),%edi
lea    0xe99(%rip),%rsi
lea    0xe9a(%rip),%rdx
mov    $0x8a,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%ebp
mov    0x2e55(%rip),%rax
mov    (%rax),%edi
call   1070 <strerror@plt>
lea    0xf0e(%rip),%rsi
mov    %ebp,%edi
mov    %r14,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    (%rbx),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [8 x i8] c"%s:%d: \00"
@.str.1 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/paulgriffiths/curses_games/refs/heads/master/pgcommon/util.c\00"
@.str.2 = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @x_perror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.1, i64 0, i64 0), i32 138)
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = load i32, i32* @errno
%8 = call i8* @strerror(i32 %7)
%9 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %6, i8* %8)
%10 = load i32, i32* @stderr
%11 = call i32 @fputc(i8 signext 10, i32 %10)
%12 = load i32, i32* @stderr
%13 = call i32 @fflush(i32 %12)
%14 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [8 x i8] c"%s:%d: \00"
@.str.1 = [151 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/paulgriffiths/curses_games/refs/heads/master/pgcommon/util.c\00"
@.str.2 = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @x_perror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str.1, i64 0, i64 0), i32 138)
%4 = load i32, i32* @stderr
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %0, i8* %6)
%8 = load i32, i32* @stderr
%9 = tail call i32 @fputc(i8 signext 10, i32 %8)
%10 = load i32, i32* @stderr
%11 = tail call i32 @fflush(i32 %10)
%12 = tail call i32 (...) @abort()
unreachable
}