#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*/ delete_even_ascii_char_in_array(char *);
char getchar();
int /*<<< orphan*/ puts(char *);
int main() {
  char str[1024] = {};
  int i = 0;
  while ((str[i++] = getchar()) != '\n')
    continue;
  str[i] = '\0';
  delete_even_ascii_char_in_array(str);
  puts(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1040 <memset@plt>
movl   $0x0,-0x414(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    -0x414(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x414(%rbp)
movslq %ecx,%rcx
mov    %al,-0x410(%rbp,%rcx,1)
movsbl %al,%eax
cmp    $0xa,%eax
je     11a2 <main+0x62>
jmp    116f <main+0x2f>
movslq -0x414(%rbp),%rax
movb   $0x0,-0x410(%rbp,%rax,1)
lea    -0x410(%rbp),%rdi
call   1060 <delete_even_ascii_char_in_array@plt>
lea    -0x410(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x400,%rsp
mov    %rsp,%rdi
mov    $0x400,%edx
xor    %esi,%esi
call   1040 <memset@plt>
xor    %ebx,%ebx
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %al,(%rsp,%rbx,1)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1160 <main+0x20>
mov    %ebx,%eax
movb   $0x0,(%rsp,%rax,1)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1060 <delete_even_ascii_char_in_array@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1024 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [1024 x i8]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %13, %0
%6 = call signext i8 (...) @getchar()
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %3
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %9
store i8 %6, i8* %10
%11 = sext i8 %6 to i32
%12 = icmp ne i32 %11, 10
br i1 %12, label %13, label %14
13: ; preds = %5
br label %5
14: ; preds = %5
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %16
store i8 0, i8* %17
%18 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%19 = call i32 @delete_even_ascii_char_in_array(i8* %18)
%20 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%21 = call i32 @puts(i8* %20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %3, %0
%4 = phi i64 [ %6, %3 ], [ 0, %0 ]
%5 = tail call signext i8 (...) @getchar()
%6 = add nuw i64 %4, 1
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 %4
store i8 %5, i8* %7
%8 = icmp eq i8 %5, 10
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = and i64 %6, 4294967295
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 %10
store i8 0, i8* %11
%12 = call i32 @delete_even_ascii_char_in_array(i8* %2)
%13 = call i32 @puts(i8* %2)
ret i32 0
}