#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*/ diagnostics(int, char *, char *, char *);
int /*<<< orphan*/ free(char *);
char *getBraceParam();
int /*<<< orphan*/ *newBibCite(char *, char *);
void CmdBibCite(int code) {
  char *p1 = getBraceParam();
  char *p2 = getBraceParam();
  if (NULL == newBibCite(p1, p2)) {
    diagnostics(1, "memory exhausted for \\bibcite{%s}{%s}", p1, p2);
    free(p1);
    free(p2);
  }
}


x86 assembly (clang, -O0):
<CmdBibCite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <getBraceParam@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <getBraceParam@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <newBibCite@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jne    11a7 <CmdBibCite+0x67>
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1,%edi
lea    0xe70(%rip),%rsi
call   1060 <diagnostics@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdBibCite>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <getBraceParam@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1050 <getBraceParam@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
call   1040 <newBibCite@plt>
test   %rax,%rax
je     1170 <CmdBibCite+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe89(%rip),%rsi
mov    $0x1,%edi
mov    %r14,%rdx
mov    %rbx,%rcx
call   1060 <diagnostics@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"memory exhausted for \\bibcite{%s}{%s}\00"
define void @CmdBibCite(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i32 %0, i32* %2
%5 = call i8* (...) @getBraceParam()
store i8* %5, i8** %3
%6 = call i8* (...) @getBraceParam()
store i8* %6, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32* @newBibCite(i8* %7, i8* %8)
%10 = icmp eq i32* null, %9
br i1 %10, label %11, label %19
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i32 @diagnostics(i32 1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
%15 = load i8*, i8** %3
%16 = call i32 @free(i8* %15)
%17 = load i8*, i8** %4
%18 = call i32 @free(i8* %17)
br label %19
19: ; preds = %11, %1
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"memory exhausted for \\bibcite{%s}{%s}\00"
define void @CmdBibCite(i32 %0) {
%2 = tail call i8* (...) @getBraceParam()
%3 = tail call i8* (...) @getBraceParam()
%4 = tail call i32* @newBibCite(i8* %2, i8* %3)
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = tail call i32 @diagnostics(i32 1, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3)
%8 = tail call i32 @free(i8* %2)
%9 = tail call i32 @free(i8* %3)
br label %10
10: ; preds = %6, %1
ret void
}