#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__ nullstr(char const *);
char *erase_new_lines(const char *desc) {
  unsigned int l, m;
  static char buf[2048 * 2];
  char temp[2048 * 2];
  if (nullstr(desc)) {
    return "";
  }
  l = 0;
  m = 0;
  buf[0] = 0;
  temp[0] = 0;
  for (m = 0; desc[m] != 0; m++) {
    if (desc[m] == '\n' || desc[m] == '\r') {
      temp[m] = '\x14';
    } else {
      temp[m] = desc[m];
    }
  }
  temp[m] = 0;
  for (m = 0; temp[m] != 0; m++) {
    if (temp[m] == '\x14') {
      buf[l++] = ' ';
      do {
        m++;
      } while (temp[m] == '\x14');
    }
    buf[l++] = temp[m];
  }
  buf[l] = 0;
  return buf;
}


x86 assembly (clang, -O0):
<erase_new_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1020,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <nullstr@plt>
cmp    $0x0,%rax
je     1142 <erase_new_lines+0x32>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    129a <erase_new_lines+0x18a>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movb   $0x0,0x2ee9(%rip)
movb   $0x0,-0x1020(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     11d8 <erase_new_lines+0xc8>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     11a1 <erase_new_lines+0x91>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
jne    11b1 <erase_new_lines+0xa1>
mov    -0x18(%rbp),%eax
movb   $0x14,-0x1020(%rbp,%rax,1)
14
jmp    11c5 <erase_new_lines+0xb5>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    (%rax,%rcx,1),%cl
mov    -0x18(%rbp),%eax
mov    %cl,-0x1020(%rbp,%rax,1)
jmp    11ca <erase_new_lines+0xba>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1165 <erase_new_lines+0x55>
mov    -0x18(%rbp),%eax
movb   $0x0,-0x1020(%rbp,%rax,1)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
movsbl -0x1020(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     127f <erase_new_lines+0x16f>
mov    -0x18(%rbp),%eax
movsbl -0x1020(%rbp,%rax,1),%eax
ff
cmp    $0x14,%eax
jne    124e <erase_new_lines+0x13e>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
mov    %eax,%eax
mov    %eax,%ecx
lea    0x2e18(%rip),%rax
movb   $0x20,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
movsbl -0x1020(%rbp,%rax,1),%eax
ff
cmp    $0x14,%eax
je     122c <erase_new_lines+0x11c>
jmp    124e <erase_new_lines+0x13e>
mov    -0x18(%rbp),%eax
mov    -0x1020(%rbp,%rax,1),%dl
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
mov    %eax,%eax
mov    %eax,%ecx
lea    0x2dd2(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11ea <erase_new_lines+0xda>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
lea    0x2db5(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2daa(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erase_new_lines>:
push   %rbx
sub    $0x1000,%rsp
mov    %rdi,%rbx
call   1030 <nullstr@plt>
test   %rax,%rax
je     1131 <erase_new_lines+0x21>
lea    0xed4(%rip),%rax
jmp    11b7 <erase_new_lines+0xa7>
movb   $0x0,0x2f08(%rip)
movb   $0x0,(%rsp)
xor    %eax,%eax
jmp    1146 <erase_new_lines+0x36>
mov    %cl,(%rsp,%rax,1)
add    $0x1,%eax
mov    %eax,%eax
movzbl (%rbx,%rax,1),%edx
mov    $0x14,%cl
cmp    $0xa,%dl
je     1140 <erase_new_lines+0x30>
cmp    $0xd,%dl
je     1140 <erase_new_lines+0x30>
test   %dl,%dl
je     1160 <erase_new_lines+0x50>
mov    %edx,%ecx
jmp    1140 <erase_new_lines+0x30>
movb   $0x0,(%rsp,%rax,1)
xor    %ecx,%ecx
lea    0x2ed3(%rip),%rax
xor    %edx,%edx
jmp    118f <erase_new_lines+0x7f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   %bl,%bl
je     11b1 <erase_new_lines+0xa1>
mov    %ecx,%esi
add    $0x1,%ecx
mov    %bl,(%rsi,%rax,1)
add    $0x1,%edx
mov    %edx,%esi
mov    (%rsp,%rsi,1),%bl
cmp    $0x14,%bl
jne    1180 <erase_new_lines+0x70>
mov    %ecx,%esi
movb   $0x20,(%rsi,%rax,1)
nop
add    $0x1,%edx
movzbl (%rsp,%rdx,1),%ebx
cmp    $0x14,%bl
je     11a0 <erase_new_lines+0x90>
add    $0x1,%ecx
jmp    1184 <erase_new_lines+0x74>
mov    %ecx,%ecx
movb   $0x0,(%rcx,%rax,1)
add    $0x1000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@erase_new_lines.buf = internal global [4096 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
define i8* @erase_new_lines(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca [4096 x i8]
store i8* %0, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @nullstr(i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %104
11: ; preds = %1
store i32 0, i32* %4
store i32 0, i32* %5
store i8 0, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 0)
%12 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 0
store i8 0, i8* %12
store i32 0, i32* %5
br label %13
13: ; preds = %51, %11
%14 = load i8*, i8** %3
%15 = load i32, i32* %5
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 0
br i1 %20, label %21, label %54
21: ; preds = %13
%22 = load i8*, i8** %3
%23 = load i32, i32* %5
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 10
br i1 %28, label %37, label %29
29: ; preds = %21
%30 = load i8*, i8** %3
%31 = load i32, i32* %5
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
%34 = load i8, i8* %33
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 13
br i1 %36, label %37, label %41
37: ; preds = %29, %21
%38 = load i32, i32* %5
%39 = zext i32 %38 to i64
%40 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %39
store i8 20, i8* %40
br label %50
41: ; preds = %29
%42 = load i8*, i8** %3
%43 = load i32, i32* %5
%44 = zext i32 %43 to i64
%45 = getelementptr inbounds i8, i8* %42, i64 %44
%46 = load i8, i8* %45
%47 = load i32, i32* %5
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %48
store i8 %46, i8* %49
br label %50
50: ; preds = %41, %37
br label %51
51: ; preds = %50
%52 = load i32, i32* %5
%53 = add i32 %52, 1
store i32 %53, i32* %5
br label %13
54: ; preds = %13
%55 = load i32, i32* %5
%56 = zext i32 %55 to i64
%57 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %56
store i8 0, i8* %57
store i32 0, i32* %5
br label %58
58: ; preds = %97, %54
%59 = load i32, i32* %5
%60 = zext i32 %59 to i64
%61 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %100
65: ; preds = %58
%66 = load i32, i32* %5
%67 = zext i32 %66 to i64
%68 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = sext i8 %69 to i32
%71 = icmp eq i32 %70, 20
br i1 %71, label %72, label %88
72: ; preds = %65
%73 = load i32, i32* %4
%74 = add i32 %73, 1
store i32 %74, i32* %4
%75 = zext i32 %73 to i64
%76 = getelementptr inbounds [4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 %75
store i8 32, i8* %76
br label %77
77: ; preds = %80, %72
%78 = load i32, i32* %5
%79 = add i32 %78, 1
store i32 %79, i32* %5
br label %80
80: ; preds = %77
%81 = load i32, i32* %5
%82 = zext i32 %81 to i64
%83 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %82
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = icmp eq i32 %85, 20
br i1 %86, label %77, label %87
87: ; preds = %80
br label %88
88: ; preds = %87, %65
%89 = load i32, i32* %5
%90 = zext i32 %89 to i64
%91 = getelementptr inbounds [4096 x i8], [4096 x i8]* %6, i64 0, i64 %90
%92 = load i8, i8* %91
%93 = load i32, i32* %4
%94 = add i32 %93, 1
store i32 %94, i32* %4
%95 = zext i32 %93 to i64
%96 = getelementptr inbounds [4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 %95
store i8 %92, i8* %96
br label %97
97: ; preds = %88
%98 = load i32, i32* %5
%99 = add i32 %98, 1
store i32 %99, i32* %5
br label %58
100: ; preds = %58
%101 = load i32, i32* %4
%102 = zext i32 %101 to i64
%103 = getelementptr inbounds [4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 %102
store i8 0, i8* %103
store i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 0), i8** %2
br label %104
104: ; preds = %100, %10
%105 = load i8*, i8** %2
ret i8* %105
}

LLVM IR (-O2):
@erase_new_lines.buf = internal global [4096 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
define i8* @erase_new_lines(i8* %0) {
%2 = alloca [4096 x i8]
%3 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 0
%4 = tail call i64 @nullstr(i8* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %49
6: ; preds = %1
store i8 0, i8* getelementptr inbounds ([4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 0)
store i8 0, i8* %3
br label %7
7: ; preds = %13, %6
%8 = phi i32 [ 0, %6 ], [ %16, %13 ]
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
switch i8 %11, label %12 [
i8 0, label %17
i8 10, label %13
i8 13, label %13
]
12: ; preds = %7
br label %13
13: ; preds = %7, %7, %12
%14 = phi i8 [ %11, %12 ], [ 20, %7 ], [ 20, %7 ]
%15 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 %9
store i8 %14, i8* %15
%16 = add i32 %8, 1
br label %7
17: ; preds = %7
%18 = zext i32 %8 to i64
%19 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 %18
store i8 0, i8* %19
br label %20
20: ; preds = %38, %17
%21 = phi i32 [ 0, %17 ], [ %42, %38 ]
%22 = phi i32 [ 0, %17 ], [ %45, %38 ]
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 %23
%25 = load i8, i8* %24
switch i8 %25, label %38 [
i8 0, label %46
i8 20, label %26
]
26: ; preds = %20
%27 = zext i32 %21 to i64
%28 = getelementptr inbounds [4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 %27
store i8 32, i8* %28
br label %29
29: ; preds = %29, %26
%30 = phi i32 [ %22, %26 ], [ %31, %29 ]
%31 = add i32 %30, 1
%32 = zext i32 %31 to i64
%33 = getelementptr inbounds [4096 x i8], [4096 x i8]* %2, i64 0, i64 %32
%34 = load i8, i8* %33
%35 = icmp eq i8 %34, 20
br i1 %35, label %29, label %36
36: ; preds = %29
%37 = add i32 %21, 1
br label %38
38: ; preds = %36, %20
%39 = phi i8 [ %34, %36 ], [ %25, %20 ]
%40 = phi i32 [ %37, %36 ], [ %21, %20 ]
%41 = phi i32 [ %31, %36 ], [ %22, %20 ]
%42 = add i32 %40, 1
%43 = zext i32 %40 to i64
%44 = getelementptr inbounds [4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 %43
store i8 %39, i8* %44
%45 = add i32 %41, 1
br label %20
46: ; preds = %20
%47 = zext i32 %21 to i64
%48 = getelementptr inbounds [4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 %47
store i8 0, i8* %48
br label %49
49: ; preds = %1, %46
%50 = phi i8* [ getelementptr inbounds ([4096 x i8], [4096 x i8]* @erase_new_lines.buf, i64 0, i64 0), %46 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %50
}