#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 EXIT_SUCCESS;
int /*<<< orphan*/ free(char *);
char *line_reading(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ text_filter(char *, char *);
int main() {
  printf("Enter ban words\n");
  char *bannedWords = line_reading(200);
  printf("Enter text\n");
  char *text = line_reading(200);
  text_filter(text, bannedWords);
  printf("%s", text);
  free(bannedWords);
  free(text);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xc8,%edi
call   1060 <line_reading@plt>
mov    %rax,-0x10(%rbp)
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0xc8,%edi
call   1060 <line_reading@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <text_filter@plt>
mov    -0x18(%rbp),%rsi
lea    0xe7e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x2e21(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xc8,%edi
call   1070 <line_reading@plt>
mov    %rax,%r14
lea    0xe9f(%rip),%rdi
call   1040 <puts@plt>
mov    $0xc8,%edi
call   1070 <line_reading@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1050 <text_filter@plt>
lea    0xe68(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x2e27(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter ban words\0A\00"
@.str.1 = [12 x i8] c"Enter text\0A\00"
@.str.2 = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%5 = call i8* @line_reading(i32 200)
store i8* %5, i8** %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%7 = call i8* @line_reading(i32 200)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @text_filter(i8* %8, i8* %9)
%11 = load i8*, i8** %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %2
%14 = call i32 @free(i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
%17 = load i32, i32* @EXIT_SUCCESS
ret i32 %17
}

LLVM IR (-O2):
@.str.2 = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
@str = [16 x i8] c"Enter ban words\00"
@str.3 = [11 x i8] c"Enter text\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i8* @line_reading(i32 200)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0))
%4 = tail call i8* @line_reading(i32 200)
%5 = tail call i32 @text_filter(i8* %4, i8* %2)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
%7 = tail call i32 @free(i8* %2)
%8 = tail call i32 @free(i8* %4)
%9 = load i32, i32* @EXIT_SUCCESS
ret i32 %9
}