#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 */
int Fin_Cmnd(int, char, unsigned char *);
int Fin_Temp(float *temp) {
  unsigned char IoBuffer[9];
  int res;
  *temp = 0.0;
  res = Fin_Cmnd(1, 'T', IoBuffer);
  if (res > 0) {
    *temp = (float)(IoBuffer[0] - 127) / 2.4 + 25;
  }
  return (res);
}


x86 assembly (clang, -O0):
<Fin_Temp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax)
lea    -0x11(%rbp),%rdx
mov    $0x1,%edi
mov    $0x54,%esi
call   1030 <Fin_Cmnd@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jle    117a <Fin_Temp+0x6a>
movzbl -0x11(%rbp),%eax
sub    $0x7f,%eax
cvtsi2ss %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeaa(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe96(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Fin_Temp>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x0,(%rdi)
lea    0x7(%rsp),%rdx
mov    $0x1,%edi
mov    $0x54,%esi
call   1030 <Fin_Cmnd@plt>
test   %eax,%eax
jle    115e <Fin_Temp+0x4e>
movzbl 0x7(%rsp),%ecx
add    $0xffffff81,%ecx
cvtsi2ss %ecx,%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xeb2(%rip),%xmm0
addsd  0xeb2(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Fin_Temp(float* %0) {
%2 = alloca float*
%3 = alloca [9 x i8]
%4 = alloca i32
store float* %0, float** %2
%5 = load float*, float** %2
store float 0.000000e+00, float* %5
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%7 = call i32 @Fin_Cmnd(i32 1, i8 signext 84, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %21
10: ; preds = %1
%11 = getelementptr inbounds [9 x i8], [9 x i8]* %3, i64 0, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = sub nsw i32 %13, 127
%15 = sitofp i32 %14 to float
%16 = fpext float %15 to double
%17 = fdiv double %16, 2.400000e+00
%18 = fadd double %17, 2.500000e+01
%19 = fptrunc double %18 to float
%20 = load float*, float** %2
store float %19, float* %20
br label %21
21: ; preds = %10, %1
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @Fin_Temp(float* nocapture writeonly %0) {
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
store float 0.000000e+00, float* %0
%4 = call i32 @Fin_Cmnd(i32 1, i8 signext 84, i8* %3)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = add nsw i32 %8, -127
%10 = sitofp i32 %9 to float
%11 = fpext float %10 to double
%12 = fdiv double %11, 2.400000e+00
%13 = fadd double %12, 2.500000e+01
%14 = fptrunc double %13 to float
store float %14, float* %0
br label %15
15: ; preds = %6, %1
ret i32 %4
}