// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq -0x59(%rip), %rsi       # 0x11a0
callq 0x1a90
movq %rax, -0x18(%rbp)
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1231
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x1b60
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1209
movq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2a00
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1278
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1da7(%rip), %rdi      # 0x300d
movb $0x0, %al
callq 0x1040
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1249
movq -0x18(%rbp), %rdi
callq 0x1dc0
movq %rax, %rsi
leaq 0x1d79(%rip), %rdi      # 0x3004
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x1ef0
movq %rax, %rsi
leaq 0x1d6c(%rip), %rdi      # 0x3011
movb $0x0, %al
callq 0x1040
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x2af0
movq %rax, %rsi
leaq 0x1d56(%rip), %rdi      # 0x301e
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x2c70
movl %eax, %esi
leaq 0x1d4c(%rip), %rdi      # 0x302d
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x2b40
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1320
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x1b60
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x12f8
movq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2a00
movq %rax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x1367
movq -0x20(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1cb8(%rip), %rdi      # 0x300d
movb $0x0, %al
callq 0x1040
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1338
movq -0x18(%rbp), %rdi
callq 0x1dc0
movq %rax, %rsi
leaq 0x1c8a(%rip), %rdi      # 0x3004
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x1ef0
movq %rax, %rsi
leaq 0x1c7d(%rip), %rdi      # 0x3011
movb $0x0, %al
callq 0x1040
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rdi
callq 0x2af0
movq %rax, %rsi
leaq 0x1c67(%rip), %rdi      # 0x301e
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x2c70
movl %eax, %esi
leaq 0x1c5d(%rip), %rdi      # 0x302d
movb $0x0, %al
callq 0x1040
movq -0x18(%rbp), %rdi
callq 0x2be0
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)