// File: /workspace/github_c_makefile_star2_O0/trumabrat[P]GrandProjet/SVGwriter.c
// Function: SVGinit
void SVGinit(SVGwriter *svg, char *nom, int sizeX, int sizeY) {
  char filename[100];

  strcpy(filename,nom);
  strcat(filename,".html");
  
  svg->file=fopen(filename, "w");

  if (svg->file==NULL) {
    printf("Unable to create %s\n",nom);
    exit(1);
  }
  
  strcpy(svg->lineColor, Red);
  strcpy(svg->pointColor, Black);

  svg->sizeX=sizeX;
  svg->sizeY=sizeY;

  svg->gencol[0]='0';svg->gencol[1]='1';svg->gencol[2]='2';svg->gencol[3]='3';
  svg->gencol[4]='4';svg->gencol[5]='5';svg->gencol[6]='6';svg->gencol[7]='7';
  svg->gencol[8]='8';svg->gencol[9]='9';svg->gencol[10]='A';svg->gencol[11]='B';
  svg->gencol[12]='C';svg->gencol[13]='D';svg->gencol[14]='E';svg->gencol[15]='F';

  fprintf(svg->file,"<html><body><svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.2\"");
  fprintf(svg->file, " width=\"100%%\" height=\"100%%\"");
  fprintf(svg->file, " viewBox=\"%lf %lf %lf %lf\"", -2.0, -2.0, sizeX+7.0, sizeY+7.0);
  fprintf(svg->file, " preserveAspectRatio=\"yes\">\n");
  fprintf(svg->file, "<g >\n\n");

   svg->lineColor[0]='#';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
leaq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1040
leaq -0x80(%rbp), %rdi
leaq 0x10ef(%rip), %rsi      # 0x5360
callq 0x10f0
leaq -0x80(%rbp), %rdi
leaq 0xdb7(%rip), %rsi       # 0x5038
callq 0x10e0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x42b8
movq -0x10(%rbp), %rsi
leaq 0x10bf(%rip), %rdi      # 0x5366
movb $0x0, %al
callq 0x1090
movl $0x1, %edi
callq 0x1100
movq -0x8(%rbp), %rdi
leaq 0x10b8(%rip), %rsi      # 0x537b
callq 0x1040
movq -0x8(%rbp), %rdi
addq $0xa, %rdi
leaq 0x10ac(%rip), %rsi      # 0x5383
callq 0x1040
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x14(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x8(%rbp), %rax
movb $0x30, 0x28(%rax)
movq -0x8(%rbp), %rax
movb $0x31, 0x29(%rax)
movq -0x8(%rbp), %rax
movb $0x32, 0x2a(%rax)
movq -0x8(%rbp), %rax
movb $0x33, 0x2b(%rax)
movq -0x8(%rbp), %rax
movb $0x34, 0x2c(%rax)
movq -0x8(%rbp), %rax
movb $0x35, 0x2d(%rax)
movq -0x8(%rbp), %rax
movb $0x36, 0x2e(%rax)
movq -0x8(%rbp), %rax
movb $0x37, 0x2f(%rax)
movq -0x8(%rbp), %rax
movb $0x38, 0x30(%rax)
movq -0x8(%rbp), %rax
movb $0x39, 0x31(%rax)
movq -0x8(%rbp), %rax
movb $0x41, 0x32(%rax)
movq -0x8(%rbp), %rax
movb $0x42, 0x33(%rax)
movq -0x8(%rbp), %rax
movb $0x43, 0x34(%rax)
movq -0x8(%rbp), %rax
movb $0x44, 0x35(%rax)
movq -0x8(%rbp), %rax
movb $0x45, 0x36(%rax)
movq -0x8(%rbp), %rax
movb $0x46, 0x37(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq 0x100c(%rip), %rsi      # 0x538b
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq 0x1038(%rip), %rsi      # 0x53cd
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
cvtsi2sdl -0x14(%rbp), %xmm2
movsd 0xfa7(%rip), %xmm0      # 0x5358
addsd %xmm0, %xmm2
cvtsi2sdl -0x18(%rbp), %xmm3
movsd 0xf96(%rip), %xmm0      # 0x5358
addsd %xmm0, %xmm3
leaq 0x101e(%rip), %rsi      # 0x53eb
movsd 0xf7b(%rip), %xmm1      # 0x5350
movaps %xmm1, %xmm0
movb $0x4, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq 0x1018(%rip), %rsi      # 0x5406
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
leaq 0x101f(%rip), %rsi      # 0x5423
movb $0x0, %al
callq 0x10c0
movq -0x8(%rbp), %rax
movb $0x23, (%rax)
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)