// File: /workspace/github_c_makefile_star2_O2/JulStrat[P]bams/bams_ptr_app.c
// Function: main
int
main(int argc, char *argv[])
{
    BAMS *bas;
    char **keys;
    size_t bas_sz = 0;
    int i;

    /*
     * for (i = 1; i < argc; i++) { printf("%s\n", argv[i]); } 
     */
    bas = bams_create(0, cmp_str);
    for (i = 1; i < argc; i++) {
        bams_insert(bas, argv[i]);
    }
    keys = bams_array(bas, &bas_sz);
    for (i = 0; i < bas_sz; i++)
        printf("%s\n", keys[i]);

    printf("Min key: %s\n", bams_min(bas));
    printf("Max key: %s\n", bams_max(bas));

    free(keys);

    printf("Set size: %lu\n", bams_size(bas));
    printf("Check structure result: %d\n", bams_check_structure(bas));

    bams_clear(bas);

    for (i = 1; i < argc; i++) {
        bams_insert(bas, argv[i]);
    }
    keys = bams_array(bas, &bas_sz);
    for (i = 0; i < bas_sz; i++)
        printf("%s\n", keys[i]);

    printf("Min key: %s\n", bams_min(bas));
    printf("Max key: %s\n", bams_max(bas));

    free(keys);

    printf("Set size: %lu\n", bams_size(bas));
    printf("Check structure result: %d\n", bams_check_structure(bas));

    bams_free(bas);
    /*
     * qsort(&argv[1], argc-1, sizeof (char *), cmp_str); for (i = 1; i <
     * argc; i++) { printf("%s\n", argv[i]); } 
     */
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
andq $0x0, (%rsp)
leaq -0x27(%rip), %rsi       # 0x11ac
xorl %edi, %edi
callq 0x173e
movq %rax, %rbx
movslq %ebp, %r12
pushq $0x1
popq %r15
cmpq %r12, %r15
jge 0x11fa
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
callq 0x179f
incq %r15
jmp 0x11e4
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x219d
movq %rax, %r15
xorl %r13d, %r13d
cmpq %r13, (%rsp)
jbe 0x121f
movq (%r15,%r13,8), %rdi
callq 0x1040
incq %r13
jmp 0x120b
movq %rbx, %rdi
callq 0x18d7
leaq 0x1dd6(%rip), %rdi      # 0x3004
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x198b
leaq 0x1dca(%rip), %rdi      # 0x3011
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x222d
leaq 0x1db6(%rip), %rdi      # 0x301e
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x2310
leaq 0x1dac(%rip), %rdi      # 0x302d
movl %eax, %esi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x2257
pushq $0x1
popq %r15
cmpq %r12, %r15
jge 0x12ac
movq (%r14,%r15,8), %rsi
movq %rbx, %rdi
callq 0x179f
incq %r15
jmp 0x1296
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x219d
movq %rax, %r14
xorl %r15d, %r15d
cmpq %r15, (%rsp)
jbe 0x12d1
movq (%r14,%r15,8), %rdi
callq 0x1040
incq %r15
jmp 0x12bd
movq %rbx, %rdi
callq 0x18d7
leaq 0x1d24(%rip), %rdi      # 0x3004
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x198b
leaq 0x1d18(%rip), %rdi      # 0x3011
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movq %r14, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x222d
leaq 0x1d04(%rip), %rdi      # 0x301e
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x2310
leaq 0x1cfa(%rip), %rdi      # 0x302d
movl %eax, %esi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x22b5
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)