#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*/ replaceAll(char *, char *, char *);
void cleanFileName(char *text) {
  replaceAll(text, ".html", "");
  replaceAll(text, ".htm", "");
  replaceAll(text, ".", "");
  replaceAll(text, "/", "");
  replaceAll(text, "\\", "");
}


x86 assembly (clang, -O0):
<cleanFileName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xede(%rip),%rdx
call   1030 <replaceAll@plt>
mov    -0x8(%rbp),%rdi
lea    0xec8(%rip),%rsi
lea    0xec7(%rip),%rdx
call   1030 <replaceAll@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb6(%rip),%rsi
lea    0xeb0(%rip),%rdx
call   1030 <replaceAll@plt>
mov    -0x8(%rbp),%rdi
lea    0xea1(%rip),%rsi
lea    0xe99(%rip),%rdx
call   1030 <replaceAll@plt>
mov    -0x8(%rbp),%rdi
lea    0xe8c(%rip),%rsi
lea    0xe82(%rip),%rdx
call   1030 <replaceAll@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanFileName>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%rsi
lea    0xee7(%rip),%r14
mov    %r14,%rdx
call   1030 <replaceAll@plt>
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <replaceAll@plt>
lea    0xec5(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <replaceAll@plt>
lea    0xeb5(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
call   1030 <replaceAll@plt>
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <replaceAll@plt>

LLVM IR (-O0):
@.str = [6 x i8] c".html\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c".htm\00"
@.str.3 = [2 x i8] c".\00"
@.str.4 = [2 x i8] c"/\00"
@.str.5 = [2 x i8] c"\\\00"
define void @cleanFileName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @replaceAll(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @replaceAll(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @replaceAll(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %2
%10 = call i32 @replaceAll(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%11 = load i8*, i8** %2
%12 = call i32 @replaceAll(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c".html\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c".htm\00"
@.str.3 = [2 x i8] c".\00"
@.str.4 = [2 x i8] c"/\00"
@.str.5 = [2 x i8] c"\\\00"
define void @cleanFileName(i8* %0) {
%2 = tail call i32 @replaceAll(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @replaceAll(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @replaceAll(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @replaceAll(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @replaceAll(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
ret void
}