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

/* Variables and functions */
scalar_t__ strncmp(char *, char *, int);
size_t parse_hdr(
    unsigned char *hdr, size_t hdr_len, unsigned long *chunk_data_length_ret,
    unsigned long *format_data_length_ret, unsigned long *compression_code_ret,
    unsigned long *channel_count_ret, unsigned long *sample_rate_ret,
    unsigned long *sample_bit_length_ret, unsigned long *data_length_ret) {
  unsigned long chunk_data_length;
  unsigned long format_data_length;
  unsigned long compression_code;
  unsigned long channel_count;
  unsigned long sample_rate;
  unsigned long sample_bit_length;
  unsigned long data_length;
  if (strncmp((char *)hdr + 0, "RIFF", 4) ||
      strncmp((char *)hdr + 8, "WAVE", 4) ||
      strncmp((char *)hdr + 12, "fmt ", 4))
    return 0;
  format_data_length = ((((unsigned long)((hdr + 16)[3])) << 24) |
                        (((unsigned long)((hdr + 16)[2])) << 16) |
                        (((unsigned long)((hdr + 16)[1])) << 8) |
                        (((unsigned long)((hdr + 16)[0]))));
  if (strncmp((char *)hdr + 20 + format_data_length, "data", 4))
    return 0;
  chunk_data_length = ((((unsigned long)((hdr + 4)[3])) << 24) |
                       (((unsigned long)((hdr + 4)[2])) << 16) |
                       (((unsigned long)((hdr + 4)[1])) << 8) |
                       (((unsigned long)((hdr + 4)[0]))));
  compression_code = ((((unsigned long)((hdr + 20)[1])) << 8) |
                      (((unsigned long)((hdr + 20)[0]))));
  channel_count = ((((unsigned long)((hdr + 22)[1])) << 8) |
                   (((unsigned long)((hdr + 22)[0]))));
  sample_rate = ((((unsigned long)((hdr + 24)[3])) << 24) |
                 (((unsigned long)((hdr + 24)[2])) << 16) |
                 (((unsigned long)((hdr + 24)[1])) << 8) |
                 (((unsigned long)((hdr + 24)[0]))));
  sample_bit_length = ((((unsigned long)((hdr + 34)[1])) << 8) |
                       (((unsigned long)((hdr + 34)[0]))));
  data_length =
      ((((unsigned long)((hdr + 20 + format_data_length + 4)[3])) << 24) |
       (((unsigned long)((hdr + 20 + format_data_length + 4)[2])) << 16) |
       (((unsigned long)((hdr + 20 + format_data_length + 4)[1])) << 8) |
       (((unsigned long)((hdr + 20 + format_data_length + 4)[0]))));
  if ((format_data_length != 16) || (compression_code != 1) ||
      (channel_count < 1) || (sample_rate == 0) || (sample_rate > 512000) ||
      (sample_bit_length < 2))
    return 0;
  *chunk_data_length_ret = chunk_data_length;
  *format_data_length_ret = format_data_length;
  *compression_code_ret = compression_code;
  *channel_count_ret = channel_count;
  *sample_rate_ret = sample_rate;
  *sample_bit_length_ret = sample_bit_length;
  *data_length_ret = data_length;
  return 20 + format_data_length + 8;
}


