// File: /workspace/github_cpp_makefile_star2_O3/CDISC2020[P]Projet_satellite_agile/src/FDIR/main_FDIR.cpp
// Function: maj_listpid()
void maj_listpid()
{
	string line;
	string listpid;
	ifstream fichier;
	ofstream wfichier;

	// Lecture pid FDIR
	fichier.open("pid_FDIR");
	if(!fichier){
		cout << "Failed to open pid_FDIR" << endl;
		exit(1);
	}
	getline(fichier,line);
	listpid.append(line);
	listpid.append("\n");
	fichier.close();

	// Lecture pid COM
	fichier.open("pid_COM");
	if(!fichier){
		cout << "Failed to open pid_FDIR" << endl;
		exit(1);
	}
	getline(fichier,line);
	listpid.append(line);
	listpid.append("\n");
	fichier.close();

	// Lecture pid PM
	fichier.open("pid_PM");
	if(!fichier){
		cout << "Failed to open pid_FDIR" << endl;
		exit(1);
	}
	getline(fichier,line);
	listpid.append(line);
	listpid.append("\n");
	fichier.close();

////////// Ecritude du listpid
	cout << "listpid=" << listpid << endl;
	wfichier.open("listpid");
	if(!wfichier)
	{
		cout << "Failed to open listpid" << endl;
		exit(1);
	}
	wfichier << listpid;
	wfichier.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x448, %rsp            # imm = 0x448
leaq -0x48(%rbp), %r14
movq %r14, -0x10(%r14)
xorl %eax, %eax
movq %rax, -0x8(%r14)
movb %al, (%r14)
leaq -0x28(%rbp), %r15
movq %r15, -0x10(%r15)
movq %rax, -0x8(%r15)
movb %al, (%r15)
leaq -0x260(%rbp), %rdi
callq 0x2220
leaq -0x460(%rbp), %rdi
callq 0x2380
leaq 0x20c1(%rip), %rsi      # 0x51f5
leaq -0x260(%rbp), %rdi
movl $0x8, %edx
callq 0x2130
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x240(%rbp,%rax)
jne 0x33d2
leaq (%rax,%rbp), %rdi
addq $-0x260, %rdi           # imm = 0xFDA0
movl $0xa, %esi
callq 0x2200
movsbl %al, %edx
leaq -0x260(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x23d0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x20c0
leaq 0x1e8d(%rip), %rsi      # 0x502b
leaq -0x38(%rbp), %rdi
callq 0x23e0
leaq -0x260(%rbp), %rdi
callq 0x2090
leaq 0x2044(%rip), %rsi      # 0x51fe
leaq -0x260(%rbp), %rdi
movl $0x8, %edx
callq 0x2130
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x240(%rbp,%rax)
jne 0x33f8
leaq (%rax,%rbp), %rdi
addq $-0x260, %rdi           # imm = 0xFDA0
movl $0xa, %esi
callq 0x2200
movsbl %al, %edx
leaq -0x260(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x23d0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x20c0
leaq 0x1e07(%rip), %rsi      # 0x502b
leaq -0x38(%rbp), %rdi
callq 0x23e0
leaq -0x260(%rbp), %rdi
callq 0x2090
leaq 0x1fc6(%rip), %rsi      # 0x5206
leaq -0x260(%rbp), %rdi
movl $0x8, %edx
callq 0x2130
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x240(%rbp,%rax)
jne 0x341e
leaq (%rax,%rbp), %rdi
addq $-0x260, %rdi           # imm = 0xFDA0
movl $0xa, %esi
callq 0x2200
movsbl %al, %edx
leaq -0x260(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x23d0
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x20c0
leaq 0x1d81(%rip), %rsi      # 0x502b
leaq -0x38(%rbp), %rdi
callq 0x23e0
leaq -0x260(%rbp), %rdi
callq 0x2090
movq 0x4d0a(%rip), %rdi      # 0x7fd0
leaq 0x1f40(%rip), %rsi      # 0x520d
movl $0x8, %edx
callq 0x2240
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq 0x4cea(%rip), %rdi      # 0x7fd0
callq 0x2240
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2200
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq 0x1f09(%rip), %rsi      # 0x5225
leaq -0x460(%rbp), %rdi
movl $0x10, %edx
callq 0x2060
movq -0x460(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x440(%rbp,%rax)
jne 0x3444
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq -0x460(%rbp), %rdi
callq 0x2240
leaq -0x460(%rbp), %rdi
callq 0x22c0
movq 0x4c5b(%rip), %rax      # 0x7fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x458(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x460(%rbp,%rcx)
callq 0x21a0
leaq -0x368(%rbp), %rdi
callq 0x20d0
leaq -0x260(%rbp), %rdi
callq 0x20b0
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x33b6
callq 0x21e0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x33c4
callq 0x21e0
addq $0x448, %rsp            # imm = 0x448
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x4bf7(%rip), %rdi      # 0x7fd0
leaq 0x1e06(%rip), %rsi      # 0x51e6
movl $0x17, %edx
callq 0x2240
movq 0x4bdf(%rip), %rdi      # 0x7fd0
callq 0x2110
jmp 0x3468
movq 0x4bd1(%rip), %rdi      # 0x7fd0
leaq 0x1de0(%rip), %rsi      # 0x51e6
movl $0x17, %edx
callq 0x2240
movq 0x4bb9(%rip), %rdi      # 0x7fd0
callq 0x2110
jmp 0x3468
movq 0x4bab(%rip), %rdi      # 0x7fd0
leaq 0x1dba(%rip), %rsi      # 0x51e6
movl $0x17, %edx
callq 0x2240
movq 0x4b93(%rip), %rdi      # 0x7fd0
callq 0x2110
jmp 0x3468
movq 0x4b85(%rip), %rdi      # 0x7fd0
leaq 0x1dc4(%rip), %rsi      # 0x5216
movl $0x16, %edx
callq 0x2240
movq 0x4b6d(%rip), %rdi      # 0x7fd0
callq 0x2110
movl $0x1, %edi
callq 0x2260
movq %rax, %rbx
jmp 0x348b
movq %rax, %rbx
jmp 0x3497
movq %rax, %rbx
leaq -0x460(%rbp), %rdi
callq 0x22f0
leaq -0x260(%rbp), %rdi
callq 0x20b0
movq -0x38(%rbp), %rdi
cmpq %r15, %rdi
je 0x34a5
callq 0x21e0
movq -0x58(%rbp), %rdi
cmpq %r14, %rdi
je 0x34b3
callq 0x21e0
movq %rbx, %rdi
callq 0x23b0