LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: hoehermann[P]TypedJNI/./typedjni.hpp
// Function: TypedJNIConstructor<_jstring*>::get(JNIEnv_*, _jclass*)
static std::function<TypedJNIObject(Args...)> get(JNIEnv *env, const jclass cls) {
        // yes indeed GetMethodID as illustrated at https://stackoverflow.com/questions/7260376/ (not get GetStaticMethodID)
        const jmethodID mid = TypedJNI::GetMethodID(env, cls, "<init>", "("+TypedJNI::GetTypeString<Args...>()+")"+TypedJNI::GetTypeString<void>());
        return [env, cls, mid](Args... args) -> TypedJNIObject {
            return TypedJNIObject(env, cls, env->NewObject(cls, mid, args...));
        };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x138(%rbp)
movq %rdi, %rax
movq %rax, -0x130(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x128(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x118(%rbp)
callq 0x33d0
movq -0x118(%rbp), %rdx
leaq 0x72ba(%rip), %rsi      # 0xe166
leaq -0x40(%rbp), %rdi
callq 0x4100
jmp 0x6eb7
leaq -0xd8(%rbp), %rdi
callq 0x9000
jmp 0x6ec5
leaq 0x7296(%rip), %rsi      # 0xe162
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x5390
jmp 0x6ee1
leaq 0x727c(%rip), %rdx      # 0xe164
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x5340
jmp 0x6efd
leaq -0xf8(%rbp), %rdi
callq 0x8e40
jmp 0x6f0b
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
callq 0x5270
jmp 0x6f24
movq -0x120(%rbp), %rsi
movq -0x128(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq -0x78(%rbp), %rcx
callq 0x92e0
movq %rax, -0x140(%rbp)
jmp 0x6f48
leaq -0x78(%rbp), %rdi
callq 0x3180
leaq -0xf8(%rbp), %rdi
callq 0x3180
leaq -0x98(%rbp), %rdi
callq 0x3180
leaq -0xb8(%rbp), %rdi
callq 0x3180
leaq -0xd8(%rbp), %rdi
callq 0x3180
leaq -0x40(%rbp), %rdi
callq 0x3180
leaq -0x41(%rbp), %rdi
callq 0x3290
movq -0x140(%rbp), %rax
movq -0x138(%rbp), %rdi
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x100(%rbp)
leaq -0x110(%rbp), %rsi
callq 0x70a0
movq -0x130(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x7087
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x707e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x7072
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x7066
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x705a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x704e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x3180
leaq -0xf8(%rbp), %rdi
callq 0x3180
leaq -0x98(%rbp), %rdi
callq 0x3180
leaq -0xb8(%rbp), %rdi
callq 0x3180
leaq -0xd8(%rbp), %rdi
callq 0x3180
leaq -0x40(%rbp), %rdi
callq 0x3180
leaq -0x41(%rbp), %rdi
callq 0x3290
movq -0x50(%rbp), %rdi
callq 0x33c0
nopl (%rax)
// File: hoehermann[P]TypedJNI/typedjni.cpp
// Function: TypedJNI::GetStaticMethodID(JNIEnv_*, _jclass*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
jmethodID TypedJNI::GetStaticMethodID(JNIEnv *env, const jclass cls, const std::string name, const std::string & signature) {
    jmethodID mid = env->GetStaticMethodID(cls, name.c_str(), signature.c_str());
    if (mid == NULL) {
        throw TypedJNIError("Failed to find static method '"+name+"' "+signature+".");
    }
    return mid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdx, -0xe0(%rbp)
movq %rdi, %rax
movq -0xe0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
callq 0x3100
movq %rax, -0xc0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3100
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq %rax, %rcx
callq 0xadf0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x92c3
movb $0x1, -0xb5(%rbp)
movl $0x10, %edi
callq 0x3130
movq -0xd8(%rbp), %rdx
movq %rax, -0xe8(%rbp)
leaq 0x5375(%rip), %rsi      # 0xe505
leaq -0xa8(%rbp), %rdi
callq 0xae80
jmp 0x919e
leaq 0x537f(%rip), %rdx      # 0xe524
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x5340
jmp 0x91ba
movq -0x20(%rbp), %rdx
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xae30
jmp 0x91d0
leaq 0x53b8(%rip), %rdx      # 0xe58f
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5340
jmp 0x91e6
movq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x8e00
jmp 0x91f8
movq -0xe8(%rbp), %rdi
movb $0x0, -0xb5(%rbp)
leaq 0xc8fb(%rip), %rsi      # 0x15b08
leaq 0x1d7c(%rip), %rdx      # 0xaf90
callq 0x3390
jmp 0x92dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x92aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x929e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9292
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9289
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3180
leaq -0x68(%rbp), %rdi
callq 0x3180
leaq -0x88(%rbp), %rdi
callq 0x3180
leaq -0xa8(%rbp), %rdi
callq 0x3180
testb $0x1, -0xb5(%rbp)
jne 0x92b5
jmp 0x92c1
movq -0xe8(%rbp), %rdi
callq 0x31c0
jmp 0x92d0
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x33c0
nopl (%rax)
// File: hoehermann[P]TypedJNI/typedjni.cpp
// Function: TypedJNI::GetMethodID(JNIEnv_*, _jclass*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
jmethodID TypedJNI::GetMethodID(JNIEnv *env, const jclass cls, const std::string name, const std::string & signature) {
    jmethodID mid = env->GetMethodID(cls, name.c_str(), signature.c_str());
    if (mid == NULL) {
        throw TypedJNIError("Failed to find method '"+name+"' "+signature+".");
    }
    return mid;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdx, -0xe0(%rbp)
movq %rdi, %rax
movq -0xe0(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
callq 0x3100
movq %rax, -0xc0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x3100
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq %rax, %rcx
callq 0xafb0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x94c3
movb $0x1, -0xb5(%rbp)
movl $0x10, %edi
callq 0x3130
movq -0xd8(%rbp), %rdx
movq %rax, -0xe8(%rbp)
leaq 0x5197(%rip), %rsi      # 0xe527
leaq -0xa8(%rbp), %rdi
callq 0xae80
jmp 0x939e
leaq 0x517f(%rip), %rdx      # 0xe524
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x5340
jmp 0x93ba
movq -0x20(%rbp), %rdx
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xae30
jmp 0x93d0
leaq 0x51b8(%rip), %rdx      # 0xe58f
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5340
jmp 0x93e6
movq -0xe8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x8e00
jmp 0x93f8
movq -0xe8(%rbp), %rdi
movb $0x0, -0xb5(%rbp)
leaq 0xc6fb(%rip), %rsi      # 0x15b08
leaq 0x1b7c(%rip), %rdx      # 0xaf90
callq 0x3390
jmp 0x94dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x94aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x949e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9492
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9489
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3180
leaq -0x68(%rbp), %rdi
callq 0x3180
leaq -0x88(%rbp), %rdi
callq 0x3180
leaq -0xa8(%rbp), %rdi
callq 0x3180
testb $0x1, -0xb5(%rbp)
jne 0x94b5
jmp 0x94c1
movq -0xe8(%rbp), %rdi
callq 0x31c0
jmp 0x94d0
movq -0x28(%rbp), %rax
addq $0xf0, %rsp
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0x33c0
nopl (%rax)
// File: hoehermann[P]TypedJNI/typedjni.cpp
// Function: TypedJNIEnv::find_class(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
TypedJNIClass TypedJNIEnv::find_class(std::string name) {
    jclass cls = env->FindClass(name.c_str());
    if (cls == NULL) {
        throw TypedJNIError("Failed to find class '"+name+"'.");
    }
    return TypedJNIClass(env, cls);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rsi, -0x98(%rbp)
movq %rdi, %rax
movq -0x98(%rbp), %rdi
movq %rdi, -0x90(%rbp)
movq %rax, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x80(%rbp)
callq 0x3100
movq -0x80(%rbp), %rdi
movq %rax, %rsi
callq 0xb4a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9f07
movb $0x1, -0x75(%rbp)
movl $0x10, %edi
callq 0x3130
movq -0x90(%rbp), %rdx
movq %rax, -0xa0(%rbp)
leaq 0x4780(%rip), %rsi      # 0xe5e1
leaq -0x68(%rbp), %rdi
callq 0xae80
jmp 0x9e6c
leaq 0x471b(%rip), %rdx      # 0xe58e
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5340
jmp 0x9e82
movq -0xa0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x8e00
jmp 0x9e94
movq -0xa0(%rbp), %rdi
movb $0x0, -0x75(%rbp)
leaq 0xbc62(%rip), %rsi      # 0x15b08
leaq 0x10e3(%rip), %rdx      # 0xaf90
callq 0x3390
jmp 0x9f39
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x9ef1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x9ee8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3180
leaq -0x68(%rbp), %rdi
callq 0x3180
testb $0x1, -0x75(%rbp)
jne 0x9ef9
jmp 0x9f05
movq -0xa0(%rbp), %rdi
callq 0x31c0
jmp 0x9f30
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rdx
leaq -0x10(%rbp), %rdi
callq 0x9ab0
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0xa0, %rsp
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x33c0
nopl (%rax)
// File: sykeben[P]overos/os/kernel.cpp
// Function: settitle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void settitle(string titleMsg) {
	#ifdef WIN32
		string title = "title ";
		title += titleMsg.c_str();
	#else
		string title = "echo -en \"\\033]0;";
		title += titleMsg.c_str();
		title += "\\a\"";
	#endif
	system(title.c_str());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x50(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x48(%rbp)
callq 0x22c0
movq -0x48(%rbp), %rdx
leaq 0x1a02(%rip), %rsi      # 0x400a
leaq -0x28(%rbp), %rdi
callq 0x2cc0
jmp 0x2613
leaq -0x29(%rbp), %rdi
callq 0x21a0
movq -0x50(%rbp), %rdi
callq 0x2090
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x2150
jmp 0x2633
leaq 0x19e2(%rip), %rsi      # 0x401c
leaq -0x28(%rbp), %rdi
callq 0x2150
jmp 0x2645
leaq -0x28(%rbp), %rdi
callq 0x2090
movq %rax, %rdi
callq 0x2130
jmp 0x2658
leaq -0x28(%rbp), %rdi
callq 0x2328
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x21a0
jmp 0x2693
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x2328
movq -0x38(%rbp), %rdi
callq 0x22b0
nopl (%rax)
// File: sykeben[P]overos/os/kernel.cpp
// Function: fexists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
bool fexists(const string& name) {
    if (FILE *file = fopen(name.c_str(), "r")) {
        fclose(file);
        return true;
    } else {
        return false;
    }   
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2090
movq %rax, %rdi
leaq 0x1949(%rip), %rsi      # 0x4008
callq 0x21e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x26de
movq -0x18(%rbp), %rdi
callq 0x2170
movb $0x1, -0x1(%rbp)
jmp 0x26e2
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: i2cDetect(int, int)
int i2cDetect (int i2c_file, int i2c_addr)
{
	uint8_t data[2];

	// Set I2C address
	if (ioctl(i2c_file, I2C_SLAVE, i2c_addr) < 0) {
		return -1;
	}

	data[0] = 0x00;
	data[1] = 0x00;

	if (write(i2c_file, data, 2) != 2) {
		return 1; // I2C device not present
	}

	return 0; // I2C device present
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %edx
movl $0x703, %esi            # imm = 0x703
movb $0x0, %al
callq 0x2250
cmpl $0x0, %eax
jge 0x243e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x246d
movb $0x0, -0xe(%rbp)
movb $0x0, -0xd(%rbp)
movl -0x8(%rbp), %edi
leaq -0xe(%rbp), %rsi
movl $0x2, %edx
callq 0x2080
cmpq $0x2, %rax
je 0x2466
movl $0x1, -0x4(%rbp)
jmp 0x246d
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: i2cWrite(int, int, unsigned short, int, int, unsigned char*)
int i2cWrite (int i2c_file, int i2c_addr, uint16_t sub_addr,
              int sub_addr_length, int length, uint8_t data[32])
{
	uint8_t *buffer = (uint8_t *)malloc((length * sizeof(uint8_t)) + sub_addr_length);
	int i;

	memcpy(buffer + sub_addr_length, data, length * sizeof(uint8_t));

	// Set I2C address
	if (ioctl(i2c_file, I2C_SLAVE, i2c_addr) < 0) {
		return -1;
	}

	if (sub_addr_length == 2) {
		buffer[0] = (sub_addr >> 8) & 0xFF;
		buffer[1] = sub_addr & 0xFF;
	} else {
		buffer[0] = sub_addr & 0xFF;
	}

	for (i = 0; i < I2C_CHECK_COUNT; i++) {
		// The DNA Spec allows an MCU to NAK subsequent writes when multiple
		// writes are performed, keep trying for I2C_CHECK_COUNT tries before
		// giving up.
		if (write(i2c_file, buffer, sub_addr_length + length)
		      == (length + sub_addr_length)) {
			return 0;
		}
	}

	// We gave up trying to write
	return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movslq -0x18(%rbp), %rdi
shlq $0x0, %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
callq 0x2210
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movq -0x20(%rbp), %rsi
movslq -0x18(%rbp), %rdx
shlq $0x0, %rdx
callq 0x21a0
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %edx
movl $0x703, %esi            # imm = 0x703
movb $0x0, %al
callq 0x2250
cmpl $0x0, %eax
jge 0x24f7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x2586
cmpl $0x2, -0x14(%rbp)
jne 0x2525
movzwl -0xe(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movzwl -0xe(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, 0x1(%rax)
jmp 0x2536
movzwl -0xe(%rbp), %eax
andl $0xff, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movb %cl, (%rax)
movl $0x0, -0x2c(%rbp)
cmpl $0x7d0, -0x2c(%rbp)     # imm = 0x7D0
jge 0x257f
movl -0x8(%rbp), %edi
movq -0x28(%rbp), %rsi
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
movslq %eax, %rdx
callq 0x2080
movl -0x18(%rbp), %ecx
addl -0x14(%rbp), %ecx
movslq %ecx, %rcx
cmpq %rcx, %rax
jne 0x2572
movl $0x0, -0x4(%rbp)
jmp 0x2586
jmp 0x2574
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x253d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: i2cRead(int, int, unsigned short, int, int, unsigned char*)
int i2cRead (int i2c_file, int i2c_addr, uint16_t sub_addr,
             int sub_addr_length, int length, uint8_t data[32])
{
	uint8_t temp_buf[2];

	// Set I2C address
	if (ioctl(i2c_file, I2C_SLAVE, i2c_addr) < 0) {
		return -1;
	}

	if (sub_addr_length == 2) {
		temp_buf[0] = (sub_addr >> 8) & 0xFF;
		temp_buf[1] = sub_addr & 0xFF;
	} else {
		temp_buf[0] = sub_addr & 0xFF;
	}

	if (write(i2c_file, temp_buf, sub_addr_length) != sub_addr_length) {
		return -1;
	}

	if (read(i2c_file, data, length) != length) {
		return -1;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %dx, %ax
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movw %ax, -0xe(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movl -0x8(%rbp), %edi
movl -0xc(%rbp), %edx
movl $0x703, %esi            # imm = 0x703
movb $0x0, %al
callq 0x2250
cmpl $0x0, %eax
jge 0x25d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x264a
cmpl $0x2, -0x14(%rbp)
jne 0x25f3
movzwl -0xe(%rbp), %eax
sarl $0x8, %eax
andl $0xff, %eax
movb %al, -0x22(%rbp)
movzwl -0xe(%rbp), %eax
andl $0xff, %eax
movb %al, -0x21(%rbp)
jmp 0x25ff
movzwl -0xe(%rbp), %eax
andl $0xff, %eax
movb %al, -0x22(%rbp)
movl -0x8(%rbp), %edi
leaq -0x22(%rbp), %rsi
movslq -0x14(%rbp), %rdx
callq 0x2080
movslq -0x14(%rbp), %rcx
cmpq %rcx, %rax
je 0x2621
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x264a
movl -0x8(%rbp), %edi
movq -0x20(%rbp), %rsi
movslq -0x18(%rbp), %rdx
callq 0x2260
movslq -0x18(%rbp), %rcx
cmpq %rcx, %rax
je 0x2643
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x264a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: writeMCU(int, unsigned short, int, unsigned char*, int)
int writeMCU (int i2c_file, uint16_t port_addr, int sub_addr, uint8_t *data,
              int length)
{
	int temp_length, current_sub_addr;

	// Useful for debug
	//printf("Writing %d bytes to 0x%X, sub-address 0x%X\n", length, port_addr, sub_addr);

	current_sub_addr = sub_addr;

	while (length > 0) {
		temp_length = (length > 32) ? 32 : length;

		if (i2cWrite(i2c_file, port_addr, current_sub_addr, 2, temp_length,
		             &data[(current_sub_addr - sub_addr)]) != 0) {
			return -1;
		}

		current_sub_addr += temp_length;
		length -= temp_length;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movl %edi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x26f4
cmpl $0x20, -0x1c(%rbp)
jle 0x2699
movl $0x20, %eax
movl %eax, -0x28(%rbp)
jmp 0x269f
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x8(%rbp), %edi
movzwl -0xa(%rbp), %esi
movl -0x24(%rbp), %eax
movl -0x20(%rbp), %r8d
movq -0x18(%rbp), %r9
movl -0x24(%rbp), %ecx
subl -0x10(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %r9
movl $0x2, %ecx
movzwl %ax, %edx
callq 0x2480
cmpl $0x0, %eax
je 0x26de
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x26fb
movl -0x20(%rbp), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x20(%rbp), %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2683
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: readMCU(int, unsigned short, int, unsigned char*, int)
int readMCU (int i2c_file, uint16_t port_addr, int sub_addr, uint8_t *data,
             int length)
{
	int current_sub_addr, temp_length;

	// Useful for debug
	//printf("Reading %d bytes from 0x%X, sub-address 0x%X\n", length, port_addr, sub_addr);

	current_sub_addr = sub_addr;

	while (length > 0) {
		temp_length = (length > 32) ? 32 : length;

		if (i2cRead(i2c_file, port_addr, current_sub_addr, 2, temp_length,
		            &data[(current_sub_addr - sub_addr)]) != 0) {
			return -1;
		}

		current_sub_addr += temp_length;
		length -= temp_length;
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movl %edi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x1c(%rbp)
jle 0x27a4
cmpl $0x20, -0x1c(%rbp)
jle 0x2749
movl $0x20, %eax
movl %eax, -0x28(%rbp)
jmp 0x274f
movl -0x1c(%rbp), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x8(%rbp), %edi
movzwl -0xa(%rbp), %esi
movl -0x20(%rbp), %eax
movl -0x24(%rbp), %r8d
movq -0x18(%rbp), %r9
movl -0x20(%rbp), %ecx
subl -0x10(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %r9
movl $0x2, %ecx
movzwl %ax, %edx
callq 0x2590
cmpl $0x0, %eax
je 0x278e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x27ab
movl -0x24(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x24(%rbp), %ecx
movl -0x1c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2733
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: SYZYGYfpga[P]brain-tools/src/sequencer-brain.cpp
// Function: printHelp(char*)
void printHelp (char *progname)
{
	printf("Usage: %s [option [argument]] <i2c device>\n", progname);
	printf("  <i2c device> is required for all commands. It must contain the\n");
	printf("               path to the Linux i2c device\n");
	printf("\n");
	printf("  Exactly one of the following options must be specified:\n");
	printf("    -h - print this text\n");
	printf("    -w <filename> - write a binary DNA to a peripheral, takes the DNA filename\n");
	printf("                    as an argument\n");
	printf("    -d <filename> - dump the DNA from a peripheral to a binary file, takes the\n");
	printf("                    DNA filename as an argument\n");
	printf("\n");
	printf("  Examples:\n");
	printf("    Dump DNA from the MCU on Port 1:\n");
	printf("      %s -d seq_file.bin -p 1 /dev/i2c-1\n", progname);
	printf("    Set VIO1 to 3.3V:\n");
	printf("      %s -s -1 330 /dev/i2c-1\n", progname);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x37ed(%rip), %rdi      # 0x6024
movb $0x0, %al
callq 0x2040
leaq 0x380b(%rip), %rdi      # 0x6050
movb $0x0, %al
callq 0x2040
leaq 0x383f(%rip), %rdi      # 0x6092
movb $0x0, %al
callq 0x2040
leaq 0x3aee(%rip), %rdi      # 0x634f
movb $0x0, %al
callq 0x2040
leaq 0x3850(%rip), %rdi      # 0x60bf
movb $0x0, %al
callq 0x2040
leaq 0x387d(%rip), %rdi      # 0x60fa
movb $0x0, %al
callq 0x2040
leaq 0x3889(%rip), %rdi      # 0x6114
movb $0x0, %al
callq 0x2040
leaq 0x38cb(%rip), %rdi      # 0x6164
movb $0x0, %al
callq 0x2040
leaq 0x38e1(%rip), %rdi      # 0x6188
movb $0x0, %al
callq 0x2040
leaq 0x3923(%rip), %rdi      # 0x61d8
movb $0x0, %al
callq 0x2040
leaq 0x3a8c(%rip), %rdi      # 0x634f
movb $0x0, %al
callq 0x2040
leaq 0x3938(%rip), %rdi      # 0x6209
movb $0x0, %al
callq 0x2040
leaq 0x3937(%rip), %rdi      # 0x6216
movb $0x0, %al
callq 0x2040
movq -0x8(%rbp), %rsi
leaq 0x394b(%rip), %rdi      # 0x623c
movb $0x0, %al
callq 0x2040
leaq 0x3967(%rip), %rdi      # 0x6266
movb $0x0, %al
callq 0x2040
movq -0x8(%rbp), %rsi
leaq 0x396c(%rip), %rdi      # 0x627d
movb $0x0, %al
callq 0x2040
addq $0x10, %rsp
popq %rbp
retq
nop
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::read_file_as_string_view(char const*)
Maybe<String_View> read_file_as_string_view(const char *filename)
    {
        FILE *f = fopen(filename, "rb");
        if (!f) return {};
        defer(fclose(f));

        int err = fseek(f, 0, SEEK_END);
        if (err < 0) return {};

        long size = ftell(f);
        if (size < 0) return {};

        err = fseek(f, 0, SEEK_SET);
        if (err < 0) return {};

        auto data = malloc(size);
        if (!data) return {};

        size_t read_size = fread(data, 1, size, f);
        if (read_size != (size_t) size && ferror(f)) return {};

        return {true, {static_cast<size_t>(size), static_cast<const char*>(data)}};
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x60(%rbp)
movq %rdi, -0x58(%rbp)
movq %rsi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xd23e(%rip), %rsi      # 0xe5d0
callq 0x1110
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x13b7
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10b0
jmp 0x1542
leaq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x1560
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1100
movl %eax, -0x64(%rbp)
jmp 0x13e3
movl -0x64(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x1425
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10b0
movl $0x1, -0x38(%rbp)
jmp 0x1539
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x15a0
jmp 0x154f
movq -0x10(%rbp), %rdi
callq 0x1030
movq %rax, -0x70(%rbp)
jmp 0x1434
movq -0x70(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jge 0x145f
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10b0
movl $0x1, -0x38(%rbp)
jmp 0x1539
movq -0x10(%rbp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x1100
movl %eax, -0x74(%rbp)
jmp 0x1471
movl -0x74(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jge 0x1499
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10b0
movl $0x1, -0x38(%rbp)
jmp 0x1539
movq -0x40(%rbp), %rdi
callq 0x1140
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x14c6
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10b0
movl $0x1, -0x38(%rbp)
jmp 0x1539
movq -0x48(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x1160
movq %rax, -0x80(%rbp)
jmp 0x14e2
movq -0x80(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x40(%rbp), %rax
je 0x151b
movq -0x10(%rbp), %rdi
callq 0x11c0
cmpl $0x0, %eax
je 0x151b
movq -0x60(%rbp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10b0
movl $0x1, -0x38(%rbp)
jmp 0x1539
movq -0x60(%rbp), %rax
movb $0x1, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x10(%rax)
movl $0x1, -0x38(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x15a0
movq -0x58(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x11a0
nopl (%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, char const*)
void sprint1(String_Buffer *buffer, const char *cstr)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%s", cstr);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
subq 0x10(%rax), %rsi
movq -0x10(%rbp), %rcx
leaq 0xcf99(%rip), %rdx      # 0xe5d3
movb $0x0, %al
callq 0x1170
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, aids::String_View)
void sprint1(String_Buffer *buffer, String_View view)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%.*s", (int) view.count, view.data);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
subq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %r8
leaq 0xcf12(%rip), %rdx      # 0xe5d6
movb $0x0, %al
callq 0x1170
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x1c(%rbp), %rax
addq %rax, %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, char)
void sprint1(String_Buffer *buffer, char c)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%c", c);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
subq 0x10(%rax), %rsi
movsbl -0x9(%rbp), %ecx
leaq 0xce9f(%rip), %rdx      # 0xe5db
movb $0x0, %al
callq 0x1170
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, float)
void sprint1(String_Buffer *buffer, float f)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%f", f);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
subq 0x10(%rax), %rsi
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0xce1e(%rip), %rdx      # 0xe5de
movb $0x1, %al
callq 0x1170
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, unsigned long long)
void sprint1(String_Buffer *buffer, unsigned long long x)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%llu", x);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
subq 0x10(%rax), %rsi
movq -0x10(%rbp), %rcx
leaq 0xcda7(%rip), %rdx      # 0xe5e1
movb $0x0, %al
callq 0x1170
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, unsigned int)
void sprint1(String_Buffer *buffer, unsigned int x)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%u", x);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
subq 0x10(%rax), %rsi
movl -0xc(%rbp), %ecx
leaq 0xcd2e(%rip), %rdx      # 0xe5e6
movb $0x0, %al
callq 0x1170
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x10(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, unsigned long)
void sprint1(String_Buffer *buffer, long unsigned int x)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%lu", x);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
subq 0x10(%rax), %rsi
movq -0x10(%rbp), %rcx
leaq 0xccaf(%rip), %rdx      # 0xe5e9
movb $0x0, %al
callq 0x1170
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::sprint1(aids::String_Buffer*, long)
void sprint1(String_Buffer *buffer, long int x)
    {
        int n = snprintf(
            buffer->data + buffer->size,
            buffer->capacity - buffer->size,
            "%ld", x);
        buffer->size = min(buffer->size + n, buffer->capacity - 1);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
addq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
subq 0x10(%rax), %rsi
movq -0x10(%rbp), %rcx
leaq 0xcbb6(%rip), %rdx      # 0xe5f0
movb $0x0, %al
callq 0x1170
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movslq -0x14(%rbp), %rax
addq %rax, %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
subq $0x1, %rsi
callq 0x9fd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./aids.hpp
// Function: aids::print1(_IO_FILE*, aids::Escape)
void print1(FILE *stream, Escape escape)
    {
        for (size_t i = 0; i < escape.unwrap.count; ++i) {
            switch (escape.unwrap.data[i]) {
            case '\a': print(stream, "\\a"); break;
            case '\b': print(stream, "\\b"); break;
            case '\f': print(stream, "\\f"); break;
            case '\n': print(stream, "\\n"); break;
            case '\r': print(stream, "\\r"); break;
            case '\t': print(stream, "\\t"); break;
            case '\v': print(stream, "\\v"); break;
            default: print(stream, escape.unwrap.data[i]);
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x1ed5
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
addl $-0x7, %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x6, %eax
ja 0x1ead
movq -0x28(%rbp), %rax
leaq 0xc1ed(%rip), %rcx      # 0xe010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x18(%rbp), %rdi
leaq 0xc7c8(%rip), %rsi      # 0xe5ff
callq 0xa050
jmp 0x1ec2
movq -0x18(%rbp), %rdi
leaq 0xc7b6(%rip), %rsi      # 0xe602
callq 0xa050
jmp 0x1ec2
movq -0x18(%rbp), %rdi
leaq 0xc7a7(%rip), %rsi      # 0xe605
callq 0xa050
jmp 0x1ec2
movq -0x18(%rbp), %rdi
leaq 0xc798(%rip), %rsi      # 0xe608
callq 0xa050
jmp 0x1ec2
movq -0x18(%rbp), %rdi
leaq 0xc789(%rip), %rsi      # 0xe60b
callq 0xa050
jmp 0x1ec2
movq -0x18(%rbp), %rdi
leaq 0xc77a(%rip), %rsi      # 0xe60e
callq 0xa050
jmp 0x1ec2
movq -0x18(%rbp), %rdi
leaq 0xc76b(%rip), %rsi      # 0xe611
callq 0xa050
jmp 0x1ec2
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %esi
callq 0xa080
jmp 0x1ec4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1dec
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::type_of_name(unsigned long, aids::String_View) const
Type Type_Checker::type_of_name(size_t offset, String_View name) const
{
    auto scope0 = scope;

    while (scope0) {
        Args_List *args_list = scope0->args_list;
        while (args_list) {
            if (name == args_list->var_def.name) {
                return args_list->var_def.type;
            }
            args_list = args_list->next;
        }
        scope0 = scope0->next;
    }

    reporter.fail(offset, "Could not find name `", name, "` in the current scope");
    return Type::Unchecked;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdx, -0x10(%rbp)
movq %rcx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x2274
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x2266
movq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x10(%rbp), %rdi
callq 0xa0b0
testb $0x1, %al
jne 0x224b
jmp 0x2258
movq -0x30(%rbp), %rax
movl 0x10(%rax), %eax
addq $0x60, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x221a
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0x2208
movq -0x58(%rbp), %rdi
addq $0x8, %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rcx
movq -0x48(%rbp), %r8
leaq 0xc375(%rip), %rdx      # 0xe614
leaq 0xc384(%rip), %r9       # 0xe62a
callq 0xa110
nopl (%rax,%rax)
// File: tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::push_scope(Args_List*)
void Type_Checker::push_scope(Args_List *args_list)
{
    auto scope0 = memory->alloc<Scope>();
    scope0->args_list = args_list;
    scope0->next = scope;
    scope = scope0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq (%rax), %rdi
movl $0x1, %esi
callq 0xa180
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, -0x18(%rbp)
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq %rdx, (%rcx)
movq 0x28(%rax), %rdx
movq -0x18(%rbp), %rcx
movq %rdx, 0x8(%rcx)
movq -0x18(%rbp), %rcx
movq %rcx, 0x28(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::push_var_def(Var_Def)
void Type_Checker::push_var_def(Var_Def var_def)
{
    assert(scope);
    auto args_list = memory->alloc<Args_List>();
    args_list->var_def = var_def;
    args_list->next = scope->args_list;
    scope->args_list = args_list;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x28(%rax)
je 0x2395
jmp 0x23b4
leaq 0xc29f(%rip), %rdi      # 0xe63b
leaq 0xc29e(%rip), %rsi      # 0xe641
movl $0x26, %edx
leaq 0xc2cc(%rip), %rcx      # 0xe67b
callq 0x10c0
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0xa240
movq -0x20(%rbp), %rdx
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq (%rdx), %rsi
movq %rsi, (%rcx)
movq 0x8(%rdx), %rsi
movq %rsi, 0x8(%rcx)
movq 0x10(%rdx), %rdx
movq %rdx, 0x10(%rcx)
movq 0x28(%rax), %rcx
movq (%rcx), %rdx
movq -0x10(%rbp), %rcx
movq %rdx, 0x18(%rcx)
movq -0x10(%rbp), %rcx
movq 0x28(%rax), %rax
movq %rcx, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::cast_expression_to(Expression*, Type)
Expression *Type_Checker::cast_expression_to(Expression *expression, Type type)
{
    Expression *cast_expression = memory->alloc<Expression>();
    cast_expression->kind = Expression_Kind::Type_Cast;
    cast_expression->type = type;
    cast_expression->offset = expression->offset;
    cast_expression->type_cast.type = cast_expression->type;
    cast_expression->type_cast.expression = expression;
    return cast_expression;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0xa300
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl $0x4, (%rax)
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: is_expression_implicitly_convertible_to(Expression*, Type)
bool is_expression_implicitly_convertible_to(Expression *expression, Type target_type)
{
    assert(expression->type != Type::Unchecked && "Unchecked type in a checked context");
    assert(target_type != Type::Unchecked && "Unchecked type in a checked context");

    for (size_t i = 0; i < implicit_conversion_table_count; ++i) {
        const size_t SOURCE = 0;
        const size_t TARGET = 1;
        if (implicit_conversion_table[i][SOURCE] == expression->type &&
            implicit_conversion_table[i][TARGET] == target_type) {
            return true;
        }
    }

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x4(%rcx)
movb %al, -0x31(%rbp)
je 0x24a5
movb $0x1, %al
movb %al, -0x31(%rbp)
jmp 0x24a5
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x24ae
jmp 0x24b0
jmp 0x24cf
leaq 0xc211(%rip), %rdi      # 0xe6c8
leaq 0xc183(%rip), %rsi      # 0xe641
movl $0x55, %edx
leaq 0xc24b(%rip), %rcx      # 0xe715
callq 0x10c0
xorl %eax, %eax
cmpl $0x0, -0x14(%rbp)
movb %al, -0x32(%rbp)
je 0x24e1
movb $0x1, %al
movb %al, -0x32(%rbp)
jmp 0x24e1
movb -0x32(%rbp), %al
testb $0x1, %al
jne 0x24ea
jmp 0x24ec
jmp 0x250b
leaq 0xc263(%rip), %rdi      # 0xe756
leaq 0xc147(%rip), %rsi      # 0xe641
movl $0x56, %edx
leaq 0xc20f(%rip), %rcx      # 0xe715
callq 0x10c0
movq $0x0, -0x20(%rbp)
cmpq $0xb, -0x20(%rbp)
jae 0x256b
movq $0x0, -0x28(%rbp)
movq $0x1, -0x30(%rbp)
movq -0x20(%rbp), %rcx
leaq 0xbffb(%rip), %rax      # 0xe530
movl (%rax,%rcx,8), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x255b
movq -0x20(%rbp), %rcx
leaq 0xbfe4(%rip), %rax      # 0xe530
movl 0x4(%rax,%rcx,8), %eax
cmpl -0x14(%rbp), %eax
jne 0x255b
movb $0x1, -0x1(%rbp)
jmp 0x256f
jmp 0x255d
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x2513
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::check_types_of_local_var_def(Local_Var_Def*, Type)
void Type_Checker::check_types_of_local_var_def(Local_Var_Def *local_var_def, Type expected_type)
{
    local_var_def->value = try_implicitly_convert_expression_to(
        check_types_of_expression(local_var_def->value),
        local_var_def->def.type);

    const auto TYPE_OF_LOCAL_VAR_DEF = Type::U0;

    if (expected_type != TYPE_OF_LOCAL_VAR_DEF) {
        // TODO: use offset of the local_var_def itself instead of its value;
        reporter.fail(local_var_def->value->offset, "Expected statement of type `", expected_type, "`, but local variable definition has the type `", TYPE_OF_LOCAL_VAR_DEF, "`");
    }

    push_var_def(local_var_def->def);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x26e0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
callq 0x2580
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movl $0x1, -0x18(%rbp)
cmpl $0x1, -0x14(%rbp)
je 0x268e
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rsi
movl -0x14(%rbp), %ecx
leaq 0xc15c(%rip), %rdx      # 0xe7cd
leaq 0xc172(%rip), %r8       # 0xe7ea
movl $0x1, %r9d
leaq 0xc258(%rip), %rax      # 0xe8dd
movq %rax, (%rsp)
callq 0xa3c0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x30(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x30(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x2370
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: tsoding[P]wcc/src/./wcc_type_checker.cpp
// Function: Type_Checker::check_types_of_while(While*, Type)
void Type_Checker::check_types_of_while(While *hwile, Type expected_type)
{
    hwile->condition = try_implicitly_convert_expression_to(
        check_types_of_expression(hwile->condition),
        Type::Bool);
    // TODO: use offset of the hwile body itself instead of its condition
    check_types_of_block(hwile->condition->offset, hwile->body, Type::U0);

    const auto TYPE_OF_WHILE = Type::U0;
    if (expected_type != TYPE_OF_WHILE) {
        // TODO: use offset of the hwile itself instead of its condition;
        reporter.fail(hwile->condition->offset, "Expected statement of type `", expected_type, "`, but while-loop construction has the type `", TYPE_OF_WHILE, "`");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x26e0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
movl $0x5, %edx
callq 0x2580
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x1, %ecx
callq 0x2b60
movl $0x1, -0x18(%rbp)
cmpl $0x1, -0x14(%rbp)
je 0x2b5a
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rsi
movl -0x14(%rbp), %ecx
leaq 0xbc90(%rip), %rdx      # 0xe7cd
leaq 0xbcd6(%rip), %r8       # 0xe81a
movl $0x1, %r9d
leaq 0xbd8c(%rip), %rax      # 0xe8dd
movq %rax, (%rsp)
callq 0xa3c0
addq $0x30, %rsp
popq %rbp
retq