x86 assembly (clang, -O0):
<parse_hdr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11a1 <parse_hdr+0x91>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
lea    0xe9b(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    11a1 <parse_hdr+0x91>
mov    -0x10(%rbp),%rdi
add    $0xc,%rdi
lea    0xe7d(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     11ae <parse_hdr+0x9e>
movq   $0x0,-0x8(%rbp)
jmp    13da <parse_hdr+0x2ca>
mov    -0x10(%rbp),%rax
movzbl 0x13(%rax),%eax
shl    $0x18,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x12(%rcx),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x11(%rcx),%ecx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x10(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x14,%rdi
add    -0x48(%rbp),%rdi
lea    0xe15(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     121b <parse_hdr+0x10b>
movq   $0x0,-0x8(%rbp)
jmp    13da <parse_hdr+0x2ca>
mov    -0x10(%rbp),%rax
movzbl 0x7(%rax),%eax
shl    $0x18,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x6(%rcx),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x5(%rcx),%ecx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x4(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x15(%rax),%eax
shl    $0x8,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x14(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x17(%rax),%eax
shl    $0x8,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x16(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1b(%rax),%eax
shl    $0x18,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x1a(%rcx),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x19(%rcx),%ecx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x18(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x23(%rax),%eax
shl    $0x8,%rax
mov    -0x10(%rbp),%rcx
movzbl 0x22(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x48(%rbp),%rcx
movzbl 0x1b(%rax,%rcx,1),%eax
shl    $0x18,%rax
mov    -0x10(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movzbl 0x1a(%rcx,%rdx,1),%ecx
shl    $0x10,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movzbl 0x19(%rcx,%rdx,1),%ecx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x10(%rbp),%rcx
mov    -0x48(%rbp),%rdx
movzbl 0x18(%rcx,%rdx,1),%ecx
or     %rcx,%rax
mov    %rax,-0x70(%rbp)
cmpq   $0x10,-0x48(%rbp)
jne    1370 <parse_hdr+0x260>
cmpq   $0x1,-0x50(%rbp)
jne    1370 <parse_hdr+0x260>
cmpq   $0x1,-0x58(%rbp)
jb     1370 <parse_hdr+0x260>
cmpq   $0x0,-0x60(%rbp)
je     1370 <parse_hdr+0x260>
cmpq   $0x7d000,-0x60(%rbp)
ja     1370 <parse_hdr+0x260>
cmpq   $0x2,-0x68(%rbp)
jae    137d <parse_hdr+0x26d>
movq   $0x0,-0x8(%rbp)
jmp    13da <parse_hdr+0x2ca>
mov    -0x40(%rbp),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x48(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x50(%rbp),%rcx
mov    -0x30(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x58(%rbp),%rcx
mov    -0x38(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x60(%rbp),%rcx
mov    0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x68(%rbp),%rcx
mov    0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x70(%rbp),%rcx
mov    0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x48(%rbp),%rax
add    $0x14,%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_hdr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rdi,%rbx
lea    0xecf(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    119c <parse_hdr+0x8c>
lea    0x8(%rbx),%rdi
lea    0xeba(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    119c <parse_hdr+0x8c>
lea    0xc(%rbx),%rdi
lea    0xea5(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
jne    119c <parse_hdr+0x8c>
mov    0x10(%rbx),%eax
mov    %rax,(%rsp)
lea    (%rbx,%rax,1),%rbp
add    $0x14,%rbp
lea    0xe85(%rip),%rsi
mov    %rbp,%rdi
mov    $0x4,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     11ad <parse_hdr+0x9d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
cmpl   $0x10,(%rsp)
jne    119e <parse_hdr+0x8e>
movzwl 0x14(%rbx),%ecx
cmp    $0x1,%ecx
jne    119e <parse_hdr+0x8e>
movzwl 0x16(%rbx),%ecx
test   %rcx,%rcx
je     119e <parse_hdr+0x8e>
mov    0x18(%rbx),%edx
test   %rdx,%rdx
je     119e <parse_hdr+0x8e>
cmp    $0x7d000,%edx
ja     119e <parse_hdr+0x8e>
movzwl 0x22(%rbx),%esi
cmp    $0x2,%esi
jb     119e <parse_hdr+0x8e>
mov    0x50(%rsp),%r8
mov    0x48(%rsp),%r9
mov    0x40(%rsp),%rdi
mov    0x4(%rbp),%eax
mov    0x4(%rbx),%ebx
mov    %rbx,0x0(%r13)
movq   $0x10,(%r12)
movq   $0x1,(%r15)
mov    %rcx,(%r14)
mov    %rdx,(%rdi)
mov    %rsi,(%r9)
mov    %rax,(%r8)
mov    $0x2c,%eax
jmp    119e <parse_hdr+0x8e>

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

LLVM IR (-O2):
@.str = [5 x i8] c"RIFF\00"
@.str.1 = [5 x i8] c"WAVE\00"
@.str.2 = [5 x i8] c"fmt \00"
@.str.3 = [5 x i8] c"data\00"
define i64 @parse_hdr(i8* %0, i64 %1, i64* nocapture writeonly %2, i64* nocapture writeonly %3, i64* nocapture writeonly %4, i64* nocapture writeonly %5, i64* nocapture writeonly %6, i64* nocapture writeonly %7, i64* nocapture writeonly %8) {
%10 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %133
12: ; preds = %9
%13 = getelementptr inbounds i8, i8* %0, i64 8
%14 = tail call i64 @strncmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 4)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %133
16: ; preds = %12
%17 = getelementptr inbounds i8, i8* %0, i64 12
%18 = tail call i64 @strncmp(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 4)
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %133
20: ; preds = %16
%21 = getelementptr inbounds i8, i8* %0, i64 16
%22 = getelementptr inbounds i8, i8* %0, i64 19
%23 = load i8, i8* %22
%24 = zext i8 %23 to i64
%25 = shl nuw nsw i64 %24, 24
%26 = getelementptr inbounds i8, i8* %0, i64 18
%27 = load i8, i8* %26
%28 = zext i8 %27 to i64
%29 = shl nuw nsw i64 %28, 16
%30 = or i64 %29, %25
%31 = getelementptr inbounds i8, i8* %0, i64 17
%32 = load i8, i8* %31
%33 = zext i8 %32 to i64
%34 = shl nuw nsw i64 %33, 8
%35 = or i64 %30, %34
%36 = load i8, i8* %21
%37 = zext i8 %36 to i64
%38 = or i64 %35, %37
%39 = getelementptr inbounds i8, i8* %0, i64 20
%40 = getelementptr inbounds i8, i8* %39, i64 %38
%41 = tail call i64 @strncmp(i8* %40, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 4)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %133
43: ; preds = %20
%44 = getelementptr inbounds i8, i8* %0, i64 21
%45 = load i8, i8* %44
%46 = zext i8 %45 to i64
%47 = shl nuw nsw i64 %46, 8
%48 = load i8, i8* %39
%49 = zext i8 %48 to i64
%50 = or i64 %47, %49
%51 = getelementptr inbounds i8, i8* %0, i64 22
%52 = getelementptr inbounds i8, i8* %0, i64 23
%53 = load i8, i8* %52
%54 = zext i8 %53 to i64
%55 = shl nuw nsw i64 %54, 8
%56 = load i8, i8* %51
%57 = zext i8 %56 to i64
%58 = or i64 %55, %57
%59 = getelementptr inbounds i8, i8* %0, i64 24
%60 = getelementptr inbounds i8, i8* %0, i64 27
%61 = load i8, i8* %60
%62 = zext i8 %61 to i64
%63 = shl nuw nsw i64 %62, 24
%64 = getelementptr inbounds i8, i8* %0, i64 26
%65 = load i8, i8* %64
%66 = zext i8 %65 to i64
%67 = shl nuw nsw i64 %66, 16
%68 = or i64 %67, %63
%69 = getelementptr inbounds i8, i8* %0, i64 25
%70 = load i8, i8* %69
%71 = zext i8 %70 to i64
%72 = shl nuw nsw i64 %71, 8
%73 = or i64 %68, %72
%74 = load i8, i8* %59
%75 = zext i8 %74 to i64
%76 = or i64 %73, %75
%77 = getelementptr inbounds i8, i8* %0, i64 34
%78 = getelementptr inbounds i8, i8* %0, i64 35
%79 = load i8, i8* %78
%80 = zext i8 %79 to i64
%81 = shl nuw nsw i64 %80, 8
%82 = load i8, i8* %77
%83 = zext i8 %82 to i64
%84 = or i64 %81, %83
%85 = getelementptr inbounds i8, i8* %40, i64 4
%86 = icmp ne i64 %38, 16
%87 = icmp ne i64 %50, 1
%88 = select i1 %86, i1 true, i1 %87
%89 = icmp eq i64 %58, 0
%90 = select i1 %88, i1 true, i1 %89
%91 = icmp eq i64 %76, 0
%92 = select i1 %90, i1 true, i1 %91
%93 = icmp ugt i64 %76, 512000
%94 = select i1 %92, i1 true, i1 %93
%95 = icmp ult i64 %84, 2
%96 = select i1 %94, i1 true, i1 %95
br i1 %96, label %133, label %97
97: ; preds = %43
%98 = getelementptr inbounds i8, i8* %85, i64 3
%99 = load i8, i8* %98
%100 = zext i8 %99 to i64
%101 = shl nuw nsw i64 %100, 24
%102 = getelementptr inbounds i8, i8* %85, i64 2
%103 = load i8, i8* %102
%104 = zext i8 %103 to i64
%105 = shl nuw nsw i64 %104, 16
%106 = or i64 %105, %101
%107 = getelementptr inbounds i8, i8* %85, i64 1
%108 = load i8, i8* %107
%109 = zext i8 %108 to i64
%110 = shl nuw nsw i64 %109, 8
%111 = or i64 %106, %110
%112 = load i8, i8* %85
%113 = zext i8 %112 to i64
%114 = or i64 %111, %113
%115 = getelementptr inbounds i8, i8* %0, i64 7
%116 = load i8, i8* %115
%117 = zext i8 %116 to i64
%118 = shl nuw nsw i64 %117, 24
%119 = getelementptr inbounds i8, i8* %0, i64 6
%120 = load i8, i8* %119
%121 = zext i8 %120 to i64
%122 = shl nuw nsw i64 %121, 16
%123 = or i64 %122, %118
%124 = getelementptr inbounds i8, i8* %0, i64 5
%125 = load i8, i8* %124
%126 = zext i8 %125 to i64
%127 = shl nuw nsw i64 %126, 8
%128 = or i64 %123, %127
%129 = getelementptr inbounds i8, i8* %0, i64 4
%130 = load i8, i8* %129
%131 = zext i8 %130 to i64
%132 = or i64 %128, %131
store i64 %132, i64* %2
store i64 16, i64* %3
store i64 1, i64* %4
store i64 %58, i64* %5
store i64 %76, i64* %6
store i64 %84, i64* %7
store i64 %114, i64* %8
br label %133
133: ; preds = %43, %20, %9, %12, %16, %97
%134 = phi i64 [ 44, %97 ], [ 0, %16 ], [ 0, %12 ], [ 0, %9 ], [ 0, %20 ], [ 0, %43 ]
ret i64 %134
}