#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 uint8_t;
typedef size_t uint32_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ fwrite(int const *, int, size_t, int /*<<< orphan*/ *);
size_t get_wordbe(int const *);
int /*<<< orphan*/ printf(char *, char *, size_t, size_t);
void cut_file(const uint8_t *_src, size_t _size) {
  const uint8_t *fat = &_src[0x800];
  uint32_t offset = 0;
  do {
    if (fat[offset] == 0x00) {
      break;
    }
    char out_name[0x20] = {};
    const uint8_t *ent = &fat[offset];
    int fnp = 0;
    for (int i = 0; i < 8; i++) {
      char c = ent[i];
      if (c == ' ')
        break;
      out_name[fnp++] = c;
    }
    if (ent[8] != ' ') {
      out_name[fnp++] = '.';
    }
    for (int i = 8; i < 0xc; i++) {
      char c = ent[i];
      if (c == ' ')
        break;
      out_name[fnp++] = c;
    }
    out_name[fnp++] = '\0';
    uint32_t sector = get_wordbe(&ent[0x0c]);
    uint32_t out_size = (*(ent + 0x0e) + (*(ent + 0x0f) << 8)) * 0x200;
    printf("%-12s  offset:%02x size:%04x\n", out_name, sector * 0x200,
           out_size);
    if (out_size > 0) {
      FILE *fh = fopen(out_name, "wb");
      fseek(fh, SEEK_SET, 0);
      fwrite(_src + sector * 0x200, 1, out_size, fh);
      fclose(fh);
    }
    offset += 0x10;
  } while (offset < _size);
}


