#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*/ connector_ftp_global_init();
int /*<<< orphan*/ connector_webdav_global_init();
scalar_t__ strcmp(unsigned char const *, char *);
void connector_global_init(const unsigned char *type) {
  if (strcmp(type, "webdav") == 0)
    connector_webdav_global_init();
  else if (strcmp(type, "ftp") == 0)
    connector_ftp_global_init();
}


x86 assembly (clang, -O0):
<connector_global_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1162 <connector_global_init+0x32>
mov    $0x0,%al
call   1050 <connector_webdav_global_init@plt>
jmp    1188 <connector_global_init+0x58>
mov    -0x8(%rbp),%rdi
lea    0xe9a(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1183 <connector_global_init+0x53>
mov    $0x0,%al
call   1030 <connector_ftp_global_init@plt>
jmp    1188 <connector_global_init+0x58>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<connector_global_init>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1040 <strcmp@plt>
test   %rax,%rax
je     115b <connector_global_init+0x2b>
lea    0xebb(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     1163 <connector_global_init+0x33>
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1050 <connector_webdav_global_init@plt>
xor    %eax,%eax
pop    %rbx
jmp    1030 <connector_ftp_global_init@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"webdav\00"
@.str.1 = [4 x i8] c"ftp\00"
define void @connector_global_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @connector_webdav_global_init()
br label %15
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @connector_ftp_global_init()
br label %14
14: ; preds = %12, %8
br label %15
15: ; preds = %14, %6
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"webdav\00"
@.str.1 = [4 x i8] c"ftp\00"
define void @connector_global_init(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @connector_webdav_global_init()
br label %11
6: ; preds = %1
%7 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = tail call i32 (...) @connector_ftp_global_init()
br label %11
11: ; preds = %6, %9, %4
ret void
}