#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 */
typedef int uint8_t;

/* Variables and functions */
int pixel_convert_8u_yuv420p_to_8u_rgba(uint8_t *dest, int dstride, int dwidth,
                                        int dheight, const uint8_t *src,
                                        int sstride) {
  const uint8_t *uplane = src + dheight * sstride;
  const uint8_t *vplane = uplane + dheight * sstride / 4;
  for (int i = 0; i < dheight / 2; i++) {
    const uint8_t *yrow1 = src + i * 2 * sstride;
    const uint8_t *yrow2 = src + i * 2 * sstride + sstride;
    const uint8_t *urow = uplane + i * sstride / 2;
    const uint8_t *vrow = vplane + i * sstride / 2;
    uint8_t *rgb1 = dest + i * 2 * dstride;
    uint8_t *rgb2 = dest + i * 2 * dstride + dstride;
    for (int j = 0; j < dwidth / 2; j++) {
      int cb = ((urow[j] - 128) * 454) >> 8;
      int cr = ((vrow[j] - 128) * 359) >> 8;
      int cg = ((vrow[j] - 128) * 183 + (urow[j] - 128) * 88) >> 8;
      int r, g, b, yp;
      yp = yrow1[j * 2];
      r = yp + cr;
      b = yp + cb;
      g = yp - cg;
      rgb1[j * 8 + 0] =
          ((0) > (((255) < (r) ? (255) : (r))) ? (0)
                                               : (((255) < (r) ? (255) : (r))));
      rgb1[j * 8 + 1] =
          ((0) > (((255) < (g) ? (255) : (g))) ? (0)
                                               : (((255) < (g) ? (255) : (g))));
      rgb1[j * 8 + 2] =
          ((0) > (((255) < (b) ? (255) : (b))) ? (0)
                                               : (((255) < (b) ? (255) : (b))));
      rgb1[j * 8 + 3] = 1;
      yp = yrow1[j * 2 + 1];
      r = yp + cr;
      b = yp + cb;
      g = yp - cg;
      rgb1[j * 8 + 4] =
          ((0) > (((255) < (r) ? (255) : (r))) ? (0)
                                               : (((255) < (r) ? (255) : (r))));
      rgb1[j * 8 + 5] =
          ((0) > (((255) < (g) ? (255) : (g))) ? (0)
                                               : (((255) < (g) ? (255) : (g))));
      rgb1[j * 8 + 6] =
          ((0) > (((255) < (b) ? (255) : (b))) ? (0)
                                               : (((255) < (b) ? (255) : (b))));
      rgb1[j * 8 + 7] = 1;
      yp = yrow2[j * 2];
      r = yp + cr;
      b = yp + cb;
      g = yp - cg;
      rgb2[j * 8 + 0] =
          ((0) > (((255) < (r) ? (255) : (r))) ? (0)
                                               : (((255) < (r) ? (255) : (r))));
      rgb2[j * 8 + 1] =
          ((0) > (((255) < (g) ? (255) : (g))) ? (0)
                                               : (((255) < (g) ? (255) : (g))));
      rgb2[j * 8 + 2] =
          ((0) > (((255) < (b) ? (255) : (b))) ? (0)
                                               : (((255) < (b) ? (255) : (b))));
      rgb2[j * 8 + 3] = 1;
      yp = yrow2[j * 2 + 1];
      r = yp + cr;
      b = yp + cb;
      g = yp - cg;
      rgb2[j * 8 + 4] =
          ((0) > (((255) < (r) ? (255) : (r))) ? (0)
                                               : (((255) < (r) ? (255) : (r))));
      rgb2[j * 8 + 5] =
          ((0) > (((255) < (g) ? (255) : (g))) ? (0)
                                               : (((255) < (g) ? (255) : (g))));
      rgb2[j * 8 + 6] =
          ((0) > (((255) < (b) ? (255) : (b))) ? (0)
                                               : (((255) < (b) ? (255) : (b))));
      rgb2[j * 8 + 7] = 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<pixel_convert_8u_yuv420p_to_8u_rgba>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc8,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x14(%rbp),%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x98(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x9c(%rbp)
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
cmp    %ecx,%eax
jge    1bf1 <pixel_convert_8u_yuv420p_to_8u_rgba+0xaf1>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
shl    $0x1,%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
shl    $0x1,%ecx
imul   -0x24(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x24(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x3c(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xb0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x3c(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xa8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
shl    $0x1,%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x3c(%rbp),%ecx
shl    $0x1,%ecx
imul   -0xc(%rbp),%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0xc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0xb4(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xb4(%rbp),%eax
cmp    %ecx,%eax
jge    1bde <pixel_convert_8u_yuv420p_to_8u_rgba+0xade>
mov    -0x58(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x80,%eax
imul   $0x1c6,%eax,%eax
sar    $0x8,%eax
mov    %eax,-0x78(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x80,%eax
imul   $0x167,%eax,%eax
sar    $0x8,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x80,%eax
imul   $0xb7,%eax,%eax
mov    -0x58(%rbp),%rcx
movslq -0x74(%rbp),%rdx
mov    (%rcx,%rdx,4),%ecx
sub    $0x80,%ecx
imul   $0x58,%ecx,%ecx
add    %ecx,%eax
sar    $0x8,%eax
mov    %eax,-0x80(%rbp)
mov    -0x48(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x90(%rbp),%eax
add    -0x78(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x90(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    1376 <pixel_convert_8u_yuv420p_to_8u_rgba+0x276>
mov    $0xff,%eax
mov    %eax,-0xb8(%rbp)
jmp    1382 <pixel_convert_8u_yuv420p_to_8u_rgba+0x282>
mov    -0x84(%rbp),%eax
mov    %eax,-0xb8(%rbp)
mov    -0xb8(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    139f <pixel_convert_8u_yuv420p_to_8u_rgba+0x29f>
xor    %eax,%eax
mov    %eax,-0xbc(%rbp)
jmp    13d8 <pixel_convert_8u_yuv420p_to_8u_rgba+0x2d8>
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    13c0 <pixel_convert_8u_yuv420p_to_8u_rgba+0x2c0>
mov    $0xff,%eax
mov    %eax,-0xc0(%rbp)
jmp    13cc <pixel_convert_8u_yuv420p_to_8u_rgba+0x2cc>
mov    -0x84(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0xc0(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0xbc(%rbp),%edx
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    1412 <pixel_convert_8u_yuv420p_to_8u_rgba+0x312>
mov    $0xff,%eax
mov    %eax,-0xc4(%rbp)
jmp    141e <pixel_convert_8u_yuv420p_to_8u_rgba+0x31e>
mov    -0x88(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0xc4(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    143b <pixel_convert_8u_yuv420p_to_8u_rgba+0x33b>
xor    %eax,%eax
mov    %eax,-0xc8(%rbp)
jmp    1474 <pixel_convert_8u_yuv420p_to_8u_rgba+0x374>
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    145c <pixel_convert_8u_yuv420p_to_8u_rgba+0x35c>
mov    $0xff,%eax
mov    %eax,-0xcc(%rbp)
jmp    1468 <pixel_convert_8u_yuv420p_to_8u_rgba+0x368>
mov    -0x88(%rbp),%eax
mov    %eax,-0xcc(%rbp)
mov    -0xcc(%rbp),%eax
mov    %eax,-0xc8(%rbp)
mov    -0xc8(%rbp),%edx
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    14ae <pixel_convert_8u_yuv420p_to_8u_rgba+0x3ae>
mov    $0xff,%eax
mov    %eax,-0xd0(%rbp)
jmp    14ba <pixel_convert_8u_yuv420p_to_8u_rgba+0x3ba>
mov    -0x8c(%rbp),%eax
mov    %eax,-0xd0(%rbp)
mov    -0xd0(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    14d7 <pixel_convert_8u_yuv420p_to_8u_rgba+0x3d7>
xor    %eax,%eax
mov    %eax,-0xd4(%rbp)
jmp    1510 <pixel_convert_8u_yuv420p_to_8u_rgba+0x410>
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    14f8 <pixel_convert_8u_yuv420p_to_8u_rgba+0x3f8>
mov    $0xff,%eax
mov    %eax,-0xd8(%rbp)
jmp    1504 <pixel_convert_8u_yuv420p_to_8u_rgba+0x404>
mov    -0x8c(%rbp),%eax
mov    %eax,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
mov    %eax,-0xd4(%rbp)
mov    -0xd4(%rbp),%edx
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x48(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x90(%rbp),%eax
add    -0x78(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x90(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    15a7 <pixel_convert_8u_yuv420p_to_8u_rgba+0x4a7>
mov    $0xff,%eax
mov    %eax,-0xdc(%rbp)
jmp    15b3 <pixel_convert_8u_yuv420p_to_8u_rgba+0x4b3>
mov    -0x84(%rbp),%eax
mov    %eax,-0xdc(%rbp)
mov    -0xdc(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    15d0 <pixel_convert_8u_yuv420p_to_8u_rgba+0x4d0>
xor    %eax,%eax
mov    %eax,-0xe0(%rbp)
jmp    1609 <pixel_convert_8u_yuv420p_to_8u_rgba+0x509>
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    15f1 <pixel_convert_8u_yuv420p_to_8u_rgba+0x4f1>
mov    $0xff,%eax
mov    %eax,-0xe4(%rbp)
jmp    15fd <pixel_convert_8u_yuv420p_to_8u_rgba+0x4fd>
mov    -0x84(%rbp),%eax
mov    %eax,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
mov    %eax,-0xe0(%rbp)
mov    -0xe0(%rbp),%edx
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    1643 <pixel_convert_8u_yuv420p_to_8u_rgba+0x543>
mov    $0xff,%eax
mov    %eax,-0xe8(%rbp)
jmp    164f <pixel_convert_8u_yuv420p_to_8u_rgba+0x54f>
mov    -0x88(%rbp),%eax
mov    %eax,-0xe8(%rbp)
mov    -0xe8(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    166c <pixel_convert_8u_yuv420p_to_8u_rgba+0x56c>
xor    %eax,%eax
mov    %eax,-0xec(%rbp)
jmp    16a5 <pixel_convert_8u_yuv420p_to_8u_rgba+0x5a5>
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    168d <pixel_convert_8u_yuv420p_to_8u_rgba+0x58d>
mov    $0xff,%eax
mov    %eax,-0xf0(%rbp)
jmp    1699 <pixel_convert_8u_yuv420p_to_8u_rgba+0x599>
mov    -0x88(%rbp),%eax
mov    %eax,-0xf0(%rbp)
mov    -0xf0(%rbp),%eax
mov    %eax,-0xec(%rbp)
mov    -0xec(%rbp),%edx
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    16df <pixel_convert_8u_yuv420p_to_8u_rgba+0x5df>
mov    $0xff,%eax
mov    %eax,-0xf4(%rbp)
jmp    16eb <pixel_convert_8u_yuv420p_to_8u_rgba+0x5eb>
mov    -0x8c(%rbp),%eax
mov    %eax,-0xf4(%rbp)
mov    -0xf4(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1708 <pixel_convert_8u_yuv420p_to_8u_rgba+0x608>
xor    %eax,%eax
mov    %eax,-0xf8(%rbp)
jmp    1741 <pixel_convert_8u_yuv420p_to_8u_rgba+0x641>
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    1729 <pixel_convert_8u_yuv420p_to_8u_rgba+0x629>
mov    $0xff,%eax
mov    %eax,-0xfc(%rbp)
jmp    1735 <pixel_convert_8u_yuv420p_to_8u_rgba+0x635>
mov    -0x8c(%rbp),%eax
mov    %eax,-0xfc(%rbp)
mov    -0xfc(%rbp),%eax
mov    %eax,-0xf8(%rbp)
mov    -0xf8(%rbp),%edx
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x68(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x50(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x90(%rbp),%eax
add    -0x78(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x90(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    17d5 <pixel_convert_8u_yuv420p_to_8u_rgba+0x6d5>
mov    $0xff,%eax
mov    %eax,-0x100(%rbp)
jmp    17e1 <pixel_convert_8u_yuv420p_to_8u_rgba+0x6e1>
mov    -0x84(%rbp),%eax
mov    %eax,-0x100(%rbp)
mov    -0x100(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    17fe <pixel_convert_8u_yuv420p_to_8u_rgba+0x6fe>
xor    %eax,%eax
mov    %eax,-0x104(%rbp)
jmp    1837 <pixel_convert_8u_yuv420p_to_8u_rgba+0x737>
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    181f <pixel_convert_8u_yuv420p_to_8u_rgba+0x71f>
mov    $0xff,%eax
mov    %eax,-0x108(%rbp)
jmp    182b <pixel_convert_8u_yuv420p_to_8u_rgba+0x72b>
mov    -0x84(%rbp),%eax
mov    %eax,-0x108(%rbp)
mov    -0x108(%rbp),%eax
mov    %eax,-0x104(%rbp)
mov    -0x104(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    1871 <pixel_convert_8u_yuv420p_to_8u_rgba+0x771>
mov    $0xff,%eax
mov    %eax,-0x10c(%rbp)
jmp    187d <pixel_convert_8u_yuv420p_to_8u_rgba+0x77d>
mov    -0x88(%rbp),%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    189a <pixel_convert_8u_yuv420p_to_8u_rgba+0x79a>
xor    %eax,%eax
mov    %eax,-0x110(%rbp)
jmp    18d3 <pixel_convert_8u_yuv420p_to_8u_rgba+0x7d3>
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    18bb <pixel_convert_8u_yuv420p_to_8u_rgba+0x7bb>
mov    $0xff,%eax
mov    %eax,-0x114(%rbp)
jmp    18c7 <pixel_convert_8u_yuv420p_to_8u_rgba+0x7c7>
mov    -0x88(%rbp),%eax
mov    %eax,-0x114(%rbp)
mov    -0x114(%rbp),%eax
mov    %eax,-0x110(%rbp)
mov    -0x110(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    190d <pixel_convert_8u_yuv420p_to_8u_rgba+0x80d>
mov    $0xff,%eax
mov    %eax,-0x118(%rbp)
jmp    1919 <pixel_convert_8u_yuv420p_to_8u_rgba+0x819>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x118(%rbp)
mov    -0x118(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1936 <pixel_convert_8u_yuv420p_to_8u_rgba+0x836>
xor    %eax,%eax
mov    %eax,-0x11c(%rbp)
jmp    196f <pixel_convert_8u_yuv420p_to_8u_rgba+0x86f>
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    1957 <pixel_convert_8u_yuv420p_to_8u_rgba+0x857>
mov    $0xff,%eax
mov    %eax,-0x120(%rbp)
jmp    1963 <pixel_convert_8u_yuv420p_to_8u_rgba+0x863>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x120(%rbp)
mov    -0x120(%rbp),%eax
mov    %eax,-0x11c(%rbp)
mov    -0x11c(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x50(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x90(%rbp)
mov    -0x90(%rbp),%eax
add    -0x7c(%rbp),%eax
mov    %eax,-0x84(%rbp)
mov    -0x90(%rbp),%eax
add    -0x78(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x90(%rbp),%eax
sub    -0x80(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    1a06 <pixel_convert_8u_yuv420p_to_8u_rgba+0x906>
mov    $0xff,%eax
mov    %eax,-0x124(%rbp)
jmp    1a12 <pixel_convert_8u_yuv420p_to_8u_rgba+0x912>
mov    -0x84(%rbp),%eax
mov    %eax,-0x124(%rbp)
mov    -0x124(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1a2f <pixel_convert_8u_yuv420p_to_8u_rgba+0x92f>
xor    %eax,%eax
mov    %eax,-0x128(%rbp)
jmp    1a68 <pixel_convert_8u_yuv420p_to_8u_rgba+0x968>
mov    $0xff,%eax
cmp    -0x84(%rbp),%eax
jge    1a50 <pixel_convert_8u_yuv420p_to_8u_rgba+0x950>
mov    $0xff,%eax
mov    %eax,-0x12c(%rbp)
jmp    1a5c <pixel_convert_8u_yuv420p_to_8u_rgba+0x95c>
mov    -0x84(%rbp),%eax
mov    %eax,-0x12c(%rbp)
mov    -0x12c(%rbp),%eax
mov    %eax,-0x128(%rbp)
mov    -0x128(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    1aa2 <pixel_convert_8u_yuv420p_to_8u_rgba+0x9a2>
mov    $0xff,%eax
mov    %eax,-0x130(%rbp)
jmp    1aae <pixel_convert_8u_yuv420p_to_8u_rgba+0x9ae>
mov    -0x88(%rbp),%eax
mov    %eax,-0x130(%rbp)
mov    -0x130(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1acb <pixel_convert_8u_yuv420p_to_8u_rgba+0x9cb>
xor    %eax,%eax
mov    %eax,-0x134(%rbp)
jmp    1b04 <pixel_convert_8u_yuv420p_to_8u_rgba+0xa04>
mov    $0xff,%eax
cmp    -0x88(%rbp),%eax
jge    1aec <pixel_convert_8u_yuv420p_to_8u_rgba+0x9ec>
mov    $0xff,%eax
mov    %eax,-0x138(%rbp)
jmp    1af8 <pixel_convert_8u_yuv420p_to_8u_rgba+0x9f8>
mov    -0x88(%rbp),%eax
mov    %eax,-0x138(%rbp)
mov    -0x138(%rbp),%eax
mov    %eax,-0x134(%rbp)
mov    -0x134(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    1b3e <pixel_convert_8u_yuv420p_to_8u_rgba+0xa3e>
mov    $0xff,%eax
mov    %eax,-0x13c(%rbp)
jmp    1b4a <pixel_convert_8u_yuv420p_to_8u_rgba+0xa4a>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x13c(%rbp)
mov    -0x13c(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
jle    1b67 <pixel_convert_8u_yuv420p_to_8u_rgba+0xa67>
xor    %eax,%eax
mov    %eax,-0x140(%rbp)
jmp    1ba0 <pixel_convert_8u_yuv420p_to_8u_rgba+0xaa0>
mov    $0xff,%eax
cmp    -0x8c(%rbp),%eax
jge    1b88 <pixel_convert_8u_yuv420p_to_8u_rgba+0xa88>
mov    $0xff,%eax
mov    %eax,-0x144(%rbp)
jmp    1b94 <pixel_convert_8u_yuv420p_to_8u_rgba+0xa94>
mov    -0x8c(%rbp),%eax
mov    %eax,-0x144(%rbp)
mov    -0x144(%rbp),%eax
mov    %eax,-0x140(%rbp)
mov    -0x140(%rbp),%edx
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x70(%rbp),%rax
mov    -0x74(%rbp),%ecx
shl    $0x3,%ecx
add    $0x7,%ecx
movslq %ecx,%rcx
movl   $0x1,(%rax,%rcx,4)
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1284 <pixel_convert_8u_yuv420p_to_8u_rgba+0x184>
jmp    1be3 <pixel_convert_8u_yuv420p_to_8u_rgba+0xae3>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1171 <pixel_convert_8u_yuv420p_to_8u_rgba+0x71>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pixel_convert_8u_yuv420p_to_8u_rgba>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %edx,-0x44(%rsp)
mov    %r9d,-0x48(%rsp)
mov    %r9d,%edx
imul   %ecx,%edx
lea    0x3(%rdx),%eax
test   %edx,%edx
cmovns %edx,%eax
mov    %rcx,-0x40(%rsp)
cmp    $0x2,%ecx
jl     13e7 <pixel_convert_8u_yuv420p_to_8u_rgba+0x2e7>
movslq %edx,%rcx
lea    (%r8,%rcx,4),%rcx
sar    $0x2,%eax
cltq
mov    %rcx,-0x20(%rsp)
lea    (%rcx,%rax,4),%rax
mov    %rax,-0x28(%rsp)
mov    -0x40(%rsp),%rax
shr    %eax
mov    %rax,-0x40(%rsp)
movslq -0x48(%rsp),%rcx
movslq %esi,%rdx
mov    -0x44(%rsp),%eax
mov    %eax,%esi
shr    $0x1f,%esi
add    %eax,%esi
sar    %esi
mov    %rsi,-0x30(%rsp)
lea    (%r8,%rcx,4),%rbx
add    $0x4,%rbx
shl    $0x3,%rcx
mov    %rcx,-0x10(%rsp)
add    $0x4,%r8
lea    (%rdi,%rdx,4),%rax
add    $0x1c,%rax
shl    $0x3,%rdx
mov    %rdx,-0x18(%rsp)
add    $0x1c,%rdi
xor    %ecx,%ecx
mov    %rcx,-0x38(%rsp)
jmp    11e2 <pixel_convert_8u_yuv420p_to_8u_rgba+0xe2>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    -0x38(%rsp),%rdx
add    $0x1,%rdx
mov    -0x10(%rsp),%rcx
add    %rcx,%rbx
add    %rcx,%r8
mov    -0x18(%rsp),%rcx
add    %rcx,%rax
add    %rcx,%rdi
mov    %rdx,%rcx
mov    %rdx,-0x38(%rsp)
cmp    -0x40(%rsp),%rdx
je     13e7 <pixel_convert_8u_yuv420p_to_8u_rgba+0x2e7>
cmpl   $0x2,-0x44(%rsp)
jl     11b0 <pixel_convert_8u_yuv420p_to_8u_rgba+0xb0>
mov    -0x38(%rsp),%rcx
imul   -0x48(%rsp),%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
add    %ecx,%edx
sar    %edx
movslq %edx,%rcx
mov    -0x20(%rsp),%rdx
lea    (%rdx,%rcx,4),%rdx
mov    %rdx,-0x8(%rsp)
mov    -0x28(%rsp),%rdx
lea    (%rdx,%rcx,4),%r13
mov    -0x30(%rsp),%r14
xor    %r11d,%r11d
jmp    123b <pixel_convert_8u_yuv420p_to_8u_rgba+0x13b>
mov    %r9d,-0x4(%rax,%r11,8)
movl   $0x1,(%rax,%r11,8)
add    $0x4,%r11
add    $0xffffffffffffffff,%r14
je     11b0 <pixel_convert_8u_yuv420p_to_8u_rgba+0xb0>
mov    -0x8(%rsp),%rcx
mov    (%rcx,%r11,1),%ecx
add    $0xffffff80,%ecx
imul   $0x1c6,%ecx,%r10d
mov    0x0(%r13,%r11,1),%edx
add    $0xffffff80,%edx
imul   $0x167,%edx,%r15d
sar    $0x8,%r15d
imul   $0xb7,%edx,%esi
imul   $0x58,%ecx,%edx
add    %esi,%edx
sar    $0x8,%edx
mov    -0x4(%r8,%r11,2),%ecx
lea    (%r15,%rcx,1),%esi
mov    %ecx,%r12d
sub    %edx,%r12d
cmp    $0xff,%esi
mov    $0xff,%r9d
cmovge %r9d,%esi
test   %esi,%esi
jns    1294 <pixel_convert_8u_yuv420p_to_8u_rgba+0x194>
xor    %esi,%esi
sar    $0x8,%r10d
mov    %esi,-0x1c(%rdi,%r11,8)
cmp    $0xff,%r12d
jl     12ac <pixel_convert_8u_yuv420p_to_8u_rgba+0x1ac>
mov    $0xff,%r12d
add    %r10d,%ecx
test   %r12d,%r12d
jns    12b7 <pixel_convert_8u_yuv420p_to_8u_rgba+0x1b7>
xor    %r12d,%r12d
mov    %r12d,-0x18(%rdi,%r11,8)
cmp    $0xff,%ecx
cmovge %r9d,%ecx
test   %ecx,%ecx
jns    12cc <pixel_convert_8u_yuv420p_to_8u_rgba+0x1cc>
xor    %ecx,%ecx
mov    %ecx,-0x14(%rdi,%r11,8)
movl   $0x1,-0x10(%rdi,%r11,8)
mov    (%r8,%r11,2),%ecx
lea    (%rcx,%r15,1),%ebp
mov    %ecx,%esi
sub    %edx,%esi
cmp    $0xff,%ebp
cmovge %r9d,%ebp
test   %ebp,%ebp
jns    12f6 <pixel_convert_8u_yuv420p_to_8u_rgba+0x1f6>
xor    %ebp,%ebp
mov    %ebp,-0xc(%rdi,%r11,8)
cmp    $0xff,%esi
jl     1308 <pixel_convert_8u_yuv420p_to_8u_rgba+0x208>
mov    $0xff,%esi
add    %r10d,%ecx
test   %esi,%esi
jns    1311 <pixel_convert_8u_yuv420p_to_8u_rgba+0x211>
xor    %esi,%esi
mov    %esi,-0x8(%rdi,%r11,8)
cmp    $0xff,%ecx
cmovge %r9d,%ecx
test   %ecx,%ecx
jns    1326 <pixel_convert_8u_yuv420p_to_8u_rgba+0x226>
xor    %ecx,%ecx
mov    %ecx,-0x4(%rdi,%r11,8)
movl   $0x1,(%rdi,%r11,8)
mov    -0x4(%rbx,%r11,2),%ecx
lea    (%rcx,%r15,1),%ebp
mov    %ecx,%esi
sub    %edx,%esi
cmp    $0xff,%ebp
cmovge %r9d,%ebp
test   %ebp,%ebp
jns    1350 <pixel_convert_8u_yuv420p_to_8u_rgba+0x250>
xor    %ebp,%ebp
mov    %ebp,-0x1c(%rax,%r11,8)
cmp    $0xff,%esi
jl     1362 <pixel_convert_8u_yuv420p_to_8u_rgba+0x262>
mov    $0xff,%esi
add    %r10d,%ecx
test   %esi,%esi
jns    136b <pixel_convert_8u_yuv420p_to_8u_rgba+0x26b>
xor    %esi,%esi
mov    %esi,-0x18(%rax,%r11,8)
cmp    $0xff,%ecx
cmovge %r9d,%ecx
test   %ecx,%ecx
jns    1380 <pixel_convert_8u_yuv420p_to_8u_rgba+0x280>
xor    %ecx,%ecx
mov    %ecx,-0x14(%rax,%r11,8)
movl   $0x1,-0x10(%rax,%r11,8)
mov    (%rbx,%r11,2),%ecx
add    %ecx,%r15d
mov    %ecx,%esi
sub    %edx,%esi
cmp    $0xff,%r15d
cmovge %r9d,%r15d
test   %r15d,%r15d
jns    13ac <pixel_convert_8u_yuv420p_to_8u_rgba+0x2ac>
xor    %r15d,%r15d
mov    %r15d,-0xc(%rax,%r11,8)
cmp    $0xff,%esi
jl     13be <pixel_convert_8u_yuv420p_to_8u_rgba+0x2be>
mov    $0xff,%esi
add    %r10d,%ecx
test   %esi,%esi
jns    13c7 <pixel_convert_8u_yuv420p_to_8u_rgba+0x2c7>
xor    %esi,%esi
mov    %esi,-0x8(%rax,%r11,8)
cmp    $0xff,%ecx
cmovl  %ecx,%r9d
test   %r9d,%r9d
jns    1220 <pixel_convert_8u_yuv420p_to_8u_rgba+0x120>
xor    %r9d,%r9d
jmp    1220 <pixel_convert_8u_yuv420p_to_8u_rgba+0x120>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @pixel_convert_8u_yuv420p_to_8u_rgba(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32 %5) {
%7 = mul nsw i32 %5, %3
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %4, i64 %8
%10 = sdiv i32 %7, 4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = icmp sgt i32 %3, 1
br i1 %13, label %14, label %22
14: ; preds = %6
%15 = lshr i32 %3, 1
%16 = sext i32 %5 to i64
%17 = sext i32 %1 to i64
%18 = sdiv i32 %2, 2
%19 = icmp sgt i32 %2, 1
%20 = zext i32 %15 to i64
%21 = zext i32 %18 to i64
br label %23
22: ; preds = %38, %6
ret i32 0
23: ; preds = %14, %38
%24 = phi i64 [ 0, %14 ], [ %39, %38 ]
%25 = shl nuw nsw i64 %24, 1
%26 = mul nsw i64 %25, %16
%27 = getelementptr inbounds i32, i32* %4, i64 %26
%28 = getelementptr inbounds i32, i32* %27, i64 %16
%29 = trunc i64 %24 to i32
%30 = mul i32 %29, %5
%31 = sdiv i32 %30, 2
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %9, i64 %32
%34 = getelementptr inbounds i32, i32* %12, i64 %32
%35 = mul nsw i64 %25, %17
%36 = getelementptr inbounds i32, i32* %0, i64 %35
%37 = getelementptr inbounds i32, i32* %36, i64 %17
br i1 %19, label %41, label %38
38: ; preds = %41, %23
%39 = add nuw nsw i64 %24, 1
%40 = icmp eq i64 %39, %20
br i1 %40, label %22, label %23
41: ; preds = %23, %41
%42 = phi i64 [ %151, %41 ], [ 0, %23 ]
%43 = getelementptr inbounds i32, i32* %33, i64 %42
%44 = load i32, i32* %43
%45 = add nsw i32 %44, -128
%46 = mul nsw i32 %45, 454
%47 = ashr i32 %46, 8
%48 = getelementptr inbounds i32, i32* %34, i64 %42
%49 = load i32, i32* %48
%50 = add nsw i32 %49, -128
%51 = mul nsw i32 %50, 359
%52 = ashr i32 %51, 8
%53 = mul nsw i32 %50, 183
%54 = mul nsw i32 %45, 88
%55 = add nsw i32 %53, %54
%56 = ashr i32 %55, 8
%57 = shl nuw nsw i64 %42, 1
%58 = getelementptr inbounds i32, i32* %27, i64 %57
%59 = load i32, i32* %58
%60 = add nsw i32 %52, %59
%61 = add nsw i32 %47, %59
%62 = sub nsw i32 %59, %56
%63 = icmp slt i32 %60, 255
%64 = select i1 %63, i32 %60, i32 255
%65 = icmp sgt i32 %64, 0
%66 = select i1 %65, i32 %64, i32 0
%67 = shl nsw i64 %42, 3
%68 = getelementptr inbounds i32, i32* %36, i64 %67
store i32 %66, i32* %68
%69 = icmp slt i32 %62, 255
%70 = select i1 %69, i32 %62, i32 255
%71 = icmp sgt i32 %70, 0
%72 = select i1 %71, i32 %70, i32 0
%73 = or i64 %67, 1
%74 = getelementptr inbounds i32, i32* %36, i64 %73
store i32 %72, i32* %74
%75 = icmp slt i32 %61, 255
%76 = select i1 %75, i32 %61, i32 255
%77 = icmp sgt i32 %76, 0
%78 = select i1 %77, i32 %76, i32 0
%79 = or i64 %67, 2
%80 = getelementptr inbounds i32, i32* %36, i64 %79
store i32 %78, i32* %80
%81 = or i64 %67, 3
%82 = getelementptr inbounds i32, i32* %36, i64 %81
store i32 1, i32* %82
%83 = or i64 %57, 1
%84 = getelementptr inbounds i32, i32* %27, i64 %83
%85 = load i32, i32* %84
%86 = add nsw i32 %85, %52
%87 = add nsw i32 %85, %47
%88 = sub nsw i32 %85, %56
%89 = icmp slt i32 %86, 255
%90 = select i1 %89, i32 %86, i32 255
%91 = icmp sgt i32 %90, 0
%92 = select i1 %91, i32 %90, i32 0
%93 = or i64 %67, 4
%94 = getelementptr inbounds i32, i32* %36, i64 %93
store i32 %92, i32* %94
%95 = icmp slt i32 %88, 255
%96 = select i1 %95, i32 %88, i32 255
%97 = icmp sgt i32 %96, 0
%98 = select i1 %97, i32 %96, i32 0
%99 = or i64 %67, 5
%100 = getelementptr inbounds i32, i32* %36, i64 %99
store i32 %98, i32* %100
%101 = icmp slt i32 %87, 255
%102 = select i1 %101, i32 %87, i32 255
%103 = icmp sgt i32 %102, 0
%104 = select i1 %103, i32 %102, i32 0
%105 = or i64 %67, 6
%106 = getelementptr inbounds i32, i32* %36, i64 %105
store i32 %104, i32* %106
%107 = or i64 %67, 7
%108 = getelementptr inbounds i32, i32* %36, i64 %107
store i32 1, i32* %108
%109 = getelementptr inbounds i32, i32* %28, i64 %57
%110 = load i32, i32* %109
%111 = add nsw i32 %110, %52
%112 = add nsw i32 %110, %47
%113 = sub nsw i32 %110, %56
%114 = icmp slt i32 %111, 255
%115 = select i1 %114, i32 %111, i32 255
%116 = icmp sgt i32 %115, 0
%117 = select i1 %116, i32 %115, i32 0
%118 = getelementptr inbounds i32, i32* %37, i64 %67
store i32 %117, i32* %118
%119 = icmp slt i32 %113, 255
%120 = select i1 %119, i32 %113, i32 255
%121 = icmp sgt i32 %120, 0
%122 = select i1 %121, i32 %120, i32 0
%123 = getelementptr inbounds i32, i32* %37, i64 %73
store i32 %122, i32* %123
%124 = icmp slt i32 %112, 255
%125 = select i1 %124, i32 %112, i32 255
%126 = icmp sgt i32 %125, 0
%127 = select i1 %126, i32 %125, i32 0
%128 = getelementptr inbounds i32, i32* %37, i64 %79
store i32 %127, i32* %128
%129 = getelementptr inbounds i32, i32* %37, i64 %81
store i32 1, i32* %129
%130 = getelementptr inbounds i32, i32* %28, i64 %83
%131 = load i32, i32* %130
%132 = add nsw i32 %131, %52
%133 = add nsw i32 %131, %47
%134 = sub nsw i32 %131, %56
%135 = icmp slt i32 %132, 255
%136 = select i1 %135, i32 %132, i32 255
%137 = icmp sgt i32 %136, 0
%138 = select i1 %137, i32 %136, i32 0
%139 = getelementptr inbounds i32, i32* %37, i64 %93
store i32 %138, i32* %139
%140 = icmp slt i32 %134, 255
%141 = select i1 %140, i32 %134, i32 255
%142 = icmp sgt i32 %141, 0
%143 = select i1 %142, i32 %141, i32 0
%144 = getelementptr inbounds i32, i32* %37, i64 %99
store i32 %143, i32* %144
%145 = icmp slt i32 %133, 255
%146 = select i1 %145, i32 %133, i32 255
%147 = icmp sgt i32 %146, 0
%148 = select i1 %147, i32 %146, i32 0
%149 = getelementptr inbounds i32, i32* %37, i64 %105
store i32 %148, i32* %149
%150 = getelementptr inbounds i32, i32* %37, i64 %107
store i32 1, i32* %150
%151 = add nuw nsw i64 %42, 1
%152 = icmp eq i64 %151, %21
br i1 %152, label %38, label %41
}