#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*/ line;

/* Variables and functions */
char *Com_ParseOnLine(char const **);
int /*<<< orphan*/ Q_strcat(char *, int, char const *);
const char *Com_ParseRestOfLine(const char *(*data_p)) {
  static char line[1024];
  const char *token;
  line[0] = 0;
  while (1) {
    token = Com_ParseOnLine(data_p);
    if (!token[0]) {
      break;
    }
    if (line[0]) {
      Q_strcat(line, sizeof(line), " ");
    }
    Q_strcat(line, sizeof(line), token);
  }
  return line;
}


x86 assembly (clang, -O0):
<Com_ParseRestOfLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,0x2f0d(%rip)
mov    -0x8(%rbp),%rdi
call   1030 <Com_ParseOnLine@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1152 <Com_ParseRestOfLine+0x32>
jmp    1191 <Com_ParseRestOfLine+0x71>
cmpb   $0x0,0x2ee7(%rip)
je     1177 <Com_ParseRestOfLine+0x57>
lea    0x2eda(%rip),%rdi
mov    $0x400,%esi
lea    0xe8e(%rip),%rdx
call   1040 <Q_strcat@plt>
mov    -0x10(%rbp),%rdx
lea    0x2ebe(%rip),%rdi
mov    $0x400,%esi
call   1040 <Q_strcat@plt>
jmp    1133 <Com_ParseRestOfLine+0x13>
lea    0x2ea8(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Com_ParseRestOfLine>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r15
movb   $0x0,0x2f0e(%rip)
call   1030 <Com_ParseOnLine@plt>
cmpb   $0x0,(%rax)
je     118b <Com_ParseRestOfLine+0x6b>
mov    %rax,%rbx
lea    0x2efa(%rip),%r14
lea    0xeb3(%rip),%r12
jmp    1170 <Com_ParseRestOfLine+0x50>
nop
mov    %r14,%rdi
mov    $0x400,%esi
mov    %rbx,%rdx
call   1040 <Q_strcat@plt>
mov    %r15,%rdi
call   1030 <Com_ParseOnLine@plt>
mov    %rax,%rbx
cmpb   $0x0,(%rax)
je     118b <Com_ParseRestOfLine+0x6b>
cmpb   $0x0,0x2ec9(%rip)
je     1150 <Com_ParseRestOfLine+0x30>
mov    %r14,%rdi
mov    $0x400,%esi
mov    %r12,%rdx
call   1040 <Q_strcat@plt>
jmp    1150 <Com_ParseRestOfLine+0x30>
lea    0x2eae(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@Com_ParseRestOfLine.line = internal global [1024 x i8] zeroinitializer
@.str = [2 x i8] c" \00"
define i8* @Com_ParseRestOfLine(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0)
br label %4
4: ; preds = %1, %17
%5 = load i8**, i8*** %2
%6 = call i8* @Com_ParseOnLine(i8** %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %4
br label %20
12: ; preds = %4
%13 = load i8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0)
%14 = icmp ne i8 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @Q_strcat(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %12
%18 = load i8*, i8** %3
%19 = call i32 @Q_strcat(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0), i32 1024, i8* %18)
br label %4
20: ; preds = %11
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0)
}

LLVM IR (-O2):
@Com_ParseRestOfLine.line = internal global [1024 x i8] zeroinitializer
@.str = [2 x i8] c" \00"
define i8* @Com_ParseRestOfLine(i8** %0) {
store i8 0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0)
%2 = tail call i8* @Com_ParseOnLine(i8** %0)
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %1, %11
%6 = phi i8* [ %13, %11 ], [ %2, %1 ]
%7 = load i8, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0)
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = tail call i32 @Q_strcat(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0), i32 1024, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %5
%12 = tail call i32 @Q_strcat(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0), i32 1024, i8* %6)
%13 = tail call i8* @Com_ParseOnLine(i8** %0)
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %11, %1
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @Com_ParseRestOfLine.line, i64 0, i64 0)
}