#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 PDQ_CreateNode(char *, int, int);
int PDQ_CreateOpen(char *, double);
int /*<<< orphan*/ PDQ_Init(char *);
int /*<<< orphan*/ PDQ_Report();
int /*<<< orphan*/ PDQ_SetDemand(char *, char *, double);
int /*<<< orphan*/ PDQ_Solve(int);
main() {
  int nodes;
  int streams;
  double arrivRate = 0.75;
  double servTime = 1.00;
  PDQ_Init("M/M/1 Test Cases");
  streams = PDQ_CreateOpen("work", arrivRate);
  nodes = PDQ_CreateNode("Standard", 4, 8);
  nodes = PDQ_CreateNode("Multinode", 1, 6);
  PDQ_SetDemand("Standard", "work", servTime);
  PDQ_SetDemand("Multinode", "work", servTime);
  PDQ_Solve(16);
  PDQ_Report();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe83(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xe87(%rip),%rdi
call   1080 <PDQ_Init@plt>
movsd  -0x10(%rbp),%xmm0
lea    0xe87(%rip),%rdi
call   1070 <PDQ_CreateOpen@plt>
mov    %eax,-0x8(%rbp)
lea    0xe7d(%rip),%rdi
mov    $0x4,%esi
mov    $0x8,%edx
call   1040 <PDQ_CreateNode@plt>
mov    %eax,-0x4(%rbp)
lea    0xe6d(%rip),%rdi
mov    $0x1,%esi
mov    $0x6,%edx
call   1040 <PDQ_CreateNode@plt>
mov    %eax,-0x4(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe46(%rip),%rdi
lea    0xe3a(%rip),%rsi
call   1050 <PDQ_SetDemand@plt>
movsd  -0x18(%rbp),%xmm0
lea    0xe37(%rip),%rdi
lea    0xe22(%rip),%rsi
call   1050 <PDQ_SetDemand@plt>
mov    $0x10,%edi
call   1060 <PDQ_Solve@plt>
mov    $0x0,%al
call   1030 <PDQ_Report@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xea4(%rip),%rdi
call   1080 <PDQ_Init@plt>
lea    0xea9(%rip),%r15
movsd  0xe80(%rip),%xmm0
mov    %r15,%rdi
call   1070 <PDQ_CreateOpen@plt>
lea    0xe97(%rip),%r14
mov    %r14,%rdi
mov    $0x4,%esi
mov    $0x8,%edx
call   1040 <PDQ_CreateNode@plt>
lea    0xe87(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0x6,%edx
call   1040 <PDQ_CreateNode@plt>
movsd  0xe46(%rip),%xmm0
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <PDQ_SetDemand@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
movsd  0xe2d(%rip),%xmm0
call   1050 <PDQ_SetDemand@plt>
mov    $0x10,%edi
call   1060 <PDQ_Solve@plt>
xor    %eax,%eax
call   1030 <PDQ_Report@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"M/M/1 Test Cases\00"
@.str.1 = [5 x i8] c"work\00"
@.str.2 = [9 x i8] c"Standard\00"
@.str.3 = [10 x i8] c"Multinode\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
store double 7.500000e-01, double* %3
store double 1.000000e+00, double* %4
%5 = call i32 @PDQ_Init(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = load double, double* %3
%7 = call i32 @PDQ_CreateOpen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %6)
store i32 %7, i32* %2
%8 = call i32 @PDQ_CreateNode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 8)
store i32 %8, i32* %1
%9 = call i32 @PDQ_CreateNode(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 6)
store i32 %9, i32* %1
%10 = load double, double* %4
%11 = call i32 @PDQ_SetDemand(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %10)
%12 = load double, double* %4
%13 = call i32 @PDQ_SetDemand(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %12)
%14 = call i32 @PDQ_Solve(i32 16)
%15 = call i32 (...) @PDQ_Report()
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"M/M/1 Test Cases\00"
@.str.1 = [5 x i8] c"work\00"
@.str.2 = [9 x i8] c"Standard\00"
@.str.3 = [10 x i8] c"Multinode\00"
define i32 @main() {
%1 = tail call i32 @PDQ_Init(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @PDQ_CreateOpen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double 7.500000e-01)
%3 = tail call i32 @PDQ_CreateNode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 8)
%4 = tail call i32 @PDQ_CreateNode(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 6)
%5 = tail call i32 @PDQ_SetDemand(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00)
%6 = tail call i32 @PDQ_SetDemand(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double 1.000000e+00)
%7 = tail call i32 @PDQ_Solve(i32 16)
%8 = tail call i32 (...) @PDQ_Report()
ret i32 0
}