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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ genhtml(struct aco *);
struct aco *readaco(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdin;
int main(void) {
  struct aco *aco1, *aco2;
  aco1 = readaco(stdin);
  aco2 = readaco(stdin);
  fprintf(stderr, "Generating HTML...\n");
  if (aco2)
    genhtml(aco2);
  else if (aco1)
    genhtml(aco1);
  else
    fprintf(stderr, "No data!");
  fprintf(stderr, "Done\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1030 <readaco@plt>
mov    %rax,-0x10(%rbp)
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1030 <readaco@plt>
mov    %rax,-0x18(%rbp)
mov    0x2e6e(%rip),%rax
mov    (%rax),%edi
lea    0xe8d(%rip),%rsi
call   1050 <fprintf@plt>
cmpq   $0x0,-0x18(%rbp)
je     1191 <main+0x61>
mov    -0x18(%rbp),%rdi
call   1040 <genhtml@plt>
jmp    11c4 <main+0x94>
cmpq   $0x0,-0x10(%rbp)
je     11aa <main+0x7a>
mov    -0x10(%rbp),%rdi
call   1040 <genhtml@plt>
jmp    11bf <main+0x8f>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
lea    0xe5a(%rip),%rsi
call   1050 <fprintf@plt>
jmp    11c4 <main+0x94>
mov    0x2e0d(%rip),%rax
mov    (%rax),%edi
lea    0xe49(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    0x2eac(%rip),%rbx
mov    (%rbx),%edi
call   1030 <readaco@plt>
mov    %rax,%r14
mov    (%rbx),%edi
call   1030 <readaco@plt>
mov    %rax,%rbx
mov    0x2e81(%rip),%r15
mov    (%r15),%edi
lea    0xe9f(%rip),%rsi
call   1050 <fprintf@plt>
test   %rbx,%rbx
je     1175 <main+0x45>
mov    %rbx,%rdi
call   1040 <genhtml@plt>
jmp    1193 <main+0x63>
test   %r14,%r14
je     1184 <main+0x54>
mov    %r14,%rdi
call   1040 <genhtml@plt>
jmp    1193 <main+0x63>
mov    (%r15),%edi
lea    0xe86(%rip),%rsi
call   1050 <fprintf@plt>
mov    (%r15),%edi
lea    0xe80(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.aco = type { i32 }
@stdin = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"Generating HTML...\0A\00"
@.str.1 = [9 x i8] c"No data!\00"
@.str.2 = [6 x i8] c"Done\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.aco*
%3 = alloca %struct.aco*
store i32 0, i32* %1
%4 = load i32, i32* @stdin
%5 = call %struct.aco* @readaco(i32 %4)
store %struct.aco* %5, %struct.aco** %2
%6 = load i32, i32* @stdin
%7 = call %struct.aco* @readaco(i32 %6)
store %struct.aco* %7, %struct.aco** %3
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%10 = load %struct.aco*, %struct.aco** %3
%11 = icmp ne %struct.aco* %10, null
br i1 %11, label %12, label %15
12: ; preds = %0
%13 = load %struct.aco*, %struct.aco** %3
%14 = call i32 @genhtml(%struct.aco* %13)
br label %25
15: ; preds = %0
%16 = load %struct.aco*, %struct.aco** %2
%17 = icmp ne %struct.aco* %16, null
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load %struct.aco*, %struct.aco** %2
%20 = call i32 @genhtml(%struct.aco* %19)
br label %24
21: ; preds = %15
%22 = load i32, i32* @stderr
%23 = call i32 @fprintf(i32 %22, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %21, %18
br label %25
25: ; preds = %24, %12
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.aco = type { i32 }
@stdin = global i32 0
@stderr = global i32 0
@.str = [20 x i8] c"Generating HTML...\0A\00"
@.str.1 = [9 x i8] c"No data!\00"
@.str.2 = [6 x i8] c"Done\0A\00"
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call %struct.aco* @readaco(i32 %1)
%3 = load i32, i32* @stdin
%4 = tail call %struct.aco* @readaco(i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq %struct.aco* %4, null
br i1 %7, label %10, label %8
8: ; preds = %0
%9 = tail call i32 @genhtml(%struct.aco* %4)
br label %17
10: ; preds = %0
%11 = icmp eq %struct.aco* %2, null
br i1 %11, label %14, label %12
12: ; preds = %10
%13 = tail call i32 @genhtml(%struct.aco* %2)
br label %17
14: ; preds = %10
%15 = load i32, i32* @stderr
%16 = tail call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %17
17: ; preds = %12, %14, %8
%18 = load i32, i32* @stderr
%19 = tail call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}