#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*/ dummy_config(char const *, char const *, char const *,
                                char const *);
int /*<<< orphan*/ ical_config(char const *, char const *, char const *,
                               char const *);
scalar_t__ match(char const *, char *);
void cal_config(const char *group, const char *name, const char *key,
                const char *value) {
  if (match(group, "dummy"))
    dummy_config(group, name, key, value);
  else if (match(group, "ical"))
    ical_config(group, name, key, value);
}


x86 assembly (clang, -O0):
<cal_config>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xead(%rip),%rsi
call   1040 <match@plt>
cmp    $0x0,%rax
je     117c <cal_config+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1050 <dummy_config@plt>
jmp    11b0 <cal_config+0x80>
mov    -0x8(%rbp),%rdi
lea    0xe7f(%rip),%rsi
call   1040 <match@plt>
cmp    $0x0,%rax
je     11ab <cal_config+0x7b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <ical_config@plt>
jmp    11b0 <cal_config+0x80>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cal_config>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xeb5(%rip),%rsi
call   1040 <match@plt>
test   %rax,%rax
je     1171 <cal_config+0x41>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <dummy_config@plt>
lea    0xe8e(%rip),%rsi
mov    %rbx,%rdi
call   1040 <match@plt>
test   %rax,%rax
je     11a1 <cal_config+0x71>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <ical_config@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"dummy\00"
@.str.1 = [5 x i8] c"ical\00"
define void @cal_config(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = call i64 @match(i8* %9, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %4
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = load i8*, i8** %7
%16 = load i8*, i8** %8
%17 = call i32 @dummy_config(i8* %13, i8* %14, i8* %15, i8* %16)
br label %29
18: ; preds = %4
%19 = load i8*, i8** %5
%20 = call i64 @match(i8* %19, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %18
%23 = load i8*, i8** %5
%24 = load i8*, i8** %6
%25 = load i8*, i8** %7
%26 = load i8*, i8** %8
%27 = call i32 @ical_config(i8* %23, i8* %24, i8* %25, i8* %26)
br label %28
28: ; preds = %22, %18
br label %29
29: ; preds = %28, %12
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"dummy\00"
@.str.1 = [5 x i8] c"ical\00"
define void @cal_config(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i64 @match(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @dummy_config(i8* %0, i8* %1, i8* %2, i8* %3)
br label %14
9: ; preds = %4
%10 = tail call i64 @match(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %9
%13 = tail call i32 @ical_config(i8* %0, i8* %1, i8* %2, i8* %3)
br label %14
14: ; preds = %9, %12, %7
ret void
}