#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void parray(char *label, size_t count, size_t array[]) {
  (void)fprintf(stdout, "%s", label);
  (void)fputc('\t', stdout);
  for (; count != 0; count--, array++)
    (void)fprintf(stdout, " %lu", (unsigned long)*array);
}


x86 assembly (clang, -O0):
<parray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%esi
mov    $0x9,%edi
call   1030 <fputc@plt>
cmpq   $0x0,-0x10(%rbp)
je     11a8 <parray+0x88>
mov    0x2e6c(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1162 <parray+0x42>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parray>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r13
mov    %rdi,%rdx
mov    0x2ea7(%rip),%r12
mov    (%r12),%edi
lea    0xebc(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r12),%esi
mov    $0x9,%edi
call   1030 <fputc@plt>
test   %r13,%r13
je     118b <parray+0x6b>
lea    0xe9e(%rip),%r15
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12),%edi
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1170 <parray+0x50>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c" %lu\00"
define void @parray(i8* %0, i64 %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i32, i32* @stdout
%8 = load i8*, i8** %4
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @stdout
%11 = call i32 @fputc(i8 signext 9, i32 %10)
br label %12
12: ; preds = %20, %3
%13 = load i64, i64* %5
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %12
%16 = load i32, i32* @stdout
%17 = load i64*, i64** %6
%18 = load i64, i64* %17
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %18)
br label %20
20: ; preds = %15
%21 = load i64, i64* %5
%22 = add i64 %21, -1
store i64 %22, i64* %5
%23 = load i64*, i64** %6
%24 = getelementptr inbounds i64, i64* %23, i32 1
store i64* %24, i64** %6
br label %12
25: ; preds = %12
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c" %lu\00"
define void @parray(i8* %0, i64 %1, i64* nocapture %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = load i32, i32* @stdout
%7 = tail call i32 @fputc(i8 signext 9, i32 %6)
%8 = icmp eq i64 %1, 0
br i1 %8, label %18, label %9
9: ; preds = %3, %9
%10 = phi i64* [ %16, %9 ], [ %2, %3 ]
%11 = phi i64 [ %15, %9 ], [ %1, %3 ]
%12 = load i32, i32* @stdout
%13 = load i64, i64* %10
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i64 %13)
%15 = add i64 %11, -1
%16 = getelementptr inbounds i64, i64* %10, i64 1
%17 = icmp eq i64 %15, 0
br i1 %17, label %18, label %9
18: ; preds = %9, %3
ret void
}