void v4lconvert_border_bayer_line_to_bgr24(const unsigned char *bayer,
                                           const unsigned char *adjacent_bayer,
                                           unsigned char *bgr, int width,
                                           int start_with_green,
                                           int blue_line) {
  int t0, t1;
  if (start_with_green) {
    if (blue_line) {
      *bgr++ = bayer[1];
      *bgr++ = bayer[0];
      *bgr++ = adjacent_bayer[0];
    } else {
      *bgr++ = adjacent_bayer[0];
      *bgr++ = bayer[0];
      *bgr++ = bayer[1];
    }
    t0 = (bayer[0] + bayer[2] + adjacent_bayer[1] + 1) / 3;
    t1 = (adjacent_bayer[0] + adjacent_bayer[2] + 1) >> 1;
    if (blue_line) {
      *bgr++ = bayer[1];
      *bgr++ = t0;
      *bgr++ = t1;
    } else {
      *bgr++ = t1;
      *bgr++ = t0;
      *bgr++ = bayer[1];
    }
    bayer++;
    adjacent_bayer++;
    width -= 2;
  } else {
    t0 = (bayer[1] + adjacent_bayer[0] + 1) >> 1;
    if (blue_line) {
      *bgr++ = bayer[0];
      *bgr++ = t0;
      *bgr++ = adjacent_bayer[1];
    } else {
      *bgr++ = adjacent_bayer[1];
      *bgr++ = t0;
      *bgr++ = bayer[0];
    }
    width--;
  }
  if (blue_line) {
    for (; width > 2; width -= 2) {
      t0 = (bayer[0] + bayer[2] + 1) >> 1;
      *bgr++ = t0;
      *bgr++ = bayer[1];
      *bgr++ = adjacent_bayer[1];
      bayer++;
      adjacent_bayer++;
      t0 = (bayer[0] + bayer[2] + adjacent_bayer[1] + 1) / 3;
      t1 = (adjacent_bayer[0] + adjacent_bayer[2] + 1) >> 1;
      *bgr++ = bayer[1];
      *bgr++ = t0;
      *bgr++ = t1;
      bayer++;
      adjacent_bayer++;
    }
  } else {
    for (; width > 2; width -= 2) {
      t0 = (bayer[0] + bayer[2] + 1) >> 1;
      *bgr++ = adjacent_bayer[1];
      *bgr++ = bayer[1];
      *bgr++ = t0;
      bayer++;
      adjacent_bayer++;
      t0 = (bayer[0] + bayer[2] + adjacent_bayer[1] + 1) / 3;
      t1 = (adjacent_bayer[0] + adjacent_bayer[2] + 1) >> 1;
      *bgr++ = t1;
      *bgr++ = t0;
      *bgr++ = bayer[1];
      bayer++;
      adjacent_bayer++;
    }
  }
  if (width == 2) {
    t0 = (bayer[0] + bayer[2] + 1) >> 1;
    if (blue_line) {
      *bgr++ = t0;
      *bgr++ = bayer[1];
      *bgr++ = adjacent_bayer[1];
    } else {
      *bgr++ = adjacent_bayer[1];
      *bgr++ = bayer[1];
      *bgr++ = t0;
    }
    t0 = (bayer[1] + adjacent_bayer[2] + 1) >> 1;
    if (blue_line) {
      *bgr++ = bayer[2];
      *bgr++ = t0;
      *bgr++ = adjacent_bayer[1];
    } else {
      *bgr++ = adjacent_bayer[1];
      *bgr++ = t0;
      *bgr++ = bayer[2];
    }
  } else {
    if (blue_line) {
      *bgr++ = bayer[0];
      *bgr++ = bayer[1];
      *bgr++ = adjacent_bayer[1];
    } else {
      *bgr++ = adjacent_bayer[1];
      *bgr++ = bayer[1];
      *bgr++ = bayer[0];
    }
  }
}


