// File: /workspace/github_c_makefile_star2_O3/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 $0x78, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x19e1
movapd 0x275f(%rip), %xmm2     # 0x40e0
xorpd %xmm3, %xmm3
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x19b7
movapd %xmm3, %xmm0
movapd %xmm2, %xmm1
movupd (%rcx), %xmm2
movapd %xmm2, %xmm3
maxpd %xmm0, %xmm3
minpd %xmm1, %xmm2
movq 0x10(%rcx), %rcx
movapd %xmm3, %xmm0
movapd %xmm2, %xmm1
testq %rcx, %rcx
jne 0x1996
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0x1985
movapd %xmm2, 0x30(%rsp)
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
movapd %xmm2, 0x20(%rsp)
movapd %xmm3, 0x10(%rsp)
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
movapd %xmm3, (%rsp)
jmp 0x1a04
movsd 0x261f(%rip), %xmm0     # 0x4008
xorpd %xmm1, %xmm1
movapd %xmm1, 0x10(%rsp)
movapd %xmm1, (%rsp)
movapd %xmm0, 0x30(%rsp)
movapd %xmm0, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
movl $0x1f4, %edx            # imm = 0x1F4
movl $0x1f4, %ecx            # imm = 0x1F4
callq 0x30e4
movq 0x8(%rbx), %r14
testq %r14, %r14
je 0x1b83
movapd 0x10(%rsp), %xmm0
subsd 0x30(%rsp), %xmm0
movapd %xmm0, 0x10(%rsp)
movapd (%rsp), %xmm0
subsd 0x20(%rsp), %xmm0
movapd %xmm0, (%rsp)
leaq 0x40(%rsp), %rbx
movq 0x8(%r14), %r12
movq %rbx, %rdi
callq 0x3227
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
subsd 0x30(%rsp), %xmm0
movsd 0x2665(%rip), %xmm2     # 0x40d8
mulsd %xmm2, %xmm0
divsd 0x10(%rsp), %xmm0
subsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm1
divsd (%rsp), %xmm1
movq %rbx, %rdi
callq 0x326a
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x1b76
movq %rax, %r15
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
movapd 0x30(%rsp), %xmm2
subsd %xmm2, %xmm0
movapd %xmm2, %xmm5
movapd %xmm2, 0x30(%rsp)
movsd 0x260a(%rip), %xmm4     # 0x40d8
mulsd %xmm4, %xmm0
movapd 0x10(%rsp), %xmm2
divsd %xmm2, %xmm0
movapd %xmm2, %xmm6
movapd 0x20(%rsp), %xmm2
subsd %xmm2, %xmm1
movapd %xmm2, %xmm7
movapd %xmm2, 0x20(%rsp)
mulsd %xmm4, %xmm1
movapd (%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 0x3286
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
subsd 0x30(%rsp), %xmm0
movsd 0x258f(%rip), %xmm2     # 0x40d8
mulsd %xmm2, %xmm0
divsd 0x10(%rsp), %xmm0
subsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm1
divsd (%rsp), %xmm1
movq %rbx, %rdi
callq 0x326a
movq 0x10(%r15), %rax
movq %r15, %r12
jmp 0x1a99
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1a4c
leaq 0x40(%rsp), %rdi
callq 0x32b2
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq