#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 range {
  int dummy;
};
struct genomeRangeTree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ genomeRangeTreeFindOrAddRangeTree(struct genomeRangeTree *,
                                                     char *);
struct range *rangeTreeAddVal(int /*<<< orphan*/, int, int, void *,
                              void *(*)(void *, void *));
struct range *genomeRangeTreeAddVal(struct genomeRangeTree *tree, char *chrom,
                                    int start, int end, void *val,
                                    void *(*mergeVals)(void *existing,
                                                       void *new)) {
  return rangeTreeAddVal(genomeRangeTreeFindOrAddRangeTree(tree, chrom), start,
                         end, val, mergeVals);
}


x86 assembly (clang, -O0):
<genomeRangeTreeAddVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <genomeRangeTreeFindOrAddRangeTree@plt>
mov    %eax,%edi
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <rangeTreeAddVal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genomeRangeTreeAddVal>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %ecx,%ebp
mov    %edx,%ebx
call   1030 <genomeRangeTreeFindOrAddRangeTree@plt>
mov    %eax,%edi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r15,%rcx
mov    %r14,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <rangeTreeAddVal@plt>

LLVM IR (-O0):
%struct.range = type { i32 }
%struct.genomeRangeTree = type { i32 }
define %struct.range* @genomeRangeTreeAddVal(%struct.genomeRangeTree* %0, i8* %1, i32 %2, i32 %3, i8* %4, i8* (i8*, i8*)* %5) {
%7 = alloca %struct.genomeRangeTree*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i8* (i8*, i8*)*
store %struct.genomeRangeTree* %0, %struct.genomeRangeTree** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i8* (i8*, i8*)* %5, i8* (i8*, i8*)** %12
%13 = load %struct.genomeRangeTree*, %struct.genomeRangeTree** %7
%14 = load i8*, i8** %8
%15 = call i32 @genomeRangeTreeFindOrAddRangeTree(%struct.genomeRangeTree* %13, i8* %14)
%16 = load i32, i32* %9
%17 = load i32, i32* %10
%18 = load i8*, i8** %11
%19 = load i8* (i8*, i8*)*, i8* (i8*, i8*)** %12
%20 = call %struct.range* @rangeTreeAddVal(i32 %15, i32 %16, i32 %17, i8* %18, i8* (i8*, i8*)* %19)
ret %struct.range* %20
}

LLVM IR (-O2):
%struct.range = type { i32 }
%struct.genomeRangeTree = type { i32 }
define %struct.range* @genomeRangeTreeAddVal(%struct.genomeRangeTree* %0, i8* %1, i32 %2, i32 %3, i8* %4, i8* (i8*, i8*)* %5) {
%7 = tail call i32 @genomeRangeTreeFindOrAddRangeTree(%struct.genomeRangeTree* %0, i8* %1)
%8 = tail call %struct.range* @rangeTreeAddVal(i32 %7, i32 %2, i32 %3, i8* %4, i8* (i8*, i8*)* %5)
ret %struct.range* %8
}