#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 uint64_t;

/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ lseek(int, int, int /*<<< orphan*/);
int mmio_read(char *, int);
int /*<<< orphan*/ mmio_write(char *, int, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ read(int, int *, int);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(int argc, char *argv[]) {
  int CFG;
  char device_num[1024];
  char bar2[1024];
  char cfg_file[1024];
  if (argc < 2) {
    printf("Usage: ./flashgt_temp <pci_number> <card#>\nExample: "
           "./flashgt_temp 0000:01:00.0 0\n");
    return -1;
  }
  strcpy(device_num, argv[1]);
  strcpy(bar2, "/sys/bus/pci/devices/");
  strcat(bar2, device_num);
  strcat(bar2, "/resource2");
  strcpy(cfg_file, "/sys/class/cxl/card");
  strcat(cfg_file, argv[2]);
  strcat(cfg_file, "/device/config");
  if ((CFG = open(cfg_file, O_RDWR)) < 0) {
    printf("Can not open %s\n", cfg_file);
    exit(-1);
  }
  int temp, vendor, device;
  lseek(CFG, 0, SEEK_SET);
  read(CFG, &temp, 4);
  vendor = temp & 0xFFFF;
  device = (temp >> 16) & 0xFFFF;
  if ((vendor != 0x1014) ||
      ((device != 0x0477) && (device != 0x04cf) && (device != 0x0601))) {
    printf("Unknown Vendor or Device ID\n");
    exit(-1);
  }
  uint64_t mmio_ptmon_addr = 0x0000000000000138;
  lseek(CFG, 0x404, SEEK_SET);
  read(CFG, &temp, 4);
  setvbuf(stdout, NULL, _IONBF, 0);
  uint64_t mmio_write_data = 0xFFFFFFFFFFFFFFFF;
  uint64_t mmio_read_data = 0x0;
  uint8_t temperature = 0x00;
  float temperature2 = 0;
  mmio_write(bar2, mmio_ptmon_addr, mmio_write_data);
  mmio_read_data = mmio_read(bar2, mmio_ptmon_addr);
  temperature = (mmio_read_data >> 40);
  temperature2 = temperature + ((mmio_read_data << 24) >> 56) / 256.00;
  printf("FPGA Temperature is %8.8f degrees Celsius\n", temperature2);
  mmio_write_data = 0x0000000000000000;
  mmio_write(bar2, mmio_ptmon_addr, mmio_write_data);
  close(CFG);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11ed <main+0x3d>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1498 <main+0x2e8>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <strcpy@plt>
lea    -0x820(%rbp),%rdi
lea    0xe4c(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x820(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   10b0 <strcat@plt>
lea    -0x820(%rbp),%rdi
lea    0xe3c(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0xc20(%rbp),%rdi
lea    0xe34(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0xc20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   10b0 <strcat@plt>
lea    -0xc20(%rbp),%rdi
lea    0xe21(%rip),%rsi
call   10b0 <strcat@plt>
lea    -0xc20(%rbp),%rdi
mov    0x2d66(%rip),%rax
mov    (%rax),%esi
call   10a0 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    12b4 <main+0x104>
lea    -0xc20(%rbp),%rsi
lea    0xdfc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2d12(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    -0x14(%rbp),%edi
lea    -0xc24(%rbp),%rsi
mov    $0x4,%edx
call   1080 <read@plt>
mov    -0xc24(%rbp),%eax
and    $0xffff,%eax
mov    %eax,-0xc28(%rbp)
mov    -0xc24(%rbp),%eax
sar    $0x10,%eax
and    $0xffff,%eax
mov    %eax,-0xc2c(%rbp)
cmpl   $0x1014,-0xc28(%rbp)
jne    1340 <main+0x190>
cmpl   $0x477,-0xc2c(%rbp)
je     1358 <main+0x1a8>
cmpl   $0x4cf,-0xc2c(%rbp)
je     1358 <main+0x1a8>
cmpl   $0x601,-0xc2c(%rbp)
je     1358 <main+0x1a8>
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xffffffff,%edi
call   10c0 <exit@plt>
movl   $0x138,-0xc30(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2c64(%rip),%rax
mov    (%rax),%edx
mov    $0x404,%esi
call   1060 <lseek@plt>
mov    -0x14(%rbp),%edi
lea    -0xc24(%rbp),%rsi
mov    $0x4,%edx
call   1080 <read@plt>
mov    0x2c35(%rip),%rax
mov    (%rax),%edi
mov    0x2c44(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1090 <setvbuf@plt>
movl   $0xffffffff,-0xc34(%rbp)
ff ff ff
movl   $0x0,-0xc38(%rbp)
movl   $0x0,-0xc3c(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc40(%rbp)
ff
lea    -0x820(%rbp),%rdi
mov    -0xc30(%rbp),%esi
mov    -0xc34(%rbp),%edx
call   10d0 <mmio_write@plt>
lea    -0x820(%rbp),%rdi
mov    -0xc30(%rbp),%esi
call   1050 <mmio_read@plt>
mov    %eax,-0xc38(%rbp)
mov    -0xc38(%rbp),%eax
mov    $0x28,%ecx
sar    %cl,%eax
mov    %eax,-0xc3c(%rbp)
cvtsi2sdl -0xc3c(%rbp),%xmm0
ff
mov    -0xc38(%rbp),%eax
shl    $0x18,%eax
mov    $0x38,%ecx
sar    %cl,%eax
cvtsi2sd %eax,%xmm1
movsd  0xbc7(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc40(%rbp)
ff
movss  -0xc40(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
lea    0xc6d(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movl   $0x0,-0xc34(%rbp)
lea    -0x820(%rbp),%rdi
mov    -0xc30(%rbp),%esi
mov    -0xc34(%rbp),%edx
call   10d0 <mmio_write@plt>
mov    -0x14(%rbp),%edi
call   1070 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0xc10,%rsp
cmp    $0x1,%edi
jg     11e6 <main+0x26>
lea    0xec5(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%ebx
jmp    1354 <main+0x194>
mov    %rsi,%rbx
mov    0x8(%rsi),%rsi
lea    0x810(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
lea    0xdfc(%rip),%rsi
lea    0x410(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <strcpy@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
call   10c0 <strcat@plt>
lea    0xdf0(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strcat@plt>
lea    0xdec(%rip),%rsi
lea    0x10(%rsp),%rbp
mov    %rbp,%rdi
call   1030 <strcpy@plt>
mov    0x10(%rbx),%rsi
mov    %rbp,%rdi
call   10c0 <strcat@plt>
lea    0xde0(%rip),%rsi
mov    %rbp,%rdi
call   10c0 <strcat@plt>
mov    0x2d84(%rip),%rax
mov    (%rax),%esi
mov    %rbp,%rdi
call   10b0 <open@plt>
test   %eax,%eax
js     1378 <main+0x1b8>
mov    %eax,%ebp
mov    0x2d51(%rip),%rbx
mov    (%rbx),%edx
mov    %eax,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
lea    0xc(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1090 <read@plt>
mov    0xc(%rsp),%eax
movzwl %ax,%ecx
cmp    $0x1014,%ecx
jne    1362 <main+0x1a2>
shr    $0x10,%eax
cmp    $0x477,%eax
je     12cd <main+0x10d>
movzwl %ax,%eax
cmp    $0x4cf,%eax
je     12cd <main+0x10d>
cmp    $0x601,%eax
jne    1362 <main+0x1a2>
mov    (%rbx),%edx
mov    %ebp,%edi
mov    $0x404,%esi
call   1070 <lseek@plt>
lea    0xc(%rsp),%rsi
mov    %ebp,%edi
mov    $0x4,%edx
call   1090 <read@plt>
mov    0x2cd5(%rip),%rax
mov    (%rax),%edi
mov    0x2ce4(%rip),%rax
mov    (%rax),%edx
xor    %ebx,%ebx
xor    %esi,%esi
xor    %ecx,%ecx
call   10a0 <setvbuf@plt>
lea    0x410(%rsp),%r14
mov    %r14,%rdi
mov    $0x138,%esi
mov    $0xffffffff,%edx
call   10e0 <mmio_write@plt>
mov    %r14,%rdi
mov    $0x138,%esi
call   1060 <mmio_read@plt>
lea    0xd1e(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    %r14,%rdi
mov    $0x138,%esi
xor    %edx,%edx
call   10e0 <mmio_write@plt>
mov    %ebp,%edi
call   1080 <close@plt>
mov    %ebx,%eax
add    $0xc10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xd17(%rip),%rdi
call   1040 <puts@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
lea    0xcc5(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [83 x i8] c"Usage: ./flashgt_temp <pci_number> <card#>\0AExample: ./flashgt_temp 0000:01:00.0 0\0A\00"
@.str.1 = [22 x i8] c"/sys/bus/pci/devices/\00"
@.str.2 = [11 x i8] c"/resource2\00"
@.str.3 = [20 x i8] c"/sys/class/cxl/card\00"
@.str.4 = [15 x i8] c"/device/config\00"
@O_RDWR = global i32 0
@.str.5 = [17 x i8] c"Can not open %s\0A\00"
@SEEK_SET = global i32 0
@.str.6 = [29 x i8] c"Unknown Vendor or Device ID\0A\00"
@stdout = global i32 0
@_IONBF = global i32 0
@.str.7 = [43 x i8] c"FPGA Temperature is %8.8f degrees Celsius\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [1024 x i8]
%8 = alloca [1024 x i8]
%9 = alloca [1024 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%18 = load i32, i32* %4
%19 = icmp slt i32 %18, 2
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %113
22: ; preds = %2
%23 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 @strcpy(i8* %23, i8* %26)
%28 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%29 = call i32 @strcpy(i8* %28, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%30 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%32 = call i32 @strcat(i8* %30, i8* %31)
%33 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%34 = call i32 @strcat(i8* %33, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%35 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%36 = call i32 @strcpy(i8* %35, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%37 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = call i32 @strcat(i8* %37, i8* %40)
%42 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%43 = call i32 @strcat(i8* %42, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%44 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%45 = load i32, i32* @O_RDWR
%46 = call i32 @open(i8* %44, i32 %45)
store i32 %46, i32* %6
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %52
48: ; preds = %22
%49 = getelementptr inbounds [1024 x i8], [1024 x i8]* %9, i64 0, i64 0
%50 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %49)
%51 = call i32 @exit(i32 -1)
unreachable
52: ; preds = %22
%53 = load i32, i32* %6
%54 = load i32, i32* @SEEK_SET
%55 = call i32 @lseek(i32 %53, i32 0, i32 %54)
%56 = load i32, i32* %6
%57 = call i32 @read(i32 %56, i32* %10, i32 4)
%58 = load i32, i32* %10
%59 = and i32 %58, 65535
store i32 %59, i32* %11
%60 = load i32, i32* %10
%61 = ashr i32 %60, 16
%62 = and i32 %61, 65535
store i32 %62, i32* %12
%63 = load i32, i32* %11
%64 = icmp ne i32 %63, 4116
br i1 %64, label %74, label %65
65: ; preds = %52
%66 = load i32, i32* %12
%67 = icmp ne i32 %66, 1143
br i1 %67, label %68, label %77
68: ; preds = %65
%69 = load i32, i32* %12
%70 = icmp ne i32 %69, 1231
br i1 %70, label %71, label %77
71: ; preds = %68
%72 = load i32, i32* %12
%73 = icmp ne i32 %72, 1537
br i1 %73, label %74, label %77
74: ; preds = %71, %52
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0))
%76 = call i32 @exit(i32 -1)
unreachable
77: ; preds = %71, %68, %65
store i32 312, i32* %13
%78 = load i32, i32* %6
%79 = load i32, i32* @SEEK_SET
%80 = call i32 @lseek(i32 %78, i32 1028, i32 %79)
%81 = load i32, i32* %6
%82 = call i32 @read(i32 %81, i32* %10, i32 4)
%83 = load i32, i32* @stdout
%84 = load i32, i32* @_IONBF
%85 = call i32 @setvbuf(i32 %83, i32* null, i32 %84, i32 0)
store i32 -1, i32* %14
store i32 0, i32* %15
store i32 0, i32* %16
store float 0.000000e+00, float* %17
%86 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%87 = load i32, i32* %13
%88 = load i32, i32* %14
%89 = call i32 @mmio_write(i8* %86, i32 %87, i32 %88)
%90 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%91 = load i32, i32* %13
%92 = call i32 @mmio_read(i8* %90, i32 %91)
store i32 %92, i32* %15
%93 = load i32, i32* %15
%94 = ashr i32 %93, 40
store i32 %94, i32* %16
%95 = load i32, i32* %16
%96 = sitofp i32 %95 to double
%97 = load i32, i32* %15
%98 = shl i32 %97, 24
%99 = ashr i32 %98, 56
%100 = sitofp i32 %99 to double
%101 = fdiv double %100, 2.560000e+02
%102 = fadd double %96, %101
%103 = fptrunc double %102 to float
store float %103, float* %17
%104 = load float, float* %17
%105 = fpext float %104 to double
%106 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), double %105)
store i32 0, i32* %14
%107 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%108 = load i32, i32* %13
%109 = load i32, i32* %14
%110 = call i32 @mmio_write(i8* %107, i32 %108, i32 %109)
%111 = load i32, i32* %6
%112 = call i32 @close(i32 %111)
store i32 0, i32* %3
br label %113
113: ; preds = %77, %20
%114 = load i32, i32* %3
ret i32 %114
}

LLVM IR (-O2):
@.str.1 = [22 x i8] c"/sys/bus/pci/devices/\00"
@.str.2 = [11 x i8] c"/resource2\00"
@.str.3 = [20 x i8] c"/sys/class/cxl/card\00"
@.str.4 = [15 x i8] c"/device/config\00"
@O_RDWR = global i32 0
@.str.5 = [17 x i8] c"Can not open %s\0A\00"
@SEEK_SET = global i32 0
@stdout = global i32 0
@_IONBF = global i32 0
@.str.7 = [43 x i8] c"FPGA Temperature is %8.8f degrees Celsius\0A\00"
@str = [28 x i8] c"Unknown Vendor or Device ID\00"
@str.8 = [82 x i8] c"Usage: ./flashgt_temp <pci_number> <card#>\0AExample: ./flashgt_temp 0000:01:00.0 0\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = alloca [1024 x i8]
%6 = alloca i32
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%10 = icmp slt i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @str.8, i64 0, i64 0))
br label %57
13: ; preds = %2
%14 = getelementptr inbounds i8*, i8** %1, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @strcpy(i8* %7, i8* %15)
%17 = call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%18 = call i32 @strcat(i8* %8, i8* %7)
%19 = call i32 @strcat(i8* %8, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%20 = call i32 @strcpy(i8* %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = call i32 @strcat(i8* %9, i8* %22)
%24 = call i32 @strcat(i8* %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%25 = load i32, i32* @O_RDWR
%26 = call i32 @open(i8* %9, i32 %25)
%27 = icmp slt i32 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %13
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i8* %9)
%30 = call i32 @exit(i32 -1)
unreachable
31: ; preds = %13
%32 = bitcast i32* %6 to i8*
%33 = load i32, i32* @SEEK_SET
%34 = call i32 @lseek(i32 %26, i32 0, i32 %33)
%35 = call i32 @read(i32 %26, i32* %6, i32 4)
%36 = load i32, i32* %6
%37 = and i32 %36, 65535
%38 = icmp eq i32 %37, 4116
br i1 %38, label %39, label %42
39: ; preds = %31
%40 = lshr i32 %36, 16
%41 = trunc i32 %40 to i16
switch i16 %41, label %42 [
i16 1537, label %45
i16 1231, label %45
i16 1143, label %45
]
42: ; preds = %39, %31
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%44 = call i32 @exit(i32 -1)
unreachable
45: ; preds = %39, %39, %39
%46 = load i32, i32* @SEEK_SET
%47 = call i32 @lseek(i32 %26, i32 1028, i32 %46)
%48 = call i32 @read(i32 %26, i32* %6, i32 4)
%49 = load i32, i32* @stdout
%50 = load i32, i32* @_IONBF
%51 = call i32 @setvbuf(i32 %49, i32* null, i32 %50, i32 0)
%52 = call i32 @mmio_write(i8* %8, i32 312, i32 -1)
%53 = call i32 @mmio_read(i8* %8, i32 312)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), double poison)
%55 = call i32 @mmio_write(i8* %8, i32 312, i32 0)
%56 = call i32 @close(i32 %26)
br label %57
57: ; preds = %45, %11
%58 = phi i32 [ -1, %11 ], [ 0, %45 ]
ret i32 %58
}