#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ scanf(char *, char **, char *);
int strlen(char *);
int main() {
  char line[1000], c;
  int len, i;
  while (scanf("%s %c", &line, &c) != EOF) {
    len = strlen(line);
    for (i = 0; i < len; i++) {
      if (line[i] == c)
        continue;
      else
        printf("%c", line[i]);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
lea    -0x3f1(%rbp),%rdx
call   1050 <scanf@plt>
mov    0x2e85(%rip),%rcx
cmp    (%rcx),%rax
je     1206 <main+0xd6>
lea    -0x3f0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x3f8(%rbp)
movl   $0x0,-0x3fc(%rbp)
mov    -0x3fc(%rbp),%eax
cmp    -0x3f8(%rbp),%eax
jge    11f3 <main+0xc3>
movslq -0x3fc(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
movsbl -0x3f1(%rbp),%ecx
cmp    %ecx,%eax
jne    11bd <main+0x8d>
jmp    11df <main+0xaf>
movslq -0x3fc(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%esi
ff
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11df <main+0xaf>
mov    -0x3fc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3fc(%rbp)
jmp    1188 <main+0x58>
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3f8,%rsp
lea    0xeb8(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0xf(%rsp),%rdx
call   1050 <scanf@plt>
mov    0x2e8a(%rip),%r12
cmp    (%r12),%rax
jne    1178 <main+0x48>
xor    %eax,%eax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x10(%rsp),%r13
lea    0xe7c(%rip),%r14
lea    0xf(%rsp),%r15
jmp    11ae <main+0x7e>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
call   1050 <scanf@plt>
cmp    (%r12),%rax
je     1164 <main+0x34>
mov    %r13,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1190 <main+0x60>
mov    %eax,%ebx
xor    %ebp,%ebp
jmp    11c9 <main+0x99>
add    $0x1,%rbp
cmp    %rbp,%rbx
je     1190 <main+0x60>
movsbl 0x10(%rsp,%rbp,1),%edi
cmp    0xf(%rsp),%dil
je     11c0 <main+0x90>
call   1030 <putchar@plt>
jmp    11c0 <main+0x90>

LLVM IR (-O0):
@.str = [6 x i8] c"%s %c\00"
@EOF = global i64 0
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca i8
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
br label %6
6: ; preds = %39, %0
%7 = bitcast [1000 x i8]* %2 to i8**
%8 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %7, i8* %3)
%9 = load i64, i64* @EOF
%10 = icmp ne i64 %8, %9
br i1 %10, label %11, label %41
11: ; preds = %6
%12 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%13 = call i32 @strlen(i8* %12)
store i32 %13, i32* %4
store i32 0, i32* %5
br label %14
14: ; preds = %36, %11
%15 = load i32, i32* %5
%16 = load i32, i32* %4
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %39
18: ; preds = %14
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp eq i32 %23, %25
br i1 %26, label %27, label %28
27: ; preds = %18
br label %36
28: ; preds = %18
%29 = load i32, i32* %5
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 %30
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %35
35: ; preds = %28
br label %36
36: ; preds = %35, %27
%37 = load i32, i32* %5
%38 = add nsw i32 %37, 1
store i32 %38, i32* %5
br label %14
39: ; preds = %14
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %6
41: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %c\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca i8
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = bitcast [1000 x i8]* %1 to i8**
%5 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4, i8* %2)
%6 = load i64, i64* @EOF
%7 = icmp eq i64 %5, %6
br i1 %7, label %30, label %8
8: ; preds = %0, %25
%9 = call i32 @strlen(i8* %3)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %25
11: ; preds = %8
%12 = zext i32 %9 to i64
br label %13
13: ; preds = %11, %22
%14 = phi i64 [ 0, %11 ], [ %23, %22 ]
%15 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = load i8, i8* %2
%18 = icmp eq i8 %16, %17
br i1 %18, label %22, label %19
19: ; preds = %13
%20 = sext i8 %16 to i32
%21 = call i32 @putchar(i32 %20)
br label %22
22: ; preds = %13, %19
%23 = add nuw nsw i64 %14, 1
%24 = icmp eq i64 %23, %12
br i1 %24, label %25, label %13
25: ; preds = %22, %8
%26 = call i32 @putchar(i32 10)
%27 = call i64 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4, i8* %2)
%28 = load i64, i64* @EOF
%29 = icmp eq i64 %27, %28
br i1 %29, label %30, label %8
30: ; preds = %25, %0
ret i32 0
}