#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*/ CmdIndent(int);
int /*<<< orphan*/ CmdVspace(int);
int DefaultFontSize();
int /*<<< orphan*/ PopEnvironment();
int /*<<< orphan*/ PushEnvironment(int);
int /*<<< orphan*/ diagnostics(int, char *);
scalar_t__ getLeftMarginIndent();
scalar_t__ getRightMarginIndent();
int /*<<< orphan*/ setLeftMarginIndent(scalar_t__);
int /*<<< orphan*/ setLength(char *, int);
int /*<<< orphan*/ setRightMarginIndent(scalar_t__);
void CmdQuote(int code) {
  int true_code = code & ~0x4000;
  CmdEndParagraph(0);
  if (code & 0x4000) {
    if (true_code == 2) {
      PushEnvironment(23);
      diagnostics(4, "Entering \\begin{quotation}");
      CmdVspace(1);
      setLeftMarginIndent(getLeftMarginIndent() + 512);
      setRightMarginIndent(getRightMarginIndent() + 512);
      setLength("parindent", 15 * DefaultFontSize());
    } else {
      PushEnvironment(24);
      diagnostics(4, "Entering \\begin{quote}");
      CmdVspace(1);
      setLeftMarginIndent(getLeftMarginIndent() + 512);
      setRightMarginIndent(getRightMarginIndent() + 512);
      setLength("parindent", 15 * DefaultFontSize());
    }
  } else {
    PopEnvironment();
    diagnostics(4, "Exiting \\end{quote} or \\end{quotation}");
    CmdIndent(2);
    CmdVspace(1);
  }
}


