#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 graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ graph_destroy(struct graph *);
int /*<<< orphan*/ graph_dump(struct graph *);
int /*<<< orphan*/ graph_join(struct graph *, int, int);
struct graph *graph_new();
int main(int argc, char *argv[]) {
  struct graph *g = graph_new();
  if (g) {
    graph_join(g, 12, 34);
    graph_join(g, 34, 12);
    graph_join(g, 11, 9);
    graph_join(g, 9, 100);
    graph_join(g, 25, 89);
    graph_join(g, 100, 100);
    graph_dump(g);
    graph_destroy(g);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <graph_new@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11ed <main+0xad>
mov    -0x18(%rbp),%rdi
mov    $0xc,%esi
mov    $0x22,%edx
call   1050 <graph_join@plt>
mov    -0x18(%rbp),%rdi
mov    $0x22,%esi
mov    $0xc,%edx
call   1050 <graph_join@plt>
mov    -0x18(%rbp),%rdi
mov    $0xb,%esi
mov    $0x9,%edx
call   1050 <graph_join@plt>
mov    -0x18(%rbp),%rdi
mov    $0x9,%esi
mov    $0x64,%edx
call   1050 <graph_join@plt>
mov    -0x18(%rbp),%rdi
mov    $0x19,%esi
mov    $0x59,%edx
call   1050 <graph_join@plt>
mov    -0x18(%rbp),%rdi
mov    $0x64,%edx
mov    %edx,%esi
call   1050 <graph_join@plt>
mov    -0x18(%rbp),%rdi
call   1040 <graph_dump@plt>
mov    -0x18(%rbp),%rdi
call   1030 <graph_destroy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1060 <graph_new@plt>
test   %rax,%rax
je     11cc <main+0x8c>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0xc,%esi
mov    $0x22,%edx
call   1050 <graph_join@plt>
mov    %rbx,%rdi
mov    $0x22,%esi
mov    $0xc,%edx
call   1050 <graph_join@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
mov    $0x9,%edx
call   1050 <graph_join@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x64,%edx
call   1050 <graph_join@plt>
mov    %rbx,%rdi
mov    $0x19,%esi
mov    $0x59,%edx
call   1050 <graph_join@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    $0x64,%edx
call   1050 <graph_join@plt>
mov    %rbx,%rdi
call   1040 <graph_dump@plt>
mov    %rbx,%rdi
call   1030 <graph_destroy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.graph = type { i32 }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.graph*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call %struct.graph* (...) @graph_new()
store %struct.graph* %7, %struct.graph** %6
%8 = load %struct.graph*, %struct.graph** %6
%9 = icmp ne %struct.graph* %8, null
br i1 %9, label %10, label %27
10: ; preds = %2
%11 = load %struct.graph*, %struct.graph** %6
%12 = call i32 @graph_join(%struct.graph* %11, i32 12, i32 34)
%13 = load %struct.graph*, %struct.graph** %6
%14 = call i32 @graph_join(%struct.graph* %13, i32 34, i32 12)
%15 = load %struct.graph*, %struct.graph** %6
%16 = call i32 @graph_join(%struct.graph* %15, i32 11, i32 9)
%17 = load %struct.graph*, %struct.graph** %6
%18 = call i32 @graph_join(%struct.graph* %17, i32 9, i32 100)
%19 = load %struct.graph*, %struct.graph** %6
%20 = call i32 @graph_join(%struct.graph* %19, i32 25, i32 89)
%21 = load %struct.graph*, %struct.graph** %6
%22 = call i32 @graph_join(%struct.graph* %21, i32 100, i32 100)
%23 = load %struct.graph*, %struct.graph** %6
%24 = call i32 @graph_dump(%struct.graph* %23)
%25 = load %struct.graph*, %struct.graph** %6
%26 = call i32 @graph_destroy(%struct.graph* %25)
br label %27
27: ; preds = %10, %2
ret i32 0
}

LLVM IR (-O2):
%struct.graph = type { i32 }
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call %struct.graph* (...) @graph_new()
%4 = icmp eq %struct.graph* %3, null
br i1 %4, label %14, label %5
5: ; preds = %2
%6 = tail call i32 @graph_join(%struct.graph* %3, i32 12, i32 34)
%7 = tail call i32 @graph_join(%struct.graph* %3, i32 34, i32 12)
%8 = tail call i32 @graph_join(%struct.graph* %3, i32 11, i32 9)
%9 = tail call i32 @graph_join(%struct.graph* %3, i32 9, i32 100)
%10 = tail call i32 @graph_join(%struct.graph* %3, i32 25, i32 89)
%11 = tail call i32 @graph_join(%struct.graph* %3, i32 100, i32 100)
%12 = tail call i32 @graph_dump(%struct.graph* %3)
%13 = tail call i32 @graph_destroy(%struct.graph* %3)
br label %14
14: ; preds = %5, %2
ret i32 0
}