LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/anuwu[P]ERPLAG-Compiler/typeChecker.c
// Function: isVarStaticArr
int isVarStaticArr (varST *arrayVar)
{
	if (isLeftLimStatic(arrayVar) && isRightLimStatic(arrayVar))
		return 1 ;
	else
		return 0 ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1180
movq (%rax), %rcx
movq 0x10(%rbx), %rax
movq 0x8(%rax), %rdx
movq 0x8(%rdx), %rdx
movsbq (%rdx), %rdx
testb $0x8, 0x1(%rcx,%rdx,2)
je 0xe8ca
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movsbq (%rax), %rdx
movl $0x1, %eax
testb $0x8, 0x1(%rcx,%rdx,2)
jne 0xe8cc
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/anuwu[P]ERPLAG-Compiler/typeChecker.c
// Function: validVarIndex
int validVarIndex (moduleST *baseModule, astNode *varIndexASTNode)	// Returns TK_NUM for static index, 0 for invalid dynamic index, TK_ID for valid dynamic index
{
	// Assumes varIndexASTNode isn't NULL

	if (varIndexASTNode->id == TK_NUM)
		return TK_NUM ;

	varST *indexVar = searchVar (baseModule, varIndexASTNode->tok->lexeme) ;
	if (indexVar == NULL)
	{
		errSemantic () ;
		#ifdef _WIN64
			printf ("In module \"%s\" at line %d, index variable \"%s\" is undeclared\n", getParentModuleName (baseModule), varIndexASTNode->tok->lineNumber, varIndexASTNode->tok->lexeme) ;
		#endif
		#if defined __linux__ || defined __MACH__
			printf ("In module " ANSI_BOLD "%s" ANSI_RESET " at line " ANSI_BOLD ANSI_CYAN "%d" ANSI_RESET ", index variable " ANSI_BOLD ANSI_RED "%s" ANSI_RESET " is undeclared\n", getParentModuleName (baseModule), varIndexASTNode->tok->lineNumber, varIndexASTNode->tok->lexeme) ;
		#endif
		realBase->semanticError = 1 ;
		return 0 ;
	}
	else if (indexVar->datatype != TK_INTEGER)
	{
		errSemantic () ;
		#ifdef _WIN64
			printf ("In module \"%s\" at line %d, index variable \"%s\" needs to be of type integer\n", getParentModuleName (baseModule), varIndexASTNode->tok->lineNumber, varIndexASTNode->tok->lexeme) ;
		#endif
		#if defined __linux__ || defined __MACH__
			printf ("In module " ANSI_BOLD "%s" ANSI_RESET " at line " ANSI_BOLD ANSI_CYAN "%d" ANSI_RESET ", index variable " ANSI_BOLD ANSI_RED "%s" ANSI_RESET " needs to be of type integer\n", getParentModuleName (baseModule), varIndexASTNode->tok->lineNumber, varIndexASTNode->tok->lexeme) ;
		#endif
		realBase->semanticError = 1 ;
		return 0 ;
	}

	return TK_ID ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl $0x71, %r15d
cmpl $0x71, (%rsi)
je 0xe95b
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %rax
movq 0x8(%rax), %rsi
callq 0xc430
testq %rax, %rax
je 0xe916
movl $0x40, %r15d
cmpl $0x37, 0x8(%rax)
je 0xe95b
leaq 0x57b0(%rip), %r12      # 0x140c4
jmp 0xe91d
leaq 0x574b(%rip), %r12      # 0x14068
xorl %r15d, %r15d
xorl %eax, %eax
callq 0xf205
movq %r14, %rdi
callq 0xcb84
movq 0x8(%rbx), %rcx
movl 0x10(%rcx), %edx
movq 0x8(%rcx), %rcx
movq %r12, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0x10b0
leaq 0x236da(%rip), %rax     # 0x32028
movq (%rax), %rax
movl $0x1, 0xd8(%rax)
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/anuwu[P]ERPLAG-Compiler/typeChecker.c
// Function: validStaticArrStaticIndex
int validStaticArrStaticIndex (moduleST *baseModule, varST *arrayVar, astNode *indASTNode)
{
	int num = atoi(indASTNode->tok->lexeme) , leftLim = atoi(arrayVar->arrayIndices->tokLeft->lexeme), rightLim = atoi(arrayVar->arrayIndices->tokRight->lexeme) ;
	if (num < leftLim || num > rightLim)
	{
		errSemantic () ;
		#ifdef _WIN64
			printf ("In module \"%s\" at line %d, specified index \"%s\" is out of bounds for static array variable \"%s\"\n", getParentModuleName (baseModule), indASTNode->tok->lineNumber, indASTNode->tok->lexeme, arrayVar->lexeme) ;
		#endif
		#if defined __linux__ || defined __MACH__
			printf ("In module " ANSI_BOLD "%s" ANSI_RESET " at line " ANSI_BOLD ANSI_CYAN "%d" ANSI_RESET ", specified index " ANSI_BOLD ANSI_CYAN "%s" ANSI_RESET " is out of bounds for " ANSI_BOLD ANSI_BLACK "static array" ANSI_RESET " variable " ANSI_BOLD ANSI_RED "%s\n" ANSI_RESET, getParentModuleName (baseModule), indASTNode->tok->lineNumber, indASTNode->tok->lexeme, arrayVar->lexeme) ;
		#endif
		realBase->semanticError = 1 ;
		return 0 ;
	}

	return 1 ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq 0x8(%rdx), %rax
movq 0x8(%rax), %rdi
callq 0x1140
movl %eax, %r13d
movq 0x10(%rbx), %r12
movq 0x8(%r12), %rax
movq 0x8(%rax), %rdi
callq 0x1140
cmpl %eax, %r13d
jl 0xe9be
movq 0x10(%r12), %rax
movq 0x8(%rax), %rdi
callq 0x1140
movl $0x1, %r12d
cmpl %eax, %r13d
jle 0xea03
xorl %r12d, %r12d
xorl %eax, %eax
callq 0xf205
movq %r15, %rdi
callq 0xcb84
movq 0x8(%r14), %rcx
movl 0x10(%rcx), %edx
movq 0x8(%rcx), %rcx
movq (%rbx), %r8
leaq 0x5749(%rip), %rdi      # 0x1412e
movq %rax, %rsi
xorl %eax, %eax
callq 0x10b0
leaq 0x23632(%rip), %rax     # 0x32028
movq (%rax), %rax
movl $0x1, 0xd8(%rax)
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/fork_func/check_order.c
// Function: sleep_print_func
static int
sleep_print_func(void * cookie)
{
	int ms = *((int *)cookie);

	/* Wait. */
	millisleep((size_t)ms);

	/* Write the "waited" messages to stderr. */
	if (fprintf(stderr, "waited %d ms\n", ms) < 0) {
		warnp("fprintf");
		goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movslq (%rdi), %r14
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r14, %rax
xorl %edx, %edx
divq %rcx
xorl %ebx, %ebx
leaq 0x8(%rsp), %rdi
movq %rax, (%rdi)
imulq $0xf4240, %rdx, %rax    # imm = 0xF4240
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0x1100
movq 0x3d4e(%rip), %rax      # 0x4ff8
movq (%rax), %rdi
leaq 0x1e3d(%rip), %rsi      # 0x30f1
movl %r14d, %edx
xorl %eax, %eax
callq 0x1160
testl %eax, %eax
jns 0x12f3
callq 0x1080
cmpl $0x0, (%rax)
je 0x12e2
movq %rax, %rbx
leaq 0x1e0c(%rip), %rdi      # 0x30e2
xorl %eax, %eax
callq 0x2c2c
andl $0x0, (%rbx)
jmp 0x12f0
leaq 0x1df9(%rip), %rdi      # 0x30e2
xorl %eax, %eax
callq 0x2d4b
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/fork_func/check_exit.c
// Function: check_exit
int
check_exit(void)
{
	pid_t pid;
	int i;
	int rc;

	for (i = 0; i < 4; i++) {
		/* Fork. */
		if ((pid = fork_func(func_exit, &i)) == -1)
			goto err0;

		/* Check the result. */
		if ((rc = fork_func_wait(pid)) == -1)
			goto err0;
		if (rc != i)
			goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0xc(%rsp), %rbx
movl $0x0, (%rbx)
leaq 0x42(%rip), %r14        # 0x1db4
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2274
cmpl $-0x1, %eax
je 0x1da9
movl %eax, %edi
callq 0x22d6
cmpl $-0x1, %eax
je 0x1da9
movl 0xc(%rsp), %ecx
cmpl %ecx, %eax
jne 0x1da9
leal 0x1(%rcx), %eax
movl %eax, 0xc(%rsp)
cmpl $0x2, %ecx
jle 0x1d77
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/fork_func/check_order.c
// Function: check_order
int
check_order(void)
{
	pid_t pids[NUM_PROCESSES];
	int i;

	/*-
	 * We want to output two different lists: the "spawning"
	 * messages, and the "waited" messages.  This allows the test
	 * to be more resistant to systems having different overheads
	 * for fork().
	 *
	 * To achieve this, the "spawning" messages go to stdout,
	 * while the "waited" messages go to stderr.
	 */

	/* Write the "spawning" messages to stdout. */
	for (i = 0; i < NUM_PROCESSES; i++) {
		if (fprintf(stdout, "spawning a process to wait %d ms\n",
		    SLEEP_SORT_MS[i]) < 0) {
			warnp("fprintf");
			goto err0;
		}
	}

	/* Flush stdout so that its buffer isn't duplicated in the forks. */
	if (fflush(stdout)) {
		warnp("fflush");
		goto err0;
	}

	/* Spawn the processes. */
	for (i = 0; i < NUM_PROCESSES; i++) {
		if ((pids[i] = fork_func(sleep_print_func,
		    &SLEEP_SORT_MS[i])) == -1)
			goto err0;
	}

	/* Wait for the processes to finish. */
	for (i = 0; i < NUM_PROCESSES; i++) {
		if (fork_func_wait(pids[i]))
			goto err0;
	}

	/* Success! */
	return (0);

err0:
	/* Failure! */
	return (-1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x320e(%rip), %r14      # 0x4fd8
leaq 0x336f(%rip), %r15      # 0x5140
leaq 0x12e8(%rip), %rbx      # 0x30c0
xorl %r12d, %r12d
movq (%r14), %rdi
movl (%r12,%r15), %edx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1160
testl %eax, %eax
js 0x1e20
addq $0x4, %r12
cmpq $0x14, %r12
jne 0x1ddb
movq (%r14), %rdi
callq 0x1180
testl %eax, %eax
je 0x1e4c
callq 0x1080
cmpl $0x0, (%rax)
je 0x1e97
movq %rax, %rbx
leaq 0x12cc(%rip), %rdi      # 0x30ea
jmp 0x1e34
callq 0x1080
cmpl $0x0, (%rax)
je 0x1e43
movq %rax, %rbx
leaq 0x12ae(%rip), %rdi      # 0x30e2
xorl %eax, %eax
callq 0x2c2c
movl $0x0, (%rbx)
jmp 0x1ea5
leaq 0x1298(%rip), %rdi      # 0x30e2
jmp 0x1e9e
xorl %r12d, %r12d
leaq -0xbe6(%rip), %r14      # 0x1270
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
leaq (%r15,%r12), %rsi
movq %r14, %rdi
callq 0x2274
movl %eax, (%rsp,%r12)
cmpl $-0x1, %eax
je 0x1eaa
addq $0x4, %r12
cmpq $0x14, %r12
jne 0x1e5b
xorl %r14d, %r14d
movl (%rsp,%r14,4), %edi
callq 0x22d6
testl %eax, %eax
jne 0x1eaa
incq %r14
cmpq $0x5, %r14
jne 0x1e7d
xorl %ebx, %ebx
jmp 0x1eaa
leaq 0x124c(%rip), %rdi      # 0x30ea
xorl %eax, %eax
callq 0x2d4b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/fork_func/check_perftest.c
// Function: millisleep_func
static int
millisleep_func(void * cookie)
{
	int ms = *((int *)cookie);

	/* Wait. */
	millisleep((size_t)ms);

	/* Success! */
	return (0);
}

// Assembly:
subq $0x18, %rsp
movslq (%rdi), %rcx
movq %rcx, %rax
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
mulq %rdx
shrq $0x4, %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, (%rdi)
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
subq %rax, %rcx
imulq $0xf4240, %rcx, %rax    # imm = 0xF4240
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0x1100
xorl %eax, %eax
addq $0x18, %rsp
retq
// File: /workspace/github_c_makefile_star2_O1/codeniko[P]CS214-Malloc-Free/Test10.c
// Function: main
void main()
{
    void* p = malloc(sizeof(int));
    *((int*)p) = 5;
    printf("integer: address: %p, value: %d\n", p, *((int*)p));
    free(p);
    char* c = "Hello World"; 
    p = malloc(sizeof(char) * (strlen(c) + 1));
    memcpy(p, c, strlen(c));
    printf("String: address: %p, value: %s\n", p, (char*)p);
    free(p);
    p = malloc(sizeof(float));
    *((float*)p) = 1.2345;
    printf("float: address: %p, value: %f\n", p, *((float*)p));
    free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xeb6(%rip), %rbx       # 0x2010
movl $0x4, %edi
movq %rbx, %rsi
movl $0x8, %edx
callq 0x1234
movq %rax, %r14
movl $0x5, (%rax)
leaq 0xe9d(%rip), %rdi       # 0x2019
movq %rax, %rsi
movl $0x5, %edx
xorl %eax, %eax
callq 0x1030
movq %r14, %rdi
movq %rbx, %rsi
movl $0xb, %edx
callq 0x1394
movl $0xc, %edi
movq %rbx, %rsi
movl $0xd, %edx
callq 0x1234
movq %rax, %r14
movabsq $0x6f57206f6c6c6548, %rax # imm = 0x6F57206F6C6C6548
movq %rax, (%r14)
movl $0x646c726f, 0x7(%r14)  # imm = 0x646C726F
leaq 0xe7a(%rip), %rdi       # 0x2046
movq %r14, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1030
movq %r14, %rdi
movq %rbx, %rsi
movl $0x10, %edx
callq 0x1394
movl $0x4, %edi
movq %rbx, %rsi
movl $0x11, %edx
callq 0x1234
movq %rax, %r14
movl $0x3f9e0419, (%rax)     # imm = 0x3F9E0419
leaq 0xe5b(%rip), %rdi       # 0x2066
movsd 0xdf5(%rip), %xmm0      # 0x2008
movq %rax, %rsi
movb $0x1, %al
callq 0x1030
movq %r14, %rdi
movq %rbx, %rsi
movl $0x14, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x1394
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_07/ungets.c
// Function: main
int main(void)
{
  char line[MAXLEN];
  char temp[MAXLEN];

  getstr(line, MAXLEN);
  printf("%s", line);

  ungetstr(line);

  getstr(temp, MAXLEN);
  printf("%s", temp);

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x7d8, %rsp            # imm = 0x7D8
leaq 0x3f0(%rsp), %rbx
movq %rbx, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x11d1
leaq 0xe72(%rip), %r14       # 0x2004
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x1251
movq %rsp, %rbx
movq %rbx, %rdi
movl $0x3e8, %esi            # imm = 0x3E8
callq 0x11d1
movq %r14, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1050
xorl %eax, %eax
addq $0x7d8, %rsp            # imm = 0x7D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_4/exercise_4_07/ungets.c
// Function: getstr
int getstr(char line[], int limit)
{
  int i = 0, c;

  while (limit - 1 > 0 && (c = getch()) != EOF && c != '\n')
  {
    line[i++] = c;
  }

  if (c == '\n')
  {
    line[i++] = c;
  }

  line[i] = '\0';

  return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x2, %esi
jl 0x1226
movl %esi, %ebp
xorl %r14d, %r14d
leaq 0x2e84(%rip), %r15      # 0x4070
movl 0x2e6e(%rip), %eax      # 0x4060
testl %eax, %eax
jle 0x1205
decl %eax
movl %eax, 0x2e62(%rip)      # 0x4060
movsbl (%rax,%r15), %eax
jmp 0x120a
callq 0x1060
cmpl $-0x1, %eax
je 0x122a
cmpl $0xa, %eax
je 0x122a
leaq 0x1(%r14), %rcx
movb %al, (%rbx,%r14)
movq %rcx, %r14
cmpl $0x1, %ebp
jg 0x11ec
jmp 0x122d
xorl %ecx, %ecx
jmp 0x1233
movq %r14, %rcx
cmpl $0xa, %eax
sete %al
testb $0x1, %al
je 0x123f
movl %ecx, %eax
incl %ecx
movb $0xa, (%rbx,%rax)
movslq %ecx, %rax
movb $0x0, (%rbx,%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/extracters/ckabstape/ckabstape.c
// Function: printb
void printb(unsigned char c)
{
	int i;
	for(i=0; i<8; i++){
	 if((c & 0x80) == 0)
	  printf("%c",'0');
	 else
	  printf("%c",'1');
	 c = c << 1;
	}
	printf("\n");
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
movl $0x8, %ebp
xorl %edi, %edi
testb %bl, %bl
setns %dil
xorl $0x31, %edi
callq 0x1030
addb %bl, %bl
decl %ebp
jne 0x11a4
movl $0xa, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/simh[P]simtools/extracters/ckabstape/ckabstape.c
// Function: readframe
unsigned int readframe()
{
	unsigned int i;
	unsigned char c;
	do{
	 c = getchar(); 
	 if(feof(stdin)) 
	  exit(0);
	  if((c & 0x80) == 0) printf("{nul}\n");
	} while((c & 0x80) == 0);

	i =    ((c & 0xc0)>>6)<<27;
	i = i | (c & 0x3f)<<12;
	do{
	 c = getchar(); 
	 if(feof(stdin)) 
	  exit(0);
	  if((c & 0x80) == 0) printf("{nul}\n");
	} while((c & 0x80) == 0);

	i = i |((c & 0xc0)>>6)<<24;
	i = i | (c & 0x3f)<<6;

	do{
	 c = getchar(); 
	 if(feof(stdin)) 
	  exit(0);
	  if((c & 0x80) == 0) printf("{nul}\n");
	} while((c & 0x80) == 0);

	i = i |((c & 0xc0)>>6)<<21;
	i = i | (c & 0x3f);
	return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
callq 0x1060
movl %eax, %ebx
movq 0x2e00(%rip), %r12      # 0x3fe0
movq (%r12), %rdi
callq 0x1070
testl %eax, %eax
jne 0x1296
leaq 0x139c(%rip), %r14      # 0x2594
testb %bl, %bl
js 0x121a
movq %r14, %rdi
callq 0x1040
callq 0x1060
movl %eax, %ebx
movq (%r12), %rdi
callq 0x1070
testl %eax, %eax
je 0x11f8
jmp 0x1296
callq 0x1060
movl %eax, %ebp
movq (%r12), %rdi
callq 0x1070
testl %eax, %eax
jne 0x1296
leaq 0x135f(%rip), %r14      # 0x2594
testb %bpl, %bpl
js 0x1258
movq %r14, %rdi
callq 0x1040
callq 0x1060
movl %eax, %ebp
movq (%r12), %rdi
callq 0x1070
testl %eax, %eax
je 0x1235
jmp 0x1296
callq 0x1060
movl %eax, %r14d
movq (%r12), %rdi
callq 0x1070
testl %eax, %eax
jne 0x1296
leaq 0x1320(%rip), %r15      # 0x2594
testb %r14b, %r14b
js 0x129d
movq %r15, %rdi
callq 0x1040
callq 0x1060
movl %eax, %r14d
movq (%r12), %rdi
callq 0x1070
testl %eax, %eax
je 0x1274
xorl %edi, %edi
callq 0x1080
movl %ebx, %eax
shll $0x15, %eax
andl $0x18000000, %eax       # imm = 0x18000000
andl $0x3f, %ebx
shll $0xc, %ebx
orl %eax, %ebx
movl %ebp, %eax
shll $0x12, %eax
andl $0x3000000, %eax        # imm = 0x3000000
orl %ebx, %eax
andl $0x3f, %ebp
shll $0x6, %ebp
orl %eax, %ebp
movl %r14d, %eax
shll $0xf, %eax
andl $0x600000, %eax         # imm = 0x600000
andl $0x3f, %r14d
orl %ebp, %r14d
orl %eax, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_alltoall64.c
// Function: shmem_alltoall64
void shmem_alltoall64( void* dest, const void* source, size_t nelems,
	int pe_start, int log_pe_stride, int pe_size, long* psync)
{
	debug("[%d] shmem_alltoall_x begin\n",__shmem.my_pe);
	int j;
	int dst_offset = ((__shmem.my_pe - pe_start) >> log_pe_stride)*nelems;
	int pe_size_stride = pe_size << log_pe_stride;
	int step = 1 << log_pe_stride;
	int pe_end = pe_size_stride + pe_start;
	int64_t* psrc = (int64_t*)source;
	int64_t* pdsto = (int64_t*)dest + dst_offset;
	shmemx_memcpy((void*)pdsto, (void*)psrc, nelems*sizeof(int64_t));
	for (j = 1; j < pe_size; j++) {
		int pe_to = __shmem.my_pe + j*step;
		if (pe_to >= pe_end) pe_to -= pe_size_stride;
		int64_t* pdst = (int64_t*)shmem_ptr(pdsto, pe_to);
		shmemx_memcpy((void*)pdst, (void*)psrc, nelems*sizeof(int64_t));
	}
	debug("[%d] shmem_alltoall_x before barrier\n",__shmem.my_pe);
	shmem_barrier(pe_start, log_pe_stride, pe_size, psync);
	debug("[%d] shmem_alltoall_x end\n",__shmem.my_pe);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r9d, %ebx
movl %r8d, %ebp
movq %rdx, %r8
leaq 0x31be(%rip), %r15      # 0x6200
movl 0x4(%r15), %eax
movq %rcx, (%rsp)
subl %ecx, %eax
movl %ebp, %ecx
sarl %cl, %eax
imull %eax, %edx
movl %r9d, %eax
shll %cl, %eax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
movslq %edx, %rax
leaq (%rdi,%rax,8), %r13
shlq $0x3, %r8
movq %r13, %rdi
movq %rsi, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movq %r8, %rdx
callq 0x31b8
movl %ebx, %edx
cmpl $0x2, %ebx
jl 0x30ec
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
leal (%rcx,%rax), %r12d
movl $0x1, %ebx
movl %ebx, %esi
movl %ebp, %ecx
shll %cl, %esi
addl 0x4(%r15), %esi
cmpl %r12d, %esi
movq 0x8(%rsp), %rax
movl $0x0, %ecx
cmovll %ecx, %eax
subl %eax, %esi
movq %r13, %rdi
movq %r15, %r14
movl %ebp, %r15d
movl %edx, %ebp
callq 0x1ce8
movq %rax, %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x31b8
movl %ebp, %edx
movl %r15d, %ebp
movq %r14, %r15
incl %ebx
cmpl %ebx, %edx
jne 0x30a0
movq (%rsp), %rdi
movl %ebp, %esi
movq 0x10(%rsp), %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x310c
nop
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: checkType
int checkType(unsigned char t) {
    /* In case a new object type is added, update the following 
     * condition as necessary. */
    return
        (t >= REDIS_HASH_ZIPMAP && t <= REDIS_HASH_ZIPLIST) ||
        t <= REDIS_HASH ||
        t >= REDIS_EXPIRETIME_MS;
}

// Assembly:
cmpb $0xe, %dil
jae 0x1666
movl $0x1, %eax
movzbl %dil, %ecx
movl $0x3e1f, %edx           # imm = 0x3E1F
btl %ecx, %edx
jae 0x1666
retq
xorl %eax, %eax
cmpb $-0x4, %dil
setae %al
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: readBytes
int readBytes(void *target, long num) {
    char peek = (num < 0) ? 1 : 0;
    num = (num < 0) ? -num : num;

    pos p = positions[level];
    if (p.offset + num > p.size) {
        return 0;
    } else {
        memcpy(target, (void*)((size_t)p.data + p.offset), num);
        if (!peek) positions[level].offset += num;
    }
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rsi, %rbx
negq %rbx
cmovsq %rsi, %rbx
movzbl 0x4bc4(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %r15
leaq 0x4a39(%rip), %r12      # 0x60d0
movq 0x10(%r12,%r15,8), %rsi
leaq (%rsi,%rbx), %rcx
xorl %eax, %eax
cmpq 0x8(%r12,%r15,8), %rcx
ja 0x16c7
leaq (%r12,%r15,8), %rax
addq (%rax), %rsi
movq %rbx, %rdx
callq 0x10e0
movl $0x1, %eax
testq %r14, %r14
js 0x16c7
addq %rbx, 0x10(%r12,%r15,8)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: processHeader
int processHeader() {
    char buf[10] = "_________";
    int dump_version;

    if (!readBytes(buf, 9)) {
        ERROR("Cannot read header\n");
    }

    /* expect the first 5 bytes to equal REDIS */
    if (memcmp(buf,"REDIS",5) != 0) {
        ERROR("Wrong signature in header\n");
    }

    dump_version = (int)strtol(buf + 5, NULL, 10);
    if (dump_version < 1 || dump_version > 6) {
        ERROR("Unknown RDB format version: %d\n", dump_version);
    }
    return dump_version;
}

// Assembly:
subq $0x18, %rsp
movabsq $0x5f5f5f5f5f5f5f5f, %rax # imm = 0x5F5F5F5F5F5F5F5F
movq %rax, 0x8(%rsp)
movw $0x5f, 0x10(%rsp)
movzbl 0x4b5c(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rcx
leaq 0x49d1(%rip), %rdx      # 0x60d0
movq 0x10(%rdx,%rcx,8), %rax
leaq 0x9(%rax), %rsi
cmpq 0x8(%rdx,%rcx,8), %rsi
ja 0x1761
leaq (%rdx,%rcx,8), %rcx
movq (%rcx), %rdx
movb 0x8(%rax,%rdx), %sil
movb %sil, 0x10(%rsp)
movq (%rax,%rdx), %rax
addq $0x9, 0x10(%rcx)
movq %rax, 0x8(%rsp)
movl $0x49444552, %eax       # imm = 0x49444552
xorl 0x8(%rsp), %eax
movzbl 0xc(%rsp), %ecx
xorl $0x53, %ecx
orl %eax, %ecx
jne 0x176a
leaq 0xd(%rsp), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x10d0
leal -0x7(%rax), %ecx
cmpl $-0x7, %ecx
jbe 0x1778
addq $0x18, %rsp
retq
leaq 0x1cbc(%rip), %rdi      # 0x3424
jmp 0x1771
leaq 0x1cc6(%rip), %rdi      # 0x3437
callq 0x1070
jmp 0x1788
leaq 0x18cd(%rip), %rdi      # 0x304c
movl %eax, %esi
xorl %eax, %eax
callq 0x10a0
movl $0x1, %edi
callq 0x1140
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: loadType
int loadType(entry *e) {
    uint32_t offset = CURR_OFFSET;

    /* this byte needs to qualify as type */
    unsigned char t;
    if (readBytes(&t, 1)) {
        if (checkType(t)) {
            e->type = t;
            return 1;
        } else {
            SHIFT_ERROR(offset, "Unknown type (0x%02x)", t);
        }
    } else {
        SHIFT_ERROR(offset, "Could not read type");
    }

    /* failure */
    return 0;
}

// Assembly:
pushq %rbx
movzbl 0x4ab6(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rsi
leaq 0x492b(%rip), %r8       # 0x60d0
movq 0x8(%r8,%rsi,8), %rcx
movq 0x10(%r8,%rsi,8), %rbx
leaq 0x1(%rbx), %rdx
cmpq %rcx, %rdx
ja 0x17ca
leaq (%r8,%rsi,8), %rsi
addq $0x10, %rsi
movq -0x10(%rsi), %rax
movb (%rbx,%rax), %al
movq %rdx, (%rsi)
cmpq %rcx, %rdx
jbe 0x1813
movq 0x8b02(%rip), %rax      # 0xa2d8
leaq 0x4a7b(%rip), %rcx      # 0x6258
movq %rax, %rdx
shlq $0xa, %rdx
movups 0x1897(%rip), %xmm0     # 0x3082
movups %xmm0, (%rdx,%rcx)
movl $0x657079, 0x10(%rdx,%rcx) # imm = 0x657079
movl %ebx, %ecx
leaq 0x4a58(%rip), %rdx      # 0x6258
movq %rcx, 0x4000(%rdx,%rax,8)
incq 0x8ac9(%rip)            # 0xa2d8
xorl %eax, %eax
jmp 0x182d
movzbl %al, %edx
cmpb $0xd, %dl
ja 0x182f
movl $0x3e1f, %ecx           # imm = 0x3E1F
btl %edx, %ecx
jae 0x182f
movl %edx, 0x8(%rdi)
movl $0x1, %eax
popq %rbx
retq
cmpb $-0x4, %al
jae 0x1825
leaq 0x4a1e(%rip), %rax      # 0x6258
movq 0x8a97(%rip), %rdi      # 0xa2d8
shlq $0xa, %rdi
addq %rax, %rdi
leaq 0x181d(%rip), %rsi      # 0x306c
xorl %eax, %eax
callq 0x1130
movq 0x8a7b(%rip), %rax      # 0xa2d8
jmp 0x17f7
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: processTime
int processTime(int type) {
    uint32_t offset = CURR_OFFSET;
    unsigned char t[8];
    int timelen = (type == REDIS_EXPIRETIME_MS) ? 8 : 4;

    if (readBytes(t,timelen)) {
        return 1;
    } else {
        SHIFT_ERROR(offset, "Could not read time");
    }

    /* failure */
    return 0;
}

// Assembly:
movzbl 0x498a(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rcx
leaq 0x47ff(%rip), %rdx      # 0x60d0
movq 0x10(%rdx,%rcx,8), %rax
xorl %esi, %esi
cmpl $0xfc, %edi
sete %sil
leaq (%rax,%rsi,4), %rdi
addq $0x4, %rdi
cmpq 0x8(%rdx,%rcx,8), %rdi
jbe 0x192d
leaq 0x4960(%rip), %rcx      # 0x6258
movq 0x89d9(%rip), %rdx      # 0xa2d8
movq %rdx, %rsi
shlq $0xa, %rsi
movups 0x1789(%rip), %xmm0     # 0x3096
movups %xmm0, (%rsi,%rcx)
movl $0x656d69, 0x10(%rsi,%rcx) # imm = 0x656D69
movl %eax, %eax
movq %rax, 0x4000(%rcx,%rdx,8)
incq 0x89ae(%rip)            # 0xa2d8
xorl %eax, %eax
retq
leaq (%rdx,%rcx,8), %rcx
addq $0x10, %rcx
leaq 0x4(,%rsi,4), %rdx
addq %rdx, %rax
movq %rax, (%rcx)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: loadLength
uint32_t loadLength(int *isencoded) {
    unsigned char buf[2];
    uint32_t len;
    int type;

    if (isencoded) *isencoded = 0;
    if (!readBytes(buf, 1)) return REDIS_RDB_LENERR;
    type = (buf[0] & 0xC0) >> 6;
    if (type == REDIS_RDB_6BITLEN) {
        /* Read a 6 bit len */
        return buf[0] & 0x3F;
    } else if (type == REDIS_RDB_ENCVAL) {
        /* Read a 6 bit len encoding type */
        if (isencoded) *isencoded = 1;
        return buf[0] & 0x3F;
    } else if (type == REDIS_RDB_14BITLEN) {
        /* Read a 14 bit len */
        if (!readBytes(buf+1,1)) return REDIS_RDB_LENERR;
        return ((buf[0] & 0x3F) << 8) | buf[1];
    } else {
        /* Read a 32 bit len */
        if (!readBytes(&len, 4)) return REDIS_RDB_LENERR;
        return (unsigned int)ntohl(len);
    }
}

// Assembly:
testq %rdi, %rdi
je 0x1954
movl $0x0, (%rdi)
movzbl 0x48f5(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rdx
leaq 0x476a(%rip), %rsi      # 0x60d0
leaq (%rsi,%rdx,8), %r8
movq 0x8(%r8), %r9
movq 0x10(%r8), %rax
leaq 0x1(%rax), %r10
cmpq %r9, %r10
ja 0x1986
movq (%r8), %rcx
movb (%rax,%rcx), %cl
incq 0x10(%rsi,%rdx,8)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %r9, %r10
jbe 0x1991
retq
movzbl %cl, %r9d
cmpb $0x40, %r9b
jae 0x199f
movl %r9d, %eax
retq
shrl $0x6, %r9d
cmpl $0x1, %r9d
je 0x19c1
cmpl $0x3, %r9d
jne 0x19f4
testq %rdi, %rdi
je 0x19ba
movl $0x1, (%rdi)
andb $0x3f, %cl
movzbl %cl, %eax
retq
movq 0x8(%r8), %r9
movq 0x10(%r8), %r11
leaq 0x1(%r11), %r10
xorl %edi, %edi
cmpq %r9, %r10
ja 0x19e1
movq (%r8), %rdi
movzbl (%r11,%rdi), %edi
incq 0x10(%rsi,%rdx,8)
cmpq %r9, %r10
ja 0x1990
andb $0x3f, %cl
movzbl %cl, %eax
shll $0x8, %eax
orl %eax, %edi
movl %edi, %eax
retq
movq 0x8(%r8), %rdi
movq 0x10(%r8), %r10
leaq 0x4(%r10), %r9
cmpq %rdi, %r9
ja 0x1a12
movq (%r8), %rcx
movl (%r10,%rcx), %ecx
addq $0x4, 0x10(%rsi,%rdx,8)
cmpq %rdi, %r9
ja 0x1990
bswapl %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: loadIntegerObject
char *loadIntegerObject(int enctype) {
    uint32_t offset = CURR_OFFSET;
    unsigned char enc[4];
    long long val;

    if (enctype == REDIS_RDB_ENC_INT8) {
        uint8_t v;
        if (!readBytes(enc, 1)) return NULL;
        v = enc[0];
        val = (int8_t)v;
    } else if (enctype == REDIS_RDB_ENC_INT16) {
        uint16_t v;
        if (!readBytes(enc, 2)) return NULL;
        v = enc[0]|(enc[1]<<8);
        val = (int16_t)v;
    } else if (enctype == REDIS_RDB_ENC_INT32) {
        uint32_t v;
        if (!readBytes(enc, 4)) return NULL;
        v = enc[0]|(enc[1]<<8)|(enc[2]<<16)|(enc[3]<<24);
        val = (int32_t)v;
    } else {
        SHIFT_ERROR(offset, "Unknown integer encoding (0x%02x)", enctype);
        return NULL;
    }

    /* convert val into string */
    char *buf;
    buf = malloc(sizeof(char) * 128);
    sprintf(buf, "%lld", val);
    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movzbl 0x4824(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rcx
leaq 0x4699(%rip), %rsi      # 0x60d0
leaq (%rsi,%rcx,8), %rax
addq $0x10, %rax
movq (%rax), %r15
cmpl $0x2, %edi
je 0x1ab9
movl %edi, %edx
cmpl $0x1, %edi
je 0x1a84
testl %edx, %edx
jne 0x1b35
movq 0x8(%rsi,%rcx,8), %rdx
movq 0x10(%rsi,%rcx,8), %r8
leaq 0x1(%r8), %rdi
cmpq %rdx, %rdi
ja 0x1b08
leaq (%rsi,%rcx,8), %rcx
movq (%rcx), %rcx
movsbq (%r8,%rcx), %rbx
incq %r15
movq %r15, (%rax)
jmp 0x1b08
movq 0x8(%rsi,%rcx,8), %rdx
movq 0x10(%rsi,%rcx,8), %r8
leaq 0x2(%r8), %rdi
cmpq %rdx, %rdi
ja 0x1b08
leaq (%rsi,%rcx,8), %rcx
movq (%rcx), %rcx
movzbl (%r8,%rcx), %esi
addq $0x2, %r15
movzbl 0x1(%r8,%rcx), %ecx
movq %r15, (%rax)
shll $0x8, %ecx
movswq %cx, %rbx
jmp 0x1b05
movq 0x8(%rsi,%rcx,8), %rdx
movq 0x10(%rsi,%rcx,8), %r8
leaq 0x4(%r8), %rdi
cmpq %rdx, %rdi
ja 0x1b08
leaq (%rsi,%rcx,8), %rcx
movq (%rcx), %rcx
movzbl (%r8,%rcx), %esi
movzbl 0x1(%r8,%rcx), %r9d
movzbl 0x2(%r8,%rcx), %r10d
addq $0x4, %r15
movzbl 0x3(%r8,%rcx), %ecx
movq %r15, (%rax)
shll $0x8, %r9d
shll $0x10, %r10d
shll $0x18, %ecx
movslq %ecx, %rbx
orq %r10, %rbx
orq %r9, %rbx
orq %rsi, %rbx
cmpq %rdx, %rdi
jbe 0x1b12
xorl %r14d, %r14d
jmp 0x1b74
movl $0x80, %edi
callq 0x10f0
movq %rax, %r14
leaq 0x15a6(%rip), %rsi      # 0x30cc
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1130
jmp 0x1b74
leaq 0x471c(%rip), %rbx      # 0x6258
movq 0x8795(%rip), %rdi      # 0xa2d8
shlq $0xa, %rdi
addq %rbx, %rdi
leaq 0x1559(%rip), %rsi      # 0x30aa
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x1130
movl %r15d, %eax
movq 0x8773(%rip), %rcx      # 0xa2d8
movq %rax, 0x4000(%rbx,%rcx,8)
incq 0x8764(%rip)            # 0xa2d8
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: loadLzfStringObject
char* loadLzfStringObject() {
    unsigned int slen, clen;
    char *c, *s;

    if ((clen = loadLength(NULL)) == REDIS_RDB_LENERR) return NULL;
    if ((slen = loadLength(NULL)) == REDIS_RDB_LENERR) return NULL;

    c = malloc(clen);
    if (!readBytes(c, clen)) {
        free(c);
        return NULL;
    }

    s = malloc(slen+1);
    if (lzf_decompress(c,clen,s,slen) == 0) {
        free(c); free(s);
        return NULL;
    }

    free(c);
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x1949
cmpl $-0x1, %eax
je 0x1c2e
movl %eax, %ebx
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x1949
cmpl $-0x1, %eax
je 0x1c2e
movl %eax, %ebp
movl %ebx, %r15d
movq %r15, %rdi
callq 0x10f0
movq %rax, %r14
movzbl 0x468c(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rax
leaq 0x4501(%rip), %rcx      # 0x60d0
movq 0x10(%rcx,%rax,8), %rsi
leaq (%rsi,%r15), %rdx
cmpq 0x8(%rcx,%rax,8), %rdx
ja 0x1c23
leaq (%rcx,%rax,8), %r12
addq (%r12), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x10e0
addq %r15, 0x10(%r12)
movl %ebp, %edi
incl %edi
callq 0x10f0
movq %rax, %r15
movq %r14, %rdi
movl %ebx, %esi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x2c64
movl %eax, %ebx
movq %r14, %rdi
callq 0x1030
movq %r15, %r14
testl %ebx, %ebx
jne 0x1c2e
movq %r14, %rdi
callq 0x1030
xorl %r15d, %r15d
movq %r15, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: loadStringObject
char* loadStringObject() {
    uint32_t offset = CURR_OFFSET;
    int isencoded;
    uint32_t len;

    len = loadLength(&isencoded);
    if (isencoded) {
        switch(len) {
        case REDIS_RDB_ENC_INT8:
        case REDIS_RDB_ENC_INT16:
        case REDIS_RDB_ENC_INT32:
            return loadIntegerObject(len);
        case REDIS_RDB_ENC_LZF:
            return loadLzfStringObject();
        default:
            /* unknown encoding */
            SHIFT_ERROR(offset, "Unknown string encoding (0x%02x)", len);
            return NULL;
        }
    }

    if (len == REDIS_RDB_LENERR) return NULL;

    char *buf = malloc(sizeof(char) * (len+1));
    buf[len] = '\0';
    if (!readBytes(buf, len)) {
        free(buf);
        return NULL;
    }
    return buf;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movzbl 0x4607(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rax
leaq 0x447c(%rip), %r12      # 0x60d0
movl 0x10(%r12,%rax,8), %r15d
leaq 0x4(%rsp), %rbx
movq %rbx, %rdi
callq 0x1949
movl %eax, %r14d
cmpl $0x0, (%rbx)
je 0x1c7e
cmpl $0x3, %r14d
jae 0x1cbf
movl %r14d, %edi
callq 0x1a20
jmp 0x1cc6
cmpl $-0x1, %r14d
je 0x1cbb
leal 0x1(%r14), %edi
callq 0x10f0
movq %rax, %rbx
movl %r14d, %r14d
movb $0x0, (%rax,%r14)
movzbl 0x45b1(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rax
movq 0x10(%r12,%rax,8), %rsi
leaq (%rsi,%r14), %rcx
cmpq 0x8(%r12,%rax,8), %rcx
jbe 0x1d18
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
jmp 0x1cc9
jne 0x1cd8
callq 0x1b7d
movq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4579(%rip), %r12      # 0x6258
movq 0x85f2(%rip), %rdi      # 0xa2d8
shlq $0xa, %rdi
addq %r12, %rdi
leaq 0x13dd(%rip), %rsi      # 0x30d1
xorl %ebx, %ebx
movl %r14d, %edx
xorl %eax, %eax
callq 0x1130
movq 0x85d1(%rip), %rax      # 0xa2d8
movq %r15, 0x4000(%r12,%rax,8)
incq 0x85c2(%rip)            # 0xa2d8
jmp 0x1cc9
leaq (%r12,%rax,8), %r15
addq (%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x10e0
addq %r14, 0x10(%r15)
jmp 0x1cc9
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: processStringObject
int processStringObject(char** store) {
    unsigned long offset = CURR_OFFSET;
    char *key = loadStringObject();
    if (key == NULL) {
        SHIFT_ERROR(offset, "Error reading string object");
        free(key);
        return 0;
    }

    if (store != NULL) {
        *store = key;
    } else {
        free(key);
    }
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x4512(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rax
leaq 0x4387(%rip), %rcx      # 0x60d0
movq 0x10(%rcx,%rax,8), %r14
callq 0x1c3a
testq %rax, %rax
je 0x1d62
testq %rbx, %rbx
je 0x1da1
movq %rax, (%rbx)
jmp 0x1da9
leaq 0x44ef(%rip), %rax      # 0x6258
movq 0x8568(%rip), %rcx      # 0xa2d8
movq %rcx, %rdx
shlq $0xa, %rdx
movups 0x1380(%rip), %xmm0     # 0x30fe
movups %xmm0, 0xc(%rdx,%rax)
movups 0x1368(%rip), %xmm0     # 0x30f2
movups %xmm0, (%rdx,%rax)
movq %r14, 0x4000(%rax,%rcx,8)
incq 0x853b(%rip)            # 0xa2d8
xorl %eax, %eax
jmp 0x1dae
movq %rax, %rdi
callq 0x1030
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: processDoubleValue
int processDoubleValue(double** store) {
    unsigned long offset = CURR_OFFSET;
    double *val = loadDoubleValue();
    if (val == NULL) {
        SHIFT_ERROR(offset, "Error reading double value");
        free(val);
        return 0;
    }

    if (store != NULL) {
        *store = val;
    } else {
        free(val);
    }
    return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movzbl 0x4398(%rip), %eax      # 0x6250
leaq (%rax,%rax,2), %rax
leaq 0x420d(%rip), %rcx      # 0x60d0
movq 0x10(%rcx,%rax,8), %r14
callq 0x1db6
testq %rax, %rax
je 0x1edc
testq %rbx, %rbx
je 0x1f1b
movq %rax, (%rbx)
jmp 0x1f23
leaq 0x4375(%rip), %rax      # 0x6258
movq 0x83ee(%rip), %rcx      # 0xa2d8
movq %rcx, %rdx
shlq $0xa, %rdx
movups 0x1225(%rip), %xmm0     # 0x311d
movups %xmm0, 0xb(%rdx,%rax)
movups 0x120e(%rip), %xmm0     # 0x3112
movups %xmm0, (%rdx,%rax)
movq %r14, 0x4000(%rax,%rcx,8)
incq 0x83c1(%rip)            # 0xa2d8
xorl %eax, %eax
jmp 0x1f28
movq %rax, %rdi
callq 0x1030
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: printCentered
void printCentered(int indent, int width, char* body) {
    char head[256], tail[256];
    memset(head, '\0', 256);
    memset(tail, '\0', 256);

    memset(head, '=', indent);
    memset(tail, '=', width - 2 - indent - strlen(body));
    printf("%s %s %s\n", head, body, tail);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movq %rdx, %rbx
movl %esi, %ebp
movl %edi, %r12d
leaq 0x100(%rsp), %r14
movl $0x100, %edx            # imm = 0x100
movq %r14, %rdi
xorl %esi, %esi
callq 0x10b0
movq %rsp, %r15
movl $0x100, %edx            # imm = 0x100
movq %r15, %rdi
xorl %esi, %esi
callq 0x10b0
movslq %r12d, %r12
movq %r14, %rdi
movl $0x3d, %esi
movq %r12, %rdx
callq 0x10b0
subl %r12d, %ebp
addl $-0x2, %ebp
movslq %ebp, %r12
movq %rbx, %rdi
callq 0x1080
subq %rax, %r12
movq %r15, %rdi
movl $0x3d, %esi
movq %r12, %rdx
callq 0x10b0
leaq 0xd4c(%rip), %rdi       # 0x329d
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x10a0
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: printErrorStack
void printErrorStack(entry *e) {
    unsigned int i;
    char body[64];

    if (e->type == -1) {
        sprintf(body, "Error trace");
    } else if (e->type >= 253) {
        sprintf(body, "Error trace (%s)", types[e->type]);
    } else if (!e->key) {
        sprintf(body, "Error trace (%s: (unknown))", types[e->type]);
    } else {
        char tmp[41];
        strncpy(tmp, e->key, 40);

        /* display truncation at the last 3 chars */
        if (strlen(e->key) > 40) {
            memset(&tmp[37], '.', 3);
        }

        /* display unprintable characters as ? */
        for (i = 0; i < strlen(tmp); i++) {
            if (tmp[i] <= 32) tmp[i] = '?';
        }
        sprintf(body, "Error trace (%s: %s)", types[e->type], tmp);
    }

    printCentered(4, 80, body);

    /* display error stack */
    for (i = 0; i < errors.level; i++) {
        printf("0x%08lx - %s\n",
            (unsigned long) errors.offset[i], errors.error[i]);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movl 0x8(%rdi), %r14d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r14
je 0x261a
cmpl $0xfd, %r14d
jl 0x2636
shlq $0x4, %r14
leaq 0x7cf5(%rip), %rdx      # 0xa300
addq %r14, %rdx
leaq 0xcf5(%rip), %rsi       # 0x330a
jmp 0x26dc
movabsq $0x727420726f727245, %rax # imm = 0x727420726F727245
movq %rax, 0x30(%rsp)
movl $0x656361, 0x38(%rsp)   # imm = 0x656361
jmp 0x26e8
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x26c4
movq %rsp, %rdi
movl $0x28, %edx
movq %rbx, %rsi
callq 0x1060
movq %rbx, %rdi
callq 0x1080
cmpq $0x29, %rax
jb 0x266c
movb $0x2e, 0x27(%rsp)
movw $0x2e2e, 0x25(%rsp)     # imm = 0x2E2E
cmpb $0x0, (%rsp)
je 0x269b
movl $0x1, %ebp
xorl %r15d, %r15d
movq %rsp, %rbx
cmpb $0x20, (%rsp,%r15)
jg 0x2689
movb $0x3f, (%rsp,%r15)
movl %ebp, %r15d
movq %rbx, %rdi
callq 0x1080
incl %ebp
cmpq %r15, %rax
ja 0x267d
movslq %r14d, %rax
shlq $0x4, %rax
leaq 0x7c57(%rip), %rdx      # 0xa300
addq %rax, %rdx
leaq 0xc84(%rip), %rsi       # 0x3337
leaq 0x30(%rsp), %rdi
movq %rsp, %rcx
xorl %eax, %eax
callq 0x1130
jmp 0x26e8
movslq %r14d, %rax
shlq $0x4, %rax
leaq 0x7c2e(%rip), %rdx      # 0xa300
addq %rax, %rdx
leaq 0xc3f(%rip), %rsi       # 0x331b
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
callq 0x1130
leaq 0x30(%rsp), %rdx
movl $0x4, %edi
movl $0x50, %esi
callq 0x24d3
cmpq $0x0, 0x7bd4(%rip)      # 0xa2d8
je 0x2741
movl $0x1, %ebp
leaq 0x3b46(%rip), %r14      # 0x6258
leaq 0xc33(%rip), %rbx       # 0x334c
xorl %edx, %edx
movq 0x4000(%r14,%rdx,8), %rsi
shlq $0xa, %rdx
addq %r14, %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10a0
movl %ebp, %edx
incl %ebp
cmpq %rdx, 0x7b99(%rip)      # 0xa2d8
ja 0x271b
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/TheDiamondProject[P]lib68/cpu/instructions/abcd_m8_m8.c
// Function: abcd_m8_m8
void abcd_m8_m8(void)
{
	union m68_abcd_opcode opcode = { m68_mmu_read_word(CPU68.PC.value) };

	uint8_t Rx = opcode.field.Rx;
	uint8_t Ry = opcode.field.Ry;
	uint8_t Vx = m68_mmu_read_byte(--CPU68.A[Rx].value);
	uint8_t Vy = m68_mmu_read_byte(--CPU68.A[Ry].value);
	uint8_t X = CPU68.CCR.bitmask.user.X;

	uint8_t r = Vx + Vy + X;
	uint8_t bc = ((Vx & Vy) | (~r & Vx) | (~r & Vy)) & 0x88;
	uint8_t dc = (((r + 0x66) ^ r) & 0x110) >> 1;
	uint8_t corf = (bc | dc) - ((bc | dc) >> 2);
	uint8_t rr = r + corf;

	m68_mmu_write_byte(CPU68.A[Ry].value, rr);
	     
	CPU68.CCR.bitmask.user.C = (bc | (r & ~rr)) >> 7;
	CPU68.CCR.bitmask.user.X = CPU68.CCR.bitmask.user.C;
	CPU68.CCR.bitmask.user.V = (~r && r) >> 7;
	CPU68.CCR.bitmask.user.Z &= (rr == 0);
	CPU68.CCR.bitmask.user.N = rr >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x1037a6(%rip), %r15    # 0x108078
movl 0x40(%r15), %edi
callq 0x4ce1
movl %eax, %ebx
movl %ebx, %eax
shrl $0x9, %eax
andl $0x7, %eax
andl $0x7, %ebx
movl 0x20(%r15,%rax,4), %edi
decl %edi
movl %edi, 0x20(%r15,%rax,4)
callq 0x4cc4
movl %eax, %r14d
movl 0x20(%r15,%rbx,4), %edi
decl %edi
movl %edi, 0x20(%r15,%rbx,4)
callq 0x4cc4
movzbl %r14b, %ecx
btl $0x4, 0x44(%r15)
movzbl %al, %eax
movl %eax, %edx
adcb %cl, %dl
movzbl %dl, %r12d
movl %r12d, %r14d
notl %r14d
movl %r14d, %edx
orl %eax, %edx
andl %ecx, %edx
andl %eax, %r14d
orl %edx, %r14d
leal 0x66(%r12), %eax
xorl %r12d, %eax
shrl %eax
orl %r14d, %eax
andl $-0x78, %eax
movl %eax, %ecx
shrl $0x2, %ecx
subl %ecx, %eax
addb %r12b, %al
movl 0x20(%r15,%rbx,4), %edi
movzbl %al, %ebx
movl %ebx, %esi
callq 0x4c5a
movl %ebx, %eax
notl %eax
andl %r12d, %eax
orl %r14d, %eax
shrb $0x7, %al
movb 0x44(%r15), %cl
movl %ecx, %edx
andb $-0x20, %dl
movl %eax, %esi
shlb $0x4, %sil
orb %dl, %sil
andb $0x4, %cl
xorl %edx, %edx
testb %bl, %bl
movzbl %cl, %ecx
cmovnel %edx, %ecx
orb %sil, %cl
shrb $0x4, %bl
andb $0x8, %bl
orb %cl, %bl
orb %al, %bl
movb %bl, 0x44(%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/TheDiamondProject[P]lib68/cpu/instructions/abcd_dn_dn.c
// Function: abcd_dn_dn
void abcd_dn_dn(void)
{
	union m68_abcd_opcode opcode = { m68_mmu_read_word(CPU68.PC.value) };
	uint8_t Rx = opcode.field.Rx;
	uint8_t Ry = opcode.field.Ry;
	uint8_t Vx = CPU68.D[Rx].byte[0];
	uint8_t Vy = CPU68.D[Ry].byte[0];
	uint8_t X = CPU68.CCR.bitmask.user.X;

	uint8_t r = Vx + Vy + X;
	uint8_t bc = ((Vx & Vy) | (~r & Vx) | (~r & Vy)) & 0x88;
	uint8_t dc = (((r + 0x66) ^ r) & 0x110) >> 1;
	uint8_t corf = (bc | dc) - ((bc | dc) >> 2);
	uint8_t rr = r + corf;

	CPU68.D[Ry].byte[0] = rr;
	     
	CPU68.CCR.bitmask.user.C = (bc | (r & ~rr)) >> 7;
	CPU68.CCR.bitmask.user.X = CPU68.CCR.bitmask.user.C;
	CPU68.CCR.bitmask.user.V = (~r && r) >> 7;
	CPU68.CCR.bitmask.user.Z &= (rr == 0);
	CPU68.CCR.bitmask.user.N = rr >> 7;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1036c7(%rip), %rbx    # 0x108078
movl 0x40(%rbx), %edi
callq 0x4ce1
movl %eax, %ecx
shrl $0x9, %ecx
andl $0x7, %ecx
andl $0x7, %eax
movzbl (%rbx,%rcx,4), %edi
movzbl (%rbx,%rax,4), %r8d
movl 0x44(%rbx), %ecx
btl $0x4, %ecx
movl %r8d, %edx
adcb %dil, %dl
movzbl %dl, %esi
movl %esi, %edx
notl %edx
movl %edx, %r9d
orl %r8d, %r9d
andl %edi, %r9d
andl %r8d, %edx
orl %r9d, %edx
leal 0x66(%rsi), %edi
xorl %esi, %edi
shrl %edi
orl %edx, %edi
andl $-0x78, %edi
movl %edi, %r8d
shrl $0x2, %r8d
subl %r8d, %edi
addb %sil, %dil
movb %dil, (%rbx,%rax,4)
movzbl %dil, %eax
movl %eax, %edi
notl %edi
andl %esi, %edi
orl %edx, %edi
shrb $0x7, %dil
movl %ecx, %edx
andb $-0x20, %dl
movl %edi, %esi
shlb $0x4, %sil
orb %dl, %sil
andb $0x4, %cl
xorl %edx, %edx
testb %al, %al
movzbl %cl, %ecx
cmovnel %edx, %ecx
orb %sil, %cl
shrb $0x4, %al
andb $0x8, %al
orb %cl, %al
orb %dil, %al
movb %al, 0x44(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/TheDiamondProject[P]lib68/cpu/mmu.c
// Function: m68_mmu_page_alloc
void *m68_mmu_page_alloc(uint32_t address)
{
	union m68_mmu_page_entry *table = NULL;
	void *page = NULL;

	/* First determine the page table and the page that the address relates
	 * to. */
	uint32_t dir_idx = (address >> 22) & 0x3FF;
	uint32_t table_idx = (address >> 12) & 0x3FF;

	/* Now check if a table already exists. If not create it. To do this we need
	 * to request an allocation for the page and then ensure it is aligned to a
	 * 16 byte boundary. */
	if (!MMU_PAGE_DIR[dir_idx].field.present) {
		table = calloc(MMU_PAGE_TABLE_MAX_ENTRIES + 4, sizeof(union m68_mmu_page_entry));
		uintptr_t address = (uintptr_t)table;
		if (address & 0xF) {
			address = ((address + 0x10) & ~0xF);
			table = (void *)address;
		}

		MMU_PAGE_DIR[dir_idx].field.address = (address >> 2);
		MMU_PAGE_DIR[dir_idx].field.present = 1;
	} else {
		table = (void *)((uintptr_t)MMU_PAGE_DIR[dir_idx].field.address << 2);
	}

	/* Now check for the presence of the desired page in the table. If the page
	 * is not there then allocate it. */
	if (!table[table_idx].field.present) {
		page = calloc(0x1000, 1);
		uintptr_t address = (uintptr_t)page;
		if (address & 0xF) {
			address = ((address + 0x10) & ~0xF);
			page = (void *)address;
		}

		table[table_idx].field.address = (address >> 2);
		table[table_idx].field.present = 1;
	} else {
		page = (void *)((uintptr_t)table[table_idx].field.address << 2);
	}

	return page;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
movabsq $0x3ffffffffffffffc, %rax # imm = 0x3FFFFFFFFFFFFFFC
movl %edi, %r12d
shrl $0x16, %r12d
shrl $0xc, %ebx
andl $0x3ff, %ebx            # imm = 0x3FF
leaq 0x103562(%rip), %rcx    # 0x108070
movq (%rcx), %r14
movq (%r14,%r12,8), %r15
testb $0x1, %r15b
jne 0x4b66
movl $0x404, %edi            # imm = 0x404
movl $0x8, %esi
callq 0x3050
movq %rax, %r13
andq $-0x10, %r13
addq $0x10, %r13
testb $0xf, %al
cmoveq %rax, %r13
andl $0xe, %r15d
leaq (%r15,%r13,4), %rax
shll $0x3, %r12d
movq %rax, (%r14,%r12)
leaq 0x10351e(%rip), %rax    # 0x108070
movq (%rax), %rax
orq $0x1, (%rax,%r12)
movabsq $0x3ffffffffffffffc, %rax # imm = 0x3FFFFFFFFFFFFFFC
jmp 0x4b70
shrq $0x2, %r15
andq %rax, %r15
movq %r15, %r13
movl %ebx, %r14d
movq (%r13,%r14,8), %rbx
testb $0x1, %bl
jne 0x4baf
movl $0x1000, %edi           # imm = 0x1000
movl $0x1, %esi
callq 0x3050
movq %rax, %rcx
andq $-0x10, %rax
addq $0x10, %rax
testb $0xf, %cl
cmoveq %rcx, %rax
andl $0xe, %ebx
leaq (%rbx,%rax,4), %rcx
incq %rcx
movq %rcx, (%r13,%r14,8)
jmp 0x4bb9
shrq $0x2, %rbx
andq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/TheDiamondProject[P]lib68/cpu/mmu.c
// Function: m68_mmu_destroy
void m68_mmu_destroy(void)
{
	if ( MMU_PAGE_DIR ) {
		/* Iterate over all tables and then over all tables and release 
		 * everything. */
		for (int i = 0; i < MMU_PAGE_DIR_MAX_ENTRIES; ++i) {
			/* Skip if the table is not present in the directory */
			if (!MMU_PAGE_DIR[i].field.present) {
				continue;
			}

			/* Fetch the page table */
			union m68_mmu_page_entry *PAGE_TABLE = (void *)((uintptr_t)MMU_PAGE_DIR[i].field.address << 4);

			/* Iterate over all pages in the table */
			for (int j = 0; j < MMU_PAGE_TABLE_MAX_ENTRIES; ++j) {
				if (!PAGE_TABLE[i].field.present) {
					continue;
				}

				/* Fetch the page */
				void *PAGE = (void *)((uintptr_t)PAGE_TABLE[i].field.address << 4);
				free(PAGE);
			}

			free(PAGE_TABLE);
		}

		free(MMU_PAGE_DIR);
		MMU_PAGE_DIR = NULL;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x103496(%rip), %r14    # 0x108070
cmpq $0x0, (%r14)
je 0x4c34
xorl %r15d, %r15d
movq (%r14), %rax
movq (%rax,%r15,8), %rbx
testb $0x1, %bl
je 0x4c19
andq $-0x10, %rbx
movl $0x400, %r12d           # imm = 0x400
movq (%rbx,%r15,8), %rdi
testb $0x1, %dil
je 0x4c0c
andq $-0x10, %rdi
callq 0x3030
decl %r12d
jne 0x4bf9
movq %rbx, %rdi
callq 0x3030
incq %r15
cmpq $0x400, %r15            # imm = 0x400
jne 0x4be3
movq (%r14), %rdi
callq 0x3030
movq $0x0, (%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq