#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 int uint16_t;
typedef int /*<<< orphan*/ buffer;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
scalar_t__ check_rdismb();
int /*<<< orphan*/ disable_infen();
int /*<<< orphan*/ enable_wen();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int hexfile_getline(int /*<<< orphan*/ *, int *, int *, int);
scalar_t__ memcmp(int *, int *, int);
int /*<<< orphan*/ memcpy(int *, int *, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ spi_transfer(int *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ wait_ready();
void cmd_write_flash(const char *filename) {
  FILE *fd;
  uint8_t buffer[255 + 3] = {0};
  uint8_t orig[255 + 3] = {0};
  uint8_t comp[255 + 3] = {0};
  int count;
  uint16_t address;
  if (check_rdismb()) {
    fprintf(stderr, "flash memory is protected\n");
    exit(EXIT_FAILURE);
  }
  disable_infen();
  fd = fopen(filename, "r");
  if (!fd) {
    fprintf(stderr, "can't open %s to read\n", filename);
    exit(EXIT_FAILURE);
  }
  while ((count = hexfile_getline(fd, &address, buffer + 3,
                                  sizeof(buffer) - 3)) > 0) {
    enable_wen();
    memcpy(orig, buffer + 3, count);
    buffer[0] = 0x02;
    buffer[1] = address >> 8;
    buffer[2] = address & 0xff;
    printf("writing %i bytes at 0x%04hx...\n", count, address);
    if (!spi_transfer(buffer, count + 3)) {
      fprintf(stderr, "SPI error\n");
      fclose(fd);
      exit(EXIT_FAILURE);
    }
    wait_ready();
    comp[0] = 0x03;
    comp[1] = address >> 8;
    comp[2] = address & 0xff;
    if (!spi_transfer(comp, count + 3)) {
      fprintf(stderr, "SPI error\n");
      fclose(fd);
      exit(EXIT_FAILURE);
    }
    if (memcmp(orig, comp + 3, count)) {
      fprintf(stderr, "error checking memory\n");
      fclose(fd);
      exit(EXIT_FAILURE);
    }
  }
  fclose(fd);
}


x86 assembly (clang, -O0):
<cmd_write_flash>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x408,%edx
call   1050 <memset@plt>
lea    -0x830(%rbp),%rdi
xor    %esi,%esi
mov    $0x408,%edx
call   1050 <memset@plt>
lea    -0xc40(%rbp),%rdi
xor    %esi,%esi
mov    $0x408,%edx
call   1050 <memset@plt>
mov    $0x0,%al
call   10f0 <check_rdismb@plt>
cmp    $0x0,%rax
je     125e <cmd_write_flash+0x7e>
mov    0x2da0(%rip),%rax
mov    (%rax),%edi
lea    0xdb7(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d81(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    $0x0,%al
call   1060 <disable_infen@plt>
mov    -0x8(%rbp),%rdi
lea    0xdab(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    12ad <cmd_write_flash+0xcd>
mov    0x2d55(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xd85(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    0x2d32(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
jmp    12b2 <cmd_write_flash+0xd2>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rdx
add    $0xc,%rdx
lea    -0xc48(%rbp),%rsi
mov    $0x405,%ecx
call   10b0 <hexfile_getline@plt>
mov    %eax,-0xc44(%rbp)
cmp    $0x0,%eax
jle    146a <cmd_write_flash+0x28a>
mov    $0x0,%al
call   1100 <enable_wen@plt>
lea    -0x830(%rbp),%rdi
lea    -0x420(%rbp),%rsi
add    $0xc,%rsi
mov    -0xc44(%rbp),%edx
call   10a0 <memcpy@plt>
movl   $0x2,-0x420(%rbp)
mov    -0xc48(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0x41c(%rbp)
mov    -0xc48(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x418(%rbp)
mov    -0xc44(%rbp),%esi
mov    -0xc48(%rbp),%edx
lea    0xcf2(%rip),%rdi
call   1040 <printf@plt>
lea    -0x420(%rbp),%rdi
mov    -0xc44(%rbp),%esi
add    $0x3,%esi
call   10c0 <spi_transfer@plt>
cmp    $0x0,%eax
jne    1393 <cmd_write_flash+0x1b3>
mov    0x2c74(%rip),%rax
mov    (%rax),%edi
lea    0xcdf(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2c4c(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    $0x0,%al
call   1080 <wait_ready@plt>
movl   $0x3,-0xc40(%rbp)
mov    -0xc48(%rbp),%eax
sar    $0x8,%eax
mov    %eax,-0xc3c(%rbp)
mov    -0xc48(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0xc38(%rbp)
lea    -0xc40(%rbp),%rdi
mov    -0xc44(%rbp),%esi
add    $0x3,%esi
call   10c0 <spi_transfer@plt>
cmp    $0x0,%eax
jne    1410 <cmd_write_flash+0x230>
mov    0x2bf7(%rip),%rax
mov    (%rax),%edi
lea    0xc62(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2bcf(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
lea    -0x830(%rbp),%rdi
lea    -0xc40(%rbp),%rsi
add    $0xc,%rsi
mov    -0xc44(%rbp),%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     1465 <cmd_write_flash+0x285>
mov    0x2ba2(%rip),%rax
mov    (%rax),%edi
lea    0xc18(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2b7a(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
jmp    12b2 <cmd_write_flash+0xd2>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0xc50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_write_flash>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc38,%rsp
mov    %rdi,%rbx
lea    0x420(%rsp),%rdi
mov    $0x408,%edx
xor    %esi,%esi
call   1050 <memset@plt>
lea    0x830(%rsp),%rdi
mov    $0x408,%edx
xor    %esi,%esi
call   1050 <memset@plt>
lea    0x10(%rsp),%rdi
mov    $0x408,%edx
xor    %esi,%esi
call   1050 <memset@plt>
xor    %eax,%eax
call   10f0 <check_rdismb@plt>
test   %rax,%rax
jne    13a3 <cmd_write_flash+0x1c3>
xor    %eax,%eax
call   1060 <disable_infen@plt>
lea    0xdd0(%rip),%rsi
mov    %rbx,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     13bc <cmd_write_flash+0x1dc>
mov    %rax,%r14
lea    0x42c(%rsp),%r13
lea    0x830(%rsp),%rbx
lea    0x10(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
lea    0xc(%rsp),%rsi
mov    %r13,%rdx
mov    $0x405,%ecx
call   10b0 <hexfile_getline@plt>
test   %eax,%eax
jle    135c <cmd_write_flash+0x17c>
mov    %eax,%r15d
xor    %eax,%eax
call   1100 <enable_wen@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r15d,%edx
call   10a0 <memcpy@plt>
movl   $0x2,0x420(%rsp)
mov    0xc(%rsp),%edx
mov    %edx,%eax
sar    $0x8,%eax
mov    %eax,0x424(%rsp)
movzbl %dl,%eax
mov    %eax,0x428(%rsp)
lea    0xd53(%rip),%rdi
mov    %r15d,%esi
call   1040 <printf@plt>
mov    %r15d,%ebp
add    $0x3,%ebp
lea    0x420(%rsp),%rdi
mov    %ebp,%esi
call   10c0 <spi_transfer@plt>
test   %eax,%eax
je     1376 <cmd_write_flash+0x196>
xor    %eax,%eax
call   1080 <wait_ready@plt>
movl   $0x3,0x10(%rsp)
mov    0xc(%rsp),%eax
movzbl %al,%ecx
sar    $0x8,%eax
mov    %eax,0x14(%rsp)
mov    %ecx,0x18(%rsp)
mov    %r12,%rdi
mov    %ebp,%esi
call   10c0 <spi_transfer@plt>
test   %eax,%eax
je     1376 <cmd_write_flash+0x196>
mov    %rbx,%rdi
lea    0x1c(%rsp),%rsi
mov    %r15d,%edx
call   1070 <memcmp@plt>
test   %rax,%rax
je     1280 <cmd_write_flash+0xa0>
mov    0x2c8f(%rip),%rax
mov    (%rax),%edi
lea    0xd05(%rip),%rsi
jmp    1386 <cmd_write_flash+0x1a6>
mov    %r14,%rdi
call   1030 <fclose@plt>
add    $0xc38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c63(%rip),%rax
mov    (%rax),%edi
lea    0xcce(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    0x2c3c(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>
mov    0x2c36(%rip),%rax
mov    (%rax),%edi
lea    0xc4d(%rip),%rsi
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1395 <cmd_write_flash+0x1b5>
mov    0x2c1d(%rip),%rax
mov    (%rax),%edi
lea    0xc51(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    1395 <cmd_write_flash+0x1b5>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"flash memory is protected\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [23 x i8] c"can't open %s to read\0A\00"
@.str.3 = [32 x i8] c"writing %i bytes at 0x%04hx...\0A\00"
@.str.4 = [11 x i8] c"SPI error\0A\00"
@.str.5 = [23 x i8] c"error checking memory\0A\00"
define void @cmd_write_flash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca [258 x i32]
%5 = alloca [258 x i32]
%6 = alloca [258 x i32]
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %2
%9 = bitcast [258 x i32]* %4 to i8*
%10 = bitcast [258 x i32]* %5 to i8*
%11 = bitcast [258 x i32]* %6 to i8*
%12 = call i64 (...) @check_rdismb()
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %1
%15 = load i32, i32* @stderr
%16 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%17 = load i32, i32* @EXIT_FAILURE
%18 = call i32 @exit(i32 %17)
unreachable
19: ; preds = %1
%20 = call i32 (...) @disable_infen()
%21 = load i8*, i8** %2
%22 = call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %22, i32** %3
%23 = load i32*, i32** %3
%24 = icmp ne i32* %23, null
br i1 %24, label %31, label %25
25: ; preds = %19
%26 = load i32, i32* @stderr
%27 = load i8*, i8** %2
%28 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %27)
%29 = load i32, i32* @EXIT_FAILURE
%30 = call i32 @exit(i32 %29)
unreachable
31: ; preds = %19
br label %32
32: ; preds = %102, %31
%33 = load i32*, i32** %3
%34 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 0
%35 = getelementptr inbounds i32, i32* %34, i64 3
%36 = call i32 @hexfile_getline(i32* %33, i32* %8, i32* %35, i32 1029)
store i32 %36, i32* %7
%37 = icmp sgt i32 %36, 0
br i1 %37, label %38, label %103
38: ; preds = %32
%39 = call i32 (...) @enable_wen()
%40 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%41 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 0
%42 = getelementptr inbounds i32, i32* %41, i64 3
%43 = load i32, i32* %7
%44 = call i32 @memcpy(i32* %40, i32* %42, i32 %43)
%45 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 0
store i32 2, i32* %45
%46 = load i32, i32* %8
%47 = ashr i32 %46, 8
%48 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 1
store i32 %47, i32* %48
%49 = load i32, i32* %8
%50 = and i32 %49, 255
%51 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 2
store i32 %50, i32* %51
%52 = load i32, i32* %7
%53 = load i32, i32* %8
%54 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %52, i32 %53)
%55 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 0
%56 = load i32, i32* %7
%57 = add nsw i32 %56, 3
%58 = call i32 @spi_transfer(i32* %55, i32 %57)
%59 = icmp ne i32 %58, 0
br i1 %59, label %67, label %60
60: ; preds = %38
%61 = load i32, i32* @stderr
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%63 = load i32*, i32** %3
%64 = call i32 @fclose(i32* %63)
%65 = load i32, i32* @EXIT_FAILURE
%66 = call i32 @exit(i32 %65)
unreachable
67: ; preds = %38
%68 = call i32 (...) @wait_ready()
%69 = getelementptr inbounds [258 x i32], [258 x i32]* %6, i64 0, i64 0
store i32 3, i32* %69
%70 = load i32, i32* %8
%71 = ashr i32 %70, 8
%72 = getelementptr inbounds [258 x i32], [258 x i32]* %6, i64 0, i64 1
store i32 %71, i32* %72
%73 = load i32, i32* %8
%74 = and i32 %73, 255
%75 = getelementptr inbounds [258 x i32], [258 x i32]* %6, i64 0, i64 2
store i32 %74, i32* %75
%76 = getelementptr inbounds [258 x i32], [258 x i32]* %6, i64 0, i64 0
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 3
%79 = call i32 @spi_transfer(i32* %76, i32 %78)
%80 = icmp ne i32 %79, 0
br i1 %80, label %88, label %81
81: ; preds = %67
%82 = load i32, i32* @stderr
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%84 = load i32*, i32** %3
%85 = call i32 @fclose(i32* %84)
%86 = load i32, i32* @EXIT_FAILURE
%87 = call i32 @exit(i32 %86)
unreachable
88: ; preds = %67
%89 = getelementptr inbounds [258 x i32], [258 x i32]* %5, i64 0, i64 0
%90 = getelementptr inbounds [258 x i32], [258 x i32]* %6, i64 0, i64 0
%91 = getelementptr inbounds i32, i32* %90, i64 3
%92 = load i32, i32* %7
%93 = call i64 @memcmp(i32* %89, i32* %91, i32 %92)
%94 = icmp ne i64 %93, 0
br i1 %94, label %95, label %102
95: ; preds = %88
%96 = load i32, i32* @stderr
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%98 = load i32*, i32** %3
%99 = call i32 @fclose(i32* %98)
%100 = load i32, i32* @EXIT_FAILURE
%101 = call i32 @exit(i32 %100)
unreachable
102: ; preds = %88
br label %32
103: ; preds = %32
%104 = load i32*, i32** %3
%105 = call i32 @fclose(i32* %104)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"flash memory is protected\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [23 x i8] c"can't open %s to read\0A\00"
@.str.3 = [32 x i8] c"writing %i bytes at 0x%04hx...\0A\00"
@.str.4 = [11 x i8] c"SPI error\0A\00"
@.str.5 = [23 x i8] c"error checking memory\0A\00"
define void @cmd_write_flash(i8* %0) {
%2 = alloca [258 x i32]
%3 = alloca [258 x i32]
%4 = alloca [258 x i32]
%5 = alloca i32
%6 = bitcast [258 x i32]* %2 to i8*
%7 = bitcast [258 x i32]* %3 to i8*
%8 = bitcast [258 x i32]* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = tail call i64 (...) @check_rdismb()
%11 = icmp eq i64 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %1
%13 = load i32, i32* @stderr
%14 = tail call i32 (i32, i8*, ...) @fprintf(i32 %13, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%15 = load i32, i32* @EXIT_FAILURE
%16 = tail call i32 @exit(i32 %15)
unreachable
17: ; preds = %1
%18 = tail call i32 (...) @disable_infen()
%19 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%20 = icmp eq i32* %19, null
br i1 %20, label %31, label %21
21: ; preds = %17
%22 = getelementptr inbounds [258 x i32], [258 x i32]* %2, i64 0, i64 0
%23 = getelementptr inbounds [258 x i32], [258 x i32]* %2, i64 0, i64 3
%24 = getelementptr inbounds [258 x i32], [258 x i32]* %3, i64 0, i64 0
%25 = getelementptr inbounds [258 x i32], [258 x i32]* %2, i64 0, i64 1
%26 = getelementptr inbounds [258 x i32], [258 x i32]* %2, i64 0, i64 2
%27 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 0
%28 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 1
%29 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 2
%30 = getelementptr inbounds [258 x i32], [258 x i32]* %4, i64 0, i64 3
br label %36
31: ; preds = %17
%32 = load i32, i32* @stderr
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%34 = load i32, i32* @EXIT_FAILURE
%35 = tail call i32 @exit(i32 %34)
unreachable
36: ; preds = %21, %68
%37 = call i32 @hexfile_getline(i32* %19, i32* %5, i32* %23, i32 1029)
%38 = icmp sgt i32 %37, 0
br i1 %38, label %39, label %77
39: ; preds = %36
%40 = call i32 (...) @enable_wen()
%41 = call i32 @memcpy(i32* %24, i32* %23, i32 %37)
store i32 2, i32* %22
%42 = load i32, i32* %5
%43 = ashr i32 %42, 8
store i32 %43, i32* %25
%44 = and i32 %42, 255
store i32 %44, i32* %26
%45 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %37, i32 %42)
%46 = add nuw nsw i32 %37, 3
%47 = call i32 @spi_transfer(i32* %22, i32 %46)
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %55
49: ; preds = %39
%50 = load i32, i32* @stderr
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%52 = call i32 @fclose(i32* %19)
%53 = load i32, i32* @EXIT_FAILURE
%54 = call i32 @exit(i32 %53)
unreachable
55: ; preds = %39
%56 = call i32 (...) @wait_ready()
store i32 3, i32* %27
%57 = load i32, i32* %5
%58 = ashr i32 %57, 8
store i32 %58, i32* %28
%59 = and i32 %57, 255
store i32 %59, i32* %29
%60 = call i32 @spi_transfer(i32* %27, i32 %46)
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %68
62: ; preds = %55
%63 = load i32, i32* @stderr
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%65 = call i32 @fclose(i32* %19)
%66 = load i32, i32* @EXIT_FAILURE
%67 = call i32 @exit(i32 %66)
unreachable
68: ; preds = %55
%69 = call i64 @memcmp(i32* %24, i32* %30, i32 %37)
%70 = icmp eq i64 %69, 0
br i1 %70, label %36, label %71
71: ; preds = %68
%72 = load i32, i32* @stderr
%73 = call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%74 = call i32 @fclose(i32* %19)
%75 = load i32, i32* @EXIT_FAILURE
%76 = call i32 @exit(i32 %75)
unreachable
77: ; preds = %36
%78 = call i32 @fclose(i32* %19)
ret void
}