#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*/ MHD_websocket_srand(unsigned long);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int);
int /*<<< orphan*/ stderr;
scalar_t__ test_accept();
scalar_t__ test_decodes();
scalar_t__ test_encodes_binary();
scalar_t__ test_encodes_close();
scalar_t__ test_encodes_ping();
scalar_t__ test_encodes_pong();
scalar_t__ test_encodes_text();
scalar_t__ test_inits();
scalar_t__ test_split_close_reason();
scalar_t__ time(int /*<<< orphan*/ *);
int main(int argc, char *const *argv) {
  unsigned int errorCount = 0;
  (void)argc;
  (void)argv;
  MHD_websocket_srand((unsigned long)time(NULL));
  errorCount += test_inits();
  errorCount += test_accept();
  errorCount += test_decodes();
  errorCount += test_encodes_text();
  errorCount += test_encodes_binary();
  errorCount += test_encodes_close();
  errorCount += test_encodes_ping();
  errorCount += test_encodes_pong();
  errorCount += test_split_close_reason();
  if (errorCount != 0)
    fprintf(stderr, "Error (code: %u)\n", errorCount);
  return errorCount != 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)
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10b0 <time@plt>
mov    %rax,%rdi
call   1090 <MHD_websocket_srand@plt>
mov    $0x0,%al
call   10d0 <test_inits@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1080 <test_accept@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <test_decodes@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <test_encodes_text@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <test_encodes_binary@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10c0 <test_encodes_close@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <test_encodes_ping@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10e0 <test_encodes_pong@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1070 <test_split_close_reason@plt>
mov    %rax,%rcx
mov    -0x14(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     12bb <main+0xfb>
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
lea    0xd4a(%rip),%rsi
call   10a0 <fprintf@plt>
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
xor    %edi,%edi
call   10b0 <time@plt>
mov    %rax,%rdi
call   1090 <MHD_websocket_srand@plt>
xor    %eax,%eax
call   10d0 <test_inits@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1080 <test_accept@plt>
mov    %rax,%r15
add    %r14d,%r15d
xor    %eax,%eax
call   1060 <test_decodes@plt>
mov    %rax,%rbx
add    %r15d,%ebx
xor    %eax,%eax
call   1030 <test_encodes_text@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1040 <test_encodes_binary@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   10c0 <test_encodes_close@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1050 <test_encodes_ping@plt>
mov    %rax,%rbx
add    %r14d,%ebx
xor    %eax,%eax
call   10e0 <test_encodes_pong@plt>
mov    %rax,%r14
add    %ebx,%r14d
xor    %eax,%eax
call   1070 <test_split_close_reason@plt>
mov    %rax,%rbx
add    %r14d,%ebx
je     125f <main+0x9f>
mov    0x2d91(%rip),%rax
mov    (%rax),%edi
lea    0xda8(%rip),%rsi
mov    %ebx,%edx
call   10a0 <fprintf@plt>
xor    %eax,%eax
test   %ebx,%ebx
setne  %al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"Error (code: %u)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = call i64 @time(i32* null)
%10 = call i32 @MHD_websocket_srand(i64 %9)
%11 = call i64 (...) @test_inits()
%12 = load i32, i32* %6
%13 = zext i32 %12 to i64
%14 = add nsw i64 %13, %11
%15 = trunc i64 %14 to i32
store i32 %15, i32* %6
%16 = call i64 (...) @test_accept()
%17 = load i32, i32* %6
%18 = zext i32 %17 to i64
%19 = add nsw i64 %18, %16
%20 = trunc i64 %19 to i32
store i32 %20, i32* %6
%21 = call i64 (...) @test_decodes()
%22 = load i32, i32* %6
%23 = zext i32 %22 to i64
%24 = add nsw i64 %23, %21
%25 = trunc i64 %24 to i32
store i32 %25, i32* %6
%26 = call i64 (...) @test_encodes_text()
%27 = load i32, i32* %6
%28 = zext i32 %27 to i64
%29 = add nsw i64 %28, %26
%30 = trunc i64 %29 to i32
store i32 %30, i32* %6
%31 = call i64 (...) @test_encodes_binary()
%32 = load i32, i32* %6
%33 = zext i32 %32 to i64
%34 = add nsw i64 %33, %31
%35 = trunc i64 %34 to i32
store i32 %35, i32* %6
%36 = call i64 (...) @test_encodes_close()
%37 = load i32, i32* %6
%38 = zext i32 %37 to i64
%39 = add nsw i64 %38, %36
%40 = trunc i64 %39 to i32
store i32 %40, i32* %6
%41 = call i64 (...) @test_encodes_ping()
%42 = load i32, i32* %6
%43 = zext i32 %42 to i64
%44 = add nsw i64 %43, %41
%45 = trunc i64 %44 to i32
store i32 %45, i32* %6
%46 = call i64 (...) @test_encodes_pong()
%47 = load i32, i32* %6
%48 = zext i32 %47 to i64
%49 = add nsw i64 %48, %46
%50 = trunc i64 %49 to i32
store i32 %50, i32* %6
%51 = call i64 (...) @test_split_close_reason()
%52 = load i32, i32* %6
%53 = zext i32 %52 to i64
%54 = add nsw i64 %53, %51
%55 = trunc i64 %54 to i32
store i32 %55, i32* %6
%56 = load i32, i32* %6
%57 = icmp ne i32 %56, 0
br i1 %57, label %58, label %62
58: ; preds = %2
%59 = load i32, i32* @stderr
%60 = load i32, i32* %6
%61 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %60)
br label %62
62: ; preds = %58, %2
%63 = load i32, i32* %6
%64 = icmp ne i32 %63, 0
%65 = zext i1 %64 to i32
ret i32 %65
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"Error (code: %u)\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @time(i32* null)
%4 = tail call i32 @MHD_websocket_srand(i64 %3)
%5 = tail call i64 (...) @test_inits()
%6 = tail call i64 (...) @test_accept()
%7 = add i64 %6, %5
%8 = tail call i64 (...) @test_decodes()
%9 = add i64 %7, %8
%10 = tail call i64 (...) @test_encodes_text()
%11 = add i64 %9, %10
%12 = tail call i64 (...) @test_encodes_binary()
%13 = add i64 %11, %12
%14 = tail call i64 (...) @test_encodes_close()
%15 = add i64 %13, %14
%16 = tail call i64 (...) @test_encodes_ping()
%17 = add i64 %15, %16
%18 = tail call i64 (...) @test_encodes_pong()
%19 = add i64 %17, %18
%20 = tail call i64 (...) @test_split_close_reason()
%21 = add i64 %19, %20
%22 = trunc i64 %21 to i32
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %27
24: ; preds = %2
%25 = load i32, i32* @stderr
%26 = tail call i32 @fprintf(i32 %25, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %22)
br label %27
27: ; preds = %24, %2
%28 = zext i1 %23 to i32
ret i32 %28
}