#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*/ add_edge(int, int);
int /*<<< orphan*/ add_vertex(char);
int /*<<< orphan*/ topo();
int main(int argv, char *argc[]) {
  add_vertex('a');
  add_vertex('b');
  add_vertex('c');
  add_vertex('d');
  add_vertex('e');
  add_vertex('f');
  add_vertex('g');
  add_vertex('h');
  add_edge(0, 3);
  add_edge(0, 4);
  add_edge(1, 4);
  add_edge(2, 5);
  add_edge(3, 6);
  add_edge(4, 6);
  add_edge(5, 7);
  add_edge(6, 7);
  topo();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x61,%edi
call   1050 <add_vertex@plt>
mov    $0x62,%edi
call   1050 <add_vertex@plt>
mov    $0x63,%edi
call   1050 <add_vertex@plt>
mov    $0x64,%edi
call   1050 <add_vertex@plt>
mov    $0x65,%edi
call   1050 <add_vertex@plt>
mov    $0x66,%edi
call   1050 <add_vertex@plt>
mov    $0x67,%edi
call   1050 <add_vertex@plt>
mov    $0x68,%edi
call   1050 <add_vertex@plt>
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <add_edge@plt>
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <add_edge@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1030 <add_edge@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1030 <add_edge@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <add_edge@plt>
mov    $0x4,%edi
mov    $0x6,%esi
call   1030 <add_edge@plt>
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <add_edge@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1030 <add_edge@plt>
mov    $0x0,%al
call   1040 <topo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x61,%edi
call   1050 <add_vertex@plt>
mov    $0x62,%edi
call   1050 <add_vertex@plt>
mov    $0x63,%edi
call   1050 <add_vertex@plt>
mov    $0x64,%edi
call   1050 <add_vertex@plt>
mov    $0x65,%edi
call   1050 <add_vertex@plt>
mov    $0x66,%edi
call   1050 <add_vertex@plt>
mov    $0x67,%edi
call   1050 <add_vertex@plt>
mov    $0x68,%edi
call   1050 <add_vertex@plt>
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <add_edge@plt>
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <add_edge@plt>
mov    $0x1,%edi
mov    $0x4,%esi
call   1030 <add_edge@plt>
mov    $0x2,%edi
mov    $0x5,%esi
call   1030 <add_edge@plt>
mov    $0x3,%edi
mov    $0x6,%esi
call   1030 <add_edge@plt>
mov    $0x4,%edi
mov    $0x6,%esi
call   1030 <add_edge@plt>
mov    $0x5,%edi
mov    $0x7,%esi
call   1030 <add_edge@plt>
mov    $0x6,%edi
mov    $0x7,%esi
call   1030 <add_edge@plt>
xor    %eax,%eax
call   1040 <topo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @add_vertex(i8 signext 97)
%7 = call i32 @add_vertex(i8 signext 98)
%8 = call i32 @add_vertex(i8 signext 99)
%9 = call i32 @add_vertex(i8 signext 100)
%10 = call i32 @add_vertex(i8 signext 101)
%11 = call i32 @add_vertex(i8 signext 102)
%12 = call i32 @add_vertex(i8 signext 103)
%13 = call i32 @add_vertex(i8 signext 104)
%14 = call i32 @add_edge(i32 0, i32 3)
%15 = call i32 @add_edge(i32 0, i32 4)
%16 = call i32 @add_edge(i32 1, i32 4)
%17 = call i32 @add_edge(i32 2, i32 5)
%18 = call i32 @add_edge(i32 3, i32 6)
%19 = call i32 @add_edge(i32 4, i32 6)
%20 = call i32 @add_edge(i32 5, i32 7)
%21 = call i32 @add_edge(i32 6, i32 7)
%22 = call i32 (...) @topo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @add_vertex(i8 signext 97)
%4 = tail call i32 @add_vertex(i8 signext 98)
%5 = tail call i32 @add_vertex(i8 signext 99)
%6 = tail call i32 @add_vertex(i8 signext 100)
%7 = tail call i32 @add_vertex(i8 signext 101)
%8 = tail call i32 @add_vertex(i8 signext 102)
%9 = tail call i32 @add_vertex(i8 signext 103)
%10 = tail call i32 @add_vertex(i8 signext 104)
%11 = tail call i32 @add_edge(i32 0, i32 3)
%12 = tail call i32 @add_edge(i32 0, i32 4)
%13 = tail call i32 @add_edge(i32 1, i32 4)
%14 = tail call i32 @add_edge(i32 2, i32 5)
%15 = tail call i32 @add_edge(i32 3, i32 6)
%16 = tail call i32 @add_edge(i32 4, i32 6)
%17 = tail call i32 @add_edge(i32 5, i32 7)
%18 = tail call i32 @add_edge(i32 6, i32 7)
%19 = tail call i32 (...) @topo()
ret i32 0
}