x86 assembly (clang, -O0):
<v4lconvert_border_bayer_line_to_bgr24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     12c0 <v4lconvert_border_bayer_line_to_bgr24+0x1c0>
cmpl   $0x0,-0x24(%rbp)
je     117a <v4lconvert_border_bayer_line_to_bgr24+0x7a>
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    11c0 <v4lconvert_border_bayer_line_to_bgr24+0xc0>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1256 <v4lconvert_border_bayer_line_to_bgr24+0x156>
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x2c(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    129a <v4lconvert_border_bayer_line_to_bgr24+0x19a>
mov    -0x2c(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    137c <v4lconvert_border_bayer_line_to_bgr24+0x27c>
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     132e <v4lconvert_border_bayer_line_to_bgr24+0x22e>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1373 <v4lconvert_border_bayer_line_to_bgr24+0x273>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     14bf <v4lconvert_border_bayer_line_to_bgr24+0x3bf>
jmp    138b <v4lconvert_border_bayer_line_to_bgr24+0x28b>
cmpl   $0x2,-0x1c(%rbp)
jle    14ba <v4lconvert_border_bayer_line_to_bgr24+0x3ba>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x2c(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    138b <v4lconvert_border_bayer_line_to_bgr24+0x28b>
jmp    15f8 <v4lconvert_border_bayer_line_to_bgr24+0x4f8>
jmp    14c4 <v4lconvert_border_bayer_line_to_bgr24+0x3c4>
cmpl   $0x2,-0x1c(%rbp)
jle    15f3 <v4lconvert_border_bayer_line_to_bgr24+0x4f3>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x1c(%rbp)
jmp    14c4 <v4lconvert_border_bayer_line_to_bgr24+0x3c4>
jmp    15f8 <v4lconvert_border_bayer_line_to_bgr24+0x4f8>
cmpl   $0x2,-0x1c(%rbp)
jne    1772 <v4lconvert_border_bayer_line_to_bgr24+0x672>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1671 <v4lconvert_border_bayer_line_to_bgr24+0x571>
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    16b7 <v4lconvert_border_bayer_line_to_bgr24+0x5b7>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
add    %ecx,%eax
add    $0x1,%eax
sar    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1727 <v4lconvert_border_bayer_line_to_bgr24+0x627>
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    176d <v4lconvert_border_bayer_line_to_bgr24+0x66d>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x28(%rbp),%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1814 <v4lconvert_border_bayer_line_to_bgr24+0x714>
cmpl   $0x0,-0x24(%rbp)
je     17c8 <v4lconvert_border_bayer_line_to_bgr24+0x6c8>
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    180f <v4lconvert_border_bayer_line_to_bgr24+0x70f>
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1814 <v4lconvert_border_bayer_line_to_bgr24+0x714>
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4lconvert_border_bayer_line_to_bgr24>:
push   %rbp
push   %rbx
test   %r8d,%r8d
je     111b <v4lconvert_border_bayer_line_to_bgr24+0x1b>
test   %r9d,%r9d
je     1147 <v4lconvert_border_bayer_line_to_bgr24+0x47>
mov    0x1(%rdi),%al
mov    %al,(%rdx)
mov    (%rdi),%al
mov    %al,0x1(%rdx)
mov    %rsi,%rax
jmp    1154 <v4lconvert_border_bayer_line_to_bgr24+0x54>
movzbl 0x1(%rdi),%r8d
movzbl (%rsi),%eax
add    %eax,%r8d
add    $0x1,%r8d
shr    %r8d
test   %r9d,%r9d
je     11c0 <v4lconvert_border_bayer_line_to_bgr24+0xc0>
mov    (%rdi),%al
mov    %al,(%rdx)
mov    %r8b,0x1(%rdx)
lea    0x1(%rsi),%rax
jmp    11cc <v4lconvert_border_bayer_line_to_bgr24+0xcc>
mov    (%rsi),%al
mov    %al,(%rdx)
mov    (%rdi),%al
mov    %al,0x1(%rdx)
lea    0x1(%rdi),%rax
mov    (%rax),%al
mov    %al,0x2(%rdx)
movzbl (%rdi),%r8d
movzbl 0x2(%rdi),%r10d
add    %r8d,%r10d
movzbl 0x1(%rsi),%eax
add    %r10d,%eax
add    $0x1,%eax
imul   $0xaaab,%eax,%r8d
shr    $0x11,%r8d
movzbl (%rsi),%r10d
movzbl 0x2(%rsi),%eax
add    %eax,%r10d
add    $0x1,%r10d
shr    %r10d
test   %r9d,%r9d
je     119d <v4lconvert_border_bayer_line_to_bgr24+0x9d>
mov    0x1(%rdi),%al
mov    %al,0x3(%rdx)
mov    %r8b,0x4(%rdx)
jmp    11a9 <v4lconvert_border_bayer_line_to_bgr24+0xa9>
mov    %r10b,0x3(%rdx)
mov    %r8b,0x4(%rdx)
mov    0x1(%rdi),%r10b
add    $0x1,%rsi
mov    %r10b,0x5(%rdx)
add    $0x3,%rdx
add    $0x1,%rdi
mov    $0xfffffffe,%eax
jmp    11d6 <v4lconvert_border_bayer_line_to_bgr24+0xd6>
mov    0x1(%rsi),%al
mov    %al,(%rdx)
mov    %r8b,0x1(%rdx)
mov    %rdi,%rax
mov    (%rax),%al
mov    %al,0x2(%rdx)
mov    $0xffffffff,%eax
lea    (%rax,%rcx,1),%r8d
add    $0x3,%rdx
test   %r9d,%r9d
je     127e <v4lconvert_border_bayer_line_to_bgr24+0x17e>
cmp    $0x3,%r8d
jl     132c <v4lconvert_border_bayer_line_to_bgr24+0x22c>
lea    (%rax,%rcx,1),%r11d
add    $0x2,%r11d
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%r10d
movzbl 0x2(%rdi,%rcx,1),%eax
add    %r10d,%eax
add    $0x1,%eax
shr    %eax
mov    %al,(%rdx)
movzbl 0x1(%rdi,%rcx,1),%eax
mov    %al,0x1(%rdx)
movzbl 0x1(%rsi,%rcx,1),%eax
mov    %al,0x2(%rdx)
movzbl 0x1(%rdi,%rcx,1),%r10d
movzbl 0x3(%rdi,%rcx,1),%ebx
add    %r10d,%ebx
movzbl 0x2(%rsi,%rcx,1),%eax
add    %ebx,%eax
add    $0x1,%eax
imul   $0xaaab,%eax,%ebp
shr    $0x11,%ebp
movzbl 0x1(%rsi,%rcx,1),%r10d
movzbl 0x3(%rsi,%rcx,1),%ebx
add    %r10d,%ebx
add    $0x1,%ebx
shr    %ebx
movzbl 0x2(%rdi,%rcx,1),%eax
mov    %al,0x3(%rdx)
mov    %bpl,0x4(%rdx)
mov    %bl,0x5(%rdx)
add    $0x6,%rdx
add    $0x2,%rcx
add    $0xfffffffe,%r11d
cmp    $0x4,%r11d
ja     1200 <v4lconvert_border_bayer_line_to_bgr24+0x100>
jmp    1304 <v4lconvert_border_bayer_line_to_bgr24+0x204>
cmp    $0x3,%r8d
jl     1382 <v4lconvert_border_bayer_line_to_bgr24+0x282>
add    %ecx,%eax
add    $0x2,%eax
xor    %ecx,%ecx
nop
movzbl (%rdi,%rcx,1),%ebp
movzbl 0x2(%rdi,%rcx,1),%ebx
add    %ebx,%ebp
add    $0x1,%ebp
shr    %ebp
movzbl 0x1(%rsi,%rcx,1),%ebx
mov    %bl,(%rdx)
movzbl 0x1(%rdi,%rcx,1),%ebx
mov    %bl,0x1(%rdx)
mov    %bpl,0x2(%rdx)
movzbl 0x1(%rdi,%rcx,1),%ebp
movzbl 0x3(%rdi,%rcx,1),%ebx
add    %ebp,%ebx
movzbl 0x2(%rsi,%rcx,1),%ebp
add    %ebx,%ebp
add    $0x1,%ebp
imul   $0xaaab,%ebp,%ebp
shr    $0x11,%ebp
movzbl 0x1(%rsi,%rcx,1),%r10d
movzbl 0x3(%rsi,%rcx,1),%ebx
add    %r10d,%ebx
add    $0x1,%ebx
shr    %ebx
mov    %bl,0x3(%rdx)
mov    %bpl,0x4(%rdx)
movzbl 0x2(%rdi,%rcx,1),%ebx
mov    %bl,0x5(%rdx)
add    $0x6,%rdx
add    $0x2,%rcx
add    $0xfffffffe,%eax
cmp    $0x4,%eax
ja     1290 <v4lconvert_border_bayer_line_to_bgr24+0x190>
add    %rcx,%rdi
add    %rcx,%rsi
sub    %ecx,%r8d
cmp    $0x2,%r8d
jne    1366 <v4lconvert_border_bayer_line_to_bgr24+0x266>
movzbl (%rdi),%eax
movzbl 0x2(%rdi),%ecx
add    %eax,%ecx
add    $0x1,%ecx
shr    %ecx
test   %r9d,%r9d
jne    1340 <v4lconvert_border_bayer_line_to_bgr24+0x240>
lea    0x2(%rdi),%rax
jmp    139a <v4lconvert_border_bayer_line_to_bgr24+0x29a>
cmp    $0x2,%r8d
jne    136b <v4lconvert_border_bayer_line_to_bgr24+0x26b>
movzbl (%rdi),%eax
movzbl 0x2(%rdi),%ecx
add    %eax,%ecx
add    $0x1,%ecx
shr    %ecx
mov    %cl,(%rdx)
mov    0x1(%rdi),%al
mov    %al,0x1(%rdx)
lea    0x1(%rsi),%rax
mov    0x1(%rsi),%cl
mov    %cl,0x2(%rdx)
movzbl 0x1(%rdi),%ecx
movzbl 0x2(%rsi),%esi
add    %esi,%ecx
add    $0x1,%ecx
shr    %ecx
mov    0x2(%rdi),%bl
jmp    13ba <v4lconvert_border_bayer_line_to_bgr24+0x2ba>
test   %r9d,%r9d
je     13c6 <v4lconvert_border_bayer_line_to_bgr24+0x2c6>
mov    (%rdi),%al
mov    %al,(%rdx)
mov    0x1(%rdi),%al
mov    %al,0x1(%rdx)
add    $0x2,%rdx
add    $0x1,%rsi
mov    %rsi,%rax
jmp    13d8 <v4lconvert_border_bayer_line_to_bgr24+0x2d8>
cmp    $0x2,%r8d
jne    13c6 <v4lconvert_border_bayer_line_to_bgr24+0x2c6>
movzbl (%rdi),%ecx
lea    0x2(%rdi),%rax
movzbl 0x2(%rdi),%ebp
add    %ebp,%ecx
add    $0x1,%ecx
shr    %ecx
mov    0x1(%rsi),%bl
mov    %bl,(%rdx)
mov    0x1(%rdi),%bl
mov    %bl,0x1(%rdx)
mov    %cl,0x2(%rdx)
movzbl 0x1(%rdi),%ecx
movzbl 0x2(%rsi),%edi
add    %edi,%ecx
add    $0x1,%ecx
shr    %ecx
mov    0x1(%rsi),%bl
mov    %bl,0x3(%rdx)
mov    %cl,0x4(%rdx)
add    $0x5,%rdx
jmp    13d8 <v4lconvert_border_bayer_line_to_bgr24+0x2d8>
mov    0x1(%rsi),%al
mov    %al,(%rdx)
mov    0x1(%rdi),%al
mov    %al,0x1(%rdx)
add    $0x2,%rdx
mov    %rdi,%rax
mov    (%rax),%al
mov    %al,(%rdx)
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @v4lconvert_border_bayer_line_to_bgr24(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%15 = load i32, i32* %11
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %117
17: ; preds = %6
%18 = load i32, i32* %12
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %36
20: ; preds = %17
%21 = load i8*, i8** %7
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = load i8*, i8** %9
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %9
store i8 %23, i8* %24
%26 = load i8*, i8** %7
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = load i8*, i8** %9
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %9
store i8 %28, i8* %29
%31 = load i8*, i8** %8
%32 = getelementptr inbounds i8, i8* %31, i64 0
%33 = load i8, i8* %32
%34 = load i8*, i8** %9
%35 = getelementptr inbounds i8, i8* %34, i32 1
store i8* %35, i8** %9
store i8 %33, i8* %34
br label %52
36: ; preds = %17
%37 = load i8*, i8** %8
%38 = getelementptr inbounds i8, i8* %37, i64 0
%39 = load i8, i8* %38
%40 = load i8*, i8** %9
%41 = getelementptr inbounds i8, i8* %40, i32 1
store i8* %41, i8** %9
store i8 %39, i8* %40
%42 = load i8*, i8** %7
%43 = getelementptr inbounds i8, i8* %42, i64 0
%44 = load i8, i8* %43
%45 = load i8*, i8** %9
%46 = getelementptr inbounds i8, i8* %45, i32 1
store i8* %46, i8** %9
store i8 %44, i8* %45
%47 = load i8*, i8** %7
%48 = getelementptr inbounds i8, i8* %47, i64 1
%49 = load i8, i8* %48
%50 = load i8*, i8** %9
%51 = getelementptr inbounds i8, i8* %50, i32 1
store i8* %51, i8** %9
store i8 %49, i8* %50
br label %52
52: ; preds = %36, %20
%53 = load i8*, i8** %7
%54 = getelementptr inbounds i8, i8* %53, i64 0
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = load i8*, i8** %7
%58 = getelementptr inbounds i8, i8* %57, i64 2
%59 = load i8, i8* %58
%60 = zext i8 %59 to i32
%61 = add nsw i32 %56, %60
%62 = load i8*, i8** %8
%63 = getelementptr inbounds i8, i8* %62, i64 1
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = add nsw i32 %61, %65
%67 = add nsw i32 %66, 1
%68 = sdiv i32 %67, 3
store i32 %68, i32* %13
%69 = load i8*, i8** %8
%70 = getelementptr inbounds i8, i8* %69, i64 0
%71 = load i8, i8* %70
%72 = zext i8 %71 to i32
%73 = load i8*, i8** %8
%74 = getelementptr inbounds i8, i8* %73, i64 2
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = add nsw i32 %72, %76
%78 = add nsw i32 %77, 1
%79 = ashr i32 %78, 1
store i32 %79, i32* %14
%80 = load i32, i32* %12
%81 = icmp ne i32 %80, 0
br i1 %81, label %82, label %96
82: ; preds = %52
%83 = load i8*, i8** %7
%84 = getelementptr inbounds i8, i8* %83, i64 1
%85 = load i8, i8* %84
%86 = load i8*, i8** %9
%87 = getelementptr inbounds i8, i8* %86, i32 1
store i8* %87, i8** %9
store i8 %85, i8* %86
%88 = load i32, i32* %13
%89 = trunc i32 %88 to i8
%90 = load i8*, i8** %9
%91 = getelementptr inbounds i8, i8* %90, i32 1
store i8* %91, i8** %9
store i8 %89, i8* %90
%92 = load i32, i32* %14
%93 = trunc i32 %92 to i8
%94 = load i8*, i8** %9
%95 = getelementptr inbounds i8, i8* %94, i32 1
store i8* %95, i8** %9
store i8 %93, i8* %94
br label %110
96: ; preds = %52
%97 = load i32, i32* %14
%98 = trunc i32 %97 to i8
%99 = load i8*, i8** %9
%100 = getelementptr inbounds i8, i8* %99, i32 1
store i8* %100, i8** %9
store i8 %98, i8* %99
%101 = load i32, i32* %13
%102 = trunc i32 %101 to i8
%103 = load i8*, i8** %9
%104 = getelementptr inbounds i8, i8* %103, i32 1
store i8* %104, i8** %9
store i8 %102, i8* %103
%105 = load i8*, i8** %7
%106 = getelementptr inbounds i8, i8* %105, i64 1
%107 = load i8, i8* %106
%108 = load i8*, i8** %9
%109 = getelementptr inbounds i8, i8* %108, i32 1
store i8* %109, i8** %9
store i8 %107, i8* %108
br label %110
110: ; preds = %96, %82
%111 = load i8*, i8** %7
%112 = getelementptr inbounds i8, i8* %111, i32 1
store i8* %112, i8** %7
%113 = load i8*, i8** %8
%114 = getelementptr inbounds i8, i8* %113, i32 1
store i8* %114, i8** %8
%115 = load i32, i32* %10
%116 = sub nsw i32 %115, 2
store i32 %116, i32* %10
br label %164
117: ; preds = %6
%118 = load i8*, i8** %7
%119 = getelementptr inbounds i8, i8* %118, i64 1
%120 = load i8, i8* %119
%121 = zext i8 %120 to i32
%122 = load i8*, i8** %8
%123 = getelementptr inbounds i8, i8* %122, i64 0
%124 = load i8, i8* %123
%125 = zext i8 %124 to i32
%126 = add nsw i32 %121, %125
%127 = add nsw i32 %126, 1
%128 = ashr i32 %127, 1
store i32 %128, i32* %13
%129 = load i32, i32* %12
%130 = icmp ne i32 %129, 0
br i1 %130, label %131, label %146
131: ; preds = %117
%132 = load i8*, i8** %7
%133 = getelementptr inbounds i8, i8* %132, i64 0
%134 = load i8, i8* %133
%135 = load i8*, i8** %9
%136 = getelementptr inbounds i8, i8* %135, i32 1
store i8* %136, i8** %9
store i8 %134, i8* %135
%137 = load i32, i32* %13
%138 = trunc i32 %137 to i8
%139 = load i8*, i8** %9
%140 = getelementptr inbounds i8, i8* %139, i32 1
store i8* %140, i8** %9
store i8 %138, i8* %139
%141 = load i8*, i8** %8
%142 = getelementptr inbounds i8, i8* %141, i64 1
%143 = load i8, i8* %142
%144 = load i8*, i8** %9
%145 = getelementptr inbounds i8, i8* %144, i32 1
store i8* %145, i8** %9
store i8 %143, i8* %144
br label %161
146: ; preds = %117
%147 = load i8*, i8** %8
%148 = getelementptr inbounds i8, i8* %147, i64 1
%149 = load i8, i8* %148
%150 = load i8*, i8** %9
%151 = getelementptr inbounds i8, i8* %150, i32 1
store i8* %151, i8** %9
store i8 %149, i8* %150
%152 = load i32, i32* %13
%153 = trunc i32 %152 to i8
%154 = load i8*, i8** %9
%155 = getelementptr inbounds i8, i8* %154, i32 1
store i8* %155, i8** %9
store i8 %153, i8* %154
%156 = load i8*, i8** %7
%157 = getelementptr inbounds i8, i8* %156, i64 0
%158 = load i8, i8* %157
%159 = load i8*, i8** %9
%160 = getelementptr inbounds i8, i8* %159, i32 1
store i8* %160, i8** %9
store i8 %158, i8* %159
br label %161
161: ; preds = %146, %131
%162 = load i32, i32* %10
%163 = add nsw i32 %162, -1
store i32 %163, i32* %10
br label %164
164: ; preds = %161, %110
%165 = load i32, i32* %12
%166 = icmp ne i32 %165, 0
br i1 %166, label %167, label %249
167: ; preds = %164
br label %168
168: ; preds = %245, %167
%169 = load i32, i32* %10
%170 = icmp sgt i32 %169, 2
br i1 %170, label %171, label %248
171: ; preds = %168
%172 = load i8*, i8** %7
%173 = getelementptr inbounds i8, i8* %172, i64 0
%174 = load i8, i8* %173
%175 = zext i8 %174 to i32
%176 = load i8*, i8** %7
%177 = getelementptr inbounds i8, i8* %176, i64 2
%178 = load i8, i8* %177
%179 = zext i8 %178 to i32
%180 = add nsw i32 %175, %179
%181 = add nsw i32 %180, 1
%182 = ashr i32 %181, 1
store i32 %182, i32* %13
%183 = load i32, i32* %13
%184 = trunc i32 %183 to i8
%185 = load i8*, i8** %9
%186 = getelementptr inbounds i8, i8* %185, i32 1
store i8* %186, i8** %9
store i8 %184, i8* %185
%187 = load i8*, i8** %7
%188 = getelementptr inbounds i8, i8* %187, i64 1
%189 = load i8, i8* %188
%190 = load i8*, i8** %9
%191 = getelementptr inbounds i8, i8* %190, i32 1
store i8* %191, i8** %9
store i8 %189, i8* %190
%192 = load i8*, i8** %8
%193 = getelementptr inbounds i8, i8* %192, i64 1
%194 = load i8, i8* %193
%195 = load i8*, i8** %9
%196 = getelementptr inbounds i8, i8* %195, i32 1
store i8* %196, i8** %9
store i8 %194, i8* %195
%197 = load i8*, i8** %7
%198 = getelementptr inbounds i8, i8* %197, i32 1
store i8* %198, i8** %7
%199 = load i8*, i8** %8
%200 = getelementptr inbounds i8, i8* %199, i32 1
store i8* %200, i8** %8
%201 = load i8*, i8** %7
%202 = getelementptr inbounds i8, i8* %201, i64 0
%203 = load i8, i8* %202
%204 = zext i8 %203 to i32
%205 = load i8*, i8** %7
%206 = getelementptr inbounds i8, i8* %205, i64 2
%207 = load i8, i8* %206
%208 = zext i8 %207 to i32
%209 = add nsw i32 %204, %208
%210 = load i8*, i8** %8
%211 = getelementptr inbounds i8, i8* %210, i64 1
%212 = load i8, i8* %211
%213 = zext i8 %212 to i32
%214 = add nsw i32 %209, %213
%215 = add nsw i32 %214, 1
%216 = sdiv i32 %215, 3
store i32 %216, i32* %13
%217 = load i8*, i8** %8
%218 = getelementptr inbounds i8, i8* %217, i64 0
%219 = load i8, i8* %218
%220 = zext i8 %219 to i32
%221 = load i8*, i8** %8
%222 = getelementptr inbounds i8, i8* %221, i64 2
%223 = load i8, i8* %222
%224 = zext i8 %223 to i32
%225 = add nsw i32 %220, %224
%226 = add nsw i32 %225, 1
%227 = ashr i32 %226, 1
store i32 %227, i32* %14
%228 = load i8*, i8** %7
%229 = getelementptr inbounds i8, i8* %228, i64 1
%230 = load i8, i8* %229
%231 = load i8*, i8** %9
%232 = getelementptr inbounds i8, i8* %231, i32 1
store i8* %232, i8** %9
store i8 %230, i8* %231
%233 = load i32, i32* %13
%234 = trunc i32 %233 to i8
%235 = load i8*, i8** %9
%236 = getelementptr inbounds i8, i8* %235, i32 1
store i8* %236, i8** %9
store i8 %234, i8* %235
%237 = load i32, i32* %14
%238 = trunc i32 %237 to i8
%239 = load i8*, i8** %9
%240 = getelementptr inbounds i8, i8* %239, i32 1
store i8* %240, i8** %9
store i8 %238, i8* %239
%241 = load i8*, i8** %7
%242 = getelementptr inbounds i8, i8* %241, i32 1
store i8* %242, i8** %7
%243 = load i8*, i8** %8
%244 = getelementptr inbounds i8, i8* %243, i32 1
store i8* %244, i8** %8
br label %245
245: ; preds = %171
%246 = load i32, i32* %10
%247 = sub nsw i32 %246, 2
store i32 %247, i32* %10
br label %168
248: ; preds = %168
br label %331
249: ; preds = %164
br label %250
250: ; preds = %327, %249
%251 = load i32, i32* %10
%252 = icmp sgt i32 %251, 2
br i1 %252, label %253, label %330
253: ; preds = %250
%254 = load i8*, i8** %7
%255 = getelementptr inbounds i8, i8* %254, i64 0
%256 = load i8, i8* %255
%257 = zext i8 %256 to i32
%258 = load i8*, i8** %7
%259 = getelementptr inbounds i8, i8* %258, i64 2
%260 = load i8, i8* %259
%261 = zext i8 %260 to i32
%262 = add nsw i32 %257, %261
%263 = add nsw i32 %262, 1
%264 = ashr i32 %263, 1
store i32 %264, i32* %13
%265 = load i8*, i8** %8
%266 = getelementptr inbounds i8, i8* %265, i64 1
%267 = load i8, i8* %266
%268 = load i8*, i8** %9
%269 = getelementptr inbounds i8, i8* %268, i32 1
store i8* %269, i8** %9
store i8 %267, i8* %268
%270 = load i8*, i8** %7
%271 = getelementptr inbounds i8, i8* %270, i64 1
%272 = load i8, i8* %271
%273 = load i8*, i8** %9
%274 = getelementptr inbounds i8, i8* %273, i32 1
store i8* %274, i8** %9
store i8 %272, i8* %273
%275 = load i32, i32* %13
%276 = trunc i32 %275 to i8
%277 = load i8*, i8** %9
%278 = getelementptr inbounds i8, i8* %277, i32 1
store i8* %278, i8** %9
store i8 %276, i8* %277
%279 = load i8*, i8** %7
%280 = getelementptr inbounds i8, i8* %279, i32 1
store i8* %280, i8** %7
%281 = load i8*, i8** %8
%282 = getelementptr inbounds i8, i8* %281, i32 1
store i8* %282, i8** %8
%283 = load i8*, i8** %7
%284 = getelementptr inbounds i8, i8* %283, i64 0
%285 = load i8, i8* %284
%286 = zext i8 %285 to i32
%287 = load i8*, i8** %7
%288 = getelementptr inbounds i8, i8* %287, i64 2
%289 = load i8, i8* %288
%290 = zext i8 %289 to i32
%291 = add nsw i32 %286, %290
%292 = load i8*, i8** %8
%293 = getelementptr inbounds i8, i8* %292, i64 1
%294 = load i8, i8* %293
%295 = zext i8 %294 to i32
%296 = add nsw i32 %291, %295
%297 = add nsw i32 %296, 1
%298 = sdiv i32 %297, 3
store i32 %298, i32* %13
%299 = load i8*, i8** %8
%300 = getelementptr inbounds i8, i8* %299, i64 0
%301 = load i8, i8* %300
%302 = zext i8 %301 to i32
%303 = load i8*, i8** %8
%304 = getelementptr inbounds i8, i8* %303, i64 2
%305 = load i8, i8* %304
%306 = zext i8 %305 to i32
%307 = add nsw i32 %302, %306
%308 = add nsw i32 %307, 1
%309 = ashr i32 %308, 1
store i32 %309, i32* %14
%310 = load i32, i32* %14
%311 = trunc i32 %310 to i8
%312 = load i8*, i8** %9
%313 = getelementptr inbounds i8, i8* %312, i32 1
store i8* %313, i8** %9
store i8 %311, i8* %312
%314 = load i32, i32* %13
%315 = trunc i32 %314 to i8
%316 = load i8*, i8** %9
%317 = getelementptr inbounds i8, i8* %316, i32 1
store i8* %317, i8** %9
store i8 %315, i8* %316
%318 = load i8*, i8** %7
%319 = getelementptr inbounds i8, i8* %318, i64 1
%320 = load i8, i8* %319
%321 = load i8*, i8** %9
%322 = getelementptr inbounds i8, i8* %321, i32 1
store i8* %322, i8** %9
store i8 %320, i8* %321
%323 = load i8*, i8** %7
%324 = getelementptr inbounds i8, i8* %323, i32 1
store i8* %324, i8** %7
%325 = load i8*, i8** %8
%326 = getelementptr inbounds i8, i8* %325, i32 1
store i8* %326, i8** %8
br label %327
327: ; preds = %253
%328 = load i32, i32* %10
%329 = sub nsw i32 %328, 2
store i32 %329, i32* %10
br label %250
330: ; preds = %250
br label %331
331: ; preds = %330, %248
%332 = load i32, i32* %10
%333 = icmp eq i32 %332, 2
br i1 %333, label %334, label %423
334: ; preds = %331
%335 = load i8*, i8** %7
%336 = getelementptr inbounds i8, i8* %335, i64 0
%337 = load i8, i8* %336
%338 = zext i8 %337 to i32
%339 = load i8*, i8** %7
%340 = getelementptr inbounds i8, i8* %339, i64 2
%341 = load i8, i8* %340
%342 = zext i8 %341 to i32
%343 = add nsw i32 %338, %342
%344 = add nsw i32 %343, 1
%345 = ashr i32 %344, 1
store i32 %345, i32* %13
%346 = load i32, i32* %12
%347 = icmp ne i32 %346, 0
br i1 %347, label %348, label %363
348: ; preds = %334
%349 = load i32, i32* %13
%350 = trunc i32 %349 to i8
%351 = load i8*, i8** %9
%352 = getelementptr inbounds i8, i8* %351, i32 1
store i8* %352, i8** %9
store i8 %350, i8* %351
%353 = load i8*, i8** %7
%354 = getelementptr inbounds i8, i8* %353, i64 1
%355 = load i8, i8* %354
%356 = load i8*, i8** %9
%357 = getelementptr inbounds i8, i8* %356, i32 1
store i8* %357, i8** %9
store i8 %355, i8* %356
%358 = load i8*, i8** %8
%359 = getelementptr inbounds i8, i8* %358, i64 1
%360 = load i8, i8* %359
%361 = load i8*, i8** %9
%362 = getelementptr inbounds i8, i8* %361, i32 1
store i8* %362, i8** %9
store i8 %360, i8* %361
br label %378
363: ; preds = %334
%364 = load i8*, i8** %8
%365 = getelementptr inbounds i8, i8* %364, i64 1
%366 = load i8, i8* %365
%367 = load i8*, i8** %9
%368 = getelementptr inbounds i8, i8* %367, i32 1
store i8* %368, i8** %9
store i8 %366, i8* %367
%369 = load i8*, i8** %7
%370 = getelementptr inbounds i8, i8* %369, i64 1
%371 = load i8, i8* %370
%372 = load i8*, i8** %9
%373 = getelementptr inbounds i8, i8* %372, i32 1
store i8* %373, i8** %9
store i8 %371, i8* %372
%374 = load i32, i32* %13
%375 = trunc i32 %374 to i8
%376 = load i8*, i8** %9
%377 = getelementptr inbounds i8, i8* %376, i32 1
store i8* %377, i8** %9
store i8 %375, i8* %376
br label %378
378: ; preds = %363, %348
%379 = load i8*, i8** %7
%380 = getelementptr inbounds i8, i8* %379, i64 1
%381 = load i8, i8* %380
%382 = zext i8 %381 to i32
%383 = load i8*, i8** %8
%384 = getelementptr inbounds i8, i8* %383, i64 2
%385 = load i8, i8* %384
%386 = zext i8 %385 to i32
%387 = add nsw i32 %382, %386
%388 = add nsw i32 %387, 1
%389 = ashr i32 %388, 1
store i32 %389, i32* %13
%390 = load i32, i32* %12
%391 = icmp ne i32 %390, 0
br i1 %391, label %392, label %407
392: ; preds = %378
%393 = load i8*, i8** %7
%394 = getelementptr inbounds i8, i8* %393, i64 2
%395 = load i8, i8* %394
%396 = load i8*, i8** %9
%397 = getelementptr inbounds i8, i8* %396, i32 1
store i8* %397, i8** %9
store i8 %395, i8* %396
%398 = load i32, i32* %13
%399 = trunc i32 %398 to i8
%400 = load i8*, i8** %9
%401 = getelementptr inbounds i8, i8* %400, i32 1
store i8* %401, i8** %9
store i8 %399, i8* %400
%402 = load i8*, i8** %8
%403 = getelementptr inbounds i8, i8* %402, i64 1
%404 = load i8, i8* %403
%405 = load i8*, i8** %9
%406 = getelementptr inbounds i8, i8* %405, i32 1
store i8* %406, i8** %9
store i8 %404, i8* %405
br label %422
407: ; preds = %378
%408 = load i8*, i8** %8
%409 = getelementptr inbounds i8, i8* %408, i64 1
%410 = load i8, i8* %409
%411 = load i8*, i8** %9
%412 = getelementptr inbounds i8, i8* %411, i32 1
store i8* %412, i8** %9
store i8 %410, i8* %411
%413 = load i32, i32* %13
%414 = trunc i32 %413 to i8
%415 = load i8*, i8** %9
%416 = getelementptr inbounds i8, i8* %415, i32 1
store i8* %416, i8** %9
store i8 %414, i8* %415
%417 = load i8*, i8** %7
%418 = getelementptr inbounds i8, i8* %417, i64 2
%419 = load i8, i8* %418
%420 = load i8*, i8** %9
%421 = getelementptr inbounds i8, i8* %420, i32 1
store i8* %421, i8** %9
store i8 %419, i8* %420
br label %422
422: ; preds = %407, %392
br label %459
423: ; preds = %331
%424 = load i32, i32* %12
%425 = icmp ne i32 %424, 0
br i1 %425, label %426, label %442
426: ; preds = %423
%427 = load i8*, i8** %7
%428 = getelementptr inbounds i8, i8* %427, i64 0
%429 = load i8, i8* %428
%430 = load i8*, i8** %9
%431 = getelementptr inbounds i8, i8* %430, i32 1
store i8* %431, i8** %9
store i8 %429, i8* %430
%432 = load i8*, i8** %7
%433 = getelementptr inbounds i8, i8* %432, i64 1
%434 = load i8, i8* %433
%435 = load i8*, i8** %9
%436 = getelementptr inbounds i8, i8* %435, i32 1
store i8* %436, i8** %9
store i8 %434, i8* %435
%437 = load i8*, i8** %8
%438 = getelementptr inbounds i8, i8* %437, i64 1
%439 = load i8, i8* %438
%440 = load i8*, i8** %9
%441 = getelementptr inbounds i8, i8* %440, i32 1
store i8* %441, i8** %9
store i8 %439, i8* %440
br label %458
442: ; preds = %423
%443 = load i8*, i8** %8
%444 = getelementptr inbounds i8, i8* %443, i64 1
%445 = load i8, i8* %444
%446 = load i8*, i8** %9
%447 = getelementptr inbounds i8, i8* %446, i32 1
store i8* %447, i8** %9
store i8 %445, i8* %446
%448 = load i8*, i8** %7
%449 = getelementptr inbounds i8, i8* %448, i64 1
%450 = load i8, i8* %449
%451 = load i8*, i8** %9
%452 = getelementptr inbounds i8, i8* %451, i32 1
store i8* %452, i8** %9
store i8 %450, i8* %451
%453 = load i8*, i8** %7
%454 = getelementptr inbounds i8, i8* %453, i64 0
%455 = load i8, i8* %454
%456 = load i8*, i8** %9
%457 = getelementptr inbounds i8, i8* %456, i32 1
store i8* %457, i8** %9
store i8 %455, i8* %456
br label %458
458: ; preds = %442, %426
br label %459
459: ; preds = %458, %422
ret void
}

LLVM IR (-O2):
define void @v4lconvert_border_bayer_line_to_bgr24(i8* nocapture %0, i8* nocapture %1, i8* nocapture writeonly %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp eq i32 %4, 0
br i1 %7, label %61, label %8
8: ; preds = %6
%9 = icmp eq i32 %5, 0
br i1 %9, label %15, label %10
10: ; preds = %8
%11 = getelementptr inbounds i8, i8* %0, i64 1
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %2, i64 1
store i8 %12, i8* %2
%14 = load i8, i8* %0
store i8 %14, i8* %13
br label %20
15: ; preds = %8
%16 = load i8, i8* %1
%17 = getelementptr inbounds i8, i8* %2, i64 1
store i8 %16, i8* %2
%18 = load i8, i8* %0
store i8 %18, i8* %17
%19 = getelementptr inbounds i8, i8* %0, i64 1
br label %20
20: ; preds = %15, %10
%21 = phi i8* [ %19, %15 ], [ %1, %10 ]
%22 = load i8, i8* %21
%23 = getelementptr inbounds i8, i8* %2, i64 2
store i8 %22, i8* %23
%24 = getelementptr inbounds i8, i8* %2, i64 3
%25 = load i8, i8* %0
%26 = zext i8 %25 to i16
%27 = getelementptr inbounds i8, i8* %0, i64 2
%28 = load i8, i8* %27
%29 = zext i8 %28 to i16
%30 = getelementptr inbounds i8, i8* %1, i64 1
%31 = load i8, i8* %30
%32 = zext i8 %31 to i16
%33 = add nuw nsw i16 %26, 1
%34 = add nuw nsw i16 %33, %29
%35 = add nuw nsw i16 %34, %32
%36 = udiv i16 %35, 3
%37 = load i8, i8* %1
%38 = zext i8 %37 to i32
%39 = getelementptr inbounds i8, i8* %1, i64 2
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = add nuw nsw i32 %38, 1
%43 = add nuw nsw i32 %42, %41
%44 = lshr i32 %43, 1
br i1 %9, label %51, label %45
45: ; preds = %20
%46 = getelementptr inbounds i8, i8* %0, i64 1
%47 = load i8, i8* %46
%48 = getelementptr inbounds i8, i8* %2, i64 4
store i8 %47, i8* %24
%49 = trunc i16 %36 to i8
store i8 %49, i8* %48
%50 = trunc i32 %44 to i8
br label %57
51: ; preds = %20
%52 = trunc i32 %44 to i8
%53 = getelementptr inbounds i8, i8* %2, i64 4
store i8 %52, i8* %24
%54 = trunc i16 %36 to i8
store i8 %54, i8* %53
%55 = getelementptr inbounds i8, i8* %0, i64 1
%56 = load i8, i8* %55
br label %57
57: ; preds = %51, %45
%58 = phi i8 [ %56, %51 ], [ %50, %45 ]
%59 = getelementptr inbounds i8, i8* %2, i64 5
store i8 %58, i8* %59
%60 = getelementptr inbounds i8, i8* %0, i64 1
br label %85
61: ; preds = %6
%62 = getelementptr inbounds i8, i8* %0, i64 1
%63 = load i8, i8* %62
%64 = zext i8 %63 to i32
%65 = load i8, i8* %1
%66 = zext i8 %65 to i32
%67 = add nuw nsw i32 %64, 1
%68 = add nuw nsw i32 %67, %66
%69 = lshr i32 %68, 1
%70 = icmp eq i32 %5, 0
br i1 %70, label %76, label %71
71: ; preds = %61
%72 = load i8, i8* %0
%73 = getelementptr inbounds i8, i8* %2, i64 1
store i8 %72, i8* %2
%74 = trunc i32 %69 to i8
store i8 %74, i8* %73
%75 = getelementptr inbounds i8, i8* %1, i64 1
br label %81
76: ; preds = %61
%77 = getelementptr inbounds i8, i8* %1, i64 1
%78 = load i8, i8* %77
%79 = getelementptr inbounds i8, i8* %2, i64 1
store i8 %78, i8* %2
%80 = trunc i32 %69 to i8
store i8 %80, i8* %79
br label %81
81: ; preds = %76, %71
%82 = phi i8* [ %0, %76 ], [ %75, %71 ]
%83 = load i8, i8* %82
%84 = getelementptr inbounds i8, i8* %2, i64 2
store i8 %83, i8* %84
br label %85
85: ; preds = %81, %57
%86 = phi i32 [ -1, %81 ], [ -2, %57 ]
%87 = phi i8* [ %2, %81 ], [ %24, %57 ]
%88 = phi i8* [ %1, %81 ], [ %30, %57 ]
%89 = phi i8* [ %0, %81 ], [ %60, %57 ]
%90 = add nsw i32 %86, %3
%91 = getelementptr inbounds i8, i8* %87, i64 3
%92 = icmp eq i32 %5, 0
%93 = icmp sgt i32 %90, 2
br i1 %92, label %95, label %94
94: ; preds = %85
br i1 %93, label %96, label %211
95: ; preds = %85
br i1 %93, label %145, label %200
96: ; preds = %94, %96
%97 = phi i8* [ %103, %96 ], [ %89, %94 ]
%98 = phi i8* [ %122, %96 ], [ %88, %94 ]
%99 = phi i32 [ %143, %96 ], [ %90, %94 ]
%100 = phi i8* [ %142, %96 ], [ %91, %94 ]
%101 = load i8, i8* %97
%102 = zext i8 %101 to i16
%103 = getelementptr inbounds i8, i8* %97, i64 2
%104 = load i8, i8* %103
%105 = zext i8 %104 to i16
%106 = add nuw nsw i16 %102, 1
%107 = add nuw nsw i16 %106, %105
%108 = lshr i16 %107, 1
%109 = trunc i16 %108 to i8
%110 = getelementptr inbounds i8, i8* %100, i64 1
store i8 %109, i8* %100
%111 = getelementptr inbounds i8, i8* %97, i64 1
%112 = load i8, i8* %111
%113 = getelementptr inbounds i8, i8* %100, i64 2
store i8 %112, i8* %110
%114 = getelementptr inbounds i8, i8* %98, i64 1
%115 = load i8, i8* %114
%116 = getelementptr inbounds i8, i8* %100, i64 3
store i8 %115, i8* %113
%117 = load i8, i8* %111
%118 = zext i8 %117 to i16
%119 = getelementptr inbounds i8, i8* %97, i64 3
%120 = load i8, i8* %119
%121 = zext i8 %120 to i16
%122 = getelementptr inbounds i8, i8* %98, i64 2
%123 = load i8, i8* %122
%124 = zext i8 %123 to i16
%125 = add nuw nsw i16 %118, 1
%126 = add nuw nsw i16 %125, %121
%127 = add nuw nsw i16 %126, %124
%128 = udiv i16 %127, 3
%129 = load i8, i8* %114
%130 = zext i8 %129 to i16
%131 = getelementptr inbounds i8, i8* %98, i64 3
%132 = load i8, i8* %131
%133 = zext i8 %132 to i16
%134 = add nuw nsw i16 %130, 1
%135 = add nuw nsw i16 %134, %133
%136 = lshr i16 %135, 1
%137 = load i8, i8* %103
%138 = getelementptr inbounds i8, i8* %100, i64 4
store i8 %137, i8* %116
%139 = trunc i16 %128 to i8
%140 = getelementptr inbounds i8, i8* %100, i64 5
store i8 %139, i8* %138
%141 = trunc i16 %136 to i8
%142 = getelementptr inbounds i8, i8* %100, i64 6
store i8 %141, i8* %140
%143 = add nsw i32 %99, -2
%144 = icmp ugt i32 %99, 4
br i1 %144, label %96, label %194
145: ; preds = %95, %145
%146 = phi i8* [ %152, %145 ], [ %89, %95 ]
%147 = phi i8* [ %171, %145 ], [ %88, %95 ]
%148 = phi i32 [ %192, %145 ], [ %90, %95 ]
%149 = phi i8* [ %191, %145 ], [ %91, %95 ]
%150 = load i8, i8* %146
%151 = zext i8 %150 to i16
%152 = getelementptr inbounds i8, i8* %146, i64 2
%153 = load i8, i8* %152
%154 = zext i8 %153 to i16
%155 = add nuw nsw i16 %151, 1
%156 = add nuw nsw i16 %155, %154
%157 = lshr i16 %156, 1
%158 = getelementptr inbounds i8, i8* %147, i64 1
%159 = load i8, i8* %158
%160 = getelementptr inbounds i8, i8* %149, i64 1
store i8 %159, i8* %149
%161 = getelementptr inbounds i8, i8* %146, i64 1
%162 = load i8, i8* %161
%163 = getelementptr inbounds i8, i8* %149, i64 2
store i8 %162, i8* %160
%164 = trunc i16 %157 to i8
%165 = getelementptr inbounds i8, i8* %149, i64 3
store i8 %164, i8* %163
%166 = load i8, i8* %161
%167 = zext i8 %166 to i16
%168 = getelementptr inbounds i8, i8* %146, i64 3
%169 = load i8, i8* %168
%170 = zext i8 %169 to i16
%171 = getelementptr inbounds i8, i8* %147, i64 2
%172 = load i8, i8* %171
%173 = zext i8 %172 to i16
%174 = add nuw nsw i16 %167, 1
%175 = add nuw nsw i16 %174, %170
%176 = add nuw nsw i16 %175, %173
%177 = udiv i16 %176, 3
%178 = load i8, i8* %158
%179 = zext i8 %178 to i16
%180 = getelementptr inbounds i8, i8* %147, i64 3
%181 = load i8, i8* %180
%182 = zext i8 %181 to i16
%183 = add nuw nsw i16 %179, 1
%184 = add nuw nsw i16 %183, %182
%185 = lshr i16 %184, 1
%186 = trunc i16 %185 to i8
%187 = getelementptr inbounds i8, i8* %149, i64 4
store i8 %186, i8* %165
%188 = trunc i16 %177 to i8
%189 = getelementptr inbounds i8, i8* %149, i64 5
store i8 %188, i8* %187
%190 = load i8, i8* %152
%191 = getelementptr inbounds i8, i8* %149, i64 6
store i8 %190, i8* %189
%192 = add nsw i32 %148, -2
%193 = icmp ugt i32 %148, 4
br i1 %193, label %145, label %194
194: ; preds = %96, %145
%195 = phi i8* [ %191, %145 ], [ %142, %96 ]
%196 = phi i32 [ %192, %145 ], [ %143, %96 ]
%197 = phi i8* [ %171, %145 ], [ %122, %96 ]
%198 = phi i8* [ %152, %145 ], [ %103, %96 ]
%199 = icmp eq i32 %196, 2
br i1 %199, label %222, label %283
200: ; preds = %95
%201 = icmp eq i32 %90, 2
br i1 %201, label %202, label %294
202: ; preds = %200
%203 = load i8, i8* %89
%204 = zext i8 %203 to i32
%205 = getelementptr inbounds i8, i8* %89, i64 2
%206 = load i8, i8* %205
%207 = zext i8 %206 to i32
%208 = add nuw nsw i32 %204, 1
%209 = add nuw nsw i32 %208, %207
%210 = lshr i32 %209, 1
br label %257
211: ; preds = %94
%212 = icmp eq i32 %90, 2
br i1 %212, label %213, label %284
213: ; preds = %211
%214 = load i8, i8* %89
%215 = zext i8 %214 to i32
%216 = getelementptr inbounds i8, i8* %89, i64 2
%217 = load i8, i8* %216
%218 = zext i8 %217 to i32
%219 = add nuw nsw i32 %215, 1
%220 = add nuw nsw i32 %219, %218
%221 = lshr i32 %220, 1
br label %231
222: ; preds = %194
%223 = load i8, i8* %198
%224 = zext i8 %223 to i32
%225 = getelementptr inbounds i8, i8* %198, i64 2
%226 = load i8, i8* %225
%227 = zext i8 %226 to i32
%228 = add nuw nsw i32 %224, 1
%229 = add nuw nsw i32 %228, %227
%230 = lshr i32 %229, 1
br i1 %92, label %257, label %231
231: ; preds = %213, %222
%232 = phi i32 [ %221, %213 ], [ %230, %222 ]
%233 = phi i8* [ %216, %213 ], [ %225, %222 ]
%234 = phi i8* [ %91, %213 ], [ %195, %222 ]
%235 = phi i8* [ %88, %213 ], [ %197, %222 ]
%236 = phi i8* [ %89, %213 ], [ %198, %222 ]
%237 = trunc i32 %232 to i8
%238 = getelementptr inbounds i8, i8* %234, i64 1
store i8 %237, i8* %234
%239 = getelementptr inbounds i8, i8* %236, i64 1
%240 = load i8, i8* %239
%241 = getelementptr inbounds i8, i8* %234, i64 2
store i8 %240, i8* %238
%242 = getelementptr inbounds i8, i8* %235, i64 1
%243 = load i8, i8* %242
store i8 %243, i8* %241
%244 = getelementptr inbounds i8, i8* %234, i64 3
%245 = load i8, i8* %239
%246 = zext i8 %245 to i16
%247 = getelementptr inbounds i8, i8* %235, i64 2
%248 = load i8, i8* %247
%249 = zext i8 %248 to i16
%250 = add nuw nsw i16 %246, 1
%251 = add nuw nsw i16 %250, %249
%252 = lshr i16 %251, 1
%253 = load i8, i8* %233
%254 = getelementptr inbounds i8, i8* %234, i64 4
store i8 %253, i8* %244
%255 = trunc i16 %252 to i8
%256 = getelementptr inbounds i8, i8* %234, i64 5
store i8 %255, i8* %254
br label %304
257: ; preds = %202, %222
%258 = phi i32 [ %210, %202 ], [ %230, %222 ]
%259 = phi i8* [ %205, %202 ], [ %225, %222 ]
%260 = phi i8* [ %91, %202 ], [ %195, %222 ]
%261 = phi i8* [ %88, %202 ], [ %197, %222 ]
%262 = phi i8* [ %89, %202 ], [ %198, %222 ]
%263 = getelementptr inbounds i8, i8* %261, i64 1
%264 = load i8, i8* %263
%265 = getelementptr inbounds i8, i8* %260, i64 1
store i8 %264, i8* %260
%266 = getelementptr inbounds i8, i8* %262, i64 1
%267 = load i8, i8* %266
%268 = getelementptr inbounds i8, i8* %260, i64 2
store i8 %267, i8* %265
%269 = trunc i32 %258 to i8
store i8 %269, i8* %268
%270 = getelementptr inbounds i8, i8* %260, i64 3
%271 = load i8, i8* %266
%272 = zext i8 %271 to i16
%273 = getelementptr inbounds i8, i8* %261, i64 2
%274 = load i8, i8* %273
%275 = zext i8 %274 to i16
%276 = add nuw nsw i16 %272, 1
%277 = add nuw nsw i16 %276, %275
%278 = lshr i16 %277, 1
%279 = load i8, i8* %263
%280 = getelementptr inbounds i8, i8* %260, i64 4
store i8 %279, i8* %270
%281 = trunc i16 %278 to i8
%282 = getelementptr inbounds i8, i8* %260, i64 5
store i8 %281, i8* %280
br label %304
283: ; preds = %194
br i1 %92, label %294, label %284
284: ; preds = %211, %283
%285 = phi i8* [ %195, %283 ], [ %91, %211 ]
%286 = phi i8* [ %197, %283 ], [ %88, %211 ]
%287 = phi i8* [ %198, %283 ], [ %89, %211 ]
%288 = load i8, i8* %287
%289 = getelementptr inbounds i8, i8* %285, i64 1
store i8 %288, i8* %285
%290 = getelementptr inbounds i8, i8* %287, i64 1
%291 = load i8, i8* %290
%292 = getelementptr inbounds i8, i8* %285, i64 2
store i8 %291, i8* %289
%293 = getelementptr inbounds i8, i8* %286, i64 1
br label %304
294: ; preds = %200, %283
%295 = phi i8* [ %195, %283 ], [ %91, %200 ]
%296 = phi i8* [ %197, %283 ], [ %88, %200 ]
%297 = phi i8* [ %198, %283 ], [ %89, %200 ]
%298 = getelementptr inbounds i8, i8* %296, i64 1
%299 = load i8, i8* %298
%300 = getelementptr inbounds i8, i8* %295, i64 1
store i8 %299, i8* %295
%301 = getelementptr inbounds i8, i8* %297, i64 1
%302 = load i8, i8* %301
%303 = getelementptr inbounds i8, i8* %295, i64 2
store i8 %302, i8* %300
br label %304
304: ; preds = %284, %294, %231, %257
%305 = phi i8* [ %293, %284 ], [ %297, %294 ], [ %242, %231 ], [ %259, %257 ]
%306 = phi i8* [ %292, %284 ], [ %303, %294 ], [ %256, %231 ], [ %282, %257 ]
%307 = load i8, i8* %305
store i8 %307, i8* %306
ret void
}