void Rx_HTPLUG(unsigned char HTP_Enable, unsigned char Rx_Port) {
  if (HTP_Enable) {
    pr_info("[MHL] %s "
            "LINK: Rx Hot-Plug Enable All\n",
            __func__);
  } else {
    switch (Rx_Port) {
    case 0:
      pr_info("[MHL] %s "
              "LINK: Rx Hot-Plug Disable 0\n",
              __func__);
      break;
    case 1:
      pr_info("[MHL] %s "
              "LINK: Rx Hot-Plug Disable 1\n",
              __func__);
      break;
    case 2:
      pr_info("[MHL] %s "
              "LINK: Rx Hot-Plug Disable 2\n",
              __func__);
      break;
    case 0xFF:
      pr_info("[MHL] %s "
              "LINK: Rx Hot-Plug Disable All\n",
              __func__);
      break;
    }
  }
}


x86 assembly (clang, -O0):
<Rx_HTPLUG>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1148 <Rx_HTPLUG+0x38>
lea    0xecb(%rip),%rdi
lea    0xeeb(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_info@plt>
jmp    11f9 <Rx_HTPLUG+0xe9>
movzbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     1191 <Rx_HTPLUG+0x81>
jmp    115c <Rx_HTPLUG+0x4c>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     11ab <Rx_HTPLUG+0x9b>
jmp    116d <Rx_HTPLUG+0x5d>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     11c5 <Rx_HTPLUG+0xb5>
jmp    117e <Rx_HTPLUG+0x6e>
mov    -0x8(%rbp),%eax
sub    $0xff,%eax
je     11df <Rx_HTPLUG+0xcf>
jmp    11f4 <Rx_HTPLUG+0xe4>
lea    0xe99(%rip),%rdi
lea    0xe88(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_info@plt>
jmp    11f4 <Rx_HTPLUG+0xe4>
lea    0xea5(%rip),%rdi
lea    0xe6e(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_info@plt>
jmp    11f4 <Rx_HTPLUG+0xe4>
lea    0xeb1(%rip),%rdi
lea    0xe54(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_info@plt>
jmp    11f4 <Rx_HTPLUG+0xe4>
lea    0xebd(%rip),%rdi
lea    0xe3a(%rip),%rsi
mov    $0x0,%al
call   1030 <pr_info@plt>
jmp    11f9 <Rx_HTPLUG+0xe9>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rx_HTPLUG>:
test   %edi,%edi
je     111d <Rx_HTPLUG+0xd>
lea    0xee5(%rip),%rdi
jmp    1139 <Rx_HTPLUG+0x29>
add    $0x1,%sil
cmp    $0x3,%sil
ja     1147 <Rx_HTPLUG+0x37>
movsbq %sil,%rax
lea    0xf9a(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
lea    0xee7(%rip),%rsi
xor    %eax,%eax
jmp    1030 <pr_info@plt>
ret

LLVM IR (-O0):
@.str = [39 x i8] c"[MHL] %s LINK: Rx Hot-Plug Enable All\0A\00"
@__func__.Rx_HTPLUG = [10 x i8] c"Rx_HTPLUG\00"
@.str.1 = [38 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable 0\0A\00"
@.str.2 = [38 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable 1\0A\00"
@.str.3 = [38 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable 2\0A\00"
@.str.4 = [40 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable All\0A\00"
define void @Rx_HTPLUG(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.Rx_HTPLUG, i64 0, i64 0))
br label %21
9: ; preds = %2
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
switch i32 %11, label %20 [
i32 0, label %12
i32 1, label %14
i32 2, label %16
i32 255, label %18
]
12: ; preds = %9
%13 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.Rx_HTPLUG, i64 0, i64 0))
br label %20
14: ; preds = %9
%15 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.Rx_HTPLUG, i64 0, i64 0))
br label %20
16: ; preds = %9
%17 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.Rx_HTPLUG, i64 0, i64 0))
br label %20
18: ; preds = %9
%19 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.Rx_HTPLUG, i64 0, i64 0))
br label %20
20: ; preds = %9, %18, %16, %14, %12
br label %21
21: ; preds = %20, %7
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"[MHL] %s LINK: Rx Hot-Plug Enable All\0A\00"
@__func__.Rx_HTPLUG = [10 x i8] c"Rx_HTPLUG\00"
@.str.1 = [38 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable 0\0A\00"
@.str.2 = [38 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable 1\0A\00"
@.str.3 = [38 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable 2\0A\00"
@.str.4 = [40 x i8] c"[MHL] %s LINK: Rx Hot-Plug Disable All\0A\00"
@reltable.Rx_HTPLUG = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([40 x i8]* @.str.4 to i64), i64 ptrtoint ([4 x i32]* @reltable.Rx_HTPLUG to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.Rx_HTPLUG to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.Rx_HTPLUG to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([38 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.Rx_HTPLUG to i64)) to i32)]
define void @Rx_HTPLUG(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp eq i8 %0, 0
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = add i8 %1, 1
%6 = icmp ult i8 %5, 4
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = sext i8 %5 to i64
%9 = shl i64 %8, 2
%10 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.Rx_HTPLUG to i8*), i64 %9)
br label %11
11: ; preds = %7, %2
%12 = phi i8* [ getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), %2 ], [ %10, %7 ]
%13 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @pr_info to i32 (i8*, i8*, ...)*)(i8* %12, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.Rx_HTPLUG, i64 0, i64 0))
br label %14
14: ; preds = %4, %11
ret void
}