
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <ctime>
//#include <math.h>
#include <cmath>
#include <vector>
#include <iostream>

using namespace std;

// Agent structure with all properties
struct agent {
	float infectionProb;			// [0.02, 0.03]
	float externalInfectionProb;	// [0.02, 0.03]
	float mortalityProb;			// [0.007, 0.07]
	float mobilityProb;				// [0.3, 0.5]
	float shortMobilityProb;		// [0.7, 0.9]
	int incubationTime;				// [5, 6]
	int recoveryTime;				// 14
	int infectionStatus;			// Non infected (0), infected (1), quarantine (-1), deseaced (-2), cured (2)
	float x;						// [0, p]
	float y;						// [0, q]
};

// Simulation parameters
const int numberOfAgents = 1024;
const int maxSimulationDays = 30;
const int maxMovementsPerDay = 10;
const float maximumRadiusForLocalMovements = 5;
const float infectionLimitDistance = 1;
const float p = 500;
const float q = 500;

int allInfectionsCounter = 0;
int infectionsPerDay = 0;
int infectionHistory[maxSimulationDays];
int allRecoveryCounter = 0;
int recoveryPerDay = 0;
int recoveryHistory[maxSimulationDays];
int allFatalCounter = 0;
int fatalPerDay = 0;
int fatalHistory[maxSimulationDays];

// Function to generate a random float between a range
float generateRandom(float a, float b) {
	float r = a + static_cast <float> (rand()) / (static_cast <float> (RAND_MAX / (b - a)));
	return r;
}

// Function to move a short distance an agent
float shortMovement(float pos) {
	float newPos = (2 * generateRandom(0.0, 1.0) - 1) * maximumRadiusForLocalMovements + pos;
	if (newPos > 500)
		newPos = 500;
	if (newPos < 0)
		newPos = 0;
	return newPos;
}

// Function to move a long distance in X an agent
float longXMovement(float pos) {
	float newPos = p * generateRandom(-1.0, 1.0) + pos;
	if (newPos > 500)
		newPos = 500;
	if (newPos < 0)
		newPos = 0;
	return newPos;
}

// Function to move a long distance in Y an agent
float longYMovement(float pos) {
	float newPos = q * generateRandom(-1.0, 1.0) + pos;
	if (newPos > 500)
		newPos = 500;
	if (newPos < 0)
		newPos = 0;
	return newPos;
}

// Test function to initalize infected agents
void initializeInfectedAgents(agent allAgents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		allAgents[i].infectionProb = generateRandom(0.02, 0.03);
		allAgents[i].externalInfectionProb = generateRandom(0.02, 0.03);
		allAgents[i].mortalityProb = generateRandom(0.007, 0.07);
		allAgents[i].mobilityProb = generateRandom(0.3, 0.5);
		allAgents[i].shortMobilityProb = generateRandom(0.7, 0.9);
		allAgents[i].incubationTime = rand() % 2 + 5;
		allAgents[i].recoveryTime = 14;
		allAgents[i].infectionStatus = rand() % 2;
		allAgents[i].x = rand() % (int)p + 1;
		allAgents[i].y = rand() % (int)q + 1;
	}
}

// Function to initialize all agent properties
void initializeAgents(agent allAgents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		allAgents[i].infectionProb = generateRandom(0.02, 0.03);
		allAgents[i].externalInfectionProb = generateRandom(0.02, 0.03);
		allAgents[i].mortalityProb = generateRandom(0.007, 0.07);
		allAgents[i].mobilityProb = generateRandom(0.3, 0.5);
		allAgents[i].shortMobilityProb = generateRandom(0.7, 0.9);
		allAgents[i].incubationTime = rand() % 2 + 5;
		allAgents[i].recoveryTime = 14;
		allAgents[i].infectionStatus = 0;
		allAgents[i].x = rand() % (int)p + 1;
		allAgents[i].y = rand() % (int)q + 1;
	}
}

// Function to show all agents properties
void showAgents(agent allAgents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		printf("Agent's no. %d probability of infection: %f\n", i + 1, allAgents[i].infectionProb);
		printf("Agent's no. %d external probability of infection: %f\n", i + 1, allAgents[i].externalInfectionProb);
		printf("Agent's no. %d probability of mortality: %f\n", i + 1, allAgents[i].mortalityProb);
		printf("Agent's no. %d probability of mobility: %f\n", i + 1, allAgents[i].mobilityProb);
		printf("Agent's no. %d probability of short mobility: %f\n", i + 1, allAgents[i].shortMobilityProb);
		printf("Agent's no. %d incubation time: %d\n", i + 1, allAgents[i].incubationTime);
		printf("Agent's no. %d recovery time: %d\n", i + 1, allAgents[i].recoveryTime);
		printf("Agent's no. %d infection status: %d\n", i + 1, allAgents[i].infectionStatus);
		printf("Agent's no. %d x position: %f\n", i + 1, allAgents[i].x);
		printf("Agent's no. %d y position: %f\n\n", i + 1, allAgents[i].y);
	}
}
// Rule 1: Infection
void ruleOne(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		for (int j = 0; j < numberOfAgents; j++) {
			double distance = sqrt(pow(agents[i].x - agents[j].x, 2.0) + pow(agents[i].y - agents[j].y, 2.0));
			if (distance <= 1.0 && agents[j].infectionStatus == 1 && agents[i].infectionStatus == 0 && i != j) {
				float infection = generateRandom(0.0, 1.0);
				if (infection <= agents[i].infectionProb) {
					agents[i].infectionStatus = 1;
					allInfectionsCounter++;
					infectionsPerDay++;
				}
			}
		}
	}
}

// Rule 2: Mobility
void ruleTwo(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		float movProb = generateRandom(0.0, 1.0);
		if (movProb <= agents[i].mobilityProb && (agents[i].infectionStatus == 0 || agents[i].infectionStatus == 1)) {
			float shortMovProb = generateRandom(0.0, 1.0);
			float newXPos, newYPos;
			if (shortMovProb <= agents[i].shortMobilityProb) {
				newXPos = shortMovement(agents[i].x);
				newYPos = shortMovement(agents[i].y);
				agents[i].x = newXPos;
				agents[i].y = newYPos;
			}
			else {
				newXPos = longXMovement(agents[i].x);
				newYPos = longYMovement(agents[i].y);
				agents[i].x = newXPos;
				agents[i].y = newYPos;
			}
		}
	}
}

// Rule 3: External infection
void ruleThree(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		float infectionExternal = generateRandom(0.0, 1.0);
		if (infectionExternal <= agents[i].externalInfectionProb && agents[i].infectionStatus == 0) {
			agents[i].infectionStatus = 1;
			allInfectionsCounter++;
			infectionsPerDay++;
		}
	}
}

// Rule 4: Incucation time, symptoms, quarantine and recovery time
void ruleFour(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		if (agents[i].infectionStatus == -1 && agents[i].recoveryTime > 0) {
			agents[i].recoveryTime = agents[i].recoveryTime - 1;
		}
		if (agents[i].infectionStatus == 1 && agents[i].incubationTime > 0) {
			agents[i].incubationTime = agents[i].incubationTime - 1;
		}
		if (agents[i].infectionStatus == 1 && agents[i].incubationTime == 0) {
			agents[i].infectionStatus = -1;
		}
		if (agents[i].infectionStatus == -1 && agents[i].recoveryTime == 0) {
			agents[i].infectionStatus = 2;
			allRecoveryCounter++;
			recoveryPerDay++;
		}
	}
}

// Rule 5: Fatal cases
void ruleFive(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		float fatal = generateRandom(0.0, 1.0);
		if (fatal <= agents[i].mortalityProb && agents[i].infectionStatus == -1) {
			agents[i].infectionStatus = -2;
			allFatalCounter++;
			fatalPerDay++;
		}
	}
}

int main() {
	/*
	*************************************************************
	******************** Initalization phase ********************
	*************************************************************
	*/
	clock_t start_CPU = clock();
	srand((int)time(0));
	agent* allAgents;
	allAgents = (agent*)malloc(numberOfAgents * sizeof(agent));
	initializeAgents(allAgents);

	printf("---------------------Simulation parameters---------------------\n");
	printf("\nNumber of agents: %d\n", numberOfAgents);
	printf("Simulation days: %d\n", maxSimulationDays);
	printf("Max movements per day: %d\n", maxMovementsPerDay);
	printf("Maximum radius for local movements: %f\n", maximumRadiusForLocalMovements);
	printf("Infection limit distance: %f\n", infectionLimitDistance);
	printf("P: %f\n", p);
	printf("Q: %f\n", q);
	printf("\n--------------------Initializing simulation--------------------\n");

	/*
	*************************************************************
	********************** Operation phase **********************
	*************************************************************
	*/

	for (int day = 0; day < maxSimulationDays; day++) {
		for (int mov = 0; mov < maxMovementsPerDay; mov++) {
			ruleOne(allAgents);
			ruleTwo(allAgents);
		}
		ruleThree(allAgents);
		ruleFour(allAgents);
		ruleFive(allAgents);
		infectionHistory[day] = infectionsPerDay;
		recoveryHistory[day] = recoveryPerDay;
		fatalHistory[day] = fatalPerDay;
		infectionsPerDay = 0;
		recoveryPerDay = 0;
		fatalPerDay = 0;
	}

	/*
	*************************************************************
	************************ Show results ***********************
	*************************************************************
	*/
	printf("\n---------------------Simulation terminated---------------------\n");

	int zeroDayInfected = 0, halfPopulationInfected = 0, allPopulationInfected = 0;
	int zeroDayRecovered = 0, halfAgentsRecovered = 0, allAgentsRecovered = 0;
	int zeroDayFatal = 0, halfAgentsFatal = 0, allAgentsFatal = 0;
	int halfPopulationInfectedDay = 0, allPopulationInfectedDay = 0;
	int halfAgentsRecoveredDay = 0, allAgentsRecoveredDay = 0;
	int halfAgentsFatalDay = 0, allAgentsFatalDay = 0;
	bool zeroDayInfectedFlag = false, halfPopulationInfectedFlag = false;
	bool zeroDayRecoveredFlag = false, halfAgentsRecoveredFlag = false;
	bool zeroDayFatalFlag = false, halfAgentsFatalFlag = false;

	printf("\nTotal infected cases: %d\n", allInfectionsCounter);
	printf("Infection history: ");
	for (int i = 0; i < maxSimulationDays; i++) {
		printf("%d ", infectionHistory[i]);
		halfPopulationInfected += infectionHistory[i];
		allPopulationInfected += infectionHistory[i];
		if (infectionHistory[i] > 0 && !zeroDayInfectedFlag) {
			zeroDayInfected = i + 1;
			zeroDayInfectedFlag = true;
		}
		if (halfPopulationInfected >= (numberOfAgents / 2) && !halfPopulationInfectedFlag) {
			halfPopulationInfectedDay = i + 1;
			halfPopulationInfectedFlag = true;
		}
		if (allPopulationInfected == numberOfAgents)
			allPopulationInfectedDay = i + 1;
	}
	printf("\nZero day infection case: %d\n", zeroDayInfected);
	printf("Half population infected day: %d\n", halfPopulationInfectedDay);
	printf("All population infected day: %d\n", allPopulationInfectedDay);

	printf("\nTotal recovery cases: %d\n", allRecoveryCounter);
	printf("Recovery history: ");
	for (int i = 0; i < maxSimulationDays; i++) {
		printf("%d ", recoveryHistory[i]);
		halfAgentsRecovered += recoveryHistory[i];
		allAgentsRecovered += recoveryHistory[i];
		if (recoveryHistory[i] > 0 && !zeroDayRecoveredFlag) {
			zeroDayRecovered = i + 1;
			zeroDayRecoveredFlag = true;
		}
		if (halfAgentsRecovered >= (allRecoveryCounter / 2) && !halfAgentsRecoveredFlag) {
			halfAgentsRecoveredDay = i + 1;
			halfAgentsRecoveredFlag = true;
		}
		if (allAgentsRecovered == allRecoveryCounter)
			allAgentsRecoveredDay = i + 1;
	}
	printf("\nZero day recovery case: %d\n", zeroDayRecovered);
	printf("Half agents recovered day: %d\n", halfAgentsRecoveredDay);
	printf("All agents recovered day: %d\n", allAgentsRecoveredDay);

	printf("\nTotal fatal cases: %d\n", allFatalCounter);
	printf("Fatal history: ");
	for (int i = 0; i < maxSimulationDays; i++) {
		printf("%d ", fatalHistory[i]);
		halfAgentsFatal += fatalHistory[i];
		allAgentsFatal += fatalHistory[i];
		if (fatalHistory[i] > 0 && !zeroDayFatalFlag) {
			zeroDayFatal = i + 1;
			zeroDayFatalFlag = true;
		}
		if (halfAgentsFatal >= (allFatalCounter / 2) && !halfAgentsFatalFlag) {
			halfAgentsFatalDay = i + 1;
			halfAgentsFatalFlag = true;
		}
		if (allAgentsFatal == allFatalCounter)
			allAgentsFatalDay = i + 1;
	}
	printf("\nZero day fatal case: %d\n", zeroDayFatal);
	printf("Half agents fatal day: %d\n", halfAgentsFatalDay);
	printf("All agents fatal day: %d\n", allAgentsFatalDay);


	clock_t end_CPU = clock();
	float elapsedTime_CPU = end_CPU - start_CPU;
	printf("\nTime CPU: %f miliseconds. \n", elapsedTime_CPU);
	free(allAgents);
	return 0;
}
	.file	"tmpxft_00241594_00000000-6_CPU.cudafe1.cpp"
	.text
