// File: /workspace/github_c_makefile_star2_O0/xapi-project[P]rrd-client-lib/rrdtest.c
// Function: main
int
main(int argc, char **argv)
{
    RRD_PLUGIN     *plugin;
    int             rc;

    if (argc != 1) {
        fprintf(stderr, "usage: %s\n", basename(argv[0]));
        exit(1);
    }

    plugin = rrd_open("rrdtest", RRD_LOCAL_DOMAIN, "rrdtest.rrd");
    assert(plugin);

    src[0].name = "first";
    src[0].description = "description";
    src[0].owner = RRD_HOST;
    src[0].owner_uuid = "4cc1f2e0-5405-11e6-8c2f-572fc76ac144";
    src[0].rrd_units = "points";
    src[0].scale = RRD_GAUGE;
    src[0].type = RRD_INT64;
    src[0].min = "-inf";
    src[0].max = "inf";
    src[0].rrd_default = 1;
    src[0].sample = sample;
    src[0].userdata = &src[0];

    printf("adding source: %s\n", src[0].name);
    rrd_add_src(plugin, &src[0]);
    rc = rrd_sample(plugin, NULL);
    assert(rc == RRD_OK);

    src[1].name = "second";
    src[1].description = "description";
    src[1].owner = RRD_HOST;
    src[1].owner_uuid = "e8969702-5414-11e6-8cf5-47824be728c3";
    src[1].rrd_units = "points";
    src[1].scale = RRD_ABSOLUTE;
    src[1].type = RRD_INT64;
    src[1].min = "-inf";
    src[1].max = "inf";
    src[1].rrd_default = 1;
    src[1].sample = sample;
    src[1].userdata = &src[1];

    printf("adding source: %s\n", src[1].name);
    rrd_add_src(plugin, &src[1]);
    rc = rrd_sample(plugin, NULL);
    assert(rc == RRD_OK);

    printf("removing source: %s\n", src[0].name);
    rrd_del_src(plugin, &src[0]);
    rc = rrd_sample(plugin, NULL);
    assert(rc == RRD_OK);

    printf("removing source: %s\n", src[1].name);
    rrd_del_src(plugin, &src[1]);
    rrd_close(plugin);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x1, -0x8(%rbp)
je 0x13e5
movq 0xbc45(%rip), %rax      # 0xcff8
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x11f0
movq -0x28(%rbp), %rdi
movq %rax, %rdx
leaq 0x7c30(%rip), %rsi      # 0x9004
movb $0x0, %al
callq 0x11c0
movl $0x1, %edi
callq 0x1260
leaq 0x7c23(%rip), %rdi      # 0x900f
xorl %esi, %esi
leaq 0x7c22(%rip), %rdx      # 0x9017
callq 0x1780
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1407
jmp 0x1426
leaq 0x7c15(%rip), %rdi      # 0x9023
leaq 0x7c15(%rip), %rsi      # 0x902a
movl $0x46, %edx
leaq 0x7c13(%rip), %rcx      # 0x9034
callq 0x1160
leaq 0x7c1e(%rip), %rax      # 0x904b
movq %rax, 0xbdec(%rip)      # 0xd220
leaq 0x7c16(%rip), %rax      # 0x9051
movq %rax, 0xbde6(%rip)      # 0xd228
movl $0x0, 0xbe14(%rip)      # 0xd260
leaq 0x7c0a(%rip), %rax      # 0x905d
movq %rax, 0xbdd6(%rip)      # 0xd230
leaq 0x7c21(%rip), %rax      # 0x9082
movq %rax, 0xbdd0(%rip)      # 0xd238
movl $0x0, 0xbdf6(%rip)      # 0xd268
movl $0x1, 0xbdf0(%rip)      # 0xd26c
leaq 0x7c06(%rip), %rax      # 0x9089
movq %rax, 0xbdb6(%rip)      # 0xd240
leaq 0x7bf9(%rip), %rax      # 0x908a
movq %rax, 0xbdb0(%rip)      # 0xd248
movl $0x1, 0xbdc2(%rip)      # 0xd264
leaq 0x207(%rip), %rax       # 0x16b0
movq %rax, 0xbda0(%rip)      # 0xd250
leaq 0xbd69(%rip), %rax      # 0xd220
movq %rax, 0xbd9a(%rip)      # 0xd258
movq 0xbd5b(%rip), %rsi      # 0xd220
leaq 0x7bc2(%rip), %rdi      # 0x908e
movb $0x0, %al
callq 0x1110
movq -0x18(%rbp), %rdi
leaq 0xbd42(%rip), %rsi      # 0xd220
callq 0x1e50
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1ff0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x14fb
jmp 0x151a
leaq 0x7b9f(%rip), %rdi      # 0x90a1
leaq 0x7b21(%rip), %rsi      # 0x902a
movl $0x58, %edx
leaq 0x7b1f(%rip), %rcx      # 0x9034
callq 0x1160
leaq 0x7b8d(%rip), %rax      # 0x90ae
movq %rax, 0xbd48(%rip)      # 0xd270
leaq 0x7b22(%rip), %rax      # 0x9051
movq %rax, 0xbd42(%rip)      # 0xd278
movl $0x0, 0xbd70(%rip)      # 0xd2b0
leaq 0x7b6e(%rip), %rax      # 0x90b5
movq %rax, 0xbd32(%rip)      # 0xd280
leaq 0x7b2d(%rip), %rax      # 0x9082
movq %rax, 0xbd2c(%rip)      # 0xd288
movl $0x1, 0xbd52(%rip)      # 0xd2b8
movl $0x1, 0xbd4c(%rip)      # 0xd2bc
leaq 0x7b12(%rip), %rax      # 0x9089
movq %rax, 0xbd12(%rip)      # 0xd290
leaq 0x7b05(%rip), %rax      # 0x908a
movq %rax, 0xbd0c(%rip)      # 0xd298
movl $0x1, 0xbd1e(%rip)      # 0xd2b4
leaq 0x113(%rip), %rax       # 0x16b0
movq %rax, 0xbcfc(%rip)      # 0xd2a0
leaq 0xbc75(%rip), %rax      # 0xd220
addq $0x50, %rax
movq %rax, 0xbcf2(%rip)      # 0xd2a8
movq 0xbcb3(%rip), %rsi      # 0xd270
leaq 0x7aca(%rip), %rdi      # 0x908e
movb $0x0, %al
callq 0x1110
movq -0x18(%rbp), %rdi
leaq 0xbc4a(%rip), %rsi      # 0xd220
addq $0x50, %rsi
callq 0x1e50
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1ff0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x15f7
jmp 0x1616
leaq 0x7aa3(%rip), %rdi      # 0x90a1
leaq 0x7a25(%rip), %rsi      # 0x902a
movl $0x6a, %edx
leaq 0x7a23(%rip), %rcx      # 0x9034
callq 0x1160
movq 0xbc03(%rip), %rsi      # 0xd220
leaq 0x7ab6(%rip), %rdi      # 0x90da
movb $0x0, %al
callq 0x1110
movq -0x18(%rbp), %rdi
leaq 0xbbea(%rip), %rsi      # 0xd220
callq 0x1f30
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1ff0
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jne 0x1653
jmp 0x1672
leaq 0x7a47(%rip), %rdi      # 0x90a1
leaq 0x79c9(%rip), %rsi      # 0x902a
movl $0x6f, %edx
leaq 0x79c7(%rip), %rcx      # 0x9034
callq 0x1160
movq 0xbbf7(%rip), %rsi      # 0xd270
leaq 0x7a5a(%rip), %rdi      # 0x90da
movb $0x0, %al
callq 0x1110
movq -0x18(%rbp), %rdi
leaq 0xbb8e(%rip), %rsi      # 0xd220
addq $0x50, %rsi
callq 0x1f30
movq -0x18(%rbp), %rdi
callq 0x1dc0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)