#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;
typedef int uint16_t;
struct TYPE_3__ {
  int e_type;
  int e_machine;
  unsigned int e_version;
  unsigned int e_entry;
  unsigned int e_phoff;
  unsigned int e_shoff;
  unsigned int e_flags;
  int e_ehsize;
  int e_phentsize;
  int e_phnum;
  int e_shentsize;
  int e_shnum;
  int e_shstrndx;
};
typedef TYPE_1__ Elf32_Ehdr;

/* Variables and functions */
void convert_elf_hdr(Elf32_Ehdr *e) {
  e->e_type = ((uint16_t)((((uint16_t)(e->e_type) & (uint16_t)0x00ffU) << 8) |
                          (((uint16_t)(e->e_type) & (uint16_t)0xff00U) >> 8)));
  e->e_machine =
      ((uint16_t)((((uint16_t)(e->e_machine) & (uint16_t)0x00ffU) << 8) |
                  (((uint16_t)(e->e_machine) & (uint16_t)0xff00U) >> 8)));
  e->e_version = ((
      unsigned int)((((uint32_t)(e->e_version) & (uint32_t)0x000000ffUL)
                     << 24) |
                    (((uint32_t)(e->e_version) & (uint32_t)0x0000ff00UL) << 8) |
                    (((uint32_t)(e->e_version) & (uint32_t)0x00ff0000UL) >> 8) |
                    (((uint32_t)(e->e_version) & (uint32_t)0xff000000UL) >>
                     24)));
  e->e_entry = ((
      unsigned int)((((uint32_t)(e->e_entry) & (uint32_t)0x000000ffUL) << 24) |
                    (((uint32_t)(e->e_entry) & (uint32_t)0x0000ff00UL) << 8) |
                    (((uint32_t)(e->e_entry) & (uint32_t)0x00ff0000UL) >> 8) |
                    (((uint32_t)(e->e_entry) & (uint32_t)0xff000000UL) >> 24)));
  e->e_phoff = ((
      unsigned int)((((uint32_t)(e->e_phoff) & (uint32_t)0x000000ffUL) << 24) |
                    (((uint32_t)(e->e_phoff) & (uint32_t)0x0000ff00UL) << 8) |
                    (((uint32_t)(e->e_phoff) & (uint32_t)0x00ff0000UL) >> 8) |
                    (((uint32_t)(e->e_phoff) & (uint32_t)0xff000000UL) >> 24)));
  e->e_shoff = ((
      unsigned int)((((uint32_t)(e->e_shoff) & (uint32_t)0x000000ffUL) << 24) |
                    (((uint32_t)(e->e_shoff) & (uint32_t)0x0000ff00UL) << 8) |
                    (((uint32_t)(e->e_shoff) & (uint32_t)0x00ff0000UL) >> 8) |
                    (((uint32_t)(e->e_shoff) & (uint32_t)0xff000000UL) >> 24)));
  e->e_flags = ((
      unsigned int)((((uint32_t)(e->e_flags) & (uint32_t)0x000000ffUL) << 24) |
                    (((uint32_t)(e->e_flags) & (uint32_t)0x0000ff00UL) << 8) |
                    (((uint32_t)(e->e_flags) & (uint32_t)0x00ff0000UL) >> 8) |
                    (((uint32_t)(e->e_flags) & (uint32_t)0xff000000UL) >> 24)));
  e->e_ehsize =
      ((uint16_t)((((uint16_t)(e->e_ehsize) & (uint16_t)0x00ffU) << 8) |
                  (((uint16_t)(e->e_ehsize) & (uint16_t)0xff00U) >> 8)));
  e->e_phentsize =
      ((uint16_t)((((uint16_t)(e->e_phentsize) & (uint16_t)0x00ffU) << 8) |
                  (((uint16_t)(e->e_phentsize) & (uint16_t)0xff00U) >> 8)));
  e->e_phnum =
      ((uint16_t)((((uint16_t)(e->e_phnum) & (uint16_t)0x00ffU) << 8) |
                  (((uint16_t)(e->e_phnum) & (uint16_t)0xff00U) >> 8)));
  e->e_shentsize =
      ((uint16_t)((((uint16_t)(e->e_shentsize) & (uint16_t)0x00ffU) << 8) |
                  (((uint16_t)(e->e_shentsize) & (uint16_t)0xff00U) >> 8)));
  e->e_shnum =
      ((uint16_t)((((uint16_t)(e->e_shnum) & (uint16_t)0x00ffU) << 8) |
                  (((uint16_t)(e->e_shnum) & (uint16_t)0xff00U) >> 8)));
  e->e_shstrndx =
      ((uint16_t)((((uint16_t)(e->e_shstrndx) & (uint16_t)0x00ffU) << 8) |
                  (((uint16_t)(e->e_shstrndx) & (uint16_t)0xff00U) >> 8)));
}


