#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ check_graph(int, int **, int);
int /*<<< orphan*/ min_dom_set(int /*<<< orphan*/, int *, int *, int *, int *,
                               int *, int *, int *, int, int, int **);
int /*<<< orphan*/ print_dom_set(int, int, int *);
int /*<<< orphan*/ print_graph(int, int **);
int /*<<< orphan*/ printf(char *, char *);
scalar_t__ read_graph(int *, int **, int);
int main(int argc, char *argv[]) {
  if (argc != 1) {
    printf("USAGE:\t%s", argv[0]);
    return EXIT_FAILURE;
  }
  int vertex_count;
  int G[512][512];
  int n_dominated;
  int num_choice[512];
  int num_dom[512];
  int size;
  int dom[512];
  int min_size;
  int min_dom[512];
  int graph_num = 1;
  int i, j, deg_i, max_deg;
  while (read_graph(&vertex_count, G, graph_num)) {
    check_graph(vertex_count, G, graph_num);
    print_graph(vertex_count, G);
    min_dom_set(0, &n_dominated, num_choice, num_dom, &size, dom, &min_size,
                min_dom, vertex_count, max_deg, G);
    print_dom_set(min_size, vertex_count, min_dom);
    graph_num++;
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x102090,%rsp
movl   $0x0,-0x14(%rbp)
mov    %edi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
cmpl   $0x1,-0x18(%rbp)
je     11aa <main+0x4a>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
lea    0xe6c(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e40(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
jmp    128f <main+0x12f>
movl   $0x1,-0x102064(%rbp)
lea    -0x100030(%rbp),%rsi
mov    -0x102064(%rbp),%edx
lea    -0x24(%rbp),%rdi
call   1070 <read_graph@plt>
cmp    $0x0,%rax
je     1283 <main+0x123>
mov    -0x24(%rbp),%edi
lea    -0x100030(%rbp),%rsi
mov    -0x102064(%rbp),%edx
call   1040 <check_graph@plt>
mov    -0x24(%rbp),%edi
lea    -0x100030(%rbp),%rsi
call   1030 <print_graph@plt>
lea    -0x100840(%rbp),%rdx
lea    -0x101040(%rbp),%rcx
lea    -0x101850(%rbp),%r9
lea    -0x102060(%rbp),%rbx
mov    -0x24(%rbp),%r11d
mov    -0x102074(%rbp),%r10d
lea    -0x100030(%rbp),%rax
xor    %edi,%edi
lea    -0x100034(%rbp),%rsi
lea    -0x101044(%rbp),%r8
lea    -0x101854(%rbp),%r14
mov    %r14,(%rsp)
mov    %rbx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %rax,0x20(%rsp)
call   1060 <min_dom_set@plt>
mov    -0x101854(%rbp),%edi
mov    -0x24(%rbp),%esi
lea    -0x102060(%rbp),%rdx
call   1080 <print_dom_set@plt>
mov    -0x102064(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x102064(%rbp)
jmp    11b4 <main+0x54>
mov    0x2d4e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x102090,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x102048,%rsp
cmp    $0x1,%edi
jne    1245 <main+0xe5>
lea    0x30(%rsp),%rdi
lea    0x2040(%rsp),%rbx
mov    $0x1,%ebp
mov    %rbx,%rsi
mov    $0x1,%edx
call   1070 <read_graph@plt>
test   %rax,%rax
je     123c <main+0xdc>
lea    0x40(%rsp),%r14
lea    0x38(%rsp),%r15
lea    0x840(%rsp),%r12
lea    0x30(%rsp),%r13
nopl   0x0(%rax)
mov    0x30(%rsp),%edi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <check_graph@plt>
mov    0x30(%rsp),%edi
mov    %rbx,%rsi
call   1030 <print_graph@plt>
mov    0x30(%rsp),%eax
mov    %rbx,0x20(%rsp)
mov    %eax,0x10(%rsp)
mov    %r14,0x8(%rsp)
lea    0x34(%rsp),%rax
mov    %rax,(%rsp)
xor    %edi,%edi
lea    0x3c(%rsp),%rsi
lea    0x1840(%rsp),%rdx
lea    0x1040(%rsp),%rcx
mov    %r15,%r8
mov    %r12,%r9
call   1060 <min_dom_set@plt>
mov    0x34(%rsp),%edi
mov    0x30(%rsp),%esi
mov    %r14,%rdx
call   1080 <print_dom_set@plt>
add    $0x1,%ebp
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1070 <read_graph@plt>
test   %rax,%rax
jne    11c0 <main+0x60>
mov    0x2d95(%rip),%rax
jmp    125b <main+0xfb>
mov    (%rsi),%rsi
lea    0xdb1(%rip),%rdi
call   1050 <printf@plt>
mov    0x2d85(%rip),%rax
mov    (%rax),%eax
add    $0x102048,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"USAGE:\09%s\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [512 x [512 x i32]]
%8 = alloca i32
%9 = alloca [512 x i32]
%10 = alloca [512 x i32]
%11 = alloca i32
%12 = alloca [512 x i32]
%13 = alloca i32
%14 = alloca [512 x i32]
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%20 = load i32, i32* %4
%21 = icmp ne i32 %20, 1
br i1 %21, label %22, label %28
22: ; preds = %2
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 0
%25 = load i8*, i8** %24
%26 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %25)
%27 = load i32, i32* @EXIT_FAILURE
store i32 %27, i32* %3
br label %62
28: ; preds = %2
store i32 1, i32* %15
br label %29
29: ; preds = %35, %28
%30 = getelementptr inbounds [512 x [512 x i32]], [512 x [512 x i32]]* %7, i64 0, i64 0
%31 = bitcast [512 x i32]* %30 to i32**
%32 = load i32, i32* %15
%33 = call i64 @read_graph(i32* %6, i32** %31, i32 %32)
%34 = icmp ne i64 %33, 0
br i1 %34, label %35, label %60
35: ; preds = %29
%36 = load i32, i32* %6
%37 = getelementptr inbounds [512 x [512 x i32]], [512 x [512 x i32]]* %7, i64 0, i64 0
%38 = bitcast [512 x i32]* %37 to i32**
%39 = load i32, i32* %15
%40 = call i32 @check_graph(i32 %36, i32** %38, i32 %39)
%41 = load i32, i32* %6
%42 = getelementptr inbounds [512 x [512 x i32]], [512 x [512 x i32]]* %7, i64 0, i64 0
%43 = bitcast [512 x i32]* %42 to i32**
%44 = call i32 @print_graph(i32 %41, i32** %43)
%45 = getelementptr inbounds [512 x i32], [512 x i32]* %9, i64 0, i64 0
%46 = getelementptr inbounds [512 x i32], [512 x i32]* %10, i64 0, i64 0
%47 = getelementptr inbounds [512 x i32], [512 x i32]* %12, i64 0, i64 0
%48 = getelementptr inbounds [512 x i32], [512 x i32]* %14, i64 0, i64 0
%49 = load i32, i32* %6
%50 = load i32, i32* %19
%51 = getelementptr inbounds [512 x [512 x i32]], [512 x [512 x i32]]* %7, i64 0, i64 0
%52 = bitcast [512 x i32]* %51 to i32**
%53 = call i32 @min_dom_set(i32 0, i32* %8, i32* %45, i32* %46, i32* %11, i32* %47, i32* %13, i32* %48, i32 %49, i32 %50, i32** %52)
%54 = load i32, i32* %13
%55 = load i32, i32* %6
%56 = getelementptr inbounds [512 x i32], [512 x i32]* %14, i64 0, i64 0
%57 = call i32 @print_dom_set(i32 %54, i32 %55, i32* %56)
%58 = load i32, i32* %15
%59 = add nsw i32 %58, 1
store i32 %59, i32* %15
br label %29
60: ; preds = %29
%61 = load i32, i32* @EXIT_SUCCESS
store i32 %61, i32* %3
br label %62
62: ; preds = %60, %22
%63 = load i32, i32* %3
ret i32 %63
}

LLVM IR (-O2):
@.str = [10 x i8] c"USAGE:\09%s\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca [512 x [512 x i32]]
%5 = alloca i32
%6 = alloca [512 x i32]
%7 = alloca [512 x i32]
%8 = alloca i32
%9 = alloca [512 x i32]
%10 = alloca i32
%11 = alloca [512 x i32]
%12 = icmp eq i32 %0, 1
br i1 %12, label %17, label %13
13: ; preds = %2
%14 = load i8*, i8** %1
%15 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i32, i32* @EXIT_FAILURE
br label %51
17: ; preds = %2
%18 = bitcast i32* %3 to i8*
%19 = bitcast [512 x [512 x i32]]* %4 to i8*
%20 = bitcast i32* %5 to i8*
%21 = bitcast [512 x i32]* %6 to i8*
%22 = bitcast [512 x i32]* %7 to i8*
%23 = bitcast i32* %8 to i8*
%24 = bitcast [512 x i32]* %9 to i8*
%25 = bitcast i32* %10 to i8*
%26 = bitcast [512 x i32]* %11 to i8*
%27 = bitcast [512 x [512 x i32]]* %4 to i32**
%28 = call i64 @read_graph(i32* %3, i32** %27, i32 1)
%29 = icmp eq i64 %28, 0
br i1 %29, label %49, label %30
30: ; preds = %17
%31 = getelementptr inbounds [512 x i32], [512 x i32]* %6, i64 0, i64 0
%32 = getelementptr inbounds [512 x i32], [512 x i32]* %7, i64 0, i64 0
%33 = getelementptr inbounds [512 x i32], [512 x i32]* %9, i64 0, i64 0
%34 = getelementptr inbounds [512 x i32], [512 x i32]* %11, i64 0, i64 0
br label %35
35: ; preds = %30, %35
%36 = phi i32 [ 1, %30 ], [ %46, %35 ]
%37 = load i32, i32* %3
%38 = call i32 @check_graph(i32 %37, i32** %27, i32 %36)
%39 = load i32, i32* %3
%40 = call i32 @print_graph(i32 %39, i32** %27)
%41 = load i32, i32* %3
%42 = call i32 @min_dom_set(i32 0, i32* %5, i32* %31, i32* %32, i32* %8, i32* %33, i32* %10, i32* %34, i32 %41, i32 undef, i32** %27)
%43 = load i32, i32* %10
%44 = load i32, i32* %3
%45 = call i32 @print_dom_set(i32 %43, i32 %44, i32* %34)
%46 = add nuw nsw i32 %36, 1
%47 = call i64 @read_graph(i32* %3, i32** %27, i32 %46)
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %35
49: ; preds = %35, %17
%50 = load i32, i32* @EXIT_SUCCESS
br label %51
51: ; preds = %49, %13
%52 = phi i32 [ %16, %13 ], [ %50, %49 ]
ret i32 %52
}