#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__ get_line(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
int main(void) {
  char input_buffer[4096 + 1];
  char temp_buffer[4096 + 1];
  int inside_escaped_backslash = 0;
  int str_len;
  while (get_line(input_buffer, stdin)) {
    str_len = strlen(input_buffer);
    if (*(input_buffer + str_len - 1) == '\\') {
      inside_escaped_backslash = 1;
      *(input_buffer + str_len - 1) = ' ';
      strcat(temp_buffer, input_buffer);
    } else {
      if (inside_escaped_backslash) {
        printf("%s%s\n", temp_buffer, input_buffer);
        *temp_buffer = '\0';
        inside_escaped_backslash = 0;
      } else {
        printf("%s\n", input_buffer);
        *temp_buffer = '\0';
      }
    }
  }
  if (inside_escaped_backslash)
    printf("%s%s\n", temp_buffer, input_buffer);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2030,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x2024(%rbp)
lea    -0x1010(%rbp),%rdi
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
call   1030 <get_line@plt>
cmp    $0x0,%rax
je     123b <main+0xfb>
lea    -0x1010(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x2028(%rbp)
movslq -0x2028(%rbp),%rax
movsbl -0x1011(%rbp,%rax,1),%eax
ff
cmp    $0x5c,%eax
jne    11d6 <main+0x96>
movl   $0x1,-0x2024(%rbp)
movslq -0x2028(%rbp),%rax
movb   $0x20,-0x1011(%rbp,%rax,1)
20
lea    -0x2020(%rbp),%rdi
lea    -0x1010(%rbp),%rsi
call   1060 <strcat@plt>
jmp    1236 <main+0xf6>
cmpl   $0x0,-0x2024(%rbp)
je     1215 <main+0xd5>
lea    -0x2020(%rbp),%rsi
lea    -0x1010(%rbp),%rdx
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x0,-0x2020(%rbp)
movl   $0x0,-0x2024(%rbp)
jmp    1231 <main+0xf1>
lea    -0x1010(%rbp),%rsi
lea    0xddf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movb   $0x0,-0x2020(%rbp)
jmp    1236 <main+0xf6>
jmp    115c <main+0x1c>
cmpl   $0x0,-0x2024(%rbp)
je     1264 <main+0x124>
lea    -0x2020(%rbp),%rsi
lea    -0x1010(%rbp),%rdx
lea    0xda3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x2030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2018,%rsp
mov    0x2e90(%rip),%r13
mov    0x0(%r13),%esi
mov    %rsp,%rdi
call   1030 <get_line@plt>
test   %rax,%rax
je     1220 <main+0xe0>
xor    %ebp,%ebp
mov    %rsp,%rbx
lea    0x1010(%rsp),%r14
lea    0xe81(%rip),%r15
jmp    11b9 <main+0x79>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movb   $0x20,-0x1(%rsp,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <strcat@plt>
mov    $0x1,%ebp
xor    %r12d,%r12d
mov    0x0(%r13),%esi
mov    %rbx,%rdi
call   1030 <get_line@plt>
test   %rax,%rax
je     1202 <main+0xc2>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0x5c,-0x1(%rsp,%rax,1)
je     1190 <main+0x50>
test   %ebp,%ebp
jne    11df <main+0x9f>
xor    %ebp,%ebp
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    11f5 <main+0xb5>
xor    %ebp,%ebp
lea    0xe18(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
movb   $0x0,0x1010(%rsp)
mov    $0x1,%r12b
jmp    11a8 <main+0x68>
test   %r12b,%r12b
jne    1220 <main+0xe0>
lea    0xdf2(%rip),%rdi
lea    0x1010(%rsp),%rsi
mov    %rsp,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x2018,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [6 x i8] c"%s%s\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [4097 x i8]
%2 = alloca [4097 x i8]
%3 = getelementptr inbounds [4097 x i8], [4097 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [4097 x i8], [4097 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i64 @get_line(i8* %3, i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %33, label %8
8: ; preds = %0, %24
%9 = phi i32 [ %26, %24 ], [ 0, %0 ]
%10 = call i32 @strlen(i8* %3)
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [4097 x i8], [4097 x i8]* %1, i64 0, i64 %11
%13 = getelementptr inbounds i8, i8* %12, i64 -1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 92
br i1 %15, label %16, label %18
16: ; preds = %8
store i8 32, i8* %13
%17 = call i32 @strcat(i8* %4, i8* %3)
br label %24
18: ; preds = %8
%19 = icmp eq i32 %9, 0
br i1 %19, label %22, label %20
20: ; preds = %18
%21 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %3)
store i8 0, i8* %4
br label %24
22: ; preds = %18
%23 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
store i8 0, i8* %4
br label %24
24: ; preds = %20, %22, %16
%25 = phi i1 [ true, %20 ], [ true, %22 ], [ false, %16 ]
%26 = phi i32 [ 0, %20 ], [ 0, %22 ], [ 1, %16 ]
%27 = load i32, i32* @stdin
%28 = call i64 @get_line(i8* %3, i32 %27)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %8
30: ; preds = %24
br i1 %25, label %33, label %31
31: ; preds = %30
%32 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %3)
br label %33
33: ; preds = %0, %31, %30
ret i32 0
}