#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 /*<<< orphan*/ squeezechar(char *, char);
int main(void) {
  char string1[] = "This string contains a bunch of 's' characters";
  char string2[] = "This string contains a bunch of 's' characters";
  squeezechar(string1, 's');
  printf("Removing all 's' from \"This string contains a bunch of 's' "
         "characters\"\n\nResult: \"%s\"\n",
         string1);
  squeeze(string2, "aeiou");
  printf("\nNow, remvoing all lowercase vowels from \"This string contains a "
         "bunch of 's' characters\"\n\nResult: \"%s\"\n",
         string2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xea6(%rip),%rsi
mov    $0x2f,%edx
call   1050 <memcpy@plt>
lea    -0x70(%rbp),%rdi
lea    0xe91(%rip),%rsi
mov    $0x2f,%edx
call   1050 <memcpy@plt>
lea    -0x40(%rbp),%rdi
mov    $0x73,%esi
call   1060 <squeezechar@plt>
lea    -0x40(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
lea    -0x70(%rbp),%rdi
lea    0xee3(%rip),%rsi
call   1030 <squeeze@plt>
lea    -0x70(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movups 0xee3(%rip),%xmm0
movups %xmm0,0x4f(%rsp)
movaps 0xec8(%rip),%xmm1
movaps %xmm1,0x40(%rsp)
movaps 0xeac(%rip),%xmm2
movaps %xmm2,0x30(%rsp)
movups %xmm0,0x1f(%rsp)
movaps %xmm1,0x10(%rsp)
movaps %xmm2,(%rsp)
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x73,%esi
call   1050 <squeezechar@plt>
lea    0xeaf(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
lea    0xef6(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xeea(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.string1 = [47 x i8] c"This string contains a bunch of 's' characters\00"
@__const.main.string2 = [47 x i8] c"This string contains a bunch of 's' characters\00"
@.str = [86 x i8] c"Removing all 's' from \22This string contains a bunch of 's' characters\22\0A\0AResult: \22%s\22\0A\00"
@.str.1 = [6 x i8] c"aeiou\00"
@.str.2 = [105 x i8] c"\0ANow, remvoing all lowercase vowels from \22This string contains a bunch of 's' characters\22\0A\0AResult: \22%s\22\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [47 x i8]
%3 = alloca [47 x i8]
store i32 0, i32* %1
%4 = bitcast [47 x i8]* %2 to i8*
%5 = bitcast [47 x i8]* %3 to i8*
%6 = getelementptr inbounds [47 x i8], [47 x i8]* %2, i64 0, i64 0
%7 = call i32 @squeezechar(i8* %6, i8 signext 115)
%8 = getelementptr inbounds [47 x i8], [47 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [47 x i8], [47 x i8]* %3, i64 0, i64 0
%11 = call i32 @squeeze(i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds [47 x i8], [47 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.2, i64 0, i64 0), i8* %12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string2 = [47 x i8] c"This string contains a bunch of 's' characters\00"
@.str = [86 x i8] c"Removing all 's' from \22This string contains a bunch of 's' characters\22\0A\0AResult: \22%s\22\0A\00"
@.str.1 = [6 x i8] c"aeiou\00"
@.str.2 = [105 x i8] c"\0ANow, remvoing all lowercase vowels from \22This string contains a bunch of 's' characters\22\0A\0AResult: \22%s\22\0A\00"
define i32 @main() {
%1 = alloca [47 x i8]
%2 = alloca [47 x i8]
%3 = getelementptr inbounds [47 x i8], [47 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [47 x i8], [47 x i8]* %2, i64 0, i64 0
%5 = call i32 @squeezechar(i8* %3, i8 signext 115)
%6 = call i32 @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = call i32 @squeeze(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}