// File: /workspace/github_c_makefile_star2_O0/sonicse[P]dbf2mysql/dbf2mysql.c
// Function: do_inserts
void do_inserts(MYSQL *SQLsock, char *table, dbhead *dbh) {
    int result, i, j, nc = 0, h;
    field *fields;
    char *query, *vpos, *pos;
    char str[257], *cvt = NULL, *s;
    u_long val_len = 0;
    char *datafile = NULL;
    FILE *fconv, *tempfile = NULL;
    int quote_field;
    u_long val_used;
    int base_pos;

    /* Max Number of characters that can be stored before checking buffer size */
#define VAL_EXTRA 16

    if (convert != NULL) /* If specified conversion table */ {
        if ((fconv = fopen(convert, "rt")) == NULL)
            fprintf(stderr, "Cannot open convert file '%s'.\n", convert);
        else {
            nc = atoi(fgets(str, 256, fconv));
            if (verbose > 2)
                printf("Using conversion table '%s' with %d entries\n", convert, nc);
            if ((cvt = (char *) malloc(nc * 2 + 1)) == NULL) {
                fprintf(stderr, "Memory allocation error in do_inserts (cvt)\n");
                mysql_close(SQLsock);
                dbf_close(&dbh);
                exit(1);
            }
            for (i = 0, fgets(str, 256, fconv); (i < nc * 2) && (str != NULL); i++) {
                cvt[i++] = atoi(strtok(str, " \t"));
                cvt[i] = atoi(strtok(NULL, " \t"));
                fgets(str, 256, fconv);
            }
            cvt[i] = '\0';
        }
    }

    if (verbose > 2) {
        printf("Inserting records\n");
    }

    for (i = 0; i < dbh->db_nfields; i++) {
        switch (dbh->db_fields[i].db_type) {
            case 'M':
            case 'G':
                val_len += 2048;
                break;
            case 'T':
                val_len += 23;
                break;
            default:
                val_len += dbh->db_fields[i].db_flen * 2 + 3;
        }
    }

    if (!(query = (char *) malloc((express * 10) + 26 + strlen(table) + val_len + VAL_EXTRA))) {
        fprintf(stderr,
                "Memory allocation error in function do_inserts (query)\n");
        mysql_close(SQLsock);
        dbf_close(&dbh);
        exit(1);
    }
    if (!quick) {
        sprintf(query, "INSERT INTO `%s` VALUES (", table);
    } else
        if (express)
        strcat(query, "NULL,NULL,");
    else /* if specified -q create file for 'LOAD DATA' */ {
        datafile = tempnam("/tmp", "d2my");
        tempfile = fdopen(open(datafile, O_WRONLY | O_CREAT | O_EXCL,
                0600), "wt");
        if (tempfile == NULL || datafile == NULL) {
            fprintf(stderr, "Cannot open file '%s' for writing\n", datafile);
            return;
        }
        query[0] = '\0';
    }
    base_pos = strlen(query);

    if ((fields = dbf_build_record(dbh)) == (field *) DBF_ERROR) {
        fprintf(stderr, "Couldn't create memory structure for record\n");
        return;
    }

    for (i = 0; i < dbh->db_records; i++) {
        result = dbf_get_record(dbh, fields, i);
        if (result == DBF_VALID) {
            vpos = query + base_pos;
            val_used = 0;
            for (h = 0; h < dbh->db_nfields; h++) {
                /* if length of fieldname==0, skip it */
                if (!strlen(fields[h].db_name))
                    continue;
                if (fields[h].db_type == 'N' ||
                        fields[h].db_type == 'F' ||
                        fields[h].db_type == 'B' ||
                        fields[h].db_type == 'Y' ||
                        fields[h].db_type == 'I')
                    quote_field = 0;
                else
                    quote_field = 1;

                if (vpos != query + base_pos) {
                    *vpos++ = ',';
                    val_used++;
                }

                if (quick || quote_field) {
                    *vpos++ = '\'';
                    val_used++;
                }

                if (trim && quote_field) /* trim leading spaces */ {
                    for (pos = fields[h].db_contents; isspace(*pos) && (*pos != '\0');
                            pos++);
                    memmove(fields[h].db_contents, pos, strlen(pos) + 1);
                }
                if ((nc > 0) && (fields[h].db_type == 'C')) {
                    for (j = 0; fields[h].db_contents[j] != '\0'; j++) {
                        if ((s = strchr(cvt, fields[h].db_contents[j])) != NULL)
                            if ((s - cvt) % 2 == 0)
                                fields[h].db_contents[j] = s[1];
                    }
                }
                if (upper)
                    strtoupper(fields[h].db_contents);
                if (lower)
                    strtolower(fields[h].db_contents);

                for (pos = fields[h].db_contents; *pos; pos++) {
                    if (*pos == '\\' || *pos == '\'') {
                        *vpos++ = '\\';
                        val_used++;
                    }
                    *vpos++ = *pos;
                    val_used++;
                    if (val_used >= val_len) {
                        //			int	newsiz = (((val_used + strlen(pos) + VAL_EXTRA + base_pos + 4095)/4096)+1)*4096-16;
                        int newsiz = base_pos + val_used + strlen(pos) + VAL_EXTRA;
                        void *tmpptr = realloc(query, newsiz);
                        if (tmpptr == NULL) {
                            perror("out of memory in do_inserts");
                            mysql_close(SQLsock);
                            dbf_close(&dbh);
                            exit(1);
                        }
                        query = tmpptr;
                        vpos = query + base_pos + val_used;
                        val_len = newsiz - base_pos - VAL_EXTRA;
                    }
                }
                if (quote_field && !quick) {
                    *vpos++ = '\'';
                    val_used++;
                } else {
                    if (!fields[h].db_contents[0]) { /* Numeric field is null */
                        if (null_fields) {
                            strcpy(vpos, "NULL");
                            vpos += 4;
                            val_used += 4;
                        } else {
                            if (!quote_field) {
                                *vpos++ = '0';
                                val_used++;
                            }
                        }
                    }
                }
                if (quick) {
                    *vpos++ = '\'';
                    val_used++;
                }
            }
            if (!quick) {
                vpos[0] = ')'; /* End of values */
                vpos[1] = 0; /* End of query */
            } else
                vpos[0] = '\0';
            if ((verbose == 3) && ((i % 100) == 0)) {
                printf("Inserting record %d\n", i);
            }
            if (verbose > 3) {
                printf("Record %4d: %s\n", i, query);
            }

            if (!quick) {
                if (mysql_query(SQLsock, query) == -1) {
                    fprintf(stderr,
                            "Error sending INSERT in record %04d\n", i);
                    fprintf(stderr,
                            "Detailed report: %s\n",
                            mysql_error(SQLsock));
                    if (verbose > 1) {
                        fprintf(stderr, "%s\n", query);
                    }
                }
            } else {
                if (express)
                    fprintf(tempfile, "NULL,NULL,%s\n", query);
                else
                    fprintf(tempfile, "%s\n", query);
            }
        }
    }

    dbf_free_record(dbh, fields);

    free(query);
    if (nc > 0)
        free(cvt);

    if (quick) {
        fclose(tempfile);
        query = str;
        sprintf(query, "LOAD DATA LOCAL INFILE '%s' REPLACE INTO table %s fields terminated by ',' enclosed by ''''",
                datafile, table);
        if (verbose > 1) {
            fprintf(stderr, "%s\n", query);
        }
        if (mysql_query(SQLsock, query) == -1) {
            fprintf(stderr,
                    "Error sending LOAD DATA INFILE from file '%s'\n", datafile);
            fprintf(stderr,
                    "Detailed report: %s\n",
                    mysql_error(SQLsock));
        }
        if (unlink(datafile) == -1) {
            fprintf(stderr, "Error while removing temporary file '%s'.\n", datafile);
        }
        free(datafile);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x28(%rbp)
movq $0x0, -0x168(%rbp)
movq $0x0, -0x178(%rbp)
movq $0x0, -0x180(%rbp)
movq $0x0, -0x190(%rbp)
cmpq $0x0, 0x841e(%rip)      # 0xb300
je 0x30ab
movq 0x8411(%rip), %rdi      # 0xb300
leaq 0x5699(%rip), %rsi      # 0x858f
callq 0x2200
movq %rax, -0x188(%rbp)
cmpq $0x0, %rax
jne 0x2f2c
movq 0x80c9(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq 0x83e7(%rip), %rdx      # 0xb300
leaq 0x5672(%rip), %rsi      # 0x8592
movb $0x0, %al
callq 0x2290
jmp 0x30a9
leaq -0x160(%rbp), %rdi
movq -0x188(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x22f0
movq %rax, %rdi
callq 0x22d0
movl %eax, -0x28(%rbp)
cmpl $0x2, 0x8352(%rip)      # 0xb2a8
jle 0x2f70
movq 0x83a1(%rip), %rsi      # 0xb300
movl -0x28(%rbp), %edx
leaq 0x5649(%rip), %rdi      # 0x85b2
movb $0x0, %al
callq 0x2050
movl -0x28(%rbp), %eax
shll %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x2260
movq %rax, -0x168(%rbp)
cmpq $0x0, %rax
jne 0x2fc1
movq 0x8044(%rip), %rax      # 0xafd8
movq (%rax), %rdi
leaq 0x5641(%rip), %rsi      # 0x85df
movb $0x0, %al
callq 0x2290
movq -0x8(%rbp), %rdi
callq 0x2270
leaq -0x18(%rbp), %rdi
callq 0x5030
movl $0x1, %edi
callq 0x2230
movl $0x0, -0x20(%rbp)
leaq -0x160(%rbp), %rdi
movq -0x188(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x22f0
movl -0x20(%rbp), %ecx
movl -0x28(%rbp), %edx
shll %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x1b1(%rbp)
jge 0x3008
leaq -0x160(%rbp), %rax
cmpq $0x0, %rax
setne %al
movb %al, -0x1b1(%rbp)
movb -0x1b1(%rbp), %al
testb $0x1, %al
jne 0x3017
jmp 0x309a
leaq -0x160(%rbp), %rdi
leaq 0x55e7(%rip), %rsi      # 0x860c
callq 0x22e0
movq %rax, %rdi
callq 0x22d0
movb %al, %dl
movq -0x168(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
xorl %eax, %eax
movl %eax, %edi
leaq 0x55b5(%rip), %rsi      # 0x860c
callq 0x22e0
movq %rax, %rdi
callq 0x22d0
movb %al, %dl
movq -0x168(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb %dl, (%rax,%rcx)
leaq -0x160(%rbp), %rdi
movq -0x188(%rbp), %rdx
movl $0x100, %esi            # imm = 0x100
callq 0x22f0
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x2fe0
movq -0x168(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
jmp 0x30ab
cmpl $0x2, 0x81f6(%rip)      # 0xb2a8
jle 0x30c2
leaq 0x5554(%rip), %rdi      # 0x860f
movb $0x0, %al
callq 0x2050
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x32(%rcx), %ecx
cmpl %ecx, %eax
jge 0x3182
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x20(%rbp), %rcx
leaq (%rcx,%rcx,4), %rcx
leaq (%rcx,%rcx,2), %rcx
movzbl 0xb(%rax,%rcx), %eax
movl %eax, -0x1b8(%rbp)
subl $0x47, %eax
je 0x311c
jmp 0x3102
movl -0x1b8(%rbp), %eax
subl $0x4d, %eax
je 0x311c
jmp 0x310f
movl -0x1b8(%rbp), %eax
subl $0x54, %eax
je 0x3132
jmp 0x3146
movq -0x178(%rbp), %rax
addq $0x800, %rax            # imm = 0x800
movq %rax, -0x178(%rbp)
jmp 0x3172
movq -0x178(%rbp), %rax
addq $0x17, %rax
movq %rax, -0x178(%rbp)
jmp 0x3172
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x20(%rbp), %rcx
imulq $0xf, %rcx, %rcx
addq %rcx, %rax
movzbl 0xc(%rax), %eax
shll %eax
addl $0x3, %eax
cltq
addq -0x178(%rbp), %rax
movq %rax, -0x178(%rbp)
jmp 0x3174
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x30c9
imull $0xa, 0x8133(%rip), %eax # 0xb2bc
addl $0x1a, %eax
cltq
movq %rax, -0x1c0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x20c0
movq -0x1c0(%rbp), %rdi
addq %rax, %rdi
addq -0x178(%rbp), %rdi
addq $0x10, %rdi
callq 0x2260
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
jne 0x31f6
movq 0x7e0f(%rip), %rax      # 0xafd8
movq (%rax), %rdi
leaq 0x544f(%rip), %rsi      # 0x8622
movb $0x0, %al
callq 0x2290
movq -0x8(%rbp), %rdi
callq 0x2270
leaq -0x18(%rbp), %rdi
callq 0x5030
movl $0x1, %edi
callq 0x2230
cmpl $0x0, 0x80cb(%rip)      # 0xb2c8
jne 0x321a
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rdx
leaq 0x544c(%rip), %rsi      # 0x865a
movb $0x0, %al
callq 0x2060
jmp 0x32c0
cmpl $0x0, 0x809b(%rip)      # 0xb2bc
je 0x3238
movq -0x40(%rbp), %rdi
leaq 0x5446(%rip), %rsi      # 0x8674
callq 0x2340
jmp 0x32be
leaq 0x5440(%rip), %rdi      # 0x867f
leaq 0x543e(%rip), %rsi      # 0x8684
callq 0x2330
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
movl $0xc1, %esi
movl $0x180, %edx            # imm = 0x180
movb $0x0, %al
callq 0x2140
movl %eax, %edi
leaq 0x5416(%rip), %rsi      # 0x8689
callq 0x21d0
movq %rax, -0x190(%rbp)
cmpq $0x0, -0x190(%rbp)
je 0x3293
cmpq $0x0, -0x180(%rbp)
jne 0x32b7
movq 0x7d3e(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq -0x180(%rbp), %rdx
leaq 0x53e1(%rip), %rsi      # 0x868c
movb $0x0, %al
callq 0x2290
jmp 0x3b64
movq -0x40(%rbp), %rax
movb $0x0, (%rax)
jmp 0x32c0
movq -0x40(%rbp), %rdi
callq 0x20c0
movl %eax, -0x1a4(%rbp)
movq -0x18(%rbp), %rdi
callq 0x67e0
movq %rax, -0x38(%rbp)
movq $-0x1, %rcx
cmpq %rcx, %rax
jne 0x3305
movq 0x7ce9(%rip), %rax      # 0xafd8
movq (%rax), %rdi
leaq 0x53b6(%rip), %rsi      # 0x86af
movb $0x0, %al
callq 0x2290
jmp 0x3b64
movl $0x0, -0x20(%rbp)
movslq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x3a37
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
movslq -0x20(%rbp), %rdx
callq 0x55e0
movl %eax, -0x1c(%rbp)
cmpl $0x20, -0x1c(%rbp)
jne 0x3a27
movq -0x40(%rbp), %rax
movslq -0x1a4(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x1a0(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
movzbl 0x32(%rcx), %ecx
cmpl %ecx, %eax
jge 0x38e8
movq -0x38(%rbp), %rdi
movslq -0x2c(%rbp), %rax
shlq $0x5, %rax
addq %rax, %rdi
callq 0x20c0
cmpq $0x0, %rax
jne 0x3392
jmp 0x38da
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0xb(%rax), %eax
cmpl $0x4e, %eax
je 0x340a
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0xb(%rax), %eax
cmpl $0x46, %eax
je 0x340a
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0xb(%rax), %eax
cmpl $0x42, %eax
je 0x340a
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0xb(%rax), %eax
cmpl $0x59, %eax
je 0x340a
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0xb(%rax), %eax
cmpl $0x49, %eax
jne 0x3416
movl $0x0, -0x194(%rbp)
jmp 0x3420
movl $0x1, -0x194(%rbp)
movq -0x48(%rbp), %rax
movq -0x40(%rbp), %rcx
movslq -0x1a4(%rbp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x345b
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x2c, (%rax)
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
cmpl $0x0, 0x7e66(%rip)      # 0xb2c8
jne 0x346d
cmpl $0x0, -0x194(%rbp)
je 0x3491
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x27, (%rax)
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
cmpl $0x0, 0x7e2c(%rip)      # 0xb2c4
je 0x3562
cmpl $0x0, -0x194(%rbp)
je 0x3562
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
callq 0x21e0
movq (%rax), %rax
movq -0x50(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %ecx
andl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x1c1(%rbp)
je 0x34fe
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1c1(%rbp)
movb -0x1c1(%rbp), %al
testb $0x1, %al
jne 0x350a
jmp 0x351a
jmp 0x350c
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x34c2
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, -0x1d8(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x50(%rbp), %rdi
callq 0x20c0
movq -0x1d8(%rbp), %rdi
movq -0x1d0(%rbp), %rsi
movq %rax, %rdx
addq $0x1, %rdx
callq 0x2310
cmpl $0x0, -0x28(%rbp)
jle 0x3640
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0xb(%rax), %eax
cmpl $0x43, %eax
jne 0x3640
movl $0x0, -0x24(%rbp)
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x363e
movq -0x168(%rbp), %rdi
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq 0x20a0
movq %rax, -0x170(%rbp)
cmpq $0x0, %rax
je 0x362e
movq -0x170(%rbp), %rax
movq -0x168(%rbp), %rcx
subq %rcx, %rax
movl $0x2, %ecx
cqto
idivq %rcx
cmpq $0x0, %rdx
jne 0x362c
movq -0x170(%rbp), %rax
movb 0x1(%rax), %dl
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movslq -0x24(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0x362e
jmp 0x3630
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x358f
jmp 0x3640
cmpl $0x0, 0x7c65(%rip)      # 0xb2ac
je 0x3661
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x7100
cmpl $0x0, 0x7c48(%rip)      # 0xb2b0
je 0x3682
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0x7140
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpb $0x0, (%rax)
je 0x37ec
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
je 0x36be
movq -0x50(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x36e2
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x5c, (%rax)
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
movq -0x50(%rbp), %rax
movb (%rax), %cl
movq -0x48(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x48(%rbp)
movb %cl, (%rax)
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rax
cmpq -0x178(%rbp), %rax
jb 0x37d9
movslq -0x1a4(%rbp), %rax
addq -0x1a0(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x50(%rbp), %rdi
callq 0x20c0
movq %rax, %rcx
movq -0x1e0(%rbp), %rax
addq %rcx, %rax
addq $0x10, %rax
movl %eax, -0x1a8(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x1a8(%rbp), %rsi
callq 0x2320
movq %rax, -0x1b0(%rbp)
cmpq $0x0, -0x1b0(%rbp)
jne 0x379d
leaq 0x4f60(%rip), %rdi      # 0x86dc
callq 0x2160
movq -0x8(%rbp), %rdi
callq 0x2270
leaq -0x18(%rbp), %rdi
callq 0x5030
movl $0x1, %edi
callq 0x2230
movq -0x1b0(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movslq -0x1a4(%rbp), %rcx
addq %rcx, %rax
addq -0x1a0(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x1a8(%rbp), %eax
subl -0x1a4(%rbp), %eax
subl $0x10, %eax
cltq
movq %rax, -0x178(%rbp)
jmp 0x37db
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x3699
cmpl $0x0, -0x194(%rbp)
je 0x3827
cmpl $0x0, 0x7acc(%rip)      # 0xb2c8
jne 0x3827
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x27, (%rax)
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
jmp 0x38ab
movq -0x38(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
cmpb $0x0, (%rax)
jne 0x38a9
cmpl $0x0, 0x7a7a(%rip)      # 0xb2c0
je 0x3878
movq -0x48(%rbp), %rdi
leaq 0x4ea5(%rip), %rsi      # 0x86f8
callq 0x2190
movq -0x48(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x48(%rbp)
movq -0x1a0(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x1a0(%rbp)
jmp 0x38a7
cmpl $0x0, -0x194(%rbp)
jne 0x38a5
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x30, (%rax)
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
jmp 0x38a7
jmp 0x38a9
jmp 0x38ab
cmpl $0x0, 0x7a16(%rip)      # 0xb2c8
je 0x38d8
movq -0x48(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x48(%rbp)
movb $0x27, (%rax)
movq -0x1a0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1a0(%rbp)
jmp 0x38da
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3360
cmpl $0x0, 0x79d9(%rip)      # 0xb2c8
jne 0x3902
movq -0x48(%rbp), %rax
movb $0x29, (%rax)
movq -0x48(%rbp), %rax
movb $0x0, 0x1(%rax)
jmp 0x3909
movq -0x48(%rbp), %rax
movb $0x0, (%rax)
cmpl $0x3, 0x7998(%rip)      # 0xb2a8
jne 0x3933
movl -0x20(%rbp), %eax
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x3933
movl -0x20(%rbp), %esi
leaq 0x4dd1(%rip), %rdi      # 0x86fd
movb $0x0, %al
callq 0x2050
cmpl $0x3, 0x796e(%rip)      # 0xb2a8
jle 0x3951
movl -0x20(%rbp), %esi
movq -0x40(%rbp), %rdx
leaq 0x4dc8(%rip), %rdi      # 0x8712
movb $0x0, %al
callq 0x2050
cmpl $0x0, 0x7970(%rip)      # 0xb2c8
jne 0x39e6
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x2120
cmpl $-0x1, %eax
jne 0x39e4
movq 0x7661(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movl -0x20(%rbp), %edx
leaq 0x4d9e(%rip), %rsi      # 0x8722
movb $0x0, %al
callq 0x2290
movq 0x7646(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, -0x1e8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20b0
movq -0x1e8(%rbp), %rdi
movq %rax, %rdx
leaq 0x4bc4(%rip), %rsi      # 0x857a
movb $0x0, %al
callq 0x2290
cmpl $0x1, 0x78e4(%rip)      # 0xb2a8
jle 0x39e2
movq 0x760b(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq -0x40(%rbp), %rdx
leaq 0x4d43(%rip), %rsi      # 0x871e
movb $0x0, %al
callq 0x2290
jmp 0x39e4
jmp 0x3a25
cmpl $0x0, 0x78cf(%rip)      # 0xb2bc
je 0x3a0a
movq -0x190(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x4d46(%rip), %rsi      # 0x8747
movb $0x0, %al
callq 0x2290
jmp 0x3a23
movq -0x190(%rbp), %rdi
movq -0x40(%rbp), %rdx
leaq 0x4d02(%rip), %rsi      # 0x871e
movb $0x0, %al
callq 0x2290
jmp 0x3a25
jmp 0x3a27
jmp 0x3a29
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x330c
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x6aa0
movq -0x40(%rbp), %rdi
callq 0x2210
cmpl $0x0, -0x28(%rbp)
jle 0x3a5f
movq -0x168(%rbp), %rdi
callq 0x2210
cmpl $0x0, 0x7862(%rip)      # 0xb2c8
je 0x3b64
movq -0x190(%rbp), %rdi
callq 0x21a0
leaq -0x160(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
movq -0x180(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0x4cbc(%rip), %rsi      # 0x8755
movb $0x0, %al
callq 0x2060
cmpl $0x1, 0x7801(%rip)      # 0xb2a8
jle 0x3ac5
movq 0x7528(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq -0x40(%rbp), %rdx
leaq 0x4c60(%rip), %rsi      # 0x871e
movb $0x0, %al
callq 0x2290
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x2120
cmpl $-0x1, %eax
jne 0x3b28
movq 0x74fa(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq -0x180(%rbp), %rdx
leaq 0x4cc2(%rip), %rsi      # 0x87b1
movb $0x0, %al
callq 0x2290
movq 0x74db(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, -0x1f0(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20b0
movq -0x1f0(%rbp), %rdi
movq %rax, %rdx
leaq 0x4a59(%rip), %rsi      # 0x857a
movb $0x0, %al
callq 0x2290
movq -0x180(%rbp), %rdi
callq 0x20e0
cmpl $-0x1, %eax
jne 0x3b58
movq 0x7498(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq -0x180(%rbp), %rdx
leaq 0x4c8f(%rip), %rsi      # 0x87e0
movb $0x0, %al
callq 0x2290
movq -0x180(%rbp), %rdi
callq 0x2210
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopl (%rax)