// File: /workspace/github_c_makefile_star2_O2/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
addq $0x8, %rbx
movapd 0x17b9(%rip), %xmm2     # 0x30e0
xorpd %xmm3, %xmm3
movq %rbx, %rax
movq (%rax), %rax
testq %rax, %rax
je 0x1966
leaq 0x8(%rax), %rcx
movq (%rcx), %rcx
testq %rcx, %rcx
je 0x1960
movupd (%rcx), %xmm0
movapd %xmm0, %xmm1
maxpd %xmm3, %xmm1
minpd %xmm2, %xmm0
addq $0x10, %rcx
movapd %xmm1, %xmm3
movapd %xmm0, %xmm2
jmp 0x193a
addq $0x10, %rax
jmp 0x192e
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movl $0x1f4, %edx            # imm = 0x1F4
movl $0x1f4, %ecx            # imm = 0x1F4
movapd %xmm2, 0x10(%rsp)
movapd %xmm3, (%rsp)
callq 0x2d6c
movapd (%rsp), %xmm1
movapd 0x10(%rsp), %xmm0
subpd %xmm0, %xmm1
movapd %xmm0, %xmm2
unpckhpd %xmm0, %xmm2            # xmm2 = xmm2[1],xmm0[1]
movapd %xmm1, %xmm3
unpckhpd %xmm1, %xmm3            # xmm3 = xmm3[1],xmm1[1]
movapd %xmm1, (%rsp)
movapd %xmm2, 0x30(%rsp)
movapd %xmm3, 0x20(%rsp)
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x1a9b
movq 0x8(%rbx), %r12
movq %r14, %rdi
callq 0x2ea5
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
subsd 0x10(%rsp), %xmm0
movsd 0x1705(%rip), %xmm2     # 0x30f0
mulsd %xmm2, %xmm0
divsd (%rsp), %xmm0
subsd 0x30(%rsp), %xmm1
mulsd %xmm2, %xmm1
divsd 0x20(%rsp), %xmm1
movq %r14, %rdi
callq 0x2edf
movq 0x10(%r12), %r15
testq %r15, %r15
je 0x1a92
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
movapd 0x10(%rsp), %xmm4
subsd %xmm4, %xmm0
movsd 0x16ba(%rip), %xmm8     # 0x30f0
mulsd %xmm8, %xmm0
movapd (%rsp), %xmm5
divsd %xmm5, %xmm0
movapd 0x30(%rsp), %xmm6
subsd %xmm6, %xmm1
mulsd %xmm8, %xmm1
movapd 0x20(%rsp), %xmm7
divsd %xmm7, %xmm1
movsd (%r15), %xmm2
movsd 0x8(%r15), %xmm3
subsd %xmm4, %xmm2
mulsd %xmm8, %xmm2
divsd %xmm5, %xmm2
subsd %xmm6, %xmm3
mulsd %xmm8, %xmm3
divsd %xmm7, %xmm3
movq %r14, %rdi
callq 0x2efb
movq %r15, %r12
jmp 0x19d0
addq $0x10, %rbx
jmp 0x19b8
leaq 0x40(%rsp), %rdi
callq 0x2f27
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq