#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 */
struct section {
  int dummy;
};
struct configuration {
  int dummy;
};

/* Variables and functions */
struct section *get_configuration_section(char const *,
                                          struct configuration const *);
char **get_section_values_delimiter(char const *, struct section const *,
                                    char const *);
char **get_configuration_values_delimiter(const char *key, const char *section,
                                          const struct configuration *cfg,
                                          const char *delim) {
  const struct section *section_ptr;
  if (key == NULL || section == NULL || cfg == NULL || delim == NULL) {
    return NULL;
  }
  section_ptr = get_configuration_section(section, cfg);
  if (section_ptr != NULL) {
    return get_section_values_delimiter(key, section_ptr, delim);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<get_configuration_values_delimiter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1164 <get_configuration_values_delimiter+0x44>
cmpq   $0x0,-0x18(%rbp)
je     1164 <get_configuration_values_delimiter+0x44>
cmpq   $0x0,-0x20(%rbp)
je     1164 <get_configuration_values_delimiter+0x44>
cmpq   $0x0,-0x28(%rbp)
jne    1171 <get_configuration_values_delimiter+0x51>
movq   $0x0,-0x8(%rbp)
jmp    11af <get_configuration_values_delimiter+0x8f>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <get_configuration_section@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     11a7 <get_configuration_values_delimiter+0x87>
mov    -0x10(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <get_section_values_delimiter@plt>
mov    %rax,-0x8(%rbp)
jmp    11af <get_configuration_values_delimiter+0x8f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_configuration_values_delimiter>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1163 <get_configuration_values_delimiter+0x43>
test   %rsi,%rsi
je     1163 <get_configuration_values_delimiter+0x43>
test   %rdx,%rdx
je     1163 <get_configuration_values_delimiter+0x43>
mov    %rcx,%r14
test   %rcx,%rcx
je     1163 <get_configuration_values_delimiter+0x43>
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <get_configuration_section@plt>
test   %rax,%rax
je     1163 <get_configuration_values_delimiter+0x43>
mov    %rbx,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <get_section_values_delimiter@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.configuration = type { i32 }
%struct.section = type { i32 }
define i8** @get_configuration_values_delimiter(i8* %0, i8* %1, %struct.configuration* %2, i8* %3) {
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca %struct.configuration*
%9 = alloca i8*
%10 = alloca %struct.section*
store i8* %0, i8** %6
store i8* %1, i8** %7
store %struct.configuration* %2, %struct.configuration** %8
store i8* %3, i8** %9
%11 = load i8*, i8** %6
%12 = icmp eq i8* %11, null
br i1 %12, label %22, label %13
13: ; preds = %4
%14 = load i8*, i8** %7
%15 = icmp eq i8* %14, null
br i1 %15, label %22, label %16
16: ; preds = %13
%17 = load %struct.configuration*, %struct.configuration** %8
%18 = icmp eq %struct.configuration* %17, null
br i1 %18, label %22, label %19
19: ; preds = %16
%20 = load i8*, i8** %9
%21 = icmp eq i8* %20, null
br i1 %21, label %22, label %23
22: ; preds = %19, %16, %13, %4
store i8** null, i8*** %5
br label %35
23: ; preds = %19
%24 = load i8*, i8** %7
%25 = load %struct.configuration*, %struct.configuration** %8
%26 = call %struct.section* @get_configuration_section(i8* %24, %struct.configuration* %25)
store %struct.section* %26, %struct.section** %10
%27 = load %struct.section*, %struct.section** %10
%28 = icmp ne %struct.section* %27, null
br i1 %28, label %29, label %34
29: ; preds = %23
%30 = load i8*, i8** %6
%31 = load %struct.section*, %struct.section** %10
%32 = load i8*, i8** %9
%33 = call i8** @get_section_values_delimiter(i8* %30, %struct.section* %31, i8* %32)
store i8** %33, i8*** %5
br label %35
34: ; preds = %23
store i8** null, i8*** %5
br label %35
35: ; preds = %34, %29, %22
%36 = load i8**, i8*** %5
ret i8** %36
}

LLVM IR (-O2):
%struct.configuration = type { i32 }
%struct.section = type { i32 }
define i8** @get_configuration_values_delimiter(i8* %0, i8* %1, %struct.configuration* %2, i8* %3) {
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
%8 = icmp eq %struct.configuration* %2, null
%9 = or i1 %7, %8
%10 = icmp eq i8* %3, null
%11 = or i1 %9, %10
br i1 %11, label %17, label %12
12: ; preds = %4
%13 = tail call %struct.section* @get_configuration_section(i8* %1, %struct.configuration* %2)
%14 = icmp eq %struct.section* %13, null
br i1 %14, label %17, label %15
15: ; preds = %12
%16 = tail call i8** @get_section_values_delimiter(i8* %0, %struct.section* %13, i8* %3)
br label %17
17: ; preds = %12, %4, %15
%18 = phi i8** [ %16, %15 ], [ null, %4 ], [ null, %12 ]
ret i8** %18
}