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

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ unaligned16_be(int /*<<< orphan*/ const *);
int /*<<< orphan*/ unaligned16_le(int /*<<< orphan*/ const *);
__attribute__((always_)) int
sbc_encoder_process_input_s4_internal(int position, const uint8_t *pcm,
                                      int16_t X[2][328], int nsamples,
                                      int nchannels, int big_endian) {
  if (position < nsamples) {
    if (nchannels > 0)
      memcpy(&X[0][328 - 40], &X[0][position], 36 * sizeof(int16_t));
    if (nchannels > 1)
      memcpy(&X[1][328 - 40], &X[1][position], 36 * sizeof(int16_t));
    position = 328 - 40;
  }
  while ((nsamples -= 8) >= 0) {
    position -= 8;
    if (nchannels > 0) {
      int16_t *x = &X[0][position];
      x[0] = (big_endian ? unaligned16_be(pcm + (0 + 7 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 7 * nchannels) * 2));
      x[1] = (big_endian ? unaligned16_be(pcm + (0 + 3 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 3 * nchannels) * 2));
      x[2] = (big_endian ? unaligned16_be(pcm + (0 + 6 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 6 * nchannels) * 2));
      x[3] = (big_endian ? unaligned16_be(pcm + (0 + 4 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 4 * nchannels) * 2));
      x[4] = (big_endian ? unaligned16_be(pcm + (0 + 0 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 0 * nchannels) * 2));
      x[5] = (big_endian ? unaligned16_be(pcm + (0 + 2 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 2 * nchannels) * 2));
      x[6] = (big_endian ? unaligned16_be(pcm + (0 + 1 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 1 * nchannels) * 2));
      x[7] = (big_endian ? unaligned16_be(pcm + (0 + 5 * nchannels) * 2)
                         : unaligned16_le(pcm + (0 + 5 * nchannels) * 2));
    }
    if (nchannels > 1) {
      int16_t *x = &X[1][position];
      x[0] = (big_endian ? unaligned16_be(pcm + (1 + 7 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 7 * nchannels) * 2));
      x[1] = (big_endian ? unaligned16_be(pcm + (1 + 3 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 3 * nchannels) * 2));
      x[2] = (big_endian ? unaligned16_be(pcm + (1 + 6 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 6 * nchannels) * 2));
      x[3] = (big_endian ? unaligned16_be(pcm + (1 + 4 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 4 * nchannels) * 2));
      x[4] = (big_endian ? unaligned16_be(pcm + (1 + 0 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 0 * nchannels) * 2));
      x[5] = (big_endian ? unaligned16_be(pcm + (1 + 2 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 2 * nchannels) * 2));
      x[6] = (big_endian ? unaligned16_be(pcm + (1 + 1 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 1 * nchannels) * 2));
      x[7] = (big_endian ? unaligned16_be(pcm + (1 + 5 * nchannels) * 2)
                         : unaligned16_le(pcm + (1 + 5 * nchannels) * 2));
    }
    pcm += 16 * nchannels;
  }
  return position;
}


x86 assembly (clang, -O0):
<sbc_encoder_process_input_s4_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    11ce <sbc_encoder_process_input_s4_internal+0x9e>
cmpl   $0x0,-0x20(%rbp)
jle    118b <sbc_encoder_process_input_s4_internal+0x5b>
mov    -0x18(%rbp),%rdi
add    $0x480,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    $0x90,%edx
call   1030 <memcpy@plt>
cmpl   $0x1,-0x20(%rbp)
jle    11c7 <sbc_encoder_process_input_s4_internal+0x97>
mov    -0x18(%rbp),%rdi
add    $0x520,%rdi
add    $0x480,%rdi
mov    -0x18(%rbp),%rsi
add    $0x520,%rsi
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
mov    $0x90,%edx
call   1030 <memcpy@plt>
movl   $0x120,-0x4(%rbp)
jmp    11d3 <sbc_encoder_process_input_s4_internal+0xa3>
mov    -0x1c(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
jl     17d1 <sbc_encoder_process_input_s4_internal+0x6a1>
mov    -0x4(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x20(%rbp)
jle    14ce <sbc_encoder_process_input_s4_internal+0x39e>
mov    -0x18(%rbp),%rax
movslq -0x4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     1239 <sbc_encoder_process_input_s4_internal+0x109>
mov    -0x10(%rbp),%rdi
imul   $0x7,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x3c(%rbp)
jmp    1258 <sbc_encoder_process_input_s4_internal+0x128>
mov    -0x10(%rbp),%rdi
imul   $0x7,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x24(%rbp)
je     128f <sbc_encoder_process_input_s4_internal+0x15f>
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x40(%rbp)
jmp    12ae <sbc_encoder_process_input_s4_internal+0x17e>
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,0x4(%rax)
cmpl   $0x0,-0x24(%rbp)
je     12e6 <sbc_encoder_process_input_s4_internal+0x1b6>
mov    -0x10(%rbp),%rdi
imul   $0x6,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x44(%rbp)
jmp    1305 <sbc_encoder_process_input_s4_internal+0x1d5>
mov    -0x10(%rbp),%rdi
imul   $0x6,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,0x8(%rax)
cmpl   $0x0,-0x24(%rbp)
je     133f <sbc_encoder_process_input_s4_internal+0x20f>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x2,%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x48(%rbp)
jmp    1360 <sbc_encoder_process_input_s4_internal+0x230>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x2,%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x48(%rbp)
mov    -0x48(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,0xc(%rax)
cmpl   $0x0,-0x24(%rbp)
je     1398 <sbc_encoder_process_input_s4_internal+0x268>
mov    -0x10(%rbp),%rdi
imul   $0x0,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x4c(%rbp)
jmp    13b7 <sbc_encoder_process_input_s4_internal+0x287>
mov    -0x10(%rbp),%rdi
imul   $0x0,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,0x10(%rax)
cmpl   $0x0,-0x24(%rbp)
je     13f1 <sbc_encoder_process_input_s4_internal+0x2c1>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x50(%rbp)
jmp    1412 <sbc_encoder_process_input_s4_internal+0x2e2>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x50(%rbp)
mov    -0x50(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,0x14(%rax)
cmpl   $0x0,-0x24(%rbp)
je     144c <sbc_encoder_process_input_s4_internal+0x31c>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x0,%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x54(%rbp)
jmp    146d <sbc_encoder_process_input_s4_internal+0x33d>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x0,%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x54(%rbp)
mov    -0x54(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,0x18(%rax)
cmpl   $0x0,-0x24(%rbp)
je     14a5 <sbc_encoder_process_input_s4_internal+0x375>
mov    -0x10(%rbp),%rdi
imul   $0x5,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x58(%rbp)
jmp    14c4 <sbc_encoder_process_input_s4_internal+0x394>
mov    -0x10(%rbp),%rdi
imul   $0x5,-0x20(%rbp),%eax
add    $0x0,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,0x1c(%rax)
cmpl   $0x1,-0x20(%rbp)
jle    17b4 <sbc_encoder_process_input_s4_internal+0x684>
mov    -0x18(%rbp),%rax
add    $0x520,%rax
movslq -0x4(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     151f <sbc_encoder_process_input_s4_internal+0x3ef>
mov    -0x10(%rbp),%rdi
imul   $0x7,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x5c(%rbp)
jmp    153e <sbc_encoder_process_input_s4_internal+0x40e>
mov    -0x10(%rbp),%rdi
imul   $0x7,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x5c(%rbp)
mov    -0x5c(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,(%rax)
cmpl   $0x0,-0x24(%rbp)
je     1575 <sbc_encoder_process_input_s4_internal+0x445>
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x60(%rbp)
jmp    1594 <sbc_encoder_process_input_s4_internal+0x464>
mov    -0x10(%rbp),%rdi
imul   $0x3,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x60(%rbp)
mov    -0x60(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0x4(%rax)
cmpl   $0x0,-0x24(%rbp)
je     15cc <sbc_encoder_process_input_s4_internal+0x49c>
mov    -0x10(%rbp),%rdi
imul   $0x6,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x64(%rbp)
jmp    15eb <sbc_encoder_process_input_s4_internal+0x4bb>
mov    -0x10(%rbp),%rdi
imul   $0x6,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x64(%rbp)
mov    -0x64(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0x8(%rax)
cmpl   $0x0,-0x24(%rbp)
je     1625 <sbc_encoder_process_input_s4_internal+0x4f5>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x68(%rbp)
jmp    1646 <sbc_encoder_process_input_s4_internal+0x516>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x2,%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0xc(%rax)
cmpl   $0x0,-0x24(%rbp)
je     167e <sbc_encoder_process_input_s4_internal+0x54e>
mov    -0x10(%rbp),%rdi
imul   $0x0,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x6c(%rbp)
jmp    169d <sbc_encoder_process_input_s4_internal+0x56d>
mov    -0x10(%rbp),%rdi
imul   $0x0,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x6c(%rbp)
mov    -0x6c(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0x10(%rax)
cmpl   $0x0,-0x24(%rbp)
je     16d7 <sbc_encoder_process_input_s4_internal+0x5a7>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x70(%rbp)
jmp    16f8 <sbc_encoder_process_input_s4_internal+0x5c8>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x70(%rbp)
mov    -0x70(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0x14(%rax)
cmpl   $0x0,-0x24(%rbp)
je     1732 <sbc_encoder_process_input_s4_internal+0x602>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x0,%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x74(%rbp)
jmp    1753 <sbc_encoder_process_input_s4_internal+0x623>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%eax
shl    $0x0,%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0x18(%rax)
cmpl   $0x0,-0x24(%rbp)
je     178b <sbc_encoder_process_input_s4_internal+0x65b>
mov    -0x10(%rbp),%rdi
imul   $0x5,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,-0x78(%rbp)
jmp    17aa <sbc_encoder_process_input_s4_internal+0x67a>
mov    -0x10(%rbp),%rdi
imul   $0x5,-0x20(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
cltq
shl    $0x2,%rax
add    %rax,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%ecx
mov    -0x38(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x20(%rbp),%ecx
shl    $0x4,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    11d3 <sbc_encoder_process_input_s4_internal+0xa3>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbc_encoder_process_input_s4_internal>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %r9d,0x34(%rsp)
mov    %r8d,%r15d
mov    %ecx,%ebp
mov    %rdx,%r13
mov    %rsi,%rbx
cmp    %ecx,%edi
jge    11a3 <sbc_encoder_process_input_s4_internal+0x73>
mov    $0x120,%r12d
test   %r15d,%r15d
jle    11a6 <sbc_encoder_process_input_s4_internal+0x76>
lea    0x480(%r13),%rax
movslq %edi,%r14
lea    0x0(,%r14,4),%rsi
add    %r13,%rsi
mov    %rax,%rdi
mov    $0x90,%edx
call   1030 <memcpy@plt>
cmp    $0x1,%r15d
je     11a6 <sbc_encoder_process_input_s4_internal+0x76>
lea    0x9a0(%r13),%rdi
lea    0x520(,%r14,4),%rsi
add    %r13,%rsi
mov    $0x90,%edx
call   1030 <memcpy@plt>
jmp    11a6 <sbc_encoder_process_input_s4_internal+0x76>
mov    %edi,%r12d
cmp    $0x8,%ebp
jl     1537 <sbc_encoder_process_input_s4_internal+0x407>
mov    %r15d,%eax
shl    $0x4,%eax
mov    %r13,%r14
movslq %eax,%r13
sub    %r15d,%eax
sub    %r15d,%eax
movslq %eax,%r8
lea    (%r15,%r15,1),%eax
lea    (%rax,%rax,2),%ecx
movslq %ecx,%rdi
lea    0x0(,%r15,4),%ecx
lea    (%rcx,%rcx,2),%edx
movslq %edx,%rsi
lea    0x0(,%r15,8),%edx
movslq %edx,%rdx
movslq %ecx,%r9
movslq %eax,%r10
lea    (%rax,%rax,4),%ecx
movslq %ecx,%r11
lea    0x2(%r8),%ecx
movslq %ecx,%rcx
mov    %rcx,0x28(%rsp)
lea    0x2(%rax,%rax,2),%ecx
movslq %ecx,%rcx
mov    %rcx,0x20(%rsp)
movslq %r12d,%rcx
lea    -0x20(%r14,%rcx,4),%r14
lea    0x2(%r15,%r15,1),%ecx
movslq %ecx,%rcx
lea    (%rax,%rax,4),%eax
add    $0x2,%eax
cltq
add    $0x8,%ebp
shl    $0x2,%rdi
mov    %rdi,0x58(%rsp)
shl    $0x2,%r13
shl    $0x2,%rsi
mov    %rsi,0x18(%rsp)
shl    $0x2,%rdx
mov    %rdx,0x10(%rsp)
shl    $0x2,%r9
mov    %r9,0x8(%rsp)
shl    $0x2,%r10
mov    %r10,0x50(%rsp)
shl    $0x2,%r11
mov    %r11,0x48(%rsp)
shlq   $0x2,0x28(%rsp)
shlq   $0x2,0x20(%rsp)
shl    $0x2,%rcx
mov    %rcx,0x40(%rsp)
shl    $0x2,%rax
mov    %rax,0x38(%rsp)
shl    $0x2,%r8
mov    %r8,0x60(%rsp)
jmp    12ae <sbc_encoder_process_input_s4_internal+0x17e>
nopl   0x0(%rax)
mov    %eax,0x53c(%r14)
add    $0xfffffff8,%r12d
add    $0xffffffffffffffe0,%r14
add    $0xfffffff8,%ebp
add    %r13,%rbx
cmp    $0xf,%ebp
jbe    1537 <sbc_encoder_process_input_s4_internal+0x407>
test   %r15d,%r15d
jle    1297 <sbc_encoder_process_input_s4_internal+0x167>
mov    0x60(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
cmpl   $0x0,0x34(%rsp)
je     1400 <sbc_encoder_process_input_s4_internal+0x2d0>
call   1040 <unaligned16_be@plt>
mov    %eax,(%r14)
mov    0x58(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x4(%r14)
mov    0x18(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x8(%r14)
mov    0x10(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0xc(%r14)
mov    %rbx,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x10(%r14)
mov    0x8(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x14(%r14)
mov    0x50(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x18(%r14)
mov    0x48(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x1c(%r14)
cmp    $0x1,%r15d
jbe    1297 <sbc_encoder_process_input_s4_internal+0x167>
mov    0x28(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x520(%r14)
mov    0x20(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x524(%r14)
mov    0x18(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
add    $0x8,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x528(%r14)
mov    0x10(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
add    $0x8,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x52c(%r14)
lea    0x8(%rbx),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x530(%r14)
mov    0x8(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
add    $0x8,%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x534(%r14)
mov    0x40(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
mov    %eax,0x538(%r14)
mov    0x38(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1040 <unaligned16_be@plt>
jmp    1290 <sbc_encoder_process_input_s4_internal+0x160>
xchg   %ax,%ax
call   1050 <unaligned16_le@plt>
mov    %eax,(%r14)
mov    0x58(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x4(%r14)
mov    0x18(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x8(%r14)
mov    0x10(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0xc(%r14)
mov    %rbx,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x10(%r14)
mov    0x8(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x14(%r14)
mov    0x50(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x18(%r14)
mov    0x48(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x1c(%r14)
cmp    $0x1,%r15d
jbe    1297 <sbc_encoder_process_input_s4_internal+0x167>
mov    0x28(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x520(%r14)
mov    0x20(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x524(%r14)
mov    0x18(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
add    $0x8,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x528(%r14)
mov    0x10(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
add    $0x8,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x52c(%r14)
lea    0x8(%rbx),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x530(%r14)
mov    0x8(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
add    $0x8,%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x534(%r14)
mov    0x40(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
mov    %eax,0x538(%r14)
mov    0x38(%rsp),%rax
lea    (%rbx,%rax,1),%rdi
call   1050 <unaligned16_le@plt>
jmp    1290 <sbc_encoder_process_input_s4_internal+0x160>
mov    %r12d,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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