int check_vregs(const __uint128_t vregs[5]) {
  int i;
  int ok = 1;
  for (i = 0; i < 5; ++i) {
    printf("# v[%d]:", i);
    dump(&vregs[i], sizeof vregs[i]);
    putchar('\n');
    if (vregs[i] != vregs[0])
      ok = 0;
  }
  return ok;
}


x86 assembly (clang, -O0):
<check_vregs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    11d6 <check_vregs+0xa6>
mov    -0xc(%rbp),%esi
lea    0xea2(%rip),%rdi
xor    %eax,%eax
mov    %al,-0x11(%rbp)
call   1040 <printf@plt>
mov    -0x11(%rbp),%al
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rdi
mov    $0x10,%esi
call   1050 <dump@plt>
mov    -0x11(%rbp),%al
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x4,%rcx
movaps (%rax,%rcx,1),%xmm0
movaps (%rax),%xmm1
pcmpeqb %xmm1,%xmm0
pmovmskb %xmm0,%eax
sub    $0xffff,%eax
je     11c3 <check_vregs+0x93>
jmp    11bc <check_vregs+0x8c>
movl   $0x0,-0x10(%rbp)
jmp    11c8 <check_vregs+0x98>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <check_vregs+0x1a>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_vregs>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xebb(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x10,%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <dump@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x10(%rbx),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1050 <dump@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    0x10(%rbx),%r15
mov    0x18(%rbx),%rax
xor    0x8(%rbx),%rax
mov    %rax,(%rsp)
xor    (%rbx),%r15
mov    %r14,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x20(%rbx),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1050 <dump@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    (%rbx),%r13
mov    0x8(%rbx),%rbp
xor    0x28(%rbx),%rbp
xor    0x20(%rbx),%r13
mov    %r14,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x30(%rbx),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1050 <dump@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    (%rbx),%r14
mov    0x8(%rbx),%r12
xor    0x38(%rbx),%r12
xor    0x30(%rbx),%r14
lea    0xddb(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x40(%rbx),%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1050 <dump@plt>
mov    $0xa,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
mov    (%rbx),%rax
mov    0x8(%rbx),%rcx
xor    %edx,%edx
or     (%rsp),%r15
sete   %dl
neg    %edx
movd   %edx,%xmm0
xor    %edx,%edx
or     %rbp,%r13
sete   %dl
neg    %edx
movd   %edx,%xmm1
punpckldq %xmm0,%xmm1
xor    %edx,%edx
or     %r12,%r14
sete   %dl
neg    %edx
movd   %edx,%xmm0
xor    0x48(%rbx),%rcx
xor    0x40(%rbx),%rax
xor    %edx,%edx
or     %rcx,%rax
sete   %dl
neg    %edx
movd   %edx,%xmm2
punpckldq %xmm0,%xmm2
punpcklqdq %xmm1,%xmm2
pslld  $0x1f,%xmm2
movmskps %xmm2,%ecx
xor    %eax,%eax
cmp    $0xf,%cl
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"# v[%d]:\00"
define i32 @check_vregs(i128* %0) {
%2 = alloca i128*
%3 = alloca i32
%4 = alloca i32
store i128* %0, i128** %2
store i32 1, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %28, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 5
br i1 %7, label %8, label %31
8: ; preds = %5
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i128*, i128** %2
%12 = load i32, i32* %3
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i128, i128* %11, i64 %13
%15 = call i32 (i128*, i64, ...) bitcast (i32 (...)* @dump to i32 (i128*, i64, ...)*)(i128* %14, i64 16)
%16 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%17 = load i128*, i128** %2
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i128, i128* %17, i64 %19
%21 = load i128, i128* %20
%22 = load i128*, i128** %2
%23 = getelementptr inbounds i128, i128* %22, i64 0
%24 = load i128, i128* %23
%25 = icmp ne i128 %21, %24
br i1 %25, label %26, label %27
26: ; preds = %8
store i32 0, i32* %4
br label %27
27: ; preds = %26, %8
br label %28
28: ; preds = %27
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %5
31: ; preds = %5
%32 = load i32, i32* %4
ret i32 %32
}

LLVM IR (-O2):
@.str = [9 x i8] c"# v[%d]:\00"
define i32 @check_vregs(i128* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 0)
%3 = tail call i32 (i128*, i64, ...) bitcast (i32 (...)* @dump to i32 (i128*, i64, ...)*)(i128* %0, i64 16)
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = getelementptr inbounds i128, i128* %0, i64 1
%7 = tail call i32 (i128*, i64, ...) bitcast (i32 (...)* @dump to i32 (i128*, i64, ...)*)(i128* %6, i64 16)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%9 = load i128, i128* %6
%10 = load i128, i128* %0
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 2)
%12 = getelementptr inbounds i128, i128* %0, i64 2
%13 = tail call i32 (i128*, i64, ...) bitcast (i32 (...)* @dump to i32 (i128*, i64, ...)*)(i128* %12, i64 16)
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%15 = load i128, i128* %12
%16 = load i128, i128* %0
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 3)
%18 = getelementptr inbounds i128, i128* %0, i64 3
%19 = tail call i32 (i128*, i64, ...) bitcast (i32 (...)* @dump to i32 (i128*, i64, ...)*)(i128* %18, i64 16)
%20 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%21 = load i128, i128* %18
%22 = load i128, i128* %0
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4)
%24 = getelementptr inbounds i128, i128* %0, i64 4
%25 = tail call i32 (i128*, i64, ...) bitcast (i32 (...)* @dump to i32 (i128*, i64, ...)*)(i128* %24, i64 16)
%26 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
%27 = load i128, i128* %24
%28 = load i128, i128* %0
%29 = insertelement <4 x i128> poison, i128 %28, i64 0
%30 = insertelement <4 x i128> %29, i128 %22, i64 1
%31 = insertelement <4 x i128> %30, i128 %16, i64 2
%32 = insertelement <4 x i128> %31, i128 %9, i64 3
%33 = insertelement <4 x i128> poison, i128 %27, i64 0
%34 = insertelement <4 x i128> %33, i128 %21, i64 1
%35 = insertelement <4 x i128> %34, i128 %15, i64 2
%36 = insertelement <4 x i128> %35, i128 %10, i64 3
%37 = icmp eq <4 x i128> %32, %36
%38 = freeze <4 x i1> %37
%39 = bitcast <4 x i1> %38 to i4
%40 = icmp eq i4 %39, -1
%41 = zext i1 %40 to i32
ret i32 %41
}