#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 */
scalar_t__ mkfifo(char *, int);
int /*<<< orphan*/ remove(char *);
int File_Fifo_Init(void) {
  int result = 0;
  remove("/tmp/smpiinp");
  remove("/tmp/smpiout");
  remove("/tmp/smpierr");
  if (mkfifo("/tmp/smpiinp", 0777) || mkfifo("/tmp/smpiout", 0777) ||
      mkfifo("/tmp/smpierr", 0777))
    result = -1;
  else
    result = 1;
  return result;
}


x86 assembly (clang, -O0):
<File_Fifo_Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <remove@plt>
lea    0xecb(%rip),%rdi
call   1030 <remove@plt>
lea    0xecc(%rip),%rdi
call   1030 <remove@plt>
lea    0xea6(%rip),%rdi
mov    $0x1ff,%esi
call   1040 <mkfifo@plt>
cmp    $0x0,%rax
jne    11a4 <File_Fifo_Init+0x84>
lea    0xe98(%rip),%rdi
mov    $0x1ff,%esi
call   1040 <mkfifo@plt>
cmp    $0x0,%rax
jne    11a4 <File_Fifo_Init+0x84>
lea    0xe8a(%rip),%rdi
mov    $0x1ff,%esi
call   1040 <mkfifo@plt>
cmp    $0x0,%rax
je     11b0 <File_Fifo_Init+0x90>
movl   $0xffffffff,-0x4(%rbp)
jmp    11b7 <File_Fifo_Init+0x97>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<File_Fifo_Init>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <remove@plt>
lea    0xed6(%rip),%rdi
call   1030 <remove@plt>
lea    0xed7(%rip),%rdi
call   1030 <remove@plt>
mov    %rbx,%rdi
mov    $0x1ff,%esi
call   1040 <mkfifo@plt>
mov    $0xffffffff,%ebx
test   %rax,%rax
jne    118e <File_Fifo_Init+0x6e>
lea    0xea7(%rip),%rdi
mov    $0x1ff,%esi
call   1040 <mkfifo@plt>
test   %rax,%rax
jne    118e <File_Fifo_Init+0x6e>
lea    0xe9e(%rip),%rdi
mov    $0x1ff,%esi
call   1040 <mkfifo@plt>
neg    %rax
sbb    %ebx,%ebx
or     $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"/tmp/smpiinp\00"
@.str.1 = [13 x i8] c"/tmp/smpiout\00"
@.str.2 = [13 x i8] c"/tmp/smpierr\00"
define i32 @File_Fifo_Init() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%5 = call i64 @mkfifo(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 511)
%6 = icmp ne i64 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %0
%8 = call i64 @mkfifo(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 511)
%9 = icmp ne i64 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = call i64 @mkfifo(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 511)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10, %7, %0
store i32 -1, i32* %1
br label %15
14: ; preds = %10
store i32 1, i32* %1
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
@.str = [13 x i8] c"/tmp/smpiinp\00"
@.str.1 = [13 x i8] c"/tmp/smpiout\00"
@.str.2 = [13 x i8] c"/tmp/smpierr\00"
define i32 @File_Fifo_Init() {
%1 = tail call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @remove(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i64 @mkfifo(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 511)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %0
%7 = tail call i64 @mkfifo(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 511)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = tail call i64 @mkfifo(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i32 511)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i32 1, i32 -1
br label %13
13: ; preds = %9, %0, %6
%14 = phi i32 [ -1, %6 ], [ -1, %0 ], [ %12, %9 ]
ret i32 %14
}