#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 */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
scalar_t__ EEXIST;
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int, char *);
scalar_t__ mkfifo(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strerror(scalar_t__);
int Mkfifo(const char *pathname, mode_t mode) {
  if ((mkfifo(pathname, mode) < 0) && (errno != EEXIST)) {
    fprintf(stderr, "%s:%d: Mkfifo(): %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Ricky-Gong/LegoCar/refs/heads/master/"
            "CarServer/self/zed_spec/wrap.c",
            91, strerror(errno));
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<Mkfifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <mkfifo@plt>
cmp    $0x0,%rax
jge    11c2 <Mkfifo+0x82>
mov    0x2e64(%rip),%rax
mov    (%rax),%rax
mov    0x2e6a(%rip),%rcx
cmp    (%rcx),%rax
je     11c2 <Mkfifo+0x82>
mov    0x2e52(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    0x2e3e(%rip),%rax
mov    (%rax),%rdi
call   1060 <strerror@plt>
mov    -0x10(%rbp),%edi
mov    %rax,%r8
lea    0xe59(%rip),%rsi
lea    0xe67(%rip),%rdx
mov    $0x5b,%ecx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mkfifo>:
push   %rbx
call   1040 <mkfifo@plt>
test   %rax,%rax
jns    1161 <Mkfifo+0x21>
mov    0x2e7e(%rip),%rax
mov    (%rax),%rdi
mov    0x2e84(%rip),%rax
cmp    (%rax),%rdi
jne    1165 <Mkfifo+0x25>
xor    %eax,%eax
pop    %rbx
ret
mov    0x2e6c(%rip),%rax
mov    (%rax),%ebx
call   1060 <strerror@plt>
lea    0xe86(%rip),%rsi
lea    0xe94(%rip),%rdx
mov    %ebx,%edi
mov    $0x5b,%ecx
mov    %rax,%r8
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@EEXIST = global i64 0
@stderr = global i32 0
@.str = [21 x i8] c"%s:%d: Mkfifo(): %s\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Ricky-Gong/LegoCar/refs/heads/master/CarServer/self/zed_spec/wrap.c\00"
define i32 @Mkfifo(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i64 @mkfifo(i8* %5, i32 %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %19
9: ; preds = %2
%10 = load i64, i64* @errno
%11 = load i64, i64* @EEXIST
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load i32, i32* @stderr
%15 = load i64, i64* @errno
%16 = call i8* @strerror(i64 %15)
%17 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 91, i8* %16)
%18 = call i32 @exit(i32 1)
unreachable
19: ; preds = %9, %2
ret i32 0
}

LLVM IR (-O2):
@errno = global i64 0
@EEXIST = global i64 0
@stderr = global i32 0
@.str = [21 x i8] c"%s:%d: Mkfifo(): %s\0A\00"
@.str.1 = [158 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Ricky-Gong/LegoCar/refs/heads/master/CarServer/self/zed_spec/wrap.c\00"
define i32 @Mkfifo(i8* %0, i32 %1) {
%3 = tail call i64 @mkfifo(i8* %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %2
%6 = load i64, i64* @errno
%7 = load i64, i64* @EEXIST
%8 = icmp eq i64 %6, %7
br i1 %8, label %14, label %9
9: ; preds = %5
%10 = load i32, i32* @stderr
%11 = tail call i8* @strerror(i64 %6)
%12 = tail call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([158 x i8], [158 x i8]* @.str.1, i64 0, i64 0), i32 91, i8* %11)
%13 = tail call i32 @exit(i32 1)
unreachable
14: ; preds = %5, %2
ret i32 0
}