#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 */
typedef int uint32_t;
struct TYPE_3__ {
  unsigned int p_type;
  unsigned int p_offset;
  unsigned int p_vaddr;
  unsigned int p_paddr;
  unsigned int p_filesz;
  unsigned int p_memsz;
  unsigned int p_flags;
  unsigned int p_align;
};
typedef TYPE_1__ Elf32_Phdr;

/* Variables and functions */
void convert_elf_phdrs(Elf32_Phdr *p, int num) {
  int i;
  for (i = 0; i < num; i++, p++) {
    p->p_type = ((
        unsigned int)((((uint32_t)(p->p_type) & (uint32_t)0x000000ffUL) << 24) |
                      (((uint32_t)(p->p_type) & (uint32_t)0x0000ff00UL) << 8) |
                      (((uint32_t)(p->p_type) & (uint32_t)0x00ff0000UL) >> 8) |
                      (((uint32_t)(p->p_type) & (uint32_t)0xff000000UL) >>
                       24)));
    p->p_offset =
        ((unsigned int)((((uint32_t)(p->p_offset) & (uint32_t)0x000000ffUL)
                         << 24) |
                        (((uint32_t)(p->p_offset) & (uint32_t)0x0000ff00UL)
                         << 8) |
                        (((uint32_t)(p->p_offset) & (uint32_t)0x00ff0000UL) >>
                         8) |
                        (((uint32_t)(p->p_offset) & (uint32_t)0xff000000UL) >>
                         24)));
    p->p_vaddr = ((
        unsigned int)((((uint32_t)(p->p_vaddr) & (uint32_t)0x000000ffUL)
                       << 24) |
                      (((uint32_t)(p->p_vaddr) & (uint32_t)0x0000ff00UL) << 8) |
                      (((uint32_t)(p->p_vaddr) & (uint32_t)0x00ff0000UL) >> 8) |
                      (((uint32_t)(p->p_vaddr) & (uint32_t)0xff000000UL) >>
                       24)));
    p->p_paddr = ((
        unsigned int)((((uint32_t)(p->p_paddr) & (uint32_t)0x000000ffUL)
                       << 24) |
                      (((uint32_t)(p->p_paddr) & (uint32_t)0x0000ff00UL) << 8) |
                      (((uint32_t)(p->p_paddr) & (uint32_t)0x00ff0000UL) >> 8) |
                      (((uint32_t)(p->p_paddr) & (uint32_t)0xff000000UL) >>
                       24)));
    p->p_filesz =
        ((unsigned int)((((uint32_t)(p->p_filesz) & (uint32_t)0x000000ffUL)
                         << 24) |
                        (((uint32_t)(p->p_filesz) & (uint32_t)0x0000ff00UL)
                         << 8) |
                        (((uint32_t)(p->p_filesz) & (uint32_t)0x00ff0000UL) >>
                         8) |
                        (((uint32_t)(p->p_filesz) & (uint32_t)0xff000000UL) >>
                         24)));
    p->p_memsz = ((
        unsigned int)((((uint32_t)(p->p_memsz) & (uint32_t)0x000000ffUL)
                       << 24) |
                      (((uint32_t)(p->p_memsz) & (uint32_t)0x0000ff00UL) << 8) |
                      (((uint32_t)(p->p_memsz) & (uint32_t)0x00ff0000UL) >> 8) |
                      (((uint32_t)(p->p_memsz) & (uint32_t)0xff000000UL) >>
                       24)));
    p->p_flags = ((
        unsigned int)((((uint32_t)(p->p_flags) & (uint32_t)0x000000ffUL)
                       << 24) |
                      (((uint32_t)(p->p_flags) & (uint32_t)0x0000ff00UL) << 8) |
                      (((uint32_t)(p->p_flags) & (uint32_t)0x00ff0000UL) >> 8) |
                      (((uint32_t)(p->p_flags) & (uint32_t)0xff000000UL) >>
                       24)));
    p->p_align = ((
        unsigned int)((((uint32_t)(p->p_align) & (uint32_t)0x000000ffUL)
                       << 24) |
                      (((uint32_t)(p->p_align) & (uint32_t)0x0000ff00UL) << 8) |
                      (((uint32_t)(p->p_align) & (uint32_t)0x00ff0000UL) >> 8) |
                      (((uint32_t)(p->p_align) & (uint32_t)0xff000000UL) >>
                       24)));
  }
}


x86 assembly (clang, -O0):
<convert_elf_phdrs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1383 <convert_elf_phdrs+0x283>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x8(%rbp)
jmp    1112 <convert_elf_phdrs+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_elf_phdrs>:
test   %esi,%esi
jle    11a9 <convert_elf_phdrs+0xa9>
pxor   %xmm0,%xmm0
movdqa 0xeec(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movdqu (%rdi),%xmm3
movdqu 0x10(%rdi),%xmm2
movdqa %xmm3,%xmm4
punpckhbw %xmm0,%xmm4
pshuflw $0x18,%xmm4,%xmm4
pshufhw $0x18,%xmm4,%xmm4
movdqa %xmm3,%xmm5
punpcklbw %xmm0,%xmm5
pshuflw $0x18,%xmm5,%xmm5
pshufhw $0x18,%xmm5,%xmm5
packuswb %xmm4,%xmm5
pand   %xmm1,%xmm5
psrad  $0x18,%xmm3
por    %xmm5,%xmm3
movdqu %xmm3,(%rdi)
movdqa %xmm2,%xmm3
punpckhbw %xmm0,%xmm3
pshuflw $0x18,%xmm3,%xmm3
pshufhw $0x18,%xmm3,%xmm3
movdqa %xmm2,%xmm4
punpcklbw %xmm0,%xmm4
pshuflw $0x18,%xmm4,%xmm4
pshufhw $0x18,%xmm4,%xmm4
packuswb %xmm3,%xmm4
pand   %xmm1,%xmm4
psrad  $0x18,%xmm2
por    %xmm4,%xmm2
movdqu %xmm2,0x10(%rdi)
add    $0x20,%rdi
add    $0xffffffff,%esi
jne    1120 <convert_elf_phdrs+0x20>
ret

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

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32, i32 }
define void @convert_elf_phdrs(%struct.TYPE_3__* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %25
4: ; preds = %2, %4
%5 = phi i32 [ %22, %4 ], [ 0, %2 ]
%6 = phi %struct.TYPE_3__* [ %23, %4 ], [ %0, %2 ]
%7 = bitcast %struct.TYPE_3__* %6 to <4 x i32>*
%8 = load <4 x i32>, <4 x i32>* %7
%9 = and <4 x i32> %8, <i32 16777215, i32 16777215, i32 16777215, i32 16777215>
%10 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %9)
%11 = ashr <4 x i32> %8, <i32 24, i32 24, i32 24, i32 24>
%12 = or <4 x i32> %10, %11
%13 = bitcast %struct.TYPE_3__* %6 to <4 x i32>*
store <4 x i32> %12, <4 x i32>* %13
%14 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i64 0, i32 4
%15 = bitcast i32* %14 to <4 x i32>*
%16 = load <4 x i32>, <4 x i32>* %15
%17 = and <4 x i32> %16, <i32 16777215, i32 16777215, i32 16777215, i32 16777215>
%18 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %17)
%19 = ashr <4 x i32> %16, <i32 24, i32 24, i32 24, i32 24>
%20 = or <4 x i32> %18, %19
%21 = bitcast i32* %14 to <4 x i32>*
store <4 x i32> %20, <4 x i32>* %21
%22 = add nuw nsw i32 %5, 1
%23 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %6, i64 1
%24 = icmp eq i32 %22, %1
br i1 %24, label %25, label %4
25: ; preds = %4, %2
ret void
}