LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/stetre[P]moongl/src/whole_framebuffer.c
// Function: ClearBufferfi
static int ClearBufferfi(lua_State *L)
/* clear_bufferfi(depth, stencil)
 */
    {
    int named, arg = 1;
    GLuint framebuffer;
    GLfloat depth;
    GLint stencil;
    if(lua_isinteger(L, 1))
        {
        named = 1;
        framebuffer = luaL_checkinteger(L, arg++);
        }
    else
        named = 0;
    depth = luaL_checknumber(L, arg++);
    stencil = luaL_checkinteger(L, arg++);
    if(named)
        {
#if 0
/*@@NOTE: The prototype for glClearNamedFramebufferfi() in glcorearb.h is/was wrong,
 *        (rfr: https://www.khronos.org/bugzilla/show_bug.cgi?id=1394 ),
 *        so this may not compile with OpenGL v4.5.
 *      In such a case, you can update the glcorearb.h file on your system with the
 *      correct version, or just disable this function by setting to 0 the above "#if 1".
 */
        glClearNamedFramebufferfi(framebuffer, GL_DEPTH_STENCIL, 0, depth, stencil);
#else
        (void)framebuffer;
        NOT_AVAILABLE;
#endif
        }
    else
        glClearBufferfi(GL_DEPTH_STENCIL, 0, depth, stencil);
    CheckError(L);
    return 0;
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x1, %r14d
movl $0x1, %esi
callq 0x115c0
movl %eax, %ebp
testl %eax, %eax
je 0x3e133
movq %rbx, %rdi
movl $0x1, %esi
callq 0x11af0
movl $0x2, %r14d
leal 0x1(%r14), %r15d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x11a80
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x11af0
testl %ebp, %ebp
je 0x3e171
leaq 0x1084(%rip), %rsi      # 0x3f1e1
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x11ae0
xorps %xmm0, %xmm0
cvtsd2ss (%rsp), %xmm0
movq 0x18978(%rip), %rcx     # 0x56af8
movl $0x84f9, %edi           # imm = 0x84F9
xorl %esi, %esi
movl %eax, %edx
callq *(%rcx)
movq %rbx, %rdi
callq 0x11880
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/arachsys[P]init/runfg.c
// Function: main
int main(int argc, char **argv) {
  int result = EXIT_FAILURE, status;
  pid_t child, command;

  if (argc < 2) {
    fprintf(stderr, "Usage: %s CMD [ARG]...\n", argv[0]);
    return 64;
  }

  if (prctl(PR_SET_CHILD_SUBREAPER, 1) < 0)
    err(EXIT_FAILURE, "prctl PR_SET_CHILD_SUBREAPER");

  switch (command = fork()) {
    case -1:
      err(EXIT_FAILURE, "fork");
    case 0:
      execvp(argv[1], argv + 1);
      err(EXIT_FAILURE, "exec %s", argv[1]);
  }

  while (1) {
    child = waitpid(-1, &status, 0);
    if (child < 0) {
      if (errno == ECHILD)
        return result;
      if (errno != EINTR)
        err(EXIT_FAILURE, "waitpid");
    } else if (child == command) {
      if (WIFEXITED(status))
        result = WEXITSTATUS(status);
      if (WIFSIGNALED(status))
        result = 128 + WTERMSIG(status);
      command = -1;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
cmpl $0x1, %edi
jle 0x126b
movl $0x24, %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x1050
testl %eax, %eax
js 0x128d
callq 0x1090
cmpl $-0x1, %eax
je 0x1296
movl %eax, %ebp
testl %eax, %eax
je 0x129f
movl $0x1, %ebx
leaq 0xc(%rsp), %r14
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
movq %r14, %rsi
xorl %edx, %edx
callq 0x1070
testl %eax, %eax
js 0x124f
cmpl %ebp, %eax
jne 0x120b
movl 0xc(%rsp), %eax
movzbl %ah, %ecx
andl $0x7f, %eax
cmovel %ecx, %ebx
movl %eax, %ecx
shll $0x18, %ecx
addl $0x1000000, %ecx        # imm = 0x1000000
orl $0x80, %eax
cmpl $0x2000000, %ecx        # imm = 0x2000000
cmovgel %eax, %ebx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x120b
callq 0x1030
movl (%rax), %eax
cmpl $0x4, %eax
je 0x120b
cmpl $0xa, %eax
jne 0x127a
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x10b0
movl $0x40, %ebx
jmp 0x1260
leaq 0xdc5(%rip), %rsi       # 0x2046
movl $0x1, %edi
xorl %eax, %eax
callq 0x1060
leaq 0xd88(%rip), %rsi       # 0x201c
jmp 0x1281
leaq 0xd9c(%rip), %rsi       # 0x2039
jmp 0x1281
leaq 0x8(%rbx), %rsi
movq 0x8(%rbx), %rdi
callq 0x1080
movq 0x8(%rbx), %rdx
leaq 0xd87(%rip), %rsi       # 0x203e
movl $0x1, %edi
xorl %eax, %eax
callq 0x1060
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: getDictionary
void getDictionary(dicentry **dic, int *num, char *path, char *name, unsigned int flags) {
	char tempname[256], *token = NULL;
	int i, j;
	if(flags & GAME_MGS2) *num = loaddic(dic, path, name, DIC_HASH_SINGLE_EXT | DIC_ADJUST_EXT_MGS2, StrCode24);
	if(flags & GAME_ZOE2) *num = loaddic(dic, path, name, DIC_HASH_FULL_NAME, StrCode32);
	if(flags & (GAME_MGS3|GAME_MGS4)) {
		*num = loaddic(dic, path, name, DIC_USE_EXTERNAL, StrCode24);
		for(i = 0; i < *num; i++) {
			strcpy(tempname, (*dic)[i].name);
			token = strtok(tempname, ".");
			token = strtok(NULL, ".");
			for(j = 0; j < 256; j++) {
				if(!strcmp(token, extList[(flags & GAME_MGS4) ? 1 : 0][j])) {
					(*dic)[i].extension = j;
					printf("set extension of entry %d to %08x\n", i, j);
					break;
				}
			}
			if(j > 255) printf("unknown extension %s\n", token);
		}
	}
	if(*num > 0) numdicentries += *num;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movl %r8d, %ebx
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, (%rsp)
movq %rdi, 0x8(%rsp)
testb $0x1, %bl
je 0x56f6
leaq -0x389(%rip), %r8       # 0x5352
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0xa, %ecx
callq 0x53c8
movq (%rsp), %rcx
movl %eax, (%rcx)
testb $0x8, %bl
je 0x571d
leaq -0x37b(%rip), %r8       # 0x5387
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0x1, %ecx
callq 0x53c8
movq (%rsp), %rcx
movl %eax, (%rcx)
testb $0x6, %bl
je 0x5819
leaq -0x3db(%rip), %r8       # 0x5352
movq 0x8(%rsp), %rdi
movq %r13, %rsi
movq %r12, %rdx
movl $0x4, %ecx
callq 0x53c8
movq (%rsp), %rcx
movl %eax, (%rcx)
testl %eax, %eax
jle 0x5819
andl $0x4, %ebx
shll $0x9, %ebx
leaq 0x59f3(%rip), %r13      # 0xb150
xorl %ebp, %ebp
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rbp, %rcx
shlq $0x8, %rcx
leaq (%rcx,%rbp,8), %r15
leaq (%rax,%r15), %rsi
addq $0x8, %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x5050
movq %r14, %rdi
leaq 0x33c8(%rip), %r14      # 0x8b59
movq %r14, %rsi
callq 0x51d0
xorl %edi, %edi
movq %r14, %rsi
callq 0x51d0
movq %rax, %r14
xorl %r12d, %r12d
leaq (%rbx,%r12,8), %rax
movq (%r13,%rax), %rsi
movq %r14, %rdi
callq 0x5130
testl %eax, %eax
je 0x57cc
incq %r12
cmpq $0x100, %r12            # imm = 0x100
jne 0x57a9
jmp 0x57f5
movq 0x8(%rsp), %rax
movq (%rax), %rax
movl %r12d, 0x4(%rax,%r15)
leaq 0x2d8e(%rip), %rdi      # 0x856e
movl %ebp, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x50c0
cmpq $0xff, %r12
jbe 0x5806
leaq 0x2d95(%rip), %rdi      # 0x8591
movq %r14, %rsi
xorl %eax, %eax
callq 0x50c0
incq %rbp
movq (%rsp), %rax
movslq (%rax), %rax
cmpq %rax, %rbp
jl 0x575f
movq (%rsp), %rax
movl (%rax), %eax
testl %eax, %eax
jle 0x5829
addl %eax, 0x6a67(%rip)      # 0xc290
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: getExtensionFromHash32
char *getExtensionFromHash32(uint32_t hash) {
	char *retstring = malloc(16);
	memset(retstring, 0, 16);
	unsigned int i, testhash;
	for(i = 0; i < ZOE2_NUM_EXT; i++) {
		testhash = StrCode32(extListZoe2[i]);
		if(testhash == hash) RETPRINT(extListZoe2[i])
	}
	if(strlen(retstring) < 3) sprintf(retstring, "%08x", hash);
	return retstring;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
movl $0x10, %edi
callq 0x5160
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %r14d, %r14d
leaq 0x68c0(%rip), %r15      # 0xc150
movq (%r14,%r15), %rdi
callq 0x5387
cmpl %ebp, %eax
je 0x58ac
addq $0x8, %r14
cmpq $0xd8, %r14
jne 0x5890
jmp 0x58b8
movq (%r14,%r15), %rsi
movq %rbx, %rdi
callq 0x5050
movq %rbx, %rdi
callq 0x50b0
cmpq $0x2, %rax
ja 0x58d9
leaq 0x2cda(%rip), %rsi      # 0x85a7
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x5210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: getFolderNameFromHash
char *getFolderNameFromHash(uint32_t hash, unsigned int flags) {
	char *retstring = malloc(16);
	switch(hash) {
		case 0x7F000010: RETPRINT("sound")
		case 0x7F010000: RETPRINT("nocache")
		case 0x7F000002: RETPRINT("cache")
		case 0x7F000003: RETPRINT("resident")
		case 0x7F000004: RETPRINT(flags & GAME_TTS ? "tts-04" : "delayload")
		case 0x7F000005: RETPRINT(flags & GAME_TTS ? "tts-05" : "delayload_w")
		default: {
			sprintf(retstring, "%08x", hash);
			break;
		}
	}
	return retstring;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebp
movl %edi, %r14d
movl $0x10, %edi
callq 0x5160
movq %rax, %rbx
leal -0x7f000002(%r14), %eax
cmpl $0x3, %eax
ja 0x592a
leaq 0x27a8(%rip), %rcx      # 0x80b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movw $0x65, 0x4(%rbx)
movl $0x68636163, (%rbx)     # imm = 0x68636163
jmp 0x59b6
cmpl $0x7f010000, %r14d      # imm = 0x7F010000
je 0x594a
cmpl $0x7f000010, %r14d      # imm = 0x7F000010
jne 0x596d
movw $0x64, 0x4(%rbx)
movl $0x6e756f73, (%rbx)     # imm = 0x6E756F73
jmp 0x59b6
movabsq $0x65686361636f6e, %rax # imm = 0x65686361636F6E
movq %rax, (%rbx)
jmp 0x59b6
testb $0x10, %bpl
leaq 0x2c64(%rip), %rax      # 0x85c8
leaq 0x2c56(%rip), %rsi      # 0x85c1
jmp 0x5995
leaq 0x2c33(%rip), %rsi      # 0x85a7
movq %rbx, %rdi
movl %r14d, %edx
xorl %eax, %eax
callq 0x5210
jmp 0x59b6
testb $0x10, %bpl
leaq 0x2c4b(%rip), %rax      # 0x85d9
leaq 0x2c3d(%rip), %rsi      # 0x85d2
cmoveq %rax, %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5050
movabsq $0x746e656469736572, %rax # imm = 0x746E656469736572
movq %rax, (%rbx)
movb $0x0, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: getFileNameFromHashes
char *getFileNameFromHashes(uint32_t hash, uint32_t extension, unsigned int flags) {
	char *retstring = malloc(64);
	char *extensionstring = NULL;
	unsigned int result = matchhash(hash, extension, stagedic, numstagedic);
	if(result != 0xFFFFFFFF) sprintf(retstring, "%s", stagedic[result].name);
	else {
		result = matchhash(hash, extension, commondic, numcommondic);
		if(result != 0xFFFFFFFF) sprintf(retstring, "%s", commondic[result].name);
		else {
			if(flags & GAME_MGS2) sprintf(retstring, "%08x.%c", hash, extension+0x61 /* 'a' */);
			/* see extlist comment for info on how games are sorted */
			else if(flags & (GAME_MGS3|GAME_MGS4)) sprintf(retstring, "%08x.%s", hash, extList[(flags & GAME_MGS4) ? 1 : 0][extension]);
			else if(flags & GAME_ZOE2) {
				extensionstring = getExtensionFromHash32(extension);
				sprintf(retstring, "%08x.%s", hash, extensionstring);
				free(extensionstring);
			}
		}
	}
	return retstring;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r14d
movl %edi, %ebp
movl $0x40, %edi
callq 0x5160
movq %rax, %rbx
movq 0x689f(%rip), %rax      # 0xc280
movslq 0x68a4(%rip), %rdx      # 0xc28c
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %rdx, %rdx
jle 0x5a15
leaq 0x4(%rax), %rdi
xorl %esi, %esi
cmpl %ebp, -0x4(%rdi)
jne 0x5a02
cmpl %r14d, (%rdi)
je 0x5a13
incq %rsi
addq $0x108, %rdi            # imm = 0x108
cmpq %rsi, %rdx
jne 0x59f8
jmp 0x5a15
movl %esi, %ecx
cmpl $-0x1, %ecx
jne 0x5a5a
movq 0x6857(%rip), %rax      # 0xc278
movslq 0x6860(%rip), %rdx      # 0xc288
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %rdx, %rdx
jle 0x5a55
leaq 0x4(%rax), %rdi
xorl %esi, %esi
cmpl %ebp, -0x4(%rdi)
jne 0x5a42
cmpl %r14d, (%rdi)
je 0x5a53
incq %rsi
addq $0x108, %rdi            # imm = 0x108
cmpq %rsi, %rdx
jne 0x5a38
jmp 0x5a55
movl %esi, %ecx
cmpl $-0x1, %ecx
je 0x5a81
movl %ecx, %ecx
movq %rcx, %rdx
shlq $0x8, %rdx
leaq (%rdx,%rcx,8), %rcx
leaq (%rax,%rcx), %rsi
addq $0x8, %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5050
testb $0x1, %r15b
jne 0x5abb
testb $0x6, %r15b
je 0x5ae3
movl %r14d, %eax
andl $0x4, %r15d
shll $0x9, %r15d
leaq 0x56b1(%rip), %rcx      # 0xb150
addq %r15, %rcx
movq (%rcx,%rax,8), %rcx
leaq 0x2b40(%rip), %rsi      # 0x85ed
movq %rbx, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x5210
jmp 0x5ad5
addl $0x61, %r14d
leaq 0x2b1f(%rip), %rsi      # 0x85e5
movq %rbx, %rdi
movl %ebp, %edx
movl %r14d, %ecx
xorl %eax, %eax
callq 0x5210
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
testb $0x8, %r15b
je 0x5ad5
movl %r14d, %edi
callq 0x586a
movq %rax, %r14
leaq 0x2af2(%rip), %rsi      # 0x85ed
movq %rbx, %rdi
movl %ebp, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x5210
movq %r14, %rdi
callq 0x5030
jmp 0x5ad5
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: decryptHeader
unsigned int decryptHeader(unsigned char *data, unsigned int length, unsigned int flags) {
	uint32_t *values = (uint32_t *)data;
	uint32_t seed, workkey;
	if(flags & IS_BIGENDIAN) workkey = initialkeybig;
	else workkey = initialkey;
	unsigned int i;
	for(i = 0; i < length ;i++) {
		seed = workkey * key1;
		values[i] ^= workkey;
		if(flags & IS_BIGENDIAN) workkey = seed + (initialkeybig ^ 0x0000F0F0);
		else workkey = seed + (initialkey ^ 0x0000F0F0);
	}
	return 1;
}

// Assembly:
testb $0x14, %dl
leaq 0x6752(%rip), %rcx      # 0xc270
leaq 0x674f(%rip), %rax      # 0xc274
cmoveq %rcx, %rax
testl %esi, %esi
je 0x5b57
movl (%rax), %edx
movl %esi, %ecx
xorl %esi, %esi
movl $0xf0f0, %r8d           # imm = 0xF0F0
movl 0x55f0(%rip), %r9d      # 0xb130
imull %edx, %r9d
xorl %edx, (%rdi,%rsi,4)
movl (%rax), %edx
xorl %r8d, %edx
addl %r9d, %edx
incq %rsi
cmpq %rsi, %rcx
jne 0x5b39
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: decryptStage
unsigned int decryptStage(unsigned char *data, unsigned int length, char *name, unsigned int flags) {
	uint32_t *values = (uint32_t *)data;
	uint32_t seed, workkey, namehash, workkeyt;
	unsigned int i;
	if(flags & GAME_ZOE2) namehash = StrCode32(name);
	else namehash = StrCode24(name);
	workkeyt = (namehash << 0x07) + namehash + key2;
	if(flags & IS_BIGENDIAN) workkey = (namehash << 0x07) + initialkeybig + namehash + key34;
	else workkey = (namehash << 0x07) + initialkey + namehash + key34;
	for(i = 0; i < length; i++) {
		seed = workkey * key1;
		values[i] ^= workkey;
		workkey = seed + workkeyt;
	}
	return 1;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %ecx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movq %rdx, %rdi
testb $0x8, %r14b
jne 0x5b79
callq 0x5352
jmp 0x5b7e
callq 0x5387
testl %ebp, %ebp
je 0x5bcb
movl %eax, %ecx
shll $0x7, %ecx
addl %eax, %ecx
movl 0x55a5(%rip), %eax      # 0xb134
addl %ecx, %eax
testb $0x14, %r14b
leaq 0x66d4(%rip), %rdx      # 0xc270
leaq 0x66d1(%rip), %rsi      # 0xc274
cmoveq %rdx, %rsi
addl (%rsi), %ecx
addl 0x5589(%rip), %ecx      # 0xb138
movl %ebp, %edx
xorl %esi, %esi
movl 0x5577(%rip), %edi      # 0xb130
imull %ecx, %edi
xorl %ecx, (%rbx,%rsi,4)
addl %eax, %edi
incq %rsi
movl %edi, %ecx
cmpq %rsi, %rdx
jne 0x5bb3
movl $0x1, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Joy-Division[P]tools-mgs/dat-extract_enc.c
// Function: decryptContent
unsigned int decryptContent(unsigned char *data, unsigned int length) {
	uint32_t *values = (uint32_t *)data;
	uint32_t seed, workkey, workkeyt, workkeyv;
	unsigned int i;
	workkeyv = key5 ^ key6;
	workkeyt = workkeyv * key7;
	workkey = workkeyv | ((workkeyv ^ key8) << 0x10);
	for(i = 0; i < length; i++) {
		seed = workkey * key1;
		values[i] ^= workkey;
		workkey = seed + workkeyt;
	}
	return 1;
}

// Assembly:
testl %esi, %esi
je 0x5c1b
movl 0x5561(%rip), %edx      # 0xb140
xorl 0x5557(%rip), %edx      # 0xb13c
movl 0x5559(%rip), %eax      # 0xb144
imull %edx, %eax
movl 0x5554(%rip), %ecx      # 0xb148
xorl %edx, %ecx
shll $0x10, %ecx
orl %edx, %ecx
movl %esi, %edx
xorl %esi, %esi
movl 0x552a(%rip), %r8d      # 0xb130
imull %ecx, %r8d
xorl %ecx, (%rdi,%rsi,4)
addl %eax, %r8d
incq %rsi
movl %r8d, %ecx
cmpq %rsi, %rdx
jne 0x5bff
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/luac.c
// Function: usage
static void usage(const char* message)
{
 if (*message=='-')
  fprintf(stderr,"%s: unrecognized option " LUA_QS "\n",progname,message);
 else
  fprintf(stderr,"%s: %s\n",progname,message);
 fprintf(stderr,
 "usage: %s [options] [filenames].\n"
 "Available options are:\n"
 "  -        process stdin\n"
 "  -l       list\n"
 "  -o name  output to file " LUA_QL("name") " (default is \"%s\")\n"
 "  -p       parse only\n"
 "  -s       strip debug information\n"
 "  -v       show version information\n"
 "  --       stop handling options\n",
 progname,Output);
 exit(EXIT_FAILURE);
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
cmpb $0x2d, (%rdi)
movq 0x178f8(%rip), %rbx     # 0x19ff8
movq (%rbx), %rdi
movq 0x17a4e(%rip), %rdx     # 0x1a158
leaq 0xf98a(%rip), %rax      # 0x1209b
leaq 0xfaee(%rip), %rsi      # 0x12206
cmoveq %rax, %rsi
xorl %eax, %eax
callq 0x2160
movq (%rbx), %rdi
movq 0x17a2b(%rip), %rdx     # 0x1a158
leaq 0xf985(%rip), %rsi      # 0x120b9
leaq 0x17a2d(%rip), %rcx     # 0x1a168
xorl %eax, %eax
callq 0x2160
movl $0x1, %edi
callq 0x2230
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha256_Init
void pbkdf2_hmac_sha256_Init(PBKDF2_HMAC_SHA256_CTX *pctx, const uint8_t *pass,
                             int passlen, const uint8_t *salt, int saltlen,
                             uint32_t blocknr) {
  SHA256_CTX ctx;
#if BYTE_ORDER == LITTLE_ENDIAN
  REVERSE32(blocknr, blocknr);
#endif

  hmac_sha256_prepare(pass, passlen, pctx->odig, pctx->idig);
  memzero(pctx->g, sizeof(pctx->g));
  pctx->g[8] = 0x80000000;
  pctx->g[15] = (SHA256_BLOCK_LENGTH + SHA256_DIGEST_LENGTH) * 8;

  memcpy(ctx.state, pctx->idig, sizeof(pctx->idig));
  ctx.bitcount = SHA256_BLOCK_LENGTH * 8;
  sha256_Update(&ctx, salt, saltlen);
  sha256_Update(&ctx, (uint8_t *)&blocknr, sizeof(blocknr));
  sha256_Final(&ctx, (uint8_t *)pctx->g);
#if BYTE_ORDER == LITTLE_ENDIAN
  for (uint32_t k = 0; k < SHA256_DIGEST_LENGTH / sizeof(uint32_t); k++) {
    REVERSE32(pctx->g[k], pctx->g[k]);
  }
#endif
  sha256_Transform(pctx->odig, pctx->g, pctx->g);
  memcpy(pctx->f, pctx->g, SHA256_DIGEST_LENGTH);
  pctx->first = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %r8d, %r13d
movq %rcx, %r12
movq %rdi, %rbx
leaq -0x2c(%rbp), %rax
movl %r9d, (%rax)
bswapl %r9d
movl %r9d, (%rax)
leaq 0x20(%rdi), %rcx
movq %rsi, %rdi
movl %edx, %esi
movq %rbx, %rdx
callq 0x9c28
leaq 0x60(%rbx), %r14
movl $0x40, %esi
movq %r14, %rdi
callq 0x81bc
movl $0x80000000, 0x80(%rbx) # imm = 0x80000000
movl $0x300, 0x9c(%rbx)      # imm = 0x300
movups 0x20(%rbx), %xmm0
movups 0x30(%rbx), %xmm1
leaq -0xa0(%rbp), %r15
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
movq $0x200, 0x20(%r15)      # imm = 0x200
movslq %r13d, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x9073
movl $0x4, %edx
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x9073
movq %r15, %rdi
movq %r14, %rsi
callq 0x91ac
movl $0x18, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x20, %rax
jne 0x8274
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x8e48
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movb $0x1, 0xa0(%rbx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha256_Update
void pbkdf2_hmac_sha256_Update(PBKDF2_HMAC_SHA256_CTX *pctx,
                               uint32_t iterations) {
  for (uint32_t i = pctx->first; i < iterations; i++) {
    sha256_Transform(pctx->idig, pctx->g, pctx->g);
    sha256_Transform(pctx->odig, pctx->g, pctx->g);
    for (uint32_t j = 0; j < SHA256_DIGEST_LENGTH / sizeof(uint32_t); j++) {
      pctx->f[j] ^= pctx->g[j];
    }
  }
  pctx->first = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbl 0xa0(%rdi), %r13d
cmpl %esi, %r13d
jae 0x831c
movl %esi, %r14d
leaq 0x20(%rbx), %r15
leaq 0x60(%rbx), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x8e48
movq %rbx, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x8e48
movq $-0x8, %rax
movl 0x20(%r12,%rax,4), %ecx
xorl %ecx, (%r12,%rax,4)
incq %rax
jne 0x8306
incl %r13d
cmpl %r14d, %r13d
jne 0x82e3
movb $0x0, 0xa0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha256_Final
void pbkdf2_hmac_sha256_Final(PBKDF2_HMAC_SHA256_CTX *pctx, uint8_t *key) {
#if BYTE_ORDER == LITTLE_ENDIAN
  for (uint32_t k = 0; k < SHA256_DIGEST_LENGTH / sizeof(uint32_t); k++) {
    REVERSE32(pctx->f[k], pctx->f[k]);
  }
#endif
  memcpy(key, pctx->f, SHA256_DIGEST_LENGTH);
  memzero(pctx, sizeof(PBKDF2_HMAC_SHA256_CTX));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x10, %eax
movl (%rdi,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rdi,%rax,4)
incq %rax
cmpq $0x18, %rax
jne 0x833b
movups 0x40(%rdi), %xmm0
movups 0x50(%rdi), %xmm1
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
movl $0xa4, %esi
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha256
void pbkdf2_hmac_sha256(const uint8_t *pass, int passlen, const uint8_t *salt,
                        int saltlen, uint32_t iterations, uint8_t *key,
                        int keylen) {
  uint32_t last_block_size = keylen % SHA256_DIGEST_LENGTH;
  uint32_t blocks_count = keylen / SHA256_DIGEST_LENGTH;
  if (last_block_size) {
    blocks_count++;
  } else {
    last_block_size = SHA256_DIGEST_LENGTH;
  }
  for (uint32_t blocknr = 1; blocknr <= blocks_count; blocknr++) {
    PBKDF2_HMAC_SHA256_CTX pctx;
    pbkdf2_hmac_sha256_Init(&pctx, pass, passlen, salt, saltlen, blocknr);
    pbkdf2_hmac_sha256_Update(&pctx, iterations);
    uint8_t digest[SHA256_DIGEST_LENGTH];
    pbkdf2_hmac_sha256_Final(&pctx, digest);
    uint32_t key_offset = (blocknr - 1) * SHA256_DIGEST_LENGTH;
    if (blocknr < blocks_count) {
      memcpy(key + key_offset, digest, SHA256_DIGEST_LENGTH);
    } else {
      memcpy(key + key_offset, digest, last_block_size);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, -0x50(%rbp)
movl %r8d, -0x34(%rbp)
movl %ecx, -0x30(%rbp)
movq %rdx, -0x48(%rbp)
movl %esi, -0x2c(%rbp)
movl 0x10(%rbp), %eax
leal 0x1f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
movl %ecx, %edx
sarl $0x5, %edx
andl $-0x20, %ecx
xorl %r12d, %r12d
subl %ecx, %eax
setne %r12b
movl $0x20, %ecx
cmovnel %eax, %ecx
movq %rcx, -0x40(%rbp)
addl %edx, %r12d
je 0x8471
movq %rdi, %rbx
movl $0x1, %r14d
leaq -0xd4(%rbp), %r13
leaq -0x114(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %edx
movq -0x48(%rbp), %rcx
movl -0x30(%rbp), %r8d
movl %r14d, %r9d
callq 0x81c8
movq %r15, %rdi
movl -0x34(%rbp), %esi
callq 0x82ba
movl $0x10, %eax
movl -0x114(%rbp,%rax,4), %ecx
bswapl %ecx
movl %ecx, -0x114(%rbp,%rax,4)
incq %rax
cmpq $0x18, %rax
jne 0x83fd
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movaps %xmm1, -0x60(%rbp)
movaps %xmm0, -0x70(%rbp)
movl $0xa4, %esi
movq %r15, %rdi
callq 0x81bc
movl %r14d, %edi
shll $0x5, %edi
addl $-0x20, %edi
addq -0x50(%rbp), %rdi
cmpl %r12d, %r14d
jae 0x8458
movaps -0x70(%rbp), %xmm0
movaps -0x60(%rbp), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
jmp 0x8465
leaq -0x70(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x8080
incl %r14d
cmpl %r12d, %r14d
jbe 0x83d4
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha512_Init
void pbkdf2_hmac_sha512_Init(PBKDF2_HMAC_SHA512_CTX *pctx, const uint8_t *pass,
                             int passlen, const uint8_t *salt, int saltlen,
                             uint32_t blocknr) {
  SHA512_CTX ctx;
#if BYTE_ORDER == LITTLE_ENDIAN
  REVERSE32(blocknr, blocknr);
#endif

  hmac_sha512_prepare(pass, passlen, pctx->odig, pctx->idig);
  memzero(pctx->g, sizeof(pctx->g));
  pctx->g[8] = 0x8000000000000000;
  pctx->g[15] = (SHA512_BLOCK_LENGTH + SHA512_DIGEST_LENGTH) * 8;

  memcpy(ctx.state, pctx->idig, sizeof(pctx->idig));
  ctx.bitcount[0] = SHA512_BLOCK_LENGTH * 8;
  ctx.bitcount[1] = 0;
  sha512_Update(&ctx, salt, saltlen);
  sha512_Update(&ctx, (uint8_t *)&blocknr, sizeof(blocknr));
  sha512_Final(&ctx, (uint8_t *)pctx->g);
#if BYTE_ORDER == LITTLE_ENDIAN
  for (uint32_t k = 0; k < SHA512_DIGEST_LENGTH / sizeof(uint64_t); k++) {
    REVERSE64(pctx->g[k], pctx->g[k]);
  }
#endif
  sha512_Transform(pctx->odig, pctx->g, pctx->g);
  memcpy(pctx->f, pctx->g, SHA512_DIGEST_LENGTH);
  pctx->first = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %r8d, %r13d
movq %rcx, %r12
movq %rdi, %rbx
leaq -0x2c(%rbp), %rax
movl %r9d, (%rax)
bswapl %r9d
movl %r9d, (%rax)
leaq 0x40(%rdi), %rcx
movq %rsi, %rdi
movl %edx, %esi
movq %rbx, %rdx
callq 0x9e98
leaq 0xc0(%rbx), %r14
movl $0x80, %esi
movq %r14, %rdi
callq 0x81bc
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, 0x100(%rbx)
movq $0x600, 0x138(%rbx) # imm = 0x600
movups 0x40(%rbx), %xmm0
movups 0x50(%rbx), %xmm1
movups 0x60(%rbx), %xmm2
movups 0x70(%rbx), %xmm3
leaq -0x100(%rbp), %r15
movaps %xmm3, 0x30(%r15)
movaps %xmm2, 0x20(%r15)
movaps %xmm1, 0x10(%r15)
movaps %xmm0, (%r15)
movq $0x400, 0x40(%r15)      # imm = 0x400
movq $0x0, 0x48(%r15)
movslq %r13d, %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x96b0
movl $0x4, %edx
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x96b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x97ff
movl $0x18, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0x20, %rax
jne 0x8557
movq %rbx, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x9451
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movups 0x30(%r14), %xmm3
movups %xmm3, 0xb0(%rbx)
movups %xmm2, 0xa0(%rbx)
movups %xmm1, 0x90(%rbx)
movups %xmm0, 0x80(%rbx)
movb $0x1, 0x140(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha512_Update
void pbkdf2_hmac_sha512_Update(PBKDF2_HMAC_SHA512_CTX *pctx,
                               uint32_t iterations) {
  for (uint32_t i = pctx->first; i < iterations; i++) {
    sha512_Transform(pctx->idig, pctx->g, pctx->g);
    sha512_Transform(pctx->odig, pctx->g, pctx->g);
    for (uint32_t j = 0; j < SHA512_DIGEST_LENGTH / sizeof(uint64_t); j++) {
      pctx->f[j] ^= pctx->g[j];
    }
  }
  pctx->first = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movsbl 0x140(%rdi), %r13d
cmpl %esi, %r13d
jae 0x8626
movl %esi, %r14d
leaq 0x40(%rbx), %r15
leaq 0xc0(%rbx), %r12
movq %r15, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x9451
movq %rbx, %rdi
movq %r12, %rsi
movq %r12, %rdx
callq 0x9451
movq $-0x8, %rax
movq 0x40(%r12,%rax,8), %rcx
xorq %rcx, (%r12,%rax,8)
incq %rax
jne 0x8610
incl %r13d
cmpl %r14d, %r13d
jne 0x85ed
movb $0x0, 0x140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha512_Final
void pbkdf2_hmac_sha512_Final(PBKDF2_HMAC_SHA512_CTX *pctx, uint8_t *key) {
#if BYTE_ORDER == LITTLE_ENDIAN
  for (uint32_t k = 0; k < SHA512_DIGEST_LENGTH / sizeof(uint64_t); k++) {
    REVERSE64(pctx->f[k], pctx->f[k]);
  }
#endif
  memcpy(key, pctx->f, SHA512_DIGEST_LENGTH);
  memzero(pctx, sizeof(PBKDF2_HMAC_SHA512_CTX));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x10, %eax
movq (%rdi,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rdi,%rax,8)
incq %rax
cmpq $0x18, %rax
jne 0x8645
movups 0x80(%rdi), %xmm0
movups 0x90(%rdi), %xmm1
movups 0xa0(%rdi), %xmm2
movups 0xb0(%rdi), %xmm3
movups %xmm3, 0x30(%rsi)
movups %xmm2, 0x20(%rsi)
movups %xmm1, 0x10(%rsi)
movups %xmm0, (%rsi)
movl $0x148, %esi            # imm = 0x148
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/pbkdf2.c
// Function: pbkdf2_hmac_sha512
void pbkdf2_hmac_sha512(const uint8_t *pass, int passlen, const uint8_t *salt,
                        int saltlen, uint32_t iterations, uint8_t *key,
                        int keylen) {
  uint32_t last_block_size = keylen % SHA512_DIGEST_LENGTH;
  uint32_t blocks_count = keylen / SHA512_DIGEST_LENGTH;
  if (last_block_size) {
    blocks_count++;
  } else {
    last_block_size = SHA512_DIGEST_LENGTH;
  }
  for (uint32_t blocknr = 1; blocknr <= blocks_count; blocknr++) {
    PBKDF2_HMAC_SHA512_CTX pctx;
    pbkdf2_hmac_sha512_Init(&pctx, pass, passlen, salt, saltlen, blocknr);
    pbkdf2_hmac_sha512_Update(&pctx, iterations);
    uint8_t digest[SHA512_DIGEST_LENGTH];
    pbkdf2_hmac_sha512_Final(&pctx, digest);
    uint32_t key_offset = (blocknr - 1) * SHA512_DIGEST_LENGTH;
    if (blocknr < blocks_count) {
      memcpy(key + key_offset, digest, SHA512_DIGEST_LENGTH);
    } else {
      memcpy(key + key_offset, digest, last_block_size);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movq %r9, -0x50(%rbp)
movl %r8d, -0x34(%rbp)
movl %ecx, -0x30(%rbp)
movq %rdx, -0x48(%rbp)
movl %esi, -0x2c(%rbp)
movl 0x10(%rbp), %eax
leal 0x3f(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
movl %ecx, %edx
sarl $0x6, %edx
andl $-0x40, %ecx
xorl %r12d, %r12d
subl %ecx, %eax
setne %r12b
movl $0x40, %ecx
cmovnel %eax, %ecx
movq %rcx, -0x40(%rbp)
addl %edx, %r12d
je 0x87c8
movq %rdi, %rbx
movl $0x1, %r14d
leaq -0x158(%rbp), %r13
leaq -0x1d8(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movl -0x2c(%rbp), %edx
movq -0x48(%rbp), %rcx
movl -0x30(%rbp), %r8d
movl %r14d, %r9d
callq 0x8483
movq %r15, %rdi
movl -0x34(%rbp), %esi
callq 0x85c1
movl $0x10, %eax
movq -0x1d8(%rbp,%rax,8), %rcx
bswapq %rcx
movq %rcx, -0x1d8(%rbp,%rax,8)
incq %rax
cmpq $0x18, %rax
jne 0x8726
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups 0x20(%r13), %xmm2
movups 0x30(%r13), %xmm3
movaps %xmm3, -0x60(%rbp)
movaps %xmm2, -0x70(%rbp)
movaps %xmm1, -0x80(%rbp)
movaps %xmm0, -0x90(%rbp)
movl $0x148, %esi            # imm = 0x148
movq %r15, %rdi
callq 0x81bc
movl %r14d, %edi
shll $0x6, %edi
addl $-0x40, %edi
addq -0x50(%rbp), %rdi
cmpl %r12d, %r14d
jae 0x87ac
movaps -0x90(%rbp), %xmm0
movaps -0x80(%rbp), %xmm1
movaps -0x70(%rbp), %xmm2
movaps -0x60(%rbp), %xmm3
movups %xmm3, 0x30(%rdi)
movups %xmm2, 0x20(%rdi)
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
jmp 0x87bc
leaq -0x90(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x8080
incl %r14d
cmpl %r12d, %r14d
jbe 0x86fd
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha1_Final
void sha1_Final(SHA1_CTX* context, sha2_byte digest[]) {
	unsigned int	usedspace;

	/* If no digest buffer is passed, we don't bother doing this: */
	if (digest != (sha2_byte*)0) {
		usedspace = (context->bitcount >> 3) % SHA1_BLOCK_LENGTH;
		/* Begin padding with a 1 bit: */
		((uint8_t*)context->buffer)[usedspace++] = 0x80;

		if (usedspace > SHA1_SHORT_BLOCK_LENGTH) {
			memzero(((uint8_t*)context->buffer) + usedspace, SHA1_BLOCK_LENGTH - usedspace);

#if BYTE_ORDER == LITTLE_ENDIAN
			/* Convert TO host byte order */
			for (int j = 0; j < 16; j++) {
				REVERSE32(context->buffer[j],context->buffer[j]);
			}
#endif
			/* Do second-to-last transform: */
			sha1_Transform(context->state, context->buffer, context->state);

			/* And prepare the last transform: */
			usedspace = 0;
		}
		/* Set-up for the last transform: */
		memzero(((uint8_t*)context->buffer) + usedspace, SHA1_SHORT_BLOCK_LENGTH - usedspace);

#if BYTE_ORDER == LITTLE_ENDIAN
		/* Convert TO host byte order */
		for (int j = 0; j < 14; j++) {
			REVERSE32(context->buffer[j],context->buffer[j]);
		}
#endif
		/* Set the bit count: */
		context->buffer[14] = context->bitcount >> 32;
		context->buffer[15] = context->bitcount & 0xffffffff;

		/* Final transform: */
		sha1_Transform(context->state, context->buffer, context->state);

#if BYTE_ORDER == LITTLE_ENDIAN
		/* Convert FROM host byte order */
		for (int j = 0; j < 5; j++) {
			REVERSE32(context->state[j],context->state[j]);
		}
#endif
		MEMCPY_BCOPY(digest, context->state, SHA1_DIGEST_LENGTH);
	}

	/* Clean up state data: */
	memzero(context, sizeof(SHA1_CTX));
	usedspace = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x8c90
movq %rsi, %r14
movl 0x18(%rbx), %esi
shrl $0x3, %esi
andl $0x3f, %esi
leaq 0x20(%rbx), %r15
leal 0x1(%rsi), %eax
movb $-0x80, 0x20(%rbx,%rsi)
cmpl $0x38, %esi
jb 0x8c2e
movl %eax, %edi
addq %r15, %rdi
xorl $0x3f, %esi
callq 0x81bc
movl $0x8, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x18, %rax
jne 0x8c0d
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x8813
xorl %eax, %eax
movl %eax, %edi
addq %r15, %rdi
movl $0x38, %esi
subl %eax, %esi
callq 0x81bc
movl $0x8, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x16, %rax
jne 0x8c44
movq 0x18(%rbx), %rax
rorq $0x20, %rax
movq %rax, 0x58(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x8813
xorl %eax, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x5, %rax
jne 0x8c71
movl 0x10(%rbx), %eax
movl %eax, 0x10(%r14)
movups (%rbx), %xmm0
movups %xmm0, (%r14)
movl $0x60, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha1_End
char *sha1_End(SHA1_CTX* context, char buffer[]) {
	sha2_byte	digest[SHA1_DIGEST_LENGTH], *d = digest;
	int		i;

	if (buffer != (char*)0) {
		sha1_Final(context, digest);

		for (i = 0; i < SHA1_DIGEST_LENGTH; i++) {
			*buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
			*buffer++ = sha2_hex_digits[*d & 0x0f];
			d++;
		}
		*buffer = (char)0;
	} else {
		memzero(context, sizeof(SHA1_CTX));
	}
	memzero(digest, SHA1_DIGEST_LENGTH);
	return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
testq %rsi, %rsi
je 0x8d00
movq %rsi, %rbx
leaq -0x20(%rbp), %rsi
callq 0x8bc8
xorl %eax, %eax
leaq 0x3746(%rip), %rcx      # 0xc410
xorl %edx, %edx
movzbl -0x20(%rbp,%rdx), %esi
movl %esi, %edi
shrl $0x4, %edi
movb (%rdi,%rcx), %dil
movb %dil, (%rbx,%rdx,2)
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, 0x1(%rbx,%rdx,2)
incq %rdx
addq $-0x2, %rax
cmpq $0x14, %rdx
jne 0x8ccc
movb $0x0, (%rbx,%rdx,2)
subq %rax, %rbx
jmp 0x8d0c
movl $0x60, %esi
callq 0x81bc
xorl %ebx, %ebx
leaq -0x20(%rbp), %rdi
movl $0x14, %esi
callq 0x81bc
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha1_Raw
void sha1_Raw(const sha2_byte* data, size_t len, uint8_t digest[SHA1_DIGEST_LENGTH]) {
	SHA1_CTX	context;
	sha1_Init(&context);
	sha1_Update(&context, data, len);
	sha1_Final(&context, digest);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps 0x32cd(%rip), %xmm0     # 0xc010
leaq -0x60(%rbp), %r12
movaps %xmm0, -0x20(%r12)
movl $0xc3d2e1f0, -0x10(%r12) # imm = 0xC3D2E1F0
movl $0x40, %esi
movq %r12, %rdi
callq 0x81bc
movq $0x0, -0x8(%r12)
leaq -0x80(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x8a8f
movq %r12, %rdi
movq %rbx, %rsi
callq 0x8bc8
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha256_Init
void sha256_Init(SHA256_CTX* context) {
	if (context == (SHA256_CTX*)0) {
		return;
	}
	MEMCPY_BCOPY(context->state, sha256_initial_hash_value, SHA256_DIGEST_LENGTH);
	memzero(context->buffer, SHA256_BLOCK_LENGTH);
	context->bitcount = 0;
}

// Assembly:
testq %rdi, %rdi
je 0x8e47
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movaps 0x3223(%rip), %xmm0     # 0xc040
movups %xmm0, 0x10(%rdi)
movaps 0x3208(%rip), %xmm0     # 0xc030
movups %xmm0, (%rdi)
addq $0x28, %rdi
movl $0x40, %esi
callq 0x81bc
movq $0x0, 0x20(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha256_Final
void sha256_Final(SHA256_CTX* context, sha2_byte digest[]) {
	unsigned int	usedspace;

	/* If no digest buffer is passed, we don't bother doing this: */
	if (digest != (sha2_byte*)0) {
		usedspace = (context->bitcount >> 3) % SHA256_BLOCK_LENGTH;
		/* Begin padding with a 1 bit: */
		((uint8_t*)context->buffer)[usedspace++] = 0x80;
		
		if (usedspace > SHA256_SHORT_BLOCK_LENGTH) {
			memzero(((uint8_t*)context->buffer) + usedspace, SHA256_BLOCK_LENGTH - usedspace);

#if BYTE_ORDER == LITTLE_ENDIAN
			/* Convert TO host byte order */
			for (int j = 0; j < 16; j++) {
				REVERSE32(context->buffer[j],context->buffer[j]);
			}
#endif
			/* Do second-to-last transform: */
			sha256_Transform(context->state, context->buffer, context->state);
			
			/* And prepare the last transform: */
			usedspace = 0;
		}
		/* Set-up for the last transform: */
		memzero(((uint8_t*)context->buffer) + usedspace, SHA256_SHORT_BLOCK_LENGTH - usedspace);

#if BYTE_ORDER == LITTLE_ENDIAN
		/* Convert TO host byte order */
		for (int j = 0; j < 14; j++) {
			REVERSE32(context->buffer[j],context->buffer[j]);
		}
#endif
		/* Set the bit count: */
		context->buffer[14] = context->bitcount >> 32;
		context->buffer[15] = context->bitcount & 0xffffffff;

		/* Final transform: */
		sha256_Transform(context->state, context->buffer, context->state);

#if BYTE_ORDER == LITTLE_ENDIAN
		/* Convert FROM host byte order */
		for (int j = 0; j < 8; j++) {
			REVERSE32(context->state[j],context->state[j]);
		}
#endif
		MEMCPY_BCOPY(digest, context->state, SHA256_DIGEST_LENGTH);
	}

	/* Clean up state data: */
	memzero(context, sizeof(SHA256_CTX));
	usedspace = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x9276
movq %rsi, %r14
movl 0x20(%rbx), %esi
shrl $0x3, %esi
andl $0x3f, %esi
leaq 0x28(%rbx), %r15
leal 0x1(%rsi), %eax
movb $-0x80, 0x28(%rbx,%rsi)
cmpl $0x38, %esi
jb 0x9212
movl %eax, %edi
addq %r15, %rdi
xorl $0x3f, %esi
callq 0x81bc
movl $0xa, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x1a, %rax
jne 0x91f1
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x8e48
xorl %eax, %eax
movl %eax, %edi
addq %r15, %rdi
movl $0x38, %esi
subl %eax, %esi
callq 0x81bc
movl $0xa, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x18, %rax
jne 0x9228
movq 0x20(%rbx), %rax
rorq $0x20, %rax
movq %rax, 0x60(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x8e48
xorl %eax, %eax
movl (%rbx,%rax,4), %ecx
bswapl %ecx
movl %ecx, (%rbx,%rax,4)
incq %rax
cmpq $0x8, %rax
jne 0x9255
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movl $0x68, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha256_End
char *sha256_End(SHA256_CTX* context, char buffer[]) {
	sha2_byte	digest[SHA256_DIGEST_LENGTH], *d = digest;
	int		i;

	if (buffer != (char*)0) {
		sha256_Final(context, digest);

		for (i = 0; i < SHA256_DIGEST_LENGTH; i++) {
			*buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
			*buffer++ = sha2_hex_digits[*d & 0x0f];
			d++;
		}
		*buffer = (char)0;
	} else {
		memzero(context, sizeof(SHA256_CTX));
	}
	memzero(digest, SHA256_DIGEST_LENGTH);
	return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
testq %rsi, %rsi
je 0x92e6
movq %rsi, %rbx
leaq -0x30(%rbp), %rsi
callq 0x91ac
xorl %eax, %eax
leaq 0x3160(%rip), %rcx      # 0xc410
xorl %edx, %edx
movzbl -0x30(%rbp,%rdx), %esi
movl %esi, %edi
shrl $0x4, %edi
movb (%rdi,%rcx), %dil
movb %dil, (%rbx,%rdx,2)
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, 0x1(%rbx,%rdx,2)
incq %rdx
addq $-0x2, %rax
cmpq $0x20, %rdx
jne 0x92b2
movb $0x0, (%rbx,%rdx,2)
subq %rax, %rbx
jmp 0x92f2
movl $0x68, %esi
callq 0x81bc
xorl %ebx, %ebx
leaq -0x30(%rbp), %rdi
movl $0x20, %esi
callq 0x81bc
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha256_Raw
void sha256_Raw(const sha2_byte* data, size_t len, uint8_t digest[SHA256_DIGEST_LENGTH]) {
	SHA256_CTX	context;
	sha256_Init(&context);
	sha256_Update(&context, data, len);
	sha256_Final(&context, digest);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps 0x2d17(%rip), %xmm0     # 0xc040
leaq -0x68(%rbp), %r12
movaps %xmm0, -0x18(%r12)
movaps 0x2cf6(%rip), %xmm0     # 0xc030
movaps %xmm0, -0x28(%r12)
movl $0x40, %esi
movq %r12, %rdi
callq 0x81bc
movq $0x0, -0x8(%r12)
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9073
movq %r12, %rdi
movq %rbx, %rsi
callq 0x91ac
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha256_Data
char* sha256_Data(const sha2_byte* data, size_t len, char digest[SHA256_DIGEST_STRING_LENGTH]) {
	SHA256_CTX	context;

	sha256_Init(&context);
	sha256_Update(&context, data, len);
	return sha256_End(&context, digest);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps 0x2c9e(%rip), %xmm0     # 0xc040
leaq -0x68(%rbp), %r12
movaps %xmm0, -0x18(%r12)
movaps 0x2c7d(%rip), %xmm0     # 0xc030
movaps %xmm0, -0x28(%r12)
movl $0x40, %esi
movq %r12, %rdi
callq 0x81bc
movq $0x0, -0x8(%r12)
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x9073
movq %r12, %rdi
movq %rbx, %rsi
callq 0x928d
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha512_Init
void sha512_Init(SHA512_CTX* context) {
	if (context == (SHA512_CTX*)0) {
		return;
	}
	MEMCPY_BCOPY(context->state, sha512_initial_hash_value, SHA512_DIGEST_LENGTH);
	memzero(context->buffer, SHA512_BLOCK_LENGTH);
	context->bitcount[0] = context->bitcount[1] =  0;
}

// Assembly:
testq %rdi, %rdi
je 0x9450
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movaps 0x2c6f(%rip), %xmm0     # 0xc080
movups %xmm0, 0x30(%rdi)
movaps 0x2c54(%rip), %xmm0     # 0xc070
movups %xmm0, 0x20(%rdi)
movaps 0x2c39(%rip), %xmm0     # 0xc060
movups %xmm0, 0x10(%rdi)
movaps 0x2c1e(%rip), %xmm0     # 0xc050
movups %xmm0, (%rdi)
addq $0x50, %rdi
movl $0x80, %esi
callq 0x81bc
xorps %xmm0, %xmm0
movups %xmm0, 0x40(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha512_Final
void sha512_Final(SHA512_CTX* context, sha2_byte digest[]) {
	/* If no digest buffer is passed, we don't bother doing this: */
	if (digest != (sha2_byte*)0) {
		sha512_Last(context);

		/* Save the hash data for output: */
#if BYTE_ORDER == LITTLE_ENDIAN
		/* Convert FROM host byte order */
		for (int j = 0; j < 8; j++) {
			REVERSE64(context->state[j],context->state[j]);
		}
#endif
		MEMCPY_BCOPY(digest, context->state, SHA512_DIGEST_LENGTH);
	}

	/* Zero out state data */
	memzero(context, sizeof(SHA512_CTX));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x98ee
movq %rsi, %r14
movl 0x40(%rbx), %esi
shrl $0x3, %esi
andl $0x7f, %esi
leaq 0x50(%rbx), %r15
leal 0x1(%rsi), %eax
movb $-0x80, 0x50(%rbx,%rsi)
cmpl $0x70, %esi
jb 0x9868
movl %eax, %edi
addq %r15, %rdi
xorl $0x7f, %esi
callq 0x81bc
movl $0xa, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0x1a, %rax
jne 0x9844
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x9451
xorl %eax, %eax
movl %eax, %edi
addq %r15, %rdi
movl $0x70, %esi
subl %eax, %esi
callq 0x81bc
movl $0xa, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0x18, %rax
jne 0x987e
movq 0x40(%rbx), %rax
movq 0x48(%rbx), %rcx
movq %rcx, 0xc0(%rbx)
movq %rax, 0xc8(%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x9451
xorl %eax, %eax
movq (%rbx,%rax,8), %rcx
bswapq %rcx
movq %rcx, (%rbx,%rax,8)
incq %rax
cmpq $0x8, %rax
jne 0x98b8
movups (%rbx), %xmm0
movups 0x10(%rbx), %xmm1
movups 0x20(%rbx), %xmm2
movups 0x30(%rbx), %xmm3
movups %xmm3, 0x30(%r14)
movups %xmm2, 0x20(%r14)
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movl $0xd0, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x81bc
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha512_End
char *sha512_End(SHA512_CTX* context, char buffer[]) {
	sha2_byte	digest[SHA512_DIGEST_LENGTH], *d = digest;
	int		i;

	if (buffer != (char*)0) {
		sha512_Final(context, digest);

		for (i = 0; i < SHA512_DIGEST_LENGTH; i++) {
			*buffer++ = sha2_hex_digits[(*d & 0xf0) >> 4];
			*buffer++ = sha2_hex_digits[*d & 0x0f];
			d++;
		}
		*buffer = (char)0;
	} else {
		memzero(context, sizeof(SHA512_CTX));
	}
	memzero(digest, SHA512_DIGEST_LENGTH);
	return buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
testq %rsi, %rsi
je 0x995e
movq %rsi, %rbx
leaq -0x50(%rbp), %rsi
callq 0x97ff
xorl %eax, %eax
leaq 0x2ae8(%rip), %rcx      # 0xc410
xorl %edx, %edx
movzbl -0x50(%rbp,%rdx), %esi
movl %esi, %edi
shrl $0x4, %edi
movb (%rdi,%rcx), %dil
movb %dil, (%rbx,%rdx,2)
andl $0xf, %esi
movb (%rsi,%rcx), %sil
movb %sil, 0x1(%rbx,%rdx,2)
incq %rdx
addq $-0x2, %rax
cmpq $0x40, %rdx
jne 0x992a
movb $0x0, (%rbx,%rdx,2)
subq %rax, %rbx
jmp 0x996a
movl $0xd0, %esi
callq 0x81bc
xorl %ebx, %ebx
leaq -0x50(%rbp), %rdi
movl $0x40, %esi
callq 0x81bc
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Seclabs-htc[P]slip39/trezor-crypto/sha2.c
// Function: sha512_Raw
void sha512_Raw(const sha2_byte* data, size_t len, uint8_t digest[SHA512_DIGEST_LENGTH]) {
	SHA512_CTX	context;
	sha512_Init(&context);
	sha512_Update(&context, data, len);
	sha512_Final(&context, digest);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps 0x26dc(%rip), %xmm0     # 0xc080
leaq -0xa0(%rbp), %r12
movaps %xmm0, -0x20(%r12)
movaps 0x26b8(%rip), %xmm0     # 0xc070
movaps %xmm0, -0x30(%r12)
movaps 0x269b(%rip), %xmm0     # 0xc060
movaps %xmm0, -0x40(%r12)
movaps 0x267e(%rip), %xmm0     # 0xc050
movaps %xmm0, -0x50(%r12)
movl $0x80, %esi
movq %r12, %rdi
callq 0x81bc
xorps %xmm0, %xmm0
movaps %xmm0, -0x10(%r12)
leaq -0xf0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x96b0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x97ff
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq