// File: /workspace/github_c_makefile_star2_O0/deplinenoise[P]vlink/t_elf32m68k.c
// Function: m68k_reloc_vlink2elf
static uint8_t m68k_reloc_vlink2elf(struct Reloc *r)
/* Try to map vlink-internal representation to a valid ELF reloc type */
{
  if (isstdreloc(r,R_ABS,32)) return R_68K_32;
  else if (isstdreloc(r,R_ABS,16)) return R_68K_16;
  else if (isstdreloc(r,R_ABS,8)) return R_68K_8;
  else if (isstdreloc(r,R_PC,32)) return R_68K_PC32;
  else if (isstdreloc(r,R_PC,16)) return R_68K_PC16;
  else if (isstdreloc(r,R_PC,8)) return R_68K_PC8;
  else if (isstdreloc(r,R_GOT,32)) return R_68K_GOT32;
  else if (isstdreloc(r,R_GOT,16)) return R_68K_GOT16;
  else if (isstdreloc(r,R_GOT,8)) return R_68K_GOT8;
  else if (isstdreloc(r,R_GOTOFF,32)) return R_68K_GOT32O;
  else if (isstdreloc(r,R_GOTOFF,16)) return R_68K_GOT16O;
  else if (isstdreloc(r,R_GOTOFF,8)) return R_68K_GOT8O;
  else if (isstdreloc(r,R_PLT,32)) return R_68K_PLT32;
  else if (isstdreloc(r,R_PLT,16)) return R_68K_PLT16;
  else if (isstdreloc(r,R_PLT,8)) return R_68K_PLT8;
  else if (isstdreloc(r,R_PLTOFF,32)) return R_68K_PLT32O;
  else if (isstdreloc(r,R_PLTOFF,16)) return R_68K_PLT16O;
  else if (isstdreloc(r,R_PLTOFF,8)) return R_68K_PLT8O;
  else if (r->rtype == R_COPY) return R_68K_COPY;
  else if (r->rtype == R_GLOBDAT) return R_68K_GLOB_DAT;
  else if (r->rtype == R_JMPSLOT) return R_68K_JMP_SLOT;
  else if (r->rtype == R_LOADREL) return R_68K_RELATIVE;

  return R_NONE;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x20, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x2987c
movb $0x1, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x10, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x2989f
movb $0x2, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x8, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x298c2
movb $0x3, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x20, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x298e5
movb $0x4, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x10, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29908
movb $0x5, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x8, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x2992b
movb $0x6, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x3, %esi
movl $0x20, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x2994e
movb $0x7, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x3, %esi
movl $0x10, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29971
movb $0x8, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x3, %esi
movl $0x8, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29994
movb $0x9, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x5, %esi
movl $0x20, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x299b7
movb $0xa, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x5, %esi
movl $0x10, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x299da
movb $0xb, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x5, %esi
movl $0x8, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x299fd
movb $0xc, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x7, %esi
movl $0x20, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29a20
movb $0xd, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x7, %esi
movl $0x10, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29a43
movb $0xe, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x7, %esi
movl $0x8, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29a66
movb $0xf, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x9, %esi
movl $0x20, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29a89
movb $0x10, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x9, %esi
movl $0x10, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29aac
movb $0x11, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rdi
movl $0x9, %esi
movl $0x8, %edx
callq 0x10ac0
cmpl $0x0, %eax
je 0x29acf
movb $0x12, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rax
movzbl 0x38(%rax), %eax
cmpl $0xe, %eax
jne 0x29ae4
movb $0x13, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rax
movzbl 0x38(%rax), %eax
cmpl $0x6, %eax
jne 0x29af9
movb $0x14, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rax
movzbl 0x38(%rax), %eax
cmpl $0xf, %eax
jne 0x29b0e
movb $0x15, 0x17(%rsp)
jmp 0x29b52
movq 0x8(%rsp), %rax
movzbl 0x38(%rax), %eax
cmpl $0xd, %eax
jne 0x29b23
movb $0x16, 0x17(%rsp)
jmp 0x29b52
jmp 0x29b25
jmp 0x29b27
jmp 0x29b29
jmp 0x29b2b
jmp 0x29b2d
jmp 0x29b2f
jmp 0x29b31
jmp 0x29b33
jmp 0x29b35
jmp 0x29b37
jmp 0x29b39
jmp 0x29b3b
jmp 0x29b3d
jmp 0x29b3f
jmp 0x29b41
jmp 0x29b43
jmp 0x29b45
jmp 0x29b47
jmp 0x29b49
jmp 0x29b4b
jmp 0x29b4d
movb $0x0, 0x17(%rsp)
movb 0x17(%rsp), %al
addq $0x18, %rsp
retq
nopl (%rax,%rax)