#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*/ USB_INFO(char *, char const *);
int /*<<< orphan*/ strcmp(char const *, char *);
const char *add_usb_radio_debug_function(const char *buff) {
  if (!strcmp(buff, "ffs,acm"))
    return "adb,diag,modem,acm";
  else if (!strcmp(buff, "mtp,adb"))
    return "adb,diag,modem,rmnet";
  else if (!strcmp(buff, "mass_storage,adb"))
    return "mass_storage,adb,diag,modem,rmnet";
  else if (!strcmp(buff, "mass_storage,adb,acm"))
    return "mass_storage,adb,diag,modem,rmnet";
  else if (!strcmp(buff, "mass_storage"))
    return "mass_storage,diag,modem,rmnet";
  else if (!strcmp(buff, "mass_storage,acm"))
    return "mass_storage,diag,modem,rmnet";
  else if (!strcmp(buff, "rndis"))
    return "rndis,diag,modem";
  else if (!strcmp(buff, "rndis,adb"))
    return "rndis,adb,diag,modem";
  USB_INFO("switch to radio debug function:%s\n", buff);
  return buff;
}


x86 assembly (clang, -O0):
<add_usb_radio_debug_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1155 <add_usb_radio_debug_function+0x35>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
mov    -0x10(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    117e <add_usb_radio_debug_function+0x5e>
lea    0xecc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
mov    -0x10(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11a7 <add_usb_radio_debug_function+0x87>
lea    0xe96(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
mov    -0x10(%rbp),%rdi
lea    0xea4(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11d0 <add_usb_radio_debug_function+0xb0>
lea    0xe6d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
mov    -0x10(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    11f9 <add_usb_radio_debug_function+0xd9>
lea    0xe88(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
mov    -0x10(%rbp),%rdi
lea    0xe92(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1222 <add_usb_radio_debug_function+0x102>
lea    0xe5f(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
mov    -0x10(%rbp),%rdi
lea    0xe7a(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    124b <add_usb_radio_debug_function+0x12b>
lea    0xe6b(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
mov    -0x10(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1274 <add_usb_radio_debug_function+0x154>
lea    0xe5d(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    12af <add_usb_radio_debug_function+0x18f>
jmp    1279 <add_usb_radio_debug_function+0x159>
jmp    127e <add_usb_radio_debug_function+0x15e>
jmp    1283 <add_usb_radio_debug_function+0x163>
jmp    1288 <add_usb_radio_debug_function+0x168>
jmp    128d <add_usb_radio_debug_function+0x16d>
jmp    1292 <add_usb_radio_debug_function+0x172>
jmp    1297 <add_usb_radio_debug_function+0x177>
mov    -0x10(%rbp),%rsi
lea    0xe3b(%rip),%rdi
call   1040 <USB_INFO@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_usb_radio_debug_function>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed2(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11ea <add_usb_radio_debug_function+0xca>
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11f3 <add_usb_radio_debug_function+0xd3>
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
lea    0xecc(%rip),%r14
test   %eax,%eax
je     11fa <add_usb_radio_debug_function+0xda>
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11fa <add_usb_radio_debug_function+0xda>
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
lea    0xedf(%rip),%r14
test   %eax,%eax
je     11fa <add_usb_radio_debug_function+0xda>
lea    0xef2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     11fa <add_usb_radio_debug_function+0xda>
lea    0xef0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1205 <add_usb_radio_debug_function+0xe5>
lea    0xef4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
test   %eax,%eax
je     120e <add_usb_radio_debug_function+0xee>
lea    0xf00(%rip),%rdi
mov    %rbx,%rsi
call   1040 <USB_INFO@plt>
mov    %rbx,%r14
jmp    11fa <add_usb_radio_debug_function+0xda>
lea    0xe17(%rip),%r14
jmp    11fa <add_usb_radio_debug_function+0xda>
lea    0xe47(%rip),%r14
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xea1(%rip),%r14
jmp    11fa <add_usb_radio_debug_function+0xda>
lea    0xeb3(%rip),%r14
jmp    11fa <add_usb_radio_debug_function+0xda>

LLVM IR (-O0):
@.str = [8 x i8] c"ffs,acm\00"
@.str.1 = [19 x i8] c"adb,diag,modem,acm\00"
@.str.2 = [8 x i8] c"mtp,adb\00"
@.str.3 = [21 x i8] c"adb,diag,modem,rmnet\00"
@.str.4 = [17 x i8] c"mass_storage,adb\00"
@.str.5 = [34 x i8] c"mass_storage,adb,diag,modem,rmnet\00"
@.str.6 = [21 x i8] c"mass_storage,adb,acm\00"
@.str.7 = [13 x i8] c"mass_storage\00"
@.str.8 = [30 x i8] c"mass_storage,diag,modem,rmnet\00"
@.str.9 = [17 x i8] c"mass_storage,acm\00"
@.str.10 = [6 x i8] c"rndis\00"
@.str.11 = [17 x i8] c"rndis,diag,modem\00"
@.str.12 = [10 x i8] c"rndis,adb\00"
@.str.13 = [21 x i8] c"rndis,adb,diag,modem\00"
@.str.14 = [35 x i8] c"switch to radio debug function:%s\0A\00"
define i8* @add_usb_radio_debug_function(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @strcmp(i8* %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %54
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %8
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %54
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = call i32 @strcmp(i8* %14, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%16 = icmp ne i32 %15, 0
br i1 %16, label %18, label %17
17: ; preds = %13
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %54
18: ; preds = %13
%19 = load i8*, i8** %3
%20 = call i32 @strcmp(i8* %19, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%21 = icmp ne i32 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %18
store i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), i8** %2
br label %54
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %28, label %27
27: ; preds = %23
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %54
28: ; preds = %23
%29 = load i8*, i8** %3
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %33, label %32
32: ; preds = %28
store i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8** %2
br label %54
33: ; preds = %28
%34 = load i8*, i8** %3
%35 = call i32 @strcmp(i8* %34, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%36 = icmp ne i32 %35, 0
br i1 %36, label %38, label %37
37: ; preds = %33
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i8** %2
br label %54
38: ; preds = %33
%39 = load i8*, i8** %3
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %43, label %42
42: ; preds = %38
store i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), i8** %2
br label %54
43: ; preds = %38
br label %44
44: ; preds = %43
br label %45
45: ; preds = %44
br label %46
46: ; preds = %45
br label %47
47: ; preds = %46
br label %48
48: ; preds = %47
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
%51 = load i8*, i8** %3
%52 = call i32 @USB_INFO(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), i8* %51)
%53 = load i8*, i8** %3
store i8* %53, i8** %2
br label %54
54: ; preds = %50, %42, %37, %32, %27, %22, %17, %12, %7
%55 = load i8*, i8** %2
ret i8* %55
}

LLVM IR (-O2):
@.str = [8 x i8] c"ffs,acm\00"
@.str.1 = [19 x i8] c"adb,diag,modem,acm\00"
@.str.2 = [8 x i8] c"mtp,adb\00"
@.str.3 = [21 x i8] c"adb,diag,modem,rmnet\00"
@.str.4 = [17 x i8] c"mass_storage,adb\00"
@.str.5 = [34 x i8] c"mass_storage,adb,diag,modem,rmnet\00"
@.str.6 = [21 x i8] c"mass_storage,adb,acm\00"
@.str.7 = [13 x i8] c"mass_storage\00"
@.str.8 = [30 x i8] c"mass_storage,diag,modem,rmnet\00"
@.str.9 = [17 x i8] c"mass_storage,acm\00"
@.str.10 = [6 x i8] c"rndis\00"
@.str.11 = [17 x i8] c"rndis,diag,modem\00"
@.str.12 = [10 x i8] c"rndis,adb\00"
@.str.13 = [21 x i8] c"rndis,adb,diag,modem\00"
@.str.14 = [35 x i8] c"switch to radio debug function:%s\0A\00"
define i8* @add_usb_radio_debug_function(i8* %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %27, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %27, label %7
7: ; preds = %4
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(17) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %27, label %10
10: ; preds = %7
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(21) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.6, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %27, label %13
13: ; preds = %10
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %27, label %16
16: ; preds = %13
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(17) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %27, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %27, label %22
22: ; preds = %19
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(10) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %22
%26 = tail call i32 @USB_INFO(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), i8* %0)
br label %27
27: ; preds = %22, %19, %16, %13, %10, %7, %4, %1, %25
%28 = phi i8* [ %0, %25 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), %1 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), %4 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), %7 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0), %10 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), %13 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), %16 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), %19 ], [ getelementptr inbounds ([21 x i8], [21 x i8]* @.str.13, i64 0, i64 0), %22 ]
ret i8* %28
}