#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 */
char *get_error_filename(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ system(char *);
void remove_appaserver_error_file(char *destination_application,
                                  char *appaserver_error_directory,
                                  char really_yn) {
  char sys_string[1024];
  char *error_filename;
  error_filename =
      get_error_filename(appaserver_error_directory, destination_application);
  if (really_yn == 'y') {
    sprintf(sys_string, "rm %s 2>&1 | html_paragraph_wrapper", error_filename);
    if (system(sys_string)) {
    };
  } else {
    printf("<p>rm %s\n", error_filename);
  }
}


x86 assembly (clang, -O0):
<remove_appaserver_error_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <get_error_filename@plt>
mov    %rax,-0x428(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x79,%eax
jne    11b3 <remove_appaserver_error_file+0x73>
lea    -0x420(%rbp),%rdi
mov    -0x428(%rbp),%rdx
lea    0xe72(%rip),%rsi
call   1060 <sprintf@plt>
lea    -0x420(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
je     11ae <remove_appaserver_error_file+0x6e>
jmp    11ae <remove_appaserver_error_file+0x6e>
jmp    11c6 <remove_appaserver_error_file+0x86>
mov    -0x428(%rbp),%rsi
lea    0xe63(%rip),%rdi
call   1040 <printf@plt>
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_appaserver_error_file>:
push   %rbx
sub    $0x400,%rsp
mov    %edx,%ebx
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1050 <get_error_filename@plt>
cmp    $0x79,%bl
jne    1183 <remove_appaserver_error_file+0x43>
lea    0xe9c(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rdx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret
lea    0xe9a(%rip),%rdi
mov    %rax,%rsi
add    $0x400,%rsp
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"rm %s 2>&1 | html_paragraph_wrapper\00"
@.str.1 = [10 x i8] c"<p>rm %s\0A\00"
define void @remove_appaserver_error_file(i8* %0, i8* %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8
%7 = alloca [1024 x i8]
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8 %2, i8* %6
%9 = load i8*, i8** %5
%10 = load i8*, i8** %4
%11 = call i8* @get_error_filename(i8* %9, i8* %10)
store i8* %11, i8** %8
%12 = load i8, i8* %6
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 121
br i1 %14, label %15, label %24
15: ; preds = %3
%16 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%17 = load i8*, i8** %8
%18 = call i32 @sprintf(i8* %16, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%20 = call i64 @system(i8* %19)
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %23
22: ; preds = %15
br label %23
23: ; preds = %22, %15
br label %27
24: ; preds = %3
%25 = load i8*, i8** %8
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %25)
br label %27
27: ; preds = %24, %23
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"rm %s 2>&1 | html_paragraph_wrapper\00"
@.str.1 = [10 x i8] c"<p>rm %s\0A\00"
define void @remove_appaserver_error_file(i8* %0, i8* %1, i8 signext %2) {
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%6 = tail call i8* @get_error_filename(i8* %1, i8* %0)
%7 = icmp eq i8 %2, 121
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %6)
%10 = call i64 @system(i8* %5)
br label %13
11: ; preds = %3
%12 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %6)
br label %13
13: ; preds = %11, %8
ret void
}