#APP
	.globl _ZSt21ios_base_library_initv

#NO_APP
	.type	_ZL26__cudaUnregisterBinaryUtilv, @function
_ZL26__cudaUnregisterBinaryUtilv:
.LFB4013:
	.cfi_startproc
	endbr64
	movq	_ZL20__cudaFatCubinHandle(%rip), %rdi
	jmp	__cudaUnregisterFatBinary@PLT
	.cfi_endproc
.LFE4013:
	.size	_ZL26__cudaUnregisterBinaryUtilv, .-_ZL26__cudaUnregisterBinaryUtilv
	.globl	_Z14generateRandomff
	.type	_Z14generateRandomff, @function
_Z14generateRandomff:
.LFB3998:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movss	%xmm0, 12(%rsp)
	movss	%xmm1, 8(%rsp)
	call	rand@PLT
	movss	12(%rsp), %xmm2
	movss	8(%rsp), %xmm1
	movss	.LC0(%rip), %xmm3
	cvtsi2ssl	%eax, %xmm0
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	subss	%xmm2, %xmm1
	divss	%xmm1, %xmm3
	divss	%xmm3, %xmm0
	addss	%xmm2, %xmm0
	ret
	.cfi_endproc
.LFE3998:
	.size	_Z14generateRandomff, .-_Z14generateRandomff
	.globl	_Z13shortMovementf
	.type	_Z13shortMovementf, @function
_Z13shortMovementf:
.LFB3999:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movss	.LC3(%rip), %xmm1
	movss	%xmm0, 12(%rsp)
	xorps	%xmm0, %xmm0
	call	_Z14generateRandomff
	addss	%xmm0, %xmm0
	subss	.LC3(%rip), %xmm0
	mulss	.LC4(%rip), %xmm0
	addss	12(%rsp), %xmm0
	comiss	.LC2(%rip), %xmm0
	ja	.L6
	xorps	%xmm1, %xmm1
	comiss	%xmm0, %xmm1
	jbe	.L4
	xorps	%xmm0, %xmm0
	jmp	.L4
.L6:
	movss	.LC2(%rip), %xmm0
.L4:
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE3999:
	.size	_Z13shortMovementf, .-_Z13shortMovementf
	.globl	_Z13longXMovementf
	.type	_Z13longXMovementf, @function
_Z13longXMovementf:
.LFB4000:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	movss	.LC3(%rip), %xmm1
	movss	%xmm0, 12(%rsp)
	movss	.LC5(%rip), %xmm0
	call	_Z14generateRandomff
	movss	.LC2(%rip), %xmm1
	mulss	%xmm1, %xmm0
	addss	12(%rsp), %xmm0
	comiss	%xmm1, %xmm0
	ja	.L12
	xorps	%xmm1, %xmm1
	comiss	%xmm0, %xmm1
	jbe	.L10
	xorps	%xmm0, %xmm0
	jmp	.L10
.L12:
	movaps	%xmm1, %xmm0
.L10:
	addq	$24, %rsp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4000:
	.size	_Z13longXMovementf, .-_Z13longXMovementf
	.globl	_Z13longYMovementf
	.type	_Z13longYMovementf, @function
_Z13longYMovementf:
.LFB4656:
	.cfi_startproc
	endbr64
	jmp	_Z13longXMovementf
	.cfi_endproc
.LFE4656:
	.size	_Z13longYMovementf, .-_Z13longYMovementf
	.globl	_Z24initializeInfectedAgentsP5agent
	.type	_Z24initializeInfectedAgentsP5agent, @function
