#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 */

/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int fwrite_bo(int *, int, int, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ stderr;
int write_frm_hdr(FILE *fp, short int *aux, int pol) {
  int bark[20], laux[57], lpol[1], i;
  for (i = 0; i < 5; i++)
    bark[i] = 0x00000000;
  for (i = 5; i < 8; i++)
    bark[i] = 0xffffffff;
  bark[8] = 0x00000000;
  bark[9] = 0xffffffff;
  for (i = 10; i < 12; i++)
    bark[i] = 0x00000000;
  bark[12] = 0xffffffff;
  for (i = 13; i < 16; i++)
    bark[i] = 0x00000000;
  for (i = 16; i < 18; i++)
    bark[i] = 0xffffffff;
  for (i = 18; i < 20; i++)
    bark[i] = 0x00000000;
  if (pol == 0)
    lpol[0] = 0x03f003f0;
  else if (pol == 1)
    lpol[0] = 0x43f543f5;
  else if (pol == 2)
    lpol[0] = 0x83fa83fa;
  else if (pol == 3)
    lpol[0] = 0xc3ffc3ff;
  else {
    fprintf(stderr, "Cannot form polarization header word\n");
    return (-1);
  }
  for (i = 0; i < 57; i++) {
    laux[i] = (int)((aux[i] << 16) & 0xffff0000);
    laux[i] = laux[i] | (aux[i] & 0x0000ffff);
  }
  if (fwrite_bo(bark, 20 * sizeof(int), 1, fp, sizeof(int)) != 1) {
    fprintf(stderr, "Error writing output frame header.\n");
    return (-1);
  }
  if (fwrite_bo(lpol, sizeof(int), 1, fp, sizeof(int)) != 1) {
    fprintf(stderr, "Error writing output frame header.\n");
    return (-1);
  }
  if (fwrite_bo(laux, 57 * sizeof(int), 1, fp, sizeof(int)) != 1) {
    fprintf(stderr, "Error writing output frame header.\n");
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<write_frm_hdr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x168(%rbp)
cmpl   $0x5,-0x168(%rbp)
jge    1170 <write_frm_hdr+0x50>
movslq -0x168(%rbp),%rax
movl   $0x0,-0x70(%rbp,%rax,4)
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    1140 <write_frm_hdr+0x20>
movl   $0x5,-0x168(%rbp)
cmpl   $0x8,-0x168(%rbp)
jge    11aa <write_frm_hdr+0x8a>
movslq -0x168(%rbp),%rax
movl   $0xffffffff,-0x70(%rbp,%rax,4)
ff
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    117a <write_frm_hdr+0x5a>
movl   $0x0,-0x50(%rbp)
movl   $0xffffffff,-0x4c(%rbp)
movl   $0xa,-0x168(%rbp)
cmpl   $0xc,-0x168(%rbp)
jge    11f2 <write_frm_hdr+0xd2>
movslq -0x168(%rbp),%rax
movl   $0x0,-0x70(%rbp,%rax,4)
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    11c2 <write_frm_hdr+0xa2>
movl   $0xffffffff,-0x40(%rbp)
movl   $0xd,-0x168(%rbp)
cmpl   $0x10,-0x168(%rbp)
jge    1233 <write_frm_hdr+0x113>
movslq -0x168(%rbp),%rax
movl   $0x0,-0x70(%rbp,%rax,4)
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    1203 <write_frm_hdr+0xe3>
movl   $0x10,-0x168(%rbp)
cmpl   $0x12,-0x168(%rbp)
jge    126d <write_frm_hdr+0x14d>
movslq -0x168(%rbp),%rax
movl   $0xffffffff,-0x70(%rbp,%rax,4)
ff
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    123d <write_frm_hdr+0x11d>
movl   $0x12,-0x168(%rbp)
cmpl   $0x14,-0x168(%rbp)
jge    12a7 <write_frm_hdr+0x187>
movslq -0x168(%rbp),%rax
movl   $0x0,-0x70(%rbp,%rax,4)
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    1277 <write_frm_hdr+0x157>
cmpl   $0x0,-0x1c(%rbp)
jne    12c0 <write_frm_hdr+0x1a0>
movl   $0x3f003f0,-0x164(%rbp)
03 f0 03
jmp    133b <write_frm_hdr+0x21b>
cmpl   $0x1,-0x1c(%rbp)
jne    12d9 <write_frm_hdr+0x1b9>
movl   $0x43f543f5,-0x164(%rbp)
43 f5 43
jmp    1336 <write_frm_hdr+0x216>
cmpl   $0x2,-0x1c(%rbp)
jne    12f2 <write_frm_hdr+0x1d2>
movl   $0x83fa83fa,-0x164(%rbp)
83 fa 83
jmp    1331 <write_frm_hdr+0x211>
cmpl   $0x3,-0x1c(%rbp)
jne    130b <write_frm_hdr+0x1eb>
movl   $0xc3ffc3ff,-0x164(%rbp)
c3 ff c3
jmp    132c <write_frm_hdr+0x20c>
mov    0x2cce(%rip),%rax
mov    (%rax),%edi
lea    0xce5(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    149e <write_frm_hdr+0x37e>
jmp    1331 <write_frm_hdr+0x211>
jmp    1336 <write_frm_hdr+0x216>
jmp    133b <write_frm_hdr+0x21b>
movl   $0x0,-0x168(%rbp)
cmpl   $0x39,-0x168(%rbp)
jge    13be <write_frm_hdr+0x29e>
mov    -0x18(%rbp),%rax
movslq -0x168(%rbp),%rcx
movswl (%rax,%rcx,2),%ecx
shl    $0x10,%ecx
and    $0xffff0000,%ecx
movslq -0x168(%rbp),%rax
mov    %ecx,-0x160(%rbp,%rax,4)
movslq -0x168(%rbp),%rax
mov    -0x160(%rbp,%rax,4),%ecx
mov    -0x18(%rbp),%rax
movslq -0x168(%rbp),%rdx
movswl (%rax,%rdx,2),%eax
and    $0xffff,%eax
or     %eax,%ecx
movslq -0x168(%rbp),%rax
mov    %ecx,-0x160(%rbp,%rax,4)
mov    -0x168(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x168(%rbp)
jmp    1345 <write_frm_hdr+0x225>
lea    -0x70(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x50,%esi
mov    $0x1,%edx
mov    $0x4,%r8d
call   1040 <fwrite_bo@plt>
cmp    $0x1,%eax
je     1405 <write_frm_hdr+0x2e5>
mov    0x2bf5(%rip),%rax
mov    (%rax),%edi
lea    0xc32(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    149e <write_frm_hdr+0x37e>
lea    -0x164(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x4,%r8d
mov    $0x1,%edx
mov    %r8d,%esi
call   1040 <fwrite_bo@plt>
cmp    $0x1,%eax
je     144d <write_frm_hdr+0x32d>
mov    0x2bad(%rip),%rax
mov    (%rax),%edi
lea    0xbea(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    149e <write_frm_hdr+0x37e>
lea    -0x160(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0xe4,%esi
mov    $0x1,%edx
mov    $0x4,%r8d
call   1040 <fwrite_bo@plt>
cmp    $0x1,%eax
je     1497 <write_frm_hdr+0x377>
mov    0x2b63(%rip),%rax
mov    (%rax),%edi
lea    0xba0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    149e <write_frm_hdr+0x37e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_frm_hdr>:
push   %rbx
sub    $0x150,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x0,0x20(%rsp)
movq   $0xffffffffffffffff,0x24(%rsp)
ff ff
movl   $0xffffffff,0x2c(%rsp)
ff
movabs $0xffffffff00000000,%rax
ff ff ff
mov    %rax,0x30(%rsp)
movq   $0x0,0x38(%rsp)
movl   $0xffffffff,0x40(%rsp)
ff
movq   $0x0,0x44(%rsp)
movl   $0x0,0x4c(%rsp)
movdqa 0xe7e(%rip),%xmm0
movdqa %xmm0,0x50(%rsp)
cmp    $0x3,%edx
ja     11ac <write_frm_hdr+0x8c>
mov    %rdi,%rbx
mov    %edx,%eax
lea    0xe77(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x3f003f0,0xc(%rsp)
03
jmp    11dd <write_frm_hdr+0xbd>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xe64(%rip),%rsi
jmp    135e <write_frm_hdr+0x23e>
movl   $0x43f543f5,0xc(%rsp)
43
jmp    11dd <write_frm_hdr+0xbd>
movl   $0x83fa83fa,0xc(%rsp)
83
jmp    11dd <write_frm_hdr+0xbd>
movl   $0xc3ffc3ff,0xc(%rsp)
c3
movq   (%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x60(%rsp)
movq   0x8(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x70(%rsp)
movq   0x10(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x80(%rsp)
movq   0x18(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x90(%rsp)
movq   0x20(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0xa0(%rsp)
movq   0x28(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0xb0(%rsp)
movq   0x30(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0xc0(%rsp)
movq   0x38(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0xd0(%rsp)
movq   0x40(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0xe0(%rsp)
movq   0x48(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0xf0(%rsp)
movq   0x50(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x100(%rsp)
movq   0x58(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x110(%rsp)
movq   0x60(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x120(%rsp)
movq   0x68(%rsi),%xmm0
punpcklwd %xmm0,%xmm0
movdqa %xmm0,0x130(%rsp)
movzwl 0x70(%rsi),%eax
mov    %eax,%ecx
shl    $0x10,%ecx
or     %eax,%ecx
mov    %ecx,0x140(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x50,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
mov    $0x4,%r8d
call   1040 <fwrite_bo@plt>
cmp    $0x1,%eax
jne    134e <write_frm_hdr+0x22e>
lea    0xc(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
mov    $0x4,%r8d
call   1040 <fwrite_bo@plt>
cmp    $0x1,%eax
jne    134e <write_frm_hdr+0x22e>
lea    0x60(%rsp),%rdi
mov    $0xe4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
mov    $0x4,%r8d
call   1040 <fwrite_bo@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
je     1368 <write_frm_hdr+0x248>
mov    0x2c8b(%rip),%rax
mov    (%rax),%edi
lea    0xce8(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
add    $0x150,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [38 x i8] c"Cannot form polarization header word\0A\00"
@.str.1 = [36 x i8] c"Error writing output frame header.\0A\00"
define i32 @write_frm_hdr(i32* %0, i16* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i16*
%7 = alloca i32
%8 = alloca [20 x i32]
%9 = alloca [57 x i32]
%10 = alloca [1 x i32]
%11 = alloca i32
store i32* %0, i32** %5
store i16* %1, i16** %6
store i32 %2, i32* %7
store i32 0, i32* %11
br label %12
12: ; preds = %19, %3
%13 = load i32, i32* %11
%14 = icmp slt i32 %13, 5
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %11
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 %17
store i32 0, i32* %18
br label %19
19: ; preds = %15
%20 = load i32, i32* %11
%21 = add nsw i32 %20, 1
store i32 %21, i32* %11
br label %12
22: ; preds = %12
store i32 5, i32* %11
br label %23
23: ; preds = %30, %22
%24 = load i32, i32* %11
%25 = icmp slt i32 %24, 8
br i1 %25, label %26, label %33
26: ; preds = %23
%27 = load i32, i32* %11
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 %28
store i32 -1, i32* %29
br label %30
30: ; preds = %26
%31 = load i32, i32* %11
%32 = add nsw i32 %31, 1
store i32 %32, i32* %11
br label %23
33: ; preds = %23
%34 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 8
store i32 0, i32* %34
%35 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 9
store i32 -1, i32* %35
store i32 10, i32* %11
br label %36
36: ; preds = %43, %33
%37 = load i32, i32* %11
%38 = icmp slt i32 %37, 12
br i1 %38, label %39, label %46
39: ; preds = %36
%40 = load i32, i32* %11
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 %41
store i32 0, i32* %42
br label %43
43: ; preds = %39
%44 = load i32, i32* %11
%45 = add nsw i32 %44, 1
store i32 %45, i32* %11
br label %36
46: ; preds = %36
%47 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 12
store i32 -1, i32* %47
store i32 13, i32* %11
br label %48
48: ; preds = %55, %46
%49 = load i32, i32* %11
%50 = icmp slt i32 %49, 16
br i1 %50, label %51, label %58
51: ; preds = %48
%52 = load i32, i32* %11
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 %53
store i32 0, i32* %54
br label %55
55: ; preds = %51
%56 = load i32, i32* %11
%57 = add nsw i32 %56, 1
store i32 %57, i32* %11
br label %48
58: ; preds = %48
store i32 16, i32* %11
br label %59
59: ; preds = %66, %58
%60 = load i32, i32* %11
%61 = icmp slt i32 %60, 18
br i1 %61, label %62, label %69
62: ; preds = %59
%63 = load i32, i32* %11
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 %64
store i32 -1, i32* %65
br label %66
66: ; preds = %62
%67 = load i32, i32* %11
%68 = add nsw i32 %67, 1
store i32 %68, i32* %11
br label %59
69: ; preds = %59
store i32 18, i32* %11
br label %70
70: ; preds = %77, %69
%71 = load i32, i32* %11
%72 = icmp slt i32 %71, 20
br i1 %72, label %73, label %80
73: ; preds = %70
%74 = load i32, i32* %11
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 %75
store i32 0, i32* %76
br label %77
77: ; preds = %73
%78 = load i32, i32* %11
%79 = add nsw i32 %78, 1
store i32 %79, i32* %11
br label %70
80: ; preds = %70
%81 = load i32, i32* %7
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %80
%84 = getelementptr inbounds [1 x i32], [1 x i32]* %10, i64 0, i64 0
store i32 66061296, i32* %84
br label %106
85: ; preds = %80
%86 = load i32, i32* %7
%87 = icmp eq i32 %86, 1
br i1 %87, label %88, label %90
88: ; preds = %85
%89 = getelementptr inbounds [1 x i32], [1 x i32]* %10, i64 0, i64 0
store i32 1140147189, i32* %89
br label %105
90: ; preds = %85
%91 = load i32, i32* %7
%92 = icmp eq i32 %91, 2
br i1 %92, label %93, label %95
93: ; preds = %90
%94 = getelementptr inbounds [1 x i32], [1 x i32]* %10, i64 0, i64 0
store i32 -2080734214, i32* %94
br label %104
95: ; preds = %90
%96 = load i32, i32* %7
%97 = icmp eq i32 %96, 3
br i1 %97, label %98, label %100
98: ; preds = %95
%99 = getelementptr inbounds [1 x i32], [1 x i32]* %10, i64 0, i64 0
store i32 -1006648321, i32* %99
br label %103
100: ; preds = %95
%101 = load i32, i32* @stderr
%102 = call i32 @fprintf(i32 %101, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %4
br label %165
103: ; preds = %98
br label %104
104: ; preds = %103, %93
br label %105
105: ; preds = %104, %88
br label %106
106: ; preds = %105, %83
store i32 0, i32* %11
br label %107
107: ; preds = %137, %106
%108 = load i32, i32* %11
%109 = icmp slt i32 %108, 57
br i1 %109, label %110, label %140
110: ; preds = %107
%111 = load i16*, i16** %6
%112 = load i32, i32* %11
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds i16, i16* %111, i64 %113
%115 = load i16, i16* %114
%116 = sext i16 %115 to i32
%117 = shl i32 %116, 16
%118 = and i32 %117, -65536
%119 = load i32, i32* %11
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds [57 x i32], [57 x i32]* %9, i64 0, i64 %120
store i32 %118, i32* %121
%122 = load i32, i32* %11
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [57 x i32], [57 x i32]* %9, i64 0, i64 %123
%125 = load i32, i32* %124
%126 = load i16*, i16** %6
%127 = load i32, i32* %11
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds i16, i16* %126, i64 %128
%130 = load i16, i16* %129
%131 = sext i16 %130 to i32
%132 = and i32 %131, 65535
%133 = or i32 %125, %132
%134 = load i32, i32* %11
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [57 x i32], [57 x i32]* %9, i64 0, i64 %135
store i32 %133, i32* %136
br label %137
137: ; preds = %110
%138 = load i32, i32* %11
%139 = add nsw i32 %138, 1
store i32 %139, i32* %11
br label %107
140: ; preds = %107
%141 = getelementptr inbounds [20 x i32], [20 x i32]* %8, i64 0, i64 0
%142 = load i32*, i32** %5
%143 = call i32 @fwrite_bo(i32* %141, i32 80, i32 1, i32* %142, i32 4)
%144 = icmp ne i32 %143, 1
br i1 %144, label %145, label %148
145: ; preds = %140
%146 = load i32, i32* @stderr
%147 = call i32 @fprintf(i32 %146, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %165
148: ; preds = %140
%149 = getelementptr inbounds [1 x i32], [1 x i32]* %10, i64 0, i64 0
%150 = load i32*, i32** %5
%151 = call i32 @fwrite_bo(i32* %149, i32 4, i32 1, i32* %150, i32 4)
%152 = icmp ne i32 %151, 1
br i1 %152, label %153, label %156
153: ; preds = %148
%154 = load i32, i32* @stderr
%155 = call i32 @fprintf(i32 %154, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %165
156: ; preds = %148
%157 = getelementptr inbounds [57 x i32], [57 x i32]* %9, i64 0, i64 0
%158 = load i32*, i32** %5
%159 = call i32 @fwrite_bo(i32* %157, i32 228, i32 1, i32* %158, i32 4)
%160 = icmp ne i32 %159, 1
br i1 %160, label %161, label %164
161: ; preds = %156
%162 = load i32, i32* @stderr
%163 = call i32 @fprintf(i32 %162, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %4
br label %165
164: ; preds = %156
store i32 0, i32* %4
br label %165
165: ; preds = %164, %161, %153, %145, %100
%166 = load i32, i32* %4
ret i32 %166
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [38 x i8] c"Cannot form polarization header word\0A\00"
@.str.1 = [36 x i8] c"Error writing output frame header.\0A\00"
define i32 @write_frm_hdr(i32* %0, i16* nocapture %1, i32 %2) {
%4 = alloca [20 x i32]
%5 = bitcast [20 x i32]* %4 to i8*
%6 = alloca [57 x i32]
%7 = alloca [1 x i32]
%8 = bitcast [57 x i32]* %6 to i8*
%9 = bitcast [1 x i32]* %7 to i8*
%10 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 5
%11 = bitcast i32* %10 to i8*
%12 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 8
store i32 0, i32* %12
%13 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 9
store i32 -1, i32* %13
%14 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 10
%15 = bitcast i32* %14 to i64*
store i64 0, i64* %15
%16 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 12
store i32 -1, i32* %16
%17 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 13
%18 = bitcast i32* %17 to i8*
%19 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 16
%20 = bitcast i32* %19 to <2 x i64>*
store <2 x i64> <i64 -1, i64 0>, <2 x i64>* %20
switch i32 %2, label %29 [
i32 0, label %21
i32 1, label %23
i32 2, label %25
i32 3, label %27
]
21: ; preds = %3
%22 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 66061296, i32* %22
br label %32
23: ; preds = %3
%24 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 1140147189, i32* %24
br label %32
25: ; preds = %3
%26 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 -2080734214, i32* %26
br label %32
27: ; preds = %3
%28 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
store i32 -1006648321, i32* %28
br label %32
29: ; preds = %3
%30 = load i32, i32* @stderr
%31 = tail call i32 @fprintf(i32 %30, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %169
32: ; preds = %23, %27, %25, %21
%33 = bitcast i16* %1 to <4 x i16>*
%34 = load <4 x i16>, <4 x i16>* %33
%35 = zext <4 x i16> %34 to <4 x i32>
%36 = shl nuw <4 x i32> %35, <i32 16, i32 16, i32 16, i32 16>
%37 = or <4 x i32> %36, %35
%38 = bitcast [57 x i32]* %6 to <4 x i32>*
store <4 x i32> %37, <4 x i32>* %38
%39 = getelementptr inbounds i16, i16* %1, i64 4
%40 = bitcast i16* %39 to <4 x i16>*
%41 = load <4 x i16>, <4 x i16>* %40
%42 = zext <4 x i16> %41 to <4 x i32>
%43 = shl nuw <4 x i32> %42, <i32 16, i32 16, i32 16, i32 16>
%44 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 4
%45 = or <4 x i32> %43, %42
%46 = bitcast i32* %44 to <4 x i32>*
store <4 x i32> %45, <4 x i32>* %46
%47 = getelementptr inbounds i16, i16* %1, i64 8
%48 = bitcast i16* %47 to <4 x i16>*
%49 = load <4 x i16>, <4 x i16>* %48
%50 = zext <4 x i16> %49 to <4 x i32>
%51 = shl nuw <4 x i32> %50, <i32 16, i32 16, i32 16, i32 16>
%52 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 8
%53 = or <4 x i32> %51, %50
%54 = bitcast i32* %52 to <4 x i32>*
store <4 x i32> %53, <4 x i32>* %54
%55 = getelementptr inbounds i16, i16* %1, i64 12
%56 = bitcast i16* %55 to <4 x i16>*
%57 = load <4 x i16>, <4 x i16>* %56
%58 = zext <4 x i16> %57 to <4 x i32>
%59 = shl nuw <4 x i32> %58, <i32 16, i32 16, i32 16, i32 16>
%60 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 12
%61 = or <4 x i32> %59, %58
%62 = bitcast i32* %60 to <4 x i32>*
store <4 x i32> %61, <4 x i32>* %62
%63 = getelementptr inbounds i16, i16* %1, i64 16
%64 = bitcast i16* %63 to <4 x i16>*
%65 = load <4 x i16>, <4 x i16>* %64
%66 = zext <4 x i16> %65 to <4 x i32>
%67 = shl nuw <4 x i32> %66, <i32 16, i32 16, i32 16, i32 16>
%68 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 16
%69 = or <4 x i32> %67, %66
%70 = bitcast i32* %68 to <4 x i32>*
store <4 x i32> %69, <4 x i32>* %70
%71 = getelementptr inbounds i16, i16* %1, i64 20
%72 = bitcast i16* %71 to <4 x i16>*
%73 = load <4 x i16>, <4 x i16>* %72
%74 = zext <4 x i16> %73 to <4 x i32>
%75 = shl nuw <4 x i32> %74, <i32 16, i32 16, i32 16, i32 16>
%76 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 20
%77 = or <4 x i32> %75, %74
%78 = bitcast i32* %76 to <4 x i32>*
store <4 x i32> %77, <4 x i32>* %78
%79 = getelementptr inbounds i16, i16* %1, i64 24
%80 = bitcast i16* %79 to <4 x i16>*
%81 = load <4 x i16>, <4 x i16>* %80
%82 = zext <4 x i16> %81 to <4 x i32>
%83 = shl nuw <4 x i32> %82, <i32 16, i32 16, i32 16, i32 16>
%84 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 24
%85 = or <4 x i32> %83, %82
%86 = bitcast i32* %84 to <4 x i32>*
store <4 x i32> %85, <4 x i32>* %86
%87 = getelementptr inbounds i16, i16* %1, i64 28
%88 = bitcast i16* %87 to <4 x i16>*
%89 = load <4 x i16>, <4 x i16>* %88
%90 = zext <4 x i16> %89 to <4 x i32>
%91 = shl nuw <4 x i32> %90, <i32 16, i32 16, i32 16, i32 16>
%92 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 28
%93 = or <4 x i32> %91, %90
%94 = bitcast i32* %92 to <4 x i32>*
store <4 x i32> %93, <4 x i32>* %94
%95 = getelementptr inbounds i16, i16* %1, i64 32
%96 = bitcast i16* %95 to <4 x i16>*
%97 = load <4 x i16>, <4 x i16>* %96
%98 = zext <4 x i16> %97 to <4 x i32>
%99 = shl nuw <4 x i32> %98, <i32 16, i32 16, i32 16, i32 16>
%100 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 32
%101 = or <4 x i32> %99, %98
%102 = bitcast i32* %100 to <4 x i32>*
store <4 x i32> %101, <4 x i32>* %102
%103 = getelementptr inbounds i16, i16* %1, i64 36
%104 = bitcast i16* %103 to <4 x i16>*
%105 = load <4 x i16>, <4 x i16>* %104
%106 = zext <4 x i16> %105 to <4 x i32>
%107 = shl nuw <4 x i32> %106, <i32 16, i32 16, i32 16, i32 16>
%108 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 36
%109 = or <4 x i32> %107, %106
%110 = bitcast i32* %108 to <4 x i32>*
store <4 x i32> %109, <4 x i32>* %110
%111 = getelementptr inbounds i16, i16* %1, i64 40
%112 = bitcast i16* %111 to <4 x i16>*
%113 = load <4 x i16>, <4 x i16>* %112
%114 = zext <4 x i16> %113 to <4 x i32>
%115 = shl nuw <4 x i32> %114, <i32 16, i32 16, i32 16, i32 16>
%116 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 40
%117 = or <4 x i32> %115, %114
%118 = bitcast i32* %116 to <4 x i32>*
store <4 x i32> %117, <4 x i32>* %118
%119 = getelementptr inbounds i16, i16* %1, i64 44
%120 = bitcast i16* %119 to <4 x i16>*
%121 = load <4 x i16>, <4 x i16>* %120
%122 = zext <4 x i16> %121 to <4 x i32>
%123 = shl nuw <4 x i32> %122, <i32 16, i32 16, i32 16, i32 16>
%124 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 44
%125 = or <4 x i32> %123, %122
%126 = bitcast i32* %124 to <4 x i32>*
store <4 x i32> %125, <4 x i32>* %126
%127 = getelementptr inbounds i16, i16* %1, i64 48
%128 = bitcast i16* %127 to <4 x i16>*
%129 = load <4 x i16>, <4 x i16>* %128
%130 = zext <4 x i16> %129 to <4 x i32>
%131 = shl nuw <4 x i32> %130, <i32 16, i32 16, i32 16, i32 16>
%132 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 48
%133 = or <4 x i32> %131, %130
%134 = bitcast i32* %132 to <4 x i32>*
store <4 x i32> %133, <4 x i32>* %134
%135 = getelementptr inbounds i16, i16* %1, i64 52
%136 = bitcast i16* %135 to <4 x i16>*
%137 = load <4 x i16>, <4 x i16>* %136
%138 = zext <4 x i16> %137 to <4 x i32>
%139 = shl nuw <4 x i32> %138, <i32 16, i32 16, i32 16, i32 16>
%140 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 52
%141 = or <4 x i32> %139, %138
%142 = bitcast i32* %140 to <4 x i32>*
store <4 x i32> %141, <4 x i32>* %142
%143 = getelementptr inbounds i16, i16* %1, i64 56
%144 = load i16, i16* %143
%145 = zext i16 %144 to i32
%146 = shl nuw i32 %145, 16
%147 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 56
%148 = or i32 %146, %145
store i32 %148, i32* %147
%149 = getelementptr inbounds [20 x i32], [20 x i32]* %4, i64 0, i64 0
%150 = call i32 @fwrite_bo(i32* %149, i32 80, i32 1, i32* %0, i32 4)
%151 = icmp eq i32 %150, 1
br i1 %151, label %155, label %152
152: ; preds = %32
%153 = load i32, i32* @stderr
%154 = call i32 @fprintf(i32 %153, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %169
155: ; preds = %32
%156 = getelementptr inbounds [1 x i32], [1 x i32]* %7, i64 0, i64 0
%157 = call i32 @fwrite_bo(i32* %156, i32 4, i32 1, i32* %0, i32 4)
%158 = icmp eq i32 %157, 1
br i1 %158, label %162, label %159
159: ; preds = %155
%160 = load i32, i32* @stderr
%161 = call i32 @fprintf(i32 %160, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %169
162: ; preds = %155
%163 = getelementptr inbounds [57 x i32], [57 x i32]* %6, i64 0, i64 0
%164 = call i32 @fwrite_bo(i32* %163, i32 228, i32 1, i32* %0, i32 4)
%165 = icmp eq i32 %164, 1
br i1 %165, label %169, label %166
166: ; preds = %162
%167 = load i32, i32* @stderr
%168 = call i32 @fprintf(i32 %167, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
br label %169
169: ; preds = %162, %166, %159, %152, %29
%170 = phi i32 [ -1, %152 ], [ -1, %159 ], [ -1, %166 ], [ -1, %29 ], [ 0, %162 ]
ret i32 %170
}