LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/tunstall/tunstall.hpp
// Function: Tunstall::decompress(unsigned char*, int, unsigned char*, int)
void Tunstall::decompress(unsigned char *data, int input_size, unsigned char *output, int output_size) {
	unsigned char *end_output = output + output_size;
	unsigned char *end_data = data + input_size -1;
	if(probabilities.size() == 1) {
		memset(output, probabilities[0].symbol, output_size);
		return;
	}
	//index.push_back(index.back() + lengths.back()); //TODO WHY?
	while(data < end_data) {
		int symbol = *data++;
		int start = index[symbol];
		int length = lengths[symbol];
		//int length = index[symbol+1] - start;
		memcpy(output, &table[start], length);
		output += length;
	}
	//last symbol might override so we check.
	int symbol = *data;
	int start = index[symbol];
	int length = (*end_output - *output);
	//cout << (end_output - output) << endl;
	//cout << (*end_output - *output) << endl;
	memcpy(output, &table[start], length);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movslq %r8d, %r8
movq 0x10(%rdi), %rax
movq 0x18(%rdi), %rcx
subq %rax, %rcx
cmpq $0x2, %rcx
jne 0x323c
movzbl (%rax), %esi
movq %r14, %rdi
movq %r8, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
movq %rsi, %r13
movq %rdi, %rbx
movq %r8, (%rsp)
movslq %edx, %rax
leaq (%rsi,%rax), %r15
decq %r15
movq %r14, %r12
cmpq %r15, %r13
jae 0x3287
movzbl (%r13), %eax
incq %r13
shll $0x2, %eax
movq 0x28(%rbx), %rcx
movq 0x40(%rbx), %rdx
movslq (%rcx,%rax), %rsi
movslq (%rdx,%rax), %rbp
addq 0x58(%rbx), %rsi
movq %r12, %rdi
movq %rbp, %rdx
callq 0x2110
addq %rbp, %r12
jmp 0x3253
movzbl (%r13), %eax
movq 0x28(%rbx), %rcx
movslq (%rcx,%rax,4), %rsi
movq (%rsp), %rax
movzbl (%r14,%rax), %edx
movzbl (%r12), %eax
addq 0x58(%rbx), %rsi
subq %rax, %rdx
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2110
nop
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/tunstall/tunstall.hpp
// Function: Tunstall::entropy()
float Tunstall::entropy() {
	float e = 0;
	for(size_t i = 0; i < probabilities.size(); i++) {
		float p = probabilities[i].probability/255.0f;
		e += p*log(p)/log(2);
	}
	return -e;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
subq %rax, %rcx
sarq %rcx
cmpq %rcx, %r14
jae 0x335b
movzbl 0x1(%rax,%r14,2), %eax
cvtsi2ss %eax, %xmm1
divss 0x1ce1(%rip), %xmm1     # 0x5004
movss %xmm1, 0xc(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm1, %xmm0
callq 0x2270
mulss 0xc(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
divsd 0x1cd8(%rip), %xmm0     # 0x5020
cvtss2sd 0x10(%rsp), %xmm1
addsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm0
incq %r14
jmp 0x32fe
xorps 0x1cae(%rip), %xmm0     # 0x5010
addq $0x28, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/tunstall/readfile.hpp
// Function: readchar2buf(char const*, unsigned char*&, unsigned int*)
int readchar2buf(const char* path, unsigned char*& buf, unsigned int* length)
{
	ifstream inFile;
	inFile.open(path, ios::in|ios::binary|ios::ate);
	if (!inFile.is_open()) return 0;

	inFile.seekg(0, ios::end);
	unsigned int size = inFile.tellg();
	inFile.seekg(0, ios::beg);

	buf = new unsigned char[size+1];
	inFile.read((char*)buf, size);
	buf[size] = '\0';
	*length = strlen((char*)buf);

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x2180
pushq $0xe
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x20d0
leaq 0x80(%rsp), %rdi
callq 0x2040
xorl %ebp, %ebp
testb %al, %al
je 0x340e
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rdx
xorl %esi, %esi
callq 0x21d0
leaq 0x8(%rsp), %rdi
callq 0x2250
movq %rax, %r15
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
leal 0x1(%r15), %edi
callq 0x2030
movq %rax, (%r14)
movl %r15d, %r15d
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x21b0
movq (%r14), %rax
movb $0x0, (%rax,%r15)
movq (%r14), %rdi
callq 0x2090
movl %eax, (%rbx)
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %rdi
callq 0x2050
movl %ebp, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x342e
jmp 0x342e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O2/ijleesw[P]data-compression/src/tunstall/readfile.hpp
// Function: readint2buf(char const*, unsigned char*&, unsigned int*)
int readint2buf(const char* path, unsigned char*& buf, unsigned int* length)
{
	int tmp;
	unsigned int cnt = 0;
	ifstream inFile;

	inFile.open(path);
	if (!inFile.is_open()) return 0;

	*length = 0;
	while (inFile >> tmp) (*length) = (*length)+1;
	inFile.seekg(0, ios::beg);

	buf = new unsigned char[(*length)+1];
	while (inFile >> tmp) buf[cnt++] = tmp;
	buf[cnt] = '\0';

	return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x2180
pushq $0x8
popq %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x20d0
leaq 0x80(%rsp), %rdi
callq 0x2040
xorl %ebp, %ebp
testb %al, %al
je 0x3516
xorl %eax, %eax
leaq 0x8(%rsp), %r15
leaq 0x4(%rsp), %r12
movl %eax, (%r14)
movq %r15, %rdi
movq %r12, %rsi
callq 0x20c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x34bc
movl (%r14), %eax
incl %eax
jmp 0x3499
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21d0
movl (%r14), %edi
incl %edi
callq 0x2030
movq %rax, (%rbx)
xorl %ebp, %ebp
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x20c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
movl %ebp, %eax
jne 0x350c
movb 0x4(%rsp), %cl
movq (%rbx), %rdx
incl %ebp
movb %cl, (%rdx,%rax)
jmp 0x34e3
movq (%rbx), %rcx
movb $0x0, (%rcx,%rax)
pushq $0x1
popq %rbp
leaq 0x8(%rsp), %rdi
callq 0x2050
movl %ebp, %eax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3536
jmp 0x3536
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2260
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/double_free.cpp
// Function: DF_01::otherx()
void otherx() {
  FoobarClass otherxClassObject("One");

  /* FLAW: There is no copy constructor in the class - this will cause a double
   * free in the destructor */
  FoobarClass otherxClassObjectCopy(otherxClassObject);

  otherxClassObjectCopy.printData();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0xe4a(%rip), %rsi       # 0x2004
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x1224
movq (%rbx), %rdi
leaq 0x8(%rsp), %r14
movq %rdi, (%r14)
callq 0x10a0
movq %r14, %rdi
callq 0x1270
movq %rbx, %rdi
callq 0x1270
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/double_free.cpp
// Function: main
int main(int argc, char *argv[]) {
  /* seed randomness */
  srand((unsigned)time(NULL));
  printf("Calling otherx()...");
  otherx();
  printf("Finished otherx()");
  return 0;
}

// Assembly:
pushq %rax
xorl %edi, %edi
callq 0x1060
movl %eax, %edi
callq 0x1080
leaq 0xe03(%rip), %rdi       # 0x2008
xorl %eax, %eax
callq 0x1040
callq 0x11ac
leaq 0xe04(%rip), %rdi       # 0x201c
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/vanhauser-thc[P]vulntest/double_free.cpp
// Function: DF_01::FoobarClass::FoobarClass(char const*)
FoobarClass(const char *data) {
    if (data) {
      this->data = new char[strlen(data) + 1];
      strcpy(this->data, data);
    } else {
      this->data = new char[1];
      *(this->data) = '\0';
    }
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x1259
movq %rsi, %r14
movq %rsi, %rdi
callq 0x1050
leaq 0x1(%rax), %rdi
callq 0x1030
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1070
pushq $0x1
popq %rdi
callq 0x1030
movq %rax, (%rbx)
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/CSerxzm[P]WindowstoLinuxInterface/src/COPY.c
// Function: main
int main(int argc, char** argv){
    char lines[argc+1][255];
    predealLine(argc, argv, lines);
    char* srcname = lines[1];
    char* dstname = lines[2];
    char option[5];
    FILE *src, *dst;
	
	if(access(srcname, F_OK)==-1) {
		printf("源文件不存在\n");
		return 0;
    }
    if(!access(dstname, F_OK)) {
        while(1) {
            printf("覆盖 %s 吗?(Yes/No/All):", dstname);
            scanf("%s", option);
            if(strcmp("No", option) == 0) {
                printf("已复制 0 个文件\n");
                return 0;
            } 
            else if(strcmp("Yes", option) == 0) {
                break;
            }
        }
    }
    src = fopen(srcname, "rb");
    dst = fopen(dstname, "wb");
    int bufferLen = 1024;
    int readCount = 0;
    char *buffer = (char*)malloc(bufferLen);
    while((readCount=fread(buffer, 1, bufferLen, src)) > 0) {
        fwrite(buffer, readCount, 1, dst);
    }
    printf("已复制 1 个文件\n");
    free(buffer);
    fclose(src);
    fclose(dst);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leal 0x1(%rdi), %eax
movq %rsp, %r14
imulq $0xff, %rax, %r15
addq $0xf, %r15
andq $-0x10, %r15
movq %r14, %rbx
subq %r15, %rbx
movq %rbx, %rsp
movq %rbx, %rdx
callq 0x120c
addq $0xff, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10b0
cmpl $-0x1, %eax
je 0x1427
negq %r15
addq %r15, %r14
addq $0x1fe, %r14            # imm = 0x1FE
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
testl %eax, %eax
jne 0x139d
leaq -0x2d(%rbp), %r13
leaq 0xccb(%rip), %r15       # 0x2023
pushq $0x3
popq %r12
leaq 0xca1(%rip), %rdi       # 0x2004
movq %r14, %rsi
xorl %eax, %eax
callq 0x1080
leaq 0xcac(%rip), %rdi       # 0x2020
movq %r13, %rsi
xorl %eax, %eax
callq 0x10d0
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x10a0
testl %eax, %eax
je 0x1430
cmpl $0x736559, -0x2d(%rbp)  # imm = 0x736559
jne 0x135c
leaq 0xc86(%rip), %rsi       # 0x202a
movq %rbx, %rdi
callq 0x10c0
movq %rax, %rbx
leaq 0xc77(%rip), %rsi       # 0x202d
movq %r14, %rdi
callq 0x10c0
movq %rax, %r14
movl $0x400, %edi            # imm = 0x400
callq 0x1090
movq %rax, %r15
pushq $0x1
popq %r12
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rcx
callq 0x1050
testl %eax, %eax
jle 0x1401
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %r14, %rcx
callq 0x10e0
jmp 0x13d2
leaq 0xc3e(%rip), %rdi       # 0x2046
callq 0x1040
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1060
movq %r14, %rdi
callq 0x1060
jmp 0x143c
leaq 0xc2e(%rip), %rdi       # 0x205c
jmp 0x1437
leaq 0xbf9(%rip), %rdi       # 0x2030
callq 0x1040
xorl %eax, %eax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/motet-a[P]libforks/tests/sigkill_parent_process.c
// Function: main
int main() {
  check(pipe(pipe_fds) == 0);

  pid_t child_pid = fork();
  check(child_pid != -1);
  if (child_pid == 0) {
    check(close(pipe_fds[0]) == 0);
    parent_main();
    abort();
  }

  check(close(pipe_fds[1]) == 0);

  pid_t serv_pid;
  check(read(pipe_fds[0], &serv_pid, sizeof serv_pid) == sizeof serv_pid);

  check(kill(child_pid, SIGKILL) == 0);

  int wait_status;
  check(wait(&wait_status) == child_pid);
  check(WIFSIGNALED(wait_status));
  check(WTERMSIG(wait_status) == SIGKILL);

  while (true) {
    if (kill(serv_pid, 0) == -1) {
      check(errno == ESRCH);
      break;
    }
  }

  return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x4e04(%rip), %rdi      # 0x611c
callq 0x10e0
testl %eax, %eax
jne 0x13dc
callq 0x1200
testl %eax, %eax
je 0x13e7
movl %eax, %ebx
cmpl $-0x1, %eax
je 0x1400
movl 0x4ddd(%rip), %edi      # 0x6120
callq 0x10c0
testl %eax, %eax
jne 0x140b
movl 0x4dc6(%rip), %edi      # 0x611c
leaq 0xc(%rsp), %rsi
pushq $0x4
popq %rdx
callq 0x10f0
cmpq $0x4, %rax
jne 0x1416
pushq $0x9
popq %rsi
movl %ebx, %edi
callq 0x1150
testl %eax, %eax
jne 0x1421
leaq 0x8(%rsp), %rdi
callq 0x11f0
cmpl %ebx, %eax
jne 0x142c
movl 0x8(%rsp), %eax
andl $0x7f, %eax
movl %eax, %ecx
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
cmpl $0x1ffffff, %ecx        # imm = 0x1FFFFFF
jle 0x1437
cmpl $0x9, %eax
jne 0x1442
movl 0xc(%rsp), %ebx
movl %ebx, %edi
xorl %esi, %esi
callq 0x1150
cmpl $-0x1, %eax
jne 0x13bc
callq 0x1050
cmpl $0x3, (%rax)
jne 0x144d
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
leaq 0x1c21(%rip), %rdi      # 0x3004
pushq $0x10
jmp 0x1461
movl 0x4d2f(%rip), %edi      # 0x611c
callq 0x10c0
testl %eax, %eax
jne 0x1458
callq 0x1492
callq 0x1040
leaq 0x1c30(%rip), %rdi      # 0x3037
pushq $0x13
jmp 0x1461
leaq 0x1c4d(%rip), %rdi      # 0x305f
pushq $0x1a
jmp 0x1461
leaq 0x1c5a(%rip), %rdi      # 0x3077
pushq $0x1d
jmp 0x1461
leaq 0x1c90(%rip), %rdi      # 0x30b8
pushq $0x1f
jmp 0x1461
leaq 0x1ca3(%rip), %rdi      # 0x30d6
pushq $0x22
jmp 0x1461
leaq 0x1cb8(%rip), %rdi      # 0x30f6
pushq $0x23
jmp 0x1461
leaq 0x1cc6(%rip), %rdi      # 0x310f
pushq $0x24
jmp 0x1461
leaq 0x1cdc(%rip), %rdi      # 0x3130
pushq $0x28
jmp 0x1461
leaq 0x1be8(%rip), %rdi      # 0x3047
pushq $0x15
popq %rsi
callq 0x1467
// File: /workspace/github_c_makefile_star2_O2/motet-a[P]libforks/tests/sigkill_parent_process.c
// Function: parent_main
static void parent_main(void) {
  libforks_ServerConn conn;
  check(libforks_start(&conn) == libforks_OK);

  pid_t serv_pid = libforks_get_server_pid(conn);
  check(write(pipe_fds[1], &serv_pid, sizeof serv_pid) == sizeof serv_pid);

  sleep(999);
}

// Assembly:
subq $0x18, %rsp
leaq 0x8(%rsp), %rdi
callq 0x184a
testl %eax, %eax
jne 0x14d8
movq 0x8(%rsp), %rdi
callq 0x2143
leaq 0x14(%rsp), %rsi
movl %eax, (%rsi)
movl 0x4c65(%rip), %edi      # 0x6120
pushq $0x4
popq %rdx
callq 0x1080
cmpq $0x4, %rax
jne 0x14e3
movl $0x3e7, %edi            # imm = 0x3E7
callq 0x11e0
addq $0x18, %rsp
retq
leaq 0x1c7c(%rip), %rdi      # 0x315b
pushq $0x7
jmp 0x14ec
leaq 0x1c96(%rip), %rdi      # 0x3180
pushq $0xa
popq %rsi
callq 0x1467
nop
// File: /workspace/github_c_makefile_star2_O2/ramirezsebas[P]TP-LISTINGS/./src/capitulo_5/5.1/shm.c
// Function: main
int main ()
{
  int segment_id;
  char* shared_memory;
  struct shmid_ds shmbuffer;
  int segment_size;
  const int shared_segment_size = 0x6400;

  /* Allocate a shared memory segment. */
  segment_id = shmget ( IPC_PRIVATE, shared_segment_size,
                        IPC_CREAT | IPC_EXCL | S_IRUSR | S_IWUSR);
  /* Attach the shared memory segment. */
  shared_memory = (char*) shmat (segment_id, 0, 0);
  printf ("shared memory attached at address %p\n", shared_memory);
  /* Determine the segment’s size. */
  shmctl (segment_id, IPC_STAT, &shmbuffer);
  segment_size = shmbuffer.shm_segsz;
  printf ("segment size: %d\n", segment_size);
  /* Write a string to the shared memory segment. */
  sprintf (shared_memory, "Hello, world.");
  /* Detach the shared memory segment. */
  shmdt (shared_memory);

  /* Reattach the shared memory segment, at a different address. */
  shared_memory = (char*) shmat (segment_id, (void*) 0x5000000, 0);
  printf ("shared memory reattached at address %p\n", shared_memory);
  /* Print out the string from shared memory. */
  printf ("%s\n", shared_memory);
  /* Detach the shared memory segment. */
  shmdt (shared_memory);

  /* Deallocate the shared memory segment. */
  shmctl (segment_id, IPC_RMID, 0);

  return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl $0x6400, %esi           # imm = 0x6400
xorl %edi, %edi
movl $0x780, %edx            # imm = 0x780
callq 0x1080
movl %eax, %ebx
movl %eax, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1070
movq %rax, %r14
leaq 0xe43(%rip), %rdi       # 0x2004
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
pushq $0x2
popq %rsi
leaq -0x88(%rbp), %r15
movl %ebx, %edi
movq %r15, %rdx
callq 0x1060
movl 0x30(%r15), %esi
leaq 0xe40(%rip), %rdi       # 0x202a
xorl %eax, %eax
callq 0x1050
movabsq $0x77202c6f6c6c6548, %rax # imm = 0x77202C6F6C6C6548
movq %rax, (%r14)
movabsq $0x2e646c726f7720, %rax # imm = 0x2E646C726F7720
movq %rax, 0x6(%r14)
movq %r14, %rdi
callq 0x1040
movl $0x5000000, %esi        # imm = 0x5000000
movl %ebx, %edi
xorl %edx, %edx
callq 0x1070
movq %rax, %r14
leaq 0xe1e(%rip), %rdi       # 0x204a
movq %rax, %rsi
xorl %eax, %eax
callq 0x1050
movq %r14, %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1040
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1060
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/veltzer[P]xmeltdown/src/xmeltdown.c
// Function: calc_xloc
int calc_xloc(int width) {
	int xloc;
	/* give values near edges a better chance */
	xloc=rnd(DisplayWidth(dpy, screen)+MIN_WIDTH)-MIN_WIDTH;
	if ((xloc+width) > DisplayWidth(dpy, screen))
		xloc=DisplayWidth(dpy, screen)-width;
	else if (xloc < 0)
		xloc=0;
	return xloc;
}

// Assembly:
pushq %rbx
movl %edi, %ebx
callq 0x1130
movq 0x2986(%rip), %rcx      # 0x40c0
movq 0xe8(%rcx), %rcx
movslq 0x2980(%rip), %rdx      # 0x40c8
shlq $0x7, %rdx
movslq 0x18(%rcx,%rdx), %rcx
movq %rcx, %rsi
addq $0x1e, %rsi
cqto
idivq %rsi
leal -0x1e(%rdx), %esi
addl %ebx, %edx
addl $-0x1e, %edx
movl %ecx, %edi
subl %ebx, %edi
xorl %eax, %eax
testl %esi, %esi
cmovgl %esi, %eax
cmpl %ecx, %edx
cmovgl %edi, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_05/strncpy.c
// Function: main
int main(void)
{
  char s[100] = "This is the first string";
  char *t = "Test is the second string, that is cool";
  size_t nr_chars = 26;

  strcpy_ptr(s, t, nr_chars);

  puts(s);

  return 0;
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
leaq 0xec8(%rip), %rsi       # 0x2010
pushq $0x64
popq %rcx
movq %rsp, %rbx
movq %rbx, %rdi
rep  movsb (%rsi), %es:(%rdi)
leaq 0xf1a(%rip), %rsi       # 0x2074
pushq $0x1a
popq %rdx
movq %rbx, %rdi
callq 0x1175
movq %rbx, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x70, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/openshmem-org[P]openshmem-examples/c++/buffon.cxx
// Function: buffon_laplace_simulate(double, double, double, int)
int
buffon_laplace_simulate(double a, double b, double l, int trial_num)
{
    double angle;
    int hits;
    int trial;
    double x1;
    double x2;
    double y1;
    double y2;

    hits = 0;

    for (trial = 1; trial <= trial_num; ++trial) {
        //
        // Randomly choose the location of the eye of the needle in
        // [0,0]x[A,B],
        // and the angle the needle makes.
        //
        x1 = a * (double) rand() / (double) RAND_MAX;
        y1 = b * (double) rand() / (double) RAND_MAX;
        angle = 2.0 * PI * (double) rand() / (double) RAND_MAX;
        //
        // Compute the location of the point of the needle.
        //
        x2 = x1 + l * cos(angle);
        y2 = y1 + l * sin(angle);
        //
        // Count the end locations that lie outside the cell.
        //
        if (x2 <= 0.0 || a <= x2 || y2 <= 0.0 || b <= y2) {
            ++hits;
        }
    }
    return hits;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %edi, %ebx
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
xorl %ebp, %ebp
testl %edi, %edi
cmovlel %ebp, %ebx
movsd %xmm0, 0x20(%rsp)
subl $0x1, %ebx
jb 0x1334
callq 0x1040
cvtsi2sd %eax, %xmm1
mulsd 0x20(%rsp), %xmm1
movsd 0xd79(%rip), %xmm0      # 0x2008
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
callq 0x1040
movl %eax, %r14d
callq 0x1040
cvtsi2sd %eax, %xmm0
mulsd 0xd5e(%rip), %xmm0      # 0x2010
divsd 0xd4e(%rip), %xmm0      # 0x2008
movsd %xmm0, 0x28(%rsp)
callq 0x1100
mulsd 0x18(%rsp), %xmm0
addsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsp), %xmm0
callq 0x1030
movsd 0x8(%rsp), %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm1
jae 0x132d
cvtsi2sd %r14d, %xmm1
mulsd 0x10(%rsp), %xmm1
divsd 0xd03(%rip), %xmm1      # 0x2008
ucomisd 0x20(%rsp), %xmm2
jae 0x132d
mulsd 0x18(%rsp), %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jae 0x132d
ucomisd 0x10(%rsp), %xmm0
jb 0x126f
incl %ebp
jmp 0x126f
movl %ebp, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DAMASKER/datander.c
// Function: Clean_Exit
void Clean_Exit(int val)
{ char *command;

  command = CommandBuffer("",SORT_PATH);
  sprintf(command,"rm -r %s",SORT_PATH);
  if (system(command) != 0)
    { fprintf(stderr,"%s: Command Failed:\n%*s      %s\n",
                     Prog_Name,(int) strlen(Prog_Name),"",command);
      exit (1);
    }
  exit (val);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movq 0x1fd8c(%rip), %rsi     # 0x221c8
leaq 0x19e31(%rip), %rdi     # 0x1c274
callq 0x24ba
movq %rax, %rbx
movq 0x1fd76(%rip), %rdx     # 0x221c8
leaq 0x18bef(%rip), %rsi     # 0x1b048
movq %rax, %rdi
xorl %eax, %eax
callq 0x22d0
movq %rbx, %rdi
callq 0x2130
testl %eax, %eax
jne 0x2476
movl %ebp, %edi
callq 0x22e0
movq 0x1fb7b(%rip), %rax     # 0x21ff8
movq (%rax), %r14
leaq 0x1fdd9(%rip), %rax     # 0x22260
movq (%rax), %r15
movq %r15, %rdi
callq 0x2120
leaq 0x18fe8(%rip), %rsi     # 0x1b481
leaq 0x19dd4(%rip), %r8      # 0x1c274
movq %r14, %rdi
movq %r15, %rdx
movl %eax, %ecx
movq %rbx, %r9
xorl %eax, %eax
callq 0x2200
pushq $0x1
popq %rdi
callq 0x22e0
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DAMASKER/datander.c
// Function: CommandBuffer
static char *CommandBuffer(char *bname, char *spath)
{ static char *cat = NULL;
  static int   max = -1;
  int len;

  len = 2*(strlen(bname) + strlen(spath)) + 200;
  if (len > max)
    { max = ((int) (1.2*len)) + 100;
      if ((cat = (char *) realloc(cat,max+1)) == NULL)
        { fprintf(stderr,"%s: Out of memory (Making path name)\n",Prog_Name);
          Clean_Exit(1);
        }
    }
  return (cat);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
callq 0x2120
movq %rax, %r14
movq %rbx, %rdi
callq 0x2120
addl %r14d, %eax
leal 0xc8(,%rax,2), %ecx
movq 0x1fcf6(%rip), %rax     # 0x221d8
cmpl 0x1fcc0(%rip), %ecx     # 0x221a8
jle 0x251d
cvtsi2sd %ecx, %xmm0
mulsd 0x18b12(%rip), %xmm0    # 0x1b008
cvttsd2si %xmm0, %ecx
leal 0x64(%rcx), %edx
movl %edx, 0x1fca5(%rip)     # 0x221a8
addl $0x65, %ecx
movslq %ecx, %rsi
movq %rax, %rdi
callq 0x2270
movq %rax, 0x1fcc0(%rip)     # 0x221d8
testq %rax, %rax
je 0x2525
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x1facc(%rip), %rax     # 0x21ff8
movq (%rax), %rdi
leaq 0x1fd2a(%rip), %rax     # 0x22260
movq (%rax), %rdx
leaq 0x18f85(%rip), %rsi     # 0x1b4c5
xorl %eax, %eax
callq 0x2200
pushq $0x1
popq %rdi
callq 0x242c
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DAMASKER/tandem.c
// Function: Set_Filter_Params
int Set_Filter_Params(int kmer, int binshift, int hitmin, int nthreads)
{ if (kmer <= 1)
    return (1);

  Kmer     = kmer;
  Binshift = binshift;
  Hitmin   = hitmin;

  Kshift = 2*Kmer;
  if (Kmer == 32)
    Kmask = 0xffffffffffffffffllu;
  else
    Kmask = (0x1llu << Kshift) - 1;

  NTHREADS = 1;
  NSHIFT   = 0;
  while (2*NTHREADS <= nthreads)
    { NTHREADS *= 2;
      NSHIFT   += 1;
    }

  return (0);
}

// Assembly:
cmpl $0x2, %edi
jge 0x2ef9
pushq $0x1
popq %rax
retq
movl %ecx, %eax
movl %edi, 0x1f2df(%rip)     # 0x221e0
movl %esi, 0x1f2dd(%rip)     # 0x221e4
movl %edx, 0x1f2db(%rip)     # 0x221e8
leal (%rdi,%rdi), %ecx
movl %ecx, 0x1f2d6(%rip)     # 0x221ec
pushq $-0x1
popq %rdx
movq %rdx, %rsi
shlq %cl, %rsi
cmpl $0x20, %edi
notq %rsi
cmoveq %rdx, %rsi
movq %rsi, 0x1f2c0(%rip)     # 0x221f0
movl $0x1, 0x1f2be(%rip)     # 0x221f8
xorl %ecx, %ecx
pushq $0x1
popq %rdx
addl %edx, %edx
cmpl %eax, %edx
jg 0x2f4f
movl %edx, 0x1f2ad(%rip)     # 0x221f8
incl %ecx
jmp 0x2f3f
movl %ecx, 0x1f2a7(%rip)     # 0x221fc
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DAMASKER/tandem.c
// Function: Diagonal_Span
void Diagonal_Span(Path *path, int *mind, int *maxd)
{ uint16 *points;
  int     i, tlen;
  int     dd, low, hgh;

  points = path->trace;
  tlen   = path->tlen;

  dd = path->abpos - path->bbpos;
  low = hgh = dd;

  dd = path->aepos - path->bepos;
  if (dd < low)
    low = dd;
  else if (dd > hgh)
    hgh = dd;

  dd = (path->abpos/MR_tspace)*MR_tspace - path->bbpos;
  tlen -= 2;
  for (i = 1; i < tlen; i += 2)
    { dd += MR_tspace - points[i];
      if (dd < low)
        low = dd;
      else if (dd > hgh)
        hgh = dd;
    }

  *mind = (low >> Binshift)-1;
  *maxd = (hgh >> Binshift)+1;
}

// Assembly:
pushq %rbp
pushq %rbx
movq %rdx, %r8
movq (%rdi), %r11
movl 0x10(%rdi), %ecx
movl 0x14(%rdi), %ebp
movl %ecx, %eax
subl %ebp, %eax
movl 0x18(%rdi), %r9d
subl 0x1c(%rdi), %r9d
cmpl %eax, %r9d
movl %eax, %r10d
cmovgl %r9d, %r10d
movslq 0x8(%rdi), %rdi
cmovgel %eax, %r9d
movl 0x1f276(%rip), %ebx     # 0x22200
movl %ecx, %eax
cltd
idivl %ebx
addl %ebp, %edx
subl %edx, %ecx
addq $-0x2, %rdi
movabsq $0x1, %rax
cmpq %rdi, %rax
jge 0x2fcb
movzwl (%r11,%rax,2), %edx
movl %ebx, %ebp
subl %edx, %ebp
addl %ebp, %ecx
cmpl %r10d, %ecx
movl %r10d, %edx
cmovgl %ecx, %edx
cmpl %r9d, %ecx
cmovll %ecx, %r9d
cmovgel %edx, %r10d
addq $0x2, %rax
jmp 0x2fa1
movb 0x1f213(%rip), %cl      # 0x221e4
sarl %cl, %r9d
sarl %cl, %r10d
decl %r9d
movl %r9d, (%rsi)
incl %r10d
movl %r10d, (%r8)
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DAMASKER/tandem.c
// Function: count_thread
static void *count_thread(void *arg)
{ Merge_Arg  *data  = (Merge_Arg *) arg;
  int64      *kptr  = data->kptr;
  KmerPos    *asort = MG_alist;
  int         aend  = data->aend;

  uint64 ca, da;
  int    ia;
  int    ar, nr;
  int    ap, np;

  ia = data->abeg;
  da = asort[ia].code;
  while (ia < aend)
    { ca = da;
      ar = asort[ia].read;
      ap = asort[ia].rpos;
      kptr[ap & BMASK] += 1;
      while ((da = asort[++ia].code) == ca)
        { np = asort[ia].rpos;
          if ((nr = asort[ia].read) == ar)
            asort[ia].code = np - ap;
          else
            { asort[ia].code = 0;
              ar = nr;
            }
          ap = np;
          kptr[ap & BMASK] += 1;
        }
      asort[ia].code = 0;
    }
            
  return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movq 0x1e6d0(%rip), %rcx     # 0x22208
movl 0x4(%rdi), %edx
movslq (%rdi), %rsi
movq %rsi, %rdi
shlq $0x4, %rdi
movq (%rcx,%rdi), %r9
leaq 0x10(%rcx), %rdi
xorl %r8d, %r8d
cmpl %edx, %esi
jge 0x3bac
movslq %esi, %r10
shlq $0x4, %r10
movl 0x8(%rcx,%r10), %r11d
movl 0xc(%rcx,%r10), %ebx
incl %esi
addq %rdi, %r10
movzbl %r11b, %r14d
incq (%rax,%r14,8)
movq (%r10), %r14
cmpq %r9, %r14
jne 0x3ba3
movl 0x8(%r10), %ebp
movl 0xc(%r10), %r14d
movl %ebp, %r15d
subl %r11d, %r15d
cmpl %ebx, %r14d
cmovnel %r8d, %r15d
movslq %r15d, %r11
movq %r11, (%r10)
incl %esi
addq $0x10, %r10
movl %ebp, %r11d
movl %r14d, %ebx
jmp 0x3b6a
andq $0x0, (%r10)
movq %r14, %r9
jmp 0x3b50
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DAMASKER/tandem.c
// Function: tuple_thread
static void *tuple_thread(void *arg)
{ Tuple_Arg  *data  = (Tuple_Arg *) arg;
  int         tnum  = data->tnum;
  int64      *kptr  = data->kptr;
  KmerPos    *list  = TA_list;
  int         i, m, n, x, p;
  uint64      c;
  char       *s;

  c  = TA_block->nreads;
  i  = (c * tnum) >> NSHIFT;
  n  = TA_block->reads[i].boff;
  s  = ((char *) (TA_block->bases)) + n;
  n -= Kmer*i;

  for (m = (c * (tnum+1)) >> NSHIFT; i < m; i++)
    { c = p = 0;
      for (x = 1; x < Kmer; x++)
        c = (c << 2) | s[p++];
      while ((x = s[p]) != 4)
        { c = ((c << 2) | x) & Kmask;
          list[n].read = i;
          list[n].rpos = ++p;
          list[n].code = c;
          n += 1;
          kptr[c & BMASK] += 1;
        }
      s += (p+1);
    }

  return (NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movslq (%rdi), %rax
movq 0x8(%rdi), %rdx
movq 0x1d9ae(%rip), %r9      # 0x22220
movslq 0x30(%r9), %r11
movq %r11, %rsi
imulq %rax, %rsi
movb 0x1d979(%rip), %cl      # 0x221fc
shrq %cl, %rsi
movq 0x1d99b(%rip), %rdi     # 0x22228
movq 0x60(%r9), %r8
movslq %esi, %rbx
imulq $0x28, %rbx, %r10
movq 0x10(%r8,%r10), %r8
movslq %r8d, %r8
movq 0x58(%r9), %r9
addq %r8, %r9
movl 0x1d932(%rip), %r10d    # 0x221e0
imull %r10d, %ebx
incq %rax
imulq %r11, %rax
shrq %cl, %rax
subl %ebx, %r8d
movq 0x1d92a(%rip), %rcx     # 0x221f0
addq $0xc, %rdi
movabsq $0x1, %r11
cmpl %eax, %esi
jge 0x4946
movq %r11, %rbx
xorl %r15d, %r15d
xorl %r14d, %r14d
leal 0x1(%r15), %ebp
cmpl %r10d, %ebp
jge 0x48fe
shlq $0x2, %r14
movsbq (%r9,%r15), %r12
incq %r15
orq %r12, %r14
incq %rbx
jmp 0x48e1
movslq %r8d, %r15
shlq $0x4, %r15
addq %rdi, %r15
movsbq -0x1(%r9,%rbx), %r12
cmpq $0x4, %r12
je 0x493d
shlq $0x2, %r14
orq %r12, %r14
andq %rcx, %r14
movl %esi, (%r15)
movl %ebx, -0x4(%r15)
movq %r14, -0xc(%r15)
movzbl %r14b, %r12d
incq (%rdx,%r12,8)
incq %rbx
incl %r8d
addq $0x10, %r15
jmp 0x4908
movl %ebx, %ebx
addq %rbx, %r9
incl %esi
jmp 0x48d4
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/Joy-Division[P]tools-mgs/dat-merge.c
// Function: main
int main(int argc, char** argv) {
	FILE *f = NULL;
	FILE *o = NULL;
	
	uint32_t numvfsfiles;
	vfsfile* vfsfiles;
	
	unsigned int i;
	
	if( argc < 2 ) {
		printf("Not enough args!\nUse: %s dat-file\n", argv[0]);
		return 1;
	}
	
	if( !(f = fopen( argv[1], "rb" ))) {
		printf("Couldnt open file %s\n", argv[1]);
		return 1;
	}
	
	fread(&numvfsfiles, 4, 1, f);
	vfsfiles = malloc(sizeof(vfsfile)*numvfsfiles);
	fread(vfsfiles, sizeof(vfsfile)*numvfsfiles, 1, f);
	
	for(i = 0; i < numvfsfiles; i++) {
		printf("File %s offset %08x size %08x sectors\n", vfsfiles[i].name, vfsfiles[i].offset, vfsfiles[i].size);
		fseek(f, vfsfiles[i].offset*0x800, SEEK_SET);
		if( !(o = fopen(vfsfiles[i].name, "wb" ))) {
			printf("Couldnt open files %s\n", vfsfiles[i].name);
			return 1;
		}
		writeFile(f, vfsfiles[i].size*0x800, o);
		fclose(o);
	}
	
	free(vfsfiles);
	fclose(f);
	
	printf("Done.\n");
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
cmpl $0x1, %edi
jg 0x12a1
movq (%r14), %rsi
leaq 0xdb6(%rip), %rdi       # 0x2052
jmp 0x13a0
movq 0x8(%r14), %rdi
leaq 0xdc9(%rip), %rsi       # 0x2075
callq 0x10a0
testq %rax, %rax
je 0x1369
movq %rax, %rbx
leaq 0x4(%rsp), %r14
pushq $0x4
popq %rsi
pushq $0x1
popq %r12
movq %r14, %rdi
movq %r12, %rdx
movq %rax, %rcx
callq 0x1050
movl (%r14), %eax
imulq $0x18, %rax, %r14
movq %r14, %rdi
callq 0x1080
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
callq 0x1050
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x1376
leaq (%r15,%r13), %rbp
movl 0x10(%r15,%r13), %edx
movl 0x14(%r15,%r13), %ecx
leaq 0xd77(%rip), %rdi       # 0x208e
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1070
movl 0x10(%r15,%r13), %esi
shll $0xb, %esi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1090
movq %rbp, %rdi
leaq 0xd78(%rip), %rsi       # 0x20b5
callq 0x10a0
testq %rax, %rax
je 0x1396
movq %rax, %r12
movl 0x14(%rbp), %esi
shll $0xb, %esi
movq %rbx, %rdi
movq %rax, %rdx
callq 0x11cc
movq %r12, %rdi
callq 0x1060
addq $0x18, %r13
jmp 0x12fd
movq 0x8(%r14), %rsi
leaq 0xd04(%rip), %rdi       # 0x2078
jmp 0x13a0
movq %r15, %rdi
callq 0x1030
movq %rbx, %rdi
callq 0x1060
leaq 0xd42(%rip), %rdi       # 0x20cf
callq 0x1040
xorl %eax, %eax
jmp 0x13aa
leaq 0xd1b(%rip), %rdi       # 0x20b8
movq %rbp, %rsi
xorl %eax, %eax
callq 0x1070
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/liuhaotian[P]xmppsh/libstrophe/examples/bot.c
// Function: main
int main(int argc, char **argv)
{
    xmpp_ctx_t *ctx;
    xmpp_conn_t *conn;
    xmpp_log_t *log;
    char *jid, *pass;

    /* take a jid and password on the command line */
    if (argc != 3) {
	fprintf(stderr, "Usage: bot <jid> <pass>\n\n");
	return 1;
    }
    
    jid = argv[1];
    pass = argv[2];

    /* init library */
    xmpp_initialize();

    /* create a context */
    log = xmpp_get_default_logger(XMPP_LEVEL_DEBUG); /* pass NULL instead to silence output */
    ctx = xmpp_ctx_new(NULL, log);

    /* create a connection */
    conn = xmpp_conn_new(ctx);

    /* setup authentication information */
    xmpp_conn_set_jid(conn, jid);
    xmpp_conn_set_pass(conn, pass);

    /* initiate connection */
    xmpp_connect_client(conn, NULL, 0, conn_handler, ctx);

    /* enter the event loop - 
       our connect handler will trigger an exit */
    xmpp_run(ctx);

    /* release our connection and context */
    xmpp_conn_release(conn);
    xmpp_ctx_free(ctx);

    /* final shutdown of the library */
    xmpp_shutdown();

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x3, %edi
jne 0x28fe
movq 0x8(%rsi), %r15
movq 0x10(%rsi), %r12
callq 0x4b80
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x4bd8
xorl %edi, %edi
movq %rax, %rsi
callq 0x4f39
movq %rax, %r14
movq %rax, %rdi
callq 0x3fac
movq %rax, %r13
movq %rax, %rdi
movq %r15, %rsi
callq 0x45a3
movq %r13, %rdi
movq %r12, %rsi
callq 0x45df
leaq -0x121(%rip), %rcx      # 0x27a5
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r14, %r8
callq 0x461e
movq %r14, %rdi
callq 0x54e5
movq %r13, %rdi
callq 0x4378
movq %r14, %rdi
callq 0x4f98
callq 0x4b8c
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq 0xe6e3(%rip), %rax      # 0x10fe8
movq (%rax), %rcx
leaq 0x97c4(%rip), %rdi      # 0xc0d3
pushq $0x19
popq %rsi
pushq $0x1
popq %rdx
callq 0x2300
pushq $0x1
popq %rbx
jmp 0x28f2
nop
// File: /workspace/github_c_makefile_star2_O2/rongarret[P]clmm/verify.c
// Function: main
int main(int argc, char** argv) {

  c_string filename;

  if (argc == 2) {
    filename = argv[1];
  } else {
    printf("Usage: %s filename\n", argv[0]);
    exit(1);
  }

  // Read the file to verify

  c_string signature_string = (c_string)file_contents(filename, 0)->data;

  // Parse the public key

  p_vector pk = b64decode(signature_string + strlen("CLMM signed by: "), 0);

  // Parse the signature

  u64 smlen = crypto_sign_BYTES + crypto_hash_BYTES;
  u8* buffer1 = malloc(smlen);
  u8* p1 = buffer1;
  c_string p2 = strstr(signature_string, "\n") + 1;

  for (int i=0; i<4; i++) {
    for (int j=0; j<32; j++) {
      int k;
      sscanf(p2, "%02x", &k);
      *p1++ = (u8)k;
      p2+=2;
    }
    p2+=1;
  }

  // Verify the signature

  u64 mlen;
  u8* buffer2 = malloc(smlen);
  int status = crypto_sign_open(buffer2, &mlen, buffer1, smlen, pk->data);
  printf(status ? "NOT valid\n" : "valid\n");
  return status;
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
cmpl $0x2, %edi
jne 0x1332
movq 0x8(%rsi), %rdi
xorl %esi, %esi
callq 0x1469
movq 0x10(%rax), %r15
leaq 0x10(%r15), %rdi
xorl %esi, %esi
callq 0x1574
movq %rax, -0x38(%rbp)
movl $0x80, %edi
callq 0x10c0
movq %rax, %rbx
pushq $0xa
popq %rsi
movq %r15, %rdi
callq 0x1060
movq %rax, %r13
leaq 0x2d82(%rip), %r15      # 0x4018
leaq -0x30(%rbp), %r12
xorl %eax, %eax
movq %rbx, -0x40(%rbp)
cmpl $0x4, %eax
je 0x12dd
movl %eax, -0x2c(%rbp)
incq %r13
xorl %r14d, %r14d
leaq (%r14,%r13), %rdi
cmpl $0x40, %r14d
je 0x12d3
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x10d0
movb -0x30(%rbp), %al
movb %al, (%rbx)
incq %rbx
addq $0x2, %r14
jmp 0x12ae
movl -0x2c(%rbp), %eax
incl %eax
movq %rdi, %r13
jmp 0x12a0
movl $0x80, %edi
callq 0x10c0
movq -0x38(%rbp), %rcx
movq 0x10(%rcx), %r8
leaq -0x48(%rbp), %rsi
movl $0x80, %ecx
movq %rax, %rdi
movq -0x40(%rbp), %rdx
callq 0x2fab
movl %eax, %ebx
testl %eax, %eax
leaq 0x2d12(%rip), %rax      # 0x4021
leaq 0x2d07(%rip), %rdi      # 0x401d
cmoveq %rax, %rdi
xorl %eax, %eax
callq 0x1070
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rsi), %rsi
leaq 0x2cc8(%rip), %rdi      # 0x4004
xorl %eax, %eax
callq 0x1070
pushq $0x1
popq %rdi
callq 0x1120
nop
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/queue_lock-Synchronzied/code03.cpp
// Function: consume()
void consume()
{
	while (!q.empty()){
		std::lock_guard<std::mutex> lock(mtx);
		if(!q.empty()){
			sum += q.front();
			q.pop();
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2deb(%rip), %rbx      # 0x4140
leaq 0x2d8c(%rip), %r14      # 0x40e8
movq 0x2db5(%rip), %rax      # 0x4118
cmpq 0x2d8e(%rip), %rax      # 0x40f8
je 0x139e
movq %rbx, %rdi
callq 0x173c
movq 0x2d7d(%rip), %rax      # 0x40f8
cmpq %rax, 0x2d96(%rip)      # 0x4118
je 0x1394
movl (%rax), %eax
addl %eax, 0x2dac(%rip)      # 0x4138
movq %r14, %rdi
callq 0x1978
movq %rbx, %rdi
callq 0x1090
jmp 0x135c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/KhuramAli[P]JAM-Benchmark/queue_lock-Synchronzied/code03.cpp
// Function: main
int main()
{
	std::thread t1{produce};
	std::thread t2{consume};
	std::thread t3{consume};
	t1.join();
	t2.join();
	t3.join();
	consume();
	std::cout << sum << '\n';
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
leaq -0xd6(%rip), %rsi       # 0x12dc
leaq 0x18(%rsp), %rdi
callq 0x149a
leaq -0x79(%rip), %rsi       # 0x134a
leaq 0x10(%rsp), %rdi
callq 0x149a
leaq -0x8a(%rip), %rsi       # 0x134a
leaq 0x8(%rsp), %rdi
callq 0x149a
leaq 0x18(%rsp), %rdi
callq 0x1150
leaq 0x10(%rsp), %rdi
callq 0x1150
leaq 0x8(%rsp), %rdi
callq 0x1150
callq 0x134a
movl 0x2d31(%rip), %esi      # 0x4138
movq 0x2bca(%rip), %rdi      # 0x3fd8
callq 0x1160
pushq $0xa
popq %rsi
movq %rax, %rdi
callq 0x10f0
leaq 0x8(%rsp), %rdi
callq 0x1500
leaq 0x10(%rsp), %rdi
callq 0x1500
leaq 0x18(%rsp), %rdi
callq 0x1500
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
retq
movq %rax, %rbx
jmp 0x145b
movq %rax, %rbx
jmp 0x1465
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1500
leaq 0x10(%rsp), %rdi
callq 0x1500
leaq 0x18(%rsp), %rdi
callq 0x1500
movq %rbx, %rdi
callq 0x1170
nop
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/./libkeccak.h
// Function: libkeccak_state_destroy
inline void
libkeccak_state_destroy(volatile struct libkeccak_state *state)
{
	if (state) {
		libkeccak_state_wipe(state);
		free(state->M);
		state->M = NULL;
	}
}

// Assembly:
testq %rdi, %rdi
je 0x5766
pushq %rbx
movq %rdi, %rbx
callq 0x2160
movq 0x118(%rbx), %rdi
callq 0x2040
movq $0x0, 0x118(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/hmac/libkeccak_hmac_copy.c
// Function: libkeccak_hmac_copy
int
libkeccak_hmac_copy(struct libkeccak_hmac_state *restrict dest, const struct libkeccak_hmac_state *restrict src)
{
	size_t size;

	dest->key_opad = NULL;
	dest->key_ipad = NULL;

	if (libkeccak_state_copy(&dest->sponge, &src->sponge) < 0)
		return -1;

	dest->key_length = src->key_length;
	dest->leftover = src->leftover;

	size = (src->key_length + 7) >> 3;
	dest->key_opad = malloc(2 * size);
	if (!dest->key_opad) {
		libkeccak_state_destroy(&dest->sponge);
		return -1;
	}
	dest->key_ipad = dest->key_opad + size;

	memcpy(dest->key_opad, src->key_opad, size);
	memcpy(dest->key_ipad, src->key_ipad, size);

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x18(%rdi), %r15
addq $0x18, %rsi
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq %r15, %rdi
callq 0x20d0
pushq $-0x1
popq %rbp
testl %eax, %eax
js 0x5c28
movq 0x10(%rbx), %r12
movq %r12, 0x10(%r14)
movb 0x148(%rbx), %al
movb %al, 0x148(%r14)
addq $0x7, %r12
shrq $0x3, %r12
leaq (%r12,%r12), %rdi
callq 0x21a0
movq %rax, (%r14)
testq %rax, %rax
je 0x5c20
movq %rax, %r15
addq %r12, %r15
movq %r15, 0x8(%r14)
movq (%rbx), %rsi
movq %rax, %rdi
movq %r12, %rdx
callq 0x2170
movq 0x8(%rbx), %rsi
movq %r15, %rdi
movq %r12, %rdx
callq 0x2170
xorl %ebp, %ebp
jmp 0x5c28
movq %r15, %rdi
callq 0x2120
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_fast_destroy
inline void
libkeccak_hmac_fast_destroy(struct libkeccak_hmac_state *state)
{
	if (!state)
		return;
	free(state->key_opad);
	state->key_opad = NULL;
	state->key_ipad = NULL;
	state->key_length = 0;
	free(state->buffer);
	state->buffer = NULL;
	state->buffer_size = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x5f37
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
movq 0x138(%rbx), %rdi
callq 0x2040
xorps %xmm0, %xmm0
movups %xmm0, 0x138(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/hmac/libkeccak_hmac_fast_update.c
// Function: libkeccak_hmac_fast_update
int
libkeccak_hmac_fast_update(struct libkeccak_hmac_state *restrict state, const void *restrict msg_, size_t msglen)
{
	const unsigned char *restrict msg = msg_;
	void *new;
	size_t i;
	int n, cn;

	if (state->key_ipad) {
		if (libkeccak_fast_update(&state->sponge, state->key_ipad, state->key_length >> 3) < 0)
			return -1;
		if (state->key_length & 7)
			state->leftover = state->key_ipad[state->key_length >> 3];
		state->key_ipad = NULL;
	}

	if (!msg || !msglen)
		return 0;

	if (!(state->key_length & 7))
		return libkeccak_fast_update(&state->sponge, msg, msglen);

	if (msglen != state->buffer_size) {
		new = realloc(state->buffer, msglen);
		if (!new)
			return -1;
		state->buffer = new;
		state->buffer_size = msglen;
	}

	n = (int)(state->key_length & 7);
	cn = 8 - n;
	for (i = 1; i < msglen; i++)
		state->buffer[i] = (unsigned char)((msg[i - 1] >> cn) | (msg[i] << n));
	state->buffer[0] = (unsigned char)((state->leftover & ((1 << n) - 1)) | (msg[0] << n));
	state->leftover = (unsigned char)(msg[msglen - 1] >> cn);

	return libkeccak_fast_update(&state->sponge, state->buffer, msglen);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x8(%rdi), %rsi
pushq $-0x1
popq %rbp
testq %rsi, %rsi
je 0x6170
leaq 0x18(%r14), %rdi
movq 0x10(%r14), %rdx
shrq $0x3, %rdx
callq 0x21f0
testl %eax, %eax
js 0x61f9
movq 0x10(%r14), %rax
testb $0x7, %al
je 0x616b
movq 0x8(%r14), %rcx
shrq $0x3, %rax
movb (%rcx,%rax), %al
movb %al, 0x148(%r14)
andq $0x0, 0x8(%r14)
testq %r15, %r15
sete %cl
testq %rbx, %rbx
sete %dl
xorl %eax, %eax
orb %cl, %dl
jne 0x61fb
movq 0x10(%r14), %rax
testb $0x7, %al
je 0x624e
cmpq %rbx, 0x140(%r14)
je 0x61c2
movq 0x138(%r14), %rdi
movq %rbx, %rsi
callq 0x21c0
movq %rax, %rcx
movl %ebp, %eax
testq %rcx, %rcx
je 0x61fb
movq %rcx, 0x138(%r14)
movq %rbx, 0x140(%r14)
movq 0x10(%r14), %rax
andl $0x7, %eax
pushq $0x8
popq %rdx
subl %eax, %edx
pushq $0x1
popq %rsi
cmpq %rbx, %rsi
jae 0x6206
movzbl -0x1(%r15,%rsi), %edi
movl %edx, %ecx
shrl %cl, %edi
movzbl (%r15,%rsi), %r8d
movl %eax, %ecx
shll %cl, %r8d
orl %edi, %r8d
movq 0x138(%r14), %rcx
movb %r8b, (%rcx,%rsi)
incq %rsi
jmp 0x61cd
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $-0x1
popq %rsi
movl %eax, %ecx
shll %cl, %esi
movzbl 0x148(%r14), %ecx
notl %esi
andl %ecx, %esi
movzbl (%r15), %edi
movl %eax, %ecx
shll %cl, %edi
orl %esi, %edi
movq 0x138(%r14), %rax
movb %dil, (%rax)
movzbl -0x1(%r15,%rbx), %eax
movl %edx, %ecx
shrl %cl, %eax
movb %al, 0x148(%r14)
movq 0x138(%r14), %rsi
addq $0x18, %r14
movq %r14, %rdi
jmp 0x6258
addq $0x18, %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21f0
nop
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_initialise
inline int
libkeccak_hmac_initialise(struct libkeccak_hmac_state *restrict state, const struct libkeccak_spec *restrict spec,
                          const void *restrict key, size_t key_length)
{
	if (libkeccak_state_initialise(&state->sponge, spec) < 0)
		return -1;
	if (libkeccak_hmac_set_key(state, key, key_length) < 0) {
		libkeccak_state_destroy(&state->sponge);
		return -1;
	}
	state->leftover = 0;
	state->buffer = NULL;
	state->buffer_size = 0;
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %r12
movq %rdx, %r13
movq %rdi, %r14
leaq 0x18(%rdi), %r15
movq %r15, %rdi
callq 0x2100
pushq $-0x1
popq %rbx
testl %eax, %eax
js 0x62d6
movq %r14, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2090
testl %eax, %eax
js 0x62ce
xorps %xmm0, %xmm0
movups %xmm0, 0x138(%r14)
movb $0x0, 0x148(%r14)
xorl %ebx, %ebx
jmp 0x62d6
movq %r15, %rdi
callq 0x2120
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/maandree[P]libkeccak/hmac/../libkeccak/hmac.h
// Function: libkeccak_hmac_marshal
inline size_t
libkeccak_hmac_marshal(const struct libkeccak_hmac_state *restrict state, void *restrict data_)
{
	unsigned char *restrict data = data_;
	size_t written = libkeccak_state_marshal(&state->sponge, data);
	if (data) {
		data += written;
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wcast-align"
#endif
		memcpy(data, &state->key_length, sizeof(state->key_length));
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
		data += sizeof(size_t);
		memcpy(data, state->key_opad, (state->key_length + 7) >> 3);
		data += (state->key_length + 7) >> 3;
		data[0] = (unsigned char)!!state->key_ipad;
		data[1] = state->leftover;
	}
	return written + sizeof(size_t) + ((state->key_length + 7) >> 3) + 2 * sizeof(char);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r12
movq %rdi, %r14
addq $0x18, %rdi
callq 0x2080
movq %rax, %rbx
testq %r12, %r12
je 0x6344
leaq (%r12,%rbx), %r13
movq 0x10(%r14), %r15
movq %r15, (%r12,%rbx)
leaq (%r12,%rbx), %rdi
addq $0x8, %rdi
movq (%r14), %rsi
addq $0x7, %r15
shrq $0x3, %r15
movq %r15, %rdx
callq 0x2170
cmpq $0x0, 0x8(%r14)
setne 0x8(%r15,%r13)
movb 0x148(%r14), %al
movb %al, 0x9(%r15,%r13)
jmp 0x6350
movq 0x10(%r14), %r15
addq $0x7, %r15
shrq $0x3, %r15
leaq (%rbx,%r15), %rax
addq $0xa, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop