#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*/ getchar();
int /*<<< orphan*/ lprintf(char *, ...);
int co_shoc(int argc, char *argv[]) {
  int i = 0;
  extern char *license[];
  while (*license[i] != '\\') {
    lprintf("%s\n", license[i]);
    if (i % 22 == 0 && i > 0) {
      lprintf("\ntype <Return> to continue ");
      getchar();
    }
    i++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<co_shoc>:
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    0x2ea7(%rip),%rax
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x5c,%eax
je     11af <co_shoc+0x8f>
movslq -0x14(%rbp),%rcx
mov    0x2e8c(%rip),%rax
mov    (%rax,%rcx,8),%rsi
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1040 <lprintf@plt>
mov    -0x14(%rbp),%eax
mov    $0x16,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    11a1 <co_shoc+0x81>
cmpl   $0x0,-0x14(%rbp)
jle    11a1 <co_shoc+0x81>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1040 <lprintf@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <co_shoc+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<co_shoc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2eb6(%rip),%r15
mov    (%r15),%rsi
cmpb   $0x5c,(%rsi)
jne    114b <co_shoc+0x2b>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xba2e8ba3,%r12d
lea    0xea8(%rip),%r13
lea    0xea5(%rip),%r14
xor    %ebp,%ebp
xor    %ebx,%ebx
jmp    1181 <co_shoc+0x61>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x8(%r15,%rbx,8),%rsi
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmpb   $0x5c,(%rsi)
je     113a <co_shoc+0x1a>
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <lprintf@plt>
test   %rbx,%rbx
je     1170 <co_shoc+0x50>
mov    %ebx,%eax
imul   %r12,%rax
shr    $0x24,%rax
lea    (%rax,%rax,4),%ecx
lea    (%rax,%rcx,4),%ecx
add    %eax,%ecx
add    %ebp,%ecx
jne    1170 <co_shoc+0x50>
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <lprintf@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
jmp    1170 <co_shoc+0x50>

LLVM IR (-O0):
@license = external global [0 x i8*]
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [28 x i8] c"\0Atype <Return> to continue \00"
define i32 @co_shoc(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 = %29, %2
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [0 x i8*], [0 x i8*]* @license, 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 %32
14: ; preds = %6
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [0 x i8*], [0 x i8*]* @license, i64 0, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 (i8*, ...) @lprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
%20 = load i32, i32* %5
%21 = srem i32 %20, 22
%22 = icmp eq i32 %21, 0
br i1 %22, label %23, label %29
23: ; preds = %14
%24 = load i32, i32* %5
%25 = icmp sgt i32 %24, 0
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = call i32 (i8*, ...) @lprintf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%28 = call i32 (...) @getchar()
br label %29
29: ; preds = %26, %23, %14
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %6
32: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@license = external global [0 x i8*]
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [28 x i8] c"\0Atype <Return> to continue \00"
define i32 @co_shoc(i32 %0, i8** nocapture readnone %1) {
%3 = load i8*, i8** getelementptr inbounds ([0 x i8*], [0 x i8*]* @license, i64 0, i64 0)
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 92
br i1 %5, label %24, label %6
6: ; preds = %2, %18
%7 = phi i64 [ %19, %18 ], [ 0, %2 ]
%8 = phi i8* [ %21, %18 ], [ %3, %2 ]
%9 = tail call i32 (i8*, ...) @lprintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = trunc i64 %7 to i32
%11 = urem i32 %10, 22
%12 = icmp eq i32 %11, 0
%13 = icmp ne i64 %7, 0
%14 = and i1 %13, %12
br i1 %14, label %15, label %18
15: ; preds = %6
%16 = tail call i32 (i8*, ...) @lprintf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 (...) @getchar()
br label %18
18: ; preds = %15, %6
%19 = add nuw i64 %7, 1
%20 = getelementptr inbounds [0 x i8*], [0 x i8*]* @license, i64 0, i64 %19
%21 = load i8*, i8** %20
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 92
br i1 %23, label %24, label %6
24: ; preds = %18, %2
ret i32 0
}