#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*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpeq_epi8(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_cmpgt_epi8(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_setzero_si128();
void checkContinuations(__m128i initial_lengths, __m128i carries,
                        __m128i *has_error) {
  __m128i overunder =
      _mm_cmpeq_epi8(_mm_cmpgt_epi8(carries, initial_lengths),
                     _mm_cmpgt_epi8(initial_lengths, _mm_setzero_si128()));
  *has_error = _mm_or_si128(*has_error, overunder);
}


x86 assembly (clang, -O0):
<checkContinuations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <_mm_cmpgt_epi8@plt>
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <_mm_setzero_si128@plt>
mov    -0x1c(%rbp),%edi
mov    %eax,%esi
call   1040 <_mm_cmpgt_epi8@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1060 <_mm_cmpeq_epi8@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%esi
call   1050 <_mm_or_si128@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkContinuations>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %edi,%ebp
mov    %esi,%edi
mov    %ebp,%esi
call   1040 <_mm_cmpgt_epi8@plt>
mov    %eax,%r14d
xor    %eax,%eax
call   1030 <_mm_setzero_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <_mm_cmpgt_epi8@plt>
mov    %r14d,%edi
mov    %eax,%esi
call   1060 <_mm_cmpeq_epi8@plt>
mov    (%rbx),%edi
mov    %eax,%esi
call   1050 <_mm_or_si128@plt>
mov    %eax,(%rbx)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @checkContinuations(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @_mm_cmpgt_epi8(i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = call i32 (...) @_mm_setzero_si128()
%13 = call i32 @_mm_cmpgt_epi8(i32 %11, i32 %12)
%14 = call i32 @_mm_cmpeq_epi8(i32 %10, i32 %13)
store i32 %14, i32* %7
%15 = load i32*, i32** %6
%16 = load i32, i32* %15
%17 = load i32, i32* %7
%18 = call i32 @_mm_or_si128(i32 %16, i32 %17)
%19 = load i32*, i32** %6
store i32 %18, i32* %19
ret void
}

LLVM IR (-O2):
define void @checkContinuations(i32 %0, i32 %1, i32* nocapture %2) {
%4 = tail call i32 @_mm_cmpgt_epi8(i32 %1, i32 %0)
%5 = tail call i32 (...) @_mm_setzero_si128()
%6 = tail call i32 @_mm_cmpgt_epi8(i32 %0, i32 %5)
%7 = tail call i32 @_mm_cmpeq_epi8(i32 %4, i32 %6)
%8 = load i32, i32* %2
%9 = tail call i32 @_mm_or_si128(i32 %8, i32 %7)
store i32 %9, i32* %2
ret void
}