// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32.c
// Function: elf32_writeobject
void elf32_writeobject(struct GlobalVars *gv,FILE *f,uint16_t m,int8_t endian,
                       uint8_t (*reloc_vlink2elf)(struct Reloc *))
/* creates an ELF32 relocatable object file */
{
  uint32_t sh_off,shstrndx,stabndx;

  elf32_initoutput(gv,sizeof(struct Elf32_Ehdr),endian);
  elf32_makestabs(gv);
  elf32_stdsymtab(gv,STB_LOCAL,STT_FILE);

  elf32_makeshdrs(gv);
  elf32_stdsymtab(gv,STB_LOCAL,0);
  elf32symlist.global_index = elf32symlist.nextindex;
  elf32_stdsymtab(gv,STB_WEAK,0);
  elf32_stdsymtab(gv,STB_GLOBAL,0);
  elf32_addrelocs(gv,reloc_vlink2elf);

  elf32_makestabstr();
  shstrndx = elf32shdridx;
  elf32_makeshstrtab();
  sh_off = elf32offset;
  stabndx = elf32shdridx;
  elf32offset += (elf32shdridx+2) * sizeof(struct Elf32_Shdr);
  elf32_makesymtab(elf32shdridx+1);
  elf32_makestrtab();

  elf32_header(f,ET_REL,m,0,0,sh_off,0,0,elf32shdridx,
               shstrndx,endian==_BIG_ENDIAN_);
  elf32_writesections(gv,f);
  elf32_writestabstr(f);
  elf32_writestrtab(f,&elf32shstrlist);
  fwrite_align(f,2,ftell(f));
  elf32_writeshdrs(gv,f,elf32offset,stabndx);
  elf32_writesymtab(f,&elf32symlist);
  elf32_writestrtab(f,&elf32stringlist);
  fwrite_align(f,2,ftell(f));
  elf32_writerelocs(gv,f);
}

// Assembly:
subq $0x68, %rsp
movb %cl, %al
movw %dx, %cx
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movw %cx, 0x56(%rsp)
movb %al, 0x55(%rsp)
movq %r8, 0x48(%rsp)
movq 0x60(%rsp), %rdi
movl $0x34, %esi
movsbl 0x55(%rsp), %edx
callq 0x264c0
movq 0x60(%rsp), %rdi
callq 0x25e80
movq 0x60(%rsp), %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x243b0
movq 0x60(%rsp), %rdi
callq 0x24da0
movq 0x60(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x243b0
movl 0x1974a(%rip), %eax     # 0x40208
movl %eax, 0x19748(%rip)     # 0x4020c
movq 0x60(%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x243b0
movq 0x60(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x243b0
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x25580
callq 0x25cf0
movl 0x1e1f0(%rip), %eax     # 0x44cf0
movl %eax, 0x40(%rsp)
callq 0x25bb0
movq 0x1e1e8(%rip), %rax     # 0x44cf8
movl %eax, 0x44(%rsp)
movl 0x1e1d6(%rip), %eax     # 0x44cf0
movl %eax, 0x3c(%rsp)
movl 0x1e1cc(%rip), %eax     # 0x44cf0
addl $0x2, %eax
movl %eax, %eax
imulq $0x28, %rax, %rax
addq 0x1e1c4(%rip), %rax     # 0x44cf8
movq %rax, 0x1e1bd(%rip)     # 0x44cf8
movl 0x1e1af(%rip), %edi     # 0x44cf0
addl $0x1, %edi
callq 0x25de0
callq 0x25c50
movq 0x58(%rsp), %rdi
movw 0x56(%rsp), %cx
movl 0x44(%rsp), %r9d
movl 0x1e18d(%rip), %eax     # 0x44cf0
movw %ax, %r11w
movl 0x40(%rsp), %eax
movw %ax, %r10w
movsbl 0x55(%rsp), %eax
cmpl $0x1, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl $0x1, %esi
xorl %r8d, %r8d
movzwl %cx, %edx
movl %r8d, %ecx
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movzwl %r11w, %r11d
movl %r11d, 0x10(%rsp)
movzwl %r10w, %r10d
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x23cb0
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x26800
movq 0x58(%rsp), %rdi
callq 0x26950
movq 0x58(%rsp), %rdi
leaq 0x196c4(%rip), %rsi     # 0x402a0
callq 0x268e0
movq 0x58(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rdi
callq 0x5160
movq 0x28(%rsp), %rdi
movl %eax, %edx
movl $0x2, %esi
callq 0x8640
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x1e0e1(%rip), %rax     # 0x44cf8
movl %eax, %edx
movl 0x3c(%rsp), %ecx
callq 0x24090
movq 0x58(%rsp), %rdi
leaq 0x195b2(%rip), %rsi     # 0x401e0
callq 0x269b0
movq 0x58(%rsp), %rdi
leaq 0x19601(%rip), %rsi     # 0x40240
callq 0x268e0
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x58(%rsp), %rdi
callq 0x5160
movq 0x30(%rsp), %rdi
movl %eax, %edx
movl $0x2, %esi
callq 0x8640
movq 0x60(%rsp), %rdi
movq 0x58(%rsp), %rsi
callq 0x269f0
addq $0x68, %rsp
retq
nopl (%rax)