#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__ _getReg(int);
float getPress() {
  float ret, in;
  in = (float)_getReg(0x2A);
  if (in < 0)
    return -999.;
  ret = 256. * in;
  in = (float)_getReg(0x29);
  if (in < 0)
    return -999.;
  ret += in;
  ret *= 256.;
  in = (float)_getReg(0x28);
  if (in < 0)
    return -999.;
  ret += in;
  return ret / 4096.;
}


x86 assembly (clang, -O0):
<getPress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2a,%edi
call   1030 <_getReg@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    114b <getPress+0x3b>
movss  0xecf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1229 <getPress+0x119>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea4(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x29,%edi
call   1030 <_getReg@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    119c <getPress+0x8c>
movss  0xe7e(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1229 <getPress+0x119>
movss  -0xc(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe44(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x28,%edi
call   1030 <_getReg@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    11fc <getPress+0xec>
movss  0xe1e(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1229 <getPress+0x119>
movss  -0xc(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdec(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPress>:
push   %r14
push   %rbx
push   %rax
mov    $0x2a,%edi
call   1030 <_getReg@plt>
movss  0xeda(%rip),%xmm0
test   %rax,%rax
js     1193 <getPress+0x83>
mov    %rax,%rbx
mov    $0x29,%edi
call   1030 <_getReg@plt>
test   %rax,%rax
js     118b <getPress+0x7b>
mov    %rax,%r14
mov    $0x28,%edi
call   1030 <_getReg@plt>
test   %rax,%rax
movss  0xeab(%rip),%xmm0
js     1193 <getPress+0x83>
cvtsi2ss %rax,%xmm3
cvtsi2ss %rbx,%xmm1
movss  0xe9b(%rip),%xmm2
mulss  %xmm2,%xmm1
xorps  %xmm0,%xmm0
cvtsi2ss %r14,%xmm0
addss  %xmm1,%xmm0
mulss  %xmm2,%xmm0
addss  %xmm3,%xmm0
mulss  0xe7f(%rip),%xmm0
jmp    1193 <getPress+0x83>
movss  0xe6d(%rip),%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float @getPress() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = call i64 @_getReg(i32 42)
%5 = sitofp i64 %4 to float
store float %5, float* %3
%6 = load float, float* %3
%7 = fcmp olt float %6, 0.000000e+00
br i1 %7, label %8, label %9
8: ; preds = %0
store float -9.990000e+02, float* %1
br label %40
9: ; preds = %0
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fmul double 2.560000e+02, %11
%13 = fptrunc double %12 to float
store float %13, float* %2
%14 = call i64 @_getReg(i32 41)
%15 = sitofp i64 %14 to float
store float %15, float* %3
%16 = load float, float* %3
%17 = fcmp olt float %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %9
store float -9.990000e+02, float* %1
br label %40
19: ; preds = %9
%20 = load float, float* %3
%21 = load float, float* %2
%22 = fadd float %21, %20
store float %22, float* %2
%23 = load float, float* %2
%24 = fpext float %23 to double
%25 = fmul double %24, 2.560000e+02
%26 = fptrunc double %25 to float
store float %26, float* %2
%27 = call i64 @_getReg(i32 40)
%28 = sitofp i64 %27 to float
store float %28, float* %3
%29 = load float, float* %3
%30 = fcmp olt float %29, 0.000000e+00
br i1 %30, label %31, label %32
31: ; preds = %19
store float -9.990000e+02, float* %1
br label %40
32: ; preds = %19
%33 = load float, float* %3
%34 = load float, float* %2
%35 = fadd float %34, %33
store float %35, float* %2
%36 = load float, float* %2
%37 = fpext float %36 to double
%38 = fdiv double %37, 4.096000e+03
%39 = fptrunc double %38 to float
store float %39, float* %1
br label %40
40: ; preds = %32, %31, %18, %8
%41 = load float, float* %1
ret float %41
}

LLVM IR (-O2):
define float @getPress() {
%1 = tail call i64 @_getReg(i32 42)
%2 = icmp slt i64 %1, 0
br i1 %2, label %18, label %3
3: ; preds = %0
%4 = tail call i64 @_getReg(i32 41)
%5 = icmp slt i64 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %3
%7 = tail call i64 @_getReg(i32 40)
%8 = icmp slt i64 %7, 0
br i1 %8, label %18, label %9
9: ; preds = %6
%10 = sitofp i64 %7 to float
%11 = sitofp i64 %1 to float
%12 = fmul float %11, 2.560000e+02
%13 = sitofp i64 %4 to float
%14 = fadd float %12, %13
%15 = fmul float %14, 2.560000e+02
%16 = fadd float %15, %10
%17 = fmul float %16, 0x3F30000000000000
br label %18
18: ; preds = %6, %3, %0, %9
%19 = phi float [ %17, %9 ], [ -9.990000e+02, %0 ], [ -9.990000e+02, %3 ], [ -9.990000e+02, %6 ]
ret float %19
}