x86 assembly (clang, -O0):
<convert_elf_hdr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
and    $0xff00,%eax
sar    $0x8,%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    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    0x20(%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    0x24(%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    0x28(%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    0x2c(%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x2c(%rax)
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    0x30(%rax),%eax
and    $0xff00,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x30(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_elf_hdr>:
movzwl (%rdi),%eax
movzwl 0x4(%rdi),%ecx
rol    $0x8,%ax
movzwl %ax,%eax
mov    %eax,(%rdi)
rol    $0x8,%cx
movzwl %cx,%eax
mov    %eax,0x4(%rdi)
movdqu 0x8(%rdi),%xmm1
pxor   %xmm0,%xmm0
movdqa %xmm1,%xmm2
punpckhbw %xmm0,%xmm2
pshuflw $0x18,%xmm2,%xmm2
pshufhw $0x18,%xmm2,%xmm2
movdqa %xmm1,%xmm3
punpcklbw %xmm0,%xmm3
pshuflw $0x18,%xmm3,%xmm3
pshufhw $0x18,%xmm3,%xmm3
packuswb %xmm2,%xmm3
pand   0xead(%rip),%xmm3
psrad  $0x18,%xmm1
por    %xmm3,%xmm1
movdqu %xmm1,0x8(%rdi)
mov    0x18(%rdi),%eax
mov    %eax,%ecx
and    $0xffffff,%ecx
bswap  %ecx
sar    $0x18,%eax
or     %ecx,%eax
mov    %eax,0x18(%rdi)
movdqu 0x1c(%rdi),%xmm1
pshuflw $0xe8,%xmm1,%xmm1
pshufhw $0xe8,%xmm1,%xmm1
pshufd $0xe8,%xmm1,%xmm1
movdqa %xmm1,%xmm2
psrlw  $0x8,%xmm2
psllw  $0x8,%xmm1
por    %xmm2,%xmm1
punpcklwd %xmm0,%xmm1
movdqu %xmm1,0x1c(%rdi)
movzwl 0x2c(%rdi),%eax
rol    $0x8,%ax
movzwl %ax,%eax
mov    %eax,0x2c(%rdi)
movzwl 0x30(%rdi),%eax
rol    $0x8,%ax
movzwl %ax,%eax
mov    %eax,0x30(%rdi)
ret

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

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @convert_elf_hdr(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i16
%5 = tail call i16 @llvm.bswap.i16(i16 %4)
%6 = zext i16 %5 to i32
store i32 %6, i32* %2
%7 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 1
%8 = load i32, i32* %7
%9 = trunc i32 %8 to i16
%10 = tail call i16 @llvm.bswap.i16(i16 %9)
%11 = zext i16 %10 to i32
store i32 %11, i32* %7
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 2
%13 = bitcast i32* %12 to <4 x i32>*
%14 = load <4 x i32>, <4 x i32>* %13
%15 = and <4 x i32> %14, <i32 16777215, i32 16777215, i32 16777215, i32 16777215>
%16 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %15)
%17 = ashr <4 x i32> %14, <i32 24, i32 24, i32 24, i32 24>
%18 = or <4 x i32> %16, %17
%19 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> %18, <4 x i32>* %19
%20 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 6
%21 = load i32, i32* %20
%22 = and i32 %21, 16777215
%23 = tail call i32 @llvm.bswap.i32(i32 %22)
%24 = ashr i32 %21, 24
%25 = or i32 %23, %24
store i32 %25, i32* %20
%26 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 7
%27 = bitcast i32* %26 to <4 x i32>*
%28 = load <4 x i32>, <4 x i32>* %27
%29 = trunc <4 x i32> %28 to <4 x i16>
%30 = call <4 x i16> @llvm.bswap.v4i16(<4 x i16> %29)
%31 = zext <4 x i16> %30 to <4 x i32>
%32 = bitcast i32* %26 to <4 x i32>*
store <4 x i32> %31, <4 x i32>* %32
%33 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 11
%34 = load i32, i32* %33
%35 = trunc i32 %34 to i16
%36 = tail call i16 @llvm.bswap.i16(i16 %35)
%37 = zext i16 %36 to i32
store i32 %37, i32* %33
%38 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 12
%39 = load i32, i32* %38
%40 = trunc i32 %39 to i16
%41 = tail call i16 @llvm.bswap.i16(i16 %40)
%42 = zext i16 %41 to i32
store i32 %42, i32* %38
ret void
}