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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
char *getenv(char *);
int /*<<< orphan*/ mkdir(char *, int);
int rand();
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ strtok(char *, char *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *libhal_read_hardware_serial(void) {
  static char serial[64] = "";
  char path[1024];
  char *home;
  FILE *fp;
  if (serial[0])
    return serial;
  home = getenv("HOME");
  if (home == NULL)
    home = "/tmp";
  snprintf(path, sizeof(path), "%s/.hal", home);
  mkdir(path, 0777);
  snprintf(path, sizeof(path), "%s/.hal/serial", home);
  fp = fopen(path, "rt");
  if (fp != NULL) {
    fgets(serial, sizeof(serial), fp);
    fclose(fp);
    strtok(serial, "\r\n ");
    return serial;
  }
  fp = fopen("/proc/sys/kernel/random/boot_id", "rt");
  if (fp == NULL) {
    srand(time(NULL));
    snprintf(serial, sizeof(serial), "%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
             rand() & 0xffff, rand() & 0xffff, rand() & 0xffff, rand() & 0xffff,
             rand() & 0xffff, rand() & 0xffff, rand() & 0xffff,
             rand() & 0xffff);
  } else {
    fgets(serial, sizeof(serial), fp);
    fclose(fp);
  }
  strtok(serial, "\r\n ");
  fp = fopen(path, "w");
  if (fp != NULL) {
    fprintf(fp, "%s\n", serial);
    fclose(fp);
  }
  return serial;
}


x86 assembly (clang, -O0):
<libhal_read_hardware_serial>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
sub    $0x460,%rsp
cmpb   $0x0,0x2ecb(%rip)
je     11db <libhal_read_hardware_serial+0x2b>
lea    0x2ebe(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1471 <libhal_read_hardware_serial+0x2c1>
lea    0xe1e(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x428(%rbp)
jne    120a <libhal_read_hardware_serial+0x5a>
lea    0xe02(%rip),%rax
mov    %rax,-0x428(%rbp)
lea    -0x420(%rbp),%rdi
mov    -0x428(%rbp),%rcx
mov    $0x400,%esi
lea    0xde6(%rip),%rdx
mov    $0x0,%al
call   1060 <snprintf@plt>
lea    -0x420(%rbp),%rdi
mov    $0x1ff,%esi
call   1040 <mkdir@plt>
lea    -0x420(%rbp),%rdi
mov    -0x428(%rbp),%rcx
mov    $0x400,%esi
lea    0xdbc(%rip),%rdx
mov    $0x0,%al
call   1060 <snprintf@plt>
lea    -0x420(%rbp),%rdi
lea    0xdb6(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x430(%rbp)
cmpq   $0x0,-0x430(%rbp)
je     12cc <libhal_read_hardware_serial+0x11c>
mov    -0x430(%rbp),%rdx
lea    0x2dfd(%rip),%rdi
mov    $0x40,%esi
call   1080 <fgets@plt>
mov    -0x430(%rbp),%rdi
call   1050 <fclose@plt>
lea    0x2de0(%rip),%rdi
lea    0xd6d(%rip),%rsi
call   10c0 <strtok@plt>
lea    0x2dcd(%rip),%rax
mov    %rax,-0x18(%rbp)
jmp    1471 <libhal_read_hardware_serial+0x2c1>
lea    0xd55(%rip),%rdi
lea    0xd47(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x430(%rbp)
cmpq   $0x0,-0x430(%rbp)
jne    13e1 <libhal_read_hardware_serial+0x231>
xor    %eax,%eax
mov    %eax,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    $0x0,%al
call   10d0 <rand@plt>
and    $0xffff,%eax
mov    %eax,-0x444(%rbp)
mov    $0x0,%al
call   10d0 <rand@plt>
and    $0xffff,%eax
mov    %eax,-0x440(%rbp)
mov    $0x0,%al
call   10d0 <rand@plt>
and    $0xffff,%eax
mov    %eax,-0x43c(%rbp)
mov    $0x0,%al
call   10d0 <rand@plt>
mov    %eax,%r14d
and    $0xffff,%r14d
mov    $0x0,%al
call   10d0 <rand@plt>
mov    %eax,%ebx
and    $0xffff,%ebx
mov    $0x0,%al
call   10d0 <rand@plt>
and    $0xffff,%eax
mov    %eax,-0x438(%rbp)
mov    $0x0,%al
call   10d0 <rand@plt>
and    $0xffff,%eax
mov    %eax,-0x434(%rbp)
mov    $0x0,%al
call   10d0 <rand@plt>
mov    -0x444(%rbp),%ecx
mov    -0x440(%rbp),%r8d
mov    -0x43c(%rbp),%r9d
mov    -0x438(%rbp),%r11d
mov    -0x434(%rbp),%r10d
and    $0xffff,%eax
lea    0x2cdd(%rip),%rdi
mov    $0x40,%esi
lea    0xc89(%rip),%rdx
mov    %r14d,(%rsp)
mov    %ebx,0x8(%rsp)
mov    %r11d,0x10(%rsp)
mov    %r10d,0x18(%rsp)
mov    %eax,0x20(%rsp)
mov    $0x0,%al
call   1060 <snprintf@plt>
jmp    1405 <libhal_read_hardware_serial+0x255>
mov    -0x430(%rbp),%rdx
lea    0x2ca1(%rip),%rdi
mov    $0x40,%esi
call   1080 <fgets@plt>
mov    -0x430(%rbp),%rdi
call   1050 <fclose@plt>
lea    0x2c84(%rip),%rdi
lea    0xc11(%rip),%rsi
call   10c0 <strtok@plt>
lea    -0x420(%rbp),%rdi
lea    0xc47(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x430(%rbp)
cmpq   $0x0,-0x430(%rbp)
je     1466 <libhal_read_hardware_serial+0x2b6>
mov    -0x430(%rbp),%rdi
lea    0xc21(%rip),%rsi
lea    0x2c3b(%rip),%rdx
call   1090 <fprintf@plt>
mov    -0x430(%rbp),%rdi
call   1050 <fclose@plt>
lea    0x2c23(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x460,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

x86 assembly (clang, -O2):
<libhal_read_hardware_serial>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
cmpb   $0x0,0x2ec8(%rip)
jne    139d <libhal_read_hardware_serial+0x1ed>
lea    0xe2b(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xe21(%rip),%rbx
cmovne %rax,%rbx
lea    0xe1b(%rip),%rdx
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rcx
xor    %eax,%eax
call   1060 <snprintf@plt>
mov    %rbp,%rdi
mov    $0x1ff,%esi
call   1040 <mkdir@plt>
lea    0xdf8(%rip),%rdx
mov    %rbp,%rdi
mov    $0x400,%esi
mov    %rbx,%rcx
xor    %eax,%eax
call   1060 <snprintf@plt>
lea    0xdee(%rip),%rsi
mov    %rbp,%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     1276 <libhal_read_hardware_serial+0xc6>
mov    %rax,%rbx
lea    0x2e46(%rip),%rbp
mov    %rbp,%rdi
mov    $0x40,%esi
mov    %rax,%rdx
call   1080 <fgets@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0xdbb(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strtok@plt>
jmp    139d <libhal_read_hardware_serial+0x1ed>
lea    0xdab(%rip),%rdi
lea    0xd9d(%rip),%rsi
call   10b0 <fopen@plt>
test   %rax,%rax
je     12b2 <libhal_read_hardware_serial+0x102>
mov    %rax,%rbx
lea    0x2df8(%rip),%rdi
mov    $0x40,%esi
mov    %rax,%rdx
call   1080 <fgets@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
jmp    1353 <libhal_read_hardware_serial+0x1a3>
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%eax
mov    %eax,0x4(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%r12d
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%r13d
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%eax
mov    %rax,0x8(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%r15d
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%ebx
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%r14d
xor    %eax,%eax
call   10d0 <rand@plt>
movzwl %ax,%ebp
sub    $0x8,%rsp
lea    0x2d68(%rip),%rdi
lea    0xd19(%rip),%rdx
mov    $0x40,%esi
mov    0xc(%rsp),%ecx
mov    %r12d,%r8d
mov    %r13d,%r9d
xor    %eax,%eax
push   %rbp
push   %r14
push   %rbx
push   %r15
push   0x30(%rsp)
call   1060 <snprintf@plt>
add    $0x30,%rsp
lea    0x2d36(%rip),%rdi
lea    0xcc3(%rip),%rsi
call   10c0 <strtok@plt>
lea    0xd00(%rip),%rsi
lea    0x10(%rsp),%rdi
call   10b0 <fopen@plt>
test   %rax,%rax
je     139d <libhal_read_hardware_serial+0x1ed>
mov    %rax,%rbx
lea    0xce9(%rip),%rsi
lea    0x2d03(%rip),%rdx
mov    %rax,%rdi
call   1090 <fprintf@plt>
mov    %rbx,%rdi
call   1050 <fclose@plt>
lea    0x2cec(%rip),%rax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@libhal_read_hardware_serial.serial = internal global [64 x i8] zeroinitializer
@.str = [5 x i8] c"HOME\00"
@.str.1 = [5 x i8] c"/tmp\00"
@.str.2 = [8 x i8] c"%s/.hal\00"
@.str.3 = [15 x i8] c"%s/.hal/serial\00"
@.str.4 = [3 x i8] c"rt\00"
@.str.5 = [4 x i8] c"\0D\0A \00"
@.str.6 = [32 x i8] c"/proc/sys/kernel/random/boot_id\00"
@.str.7 = [37 x i8] c"%04x%04x-%04x-%04x-%04x-%04x%04x%04x\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [4 x i8] c"%s\0A\00"
define i8* @libhal_read_hardware_serial() {
%1 = alloca i8*
%2 = alloca [1024 x i8]
%3 = alloca i8*
%4 = alloca i32*
%5 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0)
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i8** %1
br label %73
8: ; preds = %0
%9 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %8
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %3
br label %13
13: ; preds = %12, %8
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%15 = load i8*, i8** %3
%16 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %14, i32 1024, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%18 = call i32 @mkdir(i8* %17, i32 511)
%19 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%20 = load i8*, i8** %3
%21 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %19, i32 1024, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %20)
%22 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%23 = call i32* @fopen(i8* %22, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %23, i32** %4
%24 = load i32*, i32** %4
%25 = icmp ne i32* %24, null
br i1 %25, label %26, label %32
26: ; preds = %13
%27 = load i32*, i32** %4
%28 = call i32 @fgets(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i32 64, i32* %27)
%29 = load i32*, i32** %4
%30 = call i32 @fclose(i32* %29)
%31 = call i32 @strtok(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
store i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i8** %1
br label %73
32: ; preds = %13
%33 = call i32* @fopen(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %33, i32** %4
%34 = load i32*, i32** %4
%35 = icmp eq i32* %34, null
br i1 %35, label %36, label %56
36: ; preds = %32
%37 = call i32 @time(i32* null)
%38 = call i32 @srand(i32 %37)
%39 = call i32 (...) @rand()
%40 = and i32 %39, 65535
%41 = call i32 (...) @rand()
%42 = and i32 %41, 65535
%43 = call i32 (...) @rand()
%44 = and i32 %43, 65535
%45 = call i32 (...) @rand()
%46 = and i32 %45, 65535
%47 = call i32 (...) @rand()
%48 = and i32 %47, 65535
%49 = call i32 (...) @rand()
%50 = and i32 %49, 65535
%51 = call i32 (...) @rand()
%52 = and i32 %51, 65535
%53 = call i32 (...) @rand()
%54 = and i32 %53, 65535
%55 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i32 64, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i32 %40, i32 %42, i32 %44, i32 %46, i32 %48, i32 %50, i32 %52, i32 %54)
br label %61
56: ; preds = %32
%57 = load i32*, i32** %4
%58 = call i32 @fgets(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i32 64, i32* %57)
%59 = load i32*, i32** %4
%60 = call i32 @fclose(i32* %59)
br label %61
61: ; preds = %56, %36
%62 = call i32 @strtok(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%64 = call i32* @fopen(i8* %63, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %64, i32** %4
%65 = load i32*, i32** %4
%66 = icmp ne i32* %65, null
br i1 %66, label %67, label %72
67: ; preds = %61
%68 = load i32*, i32** %4
%69 = call i32 @fprintf(i32* %68, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0))
%70 = load i32*, i32** %4
%71 = call i32 @fclose(i32* %70)
br label %72
72: ; preds = %67, %61
store i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i8** %1
br label %73
73: ; preds = %72, %26, %7
%74 = load i8*, i8** %1
ret i8* %74
}

LLVM IR (-O2):
@libhal_read_hardware_serial.serial = internal global [64 x i8] zeroinitializer
@.str = [5 x i8] c"HOME\00"
@.str.1 = [5 x i8] c"/tmp\00"
@.str.2 = [8 x i8] c"%s/.hal\00"
@.str.3 = [15 x i8] c"%s/.hal/serial\00"
@.str.4 = [3 x i8] c"rt\00"
@.str.5 = [4 x i8] c"\0D\0A \00"
@.str.6 = [32 x i8] c"/proc/sys/kernel/random/boot_id\00"
@.str.7 = [37 x i8] c"%04x%04x-%04x-%04x-%04x-%04x%04x%04x\00"
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [4 x i8] c"%s\0A\00"
define i8* @libhal_read_hardware_serial() {
%1 = alloca [1024 x i8]
%2 = getelementptr inbounds [1024 x i8], [1024 x i8]* %1, i64 0, i64 0
%3 = load i8, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0)
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %51
5: ; preds = %0
%6 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i8* %6, null
%8 = select i1 %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %6
%9 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %2, i32 1024, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = call i32 @mkdir(i8* %2, i32 511)
%11 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %2, i32 1024, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i8* %8)
%12 = call i32* @fopen(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%13 = icmp eq i32* %12, null
br i1 %13, label %18, label %14
14: ; preds = %5
%15 = call i32 @fgets(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i32 64, i32* %12)
%16 = call i32 @fclose(i32* %12)
%17 = call i32 @strtok(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
br label %51
18: ; preds = %5
%19 = call i32* @fopen(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %41
21: ; preds = %18
%22 = call i32 @time(i32* null)
%23 = call i32 @srand(i32 %22)
%24 = call i32 (...) @rand()
%25 = and i32 %24, 65535
%26 = call i32 (...) @rand()
%27 = and i32 %26, 65535
%28 = call i32 (...) @rand()
%29 = and i32 %28, 65535
%30 = call i32 (...) @rand()
%31 = and i32 %30, 65535
%32 = call i32 (...) @rand()
%33 = and i32 %32, 65535
%34 = call i32 (...) @rand()
%35 = and i32 %34, 65535
%36 = call i32 (...) @rand()
%37 = and i32 %36, 65535
%38 = call i32 (...) @rand()
%39 = and i32 %38, 65535
%40 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i32 64, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i32 %25, i32 %27, i32 %29, i32 %31, i32 %33, i32 %35, i32 %37, i32 %39)
br label %44
41: ; preds = %18
%42 = call i32 @fgets(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i32 64, i32* %19)
%43 = call i32 @fclose(i32* %19)
br label %44
44: ; preds = %41, %21
%45 = call i32 @strtok(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%46 = call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%47 = icmp eq i32* %46, null
br i1 %47, label %51, label %48
48: ; preds = %44
%49 = call i32 @fprintf(i32* %46, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0))
%50 = call i32 @fclose(i32* %46)
br label %51
51: ; preds = %44, %48, %0, %14
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @libhal_read_hardware_serial.serial, i64 0, i64 0)
}