x86 assembly (clang, -O0):
<CmdQuote>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffffbfff,%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   10e0 <CmdEndParagraph@plt>
mov    -0x4(%rbp),%eax
and    $0x4000,%eax
cmp    $0x0,%eax
je     12d0 <CmdQuote+0x110>
cmpl   $0x2,-0x8(%rbp)
jne    1264 <CmdQuote+0xa4>
mov    $0x17,%edi
call   1040 <PushEnvironment@plt>
mov    $0x4,%edi
lea    0xdf2(%rip),%rsi
call   1080 <diagnostics@plt>
mov    $0x1,%edi
call   1060 <CmdVspace@plt>
mov    $0x0,%al
call   10c0 <getLeftMarginIndent@plt>
mov    %rax,%rdi
add    $0x200,%rdi
call   1090 <setLeftMarginIndent@plt>
mov    $0x0,%al
call   10b0 <getRightMarginIndent@plt>
mov    %rax,%rdi
add    $0x200,%rdi
call   1050 <setRightMarginIndent@plt>
mov    $0x0,%al
call   10d0 <DefaultFontSize@plt>
imul   $0xf,%eax,%esi
lea    0xdc1(%rip),%rdi
call   1030 <setLength@plt>
jmp    12cb <CmdQuote+0x10b>
mov    $0x18,%edi
call   1040 <PushEnvironment@plt>
mov    $0x4,%edi
lea    0xdab(%rip),%rsi
call   1080 <diagnostics@plt>
mov    $0x1,%edi
call   1060 <CmdVspace@plt>
mov    $0x0,%al
call   10c0 <getLeftMarginIndent@plt>
mov    %rax,%rdi
add    $0x200,%rdi
call   1090 <setLeftMarginIndent@plt>
mov    $0x0,%al
call   10b0 <getRightMarginIndent@plt>
mov    %rax,%rdi
add    $0x200,%rdi
call   1050 <setRightMarginIndent@plt>
mov    $0x0,%al
call   10d0 <DefaultFontSize@plt>
imul   $0xf,%eax,%esi
lea    0xd55(%rip),%rdi
call   1030 <setLength@plt>
jmp    12fc <CmdQuote+0x13c>
mov    $0x0,%al
call   10a0 <PopEnvironment@plt>
mov    $0x4,%edi
lea    0xd59(%rip),%rsi
call   1080 <diagnostics@plt>
mov    $0x2,%edi
call   1070 <CmdIndent@plt>
mov    $0x1,%edi
call   1060 <CmdVspace@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdQuote>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   10e0 <CmdEndParagraph@plt>
test   $0x4000,%ebx
jne    11ff <CmdQuote+0x3f>
xor    %eax,%eax
call   10a0 <PopEnvironment@plt>
lea    0xe5c(%rip),%rsi
mov    $0x4,%edi
call   1080 <diagnostics@plt>
mov    $0x2,%edi
call   1070 <CmdIndent@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1060 <CmdVspace@plt>
and    $0xffffbfff,%ebx
cmp    $0x2,%ebx
jne    121d <CmdQuote+0x5d>
mov    $0x17,%edi
call   1040 <PushEnvironment@plt>
lea    0xde5(%rip),%rsi
jmp    122e <CmdQuote+0x6e>
mov    $0x18,%edi
call   1040 <PushEnvironment@plt>
lea    0xdf7(%rip),%rsi
mov    $0x4,%edi
call   1080 <diagnostics@plt>
mov    $0x1,%edi
call   1060 <CmdVspace@plt>
xor    %eax,%eax
call   10c0 <getLeftMarginIndent@plt>
lea    0x200(%rax),%rdi
call   1090 <setLeftMarginIndent@plt>
xor    %eax,%eax
call   10b0 <getRightMarginIndent@plt>
lea    0x200(%rax),%rdi
call   1050 <setRightMarginIndent@plt>
xor    %eax,%eax
call   10d0 <DefaultFontSize@plt>
lea    (%rax,%rax,4),%eax
lea    (%rax,%rax,2),%esi
lea    0xd9f(%rip),%rdi
pop    %rbx
jmp    1030 <setLength@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Entering \\begin{quotation}\00"
@.str.1 = [10 x i8] c"parindent\00"
@.str.2 = [23 x i8] c"Entering \\begin{quote}\00"
@.str.3 = [39 x i8] c"Exiting \\end{quote} or \\end{quotation}\00"
define void @CmdQuote(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, -16385
store i32 %5, i32* %3
%6 = call i32 @CmdEndParagraph(i32 0)
%7 = load i32, i32* %2
%8 = and i32 %7, 16384
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %40
10: ; preds = %1
%11 = load i32, i32* %3
%12 = icmp eq i32 %11, 2
br i1 %12, label %13, label %26
13: ; preds = %10
%14 = call i32 @PushEnvironment(i32 23)
%15 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @CmdVspace(i32 1)
%17 = call i64 (...) @getLeftMarginIndent()
%18 = add nsw i64 %17, 512
%19 = call i32 @setLeftMarginIndent(i64 %18)
%20 = call i64 (...) @getRightMarginIndent()
%21 = add nsw i64 %20, 512
%22 = call i32 @setRightMarginIndent(i64 %21)
%23 = call i32 (...) @DefaultFontSize()
%24 = mul nsw i32 15, %23
%25 = call i32 @setLength(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %24)
br label %39
26: ; preds = %10
%27 = call i32 @PushEnvironment(i32 24)
%28 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%29 = call i32 @CmdVspace(i32 1)
%30 = call i64 (...) @getLeftMarginIndent()
%31 = add nsw i64 %30, 512
%32 = call i32 @setLeftMarginIndent(i64 %31)
%33 = call i64 (...) @getRightMarginIndent()
%34 = add nsw i64 %33, 512
%35 = call i32 @setRightMarginIndent(i64 %34)
%36 = call i32 (...) @DefaultFontSize()
%37 = mul nsw i32 15, %36
%38 = call i32 @setLength(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %37)
br label %39
39: ; preds = %26, %13
br label %45
40: ; preds = %1
%41 = call i32 (...) @PopEnvironment()
%42 = call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%43 = call i32 @CmdIndent(i32 2)
%44 = call i32 @CmdVspace(i32 1)
br label %45
45: ; preds = %40, %39
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"Entering \\begin{quotation}\00"
@.str.1 = [10 x i8] c"parindent\00"
@.str.2 = [23 x i8] c"Entering \\begin{quote}\00"
@.str.3 = [39 x i8] c"Exiting \\end{quote} or \\end{quotation}\00"
define void @CmdQuote(i32 %0) {
%2 = tail call i32 @CmdEndParagraph(i32 0)
%3 = and i32 %0, 16384
%4 = icmp eq i32 %3, 0
br i1 %4, label %34, label %5
5: ; preds = %1
%6 = and i32 %0, -16385
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = tail call i32 @PushEnvironment(i32 23)
%10 = tail call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @CmdVspace(i32 1)
%12 = tail call i64 (...) @getLeftMarginIndent()
%13 = add nsw i64 %12, 512
%14 = tail call i32 @setLeftMarginIndent(i64 %13)
%15 = tail call i64 (...) @getRightMarginIndent()
%16 = add nsw i64 %15, 512
%17 = tail call i32 @setRightMarginIndent(i64 %16)
%18 = tail call i32 (...) @DefaultFontSize()
%19 = mul nsw i32 %18, 15
%20 = tail call i32 @setLength(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %19)
br label %39
21: ; preds = %5
%22 = tail call i32 @PushEnvironment(i32 24)
%23 = tail call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%24 = tail call i32 @CmdVspace(i32 1)
%25 = tail call i64 (...) @getLeftMarginIndent()
%26 = add nsw i64 %25, 512
%27 = tail call i32 @setLeftMarginIndent(i64 %26)
%28 = tail call i64 (...) @getRightMarginIndent()
%29 = add nsw i64 %28, 512
%30 = tail call i32 @setRightMarginIndent(i64 %29)
%31 = tail call i32 (...) @DefaultFontSize()
%32 = mul nsw i32 %31, 15
%33 = tail call i32 @setLength(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %32)
br label %39
34: ; preds = %1
%35 = tail call i32 (...) @PopEnvironment()
%36 = tail call i32 @diagnostics(i32 4, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0))
%37 = tail call i32 @CmdIndent(i32 2)
%38 = tail call i32 @CmdVspace(i32 1)
br label %39
39: ; preds = %8, %21, %34
ret void
}