#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 /*<<< orphan*/ pow(int, float);
int round(int /*<<< orphan*/);
int rh_C(int temp_C, int dewpt_C) {
  float f;
  if (temp_C == 999 || dewpt_C == 999)
    return 999;
  f = 1782.75 * (dewpt_C - temp_C) / ((237.7 + dewpt_C) * (237.7 + temp_C));
  return round(pow(10, f + 2));
}


x86 assembly (clang, -O0):
<rh_C>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x3e7,-0x8(%rbp)
je     1148 <rh_C+0x28>
cmpl   $0x3e7,-0xc(%rbp)
jne    1154 <rh_C+0x34>
movl   $0x3e7,-0x4(%rbp)
jmp    11be <rh_C+0x9e>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm1
movsd  0xeaa(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm2
movsd  0xe91(%rip),%xmm1
addsd  %xmm2,%xmm1
cvtsi2sdl -0x8(%rbp),%xmm3
movsd  0xe80(%rip),%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe5b(%rip),%xmm0
addss  -0x10(%rbp),%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,%edi
call   1040 <round@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rh_C>:
cmp    $0x3e7,%edi
je     1180 <rh_C+0x60>
cmp    $0x3e7,%esi
je     1180 <rh_C+0x60>
push   %rax
cvtsi2sd %esi,%xmm0
sub    %edi,%esi
cvtsi2sd %esi,%xmm1
mulsd  0xebd(%rip),%xmm1
movsd  0xebd(%rip),%xmm2
cvtsi2sd %edi,%xmm3
addsd  %xmm2,%xmm0
addsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
divsd  %xmm3,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
addss  0xea2(%rip),%xmm0
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <round@plt>
mov    $0x3e7,%eax
ret

LLVM IR (-O0):
define i32 @rh_C(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 999
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 999
br i1 %11, label %12, label %13
12: ; preds = %9, %2
store i32 999, i32* %3
br label %32
13: ; preds = %9
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = sub nsw i32 %14, %15
%17 = sitofp i32 %16 to double
%18 = fmul double 1.782750e+03, %17
%19 = load i32, i32* %5
%20 = sitofp i32 %19 to double
%21 = fadd double 2.377000e+02, %20
%22 = load i32, i32* %4
%23 = sitofp i32 %22 to double
%24 = fadd double 2.377000e+02, %23
%25 = fmul double %21, %24
%26 = fdiv double %18, %25
%27 = fptrunc double %26 to float
store float %27, float* %6
%28 = load float, float* %6
%29 = fadd float %28, 2.000000e+00
%30 = call i32 @pow(i32 10, float %29)
%31 = call i32 @round(i32 %30)
store i32 %31, i32* %3
br label %32
32: ; preds = %13, %12
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @rh_C(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 999
%4 = icmp eq i32 %1, 999
%5 = or i1 %3, %4
br i1 %5, label %20, label %6
6: ; preds = %2
%7 = sub nsw i32 %1, %0
%8 = sitofp i32 %7 to double
%9 = fmul double %8, 1.782750e+03
%10 = sitofp i32 %1 to double
%11 = fadd double %10, 2.377000e+02
%12 = sitofp i32 %0 to double
%13 = fadd double %12, 2.377000e+02
%14 = fmul double %13, %11
%15 = fdiv double %9, %14
%16 = fptrunc double %15 to float
%17 = fadd float %16, 2.000000e+00
%18 = tail call i32 @pow(i32 10, float %17)
%19 = tail call i32 @round(i32 %18)
br label %20
20: ; preds = %2, %6
%21 = phi i32 [ %19, %6 ], [ 999, %2 ]
ret i32 %21
}