// File: /workspace/github_c_makefile_star2_O0/DVaronos[P]AnLogProject1/list.c
// Function: AppendCList
CList* AppendCList(CList* L ,CList* N){
	CList* T=L;
	CList* Head;
	Head=N; //To head einai h kefali ths listas N

	int ncount = N->camera_count;
	L->camera_count += ncount; 	//enhmerwnoume to count

	N=N->Next; //O diktis N pleon dixnei ston porto komvo me dedomena ths listas N kai oxi stin kefali ths

	if(Head->Diffrend!=NULL){ //	Oles oi klikes pou htan diaforetikes ap to head twra tha einai diaforetikes me thn L
		TList* Temp=Head->Diffrend;
		while(Temp->Next!=NULL){	//Gia kathe klika diaforetikh ths Head
			Temp=Temp->Next;
			if(L->Diffrend==NULL) L->Diffrend=CreateTList();	//Ean h L den exei Diffrend List dimiourgei
			if(FindTList(L->Diffrend,Temp->node)){	//Ean h paron CList pou einai diaforetikh me thn Head den einai diaforetikh ths L
				InsertTList(L->Diffrend,Temp->node);	//Vale thn stis diaforetikes ths L
				ReplaceTList(Temp->node->Diffrend,Head,L);	//Sthn Diffrend list ths parousas CList antikatestise thn Head me thn L
			}else{	//Ean h paron CList pou einai diaforetikh me thn Head einai diaforetikh ths L diegrapse apo thn Diffrend ths thn  Head
				RemoveTList(Temp->node->Diffrend,Head);
			}
		}
		FreeTList(Head->Diffrend);
	}

	Head->Next=NULL;
	free(Head);	//Apodesmevo thn kefali ths listas N
	while(L->Next!=NULL){//Pigene ston telefteo komvo ths listas L
		L=L->Next;
	}
	L->Next=N;//Valethn lista N sto telos ths listas L
	while(L->Next!=NULL){//O diktis tou komvou pou einai apothikevmeno to kathe neo product na deixnei se afthn thn klika(diladi thn lista L)
		L=L->Next;
		L->Head->clique=T;
	}
	return T;//Epestrepse thn L
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movq -0x8(%rbp), %rax
addl 0x20(%rax), %ecx
movl %ecx, 0x20(%rax)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x44b1
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x44a4
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x4444
callq 0x4750
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0x4230
cmpl $0x0, %eax
je 0x448b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rsi
callq 0x4360
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x4520
jmp 0x449f
movq -0x30(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x4570
jmp 0x440e
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x45f0
movq -0x20(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x44df
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x44c6
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4514
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x10(%rax)
jmp 0x44eb
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop