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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
scalar_t__ strlen(char *);
int check_operation(char oper, int val_oper, char *b_filt, char *expression,
                    int *len_filt) {
  char *end_p, *filt_p;
  int len = (int)strlen(expression);
  int filt_len = *len_filt;
  int r, type_filter = 0;
  end_p = filt_p = expression;
  while ((*end_p++ != oper) && ((end_p - filt_p) < len))
    ;
  if (*end_p == '=') {
    b_filt[filt_len++] = val_oper;
    {
      if ((len + 2) < 128) {
        b_filt[filt_len++] = (len + 2);
      } else {
        if ((len + 2) < 256) {
          b_filt[filt_len++] = 0x80 + 1;
          b_filt[filt_len++] = (len + 2);
        } else {
          r = 0;
          while (((len + 2) >> (r * 8)) > 0)
            r++;
          b_filt[filt_len++] = 0x80 + r;
          while (r > 0) {
            r--;
            b_filt[filt_len++] = (char)((len + 2) >> (r * 8));
          }
        }
      }
    }
    b_filt[filt_len++] = 0x04;
    r = (int)(end_p - filt_p - 1);
    b_filt[filt_len++] = r;
    memcpy(&b_filt[filt_len], filt_p, r);
    filt_len += r;
    filt_p = end_p;
    while (*end_p++ != 0)
      ;
    b_filt[filt_len++] = 0x04;
    ++filt_p;
    r = (int)(end_p - filt_p - 1);
    b_filt[filt_len++] = r;
    memcpy(&b_filt[filt_len], filt_p, r);
    filt_len += r;
    type_filter = 1;
  }
  *len_filt = filt_len;
  return type_filter;
}


