#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ c_cast_bitmap_float_float(int, int, void *, int, int, int,
                                             void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_float_word16(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_float_word32(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_float_word8(int, int, void *, int, int, int,
                                             void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word16_float(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word16_word16(int, int, void *, int, int, int,
                                               void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word16_word32(int, int, void *, int, int, int,
                                               void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word16_word8(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word32_float(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word32_word16(int, int, void *, int, int, int,
                                               void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word32_word32(int, int, void *, int, int, int,
                                               void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word32_word8(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word8_float(int, int, void *, int, int, int,
                                             void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word8_word16(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word8_word32(int, int, void *, int, int, int,
                                              void *, int, int, int);
int /*<<< orphan*/ c_cast_bitmap_word8_word8(int, int, void *, int, int, int,
                                             void *, int, int, int);
void c_cast_bitmap(int k_type1, int k_type2, int width, int height, void *p1,
                   int nchn1, int pad1, int ofs1, void *p2, int nchn2, int pad2,
                   int ofs2) {
  switch (k_type1) {
  case 1:
    switch (k_type2) {
    case 1:
      c_cast_bitmap_word8_word8(width, height, p1, nchn1, pad1, ofs1, p2, nchn2,
                                pad2, ofs2);
      ;
      break;
    case 2:
      c_cast_bitmap_word8_word16(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    case 3:
      c_cast_bitmap_word8_word32(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    case 4:
      c_cast_bitmap_word8_float(width, height, p1, nchn1, pad1, ofs1, p2, nchn2,
                                pad2, ofs2);
      ;
      break;
    }
    break;
  case 2:
    switch (k_type2) {
    case 1:
      c_cast_bitmap_word16_word8(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    case 2:
      c_cast_bitmap_word16_word16(width, height, p1, nchn1, pad1, ofs1, p2,
                                  nchn2, pad2, ofs2);
      ;
      break;
    case 3:
      c_cast_bitmap_word16_word32(width, height, p1, nchn1, pad1, ofs1, p2,
                                  nchn2, pad2, ofs2);
      ;
      break;
    case 4:
      c_cast_bitmap_word16_float(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    }
    break;
  case 3:
    switch (k_type2) {
    case 1:
      c_cast_bitmap_word32_word8(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    case 2:
      c_cast_bitmap_word32_word16(width, height, p1, nchn1, pad1, ofs1, p2,
                                  nchn2, pad2, ofs2);
      ;
      break;
    case 3:
      c_cast_bitmap_word32_word32(width, height, p1, nchn1, pad1, ofs1, p2,
                                  nchn2, pad2, ofs2);
      ;
      break;
    case 4:
      c_cast_bitmap_word32_float(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    }
    break;
  case 4:
    switch (k_type2) {
    case 1:
      c_cast_bitmap_float_word8(width, height, p1, nchn1, pad1, ofs1, p2, nchn2,
                                pad2, ofs2);
      ;
      break;
    case 2:
      c_cast_bitmap_float_word16(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    case 3:
      c_cast_bitmap_float_word32(width, height, p1, nchn1, pad1, ofs1, p2,
                                 nchn2, pad2, ofs2);
      ;
      break;
    case 4:
      c_cast_bitmap_float_float(width, height, p1, nchn1, pad1, ofs1, p2, nchn2,
                                pad2, ofs2);
      ;
      break;
    }
    break;
  }
}


x86 assembly (clang, -O0):
<c_cast_bitmap>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x68,%rsp
mov    0x38(%rbp),%eax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x3,%eax
ja     16fd <c_cast_bitmap+0x4fd>
mov    -0x30(%rbp),%rax
lea    0xdb0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x3,%eax
ja     137d <c_cast_bitmap+0x17d>
mov    -0x38(%rbp),%rax
lea    0xdc7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   10c0 <c_cast_bitmap_word8_word8@plt>
jmp    137d <c_cast_bitmap+0x17d>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   10a0 <c_cast_bitmap_word8_word16@plt>
jmp    137d <c_cast_bitmap+0x17d>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   10e0 <c_cast_bitmap_word8_word32@plt>
jmp    137d <c_cast_bitmap+0x17d>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1040 <c_cast_bitmap_word8_float@plt>
jmp    16fd <c_cast_bitmap+0x4fd>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x3,%eax
ja     14a6 <c_cast_bitmap+0x2a6>
mov    -0x40(%rbp),%rax
lea    0xc8e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1100 <c_cast_bitmap_word16_word8@plt>
jmp    14a6 <c_cast_bitmap+0x2a6>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1120 <c_cast_bitmap_word16_word16@plt>
jmp    14a6 <c_cast_bitmap+0x2a6>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1070 <c_cast_bitmap_word16_word32@plt>
jmp    14a6 <c_cast_bitmap+0x2a6>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   10b0 <c_cast_bitmap_word16_float@plt>
jmp    16fd <c_cast_bitmap+0x4fd>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x48(%rbp)
sub    $0x3,%eax
ja     15cf <c_cast_bitmap+0x3cf>
mov    -0x48(%rbp),%rax
lea    0xb55(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   10f0 <c_cast_bitmap_word32_word8@plt>
jmp    15cf <c_cast_bitmap+0x3cf>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1060 <c_cast_bitmap_word32_word16@plt>
jmp    15cf <c_cast_bitmap+0x3cf>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1110 <c_cast_bitmap_word32_word32@plt>
jmp    15cf <c_cast_bitmap+0x3cf>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1080 <c_cast_bitmap_word32_float@plt>
jmp    16fd <c_cast_bitmap+0x4fd>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x50(%rbp)
sub    $0x3,%eax
ja     16f8 <c_cast_bitmap+0x4f8>
mov    -0x50(%rbp),%rax
lea    0xa1c(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1050 <c_cast_bitmap_float_word8@plt>
jmp    16f8 <c_cast_bitmap+0x4f8>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1090 <c_cast_bitmap_float_word16@plt>
jmp    16f8 <c_cast_bitmap+0x4f8>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   1030 <c_cast_bitmap_float_word32@plt>
jmp    16f8 <c_cast_bitmap+0x4f8>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x24(%rbp),%ecx
mov    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
mov    0x20(%rbp),%rbx
mov    0x28(%rbp),%r11d
mov    0x30(%rbp),%r10d
mov    0x38(%rbp),%eax
mov    %rbx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %eax,0x18(%rsp)
call   10d0 <c_cast_bitmap_float_float@plt>
jmp    16fd <c_cast_bitmap+0x4fd>
add    $0x68,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_cast_bitmap>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
add    $0xffffffff,%edi
cmp    $0x3,%edi
ja     1320 <c_cast_bitmap+0x120>
mov    %r9d,%r10d
mov    %r8,%rax
mov    0x58(%rsp),%r12d
mov    0x50(%rsp),%r15d
mov    0x48(%rsp),%r14d
mov    0x40(%rsp),%r11
mov    0x38(%rsp),%r9d
mov    0x30(%rsp),%r8d
lea    0xdc1(%rip),%rbx
movslq (%rbx,%rdi,4),%rdi
add    %rbx,%rdi
jmp    *%rdi
add    $0xffffffff,%esi
cmp    $0x3,%esi
ja     1320 <c_cast_bitmap+0x120>
lea    0xde5(%rip),%rdi
movslq (%rdi,%rsi,4),%rsi
add    %rdi,%rsi
jmp    *%rsi
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   10c0 <c_cast_bitmap_word8_word8@plt>
jmp    1465 <c_cast_bitmap+0x265>
add    $0xffffffff,%esi
cmp    $0x3,%esi
ja     1320 <c_cast_bitmap+0x120>
lea    0xd9d(%rip),%rdi
movslq (%rdi,%rsi,4),%rsi
add    %rdi,%rsi
jmp    *%rsi
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1100 <c_cast_bitmap_word16_word8@plt>
jmp    1465 <c_cast_bitmap+0x265>
add    $0xffffffff,%esi
cmp    $0x3,%esi
ja     1320 <c_cast_bitmap+0x120>
lea    0xd59(%rip),%rdi
movslq (%rdi,%rsi,4),%rsi
add    %rdi,%rsi
jmp    *%rsi
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   10f0 <c_cast_bitmap_word32_word8@plt>
jmp    1465 <c_cast_bitmap+0x265>
add    $0xffffffff,%esi
cmp    $0x3,%esi
ja     1320 <c_cast_bitmap+0x120>
lea    0xd15(%rip),%rdi
movslq (%rdi,%rsi,4),%rsi
add    %rdi,%rsi
jmp    *%rsi
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1050 <c_cast_bitmap_float_word8@plt>
jmp    1465 <c_cast_bitmap+0x265>
add    $0x8,%rsp
jmp    1469 <c_cast_bitmap+0x269>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   10a0 <c_cast_bitmap_word8_word16@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   10e0 <c_cast_bitmap_word8_word32@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1040 <c_cast_bitmap_word8_float@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1120 <c_cast_bitmap_word16_word16@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1070 <c_cast_bitmap_word16_word32@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   10b0 <c_cast_bitmap_word16_float@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1060 <c_cast_bitmap_word32_word16@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1110 <c_cast_bitmap_word32_word32@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1080 <c_cast_bitmap_word32_float@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1090 <c_cast_bitmap_float_word16@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   1030 <c_cast_bitmap_float_word32@plt>
jmp    1465 <c_cast_bitmap+0x265>
mov    %edx,%edi
mov    %ecx,%esi
mov    %rax,%rdx
mov    %r10d,%ecx
push   %r12
push   %r15
push   %r14
push   %r11
call   10d0 <c_cast_bitmap_float_float@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @c_cast_bitmap(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11) {
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i8*
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
store i32 %0, i32* %13
store i32 %1, i32* %14
store i32 %2, i32* %15
store i32 %3, i32* %16
store i8* %4, i8** %17
store i32 %5, i32* %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i8* %8, i8** %21
store i32 %9, i32* %22
store i32 %10, i32* %23
store i32 %11, i32* %24
%25 = load i32, i32* %13
switch i32 %25, label %230 [
i32 1, label %26
i32 2, label %77
i32 3, label %128
i32 4, label %179
]
26: ; preds = %12
%27 = load i32, i32* %14
switch i32 %27, label %76 [
i32 1, label %28
i32 2, label %40
i32 3, label %52
i32 4, label %64
]
28: ; preds = %26
%29 = load i32, i32* %15
%30 = load i32, i32* %16
%31 = load i8*, i8** %17
%32 = load i32, i32* %18
%33 = load i32, i32* %19
%34 = load i32, i32* %20
%35 = load i8*, i8** %21
%36 = load i32, i32* %22
%37 = load i32, i32* %23
%38 = load i32, i32* %24
%39 = call i32 @c_cast_bitmap_word8_word8(i32 %29, i32 %30, i8* %31, i32 %32, i32 %33, i32 %34, i8* %35, i32 %36, i32 %37, i32 %38)
br label %76
40: ; preds = %26
%41 = load i32, i32* %15
%42 = load i32, i32* %16
%43 = load i8*, i8** %17
%44 = load i32, i32* %18
%45 = load i32, i32* %19
%46 = load i32, i32* %20
%47 = load i8*, i8** %21
%48 = load i32, i32* %22
%49 = load i32, i32* %23
%50 = load i32, i32* %24
%51 = call i32 @c_cast_bitmap_word8_word16(i32 %41, i32 %42, i8* %43, i32 %44, i32 %45, i32 %46, i8* %47, i32 %48, i32 %49, i32 %50)
br label %76
52: ; preds = %26
%53 = load i32, i32* %15
%54 = load i32, i32* %16
%55 = load i8*, i8** %17
%56 = load i32, i32* %18
%57 = load i32, i32* %19
%58 = load i32, i32* %20
%59 = load i8*, i8** %21
%60 = load i32, i32* %22
%61 = load i32, i32* %23
%62 = load i32, i32* %24
%63 = call i32 @c_cast_bitmap_word8_word32(i32 %53, i32 %54, i8* %55, i32 %56, i32 %57, i32 %58, i8* %59, i32 %60, i32 %61, i32 %62)
br label %76
64: ; preds = %26
%65 = load i32, i32* %15
%66 = load i32, i32* %16
%67 = load i8*, i8** %17
%68 = load i32, i32* %18
%69 = load i32, i32* %19
%70 = load i32, i32* %20
%71 = load i8*, i8** %21
%72 = load i32, i32* %22
%73 = load i32, i32* %23
%74 = load i32, i32* %24
%75 = call i32 @c_cast_bitmap_word8_float(i32 %65, i32 %66, i8* %67, i32 %68, i32 %69, i32 %70, i8* %71, i32 %72, i32 %73, i32 %74)
br label %76
76: ; preds = %26, %64, %52, %40, %28
br label %230
77: ; preds = %12
%78 = load i32, i32* %14
switch i32 %78, label %127 [
i32 1, label %79
i32 2, label %91
i32 3, label %103
i32 4, label %115
]
79: ; preds = %77
%80 = load i32, i32* %15
%81 = load i32, i32* %16
%82 = load i8*, i8** %17
%83 = load i32, i32* %18
%84 = load i32, i32* %19
%85 = load i32, i32* %20
%86 = load i8*, i8** %21
%87 = load i32, i32* %22
%88 = load i32, i32* %23
%89 = load i32, i32* %24
%90 = call i32 @c_cast_bitmap_word16_word8(i32 %80, i32 %81, i8* %82, i32 %83, i32 %84, i32 %85, i8* %86, i32 %87, i32 %88, i32 %89)
br label %127
91: ; preds = %77
%92 = load i32, i32* %15
%93 = load i32, i32* %16
%94 = load i8*, i8** %17
%95 = load i32, i32* %18
%96 = load i32, i32* %19
%97 = load i32, i32* %20
%98 = load i8*, i8** %21
%99 = load i32, i32* %22
%100 = load i32, i32* %23
%101 = load i32, i32* %24
%102 = call i32 @c_cast_bitmap_word16_word16(i32 %92, i32 %93, i8* %94, i32 %95, i32 %96, i32 %97, i8* %98, i32 %99, i32 %100, i32 %101)
br label %127
103: ; preds = %77
%104 = load i32, i32* %15
%105 = load i32, i32* %16
%106 = load i8*, i8** %17
%107 = load i32, i32* %18
%108 = load i32, i32* %19
%109 = load i32, i32* %20
%110 = load i8*, i8** %21
%111 = load i32, i32* %22
%112 = load i32, i32* %23
%113 = load i32, i32* %24
%114 = call i32 @c_cast_bitmap_word16_word32(i32 %104, i32 %105, i8* %106, i32 %107, i32 %108, i32 %109, i8* %110, i32 %111, i32 %112, i32 %113)
br label %127
115: ; preds = %77
%116 = load i32, i32* %15
%117 = load i32, i32* %16
%118 = load i8*, i8** %17
%119 = load i32, i32* %18
%120 = load i32, i32* %19
%121 = load i32, i32* %20
%122 = load i8*, i8** %21
%123 = load i32, i32* %22
%124 = load i32, i32* %23
%125 = load i32, i32* %24
%126 = call i32 @c_cast_bitmap_word16_float(i32 %116, i32 %117, i8* %118, i32 %119, i32 %120, i32 %121, i8* %122, i32 %123, i32 %124, i32 %125)
br label %127
127: ; preds = %77, %115, %103, %91, %79
br label %230
128: ; preds = %12
%129 = load i32, i32* %14
switch i32 %129, label %178 [
i32 1, label %130
i32 2, label %142
i32 3, label %154
i32 4, label %166
]
130: ; preds = %128
%131 = load i32, i32* %15
%132 = load i32, i32* %16
%133 = load i8*, i8** %17
%134 = load i32, i32* %18
%135 = load i32, i32* %19
%136 = load i32, i32* %20
%137 = load i8*, i8** %21
%138 = load i32, i32* %22
%139 = load i32, i32* %23
%140 = load i32, i32* %24
%141 = call i32 @c_cast_bitmap_word32_word8(i32 %131, i32 %132, i8* %133, i32 %134, i32 %135, i32 %136, i8* %137, i32 %138, i32 %139, i32 %140)
br label %178
142: ; preds = %128
%143 = load i32, i32* %15
%144 = load i32, i32* %16
%145 = load i8*, i8** %17
%146 = load i32, i32* %18
%147 = load i32, i32* %19
%148 = load i32, i32* %20
%149 = load i8*, i8** %21
%150 = load i32, i32* %22
%151 = load i32, i32* %23
%152 = load i32, i32* %24
%153 = call i32 @c_cast_bitmap_word32_word16(i32 %143, i32 %144, i8* %145, i32 %146, i32 %147, i32 %148, i8* %149, i32 %150, i32 %151, i32 %152)
br label %178
154: ; preds = %128
%155 = load i32, i32* %15
%156 = load i32, i32* %16
%157 = load i8*, i8** %17
%158 = load i32, i32* %18
%159 = load i32, i32* %19
%160 = load i32, i32* %20
%161 = load i8*, i8** %21
%162 = load i32, i32* %22
%163 = load i32, i32* %23
%164 = load i32, i32* %24
%165 = call i32 @c_cast_bitmap_word32_word32(i32 %155, i32 %156, i8* %157, i32 %158, i32 %159, i32 %160, i8* %161, i32 %162, i32 %163, i32 %164)
br label %178
166: ; preds = %128
%167 = load i32, i32* %15
%168 = load i32, i32* %16
%169 = load i8*, i8** %17
%170 = load i32, i32* %18
%171 = load i32, i32* %19
%172 = load i32, i32* %20
%173 = load i8*, i8** %21
%174 = load i32, i32* %22
%175 = load i32, i32* %23
%176 = load i32, i32* %24
%177 = call i32 @c_cast_bitmap_word32_float(i32 %167, i32 %168, i8* %169, i32 %170, i32 %171, i32 %172, i8* %173, i32 %174, i32 %175, i32 %176)
br label %178
178: ; preds = %128, %166, %154, %142, %130
br label %230
179: ; preds = %12
%180 = load i32, i32* %14
switch i32 %180, label %229 [
i32 1, label %181
i32 2, label %193
i32 3, label %205
i32 4, label %217
]
181: ; preds = %179
%182 = load i32, i32* %15
%183 = load i32, i32* %16
%184 = load i8*, i8** %17
%185 = load i32, i32* %18
%186 = load i32, i32* %19
%187 = load i32, i32* %20
%188 = load i8*, i8** %21
%189 = load i32, i32* %22
%190 = load i32, i32* %23
%191 = load i32, i32* %24
%192 = call i32 @c_cast_bitmap_float_word8(i32 %182, i32 %183, i8* %184, i32 %185, i32 %186, i32 %187, i8* %188, i32 %189, i32 %190, i32 %191)
br label %229
193: ; preds = %179
%194 = load i32, i32* %15
%195 = load i32, i32* %16
%196 = load i8*, i8** %17
%197 = load i32, i32* %18
%198 = load i32, i32* %19
%199 = load i32, i32* %20
%200 = load i8*, i8** %21
%201 = load i32, i32* %22
%202 = load i32, i32* %23
%203 = load i32, i32* %24
%204 = call i32 @c_cast_bitmap_float_word16(i32 %194, i32 %195, i8* %196, i32 %197, i32 %198, i32 %199, i8* %200, i32 %201, i32 %202, i32 %203)
br label %229
205: ; preds = %179
%206 = load i32, i32* %15
%207 = load i32, i32* %16
%208 = load i8*, i8** %17
%209 = load i32, i32* %18
%210 = load i32, i32* %19
%211 = load i32, i32* %20
%212 = load i8*, i8** %21
%213 = load i32, i32* %22
%214 = load i32, i32* %23
%215 = load i32, i32* %24
%216 = call i32 @c_cast_bitmap_float_word32(i32 %206, i32 %207, i8* %208, i32 %209, i32 %210, i32 %211, i8* %212, i32 %213, i32 %214, i32 %215)
br label %229
217: ; preds = %179
%218 = load i32, i32* %15
%219 = load i32, i32* %16
%220 = load i8*, i8** %17
%221 = load i32, i32* %18
%222 = load i32, i32* %19
%223 = load i32, i32* %20
%224 = load i8*, i8** %21
%225 = load i32, i32* %22
%226 = load i32, i32* %23
%227 = load i32, i32* %24
%228 = call i32 @c_cast_bitmap_float_float(i32 %218, i32 %219, i8* %220, i32 %221, i32 %222, i32 %223, i8* %224, i32 %225, i32 %226, i32 %227)
br label %229
229: ; preds = %179, %217, %205, %193, %181
br label %230
230: ; preds = %12, %229, %178, %127, %76
ret void
}

LLVM IR (-O2):
define void @c_cast_bitmap(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11) {
switch i32 %0, label %49 [
i32 1, label %13
i32 2, label %22
i32 3, label %31
i32 4, label %40
]
13: ; preds = %12
switch i32 %1, label %49 [
i32 1, label %14
i32 2, label %16
i32 3, label %18
i32 4, label %20
]
14: ; preds = %13
%15 = tail call i32 @c_cast_bitmap_word8_word8(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
16: ; preds = %13
%17 = tail call i32 @c_cast_bitmap_word8_word16(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
18: ; preds = %13
%19 = tail call i32 @c_cast_bitmap_word8_word32(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
20: ; preds = %13
%21 = tail call i32 @c_cast_bitmap_word8_float(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
22: ; preds = %12
switch i32 %1, label %49 [
i32 1, label %23
i32 2, label %25
i32 3, label %27
i32 4, label %29
]
23: ; preds = %22
%24 = tail call i32 @c_cast_bitmap_word16_word8(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
25: ; preds = %22
%26 = tail call i32 @c_cast_bitmap_word16_word16(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
27: ; preds = %22
%28 = tail call i32 @c_cast_bitmap_word16_word32(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
29: ; preds = %22
%30 = tail call i32 @c_cast_bitmap_word16_float(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
31: ; preds = %12
switch i32 %1, label %49 [
i32 1, label %32
i32 2, label %34
i32 3, label %36
i32 4, label %38
]
32: ; preds = %31
%33 = tail call i32 @c_cast_bitmap_word32_word8(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
34: ; preds = %31
%35 = tail call i32 @c_cast_bitmap_word32_word16(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
36: ; preds = %31
%37 = tail call i32 @c_cast_bitmap_word32_word32(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
38: ; preds = %31
%39 = tail call i32 @c_cast_bitmap_word32_float(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
40: ; preds = %12
switch i32 %1, label %49 [
i32 1, label %41
i32 2, label %43
i32 3, label %45
i32 4, label %47
]
41: ; preds = %40
%42 = tail call i32 @c_cast_bitmap_float_word8(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
43: ; preds = %40
%44 = tail call i32 @c_cast_bitmap_float_word16(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
45: ; preds = %40
%46 = tail call i32 @c_cast_bitmap_float_word32(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
47: ; preds = %40
%48 = tail call i32 @c_cast_bitmap_float_float(i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i8* %8, i32 %9, i32 %10, i32 %11)
br label %49
49: ; preds = %41, %43, %45, %47, %40, %32, %34, %36, %38, %31, %23, %25, %27, %29, %22, %14, %16, %18, %20, %13, %12
ret void
}