// File: /workspace/github_c_makefile_star2_O1/trumabrat[P]GrandProjet/chaine.c
// Function: afficheChainesSVG
void afficheChainesSVG(Chaines *C, char* nomInstance){
    int i;
    double maxx=0,maxy=0,minx=1e6,miny=1e6;
    CellChaine *ccour;
    CellPoint *pcour;
    double precx,precy;
    SVGwriter svg;
    ccour=C->chaines;
    while (ccour!=NULL){
        pcour=ccour->points;
        while (pcour!=NULL){
            if (maxx<pcour->x) maxx=pcour->x;
            if (maxy<pcour->y) maxy=pcour->y;
            if (minx>pcour->x) minx=pcour->x;
            if (miny>pcour->y) miny=pcour->y;  
            pcour=pcour->suiv;
        }
    ccour=ccour->suiv;
    }
    SVGinit(&svg,nomInstance,500,500);
    ccour=C->chaines;
    while (ccour!=NULL){
        pcour=ccour->points;
        SVGlineRandColor(&svg);
        SVGpoint(&svg,500*(pcour->x-minx)/(maxx-minx),500*(pcour->y-miny)/(maxy-miny)); 
        precx=pcour->x;
        precy=pcour->y;  
        pcour=pcour->suiv;
        while (pcour!=NULL){
            SVGline(&svg,500*(precx-minx)/(maxx-minx),500*(precy-miny)/(maxy-miny),500*(pcour->x-minx)/(maxx-minx),500*(pcour->y-miny)/(maxy-miny));
            SVGpoint(&svg,500*(pcour->x-minx)/(maxx-minx),500*(pcour->y-miny)/(maxy-miny));
            precx=pcour->x;
            precy=pcour->y;    
            pcour=pcour->suiv;
        }
        ccour=ccour->suiv;
    }
    SVGfinalize(&svg);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x1a11
xorpd %xmm2, %xmm2
movsd 0x266f(%rip), %xmm0     # 0x4008
movapd %xmm0, %xmm1
xorpd %xmm3, %xmm3
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x19e6
movsd (%rcx), %xmm4
movsd 0x8(%rcx), %xmm7
movapd %xmm4, %xmm5
maxsd %xmm3, %xmm5
movapd %xmm7, %xmm6
maxsd %xmm2, %xmm6
minsd %xmm1, %xmm4
minsd %xmm0, %xmm7
movq 0x10(%rcx), %rcx
movapd %xmm7, %xmm0
movapd %xmm4, %xmm1
movapd %xmm6, %xmm2
movapd %xmm5, %xmm3
testq %rcx, %rcx
jne 0x19aa
jmp 0x19f6
movapd %xmm3, %xmm5
movapd %xmm2, %xmm6
movapd %xmm1, %xmm4
movapd %xmm0, %xmm7
movq 0x10(%rax), %rax
movapd %xmm7, %xmm0
movapd %xmm4, %xmm1
movapd %xmm6, %xmm2
movapd %xmm5, %xmm3
testq %rax, %rax
jne 0x19a1
jmp 0x1a25
movsd 0x25ef(%rip), %xmm4     # 0x4008
xorpd %xmm5, %xmm5
xorpd %xmm6, %xmm6
movapd %xmm4, %xmm7
movsd %xmm7, 0x10(%rsp)
movsd %xmm6, (%rsp)
movsd %xmm5, 0x8(%rsp)
movsd %xmm4, 0x18(%rsp)
leaq 0x20(%rsp), %rdi
movl $0x1f4, %edx            # imm = 0x1F4
movl $0x1f4, %ecx            # imm = 0x1F4
callq 0x32f4
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1baf
movsd 0x8(%rsp), %xmm0
subsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
movsd %xmm0, (%rsp)
leaq 0x20(%rsp), %rbx
movq 0x8(%r14), %r12
movq %rbx, %rdi
callq 0x3437
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
subsd 0x18(%rsp), %xmm0
movsd 0x262d(%rip), %xmm2     # 0x40d8
mulsd %xmm2, %xmm0
divsd 0x8(%rsp), %xmm0
subsd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm1
divsd (%rsp), %xmm1
movq %rbx, %rdi
callq 0x347a
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x1ba2
movq %rax, %r15
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
movsd 0x18(%rsp), %xmm2
subsd %xmm2, %xmm0
movapd %xmm2, %xmm5
movsd 0x25d8(%rip), %xmm4     # 0x40d8
mulsd %xmm4, %xmm0
movsd 0x8(%rsp), %xmm2
divsd %xmm2, %xmm0
movapd %xmm2, %xmm6
movsd 0x10(%rsp), %xmm2
subsd %xmm2, %xmm1
movapd %xmm2, %xmm7
mulsd %xmm4, %xmm1
movsd (%rsp), %xmm2
divsd %xmm2, %xmm1
movapd %xmm2, %xmm8
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm3
subsd %xmm5, %xmm2
mulsd %xmm4, %xmm2
divsd %xmm6, %xmm2
subsd %xmm7, %xmm3
mulsd %xmm4, %xmm3
divsd %xmm8, %xmm3
movq %rbx, %rdi
callq 0x3496
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
subsd 0x18(%rsp), %xmm0
movsd 0x2563(%rip), %xmm2     # 0x40d8
mulsd %xmm2, %xmm0
divsd 0x8(%rsp), %xmm0
subsd 0x10(%rsp), %xmm1
mulsd %xmm2, %xmm1
divsd (%rsp), %xmm1
movq %rbx, %rdi
callq 0x347a
movq 0x10(%r15), %rax
movq %r15, %r12
jmp 0x1ad1
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1a84
leaq 0x20(%rsp), %rdi
callq 0x34c2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq