#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*/ freeFrSkyTelemetryPort();
int /*<<< orphan*/ freeHoTTTelemetryPort();
int /*<<< orphan*/ freeMSPTelemetryPort();
scalar_t__ isTelemetryProviderFrSky();
scalar_t__ isTelemetryProviderHoTT();
scalar_t__ isTelemetryProviderMSP();
void freeTelemetryPort(void) {
  if (isTelemetryProviderFrSky()) {
    freeFrSkyTelemetryPort();
  }
  if (isTelemetryProviderHoTT()) {
    freeHoTTTelemetryPort();
  }
  if (isTelemetryProviderMSP()) {
    freeMSPTelemetryPort();
  }
}


x86 assembly (clang, -O0):
<freeTelemetryPort>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <isTelemetryProviderFrSky@plt>
cmp    $0x0,%rax
je     117c <freeTelemetryPort+0x1c>
mov    $0x0,%al
call   1070 <freeFrSkyTelemetryPort@plt>
mov    $0x0,%al
call   1030 <isTelemetryProviderHoTT@plt>
cmp    $0x0,%rax
je     1194 <freeTelemetryPort+0x34>
mov    $0x0,%al
call   1060 <freeHoTTTelemetryPort@plt>
mov    $0x0,%al
call   1080 <isTelemetryProviderMSP@plt>
cmp    $0x0,%rax
je     11ac <freeTelemetryPort+0x4c>
mov    $0x0,%al
call   1050 <freeMSPTelemetryPort@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<freeTelemetryPort>:
push   %rax
xor    %eax,%eax
call   1040 <isTelemetryProviderFrSky@plt>
test   %rax,%rax
je     1174 <freeTelemetryPort+0x14>
xor    %eax,%eax
call   1070 <freeFrSkyTelemetryPort@plt>
xor    %eax,%eax
call   1030 <isTelemetryProviderHoTT@plt>
test   %rax,%rax
je     1187 <freeTelemetryPort+0x27>
xor    %eax,%eax
call   1060 <freeHoTTTelemetryPort@plt>
xor    %eax,%eax
call   1080 <isTelemetryProviderMSP@plt>
test   %rax,%rax
je     119b <freeTelemetryPort+0x3b>
xor    %eax,%eax
pop    %rcx
jmp    1050 <freeMSPTelemetryPort@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @freeTelemetryPort() {
%1 = call i64 (...) @isTelemetryProviderFrSky()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @freeFrSkyTelemetryPort()
br label %5
5: ; preds = %3, %0
%6 = call i64 (...) @isTelemetryProviderHoTT()
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = call i32 (...) @freeHoTTTelemetryPort()
br label %10
10: ; preds = %8, %5
%11 = call i64 (...) @isTelemetryProviderMSP()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 (...) @freeMSPTelemetryPort()
br label %15
15: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
define void @freeTelemetryPort() {
%1 = tail call i64 (...) @isTelemetryProviderFrSky()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @freeFrSkyTelemetryPort()
br label %5
5: ; preds = %3, %0
%6 = tail call i64 (...) @isTelemetryProviderHoTT()
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 (...) @freeHoTTTelemetryPort()
br label %10
10: ; preds = %8, %5
%11 = tail call i64 (...) @isTelemetryProviderMSP()
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 (...) @freeMSPTelemetryPort()
br label %15
15: ; preds = %13, %10
ret void
}