#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*/ my_putchar(char);
int /*<<< orphan*/ my_putstr(char *);
int echo_e(char **tab) {
  int i;
  i = 2;
  while (tab[i] != NULL) {
    if (!(tab[i][0] == 92))
      my_putstr(tab[i++]);
  }
  my_putchar('\n');
  return (0);
}


x86 assembly (clang, -O0):
<echo_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     117e <echo_e+0x5e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     1179 <echo_e+0x59>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <my_putstr@plt>
jmp    1133 <echo_e+0x13>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_e>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x10(%rdi),%rdi
test   %rdi,%rdi
je     115b <echo_e+0x3b>
mov    $0x2,%ebp
jmp    114c <echo_e+0x2c>
cs nopw 0x0(%rax,%rax,1)
movslq %ebp,%rax
mov    (%rbx,%rax,8),%rdi
test   %rdi,%rdi
je     115b <echo_e+0x3b>
cmpb   $0x5c,(%rdi)
je     1140 <echo_e+0x20>
add    $0x1,%ebp
call   1040 <my_putstr@plt>
jmp    1140 <echo_e+0x20>
mov    $0xa,%edi
call   1030 <my_putchar@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @echo_e(i8** %0) {
%2 = alloca i8**
%3 = alloca i32
store i8** %0, i8*** %2
store i32 2, i32* %3
br label %4
4: ; preds = %29, %1
%5 = load i8**, i8*** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8*, i8** %5, i64 %7
%9 = load i8*, i8** %8
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %30
11: ; preds = %4
%12 = load i8**, i8*** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8*, i8** %12, i64 %14
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 92
br i1 %20, label %29, label %21
21: ; preds = %11
%22 = load i8**, i8*** %2
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
%25 = sext i32 %23 to i64
%26 = getelementptr inbounds i8*, i8** %22, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 @my_putstr(i8* %27)
br label %29
29: ; preds = %21, %11
br label %4
30: ; preds = %4
%31 = call i32 @my_putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @echo_e(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %19, label %5
5: ; preds = %1, %13
%6 = phi i8* [ %17, %13 ], [ %3, %1 ]
%7 = phi i32 [ %14, %13 ], [ 2, %1 ]
%8 = load i8, i8* %6
%9 = icmp eq i8 %8, 92
br i1 %9, label %13, label %10
10: ; preds = %5
%11 = add nsw i32 %7, 1
%12 = tail call i32 @my_putstr(i8* %6)
br label %13
13: ; preds = %10, %5
%14 = phi i32 [ %7, %5 ], [ %11, %10 ]
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8*, i8** %0, i64 %15
%17 = load i8*, i8** %16
%18 = icmp eq i8* %17, null
br i1 %18, label %19, label %5
19: ; preds = %13, %1
%20 = tail call i32 @my_putchar(i8 signext 10)
ret i32 0
}