#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*/ *gets(char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ scanf(char *, char *);
int main(int argc, const char *argv[]) {
  int n, i;
  char c, str[10000];
  scanf("%c", &c);
  while (gets(str) != NULL) {
    for (i = 0; str[i] != '\0'; i++) {
      if (str[i] == c) {
        str[i] = 0;
      }
    }
    n = i;
    for (i = 0; i < n; i++) {
      if (str[i] != 0)
        putchar(str[i]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2730,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rdi
lea    -0x19(%rbp),%rsi
call   1050 <scanf@plt>
lea    -0x2730(%rbp),%rdi
call   1040 <gets@plt>
cmp    $0x0,%rax
je     1219 <main+0xe9>
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
movsbl -0x2730(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11c2 <main+0x92>
movslq -0x18(%rbp),%rax
movsbl -0x2730(%rbp,%rax,1),%eax
ff
movsbl -0x19(%rbp),%ecx
cmp    %ecx,%eax
jne    11af <main+0x7f>
movslq -0x18(%rbp),%rax
movb   $0x0,-0x2730(%rbp,%rax,1)
jmp    11b4 <main+0x84>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1176 <main+0x46>
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1214 <main+0xe4>
movslq -0x18(%rbp),%rax
movsbl -0x2730(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1201 <main+0xd1>
movslq -0x18(%rbp),%rax
movsbl -0x2730(%rbp,%rax,1),%edi
ff
call   1030 <putchar@plt>
jmp    1206 <main+0xd6>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11cf <main+0x9f>
jmp    1159 <main+0x29>
xor    %eax,%eax
add    $0x2730,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x2720,%rsp
lea    0xebd(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1050 <scanf@plt>
lea    0x10(%rsp),%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     11ec <main+0xbc>
lea    0x10(%rsp),%r14
jmp    117d <main+0x4d>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     11ec <main+0xbc>
mov    0x10(%rsp),%cl
test   %cl,%cl
je     1170 <main+0x40>
mov    $0x1,%edi
mov    0xf(%rsp),%al
xor    %edx,%edx
jmp    11b0 <main+0x80>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl 0x11(%rsp,%rdx,1),%ecx
add    $0x1,%rdx
lea    0x1(%rsi),%edi
test   %cl,%cl
je     11c0 <main+0x90>
mov    %edi,%esi
cmp    %al,%cl
jne    11a0 <main+0x70>
movb   $0x0,0x10(%rsp,%rdx,1)
jmp    11a0 <main+0x70>
nopl   (%rax)
test   %edx,%edx
je     1170 <main+0x40>
mov    %esi,%r15d
xor    %ebx,%ebx
jmp    11d9 <main+0xa9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r15
je     1170 <main+0x40>
movzbl 0x10(%rsp,%rbx,1),%eax
test   %al,%al
je     11d0 <main+0xa0>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    11d0 <main+0xa0>
xor    %eax,%eax
add    $0x2720,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = alloca [10000 x i8]
%5 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = call i32* @gets(i8* %5)
%8 = icmp eq i32* %7, null
br i1 %8, label %43, label %12
9: ; preds = %40, %12, %17
%10 = call i32* @gets(i8* %5)
%11 = icmp eq i32* %10, null
br i1 %11, label %43, label %12
12: ; preds = %2, %9
%13 = load i8, i8* %5
%14 = icmp eq i8 %13, 0
br i1 %14, label %9, label %15
15: ; preds = %12
%16 = load i8, i8* %3
br label %22
17: ; preds = %28
%18 = trunc i64 %29 to i32
%19 = icmp eq i32 %18, 0
br i1 %19, label %9, label %20
20: ; preds = %17
%21 = and i64 %29, 4294967295
br label %33
22: ; preds = %15, %28
%23 = phi i64 [ 0, %15 ], [ %29, %28 ]
%24 = phi i8 [ %13, %15 ], [ %31, %28 ]
%25 = phi i8* [ %5, %15 ], [ %30, %28 ]
%26 = icmp eq i8 %24, %16
br i1 %26, label %27, label %28
27: ; preds = %22
store i8 0, i8* %25
br label %28
28: ; preds = %22, %27
%29 = add nuw i64 %23, 1
%30 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, 0
br i1 %32, label %17, label %22
33: ; preds = %20, %40
%34 = phi i64 [ 0, %20 ], [ %41, %40 ]
%35 = getelementptr inbounds [10000 x i8], [10000 x i8]* %4, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = icmp eq i8 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %33
%39 = call i32 @putchar(i8 signext %36)
br label %40
40: ; preds = %33, %38
%41 = add nuw nsw i64 %34, 1
%42 = icmp eq i64 %41, %21
br i1 %42, label %9, label %33
43: ; preds = %9, %2
ret i32 0
}