#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*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main() {
  char test_str[] = "This is a test lol!";
  char to_remove[] = "aeiou";
  printf("Before: %s\n", test_str);
  squeeze(test_str, to_remove);
  printf("After : %s\n", test_str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec0(%rip),%eax
mov    %eax,-0x26(%rbp)
mov    0xeba(%rip),%ax
mov    %ax,-0x22(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
lea    -0x26(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0x20(%rbp),%rsi
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x216c6f,0x20(%rsp)
movw   $0x75,0xc(%rsp)
movl   $0x6f696561,0x8(%rsp)
6f
lea    0xecb(%rip),%rdi
lea    0x10(%rsp),%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xeb6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.test_str = [20 x i8] c"This is a test lol!\00"
@__const.main.to_remove = [6 x i8] c"aeiou\00"
@.str = [12 x i8] c"Before: %s\0A\00"
@.str.1 = [12 x i8] c"After : %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [20 x i8]
%3 = alloca [6 x i8]
store i32 0, i32* %1
%4 = bitcast [20 x i8]* %2 to i8*
%5 = bitcast [6 x i8]* %3 to i8*
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%10 = call i32 @squeeze(i8* %8, i8* %9)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@__const.main.test_str = [20 x i8] c"This is a test lol!\00"
@__const.main.to_remove = [6 x i8] c"aeiou\00"
@.str = [12 x i8] c"Before: %s\0A\00"
@.str.1 = [12 x i8] c"After : %s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = alloca [6 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i32 @squeeze(i8* %3, i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret i32 0
}