LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: runt_parse_filehandle
runt_int runt_parse_filehandle(runt_vm *vm, FILE *fp)
{
    char *line = NULL;
    size_t len = 0;
    ssize_t read;
    runt_int rc = RUNT_OK;

    if(fp == NULL) return RUNT_NOT_OK;

    while((read = runt_getline(&line, &len, fp)) != -1) {
        rc = parse(vm, line, read);
        if(rc == RUNT_NOT_OK) break;
    }

    free(line);
    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movl $0x1, -0x34(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x8637
movl $0x0, -0x4(%rbp)
jmp 0x8681
jmp 0x8639
movq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4ce0
movq %rax, -0x30(%rbp)
cmpq $-0x1, %rax
je 0x8672
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x8690
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x8670
jmp 0x8672
jmp 0x8639
movq -0x20(%rbp), %rdi
callq 0x1040
movl -0x34(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: parse
static runt_int parse(runt_vm *vm, char *str, size_t read)
{
    const char *code = str;
    runt_int rc;
    runt_pmark_set(vm);
    rc = runt_compile(vm, code);
    runt_pmark_free(vm);
    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4710
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x3a50
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4770
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: irunt_init
static void irunt_init(irunt_data *irunt)
{
    runt_init(&irunt->vm);
    irunt->batch_mode = 1;
    irunt->ncells = 512;
    irunt->memsize = 4 * RUNT_MEGABYTE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12e0
movq -0x8(%rbp), %rax
movl $0x1, 0x14c8(%rax)
movq -0x8(%rbp), %rax
movl $0x200, 0x14cc(%rax)    # imm = 0x200
movq -0x8(%rbp), %rax
movq $0x3d0900, 0x14d0(%rax) # imm = 0x3D0900
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: irunt_parse_args
static int irunt_parse_args(irunt_data *irunt, int argc, char *argv[])
{
    runt_int a;
    runt_int argpos = argc;
    runt_int n;

    if(argc == 1) return 0;

    for(a = 1; a < argc; a++) {
        n = 0;
        if(argv[a][0] == '-') {
            if(irunt_get_flag(irunt, argv, a, argc, &n) != RUNT_OK) return -1;
            argpos -= n;
            a += (n - 1);
        } else {
            break;
        }
    }

    return argpos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
cmpl $0x1, -0x14(%rbp)
jne 0x89d8
movl $0x0, -0x4(%rbp)
jmp 0x8a55
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8a4f
movl $0x0, -0x2c(%rbp)
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x8a40
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
movl -0x14(%rbp), %ecx
leaq -0x2c(%rbp), %r8
callq 0x8c10
cmpl $0x1, %eax
je 0x8a27
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x8a55
movl -0x2c(%rbp), %ecx
movl -0x28(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
subl $0x1, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
jmp 0x8a42
jmp 0x8a4f
jmp 0x8a44
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x89df
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: load_dictionary
static runt_int load_dictionary(runt_vm *vm, char *filename)
{
    FILE *fp;

    fp = fopen(filename, "r");

    if(fp == NULL) {
        runt_print(vm, "Could not open file %s\n", filename);
        return RUNT_NOT_OK;
    }

    load_dictionary_handle(vm, fp);

    fclose(fp);
    return RUNT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0xaf9(%rip), %rsi       # 0x9574
callq 0x1140
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x8aaa
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xba2(%rip), %rsi       # 0x963c
movb $0x0, %al
callq 0x1f40
movl $0x0, -0x4(%rbp)
jmp 0x8ac7
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x8ad0
movq -0x20(%rbp), %rdi
callq 0x1060
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: load_dictionary_handle
static runt_int load_dictionary_handle(runt_vm *vm, FILE *fp)
{
    char *line = NULL;
    size_t len = 0;
    ssize_t read;
    runt_int rc = RUNT_OK;

    while((read = runt_getline(&line, &len, fp)) != -1) {
        rc = parse(vm, line, read);
        if(rc == RUNT_NOT_OK) {
            runt_print(vm, "Bad return value. Dipping out.\n");
            break;
        }
    }

    free(line);
    return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x1, -0x2c(%rbp)
movq -0x10(%rbp), %rdx
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x4ce0
movq %rax, -0x28(%rbp)
cmpq $-0x1, %rax
je 0x8b42
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x8690
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x8b40
movq -0x8(%rbp), %rdi
leaq 0xc4f(%rip), %rsi       # 0x9786
movb $0x0, %al
callq 0x1f40
jmp 0x8b42
jmp 0x8af7
movq -0x18(%rbp), %rdi
callq 0x1040
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: runt_vm_alloc
int runt_vm_alloc(runt_vm *vm, runt_uint ncells, runt_uint memsize)
{
    unsigned char *mem;
    runt_cell *cells;

    mem = malloc(memsize);
    cells = malloc(sizeof(runt_cell) * ncells);
    runt_init(vm);
    runt_cell_pool_set(vm, cells, ncells);
    runt_cell_pool_init(vm);
    runt_memory_pool_set(vm, mem, memsize);
    return RUNT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl %eax, %edi
callq 0x10f0
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
imulq $0x28, %rax, %rdi
callq 0x10f0
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0x12e0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0xc(%rbp), %edx
callq 0x1770
movq -0x8(%rbp), %rdi
callq 0x17b0
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x10(%rbp), %edx
callq 0x1820
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: runt_vm_free
int runt_vm_free(runt_vm *vm)
{
    runt_close_plugins(vm);
    free(vm->cell_pool.cells);
    free(vm->memory_pool.data);
    return RUNT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x4a70
movq -0x8(%rbp), %rax
movq 0x510(%rax), %rdi
callq 0x1040
movq -0x8(%rbp), %rax
movq 0x528(%rax), %rdi
callq 0x1040
movl $0x1, %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/MuvikLabs[P]runt/irunt.c
// Function: irunt_get_flag
static int irunt_get_flag(irunt_data *irunt,
        char *argv[],
        runt_int pos,
        runt_int nargs,
        runt_int *n)
{
    char flag = *(argv[pos] + 1);
    runt_vm *vm = &irunt->vm;
    switch(flag) {
        case 'b':
            irunt->batch_mode = 1;
            *n = 1;
            return RUNT_OK;
        case 'i':
            irunt->batch_mode = 0;
            *n = 1;
            return RUNT_OK;
        case 'c':
            if(pos + 1 <= nargs) {
                irunt->ncells = atoi(argv[pos + 1]);
            } else {
                runt_print(vm, "Not enough arguments for -c\n");
            }
            *n = 2;
            return RUNT_OK;
        case 'm':
            if(pos + 1 <= nargs) {
                irunt->memsize = atol(argv[pos + 1]);
            } else {
                runt_print(vm, "Not enough arguments for -c\n");
            }
            *n = 2;
            return RUNT_OK;
        default:
            runt_print(vm, "Error: Couldn't find flag %s\n", argv[pos]);
            break;
    }
    return RUNT_NOT_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movb 0x1(%rax), %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movsbl -0x29(%rbp), %eax
addl $-0x62, %eax
movl %eax, %ecx
movq %rcx, -0x40(%rbp)
subl $0xb, %eax
ja 0x8d60
movq -0x40(%rbp), %rax
leaq 0xab3(%rip), %rcx       # 0x9718
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl $0x1, 0x14c8(%rax)
movq -0x28(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8d85
movq -0x10(%rbp), %rax
movl $0x0, 0x14c8(%rax)
movq -0x28(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8d85
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cmpl -0x20(%rbp), %eax
jg 0x8ce5
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1160
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x14cc(%rax)
jmp 0x8cf7
movq -0x38(%rbp), %rdi
leaq 0xa5b(%rip), %rsi       # 0x974b
movb $0x0, %al
callq 0x1f40
movq -0x28(%rbp), %rax
movl $0x2, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8d85
movl -0x1c(%rbp), %eax
addl $0x1, %eax
cmpl -0x20(%rbp), %eax
jg 0x8d3b
movq -0x18(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1120
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x14d0(%rax)
jmp 0x8d4d
movq -0x38(%rbp), %rdi
leaq 0xa05(%rip), %rsi       # 0x974b
movb $0x0, %al
callq 0x1f40
movq -0x28(%rbp), %rax
movl $0x2, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x8d85
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x9f1(%rip), %rsi       # 0x9768
movb $0x0, %al
callq 0x1f40
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/melynx[P]peekaboo/read_trace.c
// Function: hexchar_to_uint16
int hexchar_to_uint16(uint16_t *output_uint16_ptr, const char input_char)
{
    if (input_char >= '0' && input_char <= '9')
    {
        *output_uint16_ptr = input_char - '0';
        return 0;
    }
    if (input_char >= 'A' && input_char <= 'F')
    {
        *output_uint16_ptr = input_char - 'A' + 10;
        return 0;
    }
    if (input_char >= 'a' && input_char <= 'f')
    {
        *output_uint16_ptr = input_char - 'a' + 10;
        return 0;
    }
    if (input_char == '*')
    {
        *output_uint16_ptr = 0x100;
        return 0;
    }
    if (input_char == '?')
    {
        *output_uint16_ptr = 0x101;
        return 0;
    }

    return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movsbl -0x11(%rbp), %eax
cmpl $0x30, %eax
jl 0x447d
movsbl -0x11(%rbp), %eax
cmpl $0x39, %eax
jg 0x447d
movsbl -0x11(%rbp), %eax
subl $0x30, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x4518
movsbl -0x11(%rbp), %eax
cmpl $0x41, %eax
jl 0x44ac
movsbl -0x11(%rbp), %eax
cmpl $0x46, %eax
jg 0x44ac
movsbl -0x11(%rbp), %eax
subl $0x41, %eax
addl $0xa, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x4518
movsbl -0x11(%rbp), %eax
cmpl $0x61, %eax
jl 0x44db
movsbl -0x11(%rbp), %eax
cmpl $0x66, %eax
jg 0x44db
movsbl -0x11(%rbp), %eax
subl $0x61, %eax
addl $0xa, %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x4518
movsbl -0x11(%rbp), %eax
cmpl $0x2a, %eax
jne 0x44f6
movq -0x10(%rbp), %rax
movw $0x100, (%rax)          # imm = 0x100
movl $0x0, -0x4(%rbp)
jmp 0x4518
movsbl -0x11(%rbp), %eax
cmpl $0x3f, %eax
jne 0x4511
movq -0x10(%rbp), %rax
movw $0x101, (%rax)          # imm = 0x101
movl $0x0, -0x4(%rbp)
jmp 0x4518
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/melynx[P]peekaboo/read_trace.c
// Function: hex_string_to_uint16_arrary
int hex_string_to_uint16_arrary(uint16_t *uint16_array, const char *hex_string)
{
    int size = 0;
    while(hex_string[0] && hex_string[1])
    {
        // Arbitrary symbols must be in pairs
        if (hex_string[0] == '?' || hex_string[1] == '?' || hex_string[0] == '*' || hex_string[1] == '*')
            if (hex_string[0] != hex_string[1]) return -1;

        uint16_t output[2];
        if (hexchar_to_uint16(&output[0], hex_string[0])==0 && hexchar_to_uint16(&output[1], hex_string[1])==0)
        {
            uint16_array[size++] = output[0] * 16 + output[1];
        }
        else return -1;
        hex_string += 2;
    }
    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x21(%rbp)
je 0x4559
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x4565
jmp 0x4626
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x3f, %eax
je 0x4597
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x3f, %eax
je 0x4597
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2a, %eax
je 0x4597
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x2a, %eax
jne 0x45b5
movq -0x18(%rbp), %rax
movsbl (%rax), %eax
movq -0x18(%rbp), %rcx
movsbl 0x1(%rcx), %ecx
cmpl %ecx, %eax
je 0x45b3
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x462c
jmp 0x45b5
leaq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movsbl (%rax), %esi
callq 0x4440
cmpl $0x0, %eax
jne 0x460c
leaq -0x20(%rbp), %rdi
addq $0x2, %rdi
movq -0x18(%rbp), %rax
movsbl 0x1(%rax), %esi
callq 0x4440
cmpl $0x0, %eax
jne 0x460c
movzwl -0x20(%rbp), %eax
shll $0x4, %eax
movzwl -0x1e(%rbp), %ecx
addl %ecx, %eax
movw %ax, %dx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x1c(%rbp)
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
jmp 0x4615
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x462c
movq -0x18(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x18(%rbp)
jmp 0x4537
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/melynx[P]peekaboo/read_trace.c
// Function: is_buffer_matched
uint32_t is_buffer_matched(cache_linked_list_t const *raw_bytes_buffer, 
                       cache_linked_list_t const *pattern)
{
    insn_rawbyte_node_t *target_node = raw_bytes_buffer->tail;
    insn_rawbyte_node_t *pattern_node = pattern->tail;
    uint32_t matched_bytes_num = 0;

    if (raw_bytes_buffer->length < pattern->length) return 0;

    uint32_t idx = pattern->length;
    for (; idx>0; idx--, pattern_node = pattern_node->prec, target_node = target_node->prec)
    {
        matched_bytes_num += target_node->size;
        if (pattern_node->is_arbitrary) continue;
        if (pattern_node->size != target_node->size) return 0;
        uint32_t byte_offset = 0;
        for (; byte_offset < pattern_node->size; byte_offset++)
        {
            if (pattern_node->bytes[byte_offset] == 0x101*16+0x101) continue; // Matched "??"
            if (pattern_node->bytes[byte_offset] != target_node->bytes[byte_offset]) return 0;
        }
    }
    return matched_bytes_num;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x48b9
movl $0x0, -0x4(%rbp)
jmp 0x4996
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x30(%rbp)
jbe 0x4990
movq -0x20(%rbp), %rax
movl 0x10(%rax), %eax
addl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rax
testb $0x1, (%rax)
je 0x48e9
jmp 0x496a
movq -0x28(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x20(%rbp), %rcx
cmpl 0x10(%rcx), %eax
je 0x4905
movl $0x0, -0x4(%rbp)
jmp 0x4996
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x4968
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
cmpl $0x1111, %eax           # imm = 0x1111
jne 0x4930
jmp 0x495d
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
movzwl (%rax,%rcx,2), %eax
movq -0x20(%rbp), %rcx
movq 0x8(%rcx), %rcx
movl -0x34(%rbp), %edx
movzwl (%rcx,%rdx,2), %ecx
cmpl %ecx, %eax
je 0x495b
movl $0x0, -0x4(%rbp)
jmp 0x4996
jmp 0x495d
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x490c
jmp 0x496a
movl -0x30(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x48c4
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/melynx[P]peekaboo/read_trace.c
// Function: print_back
uint64_t print_back(const int64_t unprinted_size,
                peekaboo_trace_t *peekaboo_trace_ptr, 
                const size_t insn_idx)
{
    if (unprinted_size <= 0 || insn_idx < 1)
    {
        for (size_t prev_idx = ((int64_t)insn_idx - 5 > 0) ? (insn_idx - 5) : 1; prev_idx <= insn_idx; prev_idx++)
        {
            peekaboo_insn_t *prev_insn = get_peekaboo_insn(prev_idx, peekaboo_trace_ptr);
            print_peekaboo_insn(prev_insn, peekaboo_trace_ptr, prev_idx, false, false);
            free_peekaboo_insn(prev_insn);
        }
        return (insn_idx+1);
    }
    peekaboo_insn_t *insn = get_peekaboo_insn(insn_idx, peekaboo_trace_ptr);
    uint64_t rvalue = print_back(unprinted_size - insn->size, peekaboo_trace_ptr, insn_idx - 1);
    print_peekaboo_insn(insn, peekaboo_trace_ptr, insn_idx, true, false);
    free_peekaboo_insn(insn);
    return rvalue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jle 0x4e56
cmpq $0x1, -0x20(%rbp)
jae 0x4edc
movq -0x20(%rbp), %rax
subq $0x5, %rax
cmpq $0x0, %rax
jle 0x4e72
movq -0x20(%rbp), %rax
subq $0x5, %rax
movq %rax, -0x48(%rbp)
jmp 0x4e7d
movl $0x1, %eax
movq %rax, -0x48(%rbp)
jmp 0x4e7d
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
ja 0x4ece
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7200
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x49a0
movq -0x30(%rbp), %rdi
callq 0x7550
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4e85
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x4f38
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7200
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rax
subq 0x8(%rax), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
subq $0x1, %rdx
callq 0x4e30
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x49a0
movq -0x38(%rbp), %rdi
callq 0x7550
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/melynx[P]peekaboo/read_trace.c
// Function: free_dulinked_list
void free_dulinked_list(cache_linked_list_t* pattern)
{
    if (pattern == NULL) return;
    uint32_t idx;
    insn_rawbyte_node_t *this_node = pattern->head;
    for (idx=0; idx<pattern->length; idx++)
    {
        insn_rawbyte_node_t *next_node = this_node->succ;
        free_insn_rawbyte_node(this_node);
        this_node = next_node;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x5305
jmp 0x534c
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x534c
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4640
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x5317
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/melynx[P]peekaboo/read_trace.c
// Function: print_usage
void print_usage(const char* program_name)
{
    fprintf(stderr, "Usage: %s [Options] path_to_trace_dir\n", program_name);
    fprintf(stderr, "Options:\n");
    fprintf(stderr, "  -r               \tPrint register values.\n");
    fprintf(stderr, "  -m               \tPrint memory values.\n");
    fprintf(stderr, "  -y               \tPrint syscalls. Not compatible with -p.\n");
    fprintf(stderr, "  -s <instr id>    \tPrint trace starting from the given id. Below zero for reversed order.\n");
    fprintf(stderr, "  -e <instr id>    \tPrint trace till the given id.\n");
    fprintf(stderr, "  -a <addr>[,size] \tSearch for all accesses to given memory address, for accesses to buffer when size is given.\n");
    fprintf(stderr, "  -p <pattern file>\tSearch for instruction patterns in trace. See pattern.txt for samples. Not compatible with -c.\n");
    fprintf(stderr, "  -h               \tPrint this help.\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x7b55(%rip), %rax      # 0xcff8
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x2e9a(%rip), %rsi      # 0x834b
movb $0x0, %al
callq 0x4130
movq 0x7b39(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2ea9(%rip), %rsi      # 0x8372
movb $0x0, %al
callq 0x4130
movq 0x7b21(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2e9b(%rip), %rsi      # 0x837c
movb $0x0, %al
callq 0x4130
movq 0x7b09(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2eaf(%rip), %rsi      # 0x83a8
movb $0x0, %al
callq 0x4130
movq 0x7af1(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2ec1(%rip), %rsi      # 0x83d2
movb $0x0, %al
callq 0x4130
movq 0x7ad9(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2ee6(%rip), %rsi      # 0x840f
movb $0x0, %al
callq 0x4130
movq 0x7ac1(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2f2a(%rip), %rsi      # 0x846b
movb $0x0, %al
callq 0x4130
movq 0x7aa9(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2f46(%rip), %rsi      # 0x849f
movb $0x0, %al
callq 0x4130
movq 0x7a91(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2f9f(%rip), %rsi      # 0x8510
movb $0x0, %al
callq 0x4130
movq 0x7a79(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2ffb(%rip), %rsi      # 0x8584
movb $0x0, %al
callq 0x4130
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/melynx[P]peekaboo/read_trace.c
// Function: append2macthed_list
void append2macthed_list(matched_list_node_t **list_header, const uint64_t addr)
{

    if (*list_header == NULL)
    {
        *list_header = malloc(sizeof(matched_list_node_t));
        if (!*list_header) PEEKABOO_DIE("Malloc failed.");
        (*list_header)->addr = addr;
        (*list_header)->cnt = 1;
        (*list_header)->succ = NULL;
    }
    else
    {
        matched_list_node_t *prev_node, *node = *list_header;
        while (node)
        {
            if (node->addr == addr)
            {
                node->cnt++;
                break;
            }
            prev_node = node;
            node = prev_node->succ;
        }
        if (node == NULL)
        {
            node = malloc(sizeof(matched_list_node_t));
            if (!node) PEEKABOO_DIE("Malloc failed.");
            node->addr = addr;
            node->cnt = 1;
            node->succ = NULL;
            prev_node->succ = node;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x562b
movl $0x18, %edi
callq 0x4190
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x55fa
movq 0x7a19(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2fc1(%rip), %rsi      # 0x85aa
movb $0x0, %al
callq 0x4130
movl $0x1, %edi
callq 0x4200
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq $0x1, 0x10(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
jmp 0x56e0
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5672
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x565d
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x10(%rax)
jmp 0x5672
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x5636
cmpq $0x0, -0x20(%rbp)
jne 0x56de
movl $0x18, %edi
callq 0x4190
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x56b0
movq 0x7963(%rip), %rax      # 0xcff8
movq (%rax), %rdi
leaq 0x2f0b(%rip), %rsi      # 0x85aa
movb $0x0, %al
callq 0x4130
movl $0x1, %edi
callq 0x4200
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x1, 0x10(%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x56e0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/x264.c
// Function: fillByte(unsigned char*, int, int)
void fillByte(BYTE *src, int dx, int dy)
{
    int j;
    int i;
    for (j = 0; j < dy; j++)
    {
        for ( i = 0; i < dx; i++)
        {
            src[j * dx + i]= 0;
        }

    }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x2339
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x232c
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
imull -0xc(%rbp), %ecx
addl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2304
jmp 0x232e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x22f5
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_context_init(x264_cabac_t*, int, int, int)
void x264_cabac_context_init( x264_cabac_t *cb, int i_slice_type, int i_qp, int i_model )
{
    const int (*cabac_context_init)[399][2];
    int i;

    if( i_slice_type == SLICE_TYPE_I )
    {
        cabac_context_init = &x264_cabac_context_init_I;
    }
    else
    {
        cabac_context_init = &x264_cabac_context_init_PB[i_model];
    }

    for( i = 0; i < 399; i++ )
    {
        int i_pre_state;

        i_pre_state = x264_clip3( (((*cabac_context_init)[i][0] * i_qp) >> 4) + (*cabac_context_init)[i][1], 1, 126 );
        if( i_pre_state <= 63 )
        {
            cb->ctxstate[i].i_state = 63 - i_pre_state;
            cb->ctxstate[i].i_mps = 0;
        }
        else
        {
            cb->ctxstate[i].i_state = i_pre_state - 64;
            cb->ctxstate[i].i_mps = 1;
        }
        cb->ctxstate[i].i_count = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
cmpl $0x2, -0xc(%rbp)
jne 0x3118
leaq 0x225ae(%rip), %rax     # 0x256c0
movq %rax, -0x20(%rbp)
jmp 0x3131
movslq -0x14(%rbp), %rcx
leaq 0x2321d(%rip), %rax     # 0x26340
imulq $0xc78, %rcx, %rcx      # imm = 0xC78
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpl $0x18f, -0x24(%rbp)     # imm = 0x18F
jge 0x3211
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl (%rax,%rcx,8), %edi
imull -0x10(%rbp), %edi
sarl $0x4, %edi
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
addl 0x4(%rax,%rcx,8), %edi
movl $0x1, %esi
movl $0x7e, %edx
callq 0x3220
movl %eax, -0x28(%rbp)
cmpl $0x3f, -0x28(%rbp)
jg 0x31b4
movl $0x3f, %ecx
subl -0x28(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0x24(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0x24(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x4(%rax)
jmp 0x31e9
movl -0x28(%rbp), %ecx
subl $0x40, %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0x24(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0x24(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0x24(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3138
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/common.h
// Function: x264_clip3(int, int, int)
static inline int x264_clip3( int v, int i_min, int i_max )
{
    if( v < i_min )
    {
        return i_min;
    }
    else if( v > i_max )
    {
        return i_max;
    }
    else
    {
        return v;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0x8(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x323d
movl -0xc(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3253
movl -0x8(%rbp), %eax
cmpl -0x10(%rbp), %eax
jle 0x324d
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3253
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/bs.h
// Function: bs_read(bs_s*, int)
static inline uint32_t
_bs_read(bs_t *s, int i_count) {
    static uint32_t i_mask[33] = {0x00,
                                  0x01, 0x03, 0x07, 0x0f,
                                  0x1f, 0x3f, 0x7f, 0xff,
                                  0x1ff, 0x3ff, 0x7ff, 0xfff,
                                  0x1fff, 0x3fff, 0x7fff, 0xffff,
                                  0x1ffff, 0x3ffff, 0x7ffff, 0xfffff,
                                  0x1fffff, 0x3fffff, 0x7fffff, 0xffffff,
                                  0x1ffffff, 0x3ffffff, 0x7ffffff, 0xfffffff,
                                  0x1fffffff, 0x3fffffff, 0x7fffffff, 0xffffffff};
    int i_shr;
    uint32_t i_result = 0;

    while (i_count > 0)
    {
        if (s->p >= s->p_end)
        {
            break;
        }

        if ((i_shr = s->i_left - i_count) >= 0)
        {
            /* more in the buffer than requested */
            i_result |= (*s->p >> i_shr) & i_mask[i_count];
            s->i_left -= i_count;
            if (s->i_left == 0)
            {
                s->p++;
                s->i_left = 8;
            }
            return ( i_result);
        }
        else
        {
            /* less in the buffer than requested */
            i_result |= (*s->p & i_mask[s->i_left]) << -i_shr;
            i_count -= s->i_left;
            s->p++;
            s->i_left = 8;
        }
    }
    return ( i_result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
jle 0x33ae
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jb 0x32e3
jmp 0x33ae
movq -0x10(%rbp), %rax
movl 0x18(%rax), %eax
subl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, %eax
jl 0x3355
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
movl -0x18(%rbp), %ecx
sarl %cl, %eax
movslq -0x14(%rbp), %rdx
leaq 0x33390(%rip), %rcx     # 0x366a0
andl (%rcx,%rdx,4), %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %edx
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x18(%rax)
jne 0x334d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x18(%rax)
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x33b4
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movzbl (%rax), %eax
movq -0x10(%rbp), %rcx
movslq 0x18(%rcx), %rdx
leaq 0x33331(%rip), %rcx     # 0x366a0
andl (%rcx,%rdx,4), %eax
xorl %ecx, %ecx
subl -0x18(%rbp), %ecx
shll %cl, %eax
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl 0x18(%rax), %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0x18(%rax)
jmp 0x32c2
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_decode_decision(x264_cabac_t*, int)
int  x264_cabac_decode_decision( x264_cabac_t *cb, int i_ctx )
{
    int i_state = cb->ctxstate[i_ctx].i_state;
    int i_mps   = cb->ctxstate[i_ctx].i_mps;

    int i_range_lps = x264_cabac_range_lps[i_state][(cb->i_range>>6)&0x03];

    int val;

    cb->i_range -= i_range_lps;

    if( cb->i_low >= cb->i_range )
    {
        val = 1 - i_mps;

        cb->i_low -= cb->i_range;
        cb->i_range= i_range_lps;

        if( i_state == 0 )
        {
            cb->ctxstate[i_ctx].i_mps = 1 - i_mps;
        }
        cb->ctxstate[i_ctx].i_state = x264_transition_lps[i_state];
    }
    else
    {
        val = i_mps;

        cb->ctxstate[i_ctx].i_state = x264_transition_mps[i_state];
    }

    x264_cabac_decode_renorm( cb );

    return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x254a5(%rip), %rax     # 0x288b0
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movl 0x12d0(%rcx), %ecx
sarl $0x6, %ecx
andl $0x3, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x12d0(%rax)
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x12d0(%rcx), %eax
jl 0x34d3
movl $0x1, %eax
subl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %edx
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x12cc(%rax)
movl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x12d0(%rax)
cmpl $0x0, -0x10(%rbp)
jne 0x34ae
movl $0x1, %ecx
subl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movslq -0x10(%rbp), %rcx
leaq 0x257f7(%rip), %rax     # 0x28cb0
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
jmp 0x34fc
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x258cc(%rip), %rax     # 0x28db0
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
callq 0x3510
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_decode_bypass(x264_cabac_t*)
int  x264_cabac_decode_bypass( x264_cabac_t *cb )
{
    cb->i_low = (cb->i_low << 1)|_bs_read( cb->s, 1 );

    if( cb->i_low >= cb->i_range )
    {
        cb->i_low -= cb->i_range;
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x12cc(%rax), %eax
shll %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x12e0(%rax), %rdi
movl $0x1, %esi
callq 0x32b0
movl -0x14(%rbp), %ecx
orl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x12cc(%rax)
movq -0x10(%rbp), %rax
movl 0x12cc(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0x12d0(%rcx), %eax
jl 0x35fa
movq -0x10(%rbp), %rax
movl 0x12d0(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x12cc(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x12cc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x3601
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_decode_terminal(x264_cabac_t*)
int  x264_cabac_decode_terminal( x264_cabac_t *cb )
{
    if( cb->i_low >= cb->i_range - 2 )
    {
        return 1;
    }

    cb->i_range -= 2;
    x264_cabac_decode_renorm( cb );
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x12cc(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0x12d0(%rcx), %ecx
subl $0x2, %ecx
cmpl %ecx, %eax
jl 0x3640
movl $0x1, -0x4(%rbp)
jmp 0x3663
movq -0x10(%rbp), %rax
movl 0x12d0(%rax), %ecx
subl $0x2, %ecx
movl %ecx, 0x12d0(%rax)
movq -0x10(%rbp), %rdi
callq 0x3510
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_model_init(x264_cabac_t*)
void x264_cabac_model_init( x264_cabac_t *cb )
{
    int i;

    for( i = 0; i < 3; i++ )
    {
        cb->slice[i].i_model = 0;
        cb->slice[i].i_cost  = -1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x3, -0xc(%rbp)
jge 0x36af
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl $0x0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl $0xffffffff, 0x4(%rax,%rcx,8) # imm = 0xFFFFFFFF
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x367f
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_init(x264_cabac_t*, bs_s*)
void x264_cabac_encode_init( x264_cabac_t *cb, bs_t *s )
{
    cb->i_low   = 0;
    cb->i_range = 0x01FE;
    cb->b_first_bit= 1;
    cb->i_bits_outstanding = 0;
    cb->i_sym_cnt = 0;
    cb->s = s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x12cc(%rax)
movq -0x8(%rbp), %rax
movl $0x1fe, 0x12d0(%rax)    # imm = 0x1FE
movq -0x8(%rbp), %rax
movl $0x1, 0x12d8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x12dc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x12d4(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x12e0(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_decision(x264_cabac_t*, int, int)
void x264_cabac_encode_decision( x264_cabac_t *cb, int i_ctx, int b )
{
    int i_state = cb->ctxstate[i_ctx].i_state;
    int i_mps   = cb->ctxstate[i_ctx].i_mps;

    int i_range_lps = x264_cabac_range_lps[i_state][(cb->i_range>>6)&0x03];

#ifdef TRACE
    if( binCount >= 0 )
    {
        fprintf( stderr, "%d  ctx=%d b=%d\n", binCount, i_ctx, b );
    }
    fprintf( stderr, "%d  0x%04x  %d  %d\n", binCount++, cb->i_range, i_state, i_mps );
#endif

    cb->i_range -= i_range_lps;

    if( b != i_mps )
    {
        cb->i_low += cb->i_range;
        cb->i_range = i_range_lps;

        if( i_state == 0 )
        {
            cb->ctxstate[i_ctx].i_mps = 1 - i_mps;
        }
        cb->ctxstate[i_ctx].i_state = x264_transition_lps[i_state];
    }
    else
    {
        cb->ctxstate[i_ctx].i_state = x264_transition_mps[i_state];
    }
    cb->ctxstate[i_ctx].i_count++;

    x264_cabac_encode_renorm( cb );

    cb->i_sym_cnt++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x24ef2(%rip), %rax     # 0x288b0
shlq $0x4, %rcx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
movl 0x12d0(%rcx), %ecx
sarl $0x6, %ecx
andl $0x3, %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x12d0(%rax)
movl -0x10(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x3a6b
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x12cc(%rax), %ecx
movl %ecx, 0x12cc(%rax)
movl -0x1c(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x12d0(%rax)
cmpl $0x0, -0x14(%rbp)
jne 0x3a46
movl $0x1, %ecx
subl -0x18(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movslq -0x14(%rbp), %rcx
leaq 0x2525f(%rip), %rax     # 0x28cb0
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
jmp 0x3a8e
movslq -0x14(%rbp), %rcx
leaq 0x2533a(%rip), %rax     # 0x28db0
movl (%rax,%rcx,4), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rdx
imulq $0xc, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movslq -0xc(%rbp), %rcx
imulq $0xc, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x8(%rax)
movq -0x8(%rbp), %rdi
callq 0x3ad0
movq -0x8(%rbp), %rax
movl 0x12d4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x12d4(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_renorm(x264_cabac_t*)
static inline void x264_cabac_encode_renorm( x264_cabac_t *cb )
{
    /* RenormE */
    while( cb->i_range < 0x0100 )
    {
        if( cb->i_low < 0x100 )
        {
            x264_cabac_putbit( cb, 0 );
        }
        else
        {
            if( cb->i_low >= 0x200 )
            {
                cb->i_low -= 0x200;
                x264_cabac_putbit( cb, 1 );
            }
            else
            {
                cb->i_low -= 0x100;
                cb->i_bits_outstanding++;
            }
        }

        cb->i_range <<= 1;
        cb->i_low   <<= 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x100, 0x12d0(%rax)    # imm = 0x100
jge 0x3b97
movq -0x8(%rbp), %rax
cmpl $0x100, 0x12cc(%rax)    # imm = 0x100
jge 0x3b0d
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3c80
jmp 0x3b6e
movq -0x8(%rbp), %rax
cmpl $0x200, 0x12cc(%rax)    # imm = 0x200
jl 0x3b43
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %ecx
subl $0x200, %ecx            # imm = 0x200
movl %ecx, 0x12cc(%rax)
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3c80
jmp 0x3b6c
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %ecx
subl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x12cc(%rax)
movq -0x8(%rbp), %rax
movl 0x12dc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x12dc(%rax)
jmp 0x3b6e
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %ecx
shll %ecx
movl %ecx, 0x12d0(%rax)
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %ecx
shll %ecx
movl %ecx, 0x12cc(%rax)
jmp 0x3adc
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_bypass(x264_cabac_t*, int)
void x264_cabac_encode_bypass( x264_cabac_t *cb, int b )
{
#ifdef TRACE
    fprintf( stderr, "%d  0x%04x\n", binCount++, cb->i_range );
#endif

    cb->i_low <<= 1;
    if( b )
    {
        cb->i_low += cb->i_range;
    }

    if( cb->i_low >= 0x400 )
    {
        x264_cabac_putbit( cb, 1 );
        cb->i_low -= 0x400;
    }
    else
    {
        if( cb->i_low < 0x200 )
        {
            x264_cabac_putbit( cb, 0 );
        }
        else
        {
            cb->i_low -= 0x200;
            cb->i_bits_outstanding++;
        }
    }
    cb->i_sym_cnt++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %ecx
shll %ecx
movl %ecx, 0x12cc(%rax)
cmpl $0x0, -0xc(%rbp)
je 0x3be1
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x12cc(%rax), %ecx
movl %ecx, 0x12cc(%rax)
movq -0x8(%rbp), %rax
cmpl $0x400, 0x12cc(%rax)    # imm = 0x400
jl 0x3c17
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x3c80
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %ecx
subl $0x400, %ecx            # imm = 0x400
movl %ecx, 0x12cc(%rax)
jmp 0x3c5f
movq -0x8(%rbp), %rax
cmpl $0x200, 0x12cc(%rax)    # imm = 0x200
jge 0x3c34
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x3c80
jmp 0x3c5d
movq -0x8(%rbp), %rax
movl 0x12cc(%rax), %ecx
subl $0x200, %ecx            # imm = 0x200
movl %ecx, 0x12cc(%rax)
movq -0x8(%rbp), %rax
movl 0x12dc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x12dc(%rax)
jmp 0x3c5f
movq -0x8(%rbp), %rax
movl 0x12d4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x12d4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_putbit(x264_cabac_t*, int)
static inline void x264_cabac_putbit( x264_cabac_t *cb, int b )
{
    if( cb->b_first_bit )
    {
        cb->b_first_bit = 0;
    }
    else
    {
        _bs_write1( cb->s, b );
    }

    while( cb->i_bits_outstanding > 0 )
    {
        _bs_write1( cb->s, 1 - b );
        cb->i_bits_outstanding--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x12d8(%rax)
je 0x3cac
movq -0x8(%rbp), %rax
movl $0x0, 0x12d8(%rax)
jmp 0x3cbf
movq -0x8(%rbp), %rax
movq 0x12e0(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0x3e00
jmp 0x3cc1
movq -0x8(%rbp), %rax
cmpl $0x0, 0x12dc(%rax)
jle 0x3cfb
movq -0x8(%rbp), %rax
movq 0x12e0(%rax), %rdi
movl $0x1, %esi
subl -0xc(%rbp), %esi
callq 0x3e00
movq -0x8(%rbp), %rax
movl 0x12dc(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x12dc(%rax)
jmp 0x3cc1
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/akumrao[P]videoAnalyzer/core/cabac.c
// Function: x264_cabac_encode_terminal(x264_cabac_t*, int)
void x264_cabac_encode_terminal( x264_cabac_t *cb, int b )
{
#ifdef TRACE
    fprintf( stderr, "%d  0x%04x\n", binCount++, cb->i_range );
#endif

    cb->i_range -= 2;
    if( b )
    {
        cb->i_low += cb->i_range;
        cb->i_range = 2;
    }
    x264_cabac_encode_renorm( cb );

    cb->i_sym_cnt++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %ecx
subl $0x2, %ecx
movl %ecx, 0x12d0(%rax)
cmpl $0x0, -0xc(%rbp)
je 0x3d60
movq -0x8(%rbp), %rax
movl 0x12d0(%rax), %ecx
movq -0x8(%rbp), %rax
addl 0x12cc(%rax), %ecx
movl %ecx, 0x12cc(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x12d0(%rax)
movq -0x8(%rbp), %rdi
callq 0x3ad0
movq -0x8(%rbp), %rax
movl 0x12d4(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x12d4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)