void vxinvb_(int *ixv, int *n) {
  int limit, jloop;
  int in;
  limit = *n;
  for (jloop = 0; jloop < limit; jloop++) {
    in = ixv[jloop];
    ixv[jloop] = ((in >> 24) & 0x000000ff) | ((in >> 8) & 0x0000ff00) |
                 ((in << 8) & 0x00ff0000) | ((in << 24) & 0xff000000);
  }
  return;
}


x86 assembly (clang, -O0):
<vxinvb_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1182 <vxinvb_+0x82>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edx
sar    $0x18,%edx
and    $0xff,%edx
mov    -0x1c(%rbp),%eax
sar    $0x8,%eax
and    $0xff00,%eax
or     %eax,%edx
mov    -0x1c(%rbp),%eax
shl    $0x8,%eax
and    $0xff0000,%eax
or     %eax,%edx
mov    -0x1c(%rbp),%eax
shl    $0x18,%eax
and    $0xff000000,%eax
or     %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111c <vxinvb_+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vxinvb_>:
mov    (%rsi),%eax
test   %eax,%eax
jle    11b1 <vxinvb_+0xb1>
cmp    $0x8,%eax
jae    1116 <vxinvb_+0x16>
xor    %ecx,%ecx
jmp    11a0 <vxinvb_+0xa0>
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    0x0(,%rax,4),%rdx
and    $0xffffffffffffffe0,%rdx
xor    %esi,%esi
pxor   %xmm0,%xmm0
nopl   (%rax)
movdqu (%rdi,%rsi,1),%xmm1
movdqu 0x10(%rdi,%rsi,1),%xmm2
movdqa %xmm1,%xmm3
punpckhbw %xmm0,%xmm3
pshuflw $0x1b,%xmm3,%xmm3
pshufhw $0x1b,%xmm3,%xmm3
punpcklbw %xmm0,%xmm1
pshuflw $0x1b,%xmm1,%xmm1
pshufhw $0x1b,%xmm1,%xmm1
packuswb %xmm3,%xmm1
movdqa %xmm2,%xmm3
punpckhbw %xmm0,%xmm3
pshuflw $0x1b,%xmm3,%xmm3
pshufhw $0x1b,%xmm3,%xmm3
punpcklbw %xmm0,%xmm2
pshuflw $0x1b,%xmm2,%xmm2
pshufhw $0x1b,%xmm2,%xmm2
packuswb %xmm3,%xmm2
movdqu %xmm1,(%rdi,%rsi,1)
movdqu %xmm2,0x10(%rdi,%rsi,1)
add    $0x20,%rsi
cmp    %rsi,%rdx
jne    1130 <vxinvb_+0x30>
cmp    %rax,%rcx
je     11b1 <vxinvb_+0xb1>
nopl   0x0(%rax)
mov    (%rdi,%rcx,4),%edx
bswap  %edx
mov    %edx,(%rdi,%rcx,4)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    11a0 <vxinvb_+0xa0>
ret

LLVM IR (-O0):
define void @vxinvb_(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 0, i32* %6
br label %10
10: ; preds = %39, %2
%11 = load i32, i32* %6
%12 = load i32, i32* %5
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %42
14: ; preds = %10
%15 = load i32*, i32** %3
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = ashr i32 %20, 24
%22 = and i32 %21, 255
%23 = load i32, i32* %7
%24 = ashr i32 %23, 8
%25 = and i32 %24, 65280
%26 = or i32 %22, %25
%27 = load i32, i32* %7
%28 = shl i32 %27, 8
%29 = and i32 %28, 16711680
%30 = or i32 %26, %29
%31 = load i32, i32* %7
%32 = shl i32 %31, 24
%33 = and i32 %32, -16777216
%34 = or i32 %30, %33
%35 = load i32*, i32** %3
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i32, i32* %35, i64 %37
store i32 %34, i32* %38
br label %39
39: ; preds = %14
%40 = load i32, i32* %6
%41 = add nsw i32 %40, 1
store i32 %41, i32* %6
br label %10
42: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @vxinvb_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %35
5: ; preds = %2
%6 = zext i32 %3 to i64
%7 = icmp ult i32 %3, 8
br i1 %7, label %26, label %8
8: ; preds = %5
%9 = and i64 %6, 4294967288
br label %10
10: ; preds = %10, %8
%11 = phi i64 [ 0, %8 ], [ %22, %10 ]
%12 = getelementptr inbounds i32, i32* %0, i64 %11
%13 = bitcast i32* %12 to <4 x i32>*
%14 = load <4 x i32>, <4 x i32>* %13
%15 = getelementptr inbounds i32, i32* %12, i64 4
%16 = bitcast i32* %15 to <4 x i32>*
%17 = load <4 x i32>, <4 x i32>* %16
%18 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %14)
%19 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %17)
%20 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> %18, <4 x i32>* %20
%21 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %19, <4 x i32>* %21
%22 = add nuw i64 %11, 8
%23 = icmp eq i64 %22, %9
br i1 %23, label %24, label %10
24: ; preds = %10
%25 = icmp eq i64 %9, %6
br i1 %25, label %35, label %26
26: ; preds = %5, %24
%27 = phi i64 [ 0, %5 ], [ %9, %24 ]
br label %28
28: ; preds = %26, %28
%29 = phi i64 [ %33, %28 ], [ %27, %26 ]
%30 = getelementptr inbounds i32, i32* %0, i64 %29
%31 = load i32, i32* %30
%32 = tail call i32 @llvm.bswap.i32(i32 %31)
store i32 %32, i32* %30
%33 = add nuw nsw i64 %29, 1
%34 = icmp eq i64 %33, %6
br i1 %34, label %35, label %28
35: ; preds = %28, %24, %2
ret void
}