#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 *, ...);
void cx1_print_topic(const int module, char *module_vector[], const int section,
                     char *section_vector[], const int topic,
                     char *topic_vector[], const int description,
                     char **description_vector[]) {
  printf("\n\n");
  printf("---------------------------------------\n");
  printf("MODULE %d: %s\n", module, module_vector[module]);
  printf("SECTION %d: %s\n", section, section_vector[section]);
  printf("TOPIC %d: %s - ", topic, topic_vector[topic]);
  printf("%s\n", description_vector[section][topic]);
  printf("---------------------------------------\n");
  printf("\n\n");
}


x86 assembly (clang, -O0):
<cx1_print_topic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%esi
mov    -0x30(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x18(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cx1_print_topic>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r12
mov    %r8d,%r13d
mov    %rcx,%rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %edi,%r15d
mov    0x48(%rsp),%rax
mov    %rax,(%rsp)
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
lea    0xed7(%rip),%rdi
call   1030 <puts@plt>
movslq %r15d,%rsi
mov    (%r14,%rsi,8),%rdx
lea    0xe95(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movslq %ebp,%rbp
mov    (%rbx,%rbp,8),%rdx
lea    0xe8f(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
movslq %r13d,%rbx
mov    (%r12,%rbx,8),%rdx
lea    0xe88(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rsp),%rax
mov    (%rax,%rbp,8),%rax
mov    (%rax,%rbx,8),%rdi
call   1030 <puts@plt>
lea    0xe77(%rip),%rdi
call   1030 <puts@plt>
lea    0xe49(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
@.str.1 = [41 x i8] c"---------------------------------------\0A\00"
@.str.2 = [15 x i8] c"MODULE %d: %s\0A\00"
@.str.3 = [16 x i8] c"SECTION %d: %s\0A\00"
@.str.4 = [16 x i8] c"TOPIC %d: %s - \00"
@.str.5 = [4 x i8] c"%s\0A\00"
define void @cx1_print_topic(i32 %0, i8** %1, i32 %2, i8** %3, i32 %4, i8** %5, i32 %6, i8*** %7) {
%9 = alloca i32
%10 = alloca i8**
%11 = alloca i32
%12 = alloca i8**
%13 = alloca i32
%14 = alloca i8**
%15 = alloca i32
%16 = alloca i8***
store i32 %0, i32* %9
store i8** %1, i8*** %10
store i32 %2, i32* %11
store i8** %3, i8*** %12
store i32 %4, i32* %13
store i8** %5, i8*** %14
store i32 %6, i32* %15
store i8*** %7, i8**** %16
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* %9
%20 = load i8**, i8*** %10
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds i8*, i8** %20, i64 %22
%24 = load i8*, i8** %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %19, i8* %24)
%26 = load i32, i32* %11
%27 = load i8**, i8*** %12
%28 = load i32, i32* %11
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8*, i8** %27, i64 %29
%31 = load i8*, i8** %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %26, i8* %31)
%33 = load i32, i32* %13
%34 = load i8**, i8*** %14
%35 = load i32, i32* %13
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i8*, i8** %34, i64 %36
%38 = load i8*, i8** %37
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %33, i8* %38)
%40 = load i8***, i8**** %16
%41 = load i32, i32* %11
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8**, i8*** %40, i64 %42
%44 = load i8**, i8*** %43
%45 = load i32, i32* %13
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %48)
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.2 = [15 x i8] c"MODULE %d: %s\0A\00"
@.str.3 = [16 x i8] c"SECTION %d: %s\0A\00"
@.str.4 = [16 x i8] c"TOPIC %d: %s - \00"
@str.7 = [40 x i8] c"---------------------------------------\00"
@str.8 = [2 x i8] c"\0A\00"
define void @cx1_print_topic(i32 %0, i8** nocapture %1, i32 %2, i8** nocapture %3, i32 %4, i8** nocapture %5, i32 %6, i8*** nocapture %7) {
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0))
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.7, i64 0, i64 0))
%11 = sext i32 %0 to i64
%12 = getelementptr inbounds i8*, i8** %1, i64 %11
%13 = load i8*, i8** %12
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %0, i8* %13)
%15 = sext i32 %2 to i64
%16 = getelementptr inbounds i8*, i8** %3, i64 %15
%17 = load i8*, i8** %16
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %2, i8* %17)
%19 = sext i32 %4 to i64
%20 = getelementptr inbounds i8*, i8** %5, i64 %19
%21 = load i8*, i8** %20
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %4, i8* %21)
%23 = getelementptr inbounds i8**, i8*** %7, i64 %15
%24 = load i8**, i8*** %23
%25 = getelementptr inbounds i8*, i8** %24, i64 %19
%26 = load i8*, i8** %25
%27 = tail call i32 @puts(i8* dereferenceable(1) %26)
%28 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.7, i64 0, i64 0))
%29 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.8, i64 0, i64 0))
ret void
}