#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 */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int rrd_fetch_r(char *, char const *, int /*<<< orphan*/ *,
                int /*<<< orphan*/ *, unsigned long *, unsigned long *,
                char ***, double **);
char const *rrd_strerror(int);
const char *rrdFetch(int *ret, char *filename, const char *cf, time_t *start,
                     time_t *end, unsigned long *step, unsigned long *ds_cnt,
                     char ***ds_namv, double **data) {
  *ret = rrd_fetch_r(filename, cf, start, end, step, ds_cnt, ds_namv, data);
  return rrd_strerror(*ret);
}


x86 assembly (clang, -O0):
<rrdFetch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    0x10(%rbp),%r9
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <rrd_fetch_r@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1040 <rrd_strerror@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrdFetch>:
push   %rbx
sub    $0x10,%rsp
mov    %r9,%rax
mov    %rdi,%rbx
mov    0x20(%rsp),%r9
movups 0x28(%rsp),%xmm0
movups %xmm0,(%rsp)
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
mov    %rax,%r8
call   1030 <rrd_fetch_r@plt>
mov    %eax,(%rbx)
mov    %eax,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1040 <rrd_strerror@plt>

LLVM IR (-O0):
define i8* @rrdFetch(i32* %0, i8* %1, i8* %2, i32* %3, i32* %4, i64* %5, i64* %6, i8*** %7, double** %8) {
%10 = alloca i32*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i64*
%16 = alloca i64*
%17 = alloca i8***
%18 = alloca double**
store i32* %0, i32** %10
store i8* %1, i8** %11
store i8* %2, i8** %12
store i32* %3, i32** %13
store i32* %4, i32** %14
store i64* %5, i64** %15
store i64* %6, i64** %16
store i8*** %7, i8**** %17
store double** %8, double*** %18
%19 = load i8*, i8** %11
%20 = load i8*, i8** %12
%21 = load i32*, i32** %13
%22 = load i32*, i32** %14
%23 = load i64*, i64** %15
%24 = load i64*, i64** %16
%25 = load i8***, i8**** %17
%26 = load double**, double*** %18
%27 = call i32 @rrd_fetch_r(i8* %19, i8* %20, i32* %21, i32* %22, i64* %23, i64* %24, i8*** %25, double** %26)
%28 = load i32*, i32** %10
store i32 %27, i32* %28
%29 = load i32*, i32** %10
%30 = load i32, i32* %29
%31 = call i8* @rrd_strerror(i32 %30)
ret i8* %31
}

LLVM IR (-O2):
define i8* @rrdFetch(i32* nocapture writeonly %0, i8* %1, i8* %2, i32* %3, i32* %4, i64* %5, i64* %6, i8*** %7, double** %8) {
%10 = tail call i32 @rrd_fetch_r(i8* %1, i8* %2, i32* %3, i32* %4, i64* %5, i64* %6, i8*** %7, double** %8)
store i32 %10, i32* %0
%11 = tail call i8* @rrd_strerror(i32 %10)
ret i8* %11
}