#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int member_0;
  int member_1;
};
typedef TYPE_1__ __m128i;

/* Variables and functions */
int _mm_movemask_epi8(TYPE_1__);
int /*<<< orphan*/ assert(int);
int main() {
  __m128i val1 = {54312, 32423};
  __m128i val2 = {0x80808080, 0x80808080};
  __m128i val3 = {0x8080808080808080L, 0x8080808080808080L};
  __m128i val4 = {0, 0};
  __m128i val5 = {-1, -1};
  assert(_mm_movemask_epi8(val1) == 258);
  assert(_mm_movemask_epi8(val2) == 0x0f0f);
  assert(_mm_movemask_epi8(val3) == 0xffff);
  assert(_mm_movemask_epi8(val4) == 0);
  assert(_mm_movemask_epi8(val5) == 0xffff);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0xebe(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    0xea0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <_mm_movemask_epi8@plt>
cmp    $0x102,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1050 <_mm_movemask_epi8@plt>
cmp    $0xf0f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x18(%rbp),%rdi
call   1050 <_mm_movemask_epi8@plt>
cmp    $0xffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rdi
call   1050 <_mm_movemask_epi8@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x28(%rbp),%rdi
call   1050 <_mm_movemask_epi8@plt>
cmp    $0xffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movabs $0x7ea70000d428,%rdi
call   1040 <_mm_movemask_epi8@plt>
xor    %edi,%edi
cmp    $0x102,%eax
sete   %dil
call   1030 <assert@plt>
movabs $0x8080808080808080,%rbx
80 80 80
mov    %rbx,%rdi
call   1040 <_mm_movemask_epi8@plt>
xor    %edi,%edi
cmp    $0xf0f,%eax
sete   %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <_mm_movemask_epi8@plt>
xor    %edi,%edi
cmp    $0xffff,%eax
sete   %dil
call   1030 <assert@plt>
xor    %edi,%edi
call   1040 <_mm_movemask_epi8@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1030 <assert@plt>
mov    $0xffffffffffffffff,%rdi
call   1040 <_mm_movemask_epi8@plt>
xor    %edi,%edi
cmp    $0xffff,%eax
sete   %dil
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
@__const.main.val1 = %struct.TYPE_3__ { i32 54312, i32 32423 }
@__const.main.val2 = %struct.TYPE_3__ { i32 -2139062144, i32 -2139062144 }
@__const.main.val3 = %struct.TYPE_3__ { i32 -2139062144, i32 -2139062144 }
@__const.main.val5 = %struct.TYPE_3__ { i32 -1, i32 -1 }
define i32 @main() {
%1 = alloca %struct.TYPE_3__
%2 = alloca %struct.TYPE_3__
%3 = alloca %struct.TYPE_3__
%4 = alloca %struct.TYPE_3__
%5 = alloca %struct.TYPE_3__
%6 = bitcast %struct.TYPE_3__* %1 to i8*
%7 = bitcast %struct.TYPE_3__* %2 to i8*
%8 = bitcast %struct.TYPE_3__* %3 to i8*
%9 = bitcast %struct.TYPE_3__* %4 to i8*
%10 = bitcast %struct.TYPE_3__* %5 to i8*
%11 = bitcast %struct.TYPE_3__* %1 to i64*
%12 = load i64, i64* %11
%13 = call i32 @_mm_movemask_epi8(i64 %12)
%14 = icmp eq i32 %13, 258
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = bitcast %struct.TYPE_3__* %2 to i64*
%18 = load i64, i64* %17
%19 = call i32 @_mm_movemask_epi8(i64 %18)
%20 = icmp eq i32 %19, 3855
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = bitcast %struct.TYPE_3__* %3 to i64*
%24 = load i64, i64* %23
%25 = call i32 @_mm_movemask_epi8(i64 %24)
%26 = icmp eq i32 %25, 65535
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = bitcast %struct.TYPE_3__* %4 to i64*
%30 = load i64, i64* %29
%31 = call i32 @_mm_movemask_epi8(i64 %30)
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i32
%34 = call i32 @assert(i32 %33)
%35 = bitcast %struct.TYPE_3__* %5 to i64*
%36 = load i64, i64* %35
%37 = call i32 @_mm_movemask_epi8(i64 %36)
%38 = icmp eq i32 %37, 65535
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @_mm_movemask_epi8(i64 139255724692520)
%2 = icmp eq i32 %1, 258
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @_mm_movemask_epi8(i64 -9187201950435737472)
%6 = icmp eq i32 %5, 3855
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @_mm_movemask_epi8(i64 -9187201950435737472)
%10 = icmp eq i32 %9, 65535
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @_mm_movemask_epi8(i64 0)
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @_mm_movemask_epi8(i64 -1)
%18 = icmp eq i32 %17, 65535
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
ret i32 0
}