#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*/ CmdEndParagraph(int /*<<< orphan*/);
int /*<<< orphan*/ ConvertString(char *);
int /*<<< orphan*/ InsertStyle(char *);
int /*<<< orphan*/ diagnostics(int, char *, char *, char *);
int /*<<< orphan*/ fprintRTF(char *);
char *getBraceParam();
int /*<<< orphan*/ safe_free(char *);
int /*<<< orphan*/ startParagraph(char *, int);
char *strdup_together(char *, char *);
void CmdContentsLine(int code) {
  char *type, *text, *num, *contents_type;
  type = getBraceParam();
  text = getBraceParam();
  num = getBraceParam();
  diagnostics(4, "Entering CmdContentsLine %s [%s]", type, text);
  startParagraph("contents", 3);
  fprintRTF("{");
  contents_type = strdup_together("contents_", type);
  InsertStyle(contents_type);
  fprintRTF(" ");
  ConvertString(text);
  CmdEndParagraph(0);
  fprintRTF("}");
  safe_free(type);
  safe_free(text);
  safe_free(num);
  safe_free(contents_type);
}


x86 assembly (clang, -O0):
<CmdContentsLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getBraceParam@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getBraceParam@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getBraceParam@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x4,%edi
lea    0xe30(%rip),%rsi
call   1060 <diagnostics@plt>
lea    0xe45(%rip),%rdi
mov    $0x3,%esi
call   1070 <startParagraph@plt>
lea    0xe3d(%rip),%rdi
call   1090 <fprintRTF@plt>
mov    -0x10(%rbp),%rsi
lea    0xe2f(%rip),%rdi
call   10a0 <strdup_together@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <InsertStyle@plt>
lea    0xe20(%rip),%rdi
call   1090 <fprintRTF@plt>
mov    -0x18(%rbp),%rdi
call   1050 <ConvertString@plt>
xor    %edi,%edi
call   10b0 <CmdEndParagraph@plt>
lea    0xe06(%rip),%rdi
call   1090 <fprintRTF@plt>
mov    -0x10(%rbp),%rdi
call   1080 <safe_free@plt>
mov    -0x18(%rbp),%rdi
call   1080 <safe_free@plt>
mov    -0x20(%rbp),%rdi
call   1080 <safe_free@plt>
mov    -0x28(%rbp),%rdi
call   1080 <safe_free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdContentsLine>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <getBraceParam@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <getBraceParam@plt>
mov    %rax,%r12
xor    %eax,%eax
call   1030 <getBraceParam@plt>
mov    %rax,%r15
lea    0xe43(%rip),%rsi
mov    $0x4,%edi
mov    %r14,%rdx
mov    %r12,%rcx
call   1060 <diagnostics@plt>
lea    0xe4d(%rip),%rdi
mov    $0x3,%esi
call   1070 <startParagraph@plt>
lea    0xe45(%rip),%rdi
call   1090 <fprintRTF@plt>
lea    0xe3b(%rip),%rdi
mov    %r14,%rsi
call   10a0 <strdup_together@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <InsertStyle@plt>
lea    0xe2b(%rip),%rdi
call   1090 <fprintRTF@plt>
mov    %r12,%rdi
call   1050 <ConvertString@plt>
xor    %edi,%edi
call   10b0 <CmdEndParagraph@plt>
lea    0xe12(%rip),%rdi
call   1090 <fprintRTF@plt>
mov    %r14,%rdi
call   1080 <safe_free@plt>
mov    %r12,%rdi
call   1080 <safe_free@plt>
mov    %r15,%rdi
call   1080 <safe_free@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1080 <safe_free@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Entering CmdContentsLine %s [%s]\00"
@.str.1 = [9 x i8] c"contents\00"
@.str.2 = [2 x i8] c"{\00"
@.str.3 = [10 x i8] c"contents_\00"
@.str.4 = [2 x i8] c" \00"
@.str.5 = [2 x i8] c"}\00"
define void @CmdContentsLine(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %2
%7 = call i8* (...) @getBraceParam()
store i8* %7, i8** %3
%8 = call i8* (...) @getBraceParam()
store i8* %8, i8** %4
%9 = call i8* (...) @getBraceParam()
store i8* %9, i8** %5
%10 = load i8*, i8** %3
%11 = load i8*, i8** %4
%12 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11)
%13 = call i32 @startParagraph(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 3)
%14 = call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%15 = load i8*, i8** %3
%16 = call i8* @strdup_together(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %15)
store i8* %16, i8** %6
%17 = load i8*, i8** %6
%18 = call i32 @InsertStyle(i8* %17)
%19 = call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%20 = load i8*, i8** %4
%21 = call i32 @ConvertString(i8* %20)
%22 = call i32 @CmdEndParagraph(i32 0)
%23 = call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%24 = load i8*, i8** %3
%25 = call i32 @safe_free(i8* %24)
%26 = load i8*, i8** %4
%27 = call i32 @safe_free(i8* %26)
%28 = load i8*, i8** %5
%29 = call i32 @safe_free(i8* %28)
%30 = load i8*, i8** %6
%31 = call i32 @safe_free(i8* %30)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Entering CmdContentsLine %s [%s]\00"
@.str.1 = [9 x i8] c"contents\00"
@.str.2 = [2 x i8] c"{\00"
@.str.3 = [10 x i8] c"contents_\00"
@.str.4 = [2 x i8] c" \00"
@.str.5 = [2 x i8] c"}\00"
define void @CmdContentsLine(i32 %0) {
%2 = tail call i8* (...) @getBraceParam()
%3 = tail call i8* (...) @getBraceParam()
%4 = tail call i8* (...) @getBraceParam()
%5 = tail call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
%6 = tail call i32 @startParagraph(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 3)
%7 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i8* @strdup_together(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* %2)
%9 = tail call i32 @InsertStyle(i8* %8)
%10 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%11 = tail call i32 @ConvertString(i8* %3)
%12 = tail call i32 @CmdEndParagraph(i32 0)
%13 = tail call i32 @fprintRTF(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%14 = tail call i32 @safe_free(i8* %2)
%15 = tail call i32 @safe_free(i8* %3)
%16 = tail call i32 @safe_free(i8* %4)
%17 = tail call i32 @safe_free(i8* %8)
ret void
}