#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 */
#define EEXIST 128
int S_IFIFO;
int errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
scalar_t__ mknod(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  int i;
  if (argc == 1) {
    fprintf(stderr, "%s: opérande manquant\n", argv[0]);
  } else {
    for (i = 1; i < argc; i++) {
      if (mknod(argv[i], S_IFIFO | 0666, 0)) {
        switch (errno) {
        case EEXIST:
          fprintf(stderr, "Le fichier %s existe déjà.\n", argv[i]);
          break;
        default:
          fprintf(stderr, "Impossible de créer le fichier %s\n", argv[i]);
        }
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1161 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xea9(%rip),%rsi
call   1030 <fprintf@plt>
jmp    121d <main+0xfd>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1218 <main+0xf8>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2e49(%rip),%rax
mov    (%rax),%esi
or     $0x1b6,%esi
xor    %edx,%edx
call   1040 <mknod@plt>
cmp    $0x0,%rax
je     1205 <main+0xe5>
mov    0x2e31(%rip),%rax
mov    (%rax),%eax
sub    $0x80,%eax
jne    11df <main+0xbf>
jmp    11b9 <main+0x99>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe43(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1200 <main+0xe0>
mov    0x2dfa(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xe3b(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1205 <main+0xe5>
jmp    120a <main+0xea>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1168 <main+0x48>
jmp    121d <main+0xfd>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r15
cmp    $0x1,%edi
jne    114d <main+0x2d>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    (%r15),%rdx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
jmp    11be <main+0x9e>
jle    11be <main+0x9e>
mov    %edi,%r14d
mov    $0x1,%ebx
mov    0x2e72(%rip),%r12
mov    $0x1b6,%ebp
lea    0xecc(%rip),%r13
jmp    1179 <main+0x59>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %rbx,%r14
je     11be <main+0x9e>
mov    (%r15,%rbx,8),%rdi
mov    (%r12),%esi
or     %ebp,%esi
xor    %edx,%edx
call   1040 <mknod@plt>
test   %rax,%rax
je     1170 <main+0x50>
mov    0x2e42(%rip),%rax
cmpl   $0x80,(%rax)
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
mov    (%r15,%rbx,8),%rdx
mov    %r13,%rsi
lea    0xe65(%rip),%rax
cmove  %rax,%rsi
call   1030 <fprintf@plt>
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"%s: op\C3\A9rande manquant\0A\00"
@S_IFIFO = global i32 0
@errno = global i32 0
@.str.1 = [30 x i8] c"Le fichier %s existe d\C3\A9j\C3\A0.\0A\00"
@.str.2 = [36 x i8] c"Impossible de cr\C3\A9er le fichier %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %15
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %13)
br label %54
15: ; preds = %2
store i32 1, i32* %6
br label %16
16: ; preds = %50, %15
%17 = load i32, i32* %6
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %53
20: ; preds = %16
%21 = load i8**, i8*** %5
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8*, i8** %21, i64 %23
%25 = load i8*, i8** %24
%26 = load i32, i32* @S_IFIFO
%27 = or i32 %26, 438
%28 = call i64 @mknod(i8* %25, i32 %27, i32 0)
%29 = icmp ne i64 %28, 0
br i1 %29, label %30, label %49
30: ; preds = %20
%31 = load i32, i32* @errno
switch i32 %31, label %40 [
i32 128, label %32
]
32: ; preds = %30
%33 = load i32, i32* @stderr
%34 = load i8**, i8*** %5
%35 = load i32, i32* %6
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
%39 = call i32 @fprintf(i32 %33, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %38)
br label %48
40: ; preds = %30
%41 = load i32, i32* @stderr
%42 = load i8**, i8*** %5
%43 = load i32, i32* %6
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i32 @fprintf(i32 %41, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), i8* %46)
br label %48
48: ; preds = %40, %32
br label %49
49: ; preds = %48, %20
br label %50
50: ; preds = %49
%51 = load i32, i32* %6
%52 = add nsw i32 %51, 1
store i32 %52, i32* %6
br label %16
53: ; preds = %16
br label %54
54: ; preds = %53, %9
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"%s: op\C3\A9rande manquant\0A\00"
@S_IFIFO = global i32 0
@errno = global i32 0
@.str.1 = [30 x i8] c"Le fichier %s existe d\C3\A9j\C3\A0.\0A\00"
@.str.2 = [36 x i8] c"Impossible de cr\C3\A9er le fichier %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %30
6: ; preds = %4
%7 = zext i32 %0 to i64
br label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %1
%11 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %30
12: ; preds = %6, %27
%13 = phi i64 [ 1, %6 ], [ %28, %27 ]
%14 = getelementptr inbounds i8*, i8** %1, i64 %13
%15 = load i8*, i8** %14
%16 = load i32, i32* @S_IFIFO
%17 = or i32 %16, 438
%18 = tail call i64 @mknod(i8* %15, i32 %17, i32 0)
%19 = icmp eq i64 %18, 0
br i1 %19, label %27, label %20
20: ; preds = %12
%21 = load i32, i32* @errno
%22 = icmp eq i32 %21, 128
%23 = load i32, i32* @stderr
%24 = load i8*, i8** %14
%25 = select i1 %22, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0)
%26 = tail call i32 @fprintf(i32 %23, i8* %25, i8* %24)
br label %27
27: ; preds = %20, %12
%28 = add nuw nsw i64 %13, 1
%29 = icmp eq i64 %28, %7
br i1 %29, label %30, label %12
30: ; preds = %27, %4, %8
ret i32 0
}