_Z24initializeInfectedAgentsP5agent:
.LFB4002:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	40960(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
.L17:
	movss	.LC6(%rip), %xmm1
	movss	.LC7(%rip), %xmm0
	movl	$2, %ebp
	addq	$40, %rbx
	call	_Z14generateRandomff
	movss	.LC6(%rip), %xmm1
	movss	%xmm0, -40(%rbx)
	movss	.LC7(%rip), %xmm0
	call	_Z14generateRandomff
	movss	.LC8(%rip), %xmm1
	movss	%xmm0, -36(%rbx)
	movss	.LC9(%rip), %xmm0
	call	_Z14generateRandomff
	movss	.LC10(%rip), %xmm1
	movss	%xmm0, -32(%rbx)
	movss	.LC11(%rip), %xmm0
	call	_Z14generateRandomff
	movss	.LC12(%rip), %xmm1
	movss	%xmm0, -28(%rbx)
	movss	.LC13(%rip), %xmm0
	call	_Z14generateRandomff
	movss	%xmm0, -24(%rbx)
	call	rand@PLT
	movl	$14, -16(%rbx)
	cltd
	idivl	%ebp
	addl	$5, %edx
	movl	%edx, -20(%rbx)
	call	rand@PLT
	cltd
	idivl	%ebp
	movl	$500, %ebp
	movl	%edx, -12(%rbx)
	call	rand@PLT
	cltd
	idivl	%ebp
	incl	%edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, -8(%rbx)
	call	rand@PLT
	cltd
	idivl	%ebp
	incl	%edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, -4(%rbx)
	cmpq	%r12, %rbx
	jne	.L17
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4002:
	.size	_Z24initializeInfectedAgentsP5agent, .-_Z24initializeInfectedAgentsP5agent
	.globl	_Z16initializeAgentsP5agent
	.type	_Z16initializeAgentsP5agent, @function
_Z16initializeAgentsP5agent:
.LFB4003:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	40960(%rdi), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
.L21:
	movss	.LC6(%rip), %xmm1
	movss	.LC7(%rip), %xmm0
	movl	$500, %ebp
	addq	$40, %rbx
	call	_Z14generateRandomff
	movss	.LC6(%rip), %xmm1
	movss	%xmm0, -40(%rbx)
	movss	.LC7(%rip), %xmm0
	call	_Z14generateRandomff
	movss	.LC8(%rip), %xmm1
	movss	%xmm0, -36(%rbx)
	movss	.LC9(%rip), %xmm0
	call	_Z14generateRandomff
	movss	.LC10(%rip), %xmm1
	movss	%xmm0, -32(%rbx)
	movss	.LC11(%rip), %xmm0
	call	_Z14generateRandomff
	movss	.LC12(%rip), %xmm1
	movss	%xmm0, -28(%rbx)
	movss	.LC13(%rip), %xmm0
	call	_Z14generateRandomff
	movss	%xmm0, -24(%rbx)
	call	rand@PLT
	movl	$2, %ecx
	movl	$14, -16(%rbx)
	cltd
	idivl	%ecx
	xorl	%eax, %eax
	movl	%eax, -12(%rbx)
	addl	$5, %edx
	movl	%edx, -20(%rbx)
	call	rand@PLT
	cltd
	idivl	%ebp
	incl	%edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, -8(%rbx)
	call	rand@PLT
	cltd
	idivl	%ebp
	incl	%edx
	cvtsi2ssl	%edx, %xmm0
	movss	%xmm0, -4(%rbx)
	cmpq	%r12, %rbx
	jne	.L21
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4003:
	.size	_Z16initializeAgentsP5agent, .-_Z16initializeAgentsP5agent
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC14:
	.string	"Agent's no. %d probability of infection: %f\n"
.LC15:
	.string	"Agent's no. %d external probability of infection: %f\n"
.LC16:
	.string	"Agent's no. %d probability of mortality: %f\n"
.LC17:
	.string	"Agent's no. %d probability of mobility: %f\n"
.LC18:
	.string	"Agent's no. %d probability of short mobility: %f\n"
.LC19:
	.string	"Agent's no. %d incubation time: %d\n"
.LC20:
	.string	"Agent's no. %d recovery time: %d\n"
.LC21:
	.string	"Agent's no. %d infection status: %d\n"
.LC22:
	.string	"Agent's no. %d x position: %f\n"
.LC23:
	.string	"Agent's no. %d y position: %f\n\n"
	.text
	.globl	_Z10showAgentsP5agent
	.type	_Z10showAgentsP5agent, @function
_Z10showAgentsP5agent:
.LFB4004:
	.cfi_startproc
	endbr64
	pushq	%r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	leaq	.LC14(%rip), %r12
	pushq	%rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	xorl	%ebp, %ebp
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	movq	%rdi, %rbx
.L25:
	incl	%ebp
	movq	%r12, %rsi
	movl	$2, %edi
	movb	$1, %al
	movl	%ebp, %edx
	cvtss2sd	(%rbx), %xmm0
	addq	$40, %rbx
	call	__printf_chk@PLT
	movl	%ebp, %edx
	leaq	.LC15(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	-36(%rbx), %xmm0
	call	__printf_chk@PLT
	movl	%ebp, %edx
	leaq	.LC16(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	-32(%rbx), %xmm0
	call	__printf_chk@PLT
	movl	%ebp, %edx
	leaq	.LC17(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	-28(%rbx), %xmm0
	call	__printf_chk@PLT
	movl	%ebp, %edx
	leaq	.LC18(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	-24(%rbx), %xmm0
	call	__printf_chk@PLT
	movl	-20(%rbx), %ecx
	movl	%ebp, %edx
	movl	$2, %edi
	leaq	.LC19(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-16(%rbx), %ecx
	movl	%ebp, %edx
	movl	$2, %edi
	leaq	.LC20(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	-12(%rbx), %ecx
	movl	%ebp, %edx
	movl	$2, %edi
	leaq	.LC21(%rip), %rsi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%ebp, %edx
	leaq	.LC22(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	-8(%rbx), %xmm0
	call	__printf_chk@PLT
	movl	%ebp, %edx
	leaq	.LC23(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	cvtss2sd	-4(%rbx), %xmm0
	call	__printf_chk@PLT
	cmpl	$1024, %ebp
	jne	.L25
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%rbp
	.cfi_def_cfa_offset 16
	popq	%r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4004:
	.size	_Z10showAgentsP5agent, .-_Z10showAgentsP5agent
	.globl	_Z7ruleOneP5agent
	.type	_Z7ruleOneP5agent, @function
_Z7ruleOneP5agent:
.LFB4005:
	.cfi_startproc
	endbr64
	pushq	%r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	pushq	%r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	movq	%rdi, %r13
	pushq	%r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	xorl	%r12d, %r12d
	pushq	%rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
.L29:
	leaq	28(%rbp), %r14
	xorl	%ebx, %ebx
.L34:
	movss	32(%r13), %xmm1
	movss	36(%r13), %xmm0
	subss	4(%r14), %xmm1
	subss	8(%r14), %xmm0
	cvtss2sd	%xmm1, %xmm1
	cvtss2sd	%xmm0, %xmm0
	mulsd	%xmm1, %xmm1
	mulsd	%xmm0, %xmm0
	addsd	%xmm1, %xmm0
	call	sqrt@PLT
	movsd	.LC24(%rip), %xmm2
	comisd	%xmm0, %xmm2
	jb	.L31
	cmpl	$1, (%r14)
	jne	.L31
	cmpl	$0, 28(%r13)
	jne	.L31
	cmpl	%ebx, %r12d
	je	.L31
	movss	.LC3(%rip), %xmm1
	xorps	%xmm0, %xmm0
	call	_Z14generateRandomff
	movss	0(%r13), %xmm1
	comiss	%xmm0, %xmm1
	jb	.L31
	movl	$1, 28(%r13)
	incl	allInfectionsCounter(%rip)
	incl	infectionsPerDay(%rip)
.L31:
	incl	%ebx
	addq	$40, %r14
	cmpl	$1024, %ebx
	jne	.L34
	incl	%r12d
	addq	$40, %r13
	cmpl	$1024, %r12d
	jne	.L29
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%rbp
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r13
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4005:
	.size	_Z7ruleOneP5agent, .-_Z7ruleOneP5agent
	.globl	_Z7ruleTwoP5agent
	.type	_Z7ruleTwoP5agent, @function
_Z7ruleTwoP5agent:
.LFB4006:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	leaq	40972(%rdi), %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	leaq	12(%rdi), %rbx
	subq	$24, %rsp
	.cfi_def_cfa_offset 48
.L50:
	movss	.LC3(%rip), %xmm1
	xorps	%xmm0, %xmm0
	call	_Z14generateRandomff
	movss	(%rbx), %xmm1
	comiss	%xmm0, %xmm1
	jb	.L46
	cmpl	$1, 16(%rbx)
	ja	.L46
	movss	.LC3(%rip), %xmm1
	xorps	%xmm0, %xmm0
	call	_Z14generateRandomff
	movss	4(%rbx), %xmm1
	comiss	%xmm0, %xmm1
	movss	20(%rbx), %xmm0
	jb	.L54
	call	_Z13shortMovementf
	movss	%xmm0, 12(%rsp)
	movss	24(%rbx), %xmm0
	call	_Z13shortMovementf
	jmp	.L56
.L54:
	call	_Z13longXMovementf
	movss	%xmm0, 12(%rsp)
	movss	24(%rbx), %xmm0
	call	_Z13longXMovementf
.L56:
	movss	12(%rsp), %xmm1
	movss	%xmm0, 24(%rbx)
	movss	%xmm1, 20(%rbx)
.L46:
	addq	$40, %rbx
	cmpq	%rbp, %rbx
	jne	.L50
	addq	$24, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4006:
	.size	_Z7ruleTwoP5agent, .-_Z7ruleTwoP5agent
	.globl	_Z9ruleThreeP5agent
	.type	_Z9ruleThreeP5agent, @function
_Z9ruleThreeP5agent:
.LFB4007:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%ebx, %ebx
	pushq	%rdx
	.cfi_def_cfa_offset 32
.L60:
	movss	.LC3(%rip), %xmm1
	xorps	%xmm0, %xmm0
	call	_Z14generateRandomff
	movss	4(%rbp,%rbx), %xmm1
	comiss	%xmm0, %xmm1
	jb	.L58
	cmpl	$0, 28(%rbp,%rbx)
	jne	.L58
	movl	$1, 28(%rbp,%rbx)
	incl	allInfectionsCounter(%rip)
	incl	infectionsPerDay(%rip)
.L58:
	addq	$40, %rbx
	cmpq	$40960, %rbx
	jne	.L60
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4007:
	.size	_Z9ruleThreeP5agent, .-_Z9ruleThreeP5agent
	.globl	_Z8ruleFourP5agent
	.type	_Z8ruleFourP5agent, @function
_Z8ruleFourP5agent:
.LFB4008:
	.cfi_startproc
	endbr64
	movl	allRecoveryCounter(%rip), %ecx
	movl	recoveryPerDay(%rip), %esi
	leaq	20(%rdi), %rax
	xorl	%r8d, %r8d
	addq	$40980, %rdi
.L69:
	movl	8(%rax), %edx
	cmpl	$-1, %edx
	jne	.L65
	movl	4(%rax), %edx
	testl	%edx, %edx
	jle	.L66
	decl	%edx
	movl	%edx, 4(%rax)
	jmp	.L66
.L65:
	decl	%edx
	jne	.L71
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	.L68
	decl	%edx
	movl	%edx, (%rax)
.L68:
	cmpl	$0, (%rax)
	jne	.L71
	movl	$-1, 8(%rax)
.L66:
	cmpl	$0, 4(%rax)
	jne	.L71
	movl	$2, 8(%rax)
	incl	%ecx
	incl	%esi
	movb	$1, %r8b
.L71:
	addq	$40, %rax
	cmpq	%rdi, %rax
	jne	.L69
	testb	%r8b, %r8b
	je	.L64
	movl	%esi, recoveryPerDay(%rip)
	movl	%ecx, allRecoveryCounter(%rip)
	ret
.L64:
	ret
	.cfi_endproc
.LFE4008:
	.size	_Z8ruleFourP5agent, .-_Z8ruleFourP5agent
	.globl	_Z8ruleFiveP5agent
	.type	_Z8ruleFiveP5agent, @function
_Z8ruleFiveP5agent:
.LFB4009:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	xorl	%ebx, %ebx
	pushq	%rdx
	.cfi_def_cfa_offset 32
.L81:
	movss	.LC3(%rip), %xmm1
	xorps	%xmm0, %xmm0
	call	_Z14generateRandomff
	movss	8(%rbp,%rbx), %xmm1
	comiss	%xmm0, %xmm1
	jb	.L79
	cmpl	$-1, 28(%rbp,%rbx)
	jne	.L79
	movl	$-2, 28(%rbp,%rbx)
	incl	allFatalCounter(%rip)
	incl	fatalPerDay(%rip)
.L79:
	addq	$40, %rbx
	cmpq	$40960, %rbx
	jne	.L81
	popq	%rax
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4009:
	.size	_Z8ruleFiveP5agent, .-_Z8ruleFiveP5agent
	.section	.rodata.str1.1
.LC25:
	.string	"---------------------Simulation parameters---------------------\n"
.LC26:
	.string	"\nNumber of agents: %d\n"
.LC27:
	.string	"Simulation days: %d\n"
.LC28:
	.string	"Max movements per day: %d\n"
.LC30:
	.string	"Maximum radius for local movements: %f\n"
.LC31:
	.string	"Infection limit distance: %f\n"
.LC33:
	.string	"P: %f\n"
.LC34:
	.string	"Q: %f\n"
.LC35:
	.string	"\n--------------------Initializing simulation--------------------\n"
.LC36:
	.string	"\n---------------------Simulation terminated---------------------\n"
.LC37:
	.string	"\nTotal infected cases: %d\n"
.LC38:
	.string	"Infection history: "
.LC39:
	.string	"%d "
.LC40:
	.string	"\nZero day infection case: %d\n"
.LC41:
	.string	"Half population infected day: %d\n"
.LC42:
	.string	"All population infected day: %d\n"
.LC43:
	.string	"\nTotal recovery cases: %d\n"
.LC44:
	.string	"Recovery history: "
.LC45:
	.string	"\nZero day recovery case: %d\n"
.LC46:
	.string	"Half agents recovered day: %d\n"
.LC47:
	.string	"All agents recovered day: %d\n"
.LC48:
	.string	"\nTotal fatal cases: %d\n"
.LC49:
	.string	"Fatal history: "
.LC50:
	.string	"\nZero day fatal case: %d\n"
.LC51:
	.string	"Half agents fatal day: %d\n"
.LC52:
	.string	"All agents fatal day: %d\n"
.LC53:
	.string	"\nTime CPU: %f miliseconds. \n"
	.section	.text.startup,"ax",@progbits
	.globl	main
	.type	main, @function
main:
.LFB4010:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	leaq	infectionHistory(%rip), %r13
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	xorl	%ebx, %ebx
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	call	clock@PLT
	xorl	%edi, %edi
	movq	%rax, %r12
	call	time@PLT
	movl	%eax, %edi
	call	srand@PLT
	movl	$40960, %edi
	call	malloc@PLT
	movq	%rax, %rdi
	movq	%rax, (%rsp)
	call	_Z16initializeAgentsP5agent
	leaq	.LC25(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	$1024, %edx
	leaq	.LC26(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$30, %edx
	leaq	.LC27(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movl	$10, %edx
	leaq	.LC28(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	movsd	.LC29(%rip), %xmm0
	leaq	.LC30(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	movsd	.LC24(%rip), %xmm0
	leaq	.LC31(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	movsd	.LC32(%rip), %xmm0
	leaq	.LC33(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	movsd	.LC32(%rip), %xmm0
	leaq	.LC34(%rip), %rsi
	movb	$1, %al
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	.LC35(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
.L86:
	movl	$10, %ebp
.L87:
	movq	(%rsp), %rdi
	call	_Z7ruleOneP5agent
	movq	(%rsp), %rdi
	call	_Z7ruleTwoP5agent
	decl	%ebp
	jne	.L87
	movq	(%rsp), %rdi
	call	_Z9ruleThreeP5agent
	movq	(%rsp), %rdi
	call	_Z8ruleFourP5agent
	movq	(%rsp), %rdi
	call	_Z8ruleFiveP5agent
	movl	infectionsPerDay(%rip), %eax
	movl	recoveryPerDay(%rip), %edx
	movl	%eax, 0(%r13,%rbx)
	leaq	recoveryHistory(%rip), %rax
	movl	%edx, (%rax,%rbx)
	movl	fatalPerDay(%rip), %edx
	leaq	fatalHistory(%rip), %rax
	movl	%edx, (%rax,%rbx)
	xorl	%eax, %eax
	addq	$4, %rbx
	movl	%eax, infectionsPerDay(%rip)
	movl	%eax, recoveryPerDay(%rip)
	movl	%eax, fatalPerDay(%rip)
	cmpq	$120, %rbx
	jne	.L86
	leaq	.LC36(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	call	__printf_chk@PLT
	movl	allInfectionsCounter(%rip), %edx
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	movl	$2, %edi
	movl	$1, %ebx
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	leaq	.LC37(%rip), %rsi
	call	__printf_chk@PLT
	leaq	.LC38(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	leaq	-4+infectionHistory(%rip), %r10
.L92:
	movl	(%r10,%rbx,4), %edx
	xorl	%eax, %eax
	movl	$2, %edi
	movb	%cl, 15(%rsp)
	leaq	.LC39(%rip), %rsi
	movb	%r9b, 14(%rsp)
	call	__printf_chk@PLT
	movb	14(%rsp), %r9b
	movb	15(%rsp), %cl
	movl	%ebx, %edx
	leaq	-4+infectionHistory(%rip), %r10
	movl	(%r10,%rbx,4), %eax
	addl	%eax, %r15d
	testl	%eax, %eax
	jle	.L89
	testb	%r9b, %r9b
	jne	.L89
	movl	%ebx, %r13d
	movb	$1, %r9b
.L89:
	cmpl	$511, %r15d
	movl	%ecx, %esi
	setg	%al
	xorl	$1, %esi
	andb	%sil, %al
	cmovne	%eax, %ecx
	cmovne	%edx, %r14d
	cmpl	$1024, %r15d
	cmove	%edx, %ebp
	incq	%rbx
	cmpq	$31, %rbx
	jne	.L92
	movl	%r13d, %edx
	leaq	.LC40(%rip), %rsi
	xorl	%eax, %eax
	xorl	%r15d, %r15d
	movl	$2, %edi
	movl	$1, %ebx
	xorl	%r13d, %r13d
	call	__printf_chk@PLT
	movl	%r14d, %edx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC41(%rip), %rsi
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	movl	%ebp, %edx
	leaq	.LC42(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	xorl	%ebp, %ebp
	call	__printf_chk@PLT
	movl	allRecoveryCounter(%rip), %edx
	leaq	.LC43(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	.LC44(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	leaq	-4+recoveryHistory(%rip), %r11
.L96:
	movl	(%r11,%rbx,4), %edx
	xorl	%eax, %eax
	movl	$2, %edi
	movb	%r10b, 15(%rsp)
	leaq	.LC39(%rip), %rsi
	movb	%r9b, 14(%rsp)
	call	__printf_chk@PLT
	leaq	-4+recoveryHistory(%rip), %r11
	movb	14(%rsp), %r9b
	movl	%ebx, %esi
	movl	(%r11,%rbx,4), %eax
	movb	15(%rsp), %r10b
	addl	%eax, %ebp
	testl	%eax, %eax
	jle	.L93
	testb	%r9b, %r9b
	jne	.L93
	movl	%ebx, %r13d
	movb	$1, %r9b
.L93:
	movl	allRecoveryCounter(%rip), %ecx
	movl	$2, %edi
	movl	%ecx, %eax
	cltd
	idivl	%edi
	cmpl	%ebp, %eax
	jg	.L94
	testb	%r10b, %r10b
	jne	.L94
	movl	%esi, %r15d
	movb	$1, %r10b
.L94:
	cmpl	%ebp, %ecx
	cmove	%esi, %r14d
	incq	%rbx
	cmpq	$31, %rbx
	jne	.L96
	movl	%r13d, %edx
	leaq	.LC45(%rip), %rsi
	xorl	%eax, %eax
	xorl	%ebp, %ebp
	movl	$2, %edi
	movl	$1, %ebx
	xorl	%r13d, %r13d
	call	__printf_chk@PLT
	movl	%r15d, %edx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC46(%rip), %rsi
	xorl	%r15d, %r15d
	call	__printf_chk@PLT
	movl	%r14d, %edx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC47(%rip), %rsi
	xorl	%r14d, %r14d
	call	__printf_chk@PLT
	movl	allFatalCounter(%rip), %edx
	leaq	.LC48(%rip), %rsi
	xorl	%eax, %eax
	movl	$2, %edi
	call	__printf_chk@PLT
	leaq	.LC49(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	leaq	-4+fatalHistory(%rip), %r11
.L100:
	movl	(%r11,%rbx,4), %edx
	xorl	%eax, %eax
	movl	$2, %edi
	movb	%r10b, 15(%rsp)
	leaq	.LC39(%rip), %rsi
	movb	%r9b, 14(%rsp)
	call	__printf_chk@PLT
	leaq	-4+fatalHistory(%rip), %r11
	movb	14(%rsp), %r9b
	movl	%ebx, %esi
	movl	(%r11,%rbx,4), %eax
	movb	15(%rsp), %r10b
	addl	%eax, %ebp
	testl	%eax, %eax
	jle	.L97
	testb	%r9b, %r9b
	jne	.L97
	movl	%ebx, %r13d
	movb	$1, %r9b
.L97:
	movl	allFatalCounter(%rip), %ecx
	movl	$2, %edi
	movl	%ecx, %eax
	cltd
	idivl	%edi
	cmpl	%ebp, %eax
	jg	.L98
	testb	%r10b, %r10b
	jne	.L98
	movl	%esi, %r15d
	movb	$1, %r10b
.L98:
	cmpl	%ebp, %ecx
	cmove	%esi, %r14d
	incq	%rbx
	cmpq	$31, %rbx
	jne	.L100
	movl	%r13d, %edx
	leaq	.LC50(%rip), %rsi
	movl	$2, %edi
	xorl	%eax, %eax
	call	__printf_chk@PLT
	movl	%r15d, %edx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC51(%rip), %rsi
	call	__printf_chk@PLT
	movl	%r14d, %edx
	movl	$2, %edi
	xorl	%eax, %eax
	leaq	.LC52(%rip), %rsi
	call	__printf_chk@PLT
	call	clock@PLT
	leaq	.LC53(%rip), %rsi
	movl	$2, %edi
	subq	%r12, %rax
	cvtsi2ssq	%rax, %xmm0
	movb	$1, %al
	cvtss2sd	%xmm0, %xmm0
	call	__printf_chk@PLT
	movq	(%rsp), %rdi
	call	free@PLT
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE4010:
	.size	main, .-main
	.type	_ZL24__sti____cudaRegisterAllv, @function
_ZL24__sti____cudaRegisterAllv:
.LFB4036:
	.cfi_startproc
	endbr64
	pushq	%rax
	.cfi_def_cfa_offset 16
	leaq	_ZL15__fatDeviceText(%rip), %rdi
	call	__cudaRegisterFatBinary@PLT
	movq	%rax, %rdi
	movq	%rax, _ZL20__cudaFatCubinHandle(%rip)
	call	__cudaRegisterFatBinaryEnd@PLT
	leaq	_ZL26__cudaUnregisterBinaryUtilv(%rip), %rdi
	popq	%rdx
	.cfi_def_cfa_offset 8
	jmp	atexit@PLT
	.cfi_endproc
.LFE4036:
	.size	_ZL24__sti____cudaRegisterAllv, .-_ZL24__sti____cudaRegisterAllv
	.section	.init_array,"aw"
	.align 8
	.quad	_ZL24__sti____cudaRegisterAllv
	.section	.nvFatBinSegment,"aw"
	.align 8
	.type	_ZL15__fatDeviceText, @object
	.size	_ZL15__fatDeviceText, 24
_ZL15__fatDeviceText:
	.long	1180844977
	.long	1
	.quad	fatbinData
	.quad	0
	.local	_ZL20__cudaFatCubinHandle
	.comm	_ZL20__cudaFatCubinHandle,8,8
	.globl	fatalHistory
	.bss
	.align 32
	.type	fatalHistory, @object
	.size	fatalHistory, 120
fatalHistory:
	.zero	120
	.globl	fatalPerDay
	.align 4
	.type	fatalPerDay, @object
	.size	fatalPerDay, 4
fatalPerDay:
	.zero	4
	.globl	allFatalCounter
	.align 4
	.type	allFatalCounter, @object
	.size	allFatalCounter, 4
allFatalCounter:
	.zero	4
	.globl	recoveryHistory
	.align 32
	.type	recoveryHistory, @object
	.size	recoveryHistory, 120
recoveryHistory:
	.zero	120
	.globl	recoveryPerDay
	.align 4
	.type	recoveryPerDay, @object
	.size	recoveryPerDay, 4
recoveryPerDay:
	.zero	4
	.globl	allRecoveryCounter
	.align 4
	.type	allRecoveryCounter, @object
	.size	allRecoveryCounter, 4
allRecoveryCounter:
	.zero	4
	.globl	infectionHistory
	.align 32
	.type	infectionHistory, @object
	.size	infectionHistory, 120
infectionHistory:
	.zero	120
	.globl	infectionsPerDay
	.align 4
	.type	infectionsPerDay, @object
	.size	infectionsPerDay, 4
infectionsPerDay:
	.zero	4
	.globl	allInfectionsCounter
	.align 4
	.type	allInfectionsCounter, @object
	.size	allInfectionsCounter, 4
allInfectionsCounter:
	.zero	4
	.section	.rodata.cst4,"aM",@progbits,4
	.align 4
.LC0:
	.long	1325400064
	.align 4
.LC2:
	.long	1140457472
	.align 4
.LC3:
	.long	1065353216
	.align 4
.LC4:
	.long	1084227584
	.align 4
.LC5:
	.long	-1082130432
	.align 4
.LC6:
	.long	1022739087
	.align 4
.LC7:
	.long	1017370378
	.align 4
.LC8:
	.long	1032805417
	.align 4
.LC9:
	.long	1004888130
	.align 4
.LC10:
	.long	1056964608
	.align 4
.LC11:
	.long	1050253722
	.align 4
.LC12:
	.long	1063675494
	.align 4
.LC13:
	.long	1060320051
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC24:
	.long	0
	.long	1072693248
	.align 8
.LC29:
	.long	0
	.long	1075052544
	.align 8
.LC32:
	.long	0
	.long	1082081280
	.ident	"GCC: (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:


#include "hip/hip_runtime.h"

#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <ctime>
//#include <math.h>
#include <cmath>
#include <vector>
#include <iostream>

using namespace std;

// Agent structure with all properties
struct agent {
	float infectionProb;			// [0.02, 0.03]
	float externalInfectionProb;	// [0.02, 0.03]
	float mortalityProb;			// [0.007, 0.07]
	float mobilityProb;				// [0.3, 0.5]
	float shortMobilityProb;		// [0.7, 0.9]
	int incubationTime;				// [5, 6]
	int recoveryTime;				// 14
	int infectionStatus;			// Non infected (0), infected (1), quarantine (-1), deseaced (-2), cured (2)
	float x;						// [0, p]
	float y;						// [0, q]
};

// Simulation parameters
const int numberOfAgents = 1024;
const int maxSimulationDays = 30;
const int maxMovementsPerDay = 10;
const float maximumRadiusForLocalMovements = 5;
const float infectionLimitDistance = 1;
const float p = 500;
const float q = 500;

int allInfectionsCounter = 0;
int infectionsPerDay = 0;
int infectionHistory[maxSimulationDays];
int allRecoveryCounter = 0;
int recoveryPerDay = 0;
int recoveryHistory[maxSimulationDays];
int allFatalCounter = 0;
int fatalPerDay = 0;
int fatalHistory[maxSimulationDays];

// Function to generate a random float between a range
float generateRandom(float a, float b) {
	float r = a + static_cast <float> (rand()) / (static_cast <float> (RAND_MAX / (b - a)));
	return r;
}

// Function to move a short distance an agent
float shortMovement(float pos) {
	float newPos = (2 * generateRandom(0.0, 1.0) - 1) * maximumRadiusForLocalMovements + pos;
	if (newPos > 500)
		newPos = 500;
	if (newPos < 0)
		newPos = 0;
	return newPos;
}

// Function to move a long distance in X an agent
float longXMovement(float pos) {
	float newPos = p * generateRandom(-1.0, 1.0) + pos;
	if (newPos > 500)
		newPos = 500;
	if (newPos < 0)
		newPos = 0;
	return newPos;
}

// Function to move a long distance in Y an agent
float longYMovement(float pos) {
	float newPos = q * generateRandom(-1.0, 1.0) + pos;
	if (newPos > 500)
		newPos = 500;
	if (newPos < 0)
		newPos = 0;
	return newPos;
}

// Test function to initalize infected agents
void initializeInfectedAgents(agent allAgents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		allAgents[i].infectionProb = generateRandom(0.02, 0.03);
		allAgents[i].externalInfectionProb = generateRandom(0.02, 0.03);
		allAgents[i].mortalityProb = generateRandom(0.007, 0.07);
		allAgents[i].mobilityProb = generateRandom(0.3, 0.5);
		allAgents[i].shortMobilityProb = generateRandom(0.7, 0.9);
		allAgents[i].incubationTime = rand() % 2 + 5;
		allAgents[i].recoveryTime = 14;
		allAgents[i].infectionStatus = rand() % 2;
		allAgents[i].x = rand() % (int)p + 1;
		allAgents[i].y = rand() % (int)q + 1;
	}
}

// Function to initialize all agent properties
void initializeAgents(agent allAgents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		allAgents[i].infectionProb = generateRandom(0.02, 0.03);
		allAgents[i].externalInfectionProb = generateRandom(0.02, 0.03);
		allAgents[i].mortalityProb = generateRandom(0.007, 0.07);
		allAgents[i].mobilityProb = generateRandom(0.3, 0.5);
		allAgents[i].shortMobilityProb = generateRandom(0.7, 0.9);
		allAgents[i].incubationTime = rand() % 2 + 5;
		allAgents[i].recoveryTime = 14;
		allAgents[i].infectionStatus = 0;
		allAgents[i].x = rand() % (int)p + 1;
		allAgents[i].y = rand() % (int)q + 1;
	}
}

// Function to show all agents properties
void showAgents(agent allAgents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		printf("Agent's no. %d probability of infection: %f\n", i + 1, allAgents[i].infectionProb);
		printf("Agent's no. %d external probability of infection: %f\n", i + 1, allAgents[i].externalInfectionProb);
		printf("Agent's no. %d probability of mortality: %f\n", i + 1, allAgents[i].mortalityProb);
		printf("Agent's no. %d probability of mobility: %f\n", i + 1, allAgents[i].mobilityProb);
		printf("Agent's no. %d probability of short mobility: %f\n", i + 1, allAgents[i].shortMobilityProb);
		printf("Agent's no. %d incubation time: %d\n", i + 1, allAgents[i].incubationTime);
		printf("Agent's no. %d recovery time: %d\n", i + 1, allAgents[i].recoveryTime);
		printf("Agent's no. %d infection status: %d\n", i + 1, allAgents[i].infectionStatus);
		printf("Agent's no. %d x position: %f\n", i + 1, allAgents[i].x);
		printf("Agent's no. %d y position: %f\n\n", i + 1, allAgents[i].y);
	}
}
// Rule 1: Infection
void ruleOne(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		for (int j = 0; j < numberOfAgents; j++) {
			double distance = sqrt(pow(agents[i].x - agents[j].x, 2.0) + pow(agents[i].y - agents[j].y, 2.0));
			if (distance <= 1.0 && agents[j].infectionStatus == 1 && agents[i].infectionStatus == 0 && i != j) {
				float infection = generateRandom(0.0, 1.0);
				if (infection <= agents[i].infectionProb) {
					agents[i].infectionStatus = 1;
					allInfectionsCounter++;
					infectionsPerDay++;
				}
			}
		}
	}
}

// Rule 2: Mobility
void ruleTwo(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		float movProb = generateRandom(0.0, 1.0);
		if (movProb <= agents[i].mobilityProb && (agents[i].infectionStatus == 0 || agents[i].infectionStatus == 1)) {
			float shortMovProb = generateRandom(0.0, 1.0);
			float newXPos, newYPos;
			if (shortMovProb <= agents[i].shortMobilityProb) {
				newXPos = shortMovement(agents[i].x);
				newYPos = shortMovement(agents[i].y);
				agents[i].x = newXPos;
				agents[i].y = newYPos;
			}
			else {
				newXPos = longXMovement(agents[i].x);
				newYPos = longYMovement(agents[i].y);
				agents[i].x = newXPos;
				agents[i].y = newYPos;
			}
		}
	}
}

// Rule 3: External infection
void ruleThree(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		float infectionExternal = generateRandom(0.0, 1.0);
		if (infectionExternal <= agents[i].externalInfectionProb && agents[i].infectionStatus == 0) {
			agents[i].infectionStatus = 1;
			allInfectionsCounter++;
			infectionsPerDay++;
		}
	}
}

// Rule 4: Incucation time, symptoms, quarantine and recovery time
void ruleFour(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		if (agents[i].infectionStatus == -1 && agents[i].recoveryTime > 0) {
			agents[i].recoveryTime = agents[i].recoveryTime - 1;
		}
		if (agents[i].infectionStatus == 1 && agents[i].incubationTime > 0) {
			agents[i].incubationTime = agents[i].incubationTime - 1;
		}
		if (agents[i].infectionStatus == 1 && agents[i].incubationTime == 0) {
			agents[i].infectionStatus = -1;
		}
		if (agents[i].infectionStatus == -1 && agents[i].recoveryTime == 0) {
			agents[i].infectionStatus = 2;
			allRecoveryCounter++;
			recoveryPerDay++;
		}
	}
}

// Rule 5: Fatal cases
void ruleFive(agent agents[]) {
	for (int i = 0; i < numberOfAgents; i++) {
		float fatal = generateRandom(0.0, 1.0);
		if (fatal <= agents[i].mortalityProb && agents[i].infectionStatus == -1) {
			agents[i].infectionStatus = -2;
			allFatalCounter++;
			fatalPerDay++;
		}
	}
}

int main() {
	/*
	*************************************************************
	******************** Initalization phase ********************
	*************************************************************
	*/
	clock_t start_CPU = clock();
	srand((int)time(0));
	agent* allAgents;
	allAgents = (agent*)malloc(numberOfAgents * sizeof(agent));
	initializeAgents(allAgents);

	printf("---------------------Simulation parameters---------------------\n");
	printf("\nNumber of agents: %d\n", numberOfAgents);
	printf("Simulation days: %d\n", maxSimulationDays);
	printf("Max movements per day: %d\n", maxMovementsPerDay);
	printf("Maximum radius for local movements: %f\n", maximumRadiusForLocalMovements);
	printf("Infection limit distance: %f\n", infectionLimitDistance);
	printf("P: %f\n", p);
	printf("Q: %f\n", q);
	printf("\n--------------------Initializing simulation--------------------\n");

	/*
	*************************************************************
	********************** Operation phase **********************
	*************************************************************
	*/

	for (int day = 0; day < maxSimulationDays; day++) {
		for (int mov = 0; mov < maxMovementsPerDay; mov++) {
			ruleOne(allAgents);
			ruleTwo(allAgents);
		}
		ruleThree(allAgents);
		ruleFour(allAgents);
		ruleFive(allAgents);
		infectionHistory[day] = infectionsPerDay;
		recoveryHistory[day] = recoveryPerDay;
		fatalHistory[day] = fatalPerDay;
		infectionsPerDay = 0;
		recoveryPerDay = 0;
		fatalPerDay = 0;
	}

	/*
	*************************************************************
	************************ Show results ***********************
	*************************************************************
	*/
	printf("\n---------------------Simulation terminated---------------------\n");

	int zeroDayInfected = 0, halfPopulationInfected = 0, allPopulationInfected = 0;
	int zeroDayRecovered = 0, halfAgentsRecovered = 0, allAgentsRecovered = 0;
	int zeroDayFatal = 0, halfAgentsFatal = 0, allAgentsFatal = 0;
	int halfPopulationInfectedDay = 0, allPopulationInfectedDay = 0;
	int halfAgentsRecoveredDay = 0, allAgentsRecoveredDay = 0;
	int halfAgentsFatalDay = 0, allAgentsFatalDay = 0;
	bool zeroDayInfectedFlag = false, halfPopulationInfectedFlag = false;
	bool zeroDayRecoveredFlag = false, halfAgentsRecoveredFlag = false;
	bool zeroDayFatalFlag = false, halfAgentsFatalFlag = false;

	printf("\nTotal infected cases: %d\n", allInfectionsCounter);
	printf("Infection history: ");
	for (int i = 0; i < maxSimulationDays; i++) {
		printf("%d ", infectionHistory[i]);
		halfPopulationInfected += infectionHistory[i];
		allPopulationInfected += infectionHistory[i];
		if (infectionHistory[i] > 0 && !zeroDayInfectedFlag) {
			zeroDayInfected = i + 1;
			zeroDayInfectedFlag = true;
		}
		if (halfPopulationInfected >= (numberOfAgents / 2) && !halfPopulationInfectedFlag) {
			halfPopulationInfectedDay = i + 1;
			halfPopulationInfectedFlag = true;
		}
		if (allPopulationInfected == numberOfAgents)
			allPopulationInfectedDay = i + 1;
	}
	printf("\nZero day infection case: %d\n", zeroDayInfected);
	printf("Half population infected day: %d\n", halfPopulationInfectedDay);
	printf("All population infected day: %d\n", allPopulationInfectedDay);

	printf("\nTotal recovery cases: %d\n", allRecoveryCounter);
	printf("Recovery history: ");
	for (int i = 0; i < maxSimulationDays; i++) {
		printf("%d ", recoveryHistory[i]);
		halfAgentsRecovered += recoveryHistory[i];
		allAgentsRecovered += recoveryHistory[i];
		if (recoveryHistory[i] > 0 && !zeroDayRecoveredFlag) {
			zeroDayRecovered = i + 1;
			zeroDayRecoveredFlag = true;
		}
		if (halfAgentsRecovered >= (allRecoveryCounter / 2) && !halfAgentsRecoveredFlag) {
			halfAgentsRecoveredDay = i + 1;
			halfAgentsRecoveredFlag = true;
		}
		if (allAgentsRecovered == allRecoveryCounter)
			allAgentsRecoveredDay = i + 1;
	}
	printf("\nZero day recovery case: %d\n", zeroDayRecovered);
	printf("Half agents recovered day: %d\n", halfAgentsRecoveredDay);
	printf("All agents recovered day: %d\n", allAgentsRecoveredDay);

	printf("\nTotal fatal cases: %d\n", allFatalCounter);
	printf("Fatal history: ");
	for (int i = 0; i < maxSimulationDays; i++) {
		printf("%d ", fatalHistory[i]);
		halfAgentsFatal += fatalHistory[i];
		allAgentsFatal += fatalHistory[i];
		if (fatalHistory[i] > 0 && !zeroDayFatalFlag) {
			zeroDayFatal = i + 1;
			zeroDayFatalFlag = true;
		}
		if (halfAgentsFatal >= (allFatalCounter / 2) && !halfAgentsFatalFlag) {
			halfAgentsFatalDay = i + 1;
			halfAgentsFatalFlag = true;
		}
		if (allAgentsFatal == allFatalCounter)
			allAgentsFatalDay = i + 1;
	}
	printf("\nZero day fatal case: %d\n", zeroDayFatal);
	printf("Half agents fatal day: %d\n", halfAgentsFatalDay);
	printf("All agents fatal day: %d\n", allAgentsFatalDay);


	clock_t end_CPU = clock();
	float elapsedTime_CPU = end_CPU - start_CPU;
	printf("\nTime CPU: %f miliseconds. \n", elapsedTime_CPU);
	free(allAgents);
	return 0;
}
	.text
	.file	"CPU.hip"
                                        # Start of file scope inline assembly
	.globl	_ZSt21ios_base_library_initv

                                        # End of file scope inline assembly
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z14generateRandomff
.LCPI0_0:
	.long	0x4f000000                      # float 2.14748365E+9
	.text
	.globl	_Z14generateRandomff
	.type	_Z14generateRandomff,@function
_Z14generateRandomff:                   # @_Z14generateRandomff
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movss	%xmm1, 4(%rsp)                  # 4-byte Spill
	movss	%xmm0, (%rsp)                   # 4-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	(%rsp), %xmm2                   # 4-byte Reload
                                        # xmm2 = mem[0],zero,zero,zero
	movss	4(%rsp), %xmm3                  # 4-byte Reload
                                        # xmm3 = mem[0],zero,zero,zero
	subss	%xmm2, %xmm3
	movss	.LCPI0_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm3, %xmm1
	divss	%xmm1, %xmm0
	addss	%xmm2, %xmm0
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end0:
	.size	_Z14generateRandomff, .Lfunc_end0-_Z14generateRandomff
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z13shortMovementf
.LCPI1_0:
	.long	0x30000000                      # float 4.65661287E-10
.LCPI1_1:
	.long	0xbf800000                      # float -1
.LCPI1_2:
	.long	0x40a00000                      # float 5
.LCPI1_3:
	.long	0x43fa0000                      # float 500
	.text
	.globl	_Z13shortMovementf
	.type	_Z13shortMovementf,@function
_Z13shortMovementf:                     # @_Z13shortMovementf
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	callq	rand
	cvtsi2ss	%eax, %xmm1
	mulss	.LCPI1_0(%rip), %xmm1
	xorps	%xmm0, %xmm0
	addss	%xmm0, %xmm1
	addss	%xmm1, %xmm1
	addss	.LCPI1_1(%rip), %xmm1
	mulss	.LCPI1_2(%rip), %xmm1
	addss	4(%rsp), %xmm1                  # 4-byte Folded Reload
	movss	.LCPI1_3(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	minss	%xmm1, %xmm2
	maxss	%xmm2, %xmm0
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end1:
	.size	_Z13shortMovementf, .Lfunc_end1-_Z13shortMovementf
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z13longXMovementf
.LCPI2_0:
	.long	0x30800000                      # float 9.31322574E-10
.LCPI2_1:
	.long	0xbf800000                      # float -1
.LCPI2_2:
	.long	0x43fa0000                      # float 500
	.text
	.globl	_Z13longXMovementf
	.type	_Z13longXMovementf,@function
_Z13longXMovementf:                     # @_Z13longXMovementf
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI2_0(%rip), %xmm0
	addss	.LCPI2_1(%rip), %xmm0
	movss	.LCPI2_2(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	addss	4(%rsp), %xmm0                  # 4-byte Folded Reload
	minss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	maxss	%xmm1, %xmm0
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end2:
	.size	_Z13longXMovementf, .Lfunc_end2-_Z13longXMovementf
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z13longYMovementf
.LCPI3_0:
	.long	0x30800000                      # float 9.31322574E-10
.LCPI3_1:
	.long	0xbf800000                      # float -1
.LCPI3_2:
	.long	0x43fa0000                      # float 500
	.text
	.globl	_Z13longYMovementf
	.type	_Z13longYMovementf,@function
_Z13longYMovementf:                     # @_Z13longYMovementf
	.cfi_startproc
# %bb.0:
	pushq	%rax
	.cfi_def_cfa_offset 16
	movss	%xmm0, 4(%rsp)                  # 4-byte Spill
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI3_0(%rip), %xmm0
	addss	.LCPI3_1(%rip), %xmm0
	movss	.LCPI3_2(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	addss	4(%rsp), %xmm0                  # 4-byte Folded Reload
	minss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	maxss	%xmm1, %xmm0
	popq	%rax
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end3:
	.size	_Z13longYMovementf, .Lfunc_end3-_Z13longYMovementf
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z24initializeInfectedAgentsP5agent
.LCPI4_0:
	.long	0x52480000                      # float 2.14748365E+11
.LCPI4_1:
	.long	0x3ca3d70a                      # float 0.0199999996
.LCPI4_2:
	.long	0x50fdf7df                      # float 3.4087041E+10
.LCPI4_3:
	.long	0x3be56042                      # float 0.00700000022
.LCPI4_4:
	.long	0x50200001                      # float 1.07374193E+10
.LCPI4_5:
	.long	0x3e99999a                      # float 0.300000012
.LCPI4_6:
	.long	0x3f333333                      # float 0.699999988
	.text
	.globl	_Z24initializeInfectedAgentsP5agent
	.type	_Z24initializeInfectedAgentsP5agent,@function
_Z24initializeInfectedAgentsP5agent:    # @_Z24initializeInfectedAgentsP5agent
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movl	$36, %r14d
.LBB4_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	.LCPI4_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	movss	.LCPI4_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	movss	%xmm0, -36(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	.LCPI4_0(%rip), %xmm0
	addss	.LCPI4_1(%rip), %xmm0
	movss	%xmm0, -32(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	.LCPI4_2(%rip), %xmm0
	addss	.LCPI4_3(%rip), %xmm0
	movss	%xmm0, -28(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	.LCPI4_4(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	addss	.LCPI4_5(%rip), %xmm0
	movss	%xmm0, -24(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	.LCPI4_4(%rip), %xmm0
	addss	.LCPI4_6(%rip), %xmm0
	movss	%xmm0, -20(%rbx,%r14)
	callq	rand
                                        # kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	andl	$-2, %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$5, %eax
	movl	%eax, -16(%rbx,%r14)
	movl	$14, -12(%rbx,%r14)
	callq	rand
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	andl	$-2, %ecx
	subl	%ecx, %eax
	movl	%eax, -8(%rbx,%r14)
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$500, %ecx, %ecx                # imm = 0x1F4
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, -4(%rbx,%r14)
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$500, %ecx, %ecx                # imm = 0x1F4
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%rbx,%r14)
	addq	$40, %r14
	cmpq	$40996, %r14                    # imm = 0xA024
	jne	.LBB4_1
# %bb.2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end4:
	.size	_Z24initializeInfectedAgentsP5agent, .Lfunc_end4-_Z24initializeInfectedAgentsP5agent
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z16initializeAgentsP5agent
.LCPI5_0:
	.long	0x52480000                      # float 2.14748365E+11
.LCPI5_1:
	.long	0x3ca3d70a                      # float 0.0199999996
.LCPI5_2:
	.long	0x50fdf7df                      # float 3.4087041E+10
.LCPI5_3:
	.long	0x3be56042                      # float 0.00700000022
.LCPI5_4:
	.long	0x50200001                      # float 1.07374193E+10
.LCPI5_5:
	.long	0x3e99999a                      # float 0.300000012
.LCPI5_6:
	.long	0x3f333333                      # float 0.699999988
	.text
	.globl	_Z16initializeAgentsP5agent
	.type	_Z16initializeAgentsP5agent,@function
_Z16initializeAgentsP5agent:            # @_Z16initializeAgentsP5agent
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movl	$36, %r14d
.LBB5_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	.LCPI5_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	movss	.LCPI5_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	movss	%xmm0, -36(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	.LCPI5_0(%rip), %xmm0
	addss	.LCPI5_1(%rip), %xmm0
	movss	%xmm0, -32(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	.LCPI5_2(%rip), %xmm0
	addss	.LCPI5_3(%rip), %xmm0
	movss	%xmm0, -28(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	.LCPI5_4(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	divss	%xmm1, %xmm0
	addss	.LCPI5_5(%rip), %xmm0
	movss	%xmm0, -24(%rbx,%r14)
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	divss	.LCPI5_4(%rip), %xmm0
	addss	.LCPI5_6(%rip), %xmm0
	movss	%xmm0, -20(%rbx,%r14)
	callq	rand
                                        # kill: def $eax killed $eax def $rax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	andl	$-2, %ecx
	negl	%ecx
	addl	%ecx, %eax
	addl	$5, %eax
	movl	%eax, -16(%rbx,%r14)
	movq	$14, -12(%rbx,%r14)
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$500, %ecx, %ecx                # imm = 0x1F4
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, -4(%rbx,%r14)
	callq	rand
	cltq
	imulq	$274877907, %rax, %rcx          # imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$37, %rcx
	addl	%edx, %ecx
	imull	$500, %ecx, %ecx                # imm = 0x1F4
	negl	%ecx
	addl	%ecx, %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	%xmm0, (%rbx,%r14)
	addq	$40, %r14
	cmpq	$40996, %r14                    # imm = 0xA024
	jne	.LBB5_1
# %bb.2:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end5:
	.size	_Z16initializeAgentsP5agent, .Lfunc_end5-_Z16initializeAgentsP5agent
	.cfi_endproc
                                        # -- End function
	.globl	_Z10showAgentsP5agent           # -- Begin function _Z10showAgentsP5agent
	.type	_Z10showAgentsP5agent,@function
_Z10showAgentsP5agent:                  # @_Z10showAgentsP5agent
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%rbx
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	.cfi_offset %rbp, -16
	movq	%rdi, %rbx
	movl	$36, %r14d
	movl	$1, %ebp
.LBB6_1:                                # =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	cvtss2sd	-36(%rbx,%r14), %xmm0
	movl	$.L.str, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	-32(%rbx,%r14), %xmm0
	movl	$.L.str.1, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	-28(%rbx,%r14), %xmm0
	movl	$.L.str.2, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	-24(%rbx,%r14), %xmm0
	movl	$.L.str.3, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	-20(%rbx,%r14), %xmm0
	movl	$.L.str.4, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	movl	-16(%rbx,%r14), %edx
	movl	$.L.str.5, %edi
	movl	%ebp, %esi
	xorl	%eax, %eax
	callq	printf
	movl	-12(%rbx,%r14), %edx
	movl	$.L.str.6, %edi
	movl	%ebp, %esi
	xorl	%eax, %eax
	callq	printf
	movl	-8(%rbx,%r14), %edx
	movl	$.L.str.7, %edi
	movl	%ebp, %esi
	xorl	%eax, %eax
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	-4(%rbx,%r14), %xmm0
	movl	$.L.str.8, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	xorps	%xmm0, %xmm0
	cvtss2sd	(%rbx,%r14), %xmm0
	movl	$.L.str.9, %edi
	movl	%ebp, %esi
	movb	$1, %al
	callq	printf
	addq	$40, %r14
	incl	%ebp
	cmpq	$40996, %r14                    # imm = 0xA024
	jne	.LBB6_1
# %bb.2:
	popq	%rbx
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end6:
	.size	_Z10showAgentsP5agent, .Lfunc_end6-_Z10showAgentsP5agent
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function _Z7ruleOneP5agent
.LCPI7_0:
	.quad	0x3ff0000000000000              # double 1
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0
.LCPI7_1:
	.long	0x30000000                      # float 4.65661287E-10
.LCPI7_2:
	.long	0x00000000                      # float 0
	.text
	.globl	_Z7ruleOneP5agent
	.type	_Z7ruleOneP5agent,@function
_Z7ruleOneP5agent:                      # @_Z7ruleOneP5agent
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r13
	.cfi_def_cfa_offset 32
	pushq	%r12
	.cfi_def_cfa_offset 40
	pushq	%rbx
	.cfi_def_cfa_offset 48
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r13, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	movsd	.LCPI7_0(%rip), %xmm2           # xmm2 = mem[0],zero
	xorl	%r15d, %r15d
.LBB7_1:                                # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB7_2 Depth 2
	leaq	(%r15,%r15,4), %rax
	leaq	(%rbx,%rax,8), %r12
	xorl	%r13d, %r13d
.LBB7_2:                                #   Parent Loop BB7_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movss	32(%r12), %xmm0                 # xmm0 = mem[0],zero,zero,zero
	subss	32(%rbx,%r13), %xmm0
	cvtss2sd	%xmm0, %xmm0
	mulsd	%xmm0, %xmm0
	movss	36(%r12), %xmm1                 # xmm1 = mem[0],zero,zero,zero
	subss	36(%rbx,%r13), %xmm1
	cvtss2sd	%xmm1, %xmm1
	mulsd	%xmm1, %xmm1
	addsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	sqrtsd	%xmm1, %xmm0
	ucomisd	%xmm0, %xmm2
	jb	.LBB7_8
# %bb.3:                                #   in Loop: Header=BB7_2 Depth=2
	cmpl	$1, 28(%rbx,%r13)
	jne	.LBB7_8
# %bb.4:                                #   in Loop: Header=BB7_2 Depth=2
	cmpq	%r13, %r14
	je	.LBB7_8
# %bb.5:                                #   in Loop: Header=BB7_2 Depth=2
	cmpl	$0, 28(%r12)
	jne	.LBB7_8
# %bb.6:                                #   in Loop: Header=BB7_2 Depth=2
	callq	rand
	movsd	.LCPI7_0(%rip), %xmm2           # xmm2 = mem[0],zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI7_1(%rip), %xmm0
	addss	.LCPI7_2(%rip), %xmm0
	movss	(%r12), %xmm1                   # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jb	.LBB7_8
# %bb.7:                                #   in Loop: Header=BB7_2 Depth=2
	movl	$1, 28(%r12)
	incl	allInfectionsCounter(%rip)
	incl	infectionsPerDay(%rip)
.LBB7_8:                                #   in Loop: Header=BB7_2 Depth=2
	addq	$40, %r13
	cmpq	$40960, %r13                    # imm = 0xA000
	jne	.LBB7_2
# %bb.9:                                #   in Loop: Header=BB7_1 Depth=1
	incq	%r15
	addq	$40, %r14
	cmpq	$1024, %r15                     # imm = 0x400
	jne	.LBB7_1
# %bb.10:
	popq	%rbx
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end7:
	.size	_Z7ruleOneP5agent, .Lfunc_end7-_Z7ruleOneP5agent
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z7ruleTwoP5agent
.LCPI8_0:
	.long	0x30000000                      # float 4.65661287E-10
.LCPI8_1:
	.long	0xbf800000                      # float -1
.LCPI8_2:
	.long	0x40a00000                      # float 5
.LCPI8_3:
	.long	0x43fa0000                      # float 500
.LCPI8_4:
	.long	0x30800000                      # float 9.31322574E-10
.LCPI8_5:
	.long	0x00000000                      # float 0
	.text
	.globl	_Z7ruleTwoP5agent
	.type	_Z7ruleTwoP5agent,@function
_Z7ruleTwoP5agent:                      # @_Z7ruleTwoP5agent
	.cfi_startproc
# %bb.0:
	pushq	%r15
	.cfi_def_cfa_offset 16
	pushq	%r14
	.cfi_def_cfa_offset 24
	pushq	%r12
	.cfi_def_cfa_offset 32
	pushq	%rbx
	.cfi_def_cfa_offset 40
	subq	$24, %rsp
	.cfi_def_cfa_offset 64
	.cfi_offset %rbx, -40
	.cfi_offset %r12, -32
	.cfi_offset %r14, -24
	.cfi_offset %r15, -16
	movq	%rdi, %rbx
	movl	$36, %r14d
	xorl	%r15d, %r15d
.LBB8_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI8_0(%rip), %xmm0
	addss	.LCPI8_5(%rip), %xmm0
	movss	-24(%rbx,%r14), %xmm1           # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jb	.LBB8_7
# %bb.2:                                #   in Loop: Header=BB8_1 Depth=1
	cmpl	$1, -8(%rbx,%r14)
	ja	.LBB8_7
# %bb.3:                                #   in Loop: Header=BB8_1 Depth=1
	callq	rand
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	movss	.LCPI8_0(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	mulss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	addss	%xmm0, %xmm1
	movss	%xmm1, 16(%rsp)                 # 4-byte Spill
	movss	-20(%rbx,%r14), %xmm0           # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 20(%rsp)                 # 4-byte Spill
	movss	-4(%rbx,%r14), %xmm0            # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 12(%rsp)                 # 4-byte Spill
	callq	rand
	movss	20(%rsp), %xmm0                 # 4-byte Reload
                                        # xmm0 = mem[0],zero,zero,zero
	ucomiss	16(%rsp), %xmm0                 # 4-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	jae	.LBB8_4
# %bb.5:                                #   in Loop: Header=BB8_1 Depth=1
	movss	.LCPI8_4(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	.LCPI8_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	movss	.LCPI8_3(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	mulss	%xmm2, %xmm0
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movaps	%xmm2, %xmm0
	minss	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	maxss	%xmm0, %xmm1
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	leaq	(%rbx,%r14), %r12
	movss	(%rbx,%r14), %xmm0              # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 16(%rsp)                 # 4-byte Spill
	callq	rand
	movss	.LCPI8_3(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI8_4(%rip), %xmm0
	movaps	%xmm2, %xmm1
	jmp	.LBB8_6
.LBB8_4:                                #   in Loop: Header=BB8_1 Depth=1
	movss	.LCPI8_0(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	addss	%xmm1, %xmm0
	addss	%xmm0, %xmm0
	movss	.LCPI8_1(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	addss	%xmm1, %xmm0
	movss	.LCPI8_2(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
	mulss	%xmm1, %xmm0
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	addss	%xmm0, %xmm1
	movss	.LCPI8_3(%rip), %xmm0           # xmm0 = mem[0],zero,zero,zero
	minss	%xmm1, %xmm0
	xorps	%xmm1, %xmm1
	maxss	%xmm0, %xmm1
	movss	%xmm1, 12(%rsp)                 # 4-byte Spill
	leaq	(%r15,%r15,4), %rax
	leaq	(%rbx,%rax,8), %r12
	addq	$36, %r12
	movss	(%rbx,%r14), %xmm0              # xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 16(%rsp)                 # 4-byte Spill
	callq	rand
	movss	.LCPI8_3(%rip), %xmm2           # xmm2 = mem[0],zero,zero,zero
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI8_0(%rip), %xmm0
	addss	.LCPI8_5(%rip), %xmm0
	addss	%xmm0, %xmm0
	movss	.LCPI8_2(%rip), %xmm1           # xmm1 = mem[0],zero,zero,zero
.LBB8_6:                                # %.sink.split
                                        #   in Loop: Header=BB8_1 Depth=1
	addss	.LCPI8_1(%rip), %xmm0
	mulss	%xmm1, %xmm0
	addss	16(%rsp), %xmm0                 # 4-byte Folded Reload
	movaps	%xmm2, %xmm1
	minss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	maxss	%xmm1, %xmm0
	movss	12(%rsp), %xmm1                 # 4-byte Reload
                                        # xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -4(%rbx,%r14)
	movss	%xmm0, (%r12)
.LBB8_7:                                #   in Loop: Header=BB8_1 Depth=1
	incq	%r15
	addq	$40, %r14
	cmpq	$40996, %r14                    # imm = 0xA024
	jne	.LBB8_1
# %bb.8:
	addq	$24, %rsp
	.cfi_def_cfa_offset 40
	popq	%rbx
	.cfi_def_cfa_offset 32
	popq	%r12
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end8:
	.size	_Z7ruleTwoP5agent, .Lfunc_end8-_Z7ruleTwoP5agent
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z9ruleThreeP5agent
.LCPI9_0:
	.long	0x30000000                      # float 4.65661287E-10
.LCPI9_1:
	.long	0x00000000                      # float 0
	.text
	.globl	_Z9ruleThreeP5agent
	.type	_Z9ruleThreeP5agent,@function
_Z9ruleThreeP5agent:                    # @_Z9ruleThreeP5agent
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movl	$28, %r14d
.LBB9_1:                                # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI9_0(%rip), %xmm0
	addss	.LCPI9_1(%rip), %xmm0
	movss	-24(%rbx,%r14), %xmm1           # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jb	.LBB9_4
# %bb.2:                                #   in Loop: Header=BB9_1 Depth=1
	cmpl	$0, (%rbx,%r14)
	jne	.LBB9_4
# %bb.3:                                #   in Loop: Header=BB9_1 Depth=1
	movl	$1, (%rbx,%r14)
	incl	allInfectionsCounter(%rip)
	incl	infectionsPerDay(%rip)
.LBB9_4:                                #   in Loop: Header=BB9_1 Depth=1
	addq	$40, %r14
	cmpq	$40988, %r14                    # imm = 0xA01C
	jne	.LBB9_1
# %bb.5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end9:
	.size	_Z9ruleThreeP5agent, .Lfunc_end9-_Z9ruleThreeP5agent
	.cfi_endproc
                                        # -- End function
	.globl	_Z8ruleFourP5agent              # -- Begin function _Z8ruleFourP5agent
	.type	_Z8ruleFourP5agent,@function
_Z8ruleFourP5agent:                     # @_Z8ruleFourP5agent
	.cfi_startproc
# %bb.0:
	movl	$28, %eax
.LBB10_1:                               # =>This Inner Loop Header: Depth=1
	movl	(%rdi,%rax), %ecx
	cmpl	$1, %ecx
	je	.LBB10_5
# %bb.2:                                #   in Loop: Header=BB10_1 Depth=1
	cmpl	$-1, %ecx
	jne	.LBB10_11
# %bb.3:                                #   in Loop: Header=BB10_1 Depth=1
	movl	-4(%rdi,%rax), %ecx
	testl	%ecx, %ecx
	jle	.LBB10_9
# %bb.4:                                #   in Loop: Header=BB10_1 Depth=1
	decl	%ecx
	movl	%ecx, -4(%rdi,%rax)
	jmp	.LBB10_9
.LBB10_5:                               #   in Loop: Header=BB10_1 Depth=1
	movl	-8(%rdi,%rax), %ecx
	testl	%ecx, %ecx
	jle	.LBB10_7
# %bb.6:                                #   in Loop: Header=BB10_1 Depth=1
	decl	%ecx
	movl	%ecx, -8(%rdi,%rax)
.LBB10_7:                               #   in Loop: Header=BB10_1 Depth=1
	testl	%ecx, %ecx
	jne	.LBB10_11
# %bb.8:                                # %.thread34
                                        #   in Loop: Header=BB10_1 Depth=1
	movl	$-1, (%rdi,%rax)
.LBB10_9:                               # %.thread
                                        #   in Loop: Header=BB10_1 Depth=1
	cmpl	$0, -4(%rdi,%rax)
	jne	.LBB10_11
# %bb.10:                               #   in Loop: Header=BB10_1 Depth=1
	movl	$2, (%rdi,%rax)
	incl	allRecoveryCounter(%rip)
	incl	recoveryPerDay(%rip)
.LBB10_11:                              # %.thread35
                                        #   in Loop: Header=BB10_1 Depth=1
	addq	$40, %rax
	cmpq	$40988, %rax                    # imm = 0xA01C
	jne	.LBB10_1
# %bb.12:
	retq
.Lfunc_end10:
	.size	_Z8ruleFourP5agent, .Lfunc_end10-_Z8ruleFourP5agent
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst4,"aM",@progbits,4
	.p2align	2, 0x0                          # -- Begin function _Z8ruleFiveP5agent
.LCPI11_0:
	.long	0x30000000                      # float 4.65661287E-10
.LCPI11_1:
	.long	0x00000000                      # float 0
	.text
	.globl	_Z8ruleFiveP5agent
	.type	_Z8ruleFiveP5agent,@function
_Z8ruleFiveP5agent:                     # @_Z8ruleFiveP5agent
	.cfi_startproc
# %bb.0:
	pushq	%r14
	.cfi_def_cfa_offset 16
	pushq	%rbx
	.cfi_def_cfa_offset 24
	pushq	%rax
	.cfi_def_cfa_offset 32
	.cfi_offset %rbx, -24
	.cfi_offset %r14, -16
	movq	%rdi, %rbx
	movl	$28, %r14d
.LBB11_1:                               # =>This Inner Loop Header: Depth=1
	callq	rand
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	.LCPI11_0(%rip), %xmm0
	addss	.LCPI11_1(%rip), %xmm0
	movss	-20(%rbx,%r14), %xmm1           # xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jb	.LBB11_4
# %bb.2:                                #   in Loop: Header=BB11_1 Depth=1
	cmpl	$-1, (%rbx,%r14)
	jne	.LBB11_4
# %bb.3:                                #   in Loop: Header=BB11_1 Depth=1
	movl	$-2, (%rbx,%r14)
	incl	allFatalCounter(%rip)
	incl	fatalPerDay(%rip)
.LBB11_4:                               #   in Loop: Header=BB11_1 Depth=1
	addq	$40, %r14
	cmpq	$40988, %r14                    # imm = 0xA01C
	jne	.LBB11_1
# %bb.5:
	addq	$8, %rsp
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%r14
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end11:
	.size	_Z8ruleFiveP5agent, .Lfunc_end11-_Z8ruleFiveP5agent
	.cfi_endproc
                                        # -- End function
	.section	.rodata.cst8,"aM",@progbits,8
	.p2align	3, 0x0                          # -- Begin function main
.LCPI12_0:
	.quad	0x4014000000000000              # double 5
.LCPI12_1:
	.quad	0x3ff0000000000000              # double 1
.LCPI12_2:
	.quad	0x407f400000000000              # double 500
	.text
	.globl	main
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	pushq	%r15
	.cfi_def_cfa_offset 24
	pushq	%r14
	.cfi_def_cfa_offset 32
	pushq	%r13
	.cfi_def_cfa_offset 40
	pushq	%r12
	.cfi_def_cfa_offset 48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	subq	$24, %rsp
	.cfi_def_cfa_offset 80
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	.cfi_offset %rbp, -16
	callq	clock
	movq	%rax, 16(%rsp)                  # 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%edi, %edi
	callq	time
	movl	%eax, %edi
	callq	srand
	movl	$40960, %edi                    # imm = 0xA000
	callq	malloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_Z16initializeAgentsP5agent
	movl	$.Lstr, %edi
	callq	puts@PLT
	movl	$.L.str.11, %edi
	movl	$1024, %esi                     # imm = 0x400
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.12, %edi
	movl	$30, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.13, %edi
	movl	$10, %esi
	xorl	%eax, %eax
	callq	printf
	movsd	.LCPI12_0(%rip), %xmm0          # xmm0 = mem[0],zero
	movl	$.L.str.14, %edi
	movb	$1, %al
	callq	printf
	movsd	.LCPI12_1(%rip), %xmm0          # xmm0 = mem[0],zero
	movl	$.L.str.15, %edi
	movb	$1, %al
	callq	printf
	movsd	.LCPI12_2(%rip), %xmm0          # xmm0 = mem[0],zero
	movl	$.L.str.16, %edi
	movb	$1, %al
	callq	printf
	movl	$.L.str.17, %edi
	movsd	.LCPI12_2(%rip), %xmm0          # xmm0 = mem[0],zero
	movb	$1, %al
	callq	printf
	movl	$.Lstr.1, %edi
	callq	puts@PLT
	xorl	%ebx, %ebx
.LBB12_1:                               # %.preheader
                                        # =>This Loop Header: Depth=1
                                        #     Child Loop BB12_2 Depth 2
	movl	$10, %ebp
.LBB12_2:                               #   Parent Loop BB12_1 Depth=1
                                        # =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_Z7ruleOneP5agent
	movq	%r14, %rdi
	callq	_Z7ruleTwoP5agent
	decl	%ebp
	jne	.LBB12_2
# %bb.3:                                #   in Loop: Header=BB12_1 Depth=1
	movq	%r14, %rdi
	callq	_Z9ruleThreeP5agent
	movq	%r14, %rdi
	callq	_Z8ruleFourP5agent
	movq	%r14, %rdi
	callq	_Z8ruleFiveP5agent
	movl	infectionsPerDay(%rip), %eax
	movl	%eax, infectionHistory(,%rbx,4)
	movl	recoveryPerDay(%rip), %eax
	movl	%eax, recoveryHistory(,%rbx,4)
	movl	fatalPerDay(%rip), %eax
	movl	%eax, fatalHistory(,%rbx,4)
	movl	%r15d, infectionsPerDay(%rip)
	movl	%r15d, recoveryPerDay(%rip)
	movl	%r15d, fatalPerDay(%rip)
	incq	%rbx
	cmpq	$30, %rbx
	jne	.LBB12_1
# %bb.4:
	movl	$.Lstr.2, %edi
	callq	puts@PLT
	movl	allInfectionsCounter(%rip), %esi
	xorl	%r13d, %r13d
	movl	$.L.str.20, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.21, %edi
	xorl	%eax, %eax
	callq	printf
	movq	$-30, %rbx
	xorl	%ebp, %ebp
	movl	$0, 8(%rsp)                     # 4-byte Folded Spill
	movl	$0, 4(%rsp)                     # 4-byte Folded Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	xorl	%esi, %esi
.LBB12_5:                               # =>This Inner Loop Header: Depth=1
	movl	%esi, 12(%rsp)                  # 4-byte Spill
	movl	infectionHistory+120(,%rbx,4), %esi
	movl	$.L.str.22, %edi
	xorl	%eax, %eax
	callq	printf
	movl	12(%rsp), %esi                  # 4-byte Reload
	movl	infectionHistory+120(,%rbx,4), %eax
	addl	%eax, %r12d
	addl	%eax, %r15d
	testl	%eax, %eax
	setg	%al
	testb	$1, %bpl
	sete	%cl
	leal	31(%rbx), %edx
	testb	%cl, %al
	cmovnel	%edx, %esi
	movzbl	%bpl, %ebp
	movl	$1, %edi
	cmovnel	%edi, %ebp
	cmpl	$512, %r12d                     # imm = 0x200
	setge	%al
	testb	$1, %r13b
	sete	%cl
	testb	%cl, %al
	movl	4(%rsp), %eax                   # 4-byte Reload
	cmovnel	%edx, %eax
	movl	%eax, 4(%rsp)                   # 4-byte Spill
	movzbl	%r13b, %r13d
	cmovnel	%edi, %r13d
	cmpl	$1024, %r15d                    # imm = 0x400
	movl	8(%rsp), %eax                   # 4-byte Reload
	cmovel	%edx, %eax
	movl	%eax, 8(%rsp)                   # 4-byte Spill
	incq	%rbx
	jne	.LBB12_5
# %bb.6:
	xorl	%r13d, %r13d
	movl	$.L.str.23, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.24, %edi
	movl	4(%rsp), %esi                   # 4-byte Reload
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.25, %edi
	movl	8(%rsp), %esi                   # 4-byte Reload
	xorl	%eax, %eax
	callq	printf
	movl	allRecoveryCounter(%rip), %esi
	movl	$.L.str.26, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.27, %edi
	xorl	%eax, %eax
	callq	printf
	movq	$-30, %rbx
	xorl	%ebp, %ebp
	movl	$0, 8(%rsp)                     # 4-byte Folded Spill
	movl	$0, 4(%rsp)                     # 4-byte Folded Spill
	xorl	%r12d, %r12d
	xorl	%r10d, %r10d
	xorl	%r15d, %r15d
.LBB12_7:                               # =>This Inner Loop Header: Depth=1
	movl	%r10d, 12(%rsp)                 # 4-byte Spill
	movl	recoveryHistory+120(,%rbx,4), %esi
	movl	$.L.str.22, %edi
	xorl	%eax, %eax
	callq	printf
	movl	12(%rsp), %r10d                 # 4-byte Reload
	movl	recoveryHistory+120(,%rbx,4), %eax
	addl	%eax, %r10d
	addl	%eax, %r12d
	testl	%eax, %eax
	setg	%al
	testb	$1, %bpl
	sete	%cl
	leal	31(%rbx), %edx
	testb	%cl, %al
	cmovnel	%edx, %r15d
	movzbl	%bpl, %ebp
	movl	$1, %edi
	cmovnel	%edi, %ebp
	movl	allRecoveryCounter(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r10d
	setge	%cl
	testb	$1, %r13b
	sete	%sil
	testb	%sil, %cl
	movl	4(%rsp), %ecx                   # 4-byte Reload
	cmovnel	%edx, %ecx
	movl	%ecx, 4(%rsp)                   # 4-byte Spill
	movzbl	%r13b, %r13d
	cmovnel	%edi, %r13d
	cmpl	%eax, %r12d
	movl	8(%rsp), %eax                   # 4-byte Reload
	cmovel	%edx, %eax
	movl	%eax, 8(%rsp)                   # 4-byte Spill
	incq	%rbx
	jne	.LBB12_7
# %bb.8:
	xorl	%r13d, %r13d
	movl	$.L.str.28, %edi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.29, %edi
	movl	4(%rsp), %esi                   # 4-byte Reload
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.30, %edi
	movl	8(%rsp), %esi                   # 4-byte Reload
	xorl	%eax, %eax
	callq	printf
	movl	allFatalCounter(%rip), %esi
	movl	$.L.str.31, %edi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.32, %edi
	xorl	%eax, %eax
	callq	printf
	movq	$-30, %rbx
	xorl	%ebp, %ebp
	movl	$0, 8(%rsp)                     # 4-byte Folded Spill
	movl	$0, 4(%rsp)                     # 4-byte Folded Spill
	xorl	%r12d, %r12d
	xorl	%r10d, %r10d
	xorl	%r15d, %r15d
.LBB12_9:                               # =>This Inner Loop Header: Depth=1
	movl	%r10d, 12(%rsp)                 # 4-byte Spill
	movl	fatalHistory+120(,%rbx,4), %esi
	movl	$.L.str.22, %edi
	xorl	%eax, %eax
	callq	printf
	movl	12(%rsp), %r10d                 # 4-byte Reload
	movl	fatalHistory+120(,%rbx,4), %eax
	addl	%eax, %r10d
	addl	%eax, %r12d
	testl	%eax, %eax
	setg	%al
	testb	$1, %bpl
	sete	%cl
	leal	31(%rbx), %edx
	testb	%cl, %al
	cmovnel	%edx, %r15d
	movzbl	%bpl, %ebp
	movl	$1, %edi
	cmovnel	%edi, %ebp
	movl	allFatalCounter(%rip), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	cmpl	%ecx, %r10d
	setge	%cl
	testb	$1, %r13b
	sete	%sil
	testb	%sil, %cl
	movl	4(%rsp), %ecx                   # 4-byte Reload
	cmovnel	%edx, %ecx
	movl	%ecx, 4(%rsp)                   # 4-byte Spill
	movzbl	%r13b, %r13d
	cmovnel	%edi, %r13d
	cmpl	%eax, %r12d
	movl	8(%rsp), %eax                   # 4-byte Reload
	cmovel	%edx, %eax
	movl	%eax, 8(%rsp)                   # 4-byte Spill
	incq	%rbx
	jne	.LBB12_9
# %bb.10:
	movl	$.L.str.33, %edi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.34, %edi
	movl	4(%rsp), %esi                   # 4-byte Reload
	xorl	%eax, %eax
	callq	printf
	movl	$.L.str.35, %edi
	movl	8(%rsp), %esi                   # 4-byte Reload
	xorl	%eax, %eax
	callq	printf
	callq	clock
	subq	16(%rsp), %rax                  # 8-byte Folded Reload
	cvtsi2ss	%rax, %xmm0
	cvtss2sd	%xmm0, %xmm0
	movl	$.L.str.36, %edi
	movb	$1, %al
	callq	printf
	movq	%r14, %rdi
	callq	free
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_def_cfa_offset 56
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%r12
	.cfi_def_cfa_offset 40
	popq	%r13
	.cfi_def_cfa_offset 32
	popq	%r14
	.cfi_def_cfa_offset 24
	popq	%r15
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	retq
.Lfunc_end12:
	.size	main, .Lfunc_end12-main
	.cfi_endproc
                                        # -- End function
	.type	allInfectionsCounter,@object    # @allInfectionsCounter
	.bss
	.globl	allInfectionsCounter
	.p2align	2, 0x0
allInfectionsCounter:
	.long	0                               # 0x0
	.size	allInfectionsCounter, 4

	.type	infectionsPerDay,@object        # @infectionsPerDay
	.globl	infectionsPerDay
	.p2align	2, 0x0
infectionsPerDay:
	.long	0                               # 0x0
	.size	infectionsPerDay, 4

	.type	infectionHistory,@object        # @infectionHistory
	.globl	infectionHistory
	.p2align	4, 0x0
infectionHistory:
	.zero	120
	.size	infectionHistory, 120

	.type	allRecoveryCounter,@object      # @allRecoveryCounter
	.globl	allRecoveryCounter
	.p2align	2, 0x0
allRecoveryCounter:
	.long	0                               # 0x0
	.size	allRecoveryCounter, 4

	.type	recoveryPerDay,@object          # @recoveryPerDay
	.globl	recoveryPerDay
	.p2align	2, 0x0
recoveryPerDay:
	.long	0                               # 0x0
	.size	recoveryPerDay, 4

	.type	recoveryHistory,@object         # @recoveryHistory
	.globl	recoveryHistory
	.p2align	4, 0x0
recoveryHistory:
	.zero	120
	.size	recoveryHistory, 120

	.type	allFatalCounter,@object         # @allFatalCounter
	.globl	allFatalCounter
	.p2align	2, 0x0
allFatalCounter:
	.long	0                               # 0x0
	.size	allFatalCounter, 4

	.type	fatalPerDay,@object             # @fatalPerDay
	.globl	fatalPerDay
	.p2align	2, 0x0
fatalPerDay:
	.long	0                               # 0x0
	.size	fatalPerDay, 4

	.type	fatalHistory,@object            # @fatalHistory
	.globl	fatalHistory
	.p2align	4, 0x0
fatalHistory:
	.zero	120
	.size	fatalHistory, 120

	.type	.L.str,@object                  # @.str
	.section	.rodata.str1.1,"aMS",@progbits,1
.L.str:
	.asciz	"Agent's no. %d probability of infection: %f\n"
	.size	.L.str, 45

	.type	.L.str.1,@object                # @.str.1
.L.str.1:
	.asciz	"Agent's no. %d external probability of infection: %f\n"
	.size	.L.str.1, 54

	.type	.L.str.2,@object                # @.str.2
.L.str.2:
	.asciz	"Agent's no. %d probability of mortality: %f\n"
	.size	.L.str.2, 45

	.type	.L.str.3,@object                # @.str.3
.L.str.3:
	.asciz	"Agent's no. %d probability of mobility: %f\n"
	.size	.L.str.3, 44

	.type	.L.str.4,@object                # @.str.4
.L.str.4:
	.asciz	"Agent's no. %d probability of short mobility: %f\n"
	.size	.L.str.4, 50

	.type	.L.str.5,@object                # @.str.5
.L.str.5:
	.asciz	"Agent's no. %d incubation time: %d\n"
	.size	.L.str.5, 36

	.type	.L.str.6,@object                # @.str.6
.L.str.6:
	.asciz	"Agent's no. %d recovery time: %d\n"
	.size	.L.str.6, 34

	.type	.L.str.7,@object                # @.str.7
.L.str.7:
	.asciz	"Agent's no. %d infection status: %d\n"
	.size	.L.str.7, 37

	.type	.L.str.8,@object                # @.str.8
.L.str.8:
	.asciz	"Agent's no. %d x position: %f\n"
	.size	.L.str.8, 31

	.type	.L.str.9,@object                # @.str.9
.L.str.9:
	.asciz	"Agent's no. %d y position: %f\n\n"
	.size	.L.str.9, 32

	.type	.L.str.11,@object               # @.str.11
.L.str.11:
	.asciz	"\nNumber of agents: %d\n"
	.size	.L.str.11, 23

	.type	.L.str.12,@object               # @.str.12
.L.str.12:
	.asciz	"Simulation days: %d\n"
	.size	.L.str.12, 21

	.type	.L.str.13,@object               # @.str.13
.L.str.13:
	.asciz	"Max movements per day: %d\n"
	.size	.L.str.13, 27

	.type	.L.str.14,@object               # @.str.14
.L.str.14:
	.asciz	"Maximum radius for local movements: %f\n"
	.size	.L.str.14, 40

	.type	.L.str.15,@object               # @.str.15
.L.str.15:
	.asciz	"Infection limit distance: %f\n"
	.size	.L.str.15, 30

	.type	.L.str.16,@object               # @.str.16
.L.str.16:
	.asciz	"P: %f\n"
	.size	.L.str.16, 7

	.type	.L.str.17,@object               # @.str.17
.L.str.17:
	.asciz	"Q: %f\n"
	.size	.L.str.17, 7

	.type	.L.str.20,@object               # @.str.20
.L.str.20:
	.asciz	"\nTotal infected cases: %d\n"
	.size	.L.str.20, 27

	.type	.L.str.21,@object               # @.str.21
.L.str.21:
	.asciz	"Infection history: "
	.size	.L.str.21, 20

	.type	.L.str.22,@object               # @.str.22
.L.str.22:
	.asciz	"%d "
	.size	.L.str.22, 4

	.type	.L.str.23,@object               # @.str.23
.L.str.23:
	.asciz	"\nZero day infection case: %d\n"
	.size	.L.str.23, 30

	.type	.L.str.24,@object               # @.str.24
.L.str.24:
	.asciz	"Half population infected day: %d\n"
	.size	.L.str.24, 34

	.type	.L.str.25,@object               # @.str.25
.L.str.25:
	.asciz	"All population infected day: %d\n"
	.size	.L.str.25, 33

	.type	.L.str.26,@object               # @.str.26
.L.str.26:
	.asciz	"\nTotal recovery cases: %d\n"
	.size	.L.str.26, 27

	.type	.L.str.27,@object               # @.str.27
.L.str.27:
	.asciz	"Recovery history: "
	.size	.L.str.27, 19

	.type	.L.str.28,@object               # @.str.28
.L.str.28:
	.asciz	"\nZero day recovery case: %d\n"
	.size	.L.str.28, 29

	.type	.L.str.29,@object               # @.str.29
.L.str.29:
	.asciz	"Half agents recovered day: %d\n"
	.size	.L.str.29, 31

	.type	.L.str.30,@object               # @.str.30
.L.str.30:
	.asciz	"All agents recovered day: %d\n"
	.size	.L.str.30, 30

	.type	.L.str.31,@object               # @.str.31
.L.str.31:
	.asciz	"\nTotal fatal cases: %d\n"
	.size	.L.str.31, 24

	.type	.L.str.32,@object               # @.str.32
.L.str.32:
	.asciz	"Fatal history: "
	.size	.L.str.32, 16

	.type	.L.str.33,@object               # @.str.33
.L.str.33:
	.asciz	"\nZero day fatal case: %d\n"
	.size	.L.str.33, 26

	.type	.L.str.34,@object               # @.str.34
.L.str.34:
	.asciz	"Half agents fatal day: %d\n"
	.size	.L.str.34, 27

	.type	.L.str.35,@object               # @.str.35
.L.str.35:
	.asciz	"All agents fatal day: %d\n"
	.size	.L.str.35, 26

	.type	.L.str.36,@object               # @.str.36
.L.str.36:
	.asciz	"\nTime CPU: %f miliseconds. \n"
	.size	.L.str.36, 29

	.type	__hip_cuid_,@object             # @__hip_cuid_
	.bss
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               # 0x0
	.size	__hip_cuid_, 1

	.type	.Lstr,@object                   # @str
	.section	.rodata.str1.1,"aMS",@progbits,1
.Lstr:
	.asciz	"---------------------Simulation parameters---------------------"
	.size	.Lstr, 64

	.type	.Lstr.1,@object                 # @str.1
.Lstr.1:
	.asciz	"\n--------------------Initializing simulation--------------------"
	.size	.Lstr.1, 65

	.type	.Lstr.2,@object                 # @str.2
.Lstr.2:
	.asciz	"\n---------------------Simulation terminated---------------------"
	.size	.Lstr.2, 65

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_

	.text
	.p2alignl 7, 3214868480
	.fill 96, 4, 3214868480
	.type	__hip_cuid_,@object             ; @__hip_cuid_
	.section	.bss,"aw",@nobits
	.globl	__hip_cuid_
__hip_cuid_:
	.byte	0                               ; 0x0
	.size	__hip_cuid_, 1

	.ident	"AMD clang version 18.0.0git (https://github.com/RadeonOpenCompute/llvm-project roc-6.3.2 25012 e5bf7e55c91490b07c49d8960fa7983d864936c4)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym __hip_cuid_
	.amdgcn_target "amdgcn-amd-amdhsa--gfx1100"
	.amdgpu_metadata
---
amdhsa.kernels:  []
amdhsa.target:   amdgcn-amd-amdhsa--gfx1100
amdhsa.version:
  - 1
  - 2
...

	.end_amdgpu_metadata
