#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*/ free(char *);
char *getBraceParam();
int getDimension();
int getLength(char *);
int getStringDimension(char *);
int getTexMode();
scalar_t__ getVspace();
int /*<<< orphan*/ setVspace(scalar_t__);
void CmdVspace(int code) {
  int vspace = 0;
  char *s;
  switch (code) {
  case -1:
    s = getBraceParam();
    vspace = getStringDimension(s);
    free(s);
    break;
  case 0:
    vspace = getDimension();
    if (getTexMode() != 6) {
      CmdEndParagraph(0);
      CmdIndent(2);
    }
    break;
  case 1:
    vspace = getLength("smallskipamount");
    if (getTexMode() != 6) {
      CmdEndParagraph(0);
      CmdIndent(2);
    }
    break;
  case 2:
    vspace = getLength("medskipamount");
    if (getTexMode() != 6) {
      CmdEndParagraph(0);
      CmdIndent(2);
    }
    break;
  case 3:
    vspace = getLength("bigskipamount");
    if (getTexMode() != 6) {
      CmdEndParagraph(0);
      CmdIndent(2);
    }
    break;
  }
  if (getTexMode() == 6)
    setVspace(getVspace() + vspace);
}


x86 assembly (clang, -O0):
<CmdVspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x4,%eax
ja     12cf <CmdVspace+0x12f>
mov    -0x18(%rbp),%rax
lea    0xe2e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x0,%al
call   1060 <getBraceParam@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   10b0 <getStringDimension@plt>
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    12cf <CmdVspace+0x12f>
mov    $0x0,%al
call   1070 <getDimension@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getTexMode@plt>
cmp    $0x6,%eax
je     122b <CmdVspace+0x8b>
xor    %edi,%edi
call   10c0 <CmdEndParagraph@plt>
mov    $0x2,%edi
call   1040 <CmdIndent@plt>
jmp    12cf <CmdVspace+0x12f>
lea    0xddd(%rip),%rdi
call   1080 <getLength@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getTexMode@plt>
cmp    $0x6,%eax
je     1260 <CmdVspace+0xc0>
xor    %edi,%edi
call   10c0 <CmdEndParagraph@plt>
mov    $0x2,%edi
call   1040 <CmdIndent@plt>
jmp    12cf <CmdVspace+0x12f>
lea    0xdb8(%rip),%rdi
call   1080 <getLength@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getTexMode@plt>
cmp    $0x6,%eax
je     1295 <CmdVspace+0xf5>
xor    %edi,%edi
call   10c0 <CmdEndParagraph@plt>
mov    $0x2,%edi
call   1040 <CmdIndent@plt>
jmp    12cf <CmdVspace+0x12f>
lea    0xd91(%rip),%rdi
call   1080 <getLength@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <getTexMode@plt>
cmp    $0x6,%eax
je     12ca <CmdVspace+0x12a>
xor    %edi,%edi
call   10c0 <CmdEndParagraph@plt>
mov    $0x2,%edi
call   1040 <CmdIndent@plt>
jmp    12cf <CmdVspace+0x12f>
mov    $0x0,%al
call   1050 <getTexMode@plt>
cmp    $0x6,%eax
jne    12f5 <CmdVspace+0x155>
mov    $0x0,%al
call   10a0 <getVspace@plt>
mov    %rax,%rdi
movslq -0x8(%rbp),%rax
add    %rax,%rdi
call   1090 <setVspace@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdVspace>:
push   %rbp
push   %rbx
push   %rax
add    $0x1,%edi
cmp    $0x4,%edi
ja     11d9 <CmdVspace+0x39>
lea    0xe4e(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
xor    %eax,%eax
call   1060 <getBraceParam@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   10b0 <getStringDimension@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
jmp    1223 <CmdVspace+0x83>
xor    %ebp,%ebp
jmp    1223 <CmdVspace+0x83>
xor    %eax,%eax
call   1070 <getDimension@plt>
jmp    1204 <CmdVspace+0x64>
lea    0xe27(%rip),%rdi
jmp    11ff <CmdVspace+0x5f>
lea    0xe2e(%rip),%rdi
jmp    11ff <CmdVspace+0x5f>
lea    0xe33(%rip),%rdi
call   1080 <getLength@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <getTexMode@plt>
cmp    $0x6,%eax
je     1223 <CmdVspace+0x83>
xor    %edi,%edi
call   10c0 <CmdEndParagraph@plt>
mov    $0x2,%edi
call   1040 <CmdIndent@plt>
xor    %eax,%eax
call   1050 <getTexMode@plt>
cmp    $0x6,%eax
jne    1247 <CmdVspace+0xa7>
xor    %eax,%eax
call   10a0 <getVspace@plt>
movslq %ebp,%rdi
add    %rax,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1090 <setVspace@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [16 x i8] c"smallskipamount\00"
@.str.1 = [14 x i8] c"medskipamount\00"
@.str.2 = [14 x i8] c"bigskipamount\00"
define void @CmdVspace(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
store i32 0, i32* %3
%5 = load i32, i32* %2
switch i32 %5, label %44 [
i32 -1, label %6
i32 0, label %12
i32 1, label %20
i32 2, label %28
i32 3, label %36
]
6: ; preds = %1
%7 = call i8* (...) @getBraceParam()
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @getStringDimension(i8* %8)
store i32 %9, i32* %3
%10 = load i8*, i8** %4
%11 = call i32 @free(i8* %10)
br label %44
12: ; preds = %1
%13 = call i32 (...) @getDimension()
store i32 %13, i32* %3
%14 = call i32 (...) @getTexMode()
%15 = icmp ne i32 %14, 6
br i1 %15, label %16, label %19
16: ; preds = %12
%17 = call i32 @CmdEndParagraph(i32 0)
%18 = call i32 @CmdIndent(i32 2)
br label %19
19: ; preds = %16, %12
br label %44
20: ; preds = %1
%21 = call i32 @getLength(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 %21, i32* %3
%22 = call i32 (...) @getTexMode()
%23 = icmp ne i32 %22, 6
br i1 %23, label %24, label %27
24: ; preds = %20
%25 = call i32 @CmdEndParagraph(i32 0)
%26 = call i32 @CmdIndent(i32 2)
br label %27
27: ; preds = %24, %20
br label %44
28: ; preds = %1
%29 = call i32 @getLength(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i32 %29, i32* %3
%30 = call i32 (...) @getTexMode()
%31 = icmp ne i32 %30, 6
br i1 %31, label %32, label %35
32: ; preds = %28
%33 = call i32 @CmdEndParagraph(i32 0)
%34 = call i32 @CmdIndent(i32 2)
br label %35
35: ; preds = %32, %28
br label %44
36: ; preds = %1
%37 = call i32 @getLength(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
store i32 %37, i32* %3
%38 = call i32 (...) @getTexMode()
%39 = icmp ne i32 %38, 6
br i1 %39, label %40, label %43
40: ; preds = %36
%41 = call i32 @CmdEndParagraph(i32 0)
%42 = call i32 @CmdIndent(i32 2)
br label %43
43: ; preds = %40, %36
br label %44
44: ; preds = %1, %43, %35, %27, %19, %6
%45 = call i32 (...) @getTexMode()
%46 = icmp eq i32 %45, 6
br i1 %46, label %47, label %53
47: ; preds = %44
%48 = call i64 (...) @getVspace()
%49 = load i32, i32* %3
%50 = sext i32 %49 to i64
%51 = add nsw i64 %48, %50
%52 = call i32 @setVspace(i64 %51)
br label %53
53: ; preds = %47, %44
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"smallskipamount\00"
@.str.1 = [14 x i8] c"medskipamount\00"
@.str.2 = [14 x i8] c"bigskipamount\00"
define void @CmdVspace(i32 %0) {
switch i32 %0, label %34 [
i32 -1, label %2
i32 0, label %6
i32 1, label %13
i32 2, label %20
i32 3, label %27
]
2: ; preds = %1
%3 = tail call i8* (...) @getBraceParam()
%4 = tail call i32 @getStringDimension(i8* %3)
%5 = tail call i32 @free(i8* %3)
br label %34
6: ; preds = %1
%7 = tail call i32 (...) @getDimension()
%8 = tail call i32 (...) @getTexMode()
%9 = icmp eq i32 %8, 6
br i1 %9, label %34, label %10
10: ; preds = %6
%11 = tail call i32 @CmdEndParagraph(i32 0)
%12 = tail call i32 @CmdIndent(i32 2)
br label %34
13: ; preds = %1
%14 = tail call i32 @getLength(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%15 = tail call i32 (...) @getTexMode()
%16 = icmp eq i32 %15, 6
br i1 %16, label %34, label %17
17: ; preds = %13
%18 = tail call i32 @CmdEndParagraph(i32 0)
%19 = tail call i32 @CmdIndent(i32 2)
br label %34
20: ; preds = %1
%21 = tail call i32 @getLength(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%22 = tail call i32 (...) @getTexMode()
%23 = icmp eq i32 %22, 6
br i1 %23, label %34, label %24
24: ; preds = %20
%25 = tail call i32 @CmdEndParagraph(i32 0)
%26 = tail call i32 @CmdIndent(i32 2)
br label %34
27: ; preds = %1
%28 = tail call i32 @getLength(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
%29 = tail call i32 (...) @getTexMode()
%30 = icmp eq i32 %29, 6
br i1 %30, label %34, label %31
31: ; preds = %27
%32 = tail call i32 @CmdEndParagraph(i32 0)
%33 = tail call i32 @CmdIndent(i32 2)
br label %34
34: ; preds = %27, %31, %20, %24, %13, %17, %6, %10, %1, %2
%35 = phi i32 [ 0, %1 ], [ %28, %31 ], [ %28, %27 ], [ %21, %24 ], [ %21, %20 ], [ %14, %17 ], [ %14, %13 ], [ %7, %10 ], [ %7, %6 ], [ %4, %2 ]
%36 = tail call i32 (...) @getTexMode()
%37 = icmp eq i32 %36, 6
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = tail call i64 (...) @getVspace()
%40 = sext i32 %35 to i64
%41 = add nsw i64 %39, %40
%42 = tail call i32 @setVspace(i64 %41)
br label %43
43: ; preds = %38, %34
ret void
}