#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 *, int, char);
void squezze_del(char s1[], char s2[]) {
  int i = 0;
  int j = 0;
  int k = 0;
  for (i = 0; s2[i] != '\0'; ++i) {
    if (s2[i] == 'c') {
      j = i;
      while (s2[j] != '\0') {
        printf("s2[j=%d]=%c;", j, s2[j]);
        s2[j] = s2[j + 1];
        printf("s2[j=%d]=%c;\n", j, s2[j]);
        ++j;
      };
    };
  };
}


x86 assembly (clang, -O0):
<squezze_del>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11f8 <squezze_del+0xe8>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x63,%eax
jne    11e5 <squezze_del+0xd5>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11e0 <squezze_del+0xd0>
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
lea    0xe6d(%rip),%rdi
movsbl (%rax,%rcx,1),%edx
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
lea    0xe44(%rip),%rdi
movsbl (%rax,%rcx,1),%edx
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116c <squezze_del+0x5c>
jmp    11e5 <squezze_del+0xd5>
jmp    11ea <squezze_del+0xda>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113c <squezze_del+0x2c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<squezze_del>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r12
xor    %r13d,%r13d
lea    0xed8(%rip),%r14
lea    0xede(%rip),%r15
jmp    1148 <squezze_del+0x38>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %al,%al
je     1194 <squezze_del+0x84>
add    $0x1,%r13
mov    (%r12,%r13,1),%al
cmp    $0x63,%al
jne    1140 <squezze_del+0x30>
mov    %r13,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0x1(%rbx),%rbp
movsbl 0x1(%r12,%rbx,1),%edx
mov    %dl,(%r12,%rbx,1)
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movzbl 0x1(%r12,%rbx,1),%eax
mov    %rbp,%rbx
test   %al,%al
jne    1160 <squezze_del+0x50>
jmp    1144 <squezze_del+0x34>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"s2[j=%d]=%c;\00"
@.str.1 = [14 x i8] c"s2[j=%d]=%c;\0A\00"
define void @squezze_del(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 0, i32* %5
br label %8
8: ; preds = %63, %2
%9 = load i8*, i8** %4
%10 = load i32, i32* %5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %9, i64 %11
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %66
16: ; preds = %8
%17 = load i8*, i8** %4
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 99
br i1 %23, label %24, label %62
24: ; preds = %16
%25 = load i32, i32* %5
store i32 %25, i32* %6
br label %26
26: ; preds = %34, %24
%27 = load i8*, i8** %4
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %61
34: ; preds = %26
%35 = load i32, i32* %6
%36 = load i8*, i8** %4
%37 = load i32, i32* %6
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = load i8, i8* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %35, i8 signext %40)
%42 = load i8*, i8** %4
%43 = load i32, i32* %6
%44 = add nsw i32 %43, 1
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds i8, i8* %42, i64 %45
%47 = load i8, i8* %46
%48 = load i8*, i8** %4
%49 = load i32, i32* %6
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8, i8* %48, i64 %50
store i8 %47, i8* %51
%52 = load i32, i32* %6
%53 = load i8*, i8** %4
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %53, i64 %55
%57 = load i8, i8* %56
%58 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %52, i8 signext %57)
%59 = load i32, i32* %6
%60 = add nsw i32 %59, 1
store i32 %60, i32* %6
br label %26
61: ; preds = %26
br label %62
62: ; preds = %61, %16
br label %63
63: ; preds = %62
%64 = load i32, i32* %5
%65 = add nsw i32 %64, 1
store i32 %65, i32* %5
br label %8
66: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"s2[j=%d]=%c;\00"
@.str.1 = [14 x i8] c"s2[j=%d]=%c;\0A\00"
define void @squezze_del(i8* nocapture readnone %0, i8* nocapture %1) {
br label %3
3: ; preds = %19, %2
%4 = phi i64 [ %20, %19 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
switch i8 %6, label %19 [
i8 0, label %21
i8 99, label %7
]
7: ; preds = %3, %7
%8 = phi i64 [ %13, %7 ], [ %4, %3 ]
%9 = phi i8 [ %17, %7 ], [ %6, %3 ]
%10 = phi i8* [ %14, %7 ], [ %5, %3 ]
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %11, i8 signext %9)
%13 = add nuw i64 %8, 1
%14 = getelementptr inbounds i8, i8* %1, i64 %13
%15 = load i8, i8* %14
store i8 %15, i8* %10
%16 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %11, i8 signext %15)
%17 = load i8, i8* %14
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %7
19: ; preds = %7, %3
%20 = add nuw i64 %4, 1
br label %3
21: ; preds = %3
ret void
}