#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*/ lprintf(char *, char *);
int co_war(int argc, char *argv[]) {
  int i = 0;
  extern char *warranty[];
  while (*warranty[i] != '\\') {
    lprintf("%s\n", warranty[i]);
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<co_war>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rcx
mov    0x2eb7(%rip),%rax
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     116a <co_war+0x5a>
movslq -0x14(%rbp),%rcx
mov    0x2e9c(%rip),%rax
mov    (%rax,%rcx,8),%rsi
lea    0xea9(%rip),%rdi
call   1030 <lprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <co_war+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<co_war>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%rbx
mov    (%rbx),%rsi
cmpb   $0x5c,(%rsi)
je     1144 <co_war+0x34>
add    $0x8,%rbx
lea    0xed2(%rip),%r14
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <lprintf@plt>
mov    (%rbx),%rsi
add    $0x8,%rbx
cmpb   $0x5c,(%rsi)
jne    1130 <co_war+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@warranty = external global [0 x i8*]
@.str = [4 x i8] c"%s\0A\00"
define i32 @co_war(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %5
br label %6
6: ; preds = %14, %2
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8*], [0 x i8*]* @warranty, i64 0, i64 %8
%10 = load i8*, i8** %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 92
br i1 %13, label %14, label %22
14: ; preds = %6
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [0 x i8*], [0 x i8*]* @warranty, i64 0, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @lprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %6
22: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@warranty = external global [0 x i8*]
@.str = [4 x i8] c"%s\0A\00"
define i32 @co_war(i32 %0, i8** nocapture readnone %1) {
%3 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @warranty, i64 0, i64 0)
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 92
br i1 %5, label %15, label %6
6: ; preds = %2, %6
%7 = phi i64 [ %10, %6 ], [ 0, %2 ]
%8 = phi i8* [ %12, %6 ], [ %3, %2 ]
%9 = tail call i32 @lprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds [0 x i8*], [0 x i8*]* @warranty, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 92
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret i32 0
}