#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*/ print_help_snmf();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
void print_error_nmf(char *msg, char *file, int n) {
  printf("\n");
  if (!strcmp(msg, "cmd")) {
    printf("ERROR: no value for %s.\n\n", file);
    print_help_snmf();
  } else if (!strcmp(msg, "option")) {
    printf("ERROR: the following option is mandatory: %s.\n\n", file);
    print_help_snmf();
  } else if (!strcmp(msg, "missing")) {
    printf("ERROR: one of the following options is missing or not in the good "
           "range: -K / -c / -i / -m / -p / -z.\n\n");
    print_help_snmf();
  } else if (!strcmp(msg, "missing")) {
    printf("ERROR: one of the following options is missing: -e / -a / -m \n\n");
    print_help_snmf();
  } else if (!strcmp(msg, "basic")) {
    printf("ERROR: the command is not written correctly.\n\n");
    print_help_snmf();
  } else if (!strcmp(msg, "specific")) {
    printf("ERROR: %s.\n\n", file);
    print_help_snmf();
  } else {
    printf("ERROR: Internal error.\n");
  }
  printf("\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_error_nmf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xfa9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe94(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1198 <print_error_nmf+0x58>
mov    -0x10(%rbp),%rsi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_snmf@plt>
jmp    12c6 <print_error_nmf+0x186>
mov    -0x8(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11cf <print_error_nmf+0x8f>
mov    -0x10(%rbp),%rsi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_snmf@plt>
jmp    12c1 <print_error_nmf+0x181>
mov    -0x8(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1202 <print_error_nmf+0xc2>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_snmf@plt>
jmp    12bc <print_error_nmf+0x17c>
mov    -0x8(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1235 <print_error_nmf+0xf5>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_snmf@plt>
jmp    12b7 <print_error_nmf+0x177>
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1268 <print_error_nmf+0x128>
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_snmf@plt>
jmp    12b2 <print_error_nmf+0x172>
mov    -0x8(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    129f <print_error_nmf+0x15f>
mov    -0x10(%rbp),%rsi
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_snmf@plt>
jmp    12ad <print_error_nmf+0x16d>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    12b2 <print_error_nmf+0x172>
jmp    12b7 <print_error_nmf+0x177>
jmp    12bc <print_error_nmf+0x17c>
jmp    12c1 <print_error_nmf+0x181>
jmp    12c6 <print_error_nmf+0x186>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<print_error_nmf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe85(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    1190 <print_error_nmf+0x30>
lea    0xe76(%rip),%rdi
jmp    11aa <print_error_nmf+0x4a>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    11cf <print_error_nmf+0x6f>
lea    0xe7b(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1040 <print_help_snmf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
lea    0xe7f(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    11eb <print_error_nmf+0x8b>
lea    0xe90(%rip),%rdi
jmp    1205 <print_error_nmf+0xa5>
lea    0xe6b(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    120c <print_error_nmf+0xac>
lea    0xedb(%rip),%rdi
call   1050 <puts@plt>
jmp    11b4 <print_error_nmf+0x54>
lea    0xe50(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    1228 <print_error_nmf+0xc8>
lea    0xe46(%rip),%rdi
jmp    11aa <print_error_nmf+0x4a>
lea    0xedf(%rip),%rdi
call   1050 <puts@plt>
jmp    11bb <print_error_nmf+0x5b>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [4 x i8] c"cmd\00"
@.str.2 = [26 x i8] c"ERROR: no value for %s.\0A\0A\00"
@.str.3 = [7 x i8] c"option\00"
@.str.4 = [48 x i8] c"ERROR: the following option is mandatory: %s.\0A\0A\00"
@.str.5 = [8 x i8] c"missing\00"
@.str.6 = [104 x i8] c"ERROR: one of the following options is missing or not in the good range: -K / -c / -i / -m / -p / -z.\0A\0A\00"
@.str.7 = [64 x i8] c"ERROR: one of the following options is missing: -e / -a / -m \0A\0A\00"
@.str.8 = [6 x i8] c"basic\00"
@.str.9 = [47 x i8] c"ERROR: the command is not written correctly.\0A\0A\00"
@.str.10 = [9 x i8] c"specific\00"
@.str.11 = [13 x i8] c"ERROR: %s.\0A\0A\00"
@.str.12 = [24 x i8] c"ERROR: Internal error.\0A\00"
define void @print_error_nmf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = call i32 @strcmp(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%10 = icmp ne i32 %9, 0
br i1 %10, label %15, label %11
11: ; preds = %3
%12 = load i8*, i8** %5
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%14 = call i32 (...) @print_help_snmf()
br label %59
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8*, i8** %5
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8* %20)
%22 = call i32 (...) @print_help_snmf()
br label %58
23: ; preds = %15
%24 = load i8*, i8** %4
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %30, label %27
27: ; preds = %23
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([104 x i8], [104 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 (...) @print_help_snmf()
br label %57
30: ; preds = %23
%31 = load i8*, i8** %4
%32 = call i32 @strcmp(i8* %31, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%33 = icmp ne i32 %32, 0
br i1 %33, label %37, label %34
34: ; preds = %30
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.7, i64 0, i64 0))
%36 = call i32 (...) @print_help_snmf()
br label %56
37: ; preds = %30
%38 = load i8*, i8** %4
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %44, label %41
41: ; preds = %37
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.9, i64 0, i64 0))
%43 = call i32 (...) @print_help_snmf()
br label %55
44: ; preds = %37
%45 = load i8*, i8** %4
%46 = call i32 @strcmp(i8* %45, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%47 = icmp ne i32 %46, 0
br i1 %47, label %52, label %48
48: ; preds = %44
%49 = load i8*, i8** %5
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* %49)
%51 = call i32 (...) @print_help_snmf()
br label %54
52: ; preds = %44
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0))
br label %54
54: ; preds = %52, %48
br label %55
55: ; preds = %54, %41
br label %56
56: ; preds = %55, %34
br label %57
57: ; preds = %56, %27
br label %58
58: ; preds = %57, %19
br label %59
59: ; preds = %58, %11
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%61 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"cmd\00"
@.str.2 = [26 x i8] c"ERROR: no value for %s.\0A\0A\00"
@.str.3 = [7 x i8] c"option\00"
@.str.4 = [48 x i8] c"ERROR: the following option is mandatory: %s.\0A\0A\00"
@.str.5 = [8 x i8] c"missing\00"
@.str.8 = [6 x i8] c"basic\00"
@.str.10 = [9 x i8] c"specific\00"
@.str.11 = [13 x i8] c"ERROR: %s.\0A\0A\00"
@str = [103 x i8] c"ERROR: one of the following options is missing or not in the good range: -K / -c / -i / -m / -p / -z.\0A\00"
@str.13 = [46 x i8] c"ERROR: the command is not written correctly.\0A\00"
@str.14 = [23 x i8] c"ERROR: Internal error.\00"
define void @print_error_nmf(i8* nocapture %0, i8* %1, i32 %2) {
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%9 = tail call i32 (...) @print_help_snmf()
br label %36
10: ; preds = %3
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.4, i64 0, i64 0), i8* %1)
%15 = tail call i32 (...) @print_help_snmf()
br label %36
16: ; preds = %10
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 (...) @print_help_snmf()
br label %36
22: ; preds = %16
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.13, i64 0, i64 0))
%27 = tail call i32 (...) @print_help_snmf()
br label %36
28: ; preds = %22
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8* %1)
%33 = tail call i32 (...) @print_help_snmf()
br label %36
34: ; preds = %28
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.14, i64 0, i64 0))
br label %36
36: ; preds = %13, %31, %34, %25, %19, %7
%37 = tail call i32 @putchar(i32 10)
%38 = tail call i32 @exit(i32 1)
unreachable
}