LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: numDigits(int)
int numDigits(int32_t x)
{
    if (x >= 10000) {
        if (x >= 10000000) {
            if (x >= 100000000) {
                if (x >= 1000000000)
                    return 10;
                return 9;
            }
            return 8;
        }
        if (x >= 100000) {
            if (x >= 1000000)
                return 7;
            return 6;
        }
        return 5;
    }
    if (x >= 100) {
        if (x >= 1000)
            return 4;
        return 3;
    }
    if (x >= 10)
        return 2;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
cmpl $0x2710, -0x8(%rbp)     # imm = 0x2710
jl 0xf323
cmpl $0x989680, -0x8(%rbp)   # imm = 0x989680
jl 0xf2f6
cmpl $0x5f5e100, -0x8(%rbp)  # imm = 0x5F5E100
jl 0xf2ed
cmpl $0x3b9aca00, -0x8(%rbp) # imm = 0x3B9ACA00
jl 0xf2e4
movl $0xa, -0x4(%rbp)
jmp 0xf35a
movl $0x9, -0x4(%rbp)
jmp 0xf35a
movl $0x8, -0x4(%rbp)
jmp 0xf35a
cmpl $0x186a0, -0x8(%rbp)    # imm = 0x186A0
jl 0xf31a
cmpl $0xf4240, -0x8(%rbp)    # imm = 0xF4240
jl 0xf311
movl $0x7, -0x4(%rbp)
jmp 0xf35a
movl $0x6, -0x4(%rbp)
jmp 0xf35a
movl $0x5, -0x4(%rbp)
jmp 0xf35a
cmpl $0x64, -0x8(%rbp)
jl 0xf344
cmpl $0x3e8, -0x8(%rbp)      # imm = 0x3E8
jl 0xf33b
movl $0x4, -0x4(%rbp)
jmp 0xf35a
movl $0x3, -0x4(%rbp)
jmp 0xf35a
cmpl $0xa, -0x8(%rbp)
jl 0xf353
movl $0x2, -0x4(%rbp)
jmp 0xf35a
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nop
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::addNew()
void Game::addNew() {
    // Create vector of empty tiles
    std::vector<std::pair<int, int>> empty_tiles;
    for (int i = 0; i < DIM; ++i) {
        for (int j = 0; j < DIM; ++j) {
            if (state[i][j] == 0) {
                empty_tiles.push_back(std::pair<int, int>(i, j));
            }
        }
    }

    int size = empty_tiles.size();
    if (size > 0) {
        // Get random empty tile coordinates
        std::pair<int, int> choice = empty_tiles[DISTS[size-1](rng)];

        // Generating a random value of 2 or 4 (weighted probability)
        if (DISTS[9](rng) > 0) {
            state[choice.first][choice.second] = 2;
        }
        else {
            state[choice.first][choice.second] = 4;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x11350
movl $0x0, -0x24(%rbp)
cmpl $0x4, -0x24(%rbp)
jge 0xf418
movl $0x0, -0x28(%rbp)
cmpl $0x4, -0x28(%rbp)
jge 0xf408
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movslq -0x24(%rbp), %rsi
callq 0x7fb0
movq %rax, %rdi
movslq -0x28(%rbp), %rsi
callq 0x4230
cmpl $0x0, (%rax)
jne 0xf3fb
leaq -0x30(%rbp), %rdi
leaq -0x24(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x4430
jmp 0xf3d0
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x11370
jmp 0xf3df
jmp 0xf3fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x113e0
jmp 0xf4e1
jmp 0xf3fd
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xf395
jmp 0xf40a
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xf384
leaq -0x20(%rbp), %rdi
callq 0x113a0
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x40(%rbp)
jle 0xf4d2
movl -0x40(%rbp), %eax
decl %eax
movslq %eax, %rcx
leaq 0x16553(%rip), %rax     # 0x25990
leaq (%rax,%rcx,8), %rdi
leaq 0x151b8(%rip), %rsi     # 0x24600
callq 0x4200
movl %eax, -0x54(%rbp)
jmp 0xf452
movl -0x54(%rbp), %eax
movslq %eax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x113c0
movq (%rax), %rax
movq %rax, -0x48(%rbp)
leaq 0x16569(%rip), %rdi     # 0x259d8
leaq 0x1518a(%rip), %rsi     # 0x24600
callq 0x4200
movl %eax, -0x58(%rbp)
jmp 0xf480
movl -0x58(%rbp), %eax
cmpl $0x0, %eax
jle 0xf4ad
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movslq -0x48(%rbp), %rsi
callq 0x7fb0
movq %rax, %rdi
movslq -0x44(%rbp), %rsi
callq 0x4230
movl $0x2, (%rax)
jmp 0xf4d0
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movslq -0x48(%rbp), %rsi
callq 0x7fb0
movq %rax, %rdi
movslq -0x44(%rbp), %rsi
callq 0x4230
movl $0x4, (%rax)
jmp 0xf4d2
leaq -0x20(%rbp), %rdi
callq 0x113e0
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x33d0
nopw (%rax,%rax)
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::canContinue() const
bool Game::canContinue() const {
    for (int i = 0; i < DIM; ++i) {
        for (int j = 0; j < DIM; ++j) {
            if (state[i][j] == 0)
                return true;
            if ((i < (DIM-1) && state[i][j] == state[i + 1][j]) || 
                (j < (DIM-1) && state[i][j] == state[i][j + 1]))    // If adj. hor/ver match
                return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0xf61f
movl $0x0, -0x18(%rbp)
cmpl $0x4, -0x18(%rbp)
jge 0xf60f
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0x7f90
cmpl $0x0, (%rax)
jne 0xf551
movb $0x1, -0x1(%rbp)
jmp 0xf623
cmpl $0x3, -0x14(%rbp)
jge 0xf5a5
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0x7f90
movq -0x20(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x24(%rbp)
addq $0x8, %rdi
movl -0x14(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0x7f90
movq %rax, %rcx
movl -0x24(%rbp), %eax
cmpl (%rcx), %eax
je 0xf5f9
cmpl $0x3, -0x18(%rbp)
jge 0xf5ff
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x18(%rbp), %rsi
callq 0x7f90
movq -0x20(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x28(%rbp)
addq $0x8, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movl -0x18(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0x7f90
movq %rax, %rcx
movl -0x28(%rbp), %eax
cmpl (%rcx), %eax
jne 0xf5ff
movb $0x1, -0x1(%rbp)
jmp 0xf623
jmp 0xf601
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf51c
jmp 0xf611
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf50b
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nop
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::up(bool)
void Game::up(bool peak) {
    board prev_state = state;
    mergeUp();
    compressUp(peak);
    if (state != prev_state && !peak) {
        addNew();
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x40(%rbp)
addq $0x8, %rsi
leaq -0x28(%rbp), %rdi
callq 0x3fb0
movq -0x40(%rbp), %rdi
callq 0xffb0
jmp 0xfa44
movq -0x40(%rbp), %rdi
movzbl -0x9(%rbp), %esi
andl $0x1, %esi
callq 0x10100
jmp 0xfa56
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
leaq -0x28(%rbp), %rsi
callq 0x11440
movb %al, -0x41(%rbp)
jmp 0xfa6c
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xfa75
jmp 0xfa9f
testb $0x1, -0x9(%rbp)
jne 0xfa9f
movq -0x40(%rbp), %rdi
callq 0xf360
jmp 0xfa86
jmp 0xfa9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x43d0
jmp 0xfaae
leaq -0x28(%rbp), %rdi
callq 0x43d0
addq $0x50, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x33d0
nopw (%rax,%rax)
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::mergeUp()
void Game::mergeUp() {
    for (int col = 0; col < DIM; ++col) {
        std::vector<int> merged_column;
        for (int i = 0; i < DIM; ++i) {
            if (state[i][col] != 0) {
                merged_column.push_back(state[i][col]);
            }            
        }
        while (merged_column.size() < DIM) {
            merged_column.push_back(0);
        }
        for (int i = 0; i < DIM; ++i) {
            state[i][col] = merged_column[i];
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x4, -0xc(%rbp)
jge 0x100ed
leaq -0x28(%rbp), %rdi
callq 0xbf90
movl $0x0, -0x2c(%rbp)
cmpl $0x4, -0x2c(%rbp)
jge 0x10061
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movslq -0x2c(%rbp), %rsi
callq 0x7fb0
movq %rax, %rdi
movslq -0xc(%rbp), %rsi
callq 0x4230
cmpl $0x0, (%rax)
je 0x10054
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movslq -0x2c(%rbp), %rsi
callq 0x7fb0
movq %rax, %rdi
movslq -0xc(%rbp), %rsi
callq 0x4230
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x4960
jmp 0x10038
jmp 0x10054
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x4370
jmp 0x100f3
jmp 0x10056
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xffe5
jmp 0x10063
leaq -0x28(%rbp), %rdi
callq 0x41e0
cmpq $0x4, %rax
jae 0x1008a
movl $0x0, -0x40(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x11670
jmp 0x10088
jmp 0x10063
movl $0x0, -0x44(%rbp)
cmpl $0x4, -0x44(%rbp)
jge 0x100d6
movslq -0x44(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x4230
movq -0x50(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x54(%rbp)
addq $0x8, %rdi
movslq -0x44(%rbp), %rsi
callq 0x7fb0
movq %rax, %rdi
movslq -0xc(%rbp), %rsi
callq 0x4230
movl -0x54(%rbp), %ecx
movl %ecx, (%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x10091
leaq -0x28(%rbp), %rdi
callq 0x4370
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xffcb
addq $0x60, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x33d0
nopl (%rax)
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::hamburgerFlip()
void Game::hamburgerFlip() {
    board flipped_state = {{}, {}, {}, {}};
    for (int row = (DIM-1), i = 0; row >= 0; --row, ++i) {
        flipped_state[i] = state[row];
    }
    state = flipped_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xd0(%rbp)
movaps %xmm0, -0x90(%rbp)
movq $0x0, -0x80(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0xbf90
movaps -0xd0(%rbp), %xmm0
leaq -0x78(%rbp), %rdi
movups %xmm0, -0x78(%rbp)
movq $0x0, -0x68(%rbp)
callq 0xbf90
movaps -0xd0(%rbp), %xmm0
leaq -0x60(%rbp), %rdi
movups %xmm0, -0x60(%rbp)
movq $0x0, -0x50(%rbp)
callq 0xbf90
movaps -0xd0(%rbp), %xmm0
leaq -0x48(%rbp), %rdi
movups %xmm0, -0x48(%rbp)
movq $0x0, -0x38(%rbp)
callq 0xbf90
movq -0xc0(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x4, -0x28(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x49d0
movq -0xb8(%rbp), %rcx
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x20(%rbp), %rdi
callq 0x49f0
jmp 0x1074a
leaq -0x91(%rbp), %rdi
callq 0x4a70
leaq -0x90(%rbp), %rax
movq %rax, -0xe8(%rbp)
addq $0x60, %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0xf0(%rbp)
callq 0x4370
movq -0xe8(%rbp), %rcx
movq -0xf0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xe0(%rbp)
jne 0x1076f
movl $0x3, -0xa8(%rbp)
movl $0x0, -0xac(%rbp)
cmpl $0x0, -0xa8(%rbp)
jl 0x108a9
movq -0xd8(%rbp), %rdi
addq $0x8, %rdi
movslq -0xa8(%rbp), %rsi
callq 0x7fb0
movq %rax, -0xf8(%rbp)
movslq -0xac(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x7fb0
movq -0xf8(%rbp), %rsi
movq %rax, %rdi
callq 0x116a0
jmp 0x10800
jmp 0x10802
movl -0xa8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xa8(%rbp)
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x107b4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x4a70
leaq -0x90(%rbp), %rax
movq %rax, -0x108(%rbp)
addq $0x60, %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x110(%rbp)
callq 0x4370
movq -0x108(%rbp), %rcx
movq -0x110(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x100(%rbp)
jne 0x10859
jmp 0x108d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x43d0
jmp 0x108d1
movq -0xd8(%rbp), %rdi
addq $0x8, %rdi
leaq -0x20(%rbp), %rsi
callq 0x118f0
jmp 0x108bf
leaq -0x20(%rbp), %rdi
callq 0x43d0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0xa0(%rbp), %rdi
callq 0x33d0
nopl (%rax)
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::getHighestTile() const
int Game::getHighestTile() const {
    int highest_tile = 2;
    for (int i = 0; i < DIM; ++i) {
        for (int j = 0; j < DIM; ++j) {
            if (state[i][j] > highest_tile) {
                highest_tile = state[i][j];
            }
        }
    }
    return highest_tile;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x2, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x10ed5
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x10ec8
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movslq -0x10(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f90
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jle 0x10ebb
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movslq -0x10(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f90
movl (%rax), %eax
movl %eax, -0xc(%rbp)
jmp 0x10ebd
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10e6f
jmp 0x10eca
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x10e62
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: NathanWine[P]2048-AI-Solvers/src/Game.cpp
// Function: Game::getNumberEmpty(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&)
int Game::getNumberEmpty(const board &game_state) {
    int sum = 0;
    for (int i = 0; i < DIM; ++i) {
        for (int j = 0; j < DIM; ++j) {
            if (game_state[i][j] == 0) {
                sum += 1;
            }
        }
    }
    return sum;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x10f4e
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x10f41
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f90
cmpl $0x0, (%rax)
jne 0x10f34
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x10f36
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x10f07
jmp 0x10f43
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x10efa
movl -0xc(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: NathanWine[P]2048-AI-Solvers/src/Expectimax.cpp
// Function: expectimaxSolve(int, int, int, std::vector<int, std::allocator<int>>*, std::vector<int, std::allocator<int>>*)
int expectimaxSolve(int n, int depth, int display_level, 
    std::vector<int> *scores, std::vector<int> *highest_tiles) {

    int successes = 0;
    for (int i = 0; i < n; ++i) {
        std::pair<int, int> result = expectimaxSearch(depth, display_level, Game());
        if (result.first >= WIN) {
            successes++;
        }
        (*highest_tiles).push_back(result.first);
        (*scores).push_back(result.second);
    }
    return successes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1691c
movl -0x8(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x74(%rbp)
leaq -0x50(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x44b0
movl -0x78(%rbp), %edi
movl -0x74(%rbp), %esi
movq -0x70(%rbp), %rdx
callq 0x161e0
movq %rax, -0x68(%rbp)
jmp 0x168b4
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4460
cmpl $0x800, -0x30(%rbp)     # imm = 0x800
jl 0x168f0
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x168f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x4460
jmp 0x16928
movq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4960
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
addq $0x4, %rsi
callq 0x4960
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1687a
movl -0x24(%rbp), %eax
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x33d0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: NathanWine[P]2048-AI-Solvers/src/Heuristics.cpp
// Function: Heuristics::get_snake(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&)
float Heuristics::get_snake(const board &state) {        // Perhaps this should be normalized and multiplied by a weight instead? Becomes the only factor at high value tiles
    float snake_total = 0.0;
    for (int i = 0; i < DIM; ++i) {
        for (int j = 0; j < DIM; ++j) {
            snake_total += state[i][j] * snake_weights[i][j];
        }
    }
    return snake_total;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x4, -0x10(%rbp)
jge 0x16f50
movl $0x0, -0x14(%rbp)
cmpl $0x4, -0x14(%rbp)
jge 0x16f43
movq -0x8(%rbp), %rdi
movslq -0x10(%rbp), %rsi
callq 0x7f70
movq %rax, %rdi
movslq -0x14(%rbp), %rsi
callq 0x7f90
cvtsi2ssl (%rax), %xmm0
movslq -0x10(%rbp), %rcx
leaq 0x16ba(%rip), %rax      # 0x185d0
shlq $0x4, %rcx
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
movss (%rax,%rcx,4), %xmm2
movss -0xc(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0xc(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x16ee8
jmp 0x16f45
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x16edb
movss -0xc(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_cli.c
// Function: test_hash
void test_hash()
{
  rdint_t in_n = 250 * 1000 * 1000;
  double *in_v = malloc(in_n * sizeof(*in_v));
  vector_init(in_v, in_n, 1, 1.0, NAN);

  rdint_t size = in_n * sizeof(*in_v);

  double t = z_time_wtime();
  redirect_call_hash_param_array_double(in_v, in_n);
  t = z_time_wtime() - t;

  printf("test_hash: size: %" rdint_fmt ", time: %f, rate: %f\n", size, t, (double) size / t * 1e-6);

  free(in_v);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0xee6b280, -0x8(%rbp)  # imm = 0xEE6B280
movq -0x8(%rbp), %rdi
shlq $0x3, %rdi
callq 0xc900
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
movl $0x1, %edx
movsd 0x977ca(%rip), %xmm0    # 0xa5010
movsd 0x977ca(%rip), %xmm1    # 0xa5018
callq 0xedd0
movq -0x8(%rbp), %rax
shlq $0x3, %rax
movq %rax, -0x18(%rbp)
callq 0xed90
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x14d60
callq 0xed90
subsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
cvtsi2sdq -0x18(%rbp), %xmm1
divsd -0x20(%rbp), %xmm1
movsd 0x97767(%rip), %xmm2    # 0xa5008
mulsd %xmm2, %xmm1
leaq 0x9779c(%rip), %rdi     # 0xa5048
movb $0x2, %al
callq 0xcd30
movq -0x10(%rbp), %rdi
callq 0xc830
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_cli.c
// Function: test_result
void test_result(const char *uri)
{
  redirect_call_t rc;

  redirect_call_create_scdc(&rc, "result", uri);

  redirect_call_execute(&rc);

  TRACE_F("result: '%s'", redirect_call_get_result_str(&rc, NULL, 0));

  redirect_call_destroy_scdc(&rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xbc0, %rsp            # imm = 0xBC0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x9ad17(%rip), %rsi     # 0xa8608
callq 0x118e0
leaq -0xbb8(%rbp), %rdi
callq 0x11af0
movq 0xc66a7(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9775f(%rip), %rsi     # 0xa5072
leaq 0x9776b(%rip), %rdx     # 0xa5085
movb $0x0, %al
callq 0xc9a0
movq 0xc6688(%rip), %rax     # 0xd3fb0
movq (%rax), %rax
movq %rax, -0xbc0(%rbp)
leaq -0xbb8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x13700
movq -0xbc0(%rbp), %rdi
movq %rax, %rdx
leaq 0x97e03(%rip), %rsi     # 0xa5759
movb $0x0, %al
callq 0xc9a0
movq 0xc664c(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x97f3a(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
leaq -0xbb8(%rbp), %rdi
callq 0x11a50
addq $0xbc0, %rsp            # imm = 0xBC0
popq %rbp
retq
nopw (%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_cli.c
// Function: test_param_matrix
void test_param_matrix(const char *uri)
{
  redirect_call_t rc;

  redirect_call_create_scdc(&rc, "param_matrix", uri);

  /* double ohne/mit stride */

  redirect_call_execute(&rc);

  TRACE_F("result: '%s'", redirect_call_get_result_str(&rc, NULL, 0));

  redirect_call_destroy_scdc(&rc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xbc0, %rsp            # imm = 0xBC0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
leaq -0xbb8(%rbp), %rdi
leaq 0x96989(%rip), %rsi     # 0xa556a
callq 0x118e0
leaq -0xbb8(%rbp), %rdi
callq 0x11af0
movq 0xc53b7(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9646f(%rip), %rsi     # 0xa5072
leaq 0x9675f(%rip), %rdx     # 0xa5369
movb $0x0, %al
callq 0xc9a0
movq 0xc5398(%rip), %rax     # 0xd3fb0
movq (%rax), %rax
movq %rax, -0xbc0(%rbp)
leaq -0xbb8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x13700
movq -0xbc0(%rbp), %rdi
movq %rax, %rdx
leaq 0x96b13(%rip), %rsi     # 0xa5759
movb $0x0, %al
callq 0xc9a0
movq 0xc535c(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96c4a(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
leaq -0xbb8(%rbp), %rdi
callq 0x11a50
addq $0xbc0, %rsp            # imm = 0xBC0
popq %rbp
retq
nopw (%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_cli.c
// Function: main
int main(int argc, char *argv[])
{
  scdc_init(SCDC_INIT_DEFAULT);

  TRACE_F("dataprov open");
  scdc_dataprov_t dp = scdc_dataprov_open(REDIRECT_TEST_SCDC_PATH, "hook", &redirect_test_hook);

#if 1
  const char *uri = "scdc:/" REDIRECT_TEST_SCDC_PATH;
#else
  const char *uri = "scdc+uds://redirect/" REDIRECT_TEST_SCDC_PATH;
#endif

#if TEST_HASH
  test_hash();
#endif

#if TEST_RESULT
  test_result(uri);
#endif

#if TEST_CONF
  test_conf(uri);
#endif

#if TEST_CACHE && REDIRECT_CALL_PARAMS_CACHE
  test_cache(uri);
#endif

#if TEST_PARAM_ARRAY
  test_param_array(uri);
#endif

#if TEST_PARAM_VECTOR
  test_param_vector(uri);
#endif

#if TEST_PARAM_MATRIX
  test_param_matrix(uri);
#endif

  TRACE_F("dataprov close");
  scdc_dataprov_close(dp);

  scdc_release();

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x97907(%rip), %rdi     # 0xa65a4
movb $0x0, %al
callq 0x21cd0
movq 0xc5305(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x963bd(%rip), %rsi     # 0xa5072
leaq 0x966bf(%rip), %rdx     # 0xa537b
movb $0x0, %al
callq 0xc9a0
movq 0xc52e6(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x966ac(%rip), %rsi     # 0xa5380
movb $0x0, %al
callq 0xc9a0
movq 0xc52ce(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96bbc(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
leaq 0x9669a(%rip), %rdi     # 0xa5394
leaq 0x99c0f(%rip), %rsi     # 0xa8910
leaq 0xc2d88(%rip), %rdx     # 0xd1a90
movb $0x0, %al
callq 0x22200
movq %rax, -0x18(%rbp)
leaq 0x96674(%rip), %rax     # 0xa538e
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xe470
movq 0xc5282(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9633a(%rip), %rsi     # 0xa5072
leaq 0x9663c(%rip), %rdx     # 0xa537b
movb $0x0, %al
callq 0xc9a0
movq 0xc5263(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96646(%rip), %rsi     # 0xa539d
movb $0x0, %al
callq 0xc9a0
movq 0xc524b(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96b39(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movq -0x18(%rbp), %rdi
callq 0x222d0
callq 0x21e80
xorl %eax, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_common.c
// Function: vector_init
void vector_init(double *v, rdint_t n, rdint_t inc, double xv, double xn)
{
  int i, j;

  for (i = 0; i < n; ++i)
  {
    v[i * inc + 0] = xv;
    if (i + 1 == n) break;
    for (j = 1; j < inc; ++j) v[i * inc + j] = xn;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movslq -0x2c(%rbp), %rax
cmpq -0x10(%rbp), %rax
jge 0xee69
movsd -0x20(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq -0x18(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
cltq
cmpq -0x10(%rbp), %rax
jne 0xee22
jmp 0xee69
movl $0x1, -0x30(%rbp)
movslq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0xee5c
movsd -0x28(%rbp), %xmm0
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq -0x18(%rbp), %rcx
movslq -0x30(%rbp), %rdx
addq %rdx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0xee29
jmp 0xee5e
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xedf1
popq %rbp
retq
nopl (%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_test.c
// Function: redirect_test_open
void *redirect_test_open(const char *conf, va_list ap)
{
  TRACE_F("conf: '%s'", conf);

  redirect_call_t *rc = malloc(sizeof(redirect_call_t)
#if REDIRECT_CALL_PARAMS_CACHE
    + sizeof(redirect_cache_t)
#endif
    );

#if REDIRECT_CALL_PARAMS_CACHE
  redirect_cache_t *rch = (redirect_cache_t *) (rc + 1);

  redirect_cache_init(rch);
#endif

  TRACE_F("return: %p", rc);

  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0xc5129(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96547(%rip), %rsi     # 0xa53d8
leaq 0x96554(%rip), %rdx     # 0xa53ec
movb $0x0, %al
callq 0xc9a0
movq 0xc510a(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x9654b(%rip), %rsi     # 0xa53ff
movb $0x0, %al
callq 0xc9a0
movq 0xc50ee(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x969dc(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movl $0x1050, %edi           # imm = 0x1050
callq 0xc900
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0xbb0, %rax            # imm = 0xBB0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x10e50
movq 0xc50b1(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x964cf(%rip), %rsi     # 0xa53d8
leaq 0x964dc(%rip), %rdx     # 0xa53ec
movb $0x0, %al
callq 0xc9a0
movq 0xc5092(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
leaq 0x964de(%rip), %rsi     # 0xa540a
movb $0x0, %al
callq 0xc9a0
movq 0xc5076(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96964(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_test.c
// Function: redirect_test_close
scdcint_t redirect_test_close(void *dataprov)
{
  TRACE_F("dataprov: %p", dataprov);

  redirect_call_t *rc = dataprov;

#if REDIRECT_CALL_PARAMS_CACHE
  redirect_cache_t *rch = (redirect_cache_t *) (rc + 1);

  redirect_cache_release(rch);
#endif

  free(rc);

  TRACE_F("return");

  return SCDC_SUCCESS;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq 0xc503d(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9645b(%rip), %rsi     # 0xa53d8
leaq 0x96491(%rip), %rdx     # 0xa5415
movb $0x0, %al
callq 0xc9a0
movq 0xc501e(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x96489(%rip), %rsi     # 0xa5429
movb $0x0, %al
callq 0xc9a0
movq 0xc5002(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x968f0(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0xbb0, %rax            # imm = 0xBB0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x10ee0
movq -0x10(%rbp), %rdi
callq 0xc830
movq 0xc4fc2(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x963e0(%rip), %rsi     # 0xa53d8
leaq 0x96416(%rip), %rdx     # 0xa5415
movb $0x0, %al
callq 0xc9a0
movq 0xc4fa3(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9641f(%rip), %rsi     # 0xa5436
movb $0x0, %al
callq 0xc9a0
movq 0xc4f8b(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96879(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_test.c
// Function: do_result
static void do_result(redirect_call_t *rc)
{
  TRACE_F("rc: %p", rc);

  REDIRECT_TEST_TIMING_INIT_();

  const char *result = "This is a test result with special character '|' inside!";
  redirect_call_set_result_str(rc, result);

  TRACE_F("result: '%s'", result);

  TRACE_F("return");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0xc4c6d(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9608b(%rip), %rsi     # 0xa53d8
leaq 0x96186(%rip), %rdx     # 0xa54da
movb $0x0, %al
callq 0xc9a0
movq 0xc4c4e(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x96174(%rip), %rsi     # 0xa54e4
movb $0x0, %al
callq 0xc9a0
movq 0xc4c32(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96520(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
jmp 0xf391
jmp 0xf393
leaq 0x96151(%rip), %rax     # 0xa54eb
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x136d0
movq 0xc4bfe(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9601c(%rip), %rsi     # 0xa53d8
leaq 0x96117(%rip), %rdx     # 0xa54da
movb $0x0, %al
callq 0xc9a0
movq 0xc4bdf(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x9637a(%rip), %rsi     # 0xa5759
movb $0x0, %al
callq 0xc9a0
movq 0xc4bc3(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x964b1(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
jmp 0xf400
movq 0xc4ba9(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x95fc7(%rip), %rsi     # 0xa53d8
leaq 0x960c2(%rip), %rdx     # 0xa54da
movb $0x0, %al
callq 0xc9a0
movq 0xc4b8a(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96006(%rip), %rsi     # 0xa5436
movb $0x0, %al
callq 0xc9a0
movq 0xc4b72(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x96460(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/test/units/redirect/redirect_test.c
// Function: do_param_matrix
static void do_param_matrix(redirect_call_t *rc)
{
  TRACE_F("rc: %p", rc);

  REDIRECT_TEST_TIMING_INIT_();

  redirect_call_set_result_str(rc, "OK");
  TRACE_F("result: '%s'", redirect_call_get_result_str(rc, NULL, 0));

  TRACE_F("return");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0xc3c4d(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9506b(%rip), %rsi     # 0xa53d8
leaq 0x951f3(%rip), %rdx     # 0xa5567
movb $0x0, %al
callq 0xc9a0
movq 0xc3c2e(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x95154(%rip), %rsi     # 0xa54e4
movb $0x0, %al
callq 0xc9a0
movq 0xc3c12(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x95500(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
jmp 0x103b1
jmp 0x103b3
movq -0x8(%rbp), %rdi
leaq 0x9517e(%rip), %rsi     # 0xa553c
callq 0x136d0
movq 0xc3be6(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x95004(%rip), %rsi     # 0xa53d8
leaq 0x9518c(%rip), %rdx     # 0xa5567
movb $0x0, %al
callq 0xc9a0
movq 0xc3bc7(%rip), %rax     # 0xd3fb0
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movq %rdx, %rsi
callq 0x13700
movq -0x10(%rbp), %rdi
movq %rax, %rdx
leaq 0x9534b(%rip), %rsi     # 0xa5759
movb $0x0, %al
callq 0xc9a0
movq 0xc3b94(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x95482(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
jmp 0x1042f
movq 0xc3b7a(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x94f98(%rip), %rsi     # 0xa53d8
leaq 0x95120(%rip), %rdx     # 0xa5567
movb $0x0, %al
callq 0xc9a0
movq 0xc3b5b(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x94fd7(%rip), %rsi     # 0xa5436
movb $0x0, %al
callq 0xc9a0
movq 0xc3b43(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x95431(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_cache.cc
// Function: redirect_cache_create
void redirect_cache_create(redirect_cache_t *rch)
{
  TRACE_F(" ");

  rch->client = 1;

  redirect_cache_reset_params(rch);

  rch->nentries = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0xc3b0d(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x950ca(%rip), %rsi     # 0xa5577
leaq 0x950d8(%rip), %rdx     # 0xa558c
movb $0x0, %al
callq 0xc9a0
movq 0xc3aee(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x98b2c(%rip), %rsi     # 0xa8ff8
movb $0x0, %al
callq 0xc9a0
movq 0xc3ad6(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x953c4(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
callq 0x10520
movq -0x8(%rbp), %rax
movq $0x0, 0x298(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_cache.cc
// Function: redirect_cache_register_param_dense
void redirect_cache_register_param_dense(redirect_cache_t *rch, const char *id, int type, redirect_param_dense_t *param)
{
  TRACE_F("id: %s, type: %d, size: %" rdint_fmt, id, type, param->size);

  if (rch->nparams < REDIRECT_CACHE_PARAMS_MAX)
  {
    rch->params[rch->nparams].type = type;
    rch->params[rch->nparams].size = param->size;
    rch->params[rch->nparams].buf = param->buf;
    rch->params[rch->nparams].hash = 0;

    ++rch->nparams;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq 0xc3912(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x94ecf(%rip), %rsi     # 0xa5577
leaq 0x94f0a(%rip), %rdx     # 0xa55b9
movb $0x0, %al
callq 0xc9a0
movq 0xc38f3(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movq 0x8(%rax), %r8
leaq 0x94f07(%rip), %rsi     # 0xa55dd
movb $0x0, %al
callq 0xc9a0
movq 0xc38cc(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x951ba(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movq -0x8(%rbp), %rax
cmpq $0x10, 0x8(%rax)
jge 0x10787
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq -0x8(%rbp), %rdx
imulq $0x28, 0x8(%rdx), %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq -0x8(%rbp), %rdx
imulq $0x28, 0x8(%rdx), %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq -0x8(%rbp), %rdx
imulq $0x28, 0x8(%rdx), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
addq $0x18, %rax
movq -0x8(%rbp), %rcx
imulq $0x28, 0x8(%rcx), %rcx
addq %rcx, %rax
movl $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_cache.cc
// Function: redirect_cache_init
void redirect_cache_init(redirect_cache_t *rch)
{
  TRACE_F(" ");

  rch->client = 0;

  redirect_cache_reset_params(rch);

  rch->nentries = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0xc314d(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9470a(%rip), %rsi     # 0xa5577
leaq 0x94867(%rip), %rdx     # 0xa56db
movb $0x0, %al
callq 0xc9a0
movq 0xc312e(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x9816c(%rip), %rsi     # 0xa8ff8
movb $0x0, %al
callq 0xc9a0
movq 0xc3116(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x94a04(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rdi
callq 0x10520
movq -0x8(%rbp), %rax
movq $0x0, 0x298(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_cache.cc
// Function: redirect_cache_find_entries
rdint_t redirect_cache_find_entries(redirect_cache_t *rch, int type, rdint_t size, rdint_t *entries)
{
  rdint_t nentries = 0;

  rdint_t i;
  for (i = 0; i < rch->nentries; ++i)
  {
    if (rch->entries[i].type != type || rch->entries[i].size != size) continue;

    entries[nentries] = i;
    ++nentries;

    if (nentries >= REDIRECT_CACHE_FIND_ENTRIES_MAX) break;
  }
  
  return nentries;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x298(%rcx), %rax
jge 0x11369
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x1132f
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
je 0x11331
jmp 0x11358
movq -0x30(%rbp), %rdx
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0x10, -0x28(%rbp)
jl 0x11356
jmp 0x11369
jmp 0x11358
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x112e3
movq -0x28(%rbp), %rax
popq %rbp
retq
nop
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_cache.cc
// Function: redirect_cache_get_entry_hash
redirect_param_hash_t redirect_cache_get_entry_hash(redirect_cache_t *rch, rdint_t entry)
{
  if (!rch->entries[entry].hash_set)
  {
    redirect_param_dense_t p;
    p.buf = rch->entries[entry].buf;
    p.size = rch->entries[entry].size;
    rch->entries[entry].hash = redirect_param_hash_dense(&p);
    rch->entries[entry].hash_set = 1;
  }

  return rch->entries[entry].hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
jne 0x11414
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x21b90
movl %eax, %ecx
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x10(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movl %ecx, 0x1c(%rax)
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x1, 0x18(%rax)
movq -0x8(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x10(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_cache.cc
// Function: redirect_cache_check_state
void redirect_cache_check_state(redirect_cache_t *rch, const char *state, rdint_t state_size)
{
  TRACE_F("state: '%.*s'", static_cast<int>(state_size), state);

  const char *s = state;

  rdint_t i;
  for (i = 0; i < rch->nparams; ++i)
  {
    sscanf(s, "%" rdint_fmt ":", &rch->params[i].entry_index);
    s = strchr(s, ':') + 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq 0xc2b55(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x94112(%rip), %rsi     # 0xa5577
leaq 0x942fa(%rip), %rdx     # 0xa5766
movb $0x0, %al
callq 0xc9a0
movq 0xc2b36(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl %eax, %edx
movq -0x10(%rbp), %rcx
leaq 0x9423f(%rip), %rsi     # 0xa56cd
movb $0x0, %al
callq 0xc9a0
movq 0xc2b14(%rip), %rax     # 0xd3fb0
movq (%rax), %rdi
leaq 0x94402(%rip), %rsi     # 0xa58a8
movb $0x0, %al
callq 0xc9a0
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x11515
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rdx
addq $0x18, %rdx
imulq $0x28, -0x28(%rbp), %rax
addq %rax, %rdx
addq $0x20, %rdx
leaq 0x94140(%rip), %rsi     # 0xa562a
movb $0x0, %al
callq 0xc640
movq -0x20(%rbp), %rdi
movl $0x3a, %esi
callq 0xc220
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x114bd
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_cache.cc
// Function: redirect_cache_find_entry
rdint_t redirect_cache_find_entry(redirect_cache_t *rch, int type, rdint_t size, const void *buf)
{
  rdint_t i;
  for (i = 0; i < rch->nentries; ++i)
  {
    if (rch->entries[i].type != type || rch->entries[i].size != size || rch->entries[i].buf != buf) continue;

    return i;
  }
  
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x298(%rcx), %rax
jge 0x11793
movq -0x10(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x11776
movq -0x10(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
cmpq -0x20(%rbp), %rax
jne 0x11776
movq -0x10(%rbp), %rax
addq $0x2a0, %rax            # imm = 0x2A0
movq -0x30(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rax
cmpq -0x28(%rbp), %rax
je 0x11778
jmp 0x11782
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1179b
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1170b
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_call.cc
// Function: redirect_call_create_scdc
int redirect_call_create_scdc(redirect_call_t *rc, const char *op, const char *uri)
{
  rc->client = 1;

  strncpy(rc->op, op, sizeof(rc->op));
  if (uri) strncpy(rc->uri, uri, sizeof(rc->uri));
  else rc->uri[0] = '\0';

  rc->dataset = SCDC_DATASET_NULL;

  rc->input_conf_n = 0;
  rc->input_conf[0] = '\0';

  rc->output_conf_put_n = rc->output_conf_get_n = 0;
  rc->output_conf_put[0] = rc->output_conf_get[0] = '\0';

  rc->result_str[0] = '\0';

#if REDIRECT_CALL_PARAMS_NEW
  rc->nparams = 0;
#else
  rc->dense_nparams = 0;
#endif

  rc->input_offset = rc->output_offset = 0;
  rc->input = static_cast<scdc_dataset_input_t *>(malloc(sizeof(scdc_dataset_input_t) + sizeof(scdc_dataset_output_t)));
  rc->output = rc->input + 1;
  scdc_dataset_input_unset(rc->input);
  scdc_dataset_output_unset(rc->output);

  rc->free_nbufs = 0;

#if REDIRECT_CALL_PARAMS_CACHE
  rc->cache = 0;
#endif

  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rdi
addq $0x4, %rdi
movq -0x10(%rbp), %rsi
movl $0x40, %edx
callq 0xc320
cmpq $0x0, -0x18(%rbp)
je 0x11933
movq -0x8(%rbp), %rdi
addq $0x44, %rdi
movq -0x18(%rbp), %rsi
movl $0x100, %edx            # imm = 0x100
callq 0xc320
jmp 0x1193b
movq -0x8(%rbp), %rax
movb $0x0, 0x44(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x148(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x150(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x168(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x160(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x158(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x568(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x368(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x768(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x868(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb04(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb00(%rax)
movl $0xb0, %edi
callq 0xc900
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb08(%rax)
movq -0x8(%rbp), %rax
movq 0xb08(%rax), %rcx
addq $0x58, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0xb10(%rax)
movq -0x8(%rbp), %rax
movq 0xb08(%rax), %rdi
callq 0x433d0
movq -0x8(%rbp), %rax
movq 0xb10(%rax), %rdi
callq 0x433f0
movq -0x8(%rbp), %rax
movl $0x0, 0xb20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xba8(%rax)
movl $0x1, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_call.cc
// Function: redirect_call_get_inout_conf_str(char const*, char const*, char*, long*)
static rdint_t redirect_call_get_inout_conf_str(const char *conf, const char *id, char *x, rdint_t *n)
{
  rdint_t _n = 0;

  if (!n) n = &_n;

  const char *s = strchr(conf, ':');
  sscanf(s + 1, "%" rdint_fmt ":", n);

  s = strchr(s + 1, ':');
  strncpy(x, s + 1, *n);
  x[*n] = '\0';

  return s + 1 + *n + 1 - conf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x124bf
leaq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl $0x3a, %esi
callq 0xc220
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
movq -0x20(%rbp), %rdx
leaq 0x93146(%rip), %rsi     # 0xa562a
movb $0x0, %al
callq 0xc640
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
movl $0x3a, %esi
callq 0xc220
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x1, %rsi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
callq 0xc320
movq -0x18(%rbp), %rax
movq -0x20(%rbp), %rcx
movq (%rcx), %rcx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq -0x20(%rbp), %rcx
addq (%rcx), %rax
addq $0x1, %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: mh0fm4[P]SCDC/src/lib/redirect/redirect/redirect_call.cc
// Function: redirect_call_init_scdc
void redirect_call_init_scdc(redirect_call_t *rc)
{
  rc->client = 0;

  rc->op[0] = rc->uri[0] = '\0';

  rc->dataset = SCDC_DATASET_NULL;

  rc->input_conf_n = 0;
  rc->input_conf[0] = '\0';
  rc->output_conf_get_n = 0;
  rc->output_conf_get[0] = '\0';
  rc->output_conf_put_n = 0;
  rc->output_conf_put[0] = '\0';

  rc->result_str[0] = '\0';

#if REDIRECT_CALL_PARAMS_NEW
  rc->nparams = 0;
#else
  rc->dense_nparams = 0;
#endif

  rc->input_offset = rc->output_offset = 0;
  rc->input = 0;
  rc->output = 0;
  rc->result = 0;

  rc->free_nbufs = 0;

#if REDIRECT_CALL_PARAMS_CACHE
  rc->cache = 0;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, (%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x44(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x148(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x150(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x168(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x160(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x568(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x158(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x368(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x768(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x868(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb04(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb00(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb08(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xb18(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0xb20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0xba8(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)