#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 */
struct hedron {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ compactEdges(struct hedron *);
int /*<<< orphan*/ compactTriangles(struct hedron *);
int /*<<< orphan*/ compactVertices(struct hedron *);
scalar_t__ error();
int /*<<< orphan*/ newNumberEdges(struct hedron *);
int /*<<< orphan*/ newNumberTriangles(struct hedron *);
int /*<<< orphan*/ newNumberVertices(struct hedron *);
int /*<<< orphan*/ updateEdgeToVertex(struct hedron *);
int /*<<< orphan*/ updateTriangleToEdge(struct hedron *);
int /*<<< orphan*/ updateTriangleToVertex(struct hedron *);
void makeContiguous(struct hedron *hed) {
  newNumberVertices(hed);
  if (error())
    return;
  newNumberEdges(hed);
  if (error())
    return;
  newNumberTriangles(hed);
  if (error())
    return;
  updateEdgeToVertex(hed);
  if (error())
    return;
  updateTriangleToVertex(hed);
  if (error())
    return;
  updateTriangleToEdge(hed);
  if (error())
    return;
  compactVertices(hed);
  if (error())
    return;
  compactEdges(hed);
  if (error())
    return;
  compactTriangles(hed);
  if (error())
    return;
}


x86 assembly (clang, -O0):
<makeContiguous>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <newNumberVertices@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     11cb <makeContiguous+0x2b>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   1080 <newNumberEdges@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     11ea <makeContiguous+0x4a>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   10b0 <newNumberTriangles@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     1209 <makeContiguous+0x69>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   1060 <updateEdgeToVertex@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     1228 <makeContiguous+0x88>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   10c0 <updateTriangleToVertex@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     1247 <makeContiguous+0xa7>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   1050 <updateTriangleToEdge@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     1266 <makeContiguous+0xc6>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   1070 <compactVertices@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     1285 <makeContiguous+0xe5>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   1030 <compactEdges@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     12a4 <makeContiguous+0x104>
jmp    12c3 <makeContiguous+0x123>
mov    -0x8(%rbp),%rdi
call   1090 <compactTriangles@plt>
mov    $0x0,%al
call   10a0 <error@plt>
cmp    $0x0,%rax
je     12c3 <makeContiguous+0x123>
jmp    12c3 <makeContiguous+0x123>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeContiguous>:
push   %rbx
mov    %rdi,%rbx
call   1040 <newNumberVertices@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
jne    1245 <makeContiguous+0xa5>
mov    %rbx,%rdi
call   1080 <newNumberEdges@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
jne    1245 <makeContiguous+0xa5>
mov    %rbx,%rdi
call   10b0 <newNumberTriangles@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
jne    1245 <makeContiguous+0xa5>
mov    %rbx,%rdi
call   1060 <updateEdgeToVertex@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
jne    1245 <makeContiguous+0xa5>
mov    %rbx,%rdi
call   10c0 <updateTriangleToVertex@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
jne    1245 <makeContiguous+0xa5>
mov    %rbx,%rdi
call   1050 <updateTriangleToEdge@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
jne    1245 <makeContiguous+0xa5>
mov    %rbx,%rdi
call   1070 <compactVertices@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
jne    1245 <makeContiguous+0xa5>
mov    %rbx,%rdi
call   1030 <compactEdges@plt>
xor    %eax,%eax
call   10a0 <error@plt>
test   %rax,%rax
je     1247 <makeContiguous+0xa7>
pop    %rbx
ret
mov    %rbx,%rdi
call   1090 <compactTriangles@plt>
xor    %eax,%eax
pop    %rbx
jmp    10a0 <error@plt>

LLVM IR (-O0):
%struct.hedron = type { i32 }
define void @makeContiguous(%struct.hedron* %0) {
%2 = alloca %struct.hedron*
store %struct.hedron* %0, %struct.hedron** %2
%3 = load %struct.hedron*, %struct.hedron** %2
%4 = call i32 @newNumberVertices(%struct.hedron* %3)
%5 = call i64 (...) @error()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %56
8: ; preds = %1
%9 = load %struct.hedron*, %struct.hedron** %2
%10 = call i32 @newNumberEdges(%struct.hedron* %9)
%11 = call i64 (...) @error()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
br label %56
14: ; preds = %8
%15 = load %struct.hedron*, %struct.hedron** %2
%16 = call i32 @newNumberTriangles(%struct.hedron* %15)
%17 = call i64 (...) @error()
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %14
br label %56
20: ; preds = %14
%21 = load %struct.hedron*, %struct.hedron** %2
%22 = call i32 @updateEdgeToVertex(%struct.hedron* %21)
%23 = call i64 (...) @error()
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %20
br label %56
26: ; preds = %20
%27 = load %struct.hedron*, %struct.hedron** %2
%28 = call i32 @updateTriangleToVertex(%struct.hedron* %27)
%29 = call i64 (...) @error()
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %26
br label %56
32: ; preds = %26
%33 = load %struct.hedron*, %struct.hedron** %2
%34 = call i32 @updateTriangleToEdge(%struct.hedron* %33)
%35 = call i64 (...) @error()
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %38
37: ; preds = %32
br label %56
38: ; preds = %32
%39 = load %struct.hedron*, %struct.hedron** %2
%40 = call i32 @compactVertices(%struct.hedron* %39)
%41 = call i64 (...) @error()
%42 = icmp ne i64 %41, 0
br i1 %42, label %43, label %44
43: ; preds = %38
br label %56
44: ; preds = %38
%45 = load %struct.hedron*, %struct.hedron** %2
%46 = call i32 @compactEdges(%struct.hedron* %45)
%47 = call i64 (...) @error()
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %50
49: ; preds = %44
br label %56
50: ; preds = %44
%51 = load %struct.hedron*, %struct.hedron** %2
%52 = call i32 @compactTriangles(%struct.hedron* %51)
%53 = call i64 (...) @error()
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %56
55: ; preds = %50
br label %56
56: ; preds = %7, %13, %19, %25, %31, %37, %43, %49, %55, %50
ret void
}

LLVM IR (-O2):
%struct.hedron = type { i32 }
define void @makeContiguous(%struct.hedron* %0) {
%2 = tail call i32 @newNumberVertices(%struct.hedron* %0)
%3 = tail call i64 (...) @error()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %36
5: ; preds = %1
%6 = tail call i32 @newNumberEdges(%struct.hedron* %0)
%7 = tail call i64 (...) @error()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %36
9: ; preds = %5
%10 = tail call i32 @newNumberTriangles(%struct.hedron* %0)
%11 = tail call i64 (...) @error()
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %36
13: ; preds = %9
%14 = tail call i32 @updateEdgeToVertex(%struct.hedron* %0)
%15 = tail call i64 (...) @error()
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %36
17: ; preds = %13
%18 = tail call i32 @updateTriangleToVertex(%struct.hedron* %0)
%19 = tail call i64 (...) @error()
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %36
21: ; preds = %17
%22 = tail call i32 @updateTriangleToEdge(%struct.hedron* %0)
%23 = tail call i64 (...) @error()
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %36
25: ; preds = %21
%26 = tail call i32 @compactVertices(%struct.hedron* %0)
%27 = tail call i64 (...) @error()
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %36
29: ; preds = %25
%30 = tail call i32 @compactEdges(%struct.hedron* %0)
%31 = tail call i64 (...) @error()
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %29
%34 = tail call i32 @compactTriangles(%struct.hedron* %0)
%35 = tail call i64 (...) @error()
br label %36
36: ; preds = %33, %29, %25, %21, %17, %13, %9, %5, %1
ret void
}