#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef scalar_t__ uint8_t;
typedef double uint16_t;
struct timespec {
  int member_1;
  int /*<<< orphan*/ member_0;
};
typedef int /*<<< orphan*/ int32_t;
typedef double double_t;
struct TYPE_3__ {
  scalar_t__ quot;
  scalar_t__ rem;
};
typedef TYPE_1__ div_t;

/* Variables and functions */
int /*<<< orphan*/ I2C_SLAVE;
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ close(int);
TYPE_1__ div(int, int);
int /*<<< orphan*/ exit_on_error(char *);
int /*<<< orphan*/ i2c_smbus_read_word_data(int, int /*<<< orphan*/);
scalar_t__ i2c_smbus_write_word_data(int, int, int);
scalar_t__ ioctl(int, int /*<<< orphan*/, int);
double log(double);
int /*<<< orphan*/ memcpy(scalar_t__ *, scalar_t__ *, int);
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
double ntohs(int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int dtr_read(int location, uint8_t *vitomem) {
  int fd;
  uint16_t adsparams;
  int32_t SMBUS_word;
  uint16_t RSENS;
  uint16_t RREF;
  double_t VSENS;
  double_t VREF;
  double_t TSENS;
  struct timespec ConvSleepValue = {0, 150 * 1000000};
  switch (location) {
  case 0:
    adsparams = 0b0000001111010011;
    break;
  case 1:
    adsparams = 0b0000001111110011;
    break;
  default:
    adsparams = 0b0000001111000011;
  }
  if ((fd = open("/dev/i2c-1", O_RDWR)) < 0)
    exit_on_error("Can't open I2C device");
  if (ioctl(fd, I2C_SLAVE, 0x48) < 0)
    exit_on_error("Can't talk to slave");
  if (i2c_smbus_write_word_data(fd, 1, adsparams) < 0)
    exit_on_error("Failed to write to the i2c bus");
  nanosleep(&ConvSleepValue, NULL);
  if ((SMBUS_word = i2c_smbus_read_word_data(fd, 0)) < 0)
    exit_on_error("Failed to read from the i2c bus");
  RSENS = ntohs(SMBUS_word);
  if (i2c_smbus_write_word_data(fd, 1, 0b0000001111100011) < 0)
    exit_on_error("Failed to write to the i2c bus [2]");
  nanosleep(&ConvSleepValue, NULL);
  if ((SMBUS_word = i2c_smbus_read_word_data(fd, 0)) < 0)
    exit_on_error("Failed to read from the i2c bus [2]");
  RREF = ntohs(SMBUS_word);
  VSENS = RSENS * 2.0 / 16.0;
  VREF = RREF * 2.0 / 16.0;
  TSENS = (1.0 / ((1.0 / (25.0 + 273.15)) +
                  (log((20.0 - (11.0 * VSENS / VREF)) / 10.0) / 3850.0))) -
          273.15;
  close(fd);
  uint8_t result[2];
  div_t output;
  output = div((int)(TSENS * 10), 256);
  result[0] = (uint8_t)(output.rem);
  result[1] = (uint8_t)(output.quot);
  memcpy(vitomem, &result[0], 2);
  return 0;
}


x86 assembly (clang, -O0):
<dtr_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xe97(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x94(%rbp)
test   %eax,%eax
je     11f7 <dtr_read+0x47>
jmp    11e3 <dtr_read+0x33>
mov    -0x94(%rbp),%eax
sub    $0x1,%eax
je     1209 <dtr_read+0x59>
jmp    121b <dtr_read+0x6b>
movsd  0xe09(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1228 <dtr_read+0x78>
movsd  0xdef(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    1228 <dtr_read+0x78>
movsd  0xded(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    0x2db9(%rip),%rax
mov    (%rax),%esi
lea    0xe30(%rip),%rdi
call   10c0 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    1255 <dtr_read+0xa5>
lea    0xe23(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    -0x14(%rbp),%edi
mov    0x2d81(%rip),%rax
mov    (%rax),%esi
mov    $0x48,%edx
call   1040 <ioctl@plt>
cmp    $0x0,%rax
jge    1281 <dtr_read+0xd1>
lea    0xe0d(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    -0x14(%rbp),%edi
cvttsd2si -0x20(%rbp),%edx
mov    $0x1,%esi
call   1090 <i2c_smbus_write_word_data@plt>
cmp    $0x0,%rax
jge    12a9 <dtr_read+0xf9>
lea    0xdf9(%rip),%rdi
call   1050 <exit_on_error@plt>
lea    -0x58(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   10b0 <i2c_smbus_read_word_data@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
jge    12d8 <dtr_read+0x128>
lea    0xde9(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    -0x24(%rbp),%edi
call   10a0 <ntohs@plt>
movsd  %xmm0,-0x30(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x1,%esi
mov    $0x3e3,%edx
call   1090 <i2c_smbus_write_word_data@plt>
cmp    $0x0,%rax
jge    130d <dtr_read+0x15d>
lea    0xdd4(%rip),%rdi
call   1050 <exit_on_error@plt>
lea    -0x58(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   10b0 <i2c_smbus_read_word_data@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
jge    133c <dtr_read+0x18c>
lea    0xdc8(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    -0x24(%rbp),%edi
call   10a0 <ntohs@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  0xd07(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xcf2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xce9(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xcd4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xcbb(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  -0x48(%rbp),%xmm1
movsd  0xca1(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  0xc6d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   10d0 <log@plt>
movsd  0xc7c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xc68(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xc54(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xc40(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x14(%rbp),%edi
call   1060 <close@plt>
movsd  0xc1f(%rip),%xmm0
mulsd  -0x50(%rbp),%xmm0
cvttsd2si %xmm0,%edi
mov    $0x100,%esi
call   1080 <div@plt>
mov    %rax,-0x90(%rbp)
mov    %rdx,-0x88(%rbp)
mov    -0x90(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x88(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x78(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x80(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    $0x2,%edx
call   1070 <memcpy@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dtr_read>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
movabs $0x8f0d18000000000,%rax
d1 f0 08
mov    %rax,0x8(%rsp)
cmp    $0x1,%edi
mov    $0x3f3,%eax
mov    $0x3c3,%ecx
cmove  %eax,%ecx
test   %edi,%edi
mov    $0x3d3,%ebx
cmovne %ecx,%ebx
mov    0x2dfd(%rip),%rax
mov    (%rax),%esi
lea    0xe4c(%rip),%rdi
call   10c0 <open@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    120b <dtr_read+0x5b>
lea    0xe45(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
mov    $0x48,%edx
call   1040 <ioctl@plt>
test   %rax,%rax
jns    1231 <dtr_read+0x81>
lea    0xe35(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    %ebp,%edi
mov    $0x1,%esi
mov    %ebx,%edx
call   1090 <i2c_smbus_write_word_data@plt>
test   %rax,%rax
jns    1250 <dtr_read+0xa0>
lea    0xe2a(%rip),%rdi
call   1050 <exit_on_error@plt>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   10b0 <i2c_smbus_read_word_data@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1277 <dtr_read+0xc7>
lea    0xe22(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    %ebx,%edi
call   10a0 <ntohs@plt>
movsd  %xmm0,(%rsp)
mov    %ebp,%edi
mov    $0x1,%esi
mov    $0x3e3,%edx
call   1090 <i2c_smbus_write_word_data@plt>
test   %rax,%rax
jns    12a5 <dtr_read+0xf5>
lea    0xe14(%rip),%rdi
call   1050 <exit_on_error@plt>
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   10b0 <i2c_smbus_read_word_data@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    12cc <dtr_read+0x11c>
lea    0xe10(%rip),%rdi
call   1050 <exit_on_error@plt>
mov    %ebx,%edi
call   10a0 <ntohs@plt>
movsd  (%rsp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xd1c(%rip),%xmm1
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xd10(%rip),%xmm2
divsd  %xmm0,%xmm2
addsd  0xd0c(%rip),%xmm2
divsd  0xd0c(%rip),%xmm2
movapd %xmm2,%xmm0
call   10d0 <log@plt>
divsd  0xd03(%rip),%xmm0
addsd  0xd03(%rip),%xmm0
movsd  0xd03(%rip),%xmm1
divsd  %xmm0,%xmm1
addsd  0xcff(%rip),%xmm1
movsd  %xmm1,(%rsp)
mov    %ebp,%edi
call   1060 <close@plt>
movsd  (%rsp),%xmm0
mulsd  0xcc6(%rip),%xmm0
cvttsd2si %xmm0,%edi
mov    $0x100,%esi
call   1080 <div@plt>
mov    %rdx,0x10(%rsp)
mov    %rax,0x18(%rsp)
lea    0x10(%rsp),%rsi
mov    %r14,%rdi
mov    $0x2,%edx
call   1070 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
%struct.TYPE_3__ = type { i64, i64 }
@__const.dtr_read.ConvSleepValue = %struct.timespec { i32 0, i32 150000000 }
@.str = [11 x i8] c"/dev/i2c-1\00"
@O_RDWR = global i32 0
@.str.1 = [22 x i8] c"Can't open I2C device\00"
@I2C_SLAVE = global i32 0
@.str.2 = [20 x i8] c"Can't talk to slave\00"
@.str.3 = [31 x i8] c"Failed to write to the i2c bus\00"
@.str.4 = [32 x i8] c"Failed to read from the i2c bus\00"
@.str.5 = [35 x i8] c"Failed to write to the i2c bus [2]\00"
@.str.6 = [36 x i8] c"Failed to read from the i2c bus [2]\00"
define i32 @dtr_read(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca %struct.timespec
%14 = alloca [2 x i64]
%15 = alloca %struct.TYPE_3__
%16 = alloca %struct.TYPE_3__
store i32 %0, i32* %3
store i64* %1, i64** %4
%17 = bitcast %struct.timespec* %13 to i8*
%18 = load i32, i32* %3
switch i32 %18, label %21 [
i32 0, label %19
i32 1, label %20
]
19: ; preds = %2
store double 9.790000e+02, double* %6
br label %22
20: ; preds = %2
store double 1.011000e+03, double* %6
br label %22
21: ; preds = %2
store double 9.630000e+02, double* %6
br label %22
22: ; preds = %21, %20, %19
%23 = load i32, i32* @O_RDWR
%24 = call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %23)
store i32 %24, i32* %5
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 @exit_on_error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
%29 = load i32, i32* %5
%30 = load i32, i32* @I2C_SLAVE
%31 = call i64 @ioctl(i32 %29, i32 %30, i32 72)
%32 = icmp slt i64 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %28
%34 = call i32 @exit_on_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %35
35: ; preds = %33, %28
%36 = load i32, i32* %5
%37 = load double, double* %6
%38 = fptosi double %37 to i32
%39 = call i64 @i2c_smbus_write_word_data(i32 %36, i32 1, i32 %38)
%40 = icmp slt i64 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %35
%42 = call i32 @exit_on_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %43
43: ; preds = %41, %35
%44 = call i32 @nanosleep(%struct.timespec* %13, i32* null)
%45 = load i32, i32* %5
%46 = call i32 @i2c_smbus_read_word_data(i32 %45, i32 0)
store i32 %46, i32* %7
%47 = icmp slt i32 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %43
%49 = call i32 @exit_on_error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
br label %50
50: ; preds = %48, %43
%51 = load i32, i32* %7
%52 = call double @ntohs(i32 %51)
store double %52, double* %8
%53 = load i32, i32* %5
%54 = call i64 @i2c_smbus_write_word_data(i32 %53, i32 1, i32 995)
%55 = icmp slt i64 %54, 0
br i1 %55, label %56, label %58
56: ; preds = %50
%57 = call i32 @exit_on_error(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
br label %58
58: ; preds = %56, %50
%59 = call i32 @nanosleep(%struct.timespec* %13, i32* null)
%60 = load i32, i32* %5
%61 = call i32 @i2c_smbus_read_word_data(i32 %60, i32 0)
store i32 %61, i32* %7
%62 = icmp slt i32 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %58
%64 = call i32 @exit_on_error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %65
65: ; preds = %63, %58
%66 = load i32, i32* %7
%67 = call double @ntohs(i32 %66)
store double %67, double* %9
%68 = load double, double* %8
%69 = fmul double %68, 2.000000e+00
%70 = fdiv double %69, 1.600000e+01
store double %70, double* %10
%71 = load double, double* %9
%72 = fmul double %71, 2.000000e+00
%73 = fdiv double %72, 1.600000e+01
store double %73, double* %11
%74 = load double, double* %10
%75 = fmul double 1.100000e+01, %74
%76 = load double, double* %11
%77 = fdiv double %75, %76
%78 = fsub double 2.000000e+01, %77
%79 = fdiv double %78, 1.000000e+01
%80 = call double @log(double %79)
%81 = fdiv double %80, 3.850000e+03
%82 = fadd double 0x3F6B79E1DCB5DB83, %81
%83 = fdiv double 1.000000e+00, %82
%84 = fsub double %83, 2.731500e+02
store double %84, double* %12
%85 = load i32, i32* %5
%86 = call i32 @close(i32 %85)
%87 = load double, double* %12
%88 = fmul double %87, 1.000000e+01
%89 = fptosi double %88 to i32
%90 = call { i64, i64 } @div(i32 %89, i32 256)
%91 = bitcast %struct.TYPE_3__* %16 to { i64, i64 }*
%92 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %91, i32 0, i32 0
%93 = extractvalue { i64, i64 } %90, 0
store i64 %93, i64* %92
%94 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %91, i32 0, i32 1
%95 = extractvalue { i64, i64 } %90, 1
store i64 %95, i64* %94
%96 = bitcast %struct.TYPE_3__* %15 to i8*
%97 = bitcast %struct.TYPE_3__* %16 to i8*
%98 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 1
%99 = load i64, i64* %98
%100 = getelementptr inbounds [2 x i64], [2 x i64]* %14, i64 0, i64 0
store i64 %99, i64* %100
%101 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 0
%102 = load i64, i64* %101
%103 = getelementptr inbounds [2 x i64], [2 x i64]* %14, i64 0, i64 1
store i64 %102, i64* %103
%104 = load i64*, i64** %4
%105 = getelementptr inbounds [2 x i64], [2 x i64]* %14, i64 0, i64 0
%106 = call i32 @memcpy(i64* %104, i64* %105, i32 2)
ret i32 0
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@.str = [11 x i8] c"/dev/i2c-1\00"
@O_RDWR = global i32 0
@.str.1 = [22 x i8] c"Can't open I2C device\00"
@I2C_SLAVE = global i32 0
@.str.2 = [20 x i8] c"Can't talk to slave\00"
@.str.3 = [31 x i8] c"Failed to write to the i2c bus\00"
@.str.4 = [32 x i8] c"Failed to read from the i2c bus\00"
@.str.5 = [35 x i8] c"Failed to write to the i2c bus [2]\00"
@.str.6 = [36 x i8] c"Failed to read from the i2c bus [2]\00"
define i32 @dtr_read(i32 %0, i64* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to %struct.timespec*
%5 = alloca [2 x i64]
%6 = bitcast i64* %3 to i8*
store i64 644245094400000000, i64* %3
%7 = icmp eq i32 %0, 1
%8 = select i1 %7, i32 1011, i32 963
%9 = icmp eq i32 %0, 0
%10 = select i1 %9, i32 979, i32 %8
%11 = load i32, i32* @O_RDWR
%12 = tail call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = tail call i32 @exit_on_error(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %2
%17 = load i32, i32* @I2C_SLAVE
%18 = tail call i64 @ioctl(i32 %12, i32 %17, i32 72)
%19 = icmp slt i64 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %16
%21 = tail call i32 @exit_on_error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %16
%23 = tail call i64 @i2c_smbus_write_word_data(i32 %12, i32 1, i32 %10)
%24 = icmp slt i64 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = tail call i32 @exit_on_error(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.3, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
%28 = call i32 @nanosleep(%struct.timespec* %4, i32* null)
%29 = call i32 @i2c_smbus_read_word_data(i32 %12, i32 0)
%30 = icmp slt i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %27
%32 = call i32 @exit_on_error(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
br label %33
33: ; preds = %31, %27
%34 = call double @ntohs(i32 %29)
%35 = call i64 @i2c_smbus_write_word_data(i32 %12, i32 1, i32 995)
%36 = icmp slt i64 %35, 0
br i1 %36, label %37, label %39
37: ; preds = %33
%38 = call i32 @exit_on_error(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
br label %39
39: ; preds = %37, %33
%40 = call i32 @nanosleep(%struct.timespec* %4, i32* null)
%41 = call i32 @i2c_smbus_read_word_data(i32 %12, i32 0)
%42 = icmp slt i32 %41, 0
br i1 %42, label %43, label %45
43: ; preds = %39
%44 = call i32 @exit_on_error(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %45
45: ; preds = %43, %39
%46 = call double @ntohs(i32 %41)
%47 = fmul double %34, 2.000000e+00
%48 = fmul double %47, 6.250000e-02
%49 = fmul double %46, 2.000000e+00
%50 = fmul double %49, 6.250000e-02
%51 = fmul double %48, 1.100000e+01
%52 = fdiv double %51, %50
%53 = fsub double 2.000000e+01, %52
%54 = fdiv double %53, 1.000000e+01
%55 = call double @log(double %54)
%56 = fdiv double %55, 3.850000e+03
%57 = fadd double %56, 0x3F6B79E1DCB5DB83
%58 = fdiv double 1.000000e+00, %57
%59 = fadd double %58, -2.731500e+02
%60 = call i32 @close(i32 %12)
%61 = bitcast [2 x i64]* %5 to i8*
%62 = fmul double %59, 1.000000e+01
%63 = fptosi double %62 to i32
%64 = call { i64, i64 } @div(i32 %63, i32 256)
%65 = extractvalue { i64, i64 } %64, 0
%66 = extractvalue { i64, i64 } %64, 1
%67 = getelementptr inbounds [2 x i64], [2 x i64]* %5, i64 0, i64 0
store i64 %66, i64* %67
%68 = getelementptr inbounds [2 x i64], [2 x i64]* %5, i64 0, i64 1
store i64 %65, i64* %68
%69 = call i32 @memcpy(i64* %1, i64* %67, i32 2)
ret i32 0
}