#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 *, char *, ...);
void process_data(char *data[], char *data_names[], char *logo[],
                  unsigned short int num1, unsigned short int num2, char *col1,
                  char *col2, char *col3) {
  unsigned short int x = 0;
  if (0 == num2) {
    for (x = 0; x < num1; x++) {
      printf("%s %s%s%s%s%s%s\n", logo[x], col1, col2, col3, data_names[x],
             "\x1B[0m", data[x]);
    }
  } else {
    for (x = 0; x < num1; x++) {
      if (x < num2) {
        printf("%s %s%s%s%s%s%s\n", logo[x], col1, col2, col3, data_names[x],
               "\x1B[0m", data[x]);
      } else {
        printf("%s\n", logo[x]);
      }
    }
  }
  return;
}


x86 assembly (clang, -O0):
<process_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %r8w,%ax
mov    0x18(%rbp),%r8
mov    0x10(%rbp),%r8
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %cx,-0x1a(%rbp)
mov    %ax,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
movw   $0x0,-0x2a(%rbp)
movzwl -0x1c(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jne    11ca <process_data+0xba>
movw   $0x0,-0x2a(%rbp)
movzwl -0x2a(%rbp),%eax
movzwl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jge    11c5 <process_data+0xb5>
mov    -0x18(%rbp),%rax
movzwl -0x2a(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
mov    -0x28(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    -0x10(%rbp),%rax
movzwl -0x2a(%rbp),%edi
mov    (%rax,%rdi,8),%r9
mov    -0x8(%rbp),%rax
movzwl -0x2a(%rbp),%edi
mov    (%rax,%rdi,8),%rax
lea    0xe63(%rip),%rdi
lea    0xe6d(%rip),%r10
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x2a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x2a(%rbp)
jmp    1156 <process_data+0x46>
jmp    1278 <process_data+0x168>
movw   $0x0,-0x2a(%rbp)
movzwl -0x2a(%rbp),%eax
movzwl -0x1a(%rbp),%ecx
cmp    %ecx,%eax
jge    1273 <process_data+0x163>
movzwl -0x2a(%rbp),%eax
movzwl -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jge    1243 <process_data+0x133>
mov    -0x18(%rbp),%rax
movzwl -0x2a(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
mov    -0x28(%rbp),%rdx
mov    0x10(%rbp),%rcx
mov    0x18(%rbp),%r8
mov    -0x10(%rbp),%rax
movzwl -0x2a(%rbp),%edi
mov    (%rax,%rdi,8),%r9
mov    -0x8(%rbp),%rax
movzwl -0x2a(%rbp),%edi
mov    (%rax,%rdi,8),%rax
lea    0xdd9(%rip),%rdi
lea    0xde3(%rip),%r10
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125d <process_data+0x14d>
mov    -0x18(%rbp),%rax
movzwl -0x2a(%rbp),%ecx
mov    (%rax,%rcx,8),%rsi
lea    0xdb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1262 <process_data+0x152>
mov    -0x2a(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x2a(%rbp)
jmp    11d0 <process_data+0xc0>
jmp    1278 <process_data+0x168>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_data>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r9,0x10(%rsp)
mov    %rdx,%r13
mov    %rsi,0x8(%rsp)
mov    %rdi,%r12
test   %r8d,%r8d
je     11ad <process_data+0x9d>
test   %cx,%cx
je     120a <process_data+0xfa>
movzwl %r8w,%r15d
movzwl %cx,%ebx
xor    %r14d,%r14d
jmp    116b <process_data+0x5b>
nopl   0x0(%rax,%rax,1)
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%r14
cmp    %r14,%rbx
je     120a <process_data+0xfa>
mov    0x0(%r13,%r14,8),%rsi
cmp    %r15,%r14
jae    1150 <process_data+0x40>
mov    0x8(%rsp),%rax
mov    (%rax,%r14,8),%r9
lea    0xe7b(%rip),%rdi
mov    0x10(%rsp),%rdx
mov    0x50(%rsp),%rcx
mov    0x58(%rsp),%r8
xor    %eax,%eax
push   (%r12,%r14,8)
lea    0xe70(%rip),%rbp
push   %rbp
call   1030 <printf@plt>
add    $0x10,%rsp
jmp    115e <process_data+0x4e>
test   %cx,%cx
je     120a <process_data+0xfa>
movzwl %cx,%ebp
lea    0xe55(%rip),%r15
lea    0xe3d(%rip),%rbx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
mov    0x0(%r13,%r14,8),%rsi
mov    0x8(%rsp),%rax
mov    (%rax,%r14,8),%r9
mov    %rbx,%rdi
mov    0x10(%rsp),%rdx
mov    0x50(%rsp),%rcx
mov    0x58(%rsp),%r8
xor    %eax,%eax
push   (%r12,%r14,8)
push   %r15
call   1030 <printf@plt>
add    $0x10,%rsp
add    $0x1,%r14
cmp    %r14,%rbp
jne    11d0 <process_data+0xc0>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%s %s%s%s%s%s%s\0A\00"
@.str.1 = [5 x i8] c"\1B[0m\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define void @process_data(i8** %0, i8** %1, i8** %2, i16 zeroext %3, i16 zeroext %4, i8* %5, i8* %6, i8* %7) {
%9 = alloca i8**
%10 = alloca i8**
%11 = alloca i8**
%12 = alloca i16
%13 = alloca i16
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i16
store i8** %0, i8*** %9
store i8** %1, i8*** %10
store i8** %2, i8*** %11
store i16 %3, i16* %12
store i16 %4, i16* %13
store i8* %5, i8** %14
store i8* %6, i8** %15
store i8* %7, i8** %16
store i16 0, i16* %17
%18 = load i16, i16* %13
%19 = zext i16 %18 to i32
%20 = icmp eq i32 0, %19
br i1 %20, label %21, label %52
21: ; preds = %8
store i16 0, i16* %17
br label %22
22: ; preds = %48, %21
%23 = load i16, i16* %17
%24 = zext i16 %23 to i32
%25 = load i16, i16* %12
%26 = zext i16 %25 to i32
%27 = icmp slt i32 %24, %26
br i1 %27, label %28, label %51
28: ; preds = %22
%29 = load i8**, i8*** %11
%30 = load i16, i16* %17
%31 = zext i16 %30 to i64
%32 = getelementptr inbounds i8*, i8** %29, i64 %31
%33 = load i8*, i8** %32
%34 = load i8*, i8** %14
%35 = load i8*, i8** %15
%36 = load i8*, i8** %16
%37 = load i8**, i8*** %10
%38 = load i16, i16* %17
%39 = zext i16 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = load i8**, i8*** %9
%43 = load i16, i16* %17
%44 = zext i16 %43 to i64
%45 = getelementptr inbounds i8*, i8** %42, i64 %44
%46 = load i8*, i8** %45
%47 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %33, i8* %34, i8* %35, i8* %36, i8* %41, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %46)
br label %48
48: ; preds = %28
%49 = load i16, i16* %17
%50 = add i16 %49, 1
store i16 %50, i16* %17
br label %22
51: ; preds = %22
br label %97
52: ; preds = %8
store i16 0, i16* %17
br label %53
53: ; preds = %93, %52
%54 = load i16, i16* %17
%55 = zext i16 %54 to i32
%56 = load i16, i16* %12
%57 = zext i16 %56 to i32
%58 = icmp slt i32 %55, %57
br i1 %58, label %59, label %96
59: ; preds = %53
%60 = load i16, i16* %17
%61 = zext i16 %60 to i32
%62 = load i16, i16* %13
%63 = zext i16 %62 to i32
%64 = icmp slt i32 %61, %63
br i1 %64, label %65, label %85
65: ; preds = %59
%66 = load i8**, i8*** %11
%67 = load i16, i16* %17
%68 = zext i16 %67 to i64
%69 = getelementptr inbounds i8*, i8** %66, i64 %68
%70 = load i8*, i8** %69
%71 = load i8*, i8** %14
%72 = load i8*, i8** %15
%73 = load i8*, i8** %16
%74 = load i8**, i8*** %10
%75 = load i16, i16* %17
%76 = zext i16 %75 to i64
%77 = getelementptr inbounds i8*, i8** %74, i64 %76
%78 = load i8*, i8** %77
%79 = load i8**, i8*** %9
%80 = load i16, i16* %17
%81 = zext i16 %80 to i64
%82 = getelementptr inbounds i8*, i8** %79, i64 %81
%83 = load i8*, i8** %82
%84 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %70, i8* %71, i8* %72, i8* %73, i8* %78, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %83)
br label %92
85: ; preds = %59
%86 = load i8**, i8*** %11
%87 = load i16, i16* %17
%88 = zext i16 %87 to i64
%89 = getelementptr inbounds i8*, i8** %86, i64 %88
%90 = load i8*, i8** %89
%91 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %90)
br label %92
92: ; preds = %85, %65
br label %93
93: ; preds = %92
%94 = load i16, i16* %17
%95 = add i16 %94, 1
store i16 %95, i16* %17
br label %53
96: ; preds = %53
br label %97
97: ; preds = %96, %51
ret void
}

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