#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_CreateClosed(char *, int, double, double);
int PDQ_CreateNode(char *, int, int);
int /*<<< orphan*/ PDQ_Init(char *);
int /*<<< orphan*/ PDQ_Report();
int /*<<< orphan*/ PDQ_SetComment(char *);
int /*<<< orphan*/ PDQ_SetDemand(char *, char *, double);
int /*<<< orphan*/ PDQ_Solve(int);
int main() {
  int nodes;
  int streams;
  double pop = 100.0;
  double think = 300.0;
  double servt = 0.63;
  PDQ_Init("Time Share Computer");
  PDQ_SetComment("This is a M/M/1/N/N/FCFS queue.");
  streams = PDQ_CreateClosed("compile", 11, pop, think);
  nodes = PDQ_CreateNode("CPU", 4, 8);
  PDQ_SetDemand("CPU", "compile", servt);
  PDQ_Solve(14);
  PDQ_Report();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xe90(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe7b(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe66(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    0xe72(%rip),%rdi
call   1090 <PDQ_Init@plt>
lea    0xe7a(%rip),%rdi
call   1080 <PDQ_SetComment@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe84(%rip),%rdi
mov    $0xb,%esi
call   1070 <PDQ_CreateClosed@plt>
mov    %eax,-0x8(%rbp)
lea    0xe78(%rip),%rdi
mov    $0x4,%esi
mov    $0x8,%edx
call   1040 <PDQ_CreateNode@plt>
mov    %eax,-0x4(%rbp)
movsd  -0x20(%rbp),%xmm0
lea    0xe5a(%rip),%rdi
lea    0xe4b(%rip),%rsi
call   1050 <PDQ_SetDemand@plt>
mov    $0xe,%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   %r14
push   %rbx
push   %rax
lea    0xe9d(%rip),%rdi
call   1090 <PDQ_Init@plt>
lea    0xea5(%rip),%rdi
call   1080 <PDQ_SetComment@plt>
lea    0xeb9(%rip),%r14
movsd  0xe65(%rip),%xmm0
movsd  0xe65(%rip),%xmm1
mov    %r14,%rdi
mov    $0xb,%esi
call   1070 <PDQ_CreateClosed@plt>
lea    0xe9d(%rip),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
mov    $0x8,%edx
call   1040 <PDQ_CreateNode@plt>
movsd  0xe3f(%rip),%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <PDQ_SetDemand@plt>
mov    $0xe,%edi
call   1060 <PDQ_Solve@plt>
xor    %eax,%eax
call   1030 <PDQ_Report@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Time Share Computer\00"
@.str.1 = [32 x i8] c"This is a M/M/1/N/N/FCFS queue.\00"
@.str.2 = [8 x i8] c"compile\00"
@.str.3 = [4 x i8] c"CPU\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double 1.000000e+02, double* %3
store double 3.000000e+02, double* %4
store double 6.300000e-01, double* %5
%6 = call i32 @PDQ_Init(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @PDQ_SetComment(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @PDQ_CreateClosed(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 11, double %8, double %9)
store i32 %10, i32* %2
%11 = call i32 @PDQ_CreateNode(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 4, i32 8)
store i32 %11, i32* %1
%12 = load double, double* %5
%13 = call i32 @PDQ_SetDemand(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %12)
%14 = call i32 @PDQ_Solve(i32 14)
%15 = call i32 (...) @PDQ_Report()
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Time Share Computer\00"
@.str.1 = [32 x i8] c"This is a M/M/1/N/N/FCFS queue.\00"
@.str.2 = [8 x i8] c"compile\00"
@.str.3 = [4 x i8] c"CPU\00"
define i32 @main() {
%1 = tail call i32 @PDQ_Init(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @PDQ_SetComment(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @PDQ_CreateClosed(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 11, double 1.000000e+02, double 3.000000e+02)
%4 = tail call i32 @PDQ_CreateNode(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 4, i32 8)
%5 = tail call i32 @PDQ_SetDemand(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double 6.300000e-01)
%6 = tail call i32 @PDQ_Solve(i32 14)
%7 = tail call i32 (...) @PDQ_Report()
ret i32 0
}