#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*/ assert(int);
int /*<<< orphan*/ condense_by_removing(char *, char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  char s1[] = "aaaa";
  char s2[] = "aabbaa";
  char s3[] = "aaaabbbccd";
  condense_by_removing(s1, 'z');
  assert(!strcmp(s1, "aaaa"));
  condense_by_removing(s1, 'a');
  assert(!strcmp(s1, ""));
  condense_by_removing(s2, 'a');
  assert(!strcmp(s2, "bb"));
  condense_by_removing(s2, 'b');
  assert(!strcmp(s2, ""));
  condense_by_removing(s3, 'd');
  assert(!strcmp(s3, "aaaabbbcc"));
  condense_by_removing(s3, 'a');
  assert(!strcmp(s3, "bbbcc"));
  printf("Done.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xea4(%rip),%eax
mov    %eax,-0x15(%rbp)
mov    0xe9f(%rip),%al
mov    %al,-0x11(%rbp)
mov    0xe97(%rip),%eax
mov    %eax,-0x1c(%rbp)
mov    0xe91(%rip),%ax
mov    %ax,-0x18(%rbp)
mov    0xe89(%rip),%al
mov    %al,-0x16(%rbp)
mov    0xe80(%rip),%rax
mov    %rax,-0x27(%rbp)
mov    0xe7d(%rip),%ax
mov    %ax,-0x1f(%rbp)
mov    0xe75(%rip),%al
mov    %al,-0x1d(%rbp)
lea    -0x15(%rbp),%rdi
mov    $0x7a,%esi
call   1060 <condense_by_removing@plt>
lea    -0x15(%rbp),%rdi
lea    0xe43(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x15(%rbp),%rdi
mov    $0x61,%esi
call   1060 <condense_by_removing@plt>
lea    -0x15(%rbp),%rdi
lea    0xe3d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x1c(%rbp),%rdi
mov    $0x61,%esi
call   1060 <condense_by_removing@plt>
lea    -0x1c(%rbp),%rdi
lea    0xdfa(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x1c(%rbp),%rdi
mov    $0x62,%esi
call   1060 <condense_by_removing@plt>
lea    -0x1c(%rbp),%rdi
lea    0xddd(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x27(%rbp),%rdi
mov    $0x64,%esi
call   1060 <condense_by_removing@plt>
lea    -0x27(%rbp),%rdi
lea    0xd9d(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0x27(%rbp),%rdi
mov    $0x61,%esi
call   1060 <condense_by_removing@plt>
lea    -0x27(%rbp),%rdi
lea    0xd71(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xd59(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x61616161,0x8(%rsp)
61
movl   $0x616162,0x13(%rsp)
movl   $0x62626161,0x10(%rsp)
62
movabs $0x6362626261616161,%rbx
62 62 63
mov    %rbx,0x18(%rsp)
movl   $0x646363,0x1f(%rsp)
lea    0x8(%rsp),%r14
mov    %r14,%rdi
mov    $0x7a,%esi
call   1050 <condense_by_removing@plt>
mov    $0x61616161,%eax
xor    0x8(%rsp),%eax
movzbl 0xc(%rsp),%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
mov    $0x61,%esi
call   1050 <condense_by_removing@plt>
xor    %edi,%edi
cmpb   $0x0,0x8(%rsp)
sete   %dil
call   1040 <assert@plt>
lea    0x10(%rsp),%r14
mov    %r14,%rdi
mov    $0x61,%esi
call   1050 <condense_by_removing@plt>
mov    $0x6262,%eax
xor    0x10(%rsp),%eax
movzbl 0x12(%rsp),%ecx
xor    %edi,%edi
or     %ax,%cx
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
mov    $0x62,%esi
call   1050 <condense_by_removing@plt>
xor    %edi,%edi
cmpb   $0x0,0x10(%rsp)
sete   %dil
call   1040 <assert@plt>
lea    0x18(%rsp),%r14
mov    %r14,%rdi
mov    $0x64,%esi
call   1050 <condense_by_removing@plt>
xor    0x18(%rsp),%rbx
movzwl 0x20(%rsp),%eax
xor    $0x63,%rax
xor    %edi,%edi
or     %rbx,%rax
sete   %dil
call   1040 <assert@plt>
mov    %r14,%rdi
mov    $0x61,%esi
call   1050 <condense_by_removing@plt>
mov    $0x63626262,%eax
xor    0x18(%rsp),%eax
movzwl 0x1c(%rsp),%ecx
xor    $0x63,%ecx
xor    %edi,%edi
or     %eax,%ecx
sete   %dil
call   1040 <assert@plt>
lea    0xdc4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.s1 = [5 x i8] c"aaaa\00"
@__const.main.s2 = [7 x i8] c"aabbaa\00"
@__const.main.s3 = [11 x i8] c"aaaabbbccd\00"
@.str = [5 x i8] c"aaaa\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [3 x i8] c"bb\00"
@.str.3 = [10 x i8] c"aaaabbbcc\00"
@.str.4 = [6 x i8] c"bbbcc\00"
@.str.5 = [7 x i8] c"Done.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i8]
%7 = alloca [7 x i8]
%8 = alloca [11 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = bitcast [5 x i8]* %6 to i8*
%10 = bitcast [7 x i8]* %7 to i8*
%11 = bitcast [11 x i8]* %8 to i8*
%12 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%13 = call i32 @condense_by_removing(i8* %12, i8 signext 122)
%14 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%21 = call i32 @condense_by_removing(i8* %20, i8 signext 97)
%22 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%23 = call i32 @strcmp(i8* %22, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp ne i32 %23, 0
%25 = xor i1 %24, true
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%29 = call i32 @condense_by_removing(i8* %28, i8 signext 97)
%30 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%31 = call i32 @strcmp(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%32 = icmp ne i32 %31, 0
%33 = xor i1 %32, true
%34 = zext i1 %33 to i32
%35 = call i32 @assert(i32 %34)
%36 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%37 = call i32 @condense_by_removing(i8* %36, i8 signext 98)
%38 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%39 = call i32 @strcmp(i8* %38, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp ne i32 %39, 0
%41 = xor i1 %40, true
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
%44 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%45 = call i32 @condense_by_removing(i8* %44, i8 signext 100)
%46 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%47 = call i32 @strcmp(i8* %46, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
%48 = icmp ne i32 %47, 0
%49 = xor i1 %48, true
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
%52 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%53 = call i32 @condense_by_removing(i8* %52, i8 signext 97)
%54 = getelementptr inbounds [11 x i8], [11 x i8]* %8, i64 0, i64 0
%55 = call i32 @strcmp(i8* %54, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%56 = icmp ne i32 %55, 0
%57 = xor i1 %56, true
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
%60 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.s2 = [7 x i8] c"aabbaa\00"
@__const.main.s3 = [11 x i8] c"aaaabbbccd\00"
@.str = [5 x i8] c"aaaa\00"
@.str.2 = [3 x i8] c"bb\00"
@.str.3 = [10 x i8] c"aaaabbbcc\00"
@.str.4 = [6 x i8] c"bbbcc\00"
@str = [6 x i8] c"Done.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = alloca [7 x i8]
%5 = alloca [11 x i8]
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [11 x i8], [11 x i8]* %5, i64 0, i64 0
%9 = call i32 @condense_by_removing(i8* %6, i8 signext 122)
%10 = call i32 @bcmp(i8* dereferenceable(5) %6, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 5)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @condense_by_removing(i8* %6, i8 signext 97)
%15 = load i8, i8* %6
%16 = icmp eq i8 %15, 0
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = call i32 @condense_by_removing(i8* %7, i8 signext 97)
%20 = call i32 @bcmp(i8* dereferenceable(3) %7, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i64 3)
%21 = icmp eq i32 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = call i32 @condense_by_removing(i8* %7, i8 signext 98)
%25 = load i8, i8* %7
%26 = icmp eq i8 %25, 0
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = call i32 @condense_by_removing(i8* %8, i8 signext 100)
%30 = call i32 @bcmp(i8* dereferenceable(10) %8, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i64 10)
%31 = icmp eq i32 %30, 0
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = call i32 @condense_by_removing(i8* %8, i8 signext 97)
%35 = call i32 @bcmp(i8* dereferenceable(6) %8, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i64 6)
%36 = icmp eq i32 %35, 0
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}