LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/2TallTim[P]modern-raytracing/bvh.cpp
// Function: bvh_node::hit(ray const&, double, double, hit_record&) const
bool bvh_node::hit(const ray& r, double t_min, double t_max, hit_record& rec) const {
    if(box.hit(r,t_min,t_max)){
        hit_record left_rec, right_rec;
        bool hit_left = left->hit(r,t_min,t_max,left_rec);
        bool hit_right = right->hit(r,t_min,t_max,right_rec);
        if(hit_left && hit_right){
            rec = left_rec.t < right_rec.t ? left_rec : right_rec;
            return true;
        } else if(hit_left) {
            rec = left_rec;
            return true;
        } else if(hit_right) {
            rec = right_rec;
            return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
addq $0x28, %rdi
movsd %xmm0, (%rsp)
movsd %xmm1, 0x8(%rsp)
callq 0x7c42
testb %al, %al
je 0x777e
xorps %xmm0, %xmm0
leaq 0x58(%rsp), %r14
movups %xmm0, 0x38(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x8(%r14)
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movups %xmm0, 0x28(%rsp)
movups %xmm0, 0x18(%rsp)
movq 0x8(%r12), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %r14, %rdx
callq *(%rax)
movl %eax, %ebp
movq 0x18(%r12), %rdi
movq (%rdi), %rax
leaq 0x10(%rsp), %r12
movq %r15, %rsi
movsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %r12, %rdx
callq *(%rax)
movl %ebp, %ecx
andb %al, %cl
cmpb $0x1, %cl
jne 0x7706
leaq 0x10(%rsp), %r14
movsd (%r14), %xmm0
leaq 0x58(%rsp), %rax
ucomisd (%rax), %xmm0
cmovaq %rax, %r14
movq 0x30(%r14), %rax
movq %rax, 0x30(%rbx)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x38(%r14), %rax
jmp 0x773d
testb %bpl, %bpl
je 0x7790
movq 0x88(%rsp), %rax
movq %rax, 0x30(%rbx)
movups 0x58(%rsp), %xmm0
movups 0x68(%rsp), %xmm1
movups 0x78(%rsp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x90(%rsp), %rax
movq %rax, 0x38(%rbx)
addq $0x40, %rbx
addq $0x40, %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37a6
xorl %ebp, %ebp
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x7765
callq 0x37ec
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x7777
callq 0x37ec
movb $0x1, %al
testb %bpl, %bpl
je 0x7780
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %bpl
testb %al, %al
je 0x7756
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rbx)
movups 0x10(%rsp), %xmm0
movups 0x20(%rsp), %xmm1
movups 0x30(%rsp), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
movq 0x48(%rsp), %rax
movq %rax, 0x38(%rbx)
movq %r12, %r14
jmp 0x7741
jmp 0x77cd
movq %rax, %rbx
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x77df
callq 0x37ec
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x77f1
callq 0x37ec
movq %rbx, %rdi
callq 0x32e0
nop
// File: /workspace/github_cpp_makefile_star2_O1/2TallTim[P]modern-raytracing/./aabb.hpp
// Function: aabb::hit(ray const&, double, double) const
bool hit(const ray& r, double tmin, double tmax) const {
        for (int a = 0; a < 3; a++){
            double invD = 1.0 / r.direction()[a];
            double t0 = (_min[a] - r.origin()[a]) * invD;
            double t1 = (_max[a] - r.origin()[a]) * invD;

            if(invD < 0) std::swap(t0,t1);

            tmin = t0 > tmin ? t0 : tmin;
            tmax = t1 < tmax ? t1 : tmax;

            if (tmax <= tmin) return false;
        }
        return true;
    }

// Assembly:
leaq 0x18(%rsi), %rcx
xorl %edx, %edx
movsd 0x2418(%rip), %xmm2     # 0xa068
xorpd %xmm3, %xmm3
xorl %eax, %eax
movq 0x10(%rcx), %r8
movq %r8, -0x8(%rsp)
movups (%rcx), %xmm4
movaps %xmm4, -0x18(%rsp)
movapd %xmm2, %xmm4
divsd -0x18(%rsp,%rdx,8), %xmm4
movsd (%rdi,%rdx,8), %xmm5
movq 0x10(%rsi), %r8
movq %r8, -0x8(%rsp)
movups (%rsi), %xmm6
movaps %xmm6, -0x18(%rsp)
subsd -0x18(%rsp,%rdx,8), %xmm5
mulsd %xmm4, %xmm5
movsd 0x18(%rdi,%rdx,8), %xmm7
movq 0x10(%rsi), %r8
movq %r8, -0x8(%rsp)
movups (%rsi), %xmm6
movaps %xmm6, -0x18(%rsp)
subsd -0x18(%rsp,%rdx,8), %xmm7
mulsd %xmm4, %xmm7
ucomisd %xmm4, %xmm3
movapd %xmm7, %xmm6
ja 0x7cc0
movapd %xmm5, %xmm6
maxsd %xmm0, %xmm6
cmpltsd %xmm3, %xmm4
andpd %xmm4, %xmm5
andnpd %xmm7, %xmm4
orpd %xmm5, %xmm4
minsd %xmm1, %xmm4
ucomisd %xmm4, %xmm6
jae 0x7cff
cmpq $0x2, %rdx
leaq 0x1(%rdx), %r8
setae %al
movq %r8, %rdx
movapd %xmm4, %xmm1
movapd %xmm6, %xmm0
cmpq $0x3, %r8
jne 0x7c56
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/0x6D70[P]chip8_emu/src/cpu.cpp
// Function: Cpu::Cpu()
Cpu::Cpu() {
    // clear ram
    for (int i = 0; i < 0x1000; i++) {
        this->state.ram[i] = 0;
    }

    // clear screen
    for (int y = 0; y < VIDEO_HEIGHT; y++) {
        for (int x = 0; x < VIDEO_WIDTH; x++) {
            this->state.video[x][y] = false;
        }
    }

    // load font
    unsigned char chip8_fontset[80] =
    {
            0xF0, 0x90, 0x90, 0x90, 0xF0, // 0
            0x20, 0x60, 0x20, 0x20, 0x70, // 1
            0xF0, 0x10, 0xF0, 0x80, 0xF0, // 2
            0xF0, 0x10, 0xF0, 0x10, 0xF0, // 3
            0x90, 0x90, 0xF0, 0x10, 0x10, // 4
            0xF0, 0x80, 0xF0, 0x10, 0xF0, // 5
            0xF0, 0x80, 0xF0, 0x90, 0xF0, // 6
            0xF0, 0x10, 0x20, 0x40, 0x40, // 7
            0xF0, 0x90, 0xF0, 0x90, 0xF0, // 8
            0xF0, 0x90, 0xF0, 0x10, 0xF0, // 9
            0xF0, 0x90, 0xF0, 0x90, 0x90, // A
            0xE0, 0x90, 0xE0, 0x90, 0xE0, // B
            0xF0, 0x80, 0x80, 0x80, 0xF0, // C
            0xE0, 0x90, 0x90, 0x90, 0xE0, // D
            0xF0, 0x80, 0xF0, 0x80, 0xF0, // E
            0xF0, 0x80, 0xF0, 0x80, 0x80  // F
    };

    for (int i = 0; i < 80; i++) {
        this->state.ram[0x50 + i] = chip8_fontset[i];
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
addq $0x1810, %rdi           # imm = 0x1810
xorps %xmm0, %xmm0
movups %xmm0, 0x1850(%rbx)
movups %xmm0, 0x1840(%rbx)
movups %xmm0, 0x1830(%rbx)
movups %xmm0, 0x1820(%rbx)
movups %xmm0, 0x1810(%rbx)
xorl %r14d, %r14d
xorl %esi, %esi
callq 0x30cc
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2120
leaq 0x1010(%rbx), %rax
xorl %ecx, %ecx
movb $0x0, (%rax,%rcx)
addq $0x20, %rcx
cmpq $0x800, %rcx            # imm = 0x800
jne 0x250b
incq %r14
incq %rax
cmpq $0x20, %r14
jne 0x2509
addq $0x50, %rbx
leaq 0x1bdd(%rip), %rsi      # 0x4110
movl $0xa, %ecx
movq %rbx, %rdi
rep  movsq (%rsi), %es:(%rdi)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/0x6D70[P]chip8_emu/src/cpu.cpp
// Function: Cpu::load_rom(char*)
void Cpu::load_rom(char *path) {
    FILE *fp = fopen(path, "rb");
    std::filesystem::path p{path};
    fread(&this->state.ram[0x200], 1, (size_t)std::filesystem::file_size(p), fp);
    fclose(fp);

    this->state.pc = 0x200;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rsi, %rax
movq %rdi, %rbx
leaq -0x28(%rbp), %r15
movq %rsi, (%r15)
leaq 0x1bf9(%rip), %rsi      # 0x4160
movq %rax, %rdi
callq 0x2240
movq %rax, %r14
leaq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl $0x2, %edx
callq 0x2ffc
movq %r12, %rdi
callq 0x2250
leaq 0x200(%rbx), %rdi
movl $0x1, %esi
movq %rax, %rdx
movq %r14, %rcx
callq 0x2280
movq %r14, %rdi
callq 0x2200
movw $0x200, 0x1860(%rbx)    # imm = 0x200
leaq -0x50(%rbp), %rdi
callq 0x3084
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3084
movq %rbx, %rdi
callq 0x22d0
// File: /workspace/github_cpp_makefile_star2_O1/0x6D70[P]chip8_emu/src/cpu.cpp
// Function: keysym_to_index(SDL_Keysym)
uint8_t keysym_to_index(SDL_Keysym keysym) {
    switch (keysym.sym) {
        case SDLK_1:
            return 0x1;
        case SDLK_2:
            return 0x2;
        case SDLK_3:
            return 0x3;
        case SDLK_4:
            return 0xc;
        
        case SDLK_q:
            return 0x4;
        case SDLK_w:
            return 0x5;
        case SDLK_e:
            return 0x6;
        case SDLK_r:
            return 0xd;
        
        case SDLK_a:
            return 0x7;
        case SDLK_s:
            return 0x8;
        case SDLK_d:
            return 0x9;
        case SDLK_f:
            return 0xe;
        
        case SDLK_z:
            return 0xa;
        case SDLK_x:
            return 0x0;
        case SDLK_c:
            return 0xb;
        case SDLK_v:
            return 0xf;
        
        default:
            return 0xff;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
shrq $0x20, %rdi
leal -0x61(%rdi), %eax
cmpl $0x19, %eax
ja 0x2604
leaq 0x1a29(%rip), %rcx      # 0x4020
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb $0x7, %al
jmp 0x265a
addl $-0x31, %edi
cmpl $0x3, %edi
ja 0x2620
leaq 0x19fd(%rip), %rax      # 0x4010
movslq (%rax,%rdi,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movb $0x1, %al
jmp 0x265a
movb $-0x1, %al
jmp 0x265a
movb $0x8, %al
jmp 0x265a
movb $0x5, %al
jmp 0x265a
movb $0xe, %al
jmp 0x265a
movb $0xb, %al
jmp 0x265a
xorl %eax, %eax
jmp 0x265a
movb $0x4, %al
jmp 0x265a
movb $0x9, %al
jmp 0x265a
movb $0x6, %al
jmp 0x265a
movb $0xd, %al
jmp 0x265a
movb $0xf, %al
jmp 0x265a
movb $0xa, %al
jmp 0x265a
movb $0x3, %al
jmp 0x265a
movb $0xc, %al
jmp 0x265a
movb $0x2, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/0x6D70[P]chip8_emu/src/cpu.cpp
// Function: isKeyPressed(bool*)
bool isKeyPressed(bool keys[0x10]) {
    for (int i = 0; i < 0x10; i++) {
        if (keys[i])
            return true;
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x1, %al
cmpb $0x0, (%rdi)
jne 0x2684
xorl %ecx, %ecx
movq %rcx, %rax
cmpq $0xf, %rcx
je 0x267d
leaq 0x1(%rax), %rcx
cmpb $0x1, 0x1(%rdi,%rax)
jne 0x2669
cmpq $0xf, %rax
setb %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/0x6D70[P]chip8_emu/src/main.cpp
// Function: main
int main(int argc, char **argv) {

	if (argc < 2) {
		std::cout << "no file specified" << std::endl;
		return EXIT_FAILURE;
	}

	SDL_Init(SDL_INIT_EVERYTHING);
		
	SDL_Window *window = SDL_CreateWindow(
		"CHIP8 interpreter",
		SDL_WINDOWPOS_CENTERED,
		SDL_WINDOWPOS_CENTERED,
		VIDEO_WIDTH * VIDEO_MULTI,
		VIDEO_HEIGHT * VIDEO_MULTI,
		SDL_WINDOW_SHOWN
		//SDL_WINDOW_HIDDEN
	);

	SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, 0);
	
	if (window == NULL) {
		std::cout << "Could not create window: " << SDL_GetError() << std::endl;
		return 1;
	}

	Cpu cpu;
	cpu.load_rom(argv[1]);
	cpu.run(renderer);
	
	SDL_Delay(1000);	
	SDL_DestroyWindow(window);	
	SDL_Quit();

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1870, %rsp           # imm = 0x1870
cmpl $0x1, %edi
jg 0x35c7
movq 0x2a56(%rip), %rbx      # 0x5fd8
leaq 0xc53(%rip), %rsi       # 0x41dc
movl $0x11, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21f0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
movl $0x1, %eax
jmp 0x3661
movq %rsi, %r14
movl $0xf231, %edi           # imm = 0xF231
callq 0x21c0
leaq 0xc13(%rip), %rdi       # 0x41ee
movl $0x2fff0000, %esi       # imm = 0x2FFF0000
movl $0x2fff0000, %edx       # imm = 0x2FFF0000
movl $0x500, %ecx            # imm = 0x500
movl $0x280, %r8d            # imm = 0x280
movl $0x4, %r9d
callq 0x2060
movq %rax, %rbx
movq %rax, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x2050
testq %rbx, %rbx
je 0x3671
movq %rax, %r15
leaq -0x1888(%rbp), %r12
movq %r12, %rdi
callq 0x24b2
movq 0x8(%r14), %rsi
movq %r12, %rdi
callq 0x2544
leaq -0x1888(%rbp), %rdi
movq %r15, %rsi
callq 0x2686
movl $0x3e8, %edi            # imm = 0x3E8
callq 0x2160
movq %rbx, %rdi
callq 0x2030
callq 0x2070
leaq -0x78(%rbp), %rdi
callq 0x36e4
xorl %eax, %eax
addq $0x1870, %rsp           # imm = 0x1870
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x2960(%rip), %rbx      # 0x5fd8
leaq 0xb81(%rip), %rsi       # 0x4200
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2230
callq 0x2170
testq %rax, %rax
je 0x36b3
movq %rax, %r14
movq %rax, %rdi
callq 0x20f0
movq 0x2930(%rip), %rdi      # 0x5fd8
movq %r14, %rsi
movq %rax, %rdx
jmp 0x3591
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x22c0
jmp 0x3596
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x36e4
movq %rbx, %rdi
callq 0x22d0
nop
// File: /workspace/github_cpp_makefile_star2_O1/macfergus[P]baduk/cppsrc/apps/demo.cpp
// Function: main
int main() {
        baduk::Board board(19, 19);
        board.place("E4", baduk::Stone::black);
        board.place(baduk::Point(4, 4), baduk::Stone::white);
        board.place(baduk::Point(4, 3), baduk::Stone::black);
        board.place(baduk::Point(4, 5), baduk::Stone::white);
        board.place(baduk::Point(3, 5), baduk::Stone::black);
        board.place(baduk::Point(5, 5), baduk::Stone::black);
        board.place(baduk::Point(5, 4), baduk::Stone::black);
        board.place(baduk::Point(3, 3), baduk::Stone::white);
        board.place(baduk::Point(4, 6), baduk::Stone::black);
        print_board(board);
        return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x5b38, %rsp           # imm = 0x5B38
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movl $0x13, %esi
movl $0x13, %edx
callq 0xfd82
leaq 0x1180(%rip), %rsi      # 0x12602
movq %rsp, %r14
movq %r14, %rdi
callq 0x11554
movq (%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xfe56
movabsq $0x400000004, %r14      # imm = 0x400000004
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0xfe56
movabsq $0x300000003, %r15      # imm = 0x300000003
leaq 0x1(%r15), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0xfe56
movabsq $0x500000003, %r12      # imm = 0x500000003
leaq 0x1(%r12), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0xfe56
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xfe56
addq $0x2, %r12
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0xfe56
incq %r14
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xfe56
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xfe56
movabsq $0x600000004, %rsi      # imm = 0x600000004
movq %rbx, %rdi
xorl %edx, %edx
callq 0xfe56
movq %rbx, %rdi
callq 0x11394
xorl %eax, %eax
addq $0x5b38, %rsp           # imm = 0x5B38
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./bench/benchmark.h
// Function: benchmark_t<unsigned long>::benchmark_t(bool)
benchmark_t(bool enable_pcm){
	    if(enable_pcm){
		pcm = PCM::getInstance();
		auto status = pcm->program();
		if(status != PCM::Success){
		    std::cout << "Error opening PCM: " << status << std::endl;
		    exit(0);
		}
	    }
	    else
		pcm = nullptr;
	}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq $0x0, (%rdi)
testl %esi, %esi
je 0xa9fe
callq 0x1aab0
movq %rax, 0x18(%rbx)
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1ee60
movl %eax, %ebp
testl %eax, %eax
je 0xaa06
movq 0x305e8(%rip), %rdi     # 0x3afb8
leaq 0x2199e(%rip), %rsi     # 0x2c375
movl $0x13, %edx
callq 0x5470
movq 0x305d0(%rip), %rdi     # 0x3afb8
movl %ebp, %esi
callq 0x5710
movq %rax, %rdi
callq 0x51c0
xorl %edi, %edi
callq 0x54d0
movq $0x0, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xaa0d
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xaa1e
movq (%rdi), %rax
callq *0x10(%rax)
movq $0x0, (%rbx)
movq %r14, %rdi
callq 0x5740
nop
// File: /workspace/github_cpp_makefile_star2_O1/chahk0129[P]hash_bench/./pcm/cpucounters.h
// Function: PCM::getQPILinksPerSocket() const
uint64 getQPILinksPerSocket() const
    {
        switch (cpu_model)
        {
        case NEHALEM_EP:
        case WESTMERE_EP:
        case CLARKDALE:
            if (num_sockets == 2)
                return 2;
            else
                return 1;
        case NEHALEM_EX:
        case WESTMERE_EX:
            return 4;
        case JAKETOWN:
        case IVYTOWN:
        case HASWELLX:
        case BDX_DE:
        case BDX:
            return (server_pcicfg_uncore.size() && server_pcicfg_uncore[0].get()) ? (server_pcicfg_uncore[0]->getNumQPIPorts()) : 0;
        }
        return 0;
    }

// Assembly:
movl 0x4(%rdi), %eax
leal -0x25(%rax), %ecx
cmpl $0xa, %ecx
jbe 0x100f2
leal -0x3e(%rax), %ecx
cmpl $0x18, %ecx
ja 0x100eb
movl $0x1020003, %edx        # imm = 0x1020003
btl %ecx, %edx
jb 0x1010f
cmpl $0x1a, %eax
je 0x10102
jmp 0x10134
leaq 0x1bf9b(%rip), %rax     # 0x2c094
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
xorl %eax, %eax
cmpl $0x2, 0x18(%rdi)
sete %al
incq %rax
retq
movq 0xd8(%rdi), %rax
cmpq %rax, 0xe0(%rdi)
je 0x10134
movq (%rax), %rcx
testq %rcx, %rcx
je 0x10134
movq 0x48(%rcx), %rax
subq 0x40(%rcx), %rax
sarq $0x4, %rax
retq
xorl %eax, %eax
retq
movl $0x4, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: wire_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
wire wire_name(wire full_name){
    /*------------------------------------------------------------------------------------------
    This is a very usefull function to extract the wire name from a wire declaration string.

    Params : full_name (wire), full name including width. Example : "[9:0] my_wire"
    Returns : Parsed string, if input contains infomration about widths. Example : "my_wire"                      
    ------------------------------------------------------------------------------------------*/
    string delim = "] ";
    size_t index;
    if(string::npos != (index = full_name.find(delim, 0))){
        return full_name.substr(index + 2);
    }
    else{
        return full_name;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0x30(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2f192(%rip), %rsi     # 0x37053
leaq 0x2f18d(%rip), %rdx     # 0x37055
leaq -0x40(%rbp), %r15
movq %r15, %rdi
callq 0x7200
movq (%r15), %rsi
movq 0x8(%r15), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x7830
cmpq $-0x1, %rax
je 0x7f06
addq $0x2, %rax
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movq $-0x1, %rcx
callq 0x7540
jmp 0x7f43
leaq 0x10(%rbx), %rcx
movq %rcx, (%rbx)
movq (%r14), %rdx
leaq 0x10(%r14), %rax
cmpq %rax, %rdx
je 0x7f25
movq %rdx, (%rbx)
movq (%rax), %rcx
movq %rcx, 0x10(%rbx)
jmp 0x7f2b
movups (%rax), %xmm0
movups %xmm0, (%rcx)
movq 0x8(%r14), %rcx
movq %rcx, 0x8(%rbx)
movq %rax, (%r14)
movq $0x0, 0x8(%r14)
movb $0x0, 0x10(%r14)
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f58
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x7510
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r12, %rdi
je 0x7f80
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x7510
movq %rbx, %rdi
callq 0x7870
// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: Chip::generate_verilog[abi:cxx11]()
string Chip::generate_verilog(){
    /*------------------------------------------------------------------------------------------
    This function generates a formated output string verilog code.       

    Params : None
    Returns : code (string), output verilog code                          
    ------------------------------------------------------------------------------------------*/
    string code = "// Generated code\n// Sooryakiran P\n// ME17B174\n";
    set<string> headers = this->define_headers();
    for (set<string>::iterator i = headers.begin(); i != headers.end(); i++){
        code += "\n" + *i + "\n";
    }
    return code;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x2f06f(%rip), %rsi     # 0x37020
leaq 0x2f097(%rip), %rdx     # 0x3704f
callq 0x7200
leaq -0xa0(%rbp), %rdi
movq %r14, %rsi
callq 0x7660
leaq -0x98(%rbp), %rax
movq 0x10(%rax), %r14
cmpq %rax, %r14
je 0x80a1
leaq -0x40(%rbp), %r13
leaq 0x2f11d(%rip), %r15     # 0x37108
leaq -0x70(%rbp), %r12
leaq 0x20(%r14), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x7480
movq %r12, %rdi
movq %r15, %rsi
callq 0x7910
movq %r13, -0x50(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x8029
movq %rdx, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0x8031
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x7140
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x806d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x8086
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x75d0
movq %rax, %r14
leaq -0x98(%rbp), %rax
cmpq %rax, %r14
jne 0x7fef
leaq -0xa0(%rbp), %rdi
callq 0x7770
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x810b
movq %rax, %r14
jmp 0x80ff
movq %rax, %r14
jmp 0x80e6
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x80e6
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x80ff
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
leaq -0xa0(%rbp), %rdi
callq 0x7770
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x8123
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x7870
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: Chip::define_headers[abi:cxx11]()
set<string> Chip::define_headers(){
    /*------------------------------------------------------------------------------------------
    This function recursively iterates through all the submodules if any to generate a set of
    module definitions.         

    Params : None
    Returns : all_headers (set<string>), a set of all module and submodule definitions.                          
    ------------------------------------------------------------------------------------------*/
    set<string> all_headers;
    all_headers.insert(this->definition);

    for(vector<Chip>::iterator sub = this->submodules.begin();
                               sub != this->submodules.end();
                               sub++){
        set<string> sub_header = sub->define_headers();
        all_headers.insert(sub_header.begin(), sub_header.end());
    }

    return all_headers;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
movl $0x0, 0x8(%rdi)
xorl %ecx, %ecx
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
addq $0x20, %rsi
callq 0x7790
movq 0x68(%r14), %r15
cmpq 0x70(%r14), %r15
je 0x81aa
leaq -0x50(%rbp), %r12
leaq -0x58(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x7660
movq -0x40(%rbp), %rsi
movq %rbx, %rdi
movq %r12, %rdx
callq 0x77f0
movq %r13, %rdi
callq 0x7770
addq $0x198, %r15            # imm = 0x198
cmpq 0x70(%r14), %r15
jne 0x817b
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x81be
movq %rax, %r14
jmp 0x81cf
movq %rax, %r14
leaq -0x58(%rbp), %rdi
callq 0x7770
movq %rbx, %rdi
callq 0x7770
movq %r14, %rdi
callq 0x7870
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: Chip::num_transistors()
int Chip::num_transistors(){
    /*------------------------------------------------------------------------------------------
    This function recursively iterates through all the submodules and behaviours if any to count
    the number of transistors required to create an instance.

    Params : None
    Returns : total (int), transitor count.                         
    ------------------------------------------------------------------------------------------*/
    int total = this->transistors;
    
    for(vector<Chip>::iterator sub = this->submodules.begin();
                               sub != this->submodules.end();
                               sub++){

        total += sub->num_transistors();
    }

    for(vector<BehaviourModel>::iterator sub = this->behaviours.begin();
                                         sub != this->behaviours.end();
                                         sub ++){
        total += sub->num_transistors;
    }

    return total;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
movl 0x60(%rdi), %ebx
movq 0x68(%rdi), %r15
movq 0x70(%rdi), %r12
cmpq %r12, %r15
je 0x8211
movq %r15, %rdi
callq 0x7530
addl %eax, %ebx
addq $0x198, %r15            # imm = 0x198
jmp 0x81f9
movq 0x178(%r14), %rax
movq 0x180(%r14), %rcx
cmpq %rcx, %rax
je 0x822c
addl (%rax), %ebx
addq $0x38, %rax
jmp 0x821f
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: BehaviourModel::code[abi:cxx11]()
string BehaviourModel::code(){
    /*------------------------------------------------------------------------------------------
    TReturns the verilog code for the current behaviour as string.

    Returns: outs(string), verilog code for the current behaviour.
    ------------------------------------------------------------------------------------------*/
    string outs = "always @(";
    
    for(vector<string>::iterator i = this->sensitivity_list.begin(); i != this->sensitivity_list.end(); i++){
        if(i != this->sensitivity_list.begin()){
            outs += " or ";
        }
        outs += *i;
    }
    outs += ")\nbegin";

    for(vector<string>::iterator i = this->statements.begin(); i != this->statements.end(); i++){
        outs += "\n\t" + *i + ";";
    }
    outs +="\nend";
    return outs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x50(%rbp)
movq %rax, (%rdi)
leaq 0x2d682(%rip), %rsi     # 0x37147
leaq 0x2d684(%rip), %rdx     # 0x37150
callq 0x7200
movq 0x20(%r14), %r12
cmpq 0x28(%r14), %r12
je 0x9b0e
leaq 0x2d66f(%rip), %r15     # 0x37151
cmpq 0x20(%r14), %r12
je 0x9af3
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7910
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x7140
addq $0x20, %r12
cmpq 0x28(%r14), %r12
jne 0x9ae2
leaq 0x2d641(%rip), %rsi     # 0x37156
movq %rbx, %rdi
callq 0x7910
movq 0x8(%r14), %r15
cmpq 0x10(%r14), %r15
je 0x9bdf
leaq -0x38(%rbp), %r12
leaq -0x70(%rbp), %r13
movq %r13, %rdi
leaq 0x2d5f2(%rip), %rsi     # 0x3712f
movq %r15, %rdx
callq 0x7480
movq %r13, %rdi
leaq 0x2dbc3(%rip), %rsi     # 0x37712
callq 0x7910
movq %r12, -0x48(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9b74
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9b7c
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rbx, %rdi
callq 0x7140
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x9bb8
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9bd1
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x20, %r15
cmpq 0x10(%r14), %r15
jne 0x9b33
leaq 0x2d578(%rip), %rsi     # 0x3715e
movq %rbx, %rdi
callq 0x7910
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9c3c
jmp 0x9c3c
movq %rax, %r14
jmp 0x9c21
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x9c21
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x9c3f
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x9c3f
movq %rax, %r14
movq (%rbx), %rdi
movq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x9c56
movq (%rax), %rsi
incq %rsi
callq 0x7510
movq %r14, %rdi
callq 0x7870
// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: BehaviourModel::BehaviourModel(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
BehaviourModel::BehaviourModel(vector<string> sense_list){
    /*------------------------------------------------------------------------------------------
    The class constructor. 

    Param: sense_list (vector<string>), Sensitivity list
    ------------------------------------------------------------------------------------------*/
    this->sensitivity_list = sense_list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl $0x0, (%rdi)
leaq 0x8(%rdi), %rbx
leaq 0x20(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x28(%rdi)
movq %r14, %rdi
callq 0x7570
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x73a0
movq %rbx, %rdi
callq 0x73a0
movq %r15, %rdi
callq 0x7870
nop
// File: /workspace/github_cpp_makefile_star2_O1/Sooryakiran[P]dotV/src/verilog.cpp
// Function: BehaviourModel::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool)
void BehaviourModel::add(string lhs, string rhs, bool is_blocking){
    /*------------------------------------------------------------------------------------------
    Adds a new statement to the behaviour model.

    Param: lhs(string), Left hand side of the statement.
    Param: rhs(string), Right hand side of the statment.
    Param: is_blocking(bool), BLOCK/N_BLOCK for blovking or non blocking statements
    ------------------------------------------------------------------------------------------*/
    string asg = (is_blocking)? " = " : " <= " ;
    string expr = lhs + asg + rhs;
    this->statements.push_back(expr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2d469(%rip), %rax     # 0x3713e
leaq 0x2d466(%rip), %rsi     # 0x37142
testl %ecx, %ecx
cmovneq %rax, %rsi
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
movl %ecx, %eax
movq %rsi, %rdx
subq %rax, %rdx
addq $0x4, %rdx
leaq -0x88(%rbp), %r12
movq %r12, %rdi
callq 0x7200
leaq -0x68(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x7930
movq (%r14), %rsi
movq 0x8(%r14), %rdx
leaq -0x68(%rbp), %rdi
callq 0x7140
leaq -0x38(%rbp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x9d48
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9d4f
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9d7f
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x8, %rbx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x72a0
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x9da4
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x7510
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x9dbc
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x7510
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r14, %rdi
je 0x9dfe
movq -0x38(%rbp), %rsi
jmp 0x9df1
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9dfe
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x7510
jmp 0x9dfe
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r13, %rdi
je 0x9e16
movq -0x78(%rbp), %rsi
incq %rsi
callq 0x7510
movq %rbx, %rdi
callq 0x7870
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/main.cc
// Function: ValidateCommanderId(std::vector<net::Address, std::allocator<net::Address>>&, int)
void ValidateCommanderId(generals::ProcessList& processes, int commander_id) {
  // Make sure the commander_id is valid
  if (commander_id < 0 || (size_t)commander_id >= processes.size()) {
    throw args::ValidationError("commander_id does not reference a process");
  }
  // Move the commander to the first element in the vector
  std::iter_swap(processes.begin(), processes.begin() + commander_id);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
testl %esi, %esi
js 0x6bbd
movl %esi, %eax
movq (%rdi), %rbx
movq 0x8(%rdi), %rcx
subq %rbx, %rcx
sarq $0x3, %rcx
movabsq $-0x3333333333333333, %rdx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rcx, %rdx
cmpq %rax, %rdx
jbe 0x6bbd
leaq (%rax,%rax,4), %rax
leaq (%rbx,%rax,8), %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rbx), %rcx
leaq 0x10(%rbx), %rax
cmpq %rax, %rcx
je 0x6b45
movq %rcx, 0x8(%rsp)
movq (%rax), %rcx
movq %rcx, 0x18(%rsp)
jmp 0x6b4d
movups (%rax), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rbx), %rcx
leaq 0x8(%rsp), %r15
movq %rcx, 0x8(%r15)
movq %rax, (%rbx)
movq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
movzwl 0x20(%rbx), %eax
movw %ax, 0x20(%r15)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53f0
movzwl 0x20(%r14), %eax
movw %ax, 0x20(%rbx)
movq %r14, %rdi
movq %r15, %rsi
callq 0x53f0
movzwl 0x20(%r15), %eax
movw %ax, 0x20(%r14)
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x6bb0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xfd80(%rip), %rsi      # 0x1695a
leaq 0xfda2(%rip), %rdx      # 0x16983
leaq 0x8(%rsp), %rdi
callq 0xe47e
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5410
leaq 0x18926(%rip), %rax     # 0x1f528
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x18842(%rip), %rsi     # 0x1f450
movq 0x1936b(%rip), %rdx     # 0x1ff80
movq %rbx, %rdi
callq 0x55d0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6c3f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x6c3f
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x6c4c
movq %rbx, %rdi
callq 0x5270
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/main.cc
// Function: ValidateFaultyCount(std::vector<net::Address, std::allocator<net::Address>> const&, int)
void ValidateFaultyCount(const generals::ProcessList& processes, int faulty) {
  if (faulty < 0) {
    throw args::ValidationError("faulty count must be non-negative");
  }
  if ((size_t)faulty + 2 > processes.size()) {
    throw args::ValidationError(
        "the total number of processes must be no less than (faulty + 2)");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
testl %esi, %esi
js 0x6c8e
addl $0x2, %esi
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rcx
cmpq %rsi, %rcx
jb 0x6cf0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xfcd9(%rip), %rsi      # 0x16984
leaq 0xfcf3(%rip), %rdx      # 0x169a5
leaq 0x8(%rsp), %rdi
callq 0xe47e
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5410
leaq 0x18855(%rip), %rax     # 0x1f528
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x18771(%rip), %rsi     # 0x1f450
movq 0x1929a(%rip), %rdx     # 0x1ff80
movq %rbx, %rdi
callq 0x55d0
jmp 0x6d50
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xfc99(%rip), %rsi      # 0x169a6
leaq 0xfcd1(%rip), %rdx      # 0x169e5
leaq 0x8(%rsp), %rdi
callq 0xe47e
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5410
leaq 0x187f3(%rip), %rax     # 0x1f528
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x1870f(%rip), %rsi     # 0x1f450
movq 0x19238(%rip), %rdx     # 0x1ff80
movq %rbx, %rdi
callq 0x55d0
jmp 0x6d54
jmp 0x6d70
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x6d76
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
jmp 0x6d76
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x6d83
movq %rbx, %rdi
callq 0x5270
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/include/args.h
// Function: args::ValueFlagList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector, args::ValueReader<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::Reset()
virtual void Reset() noexcept {
    matched = false;
#ifdef ARGS_NOEXCEPT
    error = Error::None;
#endif
  }

// Assembly:
movb $0x0, 0x8(%rdi)
movq 0xc8(%rdi), %rsi
addq $0xc8, %rdi
jmp 0xfaac
nop
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/include/args.h
// Function: args::ValueFlagList<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector, args::ValueReader<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>::ParseValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
virtual void ParseValue(const std::string &value_) override {
    T v;
#ifdef ARGS_NOEXCEPT
    if (!reader(name, value_, v)) {
      error = Error::Parse;
    }
#else
    reader(name, value_, v);
#endif
    values.insert(std::end(values), v);
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x8(%rsp), %rdi
callq 0x51e0
movq 0xd0(%rbx), %rsi
addq $0xc8, %rbx
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0xfafe
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xf9f9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
addq $0x28, %rsp
popq %rbx
popq %r14
retq
jmp 0xfa03
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0xfa1d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movq %rbx, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/udp_conn.cc
// Function: udp::Client::Send(char const*, unsigned long) const
void Client::Send(const char *buf, size_t size) const {
  auto addr = remote_address_.addr();
  auto addrlen = remote_address_.addr_len();
  if (sendto(sockfd_, buf, size, 0, addr, addrlen) < 0) {
    throw net::SendException();
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl 0x10(%rdi), %eax
leaq 0x14(%rdi), %r8
movl %eax, %edi
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x5060
testq %rax, %rax
js 0x10581
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x180, %edi            # imm = 0x180
callq 0x51a0
movq %rax, %rbx
movq %rax, %rdi
callq 0x10a8e
leaq 0xf483(%rip), %rsi      # 0x1fa20
leaq 0x640(%rip), %rdx       # 0x10be4
movq %rbx, %rdi
callq 0x55d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x5270
movq %r14, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/message.cc
// Function: msg::OrderString[abi:cxx11](msg::Order)
std::string OrderString(Order o) {
  switch (o) {
    case Order::RETREAT:
      return "retreat";
    case Order::ATTACK:
      return "attack";
    case Order::NO_ORDER:
      return "no order";
    default:
      throw std::invalid_argument("unexpected Order value");
  }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, %esi
je 0x1114b
cmpl $0x1, %esi
je 0x11134
testl %esi, %esi
jne 0x11173
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x61ed(%rip), %rsi      # 0x17318
leaq 0x61ed(%rip), %rdx      # 0x1731f
jmp 0x11160
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x61de(%rip), %rsi      # 0x17320
leaq 0x61dd(%rip), %rdx      # 0x17326
jmp 0x11160
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x61f8(%rip), %rsi      # 0x17351
leaq 0x61f9(%rip), %rdx      # 0x17359
movq %rbx, %rdi
callq 0xe47e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
leaq 0x61d3(%rip), %rsi      # 0x1735a
movq %rax, %rdi
callq 0x5650
movq 0xee32(%rip), %rsi      # 0x1ffc8
movq 0xee0b(%rip), %rdx      # 0x1ffa8
movq %rbx, %rdi
callq 0x55d0
movq %rax, %r14
movq %rbx, %rdi
callq 0x5270
movq %r14, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/message.cc
// Function: msg::operator<(msg::Message const&, msg::Message const&)
bool operator<(const Message& lhs, const Message& rhs) {
  if (lhs.round != rhs.round) {
    return lhs.round < rhs.round;
  }
  if (lhs.ids != rhs.ids) {
    return lhs.ids < rhs.ids;
  }
  return lhs.order < rhs.order;
}

// Assembly:
movl (%rsi), %eax
cmpl %eax, (%rdi)
jne 0x1124d
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r12
movq 0x8(%rdi), %r14
movq 0x10(%rdi), %r13
movq %r13, %rdx
subq %r14, %rdx
movq 0x8(%rsi), %rbx
movq 0x10(%rsi), %r8
movq %r8, %rbp
subq %rbx, %rbp
cmpq %rbp, %rdx
jne 0x1121f
cmpq %r14, %r13
je 0x11251
movq %r14, %rdi
movq %rbx, %rsi
movq %r8, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
callq 0x5360
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %r8
testl %eax, %eax
je 0x11251
leaq (%r14,%rbp), %rax
cmpq %rdx, %rbp
cmovlq %rax, %r13
cmpq %r14, %r13
je 0x11245
movl (%r14), %eax
movl (%rbx), %ecx
cmpl %eax, %ecx
jne 0x1125f
addq $0x4, %r14
addq $0x4, %rbx
cmpq %r13, %r14
jne 0x1122f
cmpq %r8, %rbx
setne %al
jmp 0x11262
setb %al
retq
movl 0x4(%r12), %eax
cmpl 0x4(%r15), %eax
setl %al
jmp 0x11262
seta %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/message.cc
// Function: msg::operator<<(std::ostream&, msg::Message const&)
std::ostream& operator<<(std::ostream& o, const Message& m) {
  o << "{round: " << m.round << ", order: " << OrderString(m.order)
    << ", ids: <";
  for (size_t i = 0; i < m.ids.size(); ++i) {
    if (i > 0) o << ' ';
    o << m.ids[i];
  }
  o << ">}";
  return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60e8(%rip), %rsi      # 0x17371
movl $0x8, %edx
callq 0x53c0
movl (%r14), %esi
movq %rbx, %rdi
callq 0x5220
movq %rax, %r15
leaq 0x60d2(%rip), %rsi      # 0x1737a
movl $0x9, %edx
movq %rax, %rdi
callq 0x53c0
movl 0x4(%r14), %esi
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x11108
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x53c0
leaq 0x60a6(%rip), %rsi      # 0x17384
movl $0x8, %edx
movq %rax, %rdi
callq 0x53c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11306
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movq 0x10(%r14), %rax
cmpq 0x8(%r14), %rax
je 0x11356
xorl %r12d, %r12d
leaq 0x8(%rsp), %r15
testq %r12, %r12
je 0x11332
movb $0x20, 0x8(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x53c0
movq 0x8(%r14), %rax
movl (%rax,%r12,4), %esi
movq %rbx, %rdi
callq 0x5220
incq %r12
movq 0x10(%r14), %rax
subq 0x8(%r14), %rax
sarq $0x2, %rax
cmpq %rax, %r12
jb 0x11318
leaq 0x6030(%rip), %rsi      # 0x1738d
movl $0x2, %edx
movq %rbx, %rdi
callq 0x53c0
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x11397
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5340
movq %rbx, %rdi
callq 0x5600
nop
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/general.cc
// Function: generals::ByzantineMsgFromBuf(char*, unsigned long)
std::experimental::optional<msg::Message> ByzantineMsgFromBuf(char* buf,
                                                              size_t n) {
  // Check to make sure the size of the buffer is correct.
  if (n < sizeof(msg::ByzantineMessage)) {
    return {};
  }

  // Copy out the message part.
  msg::Message msg;
  msg::ByzantineMessage* c_msg = reinterpret_cast<msg::ByzantineMessage*>(buf);
  msg.round = ntohl(c_msg->round);
  msg.order = static_cast<msg::Order>(ntohl(c_msg->order));

  msg.ids.resize((n - sizeof(*c_msg)) / sizeof(uint32_t));
  uint32_t* id_buf = reinterpret_cast<uint32_t*>(buf + sizeof(*c_msg));
  for (size_t i = 0; i < msg.ids.size(); ++i) {
    msg.ids[i] = ntohl(id_buf[i]);
  }

  return msg;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpq $0xf, %rdx
ja 0x113e5
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
movq $0x0, 0x20(%rbx)
jmp 0x11480
movq %rsi, %r15
leaq 0x8(%rsp), %r14
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movl 0x8(%rsi), %eax
bswapl %eax
movl %eax, -0x8(%r14)
movl 0xc(%rsi), %eax
bswapl %eax
movl %eax, -0x4(%r14)
addq $-0x10, %rdx
shrq $0x2, %rdx
movq %r14, %rdi
movq %rdx, %rsi
callq 0x12e16
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
subq %rax, %rcx
je 0x11450
sarq $0x2, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movl 0x10(%r15,%rdx,4), %esi
bswapl %esi
movl %esi, (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x1143e
movq (%rsp), %rcx
movq %rcx, (%rbx)
movq %rax, 0x8(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x10(%rbx)
movq 0x18(%rsp), %rax
movq %rax, 0x18(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movb $0x1, 0x20(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x114a7
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x5340
movq %rbx, %rdi
callq 0x5600
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/general.cc
// Function: generals::RoundOfAck(char*, unsigned long)
std::experimental::optional<unsigned int> RoundOfAck(char* buf, size_t n) {
  // Check to make sure the size of the buffer is correct.
  if (n != sizeof(msg::Ack)) {
    return {};
  }

  msg::Ack* ack = reinterpret_cast<msg::Ack*>(buf);
  return ntohl(ack->round);
}

// Assembly:
movq %rdi, %rax
cmpq $0xc, %rdx
jne 0x114c3
movl 0x8(%rsi), %ecx
bswapl %ecx
movl %ecx, (%rax)
movb $0x1, %cl
jmp 0x114cc
movq $0x0, (%rax)
xorl %ecx, %ecx
movb %cl, 0x4(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/general.cc
// Function: generals::SendAckForRound(std::shared_ptr<udp::Client const>, unsigned int)
void SendAckForRound(udp::ClientPtr client, unsigned int round) {
  msg::Ack ack = {};
  ack.type = htonl(kAckType);
  ack.size = htonl(sizeof(ack));
  ack.round = htonl(round);

  char* buf = reinterpret_cast<char*>(&ack);
  client->Send(buf, sizeof(ack));
}

// Assembly:
subq $0x18, %rsp
movabsq $0xc00000002000000, %rcx # imm = 0xC00000002000000
leaq 0x8(%rsp), %rax
movq %rcx, (%rax)
bswapl %esi
movl %esi, 0x8(%rax)
movq (%rdi), %rdi
movl $0xc, %edx
movq %rax, %rsi
callq 0x1055a
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nvanbenschoten[P]byzantine-agreement/src/general.cc
// Function: generals::StringToMaliciousBehavior(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
MaliciousBehavior StringToMaliciousBehavior(std::string str) {
  if (str == "silent") return MaliciousBehavior::SILENT;
  if (str == "delay_send") return MaliciousBehavior::DELAY_SEND;
  if (str == "partial_send") return MaliciousBehavior::PARTIAL_SEND;
  if (str == "wrong_order") return MaliciousBehavior::WRONG_ORDER;
  throw std::invalid_argument(
      "malicious behavior can one of {\"silent\", \"delay_send\", "
      "\"partial_send\", \"wrong_order\"}");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x5e97(%rip), %rsi      # 0x17648
callq 0x50f0
testl %eax, %eax
je 0x1182c
leaq 0x5e8e(%rip), %rsi      # 0x1764f
movq %rbx, %rdi
callq 0x50f0
testl %eax, %eax
je 0x11833
leaq 0x5e86(%rip), %rsi      # 0x1765a
movq %rbx, %rdi
callq 0x50f0
testl %eax, %eax
je 0x1183a
leaq 0x5e80(%rip), %rsi      # 0x17667
movq %rbx, %rdi
callq 0x50f0
movl %eax, %ecx
movl $0x8, %eax
testl %ecx, %ecx
je 0x1183f
movl $0x10, %edi
callq 0x51a0
movq %rax, %rbx
leaq 0x5e65(%rip), %rsi      # 0x17673
movq %rax, %rdi
callq 0x5650
movq 0xe7ab(%rip), %rsi      # 0x1ffc8
movq 0xe784(%rip), %rdx      # 0x1ffa8
movq %rbx, %rdi
callq 0x55d0
movl $0x1, %eax
jmp 0x1183f
movl $0x2, %eax
jmp 0x1183f
movl $0x4, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x5270
movq %r14, %rdi
callq 0x5600