x86 assembly (clang, -O0):
<check_operation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x34(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x38(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%ecx
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x41(%rbp)
je     11a0 <check_operation+0x80>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
movslq -0x34(%rbp),%rcx
cmp    %rcx,%rax
setl   %al
mov    %al,-0x41(%rbp)
mov    -0x41(%rbp),%al
test   $0x1,%al
jne    11b0 <check_operation+0x90>
jmp    11b5 <check_operation+0x95>
jmp    1165 <check_operation+0x45>
mov    -0x28(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
jne    13ec <check_operation+0x2cc>
mov    -0x8(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
cmp    $0x80,%eax
jge    1212 <check_operation+0xf2>
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    12ed <check_operation+0x1cd>
mov    -0x34(%rbp),%eax
add    $0x2,%eax
cmp    $0x100,%eax
jge    125b <check_operation+0x13b>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x38(%rbp)
movslq %ecx,%rcx
movb   $0x81,(%rax,%rcx,1)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    12e8 <check_operation+0x1c8>
movl   $0x0,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    -0x3c(%rbp),%ecx
shl    $0x3,%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jle    1287 <check_operation+0x167>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1262 <check_operation+0x142>
mov    -0x3c(%rbp),%eax
add    $0x80,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
cmpl   $0x0,-0x3c(%rbp)
jle    12e3 <check_operation+0x1c3>
mov    -0x3c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    -0x3c(%rbp),%ecx
shl    $0x3,%ecx
sar    %cl,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    12a6 <check_operation+0x186>
jmp    12e8 <check_operation+0x1c8>
jmp    12ed <check_operation+0x1cd>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x38(%rbp)
movslq %ecx,%rcx
movb   $0x4,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    -0x30(%rbp),%rsi
mov    -0x3c(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x3c(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1377 <check_operation+0x257>
jmp    1357 <check_operation+0x237>
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x38(%rbp)
movslq %ecx,%rcx
movb   $0x4,(%rax,%rcx,1)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
sub    %rcx,%rax
sub    $0x1,%rax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x38(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
mov    -0x30(%rbp),%rsi
mov    -0x3c(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x3c(%rbp),%eax
add    -0x38(%rbp),%eax
mov    %eax,-0x38(%rbp)
movl   $0x1,-0x40(%rbp)
mov    -0x38(%rbp),%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x40(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_operation>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8,%r14
mov    %rcx,%rbx
mov    %rdx,%r15
mov    %esi,%r12d
mov    %edi,%ebp
mov    %rcx,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    (%r14),%r13d
movslq %r13d,%r8
movslq %eax,%rcx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdx
add    $0x1,%r14
cmp    %bpl,(%rbx,%rdx,1)
je     1172 <check_operation+0x52>
cmp    %rcx,%r14
jl     1160 <check_operation+0x40>
xor    %ecx,%ecx
cmpb   $0x3d,(%rbx,%r14,1)
jne    1868 <check_operation+0x748>
mov    %r12b,(%r15,%r8,1)
lea    0x2(%rax),%r11d
cmp    $0x7d,%eax
jg     119d <check_operation+0x7d>
mov    %rdi,%r12
add    $0x2,%r13d
mov    %r11b,0x1(%r15,%r8,1)
jmp    17e8 <check_operation+0x6c8>
cmp    $0xfe,%eax
jae    11bb <check_operation+0x9b>
mov    %rdi,%r12
movb   $0x81,0x1(%r15,%r8,1)
add    $0x3,%r13d
mov    %r11b,0x2(%r8,%r15,1)
jmp    17e8 <check_operation+0x6c8>
mov    $0xfffffffe,%esi
xor    %ecx,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r11d,%edx
sar    %cl,%edx
add    $0xffffffff,%eax
add    $0x1,%esi
add    $0x8,%ecx
test   %edx,%edx
jg     11d0 <check_operation+0xb0>
add    $0x2,%r13d
mov    $0x7f,%cl
sub    %al,%cl
mov    %cl,0x1(%r15,%r8,1)
mov    %rdi,%r12
cmp    $0xffffffff,%eax
je     17e8 <check_operation+0x6c8>
mov    $0xfffffffe,%ecx
sub    %eax,%ecx
not    %eax
movslq %r13d,%r13
cmp    $0xf,%ecx
jb     17b8 <check_operation+0x698>
lea    0x1(%rcx),%r8
mov    %r8,%r9
and    $0xfffffffffffffff0,%r9
movd   %eax,%xmm0
pshufd $0x0,%xmm0,%xmm8
movdqa 0xdd2(%rip),%xmm15
paddd  %xmm8,%xmm15
movdqa 0xdd4(%rip),%xmm9
paddd  %xmm8,%xmm9
movdqa 0xdd6(%rip),%xmm10
paddd  %xmm8,%xmm10
paddd  0xdd8(%rip),%xmm8
movd   %r11d,%xmm0
pshufd $0x0,%xmm0,%xmm12
lea    -0x10(%r9),%rdx
mov    %rdx,%r10
shr    $0x4,%r10
add    $0x1,%r10
test   %rdx,%rdx
je     1612 <check_operation+0x4f2>
lea    (%r15,%r13,1),%rdi
add    $0x10,%rdi
mov    %ecx,%ecx
add    $0x1,%rcx
and    $0xfffffffffffffff0,%rcx
add    $0xfffffffffffffff0,%rcx
shr    $0x4,%rcx
add    $0x1,%rcx
and    $0xfffffffffffffffe,%rcx
xor    %ebp,%ebp
nop
movdqa %xmm10,(%rsp)
movdqa %xmm8,0x10(%rsp)
movdqa %xmm15,%xmm4
pslld  $0x3,%xmm4
movdqa %xmm9,%xmm14
pslld  $0x3,%xmm14
movdqa (%rsp),%xmm13
pslld  $0x3,%xmm13
movdqa 0x10(%rsp),%xmm8
pslld  $0x3,%xmm8
movdqa %xmm8,%xmm5
movdqa 0xd58(%rip),%xmm6
paddd  %xmm6,%xmm5
movdqa %xmm13,%xmm7
paddd  %xmm6,%xmm7
movdqa %xmm14,%xmm2
movdqa %xmm4,%xmm0
paddd  %xmm6,%xmm0
pshuflw $0xfe,%xmm0,%xmm1
movdqa %xmm12,%xmm3
psrad  %xmm1,%xmm3
paddd  %xmm6,%xmm2
pshuflw $0x54,%xmm0,%xmm11
movdqa %xmm12,%xmm1
psrad  %xmm11,%xmm1
pshufd $0xee,%xmm0,%xmm0
pshuflw $0xfe,%xmm0,%xmm11
movdqa %xmm12,%xmm10
psrad  %xmm11,%xmm10
punpcklqdq %xmm3,%xmm1
pshuflw $0x54,%xmm0,%xmm0
movdqa %xmm12,%xmm3
psrad  %xmm0,%xmm3
punpckhqdq %xmm10,%xmm3
pshuflw $0xfe,%xmm2,%xmm0
movdqa %xmm12,%xmm10
psrad  %xmm0,%xmm10
shufps $0xcc,%xmm3,%xmm1
pshuflw $0x54,%xmm2,%xmm3
movdqa %xmm12,%xmm0
psrad  %xmm3,%xmm0
pshufd $0xee,%xmm2,%xmm2
pshuflw $0xfe,%xmm2,%xmm11
movdqa %xmm12,%xmm3
psrad  %xmm11,%xmm3
punpcklqdq %xmm10,%xmm0
pshuflw $0x54,%xmm2,%xmm10
movdqa %xmm12,%xmm2
psrad  %xmm10,%xmm2
punpckhqdq %xmm3,%xmm2
pshuflw $0xfe,%xmm7,%xmm10
movdqa %xmm12,%xmm3
psrad  %xmm10,%xmm3
shufps $0xcc,%xmm2,%xmm0
pshuflw $0x54,%xmm7,%xmm10
movdqa %xmm12,%xmm2
psrad  %xmm10,%xmm2
pshufd $0xee,%xmm7,%xmm11
pshuflw $0xfe,%xmm11,%xmm10
movdqa %xmm12,%xmm7
psrad  %xmm10,%xmm7
punpcklqdq %xmm3,%xmm2
pshuflw $0x54,%xmm11,%xmm10
movdqa %xmm12,%xmm3
psrad  %xmm10,%xmm3
punpckhqdq %xmm7,%xmm3
pshuflw $0xfe,%xmm5,%xmm10
movdqa %xmm12,%xmm7
psrad  %xmm10,%xmm7
shufps $0xcc,%xmm3,%xmm2
pshuflw $0x54,%xmm5,%xmm10
movdqa %xmm12,%xmm3
psrad  %xmm10,%xmm3
pshufd $0xee,%xmm5,%xmm11
pshuflw $0xfe,%xmm11,%xmm10
movdqa %xmm12,%xmm5
psrad  %xmm10,%xmm5
punpcklqdq %xmm7,%xmm3
pshuflw $0x54,%xmm11,%xmm7
movdqa %xmm12,%xmm6
psrad  %xmm7,%xmm6
punpckhqdq %xmm5,%xmm6
shufps $0xcc,%xmm6,%xmm3
movaps 0xc02(%rip),%xmm11
andps  %xmm11,%xmm3
andps  %xmm11,%xmm2
packuswb %xmm2,%xmm3
andps  %xmm11,%xmm0
andps  %xmm11,%xmm1
packuswb %xmm1,%xmm0
packuswb %xmm0,%xmm3
movdqu %xmm3,-0x10(%rdi,%rbp,1)
movdqa 0xbe8(%rip),%xmm1
paddd  %xmm1,%xmm8
paddd  %xmm1,%xmm13
paddd  %xmm1,%xmm4
pshuflw $0xfe,%xmm4,%xmm0
movdqa %xmm12,%xmm2
psrad  %xmm0,%xmm2
paddd  %xmm1,%xmm14
pshuflw $0x54,%xmm4,%xmm0
movdqa %xmm12,%xmm1
psrad  %xmm0,%xmm1
pshufd $0xee,%xmm4,%xmm0
pshuflw $0xfe,%xmm0,%xmm3
movdqa %xmm12,%xmm4
psrad  %xmm3,%xmm4
punpcklqdq %xmm2,%xmm1
pshuflw $0x54,%xmm0,%xmm0
movdqa %xmm12,%xmm2
psrad  %xmm0,%xmm2
punpckhqdq %xmm4,%xmm2
pshuflw $0xfe,%xmm14,%xmm0
movdqa %xmm12,%xmm3
psrad  %xmm0,%xmm3
shufps $0xcc,%xmm2,%xmm1
pshuflw $0x54,%xmm14,%xmm2
movdqa %xmm12,%xmm0
psrad  %xmm2,%xmm0
pshufd $0xee,%xmm14,%xmm2
pshuflw $0xfe,%xmm2,%xmm4
movdqa %xmm12,%xmm5
psrad  %xmm4,%xmm5
punpcklqdq %xmm3,%xmm0
pshuflw $0x54,%xmm2,%xmm2
movdqa %xmm12,%xmm3
psrad  %xmm2,%xmm3
punpckhqdq %xmm5,%xmm3
pshuflw $0xfe,%xmm13,%xmm2
movdqa %xmm12,%xmm4
psrad  %xmm2,%xmm4
shufps $0xcc,%xmm3,%xmm0
pshuflw $0x54,%xmm13,%xmm3
movdqa %xmm12,%xmm2
psrad  %xmm3,%xmm2
pshufd $0xee,%xmm13,%xmm3
movdqa (%rsp),%xmm10
pshuflw $0xfe,%xmm3,%xmm5
movdqa %xmm12,%xmm6
psrad  %xmm5,%xmm6
punpcklqdq %xmm4,%xmm2
pshuflw $0x54,%xmm3,%xmm3
movdqa %xmm12,%xmm4
psrad  %xmm3,%xmm4
punpckhqdq %xmm6,%xmm4
pshuflw $0xfe,%xmm8,%xmm3
movdqa %xmm12,%xmm5
psrad  %xmm3,%xmm5
shufps $0xcc,%xmm4,%xmm2
pshuflw $0x54,%xmm8,%xmm3
movdqa %xmm12,%xmm4
psrad  %xmm3,%xmm4
pshufd $0xee,%xmm8,%xmm3
movdqa 0x10(%rsp),%xmm8
pshuflw $0xfe,%xmm3,%xmm6
movdqa %xmm12,%xmm7
psrad  %xmm6,%xmm7
punpcklqdq %xmm5,%xmm4
pshuflw $0x54,%xmm3,%xmm3
movdqa %xmm12,%xmm5
psrad  %xmm3,%xmm5
punpckhqdq %xmm7,%xmm5
shufps $0xcc,%xmm5,%xmm4
andps  %xmm11,%xmm4
andps  %xmm11,%xmm2
packuswb %xmm2,%xmm4
andps  %xmm11,%xmm0
andps  %xmm11,%xmm1
packuswb %xmm1,%xmm0
packuswb %xmm0,%xmm4
movdqu %xmm4,(%rdi,%rbp,1)
add    $0x20,%rbp
movdqa 0xa7e(%rip),%xmm0
paddd  %xmm0,%xmm8
paddd  %xmm0,%xmm10
paddd  %xmm0,%xmm9
paddd  %xmm0,%xmm15
add    $0xfffffffffffffffe,%rcx
jne    12a0 <check_operation+0x180>
jmp    1614 <check_operation+0x4f4>
xor    %ebp,%ebp
test   $0x1,%r10b
je     17a8 <check_operation+0x688>
pslld  $0x3,%xmm15
pslld  $0x3,%xmm9
pslld  $0x3,%xmm10
pslld  $0x3,%xmm8
movdqa 0xa02(%rip),%xmm0
paddd  %xmm0,%xmm8
paddd  %xmm0,%xmm10
paddd  %xmm0,%xmm15
pshuflw $0xfe,%xmm15,%xmm1
movdqa %xmm12,%xmm2
psrad  %xmm1,%xmm2
paddd  %xmm0,%xmm9
pshuflw $0x54,%xmm15,%xmm0
movdqa %xmm12,%xmm1
psrad  %xmm0,%xmm1
pshufd $0xee,%xmm15,%xmm0
pshuflw $0xfe,%xmm0,%xmm3
movdqa %xmm12,%xmm4
psrad  %xmm3,%xmm4
punpcklqdq %xmm2,%xmm1
pshuflw $0x54,%xmm0,%xmm0
movdqa %xmm12,%xmm2
psrad  %xmm0,%xmm2
punpckhqdq %xmm4,%xmm2
pshuflw $0xfe,%xmm9,%xmm0
movdqa %xmm12,%xmm3
psrad  %xmm0,%xmm3
shufps $0xcc,%xmm2,%xmm1
pshuflw $0x54,%xmm9,%xmm2
movdqa %xmm12,%xmm0
psrad  %xmm2,%xmm0
pshufd $0xee,%xmm9,%xmm2
pshuflw $0xfe,%xmm2,%xmm4
movdqa %xmm12,%xmm5
psrad  %xmm4,%xmm5
punpcklqdq %xmm3,%xmm0
pshuflw $0x54,%xmm2,%xmm2
movdqa %xmm12,%xmm3
psrad  %xmm2,%xmm3
punpckhqdq %xmm5,%xmm3
pshuflw $0xfe,%xmm10,%xmm2
movdqa %xmm12,%xmm4
psrad  %xmm2,%xmm4
shufps $0xcc,%xmm3,%xmm0
pshuflw $0x54,%xmm10,%xmm3
movdqa %xmm12,%xmm2
psrad  %xmm3,%xmm2
pshufd $0xee,%xmm10,%xmm3
pshuflw $0xfe,%xmm3,%xmm5
movdqa %xmm12,%xmm6
psrad  %xmm5,%xmm6
punpcklqdq %xmm4,%xmm2
pshuflw $0x54,%xmm3,%xmm3
movdqa %xmm12,%xmm4
psrad  %xmm3,%xmm4
punpckhqdq %xmm6,%xmm4
pshuflw $0xfe,%xmm8,%xmm3
movdqa %xmm12,%xmm5
psrad  %xmm3,%xmm5
shufps $0xcc,%xmm4,%xmm2
pshuflw $0x54,%xmm8,%xmm3
movdqa %xmm12,%xmm4
psrad  %xmm3,%xmm4
pshufd $0xee,%xmm8,%xmm3
pshuflw $0xfe,%xmm3,%xmm6
movdqa %xmm12,%xmm7
psrad  %xmm6,%xmm7
add    %r13,%rbp
pshuflw $0x54,%xmm3,%xmm3
psrad  %xmm3,%xmm12
punpcklqdq %xmm5,%xmm4
punpckhqdq %xmm7,%xmm12
shufps $0xcc,%xmm12,%xmm4
movaps 0x8c6(%rip),%xmm3
andps  %xmm3,%xmm4
andps  %xmm3,%xmm2
packuswb %xmm2,%xmm4
andps  %xmm3,%xmm0
andps  %xmm3,%xmm1
packuswb %xmm1,%xmm0
packuswb %xmm0,%xmm4
movdqu %xmm4,(%r15,%rbp,1)
add    %r9,%r13
cmp    %r9,%r8
je     17e8 <check_operation+0x6c8>
add    $0x1,%esi
and    $0xfffffff0,%esi
sub    %esi,%eax
mov    %eax,%esi
add    $0x1,%esi
lea    -0x8(,%rax,8),%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r11d,%eax
sar    %cl,%eax
mov    %al,(%r15,%r13,1)
add    $0x1,%r13
add    $0xffffffff,%esi
add    $0xfffffff8,%ecx
cmp    $0x1,%esi
jg     17d0 <check_operation+0x6b0>
movslq %r13d,%rax
movb   $0x4,(%r15,%rax,1)
lea    -0x1(%r14),%edx
mov    %dl,0x1(%r15,%rax,1)
lea    (%r15,%rax,1),%rdi
add    $0x2,%rdi
mov    %rbx,%rsi
call   1040 <memcpy@plt>
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
lea    (%rbx,%rbp,1),%rax
add    $0x1,%rbp
cmpb   $0x0,(%r14,%rax,1)
jne    1810 <check_operation+0x6f0>
mov    %r13d,%eax
lea    (%rax,%r14,1),%rcx
add    $0x1,%rcx
add    %r14,%rax
lea    0x2(%rax),%edi
movslq %ecx,%r13
movb   $0x4,(%r15,%r13,1)
lea    (%rbx,%r14,1),%rsi
add    $0x1,%rsi
lea    -0x2(%rbp),%edx
add    $0x3,%eax
movslq %edi,%rcx
mov    %ebp,%ebx
add    $0xfe,%bl
mov    %bl,(%r15,%rcx,1)
movslq %eax,%rdi
add    %r15,%rdi
call   1040 <memcpy@plt>
add    %ebp,%r13d
mov    $0x1,%ecx
mov    %r12,%rdi
mov    %r13d,(%rdi)
mov    %ecx,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @check_operation(i8 signext %0, i32 %1, i8* %2, i8* %3, i32* %4) {
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i8 %0, i8* %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32* %4, i32** %10
%17 = load i8*, i8** %9
%18 = call i64 @strlen(i8* %17)
%19 = trunc i64 %18 to i32
store i32 %19, i32* %13
%20 = load i32*, i32** %10
%21 = load i32, i32* %20
store i32 %21, i32* %14
store i32 0, i32* %16
%22 = load i8*, i8** %9
store i8* %22, i8** %12
store i8* %22, i8** %11
br label %23
23: ; preds = %42, %5
%24 = load i8*, i8** %11
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %11
%26 = load i8, i8* %24
%27 = sext i8 %26 to i32
%28 = load i8, i8* %6
%29 = sext i8 %28 to i32
%30 = icmp ne i32 %27, %29
br i1 %30, label %31, label %40
31: ; preds = %23
%32 = load i8*, i8** %11
%33 = load i8*, i8** %12
%34 = ptrtoint i8* %32 to i64
%35 = ptrtoint i8* %33 to i64
%36 = sub i64 %34, %35
%37 = load i32, i32* %13
%38 = sext i32 %37 to i64
%39 = icmp slt i64 %36, %38
br label %40
40: ; preds = %31, %23
%41 = phi i1 [ false, %23 ], [ %39, %31 ]
br i1 %41, label %42, label %43
42: ; preds = %40
br label %23
43: ; preds = %40
%44 = load i8*, i8** %11
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 61
br i1 %47, label %48, label %195
48: ; preds = %43
%49 = load i32, i32* %7
%50 = trunc i32 %49 to i8
%51 = load i8*, i8** %8
%52 = load i32, i32* %14
%53 = add nsw i32 %52, 1
store i32 %53, i32* %14
%54 = sext i32 %52 to i64
%55 = getelementptr inbounds i8, i8* %51, i64 %54
store i8 %50, i8* %55
%56 = load i32, i32* %13
%57 = add nsw i32 %56, 2
%58 = icmp slt i32 %57, 128
br i1 %58, label %59, label %68
59: ; preds = %48
%60 = load i32, i32* %13
%61 = add nsw i32 %60, 2
%62 = trunc i32 %61 to i8
%63 = load i8*, i8** %8
%64 = load i32, i32* %14
%65 = add nsw i32 %64, 1
store i32 %65, i32* %14
%66 = sext i32 %64 to i64
%67 = getelementptr inbounds i8, i8* %63, i64 %66
store i8 %62, i8* %67
br label %125
68: ; preds = %48
%69 = load i32, i32* %13
%70 = add nsw i32 %69, 2
%71 = icmp slt i32 %70, 256
br i1 %71, label %72, label %86
72: ; preds = %68
%73 = load i8*, i8** %8
%74 = load i32, i32* %14
%75 = add nsw i32 %74, 1
store i32 %75, i32* %14
%76 = sext i32 %74 to i64
%77 = getelementptr inbounds i8, i8* %73, i64 %76
store i8 -127, i8* %77
%78 = load i32, i32* %13
%79 = add nsw i32 %78, 2
%80 = trunc i32 %79 to i8
%81 = load i8*, i8** %8
%82 = load i32, i32* %14
%83 = add nsw i32 %82, 1
store i32 %83, i32* %14
%84 = sext i32 %82 to i64
%85 = getelementptr inbounds i8, i8* %81, i64 %84
store i8 %80, i8* %85
br label %124
86: ; preds = %68
store i32 0, i32* %15
br label %87
87: ; preds = %94, %86
%88 = load i32, i32* %13
%89 = add nsw i32 %88, 2
%90 = load i32, i32* %15
%91 = mul nsw i32 %90, 8
%92 = ashr i32 %89, %91
%93 = icmp sgt i32 %92, 0
br i1 %93, label %94, label %97
94: ; preds = %87
%95 = load i32, i32* %15
%96 = add nsw i32 %95, 1
store i32 %96, i32* %15
br label %87
97: ; preds = %87
%98 = load i32, i32* %15
%99 = add nsw i32 128, %98
%100 = trunc i32 %99 to i8
%101 = load i8*, i8** %8
%102 = load i32, i32* %14
%103 = add nsw i32 %102, 1
store i32 %103, i32* %14
%104 = sext i32 %102 to i64
%105 = getelementptr inbounds i8, i8* %101, i64 %104
store i8 %100, i8* %105
br label %106
106: ; preds = %109, %97
%107 = load i32, i32* %15
%108 = icmp sgt i32 %107, 0
br i1 %108, label %109, label %123
109: ; preds = %106
%110 = load i32, i32* %15
%111 = add nsw i32 %110, -1
store i32 %111, i32* %15
%112 = load i32, i32* %13
%113 = add nsw i32 %112, 2
%114 = load i32, i32* %15
%115 = mul nsw i32 %114, 8
%116 = ashr i32 %113, %115
%117 = trunc i32 %116 to i8
%118 = load i8*, i8** %8
%119 = load i32, i32* %14
%120 = add nsw i32 %119, 1
store i32 %120, i32* %14
%121 = sext i32 %119 to i64
%122 = getelementptr inbounds i8, i8* %118, i64 %121
store i8 %117, i8* %122
br label %106
123: ; preds = %106
br label %124
124: ; preds = %123, %72
br label %125
125: ; preds = %124, %59
%126 = load i8*, i8** %8
%127 = load i32, i32* %14
%128 = add nsw i32 %127, 1
store i32 %128, i32* %14
%129 = sext i32 %127 to i64
%130 = getelementptr inbounds i8, i8* %126, i64 %129
store i8 4, i8* %130
%131 = load i8*, i8** %11
%132 = load i8*, i8** %12
%133 = ptrtoint i8* %131 to i64
%134 = ptrtoint i8* %132 to i64
%135 = sub i64 %133, %134
%136 = sub nsw i64 %135, 1
%137 = trunc i64 %136 to i32
store i32 %137, i32* %15
%138 = load i32, i32* %15
%139 = trunc i32 %138 to i8
%140 = load i8*, i8** %8
%141 = load i32, i32* %14
%142 = add nsw i32 %141, 1
store i32 %142, i32* %14
%143 = sext i32 %141 to i64
%144 = getelementptr inbounds i8, i8* %140, i64 %143
store i8 %139, i8* %144
%145 = load i8*, i8** %8
%146 = load i32, i32* %14
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i8, i8* %145, i64 %147
%149 = load i8*, i8** %12
%150 = load i32, i32* %15
%151 = call i32 @memcpy(i8* %148, i8* %149, i32 %150)
%152 = load i32, i32* %15
%153 = load i32, i32* %14
%154 = add nsw i32 %153, %152
store i32 %154, i32* %14
%155 = load i8*, i8** %11
store i8* %155, i8** %12
br label %156
156: ; preds = %162, %125
%157 = load i8*, i8** %11
%158 = getelementptr inbounds i8, i8* %157, i32 1
store i8* %158, i8** %11
%159 = load i8, i8* %157
%160 = sext i8 %159 to i32
%161 = icmp ne i32 %160, 0
br i1 %161, label %162, label %163
162: ; preds = %156
br label %156
163: ; preds = %156
%164 = load i8*, i8** %8
%165 = load i32, i32* %14
%166 = add nsw i32 %165, 1
store i32 %166, i32* %14
%167 = sext i32 %165 to i64
%168 = getelementptr inbounds i8, i8* %164, i64 %167
store i8 4, i8* %168
%169 = load i8*, i8** %12
%170 = getelementptr inbounds i8, i8* %169, i32 1
store i8* %170, i8** %12
%171 = load i8*, i8** %11
%172 = load i8*, i8** %12
%173 = ptrtoint i8* %171 to i64
%174 = ptrtoint i8* %172 to i64
%175 = sub i64 %173, %174
%176 = sub nsw i64 %175, 1
%177 = trunc i64 %176 to i32
store i32 %177, i32* %15
%178 = load i32, i32* %15
%179 = trunc i32 %178 to i8
%180 = load i8*, i8** %8
%181 = load i32, i32* %14
%182 = add nsw i32 %181, 1
store i32 %182, i32* %14
%183 = sext i32 %181 to i64
%184 = getelementptr inbounds i8, i8* %180, i64 %183
store i8 %179, i8* %184
%185 = load i8*, i8** %8
%186 = load i32, i32* %14
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds i8, i8* %185, i64 %187
%189 = load i8*, i8** %12
%190 = load i32, i32* %15
%191 = call i32 @memcpy(i8* %188, i8* %189, i32 %190)
%192 = load i32, i32* %15
%193 = load i32, i32* %14
%194 = add nsw i32 %193, %192
store i32 %194, i32* %14
store i32 1, i32* %16
br label %195
195: ; preds = %163, %43
%196 = load i32, i32* %14
%197 = load i32*, i32** %10
store i32 %196, i32* %197
%198 = load i32, i32* %16
ret i32 %198
}

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