#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*/ Com_Printf(char *, char *, char *);
char *Info_NextPair(char const *, char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
void Info_Print(const char *s) {
  char key[8192];
  char value[8192];
  do {
    s = Info_NextPair(s, key, value);
    if (key[0] == '\0')
      break;
    if (value[0] == '\0')
      strcpy(value, "MISSING VALUE");
    Com_Printf("%-20s %s\n", key, value);
  } while (*s != '\0');
}


x86 assembly (clang, -O0):
<Info_Print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4010,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x2010(%rbp),%rsi
lea    -0x4010(%rbp),%rdx
call   1050 <Info_NextPair@plt>
mov    %rax,-0x8(%rbp)
movsbl -0x2010(%rbp),%eax
cmp    $0x0,%eax
jne    116f <Info_Print+0x3f>
jmp    11bc <Info_Print+0x8c>
movsbl -0x4010(%rbp),%eax
cmp    $0x0,%eax
jne    1192 <Info_Print+0x62>
lea    -0x4010(%rbp),%rdi
lea    0xe73(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x2010(%rbp),%rsi
lea    -0x4010(%rbp),%rdx
lea    0xe67(%rip),%rdi
call   1040 <Com_Printf@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113f <Info_Print+0xf>
add    $0x4010,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Info_Print>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4000,%rsp
mov    %rdi,%rbx
lea    0x2000(%rsp),%r14
mov    %rsp,%r13
lea    0xeab(%rip),%r15
lea    0xeb2(%rip),%r12
jmp    1173 <Info_Print+0x43>
xchg   %ax,%ax
mov    %r12,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
call   1040 <Com_Printf@plt>
cmpb   $0x0,(%rbx)
je     11a1 <Info_Print+0x71>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
call   1050 <Info_NextPair@plt>
cmpb   $0x0,0x2000(%rsp)
je     11a1 <Info_Print+0x71>
mov    %rax,%rbx
cmpb   $0x0,(%rsp)
jne    1160 <Info_Print+0x30>
mov    %r13,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
jmp    1160 <Info_Print+0x30>
add    $0x4000,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"MISSING VALUE\00"
@.str.1 = [10 x i8] c"%-20s %s\0A\00"
define void @Info_Print(i8* %0) {
%2 = alloca [8192 x i8]
%3 = alloca [8192 x i8]
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
br label %6
6: ; preds = %16, %1
%7 = phi i8* [ %0, %1 ], [ %8, %16 ]
%8 = call i8* @Info_NextPair(i8* %7, i8* %4, i8* %5)
%9 = load i8, i8* %4
%10 = icmp eq i8 %9, 0
br i1 %10, label %20, label %11
11: ; preds = %6
%12 = load i8, i8* %5
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %11
%17 = call i32 @Com_Printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %5)
%18 = load i8, i8* %8
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %6
20: ; preds = %6, %16
ret void
}