#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_lfmm();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
void print_error_lfmm(char *msg, char *file, int n) {
  printf("\n");
  if (!strcmp(msg, "cmd")) {
    printf("ERROR: no value for %s.\n\n", file);
    print_help_lfmm();
  } else if (!strcmp(msg, "option")) {
    printf("ERROR: the following option is mandatory: %s.\n\n", file);
    print_help_lfmm();
  } else if (!strcmp(msg, "missing")) {
    printf("ERROR: one of the following options is missing or not positive:"
           " -K / -b / -i / -p / -d.\n\n");
    print_help_lfmm();
  } else if (!strcmp(msg, "basic")) {
    printf("ERROR: the command is not written correctly.\n\n");
    print_help_lfmm();
  } else if (!strcmp(msg, "specific")) {
    printf("ERROR: %s.\n\n", file);
    print_help_lfmm();
  } else {
    printf("ERROR: Internal error.\n");
  }
  printf("\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_error_lfmm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    0xf5b(%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_lfmm+0x58>
mov    -0x10(%rbp),%rsi
lea    0xe7f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_lfmm@plt>
jmp    128e <print_error_lfmm+0x14e>
mov    -0x8(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11cf <print_error_lfmm+0x8f>
mov    -0x10(%rbp),%rsi
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_lfmm@plt>
jmp    1289 <print_error_lfmm+0x149>
mov    -0x8(%rbp),%rdi
lea    0xe7b(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1202 <print_error_lfmm+0xc2>
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_lfmm@plt>
jmp    1284 <print_error_lfmm+0x144>
mov    -0x8(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1235 <print_error_lfmm+0xf5>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_lfmm@plt>
jmp    127f <print_error_lfmm+0x13f>
mov    -0x8(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    126c <print_error_lfmm+0x12c>
mov    -0x10(%rbp),%rsi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <print_help_lfmm@plt>
jmp    127a <print_error_lfmm+0x13a>
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    127f <print_error_lfmm+0x13f>
jmp    1284 <print_error_lfmm+0x144>
jmp    1289 <print_error_lfmm+0x149>
jmp    128e <print_error_lfmm+0x14e>
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<print_error_lfmm>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0xa,%edi
call   1040 <putchar@plt>
lea    0xe85(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    1190 <print_error_lfmm+0x30>
lea    0xe76(%rip),%rdi
jmp    11aa <print_error_lfmm+0x4a>
lea    0xe87(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    11cf <print_error_lfmm+0x6f>
lea    0xe7b(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
call   1030 <print_help_lfmm@plt>
mov    $0xa,%edi
call   1040 <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_lfmm+0x8b>
lea    0xe90(%rip),%rdi
jmp    1205 <print_error_lfmm+0xa5>
lea    0xe6b(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    120c <print_error_lfmm+0xac>
lea    0xecd(%rip),%rdi
call   1050 <puts@plt>
jmp    11b4 <print_error_lfmm+0x54>
lea    0xe50(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    1228 <print_error_lfmm+0xc8>
lea    0xe46(%rip),%rdi
jmp    11aa <print_error_lfmm+0x4a>
lea    0xed1(%rip),%rdi
call   1050 <puts@plt>
jmp    11bb <print_error_lfmm+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 = [90 x i8] c"ERROR: one of the following options is missing or not positive: -K / -b / -i / -p / -d.\0A\0A\00"
@.str.7 = [6 x i8] c"basic\00"
@.str.8 = [47 x i8] c"ERROR: the command is not written correctly.\0A\0A\00"
@.str.9 = [9 x i8] c"specific\00"
@.str.10 = [13 x i8] c"ERROR: %s.\0A\0A\00"
@.str.11 = [24 x i8] c"ERROR: Internal error.\0A\00"
define void @print_error_lfmm(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_lfmm()
br label %51
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_lfmm()
br label %50
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 ([90 x i8], [90 x i8]* @.str.6, i64 0, i64 0))
%29 = call i32 (...) @print_help_lfmm()
br label %49
30: ; preds = %23
%31 = load i8*, i8** %4
%32 = call i32 @strcmp(i8* %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, 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 ([47 x i8], [47 x i8]* @.str.8, i64 0, i64 0))
%36 = call i32 (...) @print_help_lfmm()
br label %48
37: ; preds = %30
%38 = load i8*, i8** %4
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
br i1 %40, label %45, label %41
41: ; preds = %37
%42 = load i8*, i8** %5
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0), i8* %42)
%44 = call i32 (...) @print_help_lfmm()
br label %47
45: ; preds = %37
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
br label %47
47: ; preds = %45, %41
br label %48
48: ; preds = %47, %34
br label %49
49: ; preds = %48, %27
br label %50
50: ; preds = %49, %19
br label %51
51: ; preds = %50, %11
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%53 = 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.7 = [6 x i8] c"basic\00"
@.str.9 = [9 x i8] c"specific\00"
@.str.10 = [13 x i8] c"ERROR: %s.\0A\0A\00"
@str = [89 x i8] c"ERROR: one of the following options is missing or not positive: -K / -b / -i / -p / -d.\0A\00"
@str.12 = [46 x i8] c"ERROR: the command is not written correctly.\0A\00"
@str.13 = [23 x i8] c"ERROR: Internal error.\00"
define void @print_error_lfmm(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_lfmm()
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_lfmm()
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 ([89 x i8], [89 x i8]* @str, i64 0, i64 0))
%21 = tail call i32 (...) @print_help_lfmm()
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.7, 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.12, i64 0, i64 0))
%27 = tail call i32 (...) @print_help_lfmm()
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.9, 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.10, i64 0, i64 0), i8* %1)
%33 = tail call i32 (...) @print_help_lfmm()
br label %36
34: ; preds = %28
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.13, i64 0, i64 0))
br label %36
36: ; preds = %13, %25, %34, %31, %19, %7
%37 = tail call i32 @putchar(i32 10)
%38 = tail call i32 @exit(i32 1)
unreachable
}