#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, char *);
void wordvprint(FILE *fyle, int wordc, char **wordv) {
  int i;
  const char *sep = "";
  for (i = 0; i < wordc; i++)
    if (wordv[i]) {
      fprintf(fyle, "%s%s", sep, wordv[i]);
      sep = " ";
    }
}


x86 assembly (clang, -O0):
<wordvprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xedc(%rip),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1192 <wordvprint+0x82>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     117f <wordvprint+0x6f>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xe8a(%rip),%rax
mov    %rax,-0x28(%rbp)
jmp    1184 <wordvprint+0x74>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1135 <wordvprint+0x25>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wordvprint>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1172 <wordvprint+0x62>
mov    %rdx,%r12
mov    %rdi,%r14
mov    %esi,%r13d
lea    0xed7(%rip),%rdx
xor    %ebx,%ebx
lea    0xec8(%rip),%r15
lea    0xec6(%rip),%rbp
jmp    1159 <wordvprint+0x49>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r13
je     1172 <wordvprint+0x62>
mov    (%r12,%rbx,8),%rcx
test   %rcx,%rcx
je     1150 <wordvprint+0x40>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <fprintf@plt>
mov    %rbp,%rdx
jmp    1150 <wordvprint+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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