#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*/ printf(char *, ...);
void bigprint(int *s) {
  int i = 200 - 1;
  while (i > 0 && s[i] == 0)
    i--;
  while (i >= 0)
    printf("%d", s[i--]);
  printf("\n");
}


x86 assembly (clang, -O0):
<bigprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xc7,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jle    1144 <bigprint+0x34>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1154 <bigprint+0x44>
jmp    1162 <bigprint+0x52>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <bigprint+0x13>
jmp    1167 <bigprint+0x57>
cmpl   $0x0,-0xc(%rbp)
jl     1199 <bigprint+0x89>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0xffffffff,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe73(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1167 <bigprint+0x57>
lea    0xe63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigprint>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
mov    $0xc5,%eax
cmpl   $0x0,0x8(%r15,%rax,4)
jne    116d <bigprint+0x4d>
cs nopw 0x0(%rax,%rax,1)
nop
cmpl   $0x0,0x4(%r15,%rax,4)
jne    1176 <bigprint+0x56>
cmpl   $0x0,(%r15,%rax,4)
jne    1179 <bigprint+0x59>
cmp    $0x2,%eax
jb     117f <bigprint+0x5f>
lea    -0x1(%rax),%rcx
mov    %ecx,%ecx
cmpl   $0x0,(%r15,%rcx,4)
jne    1183 <bigprint+0x63>
add    $0xfffffffffffffffc,%rax
cmpl   $0x0,0x8(%r15,%rax,4)
je     1140 <bigprint+0x20>
add    $0x2,%eax
test   %eax,%eax
jns    118a <bigprint+0x6a>
jmp    11b4 <bigprint+0x94>
add    $0x1,%eax
test   %eax,%eax
jns    118a <bigprint+0x6a>
jmp    11b4 <bigprint+0x94>
xor    %eax,%eax
jmp    118a <bigprint+0x6a>
add    $0xffffffff,%eax
test   %eax,%eax
js     11b4 <bigprint+0x94>
mov    %eax,%ebx
lea    0xe6d(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffffffffffff,%rbx
jb     11a0 <bigprint+0x80>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @bigprint(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 199, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 0
br label %14
14: ; preds = %7, %4
%15 = phi i1 [ false, %4 ], [ %13, %7 ]
br i1 %15, label %16, label %19
16: ; preds = %14
%17 = load i32, i32* %3
%18 = add nsw i32 %17, -1
store i32 %18, i32* %3
br label %4
19: ; preds = %14
br label %20
20: ; preds = %23, %19
%21 = load i32, i32* %3
%22 = icmp sge i32 %21, 0
br i1 %22, label %23, label %31
23: ; preds = %20
%24 = load i32*, i32** %2
%25 = load i32, i32* %3
%26 = add nsw i32 %25, -1
store i32 %26, i32* %3
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds i32, i32* %24, i64 %27
%29 = load i32, i32* %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %29)
br label %20
31: ; preds = %20
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @bigprint(i32* nocapture %0) {
br label %2
2: ; preds = %28, %1
%3 = phi i32 [ 199, %1 ], [ %29, %28 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %30
8: ; preds = %2
%9 = add nsw i32 %3, -1
%10 = zext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %30
14: ; preds = %8
%15 = add nsw i32 %3, -2
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %0, i64 %16
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %30
20: ; preds = %14
%21 = add nsw i32 %3, -3
%22 = icmp ugt i32 %15, 1
br i1 %22, label %23, label %33
23: ; preds = %20
%24 = zext i32 %21 to i64
%25 = getelementptr inbounds i32, i32* %0, i64 %24
%26 = load i32, i32* %25
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = add nsw i32 %3, -4
br label %2
30: ; preds = %23, %14, %8, %2
%31 = phi i32 [ %3, %2 ], [ %9, %8 ], [ %15, %14 ], [ %21, %23 ]
%32 = icmp sgt i32 %31, -1
br i1 %32, label %33, label %43
33: ; preds = %20, %30
%34 = phi i32 [ %31, %30 ], [ 0, %20 ]
%35 = zext i32 %34 to i64
br label %36
36: ; preds = %33, %36
%37 = phi i64 [ %35, %33 ], [ %38, %36 ]
%38 = add nsw i64 %37, -1
%39 = getelementptr inbounds i32, i32* %0, i64 %37
%40 = load i32, i32* %39
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = icmp eq i64 %37, 0
br i1 %42, label %43, label %36
43: ; preds = %36, %30
%44 = tail call i32 @putchar(i32 10)
ret void
}