int main(void) {
  const char forbidden_strings[][100] = {"abc", "xyz"};
  char text[] = {"abckdm abc xyz jdgwi ngennabcwi egwnegixyz"};
  applyCensorship(text, forbidden_strings);
  printf("%s\n", text);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1050 <memset@plt>
movb   $0x61,-0xd0(%rbp)
movb   $0x62,-0xcf(%rbp)
movb   $0x63,-0xce(%rbp)
movb   $0x78,-0x6c(%rbp)
movb   $0x79,-0x6b(%rbp)
movb   $0x7a,-0x6a(%rbp)
lea    -0x100(%rbp),%rdi
lea    0xe6c(%rip),%rsi
mov    $0x2b,%edx
call   1060 <memcpy@plt>
lea    -0x100(%rbp),%rdi
lea    -0xd0(%rbp),%rsi
mov    $0x0,%al
call   1030 <applyCensorship@plt>
lea    -0x100(%rbp),%rsi
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movq   $0x0,0xf0(%rsp)
movw   $0x6261,0x30(%rsp)
movb   $0x63,0x32(%rsp)
movw   $0x7978,0x94(%rsp)
movb   $0x7a,0x96(%rsp)
7a
movups 0xe6e(%rip),%xmm0
movups %xmm0,0x1b(%rsp)
movaps 0xe57(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe3b(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <applyCensorship@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.text = [43 x i8] c"abckdm abc xyz jdgwi ngennabcwi egwnegixyz\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [100 x i8]]
%3 = alloca [43 x i8]
store i32 0, i32* %1
%4 = bitcast [2 x [100 x i8]]* %2 to i8*
%5 = bitcast i8* %4 to [2 x [100 x i8]]*
%6 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %5, i32 0, i32 0
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i32 0, i32 0
store i8 97, i8* %7
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i32 0, i32 1
store i8 98, i8* %8
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i32 0, i32 2
store i8 99, i8* %9
%10 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %5, i32 0, i32 1
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i32 0, i32 0
store i8 120, i8* %11
%12 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i32 0, i32 1
store i8 121, i8* %12
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %10, i32 0, i32 2
store i8 122, i8* %13
%14 = bitcast [43 x i8]* %3 to i8*
%15 = getelementptr inbounds [43 x i8], [43 x i8]* %3, i64 0, i64 0
%16 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %2, i64 0, i64 0
%17 = call i32 (i8*, [100 x i8]*, ...) bitcast (i32 (...)* @applyCensorship to i32 (i8*, [100 x i8]*, ...)*)(i8* %15, [100 x i8]* %16)
%18 = getelementptr inbounds [43 x i8], [43 x i8]* %3, i64 0, i64 0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
ret i32 0
}

LLVM IR (-O2):
@__const.main.text = [43 x i8] c"abckdm abc xyz jdgwi ngennabcwi egwnegixyz\00"
define i32 @main() {
%1 = alloca [2 x [100 x i8]]
%2 = alloca [43 x i8]
%3 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0, i64 0
store i8 97, i8* %3
%4 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0, i64 1
store i8 98, i8* %4
%5 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0, i64 2
store i8 99, i8* %5
%6 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1, i64 0
store i8 120, i8* %6
%7 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1, i64 1
store i8 121, i8* %7
%8 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 1, i64 2
store i8 122, i8* %8
%9 = getelementptr inbounds [43 x i8], [43 x i8]* %2, i64 0, i64 0
%10 = getelementptr inbounds [2 x [100 x i8]], [2 x [100 x i8]]* %1, i64 0, i64 0
%11 = call i32 (i8*, [100 x i8]*, ...) bitcast (i32 (...)* @applyCensorship to i32 (i8*, [100 x i8]*, ...)*)(i8* %9, [100 x i8]* %10)
%12 = call i32 @puts(i8* %9)
ret i32 0
}