x86 assembly (clang, -O0):
<cut_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x2000,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    11b0 <cut_file+0x40>
jmp    1376 <cut_file+0x206>
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1050 <memset@plt>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
cmpl   $0x8,-0x50(%rbp)
jge    122d <cut_file+0xbd>
mov    -0x48(%rbp),%rax
movslq -0x50(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %al,-0x51(%rbp)
movsbl -0x51(%rbp),%eax
cmp    $0x20,%eax
jne    120b <cut_file+0x9b>
jmp    122d <cut_file+0xbd>
mov    -0x51(%rbp),%cl
mov    -0x4c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x4c(%rbp)
cltq
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
jmp    11e1 <cut_file+0x71>
mov    -0x48(%rbp),%rax
cmpl   $0x20,0x20(%rax)
je     124d <cut_file+0xdd>
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4c(%rbp)
cltq
movb   $0x2e,-0x40(%rbp,%rax,1)
movl   $0x8,-0x58(%rbp)
cmpl   $0xc,-0x58(%rbp)
jge    12a0 <cut_file+0x130>
mov    -0x48(%rbp),%rax
movslq -0x58(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %al,-0x59(%rbp)
movsbl -0x59(%rbp),%eax
cmp    $0x20,%eax
jne    127e <cut_file+0x10e>
jmp    12a0 <cut_file+0x130>
mov    -0x59(%rbp),%cl
mov    -0x4c(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x4c(%rbp)
cltq
mov    %cl,-0x40(%rbp,%rax,1)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1254 <cut_file+0xe4>
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4c(%rbp)
cltq
movb   $0x0,-0x40(%rbp,%rax,1)
mov    -0x48(%rbp),%rdi
add    $0x30,%rdi
call   1090 <get_wordbe@plt>
mov    %rax,-0x68(%rbp)
mov    -0x48(%rbp),%rax
mov    0x38(%rax),%eax
mov    -0x48(%rbp),%rcx
mov    0x3c(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
shl    $0x9,%eax
cltq
mov    %rax,-0x70(%rbp)
lea    -0x40(%rbp),%rsi
mov    -0x68(%rbp),%rdx
shl    $0x9,%rdx
mov    -0x70(%rbp),%rcx
lea    0xd0a(%rip),%rdi
call   1040 <printf@plt>
cmpq   $0x0,-0x70(%rbp)
jbe    135c <cut_file+0x1ec>
lea    -0x40(%rbp),%rdi
lea    0xd0d(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rdi
mov    0x2cbb(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1060 <fseek@plt>
mov    -0x8(%rbp),%rdi
mov    -0x68(%rbp),%rax
shl    $0x9,%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x70(%rbp),%rdx
mov    -0x78(%rbp),%rcx
mov    $0x1,%esi
call   1080 <fwrite@plt>
mov    -0x78(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jb     1199 <cut_file+0x29>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cut_file>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,0x28(%rsp)
mov    %rdi,%rbx
add    $0x2030,%rdi
xor    %r14d,%r14d
jmp    11a8 <cut_file+0x48>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x10,%r14
mov    0x30(%rsp),%rdi
add    $0x40,%rdi
cmp    0x28(%rsp),%r14
jae    13ae <cut_file+0x24e>
mov    0x2000(%rbx,%r14,4),%ecx
test   %ecx,%ecx
je     13ae <cut_file+0x24e>
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
xor    %eax,%eax
cmp    $0x20,%cl
je     1280 <cut_file+0x120>
mov    %cl,(%rsp)
movzbl 0x2004(%rbx,%r14,4),%ecx
mov    $0x1,%eax
cmp    $0x20,%ecx
je     1280 <cut_file+0x120>
mov    %cl,0x1(%rsp)
movzbl 0x2008(%rbx,%r14,4),%ecx
mov    $0x2,%eax
cmp    $0x20,%ecx
je     1280 <cut_file+0x120>
mov    %cl,0x2(%rsp)
movzbl 0x200c(%rbx,%r14,4),%ecx
mov    $0x3,%eax
cmp    $0x20,%ecx
je     1280 <cut_file+0x120>
mov    %cl,0x3(%rsp)
movzbl 0x2010(%rbx,%r14,4),%ecx
mov    $0x4,%eax
cmp    $0x20,%ecx
je     1280 <cut_file+0x120>
mov    %cl,0x4(%rsp)
movzbl 0x2014(%rbx,%r14,4),%ecx
mov    $0x5,%eax
cmp    $0x20,%ecx
je     1280 <cut_file+0x120>
mov    %cl,0x5(%rsp)
movzbl 0x2018(%rbx,%r14,4),%ecx
mov    $0x6,%eax
cmp    $0x20,%ecx
je     1280 <cut_file+0x120>
mov    %cl,0x6(%rsp)
movzbl 0x201c(%rbx,%r14,4),%ecx
mov    $0x7,%eax
cmp    $0x20,%ecx
je     1280 <cut_file+0x120>
mov    %cl,0x7(%rsp)
mov    $0x8,%eax
mov    0x2020(%rbx,%r14,4),%edx
cmp    $0x20,%edx
jne    12a0 <cut_file+0x140>
mov    %eax,%ecx
jmp    1300 <cut_file+0x1a0>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%ecx
movb   $0x2e,(%rsp,%rcx,1)
add    $0x1,%rcx
cmp    $0x20,%dl
je     1300 <cut_file+0x1a0>
mov    %dl,(%rsp,%rcx,1)
movzbl 0x2024(%rbx,%r14,4),%edx
cmp    $0x20,%edx
jne    12c5 <cut_file+0x165>
add    $0x1,%ecx
jmp    1300 <cut_file+0x1a0>
mov    %dl,0x1(%rsp,%rcx,1)
movzbl 0x2028(%rbx,%r14,4),%edx
cmp    $0x20,%edx
jne    12dc <cut_file+0x17c>
add    $0x2,%ecx
jmp    1300 <cut_file+0x1a0>
mov    %dl,0x2(%rsp,%rcx,1)
add    $0x3,%rcx
movzbl 0x202c(%rbx,%r14,4),%edx
cmp    $0x20,%edx
jne    13a3 <cut_file+0x243>
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%eax
movb   $0x0,(%rsp,%rax,1)
mov    %rdi,0x30(%rsp)
call   1080 <get_wordbe@plt>
mov    %rax,%rbp
movslq 0x2038(%rbx,%r14,4),%rax
mov    0x203c(%rbx,%r14,4),%ecx
shl    $0x8,%ecx
mov    %rbx,%r13
movslq %ecx,%rbx
add    %rax,%rbx
mov    %rbx,%r12
shl    $0x9,%r12
shl    $0x9,%rbp
lea    0xcbf(%rip),%rdi
mov    %rsp,%r15
mov    %r15,%rsi
mov    %rbp,%rdx
mov    %r12,%rcx
call   1040 <printf@plt>
test   %ebx,%ebx
mov    %r13,%rbx
je     1190 <cut_file+0x30>
mov    %r15,%rdi
lea    0xcb7(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%r13
mov    0x2c6a(%rip),%rax
mov    (%rax),%esi
mov    %r13,%rdi
xor    %edx,%edx
call   1050 <fseek@plt>
lea    (%rbx,%rbp,4),%rdi
mov    $0x1,%esi
mov    %r12,%rdx
mov    %r13,%rcx
call   1070 <fwrite@plt>
mov    %r13,%rdi
call   1030 <fclose@plt>
jmp    1190 <cut_file+0x30>
add    $0x5,%eax
mov    %dl,(%rsp,%rcx,1)
jmp    128d <cut_file+0x12d>
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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