// File: dcarrey[P]hgt-detection/./fonctions.cpp
// Function: copyHGT(HGT, HGT*)
void copyHGT(struct HGT source,struct HGT *dest){
	int j;
	dest->trivial = source.trivial;
	dest->valide = source.valide;
	dest->source_A = source.source_A;
	dest->source_B = source.source_B;
	dest->dest_A = source.dest_A;
	dest->dest_B = source.dest_B;
	dest->crit.LS = source.crit.LS;
	dest->crit.RF = source.crit.RF;
	dest->crit.BD = source.crit.BD;
	dest->crit.rLS = source.crit.rLS;
	dest->crit.rRF = source.crit.rRF;
	dest->crit.rBD = source.crit.rBD;
	dest->crit.QD = source.crit.QD;
	dest->listSource = (int*) malloc((source.listSource[0]+1)*sizeof(int));
	dest->listDestination = (int*) malloc((source.listDestination[0]+1)*sizeof(int));
	dest->listSource[0] = source.listSource[0];
	for(j=1;j<=dest->listSource[0];j++){
		dest->listSource[j] = source.listSource[j];
	}
	dest->listDestination[0] = source.listDestination[0];
	for(j=1;j<=dest->listDestination[0];j++){
		dest->listDestination[j] = source.listDestination[j];
	}

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movl 0x90(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x90(%rcx)
movl (%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, (%rcx)
movl 0x80(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x80(%rcx)
movl 0x84(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x84(%rcx)
movl 0x88(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x88(%rcx)
movl 0x8c(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x8c(%rcx)
movsd 0x20(%rax), %xmm0
movq -0x8(%rbp), %rcx
movsd %xmm0, 0x20(%rcx)
movl 0x50(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x50(%rcx)
movsd 0x30(%rax), %xmm0
movq -0x8(%rbp), %rcx
movsd %xmm0, 0x30(%rcx)
movsd 0x28(%rax), %xmm0
movq -0x8(%rbp), %rcx
movsd %xmm0, 0x28(%rcx)
movl 0x40(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x40(%rcx)
movsd 0x38(%rax), %xmm0
movq -0x8(%rbp), %rcx
movsd %xmm0, 0x38(%rcx)
movl 0x54(%rax), %edx
movq -0x8(%rbp), %rcx
movl %edx, 0x54(%rcx)
movq 0x10(%rax), %rax
movl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rdx, 0x10(%rcx)
movq 0x18(%rax), %rax
movl (%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
shlq $0x2, %rdi
callq 0x1110
movq %rax, %rdx
movq -0x18(%rbp), %rax
movq -0x8(%rbp), %rcx
movq %rdx, 0x18(%rcx)
movq 0x10(%rax), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl %ecx, (%rax)
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl (%rcx), %eax
jg 0x12ee9
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x12eb1
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movl (%rax), %ecx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movl %ecx, (%rax)
movl $0x1, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x18(%rcx), %rcx
cmpl (%rcx), %eax
jg 0x12f3c
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x12f04
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)