LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: push
void push(char* ipath, char* fpath) {
	int type = getFileType(ipath);
	switch(type) {
		case TYPE_TAP:
			tapPush(ipath, fpath);
			break;
		case TYPE_SCL:
			sclPush(ipath, fpath);
			break;
		case TYPE_TRD:
			trdPush(ipath, fpath);
			break;
		default:
			printf("Unknown image type\n");
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x4019fd
movl %eax, %eax
leaq 0x9bce1(%rip), %rcx     # 0x49f014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x9c249(%rip), %rdi     # 0x49f58c
popq %rbx
popq %r14
popq %rbp
jmp 0x414ec0
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x402cf7
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x4021ca
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %rbp
jmp 0x40241e
// File: /workspace/github_c_makefile_star2_O1/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: pop
void pop(char* ipath, char* fname, char* oname) {
	if (!oname) {
		if (opt.asHobeta) {
			char fpath[1024];
			memset(fpath, 0, 1024);
			char* pDot = strrchr(fname,'.');
			if (pDot) {
				memcpy(fpath, fname, pDot - fname + 1);
				strcat(fpath,"$");
				strcat(fpath,pDot + 1);
				oname = fpath;
			} else {
				oname = fname;
			}
		} else {
			oname = fname;
		}
	}
	int type = getFileType(ipath);
	switch(type) {
		case TYPE_TAP:
			tapPop(ipath, fname, oname);
			break;
		case TYPE_SCL:
			sclPop(ipath, fname, oname);
			break;
		case TYPE_TRD:
			trdPop(ipath, fname, oname);
			break;
		default:
			printf("Unknown image type\n");
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
jne 0x40340c
testb $0x4, 0xcf00e(%rip)     # 0x4d23b0
movq %rbx, %r12
je 0x40340c
leaq -0x430(%rbp), %r15
movl $0x400, %edx            # imm = 0x400
movq %r15, %rdi
xorl %esi, %esi
callq 0x4010a0
movq %rbx, %rdi
movl $0x2e, %esi
callq 0x401050
movq %rbx, %r12
testq %rax, %rax
je 0x40340c
movq %rax, %r13
movq %rax, %rdx
subq %rbx, %rdx
incq %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x401040
movq %r15, %rdi
callq 0x4010d8
movw $0x24, -0x430(%rbp,%rax)
incq %r13
movq %r15, %rdi
movq %r13, %rsi
callq 0x401058
movq %r15, %r12
movq %r14, %rdi
callq 0x4019fd
movl %eax, %eax
leaq 0x9bc07(%rip), %rcx     # 0x49f024
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x9c15f(%rip), %rdi     # 0x49f58c
jmp 0x403446
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x402faa
jmp 0x40345b
leaq 0x9c072(%rip), %rdi     # 0x49f4b8
callq 0x414ec0
jmp 0x40345b
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x4026dc
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/salextpuru[P]speccy-toochain/src/mktrd/mctrd.c
// Function: renam
void renam(char* ipath, char* oname, char* nname) {
	int type = getFileType(ipath);
	switch(type) {
		case TYPE_TAP:
			tapRename(ipath, oname, nname);
			break;
		case TYPE_SCL:
			sclRename(ipath, oname, nname);
			break;
		case TYPE_TRD:
			trdRename(ipath, oname, nname);
			break;
		default:
			printf("Unknown image type\n");
			break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x4019fd
movl %eax, %eax
leaq 0x9bba6(%rip), %rcx     # 0x49f034
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x9c0ee(%rip), %rdi     # 0x49f58c
jmp 0x4034bf
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x40314f
leaq 0x9bff9(%rip), %rdi     # 0x49f4b8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x414ec0
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4029c0
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/group-function/command.c
// Function: usage
void usage(char **argv, char **av)
{
  if (av)
  {
    fprintf(stderr, "Unknown or invalid argument %s\n", av[0]);
  }
  fprintf(stderr, "Usage: %s <dest> <prio> <pgn> <field>=<value> ... | -version\n\n", argv[0]);
  fprintf(stderr, "       <field> is a decimal value\n");
  fprintf(stderr, "       <value> is a hexadecimal value; the length of the value defines how many bytes are encoded\n");
  fprintf(stderr, "       Maximum # of fields: %d\n\n", MAX_FIELDS);
  fprintf(stderr, "This program uses PGN 126208 to command a device to set fields to a particular value.\n");
  fprintf(stderr, "The use of this is thus completely dependent on what the device allows.\n\n" COPYRIGHT);
  exit(1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x13d3
movq 0x4c39(%rip), %rax      # 0x5ff8
movq (%rax), %rdi
movq (%rsi), %rdx
leaq 0x1c38(%rip), %rsi      # 0x3004
xorl %eax, %eax
callq 0x1150
movq 0x4c1e(%rip), %r14      # 0x5ff8
movq (%r14), %rdi
movq (%rbx), %rdx
leaq 0x1c3d(%rip), %rsi      # 0x3024
xorl %eax, %eax
callq 0x1150
movq (%r14), %rcx
leaq 0x1c6b(%rip), %rdi      # 0x3063
movl $0x22, %esi
movl $0x1, %edx
callq 0x1230
movq (%r14), %rcx
leaq 0x1c75(%rip), %rdi      # 0x3086
movl $0x62, %esi
movl $0x1, %edx
callq 0x1230
movq (%r14), %rdi
leaq 0x1cbf(%rip), %rsi      # 0x30e9
movl $0x14, %edx
xorl %eax, %eax
callq 0x1150
movq (%r14), %rcx
leaq 0x1cca(%rip), %rdi      # 0x310a
movl $0x56, %esi
movl $0x1, %edx
callq 0x1230
movq (%r14), %rcx
leaq 0x1d08(%rip), %rdi      # 0x3161
movl $0x304, %esi            # imm = 0x304
movl $0x1, %edx
callq 0x1230
movl $0x1, %edi
callq 0x1210
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_11/entab.c
// Function: main
int main(int argc, char *argv[])
{
  if (!is_tab_stop_arg_list_valid(argc, argv))
  {
    puts("Error: invalid tab stop list.\n");
    return EXIT_FAILURE;
  }

  int c;
  size_t arg_pos = 1;
  size_t line_pos = 0;
  size_t tab_stop = DEFAULT_TAB_LENGTH;
  size_t nr_of_spaces = 0;
  size_t nr_of_custom_tab_stops = argc - 1;

  while ((c = getchar()) != EOF)
  {
    ++line_pos;

    if (c == ' ')
    {
      ++nr_of_spaces;

      if (nr_of_custom_tab_stops)
      {
        tab_stop = atoi(argv[arg_pos]);
      }
      else if (argc > 1)
      {
        tab_stop = 1;
      }

      if (line_pos % tab_stop == 0 && nr_of_spaces > 1)
      {
        putchar('\t');

        if (nr_of_custom_tab_stops)
        {
          ++arg_pos;
          --nr_of_custom_tab_stops;
        }

        nr_of_spaces = 0;
      }
    }
    else
    {
      while (nr_of_spaces)
      {
        putchar(' ');
        --nr_of_spaces;
      }

      if (c == '\n')
      {
        arg_pos = 1;
        line_pos = 0;
        nr_of_custom_tab_stops = argc - 1;
      }

      putchar(c);
    }
  }

  return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, (%rsp)
movq %rsi, 0x8(%rsp)
callq 0x12b4
testl %eax, %eax
je 0x1294
callq 0x1060
cmpl $-0x1, %eax
je 0x1290
movl %eax, %ebp
movq (%rsp), %rax
decl %eax
movslq %eax, %r12
movl $0x8, %r14d
movq %r12, 0x10(%rsp)
xorl %r13d, %r13d
xorl %r15d, %r15d
movl $0x1, %ebx
incq %r15
cmpl $0x20, %ebp
jne 0x11ff
testq %r12, %r12
je 0x1232
movq 0x8(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x1070
movslq %eax, %r14
jmp 0x123f
testq %r13, %r13
je 0x1213
movl $0x20, %edi
callq 0x1030
decq %r13
jne 0x1204
cmpl $0xa, %ebp
movl $0x1, %eax
cmoveq %rax, %rbx
movl $0x0, %eax
cmoveq %rax, %r15
cmoveq 0x10(%rsp), %r12
movl %ebp, %edi
jmp 0x1278
cmpl $0x2, (%rsp)
movl $0x1, %eax
cmovgeq %rax, %r14
incq %r13
movq %r15, %rax
xorl %edx, %edx
divq %r14
testq %rdx, %rdx
sete %al
cmpq $0x2, %r13
setae %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1280
cmpq $0x1, %r12
sbbq $-0x1, %rbx
subq $0x1, %r12
movl $0x0, %eax
cmovbq %rax, %r12
movl $0x9, %edi
callq 0x1030
xorl %r13d, %r13d
callq 0x1060
movl %eax, %ebp
cmpl $-0x1, %eax
jne 0x11df
xorl %eax, %eax
jmp 0x12a5
leaq 0xd69(%rip), %rdi       # 0x2004
callq 0x1040
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ohkimur[P]the-c-programming-language-2nd-edition-solutions/chapter_5/exercise_5_11/entab.c
// Function: is_tab_stop_arg_list_valid
int is_tab_stop_arg_list_valid(int argc, char *argv[])
{
  for (size_t i = 1; i < argc; ++i)
  {
    if (!is_str_uint(argv[i]) || (i > 1 && atoi(argv[i - 1]) > atoi(argv[i])))
    {
      return 0;
    }
  }
  return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, %edi
setb %r15b
jb 0x1324
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %r14
movq %r14, %rdi
callq 0x133a
testl %eax, %eax
je 0x1324
movslq %ebp, %r12
movl $0x2, %r13d
leaq -0x1(%r13), %rax
cmpq $0x2, %rax
jb 0x1308
movq -0x10(%rbx,%r13,8), %rdi
callq 0x1070
movl %eax, %ebp
movq %r14, %rdi
callq 0x1070
cmpl %eax, %ebp
jg 0x1324
cmpq %r12, %r13
setae %r15b
je 0x1324
movq (%rbx,%r13,8), %r14
movq %r14, %rdi
callq 0x133a
incq %r13
testl %eax, %eax
jne 0x12e6
movzbl %r15b, %eax
andl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: main
int main(int argc, char **argv)
{
    if (argc < 2) FAILED(1, "");

    char *profile = NULL, *bookmark = NULL;
    unsigned int flag = 0x0;
    int c = 0;

    while ((c = getopt(argc, argv, "p:utcbsd")) != -1) {
        switch (c) {
            case 'p': /* profile path */
                flag |= FLAG_P;
                profile = strdup(optarg);
                break;
            case 'u': /* url */
                flag |= FLAG_U;
                break;
            case 't': /* title */
                flag |= FLAG_T;
                break;
            case 'c': /* current session */
                flag |= FLAG_C;
                break;
            case 'b': /* bookmark */
                flag |= FLAG_B;
                break;
            case 's': /* session json */
                flag |= FLAG_S;
                break;
            case 'd': /* bookmark json */
                flag |= FLAG_D;
                break;
            case '?':
                if (optopt == 'p')
                    FAILED(1, "");
                break;
            default:
                break;
        }
    }

    if (!profile)
        profile = get_firefox_profile();

    if (flag & (FLAG_U | FLAG_T | FLAG_C | FLAG_S))
        get_tabs(profile, flag);

    if (flag & (FLAG_B | FLAG_D)) {
        bookmark = get_bookmark_file(profile);
        get_bookmarks(bookmark, flag);
        free(bookmark);
    }

    free(profile);
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jl 0x39b6
movq %rsi, %r14
movl %edi, %r15d
movq $0x0, (%rsp)
leaq 0x10757(%rip), %r12     # 0x1401c
movq 0x14704(%rip), %r13     # 0x17fd0
leaq 0x10731(%rip), %rbx     # 0x14004
xorl %ebp, %ebp
movl %r15d, %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x11c0
cmpl $0x62, %eax
jg 0x38f7
cmpl $0x3f, %eax
je 0x3920
cmpl $0x62, %eax
jne 0x393b
orl $0x10, %ebp
jmp 0x38d5
leal -0x70(%rax), %ecx
cmpl $0x5, %ecx
ja 0x392c
movslq (%rbx,%rcx,4), %rax
addq %rbx, %rax
jmpq *%rax
orl $0x1, %ebp
movq 0x146ae(%rip), %rax     # 0x17fc0
movq (%rax), %rdi
callq 0x1200
movq %rax, (%rsp)
jmp 0x38d5
cmpl $0x70, (%r13)
jne 0x38d5
jmp 0x39b6
cmpl $0x63, %eax
je 0x3951
cmpl $0x64, %eax
jne 0x38d5
orl $0x40, %ebp
jmp 0x38d5
cmpl $-0x1, %eax
jne 0x38d5
jmp 0x3959
orl $0x4, %ebp
jmp 0x38d5
orl $0x2, %ebp
jmp 0x38d5
orl $0x20, %ebp
jmp 0x38d5
orl $0x8, %ebp
jmp 0x38d5
movq (%rsp), %rbx
testq %rbx, %rbx
jne 0x396a
callq 0x3a27
movq %rax, %rbx
testb $0x2e, %bpl
je 0x397a
movq %rbx, %rdi
movl %ebp, %esi
callq 0x3b88
testb $0x50, %bpl
je 0x399d
movq %rbx, %rdi
callq 0x3c80
movq %rax, %r14
movq %rax, %rdi
movl %ebp, %esi
callq 0x3dee
movq %r14, %rdi
callq 0x1230
movq %rbx, %rdi
callq 0x1230
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x39c5
movl $0x1, %edi
callq 0x11e0
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: usage
static void usage(void)
{
    printf("Usage fflz4:\n");
    printf("-u\tSession urls\n");
    printf("-t\tSession titles\n");
    printf("-c\tActive title & url. Can be limited with -u or -t\n");
    printf("-b\tBookmarks title & url saved in toolbar. Can be limited with -u or -t\n");
    printf("-s\tRaw session json\n");
    printf("-d\tRaw bookmarks json\n");
    printf("-p\t(Optional) Provide path to firefox profile. Default: /home/<user>/.mozilla/firefox/<xxxxxx.default>/\n");
}

// Assembly:
pushq %rax
leaq 0x1085c(%rip), %rdi     # 0x14229
callq 0x1050
leaq 0x1085d(%rip), %rdi     # 0x14236
callq 0x1050
leaq 0x10861(%rip), %rdi     # 0x14246
callq 0x1050
leaq 0x10867(%rip), %rdi     # 0x14258
callq 0x1050
leaq 0x1088f(%rip), %rdi     # 0x1428c
callq 0x1050
leaq 0x108cb(%rip), %rdi     # 0x142d4
callq 0x1050
leaq 0x108d3(%rip), %rdi     # 0x142e8
callq 0x1050
leaq 0x108dd(%rip), %rdi     # 0x142fe
popq %rax
jmp 0x1050
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: get_firefox_profile
char *get_firefox_profile(void)
{
    char *home = NULL, *source = NULL, *result_path = NULL;
    char path[4096] = {0}, profile[256] = {0};
    size_t SIZE = 0;
    int len = 0;

    home = getenv("HOME");
    if (!home) FAILED(0, "Get $HOME failed\n");

    sprintf(path, "%s/.mozilla/firefox/profiles.ini", home);
    source = get_file_content(path, "r", 0, &SIZE);

    /* get firefox profile */
    for (const char *tok = strtok(source, "\n"); tok && *tok; tok = strtok(NULL, "\n")) {
        if (strstr(tok, "Path")) {
            char *r = strstr(tok, "=");
            size_t pos = r-tok+1, len = strlen(tok);
            size_t j = 0;
            for (size_t i = pos; i < len; ++i) {
                profile[j++] = tok[i];
            }
            profile[j] = '\0';
            break;
        }
    }

    if (strlen(profile))
        len = asprintf(&result_path, "%s/.mozilla/firefox/%s/", home, profile);

    if (!len) FAILED(0, "Get profile path failed\n");

    free(source);
    return result_path;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1110, %rsp           # imm = 0x1110
xorl %ebx, %ebx
movq %rbx, (%rsp)
leaq 0x110(%rsp), %rdi
movl $0x1000, %edx           # imm = 0x1000
xorl %esi, %esi
callq 0x10c0
leaq 0x10(%rsp), %rdi
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x10c0
movq %rbx, 0x8(%rsp)
leaq 0x10605(%rip), %rdi     # 0x14073
callq 0x1030
testq %rax, %rax
je 0x3b83
movq %rax, %rbx
leaq 0x10604(%rip), %rsi     # 0x1408a
leaq 0x110(%rsp), %r14
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x11d0
leaq 0x1072a(%rip), %rsi     # 0x141cc
leaq 0x8(%rsp), %rcx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3fc9
movq %rax, %r14
leaq 0x106ee(%rip), %rsi     # 0x141a9
movq %rax, %rdi
callq 0x11b0
testq %rax, %rax
je 0x3b3d
movq %rax, %r15
leaq 0x105d9(%rip), %r12     # 0x140ab
leaq 0x106d0(%rip), %r13     # 0x141a9
cmpb $0x0, (%r15)
je 0x3b3d
movq %r15, %rdi
movq %r12, %rsi
callq 0x1210
testq %rax, %rax
jne 0x3b03
xorl %edi, %edi
movq %r13, %rsi
callq 0x11b0
movq %rax, %r15
testq %rax, %rax
jne 0x3ad9
jmp 0x3b3d
movq %r15, %rdi
movl $0x3d, %esi
callq 0x10b0
movq %rax, %r12
subq %r15, %r12
movq %r15, %rdi
callq 0x10a0
incq %r12
xorl %ecx, %ecx
cmpq %rax, %r12
jae 0x3b38
movb (%r15,%r12), %dl
movb %dl, 0x10(%rsp,%rcx)
incq %rcx
incq %r12
jmp 0x3b23
movb $0x0, 0x10(%rsp,%rcx)
cmpb $0x0, 0x10(%rsp)
je 0x3b7e
leaq 0x10565(%rip), %rsi     # 0x140b0
movq %rsp, %rdi
leaq 0x10(%rsp), %rcx
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
je 0x3b7e
movq %r14, %rdi
callq 0x1230
movq (%rsp), %rax
addq $0x1110, %rsp           # imm = 0x1110
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x1250
callq 0x1275
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: get_tabs
void get_tabs(const char *path, const unsigned int flag)
{
    cJSON *json = NULL;
    char *buf = NULL, *result = NULL;
    int len = 0;

    len = path[strlen(path)-1] == '/' ? asprintf(&buf, "%s%s/%s", path, SESSION, TABS) : asprintf(&buf, "%s/%s/%s", path, SESSION, TABS);
    if (!len) FAILED(0, "Not enough memory\n");

    result = extract_jsonlz4(buf);
    if (!result) FAILED(0, "Failed to read jsonlz4 at: %s\n", buf);

    json = cJSON_Parse(result);
    if (!json) goto cleanup;

    if (flag & FLAG_S) {
        char *js = cJSON_Print(json);
        fprintf(stdout, "%s\n", js);
        free(js);
        goto cleanup;
    }

    const cJSON *windows = cJSON_GetObjectItemCaseSensitive(json, "windows");
    if (!cJSON_IsArray(windows)) goto cleanup;

    print_tabs(windows, flag);

cleanup:
    if (json) cJSON_Delete(json);
    free(buf);
    free(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movq $0x0, (%r14)
callq 0x10a0
cmpb $0x2f, -0x1(%rbx,%rax)
leaq 0x105b1(%rip), %rax     # 0x14160
leaq 0x105b2(%rip), %rsi     # 0x14168
cmoveq %rax, %rsi
leaq 0x10642(%rip), %rcx     # 0x14203
leaq 0x10650(%rip), %r8      # 0x14218
movq %r14, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
je 0x3c7b
movq (%rsp), %rdi
callq 0x3f3f
movq %rax, %rbx
movq %rax, %rdi
callq 0x10c47
testq %rax, %rax
je 0x3c5f
movq %rax, %r14
testb $0x20, %bpl
jne 0x3c29
leaq 0x1056b(%rip), %rsi     # 0x14171
movq %r14, %rdi
callq 0x11458
movq %rax, %r15
movq %rax, %rdi
callq 0x126e9
testl %eax, %eax
je 0x3c57
movq %r15, %rdi
movl %ebp, %esi
callq 0x406b
jmp 0x3c57
movq %r14, %rdi
callq 0x10c50
movq %rax, %r15
movq 0x1437d(%rip), %rax     # 0x17fb8
movq (%rax), %rdi
leaq 0x10569(%rip), %rsi     # 0x141ae
movq %r15, %rdx
xorl %eax, %eax
callq 0x1100
movq %r15, %rdi
callq 0x1230
movq %r14, %rdi
callq 0x10622
movq (%rsp), %rdi
callq 0x1230
movq %rbx, %rdi
callq 0x1230
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x129a
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: get_bookmark_file
char *get_bookmark_file(const char *path)
{
    char *buf = NULL, *result = NULL, *p = NULL;
    int len = 0;
    char filep[4096] = {0};
    time_t t1 = 0, t2 = -1;
    struct dirent *entry;
    DIR *dp;

    len = path[strlen(path)-1] == '/'? asprintf(&buf, "%s%s/", path, BOOKMARK) : asprintf(&buf, "%s/%s/", path, BOOKMARK);
    if (!len) FAILED(0, "Not enough memory\n");

    dp = opendir(buf);
    if (!dp) FAILED(0, "Open directory failed at: %s\n", buf);

    while ((entry = readdir(dp))) {
        if (strstr(entry->d_name, "bookmarks")) {
            sprintf(filep, "%s%s", buf, entry->d_name);
            t1 = get_last_modified(filep);
            if (t2 == -1) {
                t2 = t1;
                p = filep;
            }
            else if (t1 > t2) {
                t2 = t1;
                p = filep;
            }
        }
    }

    result = strdup(p);
    if (!result) FAILED(0, "Get bookmark file failed\n");

    closedir(dp);
    free(buf);
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10a8, %rsp           # imm = 0x10A8
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq $0x0, (%r15)
leaq 0xa0(%rsp), %rbx
movl $0x1000, %edx           # imm = 0x1000
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10c0
movq %r14, %rdi
callq 0x10a0
cmpb $0x2f, -0x1(%r14,%rax)
leaq 0x10415(%rip), %rax     # 0x140e1
leaq 0x10414(%rip), %rsi     # 0x140e7
cmoveq %rax, %rsi
leaq 0x10515(%rip), %rcx     # 0x141f3
movq %r15, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
je 0x3dda
movq 0x8(%rsp), %rdi
callq 0x1090
testq %rax, %rax
je 0x3ddf
movq %rax, %r14
movq %rax, %rdi
callq 0x1150
testq %rax, %rax
je 0x3da0
movq %rax, %r13
movq $-0x1, %rbp
leaq 0x103e1(%rip), %r12     # 0x1410c
xorl %r15d, %r15d
addq $0x13, %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x1210
testq %rax, %rax
je 0x3d8e
movq 0x8(%rsp), %rdx
movq %rbx, %rdi
leaq 0x103c5(%rip), %rsi     # 0x14116
movq %r13, %rcx
xorl %eax, %eax
callq 0x11d0
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1120
testl %eax, %eax
jne 0x3d73
movq 0x68(%rsp), %rax
jmp 0x3d75
xorl %eax, %eax
cmpq $-0x1, %rbp
je 0x3d88
cmpq %rbp, %rax
cmovgq %rax, %rbp
cmovgq %rbx, %r15
jmp 0x3d8e
movq %rax, %rbp
movq %rbx, %r15
movq %r14, %rdi
callq 0x1150
movq %rax, %r13
testq %rax, %rax
jne 0x3d2e
jmp 0x3da3
xorl %r15d, %r15d
movq %r15, %rdi
callq 0x1200
testq %rax, %rax
je 0x3de9
movq %rax, %rbx
movq %r14, %rdi
callq 0x10d0
movq 0x8(%rsp), %rdi
callq 0x1230
movq %rbx, %rax
addq $0x10a8, %rsp           # imm = 0x10A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x130b
leaq 0x8(%rsp), %rdi
callq 0x12e4
callq 0x12bf
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: get_bookmarks
void get_bookmarks(const char *path, const unsigned int flag)
{
    cJSON *json = NULL;
    char *result = NULL;

    result = extract_jsonlz4(path);
    if (!result) FAILED(0, "Failed to read jsonlz4 at: %s\n", path);

    json = cJSON_Parse(result);
    if (!json) goto cleanup;

    if (flag & FLAG_D) {
        char *js = cJSON_Print(json);
        fprintf(stdout, "%s\n", js);
        free(js);
        goto cleanup;
    }

    const cJSON *children = cJSON_GetObjectItemCaseSensitive(json, "children");
    if (!cJSON_IsArray(children)) goto cleanup;

    const cJSON *child = NULL;

    /* get bookmarks toolbar */
    cJSON_ArrayForEach(child, children) {
        const cJSON *root = cJSON_GetObjectItemCaseSensitive(child, "root");
        if (cJSON_IsString(root)) {
            if (!strcmp(root->valuestring, "toolbarFolder")) {
                children = cJSON_GetObjectItemCaseSensitive(child, "children");
                break;
            }
        }
    }

    if (cJSON_IsArray(children))
        print_bookmarks(child, children, flag);
    else
        FAILED(0, "Failed to get bookmarks toolbar\n");

cleanup:
    if (json) cJSON_Delete(json);
    free(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebp
callq 0x3f3f
movq %rax, %rbx
movq %rax, %rdi
callq 0x10c47
testq %rax, %rax
je 0x3efe
movq %rax, %r14
testb $0x40, %bpl
jne 0x3e51
leaq 0x1038e(%rip), %rsi     # 0x141b2
movq %r14, %rdi
callq 0x11458
movq %rax, %r15
movq %rax, %rdi
callq 0x126e9
testl %eax, %eax
je 0x3ef6
movl %ebp, 0x4(%rsp)
testq %r15, %r15
je 0x3e81
movq 0x10(%r15), %r12
jmp 0x3ed9
movq %r14, %rdi
callq 0x10c50
movq %rax, %r15
movq 0x14155(%rip), %rax     # 0x17fb8
movq (%rax), %rdi
leaq 0x10341(%rip), %rsi     # 0x141ae
movq %r15, %rdx
xorl %eax, %eax
callq 0x1100
movq %r15, %rdi
callq 0x1230
jmp 0x3ef6
xorl %r12d, %r12d
jmp 0x3ed9
movq %r12, %rdi
leaq 0x1032b(%rip), %rsi     # 0x141bb
callq 0x11458
movq %rax, %rbp
movq %rax, %rdi
callq 0x1056e
movb $0x1, %r13b
testl %eax, %eax
je 0x3ed0
movq 0x20(%rbp), %rdi
leaq 0x1030e(%rip), %rsi     # 0x141c0
callq 0x10f0
testl %eax, %eax
jne 0x3ed0
movq %r12, %rdi
leaq 0x102ed(%rip), %rsi     # 0x141b2
callq 0x11458
movq %rax, %r15
xorl %r13d, %r13d
testb %r13b, %r13b
je 0x3ede
movq (%r12), %r12
testq %r12, %r12
jne 0x3e86
movq %r15, %rdi
callq 0x126e9
testl %eax, %eax
je 0x3f14
movq %r15, %rsi
movl 0x4(%rsp), %edx
callq 0x43a4
movq %r14, %rdi
callq 0x10622
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1230
callq 0x1330
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: extract_jsonlz4
char *extract_jsonlz4(const char *path)
{
    size_t SIZE = 0;
    unsigned int dst_size;
    const int hdr_size = sizeof(unsigned int);
    char *source = NULL, *result = NULL;

    /* read file */
    /* skip "mozLz40\0" header */
    source = get_file_content(path, "rb", 8, &SIZE);

    memcpy(&dst_size, source, 4);
    if (dst_size > INT_MAX) FAILED(0, "Invalid size in header: 0x%x\n", dst_size);

    result = calloc(dst_size+1, sizeof(char));
    if (!result) FAILED(0, "Not enough memory\n");

    int osize = LZ4_decompress_safe(source + hdr_size, result, SIZE - hdr_size, dst_size);
    if (osize < 0) FAILED(0, "Corrupt input at byte %d\n", -osize);

    free(source);
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rcx
movq $0x0, (%rcx)
leaq 0x100ca(%rip), %rsi     # 0x14025
movl $0x8, %edx
callq 0x3fc9
movl (%rax), %r14d
testl %r14d, %r14d
js 0x3fb5
movq %rax, %rbx
leaq 0x1(%r14), %rdi
movl $0x1, %esi
callq 0x10e0
testq %rax, %rax
je 0x3fbd
movq %rax, %r15
leaq 0x4(%rbx), %rdi
movl 0x8(%rsp), %edx
addl $-0x4, %edx
movq %rax, %rsi
movl %r14d, %ecx
callq 0x1430
testl %eax, %eax
js 0x3fc2
movq %rbx, %rdi
callq 0x1230
movq %r15, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movl %r14d, %edi
callq 0x139f
callq 0x137a
movl %eax, %edi
callq 0x1355
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: get_file_content
char *get_file_content(const char *path, const char *rw, const size_t offset, size_t *size)
{
    FILE *fptr;
    size_t SIZE = 0, sz = 0;
    char *result = NULL;

    fptr = fopen(path, rw);
    if (!fptr) FAILED(0, "File not found at: %s", path);

    fseek(fptr, 0, SEEK_END);
    SIZE = ftell(fptr);
    fseek(fptr, offset, SEEK_SET);
    SIZE -= offset;

    result = calloc(SIZE+1, sizeof(char));
    if (!result) FAILED(0, "Not enough memory\n");

    sz = fread(result, 1, SIZE, fptr);
    if (sz != SIZE) FAILED(0, "File reading failed\n");

    fclose(fptr);

    *size = SIZE;
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r12
movq %rdi, %r15
callq 0x11a0
testq %rax, %rax
je 0x4059
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x1170
movq %r14, %rdi
callq 0x1110
movq %rax, %r15
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x1170
subq %r12, %r15
leaq 0x1(%r15), %rdi
movl $0x1, %esi
callq 0x10e0
testq %rax, %rax
je 0x4061
movq %rax, %r12
movl $0x1, %esi
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1060
cmpq %r15, %rax
jne 0x4066
movq %r14, %rdi
callq 0x1080
movq %r15, (%rbx)
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %r15, %rdi
callq 0x140c
callq 0x13e7
callq 0x13c2
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/fflz4.c
// Function: print_bookmarks
void print_bookmarks(const cJSON *child, const cJSON *children, const unsigned int flag)
{
    cJSON_ArrayForEach(child, children) {
        const cJSON *url = cJSON_GetObjectItemCaseSensitive(child, "uri");
        const cJSON *deep = cJSON_GetObjectItemCaseSensitive(child, "children");

        if (cJSON_IsString(url)) {
            const cJSON *title = cJSON_GetObjectItemCaseSensitive(child, "title");

            if (((flag & (FLAG_T | FLAG_U)) == 0) && cJSON_IsString(title))
                fprintf(stdout, "%s\n%s\n\n", title->valuestring, url->valuestring);
            if (flag & FLAG_U)
                fprintf(stdout, "%s\n", url->valuestring);
            if ((flag & FLAG_T) && cJSON_IsString(title))
                fprintf(stdout, "%s\n", title->valuestring);
        }
        else if (cJSON_IsArray(deep)) {
            print_bookmarks(child, deep, flag);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
testq %rsi, %rsi
je 0x43bc
movq 0x10(%rsi), %r14
jmp 0x43bf
xorl %r14d, %r14d
testq %r14, %r14
je 0x44b7
leaq 0xfe20(%rip), %r15      # 0x141ef
leaq 0xfddc(%rip), %r12      # 0x141b2
movq %r14, %rdi
movq %r15, %rsi
callq 0x11458
movq %rax, %r13
movq %r14, %rdi
movq %r12, %rsi
callq 0x11458
movq %rax, %rbp
movq %r13, %rdi
callq 0x1056e
testl %eax, %eax
je 0x4495
movq %r14, %rdi
leaq 0xfd8d(%rip), %rsi      # 0x14199
callq 0x11458
movq %rax, %rbp
testb $0x6, %bl
jne 0x4445
movq %rbp, %rdi
callq 0x1056e
testl %eax, %eax
je 0x4445
movq 0x13b8c(%rip), %rax     # 0x17fb8
movq (%rax), %rdi
movq 0x20(%rbp), %rdx
movq 0x20(%r13), %rcx
leaq 0xfd65(%rip), %rsi      # 0x141a3
xorl %eax, %eax
callq 0x1100
testb $0x2, %bl
je 0x4466
movq 0x13b67(%rip), %rax     # 0x17fb8
movq (%rax), %rdi
movq 0x20(%r13), %rdx
leaq 0xfd4f(%rip), %rsi      # 0x141ae
xorl %eax, %eax
callq 0x1100
testb $0x4, %bl
je 0x44ab
movq %rbp, %rdi
callq 0x1056e
testl %eax, %eax
je 0x44ab
movq 0x13b3a(%rip), %rax     # 0x17fb8
movq (%rax), %rdi
movq 0x20(%rbp), %rdx
leaq 0xfd22(%rip), %rsi      # 0x141ae
xorl %eax, %eax
callq 0x1100
jmp 0x44ab
movq %rbp, %rdi
callq 0x126e9
testl %eax, %eax
je 0x44ab
movq %rbp, %rsi
movl %ebx, %edx
callq 0x43a4
movq (%r14), %r14
testq %r14, %r14
jne 0x43d6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_createStream
LZ4_stream_t* LZ4_createStream(void)
{
    LZ4_stream_t* const lz4s = (LZ4_stream_t*)ALLOC(sizeof(LZ4_stream_t));
    LZ4_STATIC_ASSERT(LZ4_STREAMSIZE >= sizeof(LZ4_stream_t_internal));    /* A compilation error here means LZ4_STREAMSIZE is not large enough */
    DEBUGLOG(4, "LZ4_createStream %p", lz4s);
    if (lz4s == NULL) return NULL;
    LZ4_initStream(lz4s, sizeof(*lz4s));
    return lz4s;
}

// Assembly:
pushq %rax
movl $0x4020, %edi           # imm = 0x4020
callq 0x1238
testq %rax, %rax
je 0x9f8a
testb $0x7, %al
jne 0x9f8c
movl $0x4020, %edx           # imm = 0x4020
movq %rax, %rdi
xorl %esi, %esi
popq %rax
jmp 0x10c0
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_loadDict
int LZ4_loadDict (LZ4_stream_t* LZ4_dict, const char* dictionary, int dictSize)
{
    LZ4_stream_t_internal* dict = &LZ4_dict->internal_donotuse;
    const tableType_t tableType = byU32;
    const BYTE* p = (const BYTE*)dictionary;
    const BYTE* const dictEnd = p + dictSize;
    const BYTE* base;

    DEBUGLOG(4, "LZ4_loadDict (%i bytes from %p into %p)", dictSize, dictionary, LZ4_dict);

    /* It's necessary to reset the context,
     * and not just continue it with prepareTable()
     * to avoid any risk of generating overflowing matchIndex
     * when compressing using this dictionary */
    LZ4_resetStream(LZ4_dict);

    /* We always increment the offset by 64 KB, since, if the dict is longer,
     * we truncate it to the last 64k, and if it's shorter, we still want to
     * advance by a whole window length so we can provide the guarantee that
     * there are only valid offsets in the window, which allows an optimization
     * in LZ4_compress_fast_continue() where it uses noDictIssue even when the
     * dictionary isn't a full 64k. */
    dict->currentOffset += 64 KB;

    if (dictSize < (int)HASH_UNIT) {
        return 0;
    }

    if ((dictEnd - p) > 64 KB) p = dictEnd - 64 KB;
    base = dictEnd - dict->currentOffset;
    dict->dictionary = p;
    dict->dictSize = (U32)(dictEnd - p);
    dict->tableType = tableType;

    while (p <= dictEnd-HASH_UNIT) {
        LZ4_putPosition(p, dict->hashTable, tableType, base);
        p+=3;
    }

    return (int)dict->dictSize;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
xorl %ebx, %ebx
movl $0x4020, %edx           # imm = 0x4020
xorl %esi, %esi
callq 0x10c0
movl 0x4000(%r14), %eax
leal 0x10000(%rax), %ecx
movl %ecx, 0x4000(%r14)
cmpl $0x8, %ebp
jl 0xa0ce
movl %ebp, %edx
leaq (%r15,%rdx), %rbx
cmpl $0x10001, %ebp          # imm = 0x10001
leaq -0x10000(%r15,%rdx), %rcx
cmovlq %r15, %rcx
movq %rcx, 0x4008(%r14)
subl %ecx, %ebx
movl %ebx, 0x4018(%r14)
movw $0x2, 0x4006(%r14)
addq %r15, %rdx
addq $-0x8, %rdx
cmpq %rdx, %rcx
ja 0xa0ce
addl %ecx, %eax
subl %ebp, %eax
subl %r15d, %eax
addl $0x10000, %eax          # imm = 0x10000
movabsq $-0x30e4432345000000, %rsi # imm = 0xCF1BBCDCBB000000
movq (%rcx), %rdi
imulq %rsi, %rdi
shrq $0x34, %rdi
movl %eax, (%r14,%rdi,4)
addq $0x3, %rcx
addl $0x3, %eax
cmpq %rdx, %rcx
jbe 0xa0b3
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_renormDictT
static void LZ4_renormDictT(LZ4_stream_t_internal* LZ4_dict, int nextSize)
{
    assert(nextSize >= 0);
    if (LZ4_dict->currentOffset + (unsigned)nextSize > 0x80000000) {   /* potential ptrdiff_t overflow (32-bits mode) */
        /* rescale hash table */
        U32 const delta = LZ4_dict->currentOffset - 64 KB;
        const BYTE* dictEnd = LZ4_dict->dictionary + LZ4_dict->dictSize;
        int i;
        DEBUGLOG(4, "LZ4_renormDictT");
        for (i=0; i<LZ4_HASH_SIZE_U32; i++) {
            if (LZ4_dict->hashTable[i] < delta) LZ4_dict->hashTable[i]=0;
            else LZ4_dict->hashTable[i] -= delta;
        }
        LZ4_dict->currentOffset = 64 KB;
        if (LZ4_dict->dictSize > 64 KB) LZ4_dict->dictSize = 64 KB;
        LZ4_dict->dictionary = dictEnd - LZ4_dict->dictSize;
    }
}

// Assembly:
movl 0x4000(%rdi), %edx
addl %edx, %esi
cmpl $0x80000001, %esi       # imm = 0x80000001
jb 0xd7d3
movq 0x4008(%rdi), %rax
movl 0x4018(%rdi), %ecx
addl $0xffff0000, %edx       # imm = 0xFFFF0000
movd %edx, %xmm0
pshufd $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
xorl %edx, %edx
movdqa 0x6c03(%rip), %xmm1     # 0x14370
movdqa %xmm0, %xmm2
pxor %xmm1, %xmm2
movdqu (%rdi,%rdx,4), %xmm3
movdqa %xmm3, %xmm4
pxor %xmm1, %xmm4
pcmpgtd %xmm2, %xmm4
psubd %xmm0, %xmm3
pand %xmm4, %xmm3
movdqu %xmm3, (%rdi,%rdx,4)
addq $0x4, %rdx
cmpq $0x1000, %rdx           # imm = 0x1000
jne 0xd775
addq %rcx, %rax
movl $0x10000, 0x4000(%rdi)  # imm = 0x10000
cmpl $0x10001, 0x4018(%rdi)  # imm = 0x10001
jb 0xd7c3
movl $0x10000, 0x4018(%rdi)  # imm = 0x10000
movl 0x4018(%rdi), %ecx
subq %rcx, %rax
movq %rax, 0x4008(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_saveDict
int LZ4_saveDict (LZ4_stream_t* LZ4_dict, char* safeBuffer, int dictSize)
{
    LZ4_stream_t_internal* const dict = &LZ4_dict->internal_donotuse;
    const BYTE* const previousDictEnd = dict->dictionary + dict->dictSize;

    if ((U32)dictSize > 64 KB) { dictSize = 64 KB; } /* useless to define a dictionary > 64 KB */
    if ((U32)dictSize > dict->dictSize) { dictSize = (int)dict->dictSize; }

    memmove(safeBuffer, previousDictEnd - dictSize, dictSize);

    dict->dictionary = (const BYTE*)safeBuffer;
    dict->dictSize = (U32)dictSize;

    return dictSize;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x4018(%rdi), %eax
cmpl %eax, %edx
cmovael %eax, %edx
movl $0x10000, %r14d         # imm = 0x10000
cmpl %r14d, %edx
cmovbl %edx, %r14d
movq %rsi, %r15
addq 0x4008(%rdi), %rax
subq %r14, %rax
movq %rsi, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1190
movq %r15, 0x4008(%rbx)
movl %r14d, 0x4018(%rbx)
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_setStreamDecode
int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize)
{
    LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse;
    lz4sd->prefixSize = (size_t) dictSize;
    lz4sd->prefixEnd = (const BYTE*) dictionary + dictSize;
    lz4sd->externalDict = NULL;
    lz4sd->extDictSize  = 0;
    return 1;
}

// Assembly:
movslq %edx, %rax
movq %rax, 0x18(%rdi)
addq %rax, %rsi
movq %rsi, 0x10(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movl $0x1, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Aethlas[P]fflz4/./lib/lz4/lz4.c
// Function: LZ4_memcpy_using_offset
LZ4_FORCE_O2_INLINE_GCC_PPC64LE void
LZ4_memcpy_using_offset(BYTE* dstPtr, const BYTE* srcPtr, BYTE* dstEnd, const size_t offset)
{
    BYTE v[8];

    assert(dstEnd >= dstPtr + MINMATCH);
    LZ4_write32(dstPtr, 0);   /* silence an msan warning when offset==0 */

    switch(offset) {
    case 1:
        memset(v, *srcPtr, 8);
        break;
    case 2:
        memcpy(v, srcPtr, 2);
        memcpy(&v[2], srcPtr, 2);
        memcpy(&v[4], &v[0], 4);
        break;
    case 4:
        memcpy(v, srcPtr, 4);
        memcpy(&v[4], srcPtr, 4);
        break;
    default:
        LZ4_memcpy_using_offset_base(dstPtr, srcPtr, dstEnd, offset);
        return;
    }

    memcpy(dstPtr, v, 8);
    dstPtr += 8;
    while (dstPtr < dstEnd) {
        memcpy(dstPtr, v, 8);
        dstPtr += 8;
    }
}

// Assembly:
movl $0x0, (%rdi)
cmpq $0x4, %rcx
je 0x104d3
cmpq $0x2, %rcx
je 0x104c7
cmpq $0x1, %rcx
jne 0x104e5
movzbl (%rsi), %eax
imull $0x1010101, %eax, %eax  # imm = 0x1010101
jmp 0x104d5
movzwl (%rsi), %ecx
movl %ecx, %eax
shll $0x10, %eax
orl %ecx, %eax
jmp 0x104d5
movl (%rsi), %eax
movl %eax, (%rdi)
movl %eax, 0x4(%rdi)
addq $0x8, %rdi
cmpq %rdx, %rdi
jb 0x104d5
jmp 0x1054b
cmpq $0x7, %rcx
ja 0x10527
movb (%rsi), %al
movb %al, (%rdi)
movb 0x1(%rsi), %al
movb %al, 0x1(%rdi)
movb 0x2(%rsi), %al
movb %al, 0x2(%rdi)
movb 0x3(%rsi), %al
movb %al, 0x3(%rdi)
leaq 0x3e88(%rip), %rax      # 0x14390
movl (%rax,%rcx,4), %r8d
leaq (%rsi,%r8), %rax
movl (%rsi,%r8), %esi
movl %esi, 0x4(%rdi)
leaq 0x3e92(%rip), %rsi      # 0x143b0
movslq (%rsi,%rcx,4), %rcx
subq %rcx, %rax
jmp 0x10534
movq (%rsi), %rax
movq %rax, (%rdi)
addq $0x8, %rsi
movq %rsi, %rax
addq $0x8, %rdi
movq (%rax), %rcx
movq %rcx, (%rdi)
addq $0x8, %rdi
addq $0x8, %rax
cmpq %rdx, %rdi
jb 0x10538
retq
// File: /workspace/github_c_makefile_star2_O1/ender672[P]liboil/oil_libjpeg.c
// Function: oil_libjpeg_init
int oil_libjpeg_init(struct oil_libjpeg *ol,
	struct jpeg_decompress_struct *dinfo, int out_width, int out_height)
{
	int ret;
	enum oil_colorspace cs;

	ol->dinfo = dinfo;

	cs = jpeg_cs_to_oil(dinfo->out_color_space);
	if (cs == OIL_CS_UNKNOWN) {
		return -1;
	}

	ol->inbuf = malloc(dinfo->output_width * dinfo->output_components);
	if (!ol->inbuf) {
		return -2;
	}

	ret = oil_scale_init(&ol->os, dinfo->output_height, out_height,
		dinfo->output_width, out_width, cs);
	if (ret!=0) {
		free(ol->inbuf);
		return ret;
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, 0x58(%rdi)
movl 0x40(%rsi), %ecx
xorl %r12d, %r12d
leal -0x1(%rcx), %eax
cmpl $0x8, %eax
ja 0x455c
leaq 0xbb5(%rip), %rdx       # 0x5100
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl $0x4, %r12d
jmp 0x4575
movb $0x1, %al
jmp 0x4577
movl $0x204, %r12d           # imm = 0x204
jmp 0x4575
xorl %eax, %eax
movl %ecx, %r12d
jmp 0x4577
movl $0x3, %r12d
xorl %eax, %eax
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
testb %al, %al
jne 0x45d9
movl 0x88(%r15), %r13d
movl 0x94(%r15), %edi
imull %r13d, %edi
callq 0x20e0
movq %rax, 0x60(%rbx)
testq %rax, %rax
je 0x45ce
movl 0x8c(%r15), %esi
movq %rbx, %rdi
movl %r14d, %edx
movl %r13d, %ecx
movl %ebp, %r8d
movl %r12d, %r9d
callq 0x27ac
testl %eax, %eax
je 0x45d6
movl %eax, %r13d
movq 0x60(%rbx), %rdi
callq 0x21b0
jmp 0x45d9
movl $0xfffffffe, %r13d      # imm = 0xFFFFFFFE
jmp 0x45d9
xorl %r13d, %r13d
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/ender672[P]liboil/oil_libjpeg.c
// Function: oil_libjpeg_read_scanline
void oil_libjpeg_read_scanline(struct oil_libjpeg *ol, unsigned char *outbuf)
{
	while (oil_scale_slots(&ol->os)) {
		jpeg_read_scanlines(ol->dinfo, &ol->inbuf, 1);
		oil_scale_in(&ol->os, ol->inbuf);
	}
	oil_scale_out(&ol->os, outbuf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
callq 0x2db0
testl %eax, %eax
je 0x465d
leaq 0x60(%r14), %r15
movq 0x58(%r14), %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x2290
movq 0x60(%r14), %rsi
movq %r14, %rdi
callq 0x2de2
movq %r14, %rdi
callq 0x2db0
testl %eax, %eax
jne 0x4634
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x39bc
// File: /workspace/github_c_makefile_star2_O1/ender672[P]liboil/oil_libpng.c
// Function: oil_libpng_free
void oil_libpng_free(struct oil_libpng *ol)
{
	if (ol->inbuf) {
		free(ol->inbuf);
	}
	if (ol->inimage) {
		free_full_image_buf(ol->inimage, ol->os.in_height);
	}
	oil_scale_free(&ol->os);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x70(%rdi), %rdi
testq %rdi, %rdi
je 0x488f
callq 0x21b0
movq 0x78(%rbx), %r14
testq %r14, %r14
je 0x48bc
movslq (%rbx), %r15
testq %r15, %r15
jle 0x48b4
xorl %r12d, %r12d
movq (%r14,%r12,8), %rdi
callq 0x21b0
incq %r12
cmpq %r12, %r15
jne 0x48a3
movq %r14, %rdi
callq 0x21b0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2a65
// File: /workspace/github_c_makefile_star2_O1/ender672[P]liboil/oil_libpng.c
// Function: oil_libpng_read_scanline
void oil_libpng_read_scanline(struct oil_libpng *ol, unsigned char *outbuf)
{
	switch (png_get_interlace_type(ol->rpng, ol->rinfo)) {
	case PNG_INTERLACE_NONE:
		read_scanline(ol);
		break;
	case PNG_INTERLACE_ADAM7:
		read_scanline_interlaced(ol);
		break;
	}
	oil_scale_out(&ol->os, outbuf);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %rdi
movq 0x60(%r14), %rsi
callq 0x2200
cmpb $0x1, %al
je 0x4937
movzbl %al, %eax
testl %eax, %eax
je 0x490e
jmp 0x4943
movq 0x58(%r14), %rdi
movq 0x70(%r14), %rsi
xorl %edx, %edx
callq 0x2060
movq 0x70(%r14), %rsi
movq %r14, %rdi
callq 0x2de2
movq %r14, %rdi
callq 0x2db0
testl %eax, %eax
jne 0x48f3
jmp 0x4943
movq 0x78(%r14), %rax
movslq 0x68(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x68(%r14)
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x2de2
movq %r14, %rdi
callq 0x2db0
testl %eax, %eax
jne 0x491c
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x39bc
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/MersenneTwister-Lab[P]MTGP/mtgp64-ref.c
// Function: mtgp64_init
int mtgp64_init(mtgp64_ref_t *mtgp64,
		const mtgp64_params_ref_t *para, uint64_t seed) {
    int i;
    int size = para->mexp / 64 + 1;
    uint64_t hidden_seed;
    uint64_t tmp;
    mtgp64_status_ref_t *st;

    st = (mtgp64_status_ref_t *)malloc(sizeof(mtgp64_status_ref_t)
				     + sizeof(uint64_t) * size);
    if (st == NULL) {
	return -1;
    }
    hidden_seed = para->tbl[2] ^ (para->tbl[3] << 16);
    tmp = hidden_seed >> 32;
    tmp += tmp >> 16;
    tmp += tmp >> 8;
    memset(st->array, tmp & 0xff, sizeof(uint64_t) * size);
    mtgp64->params = *para;
    mtgp64->status = st;
    st->size = size;
    st->idx = size - 1;
    st->array[0] = seed;
    st->array[1] = hidden_seed;
    for (i = 1; i < size; i++) {
	st->array[i] ^= UINT64_C(6364136223846793005)
	    * (st->array[i - 1]
	       ^ (st->array[i - 1] >> 62)) + i;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r15
movl (%rsi), %ebp
leal 0x3f(%rbp), %eax
testl %ebp, %ebp
cmovnsl %ebp, %eax
movq %rdi, %r13
sarl $0x6, %eax
movslq %eax, %r14
leaq 0x10(,%r14,8), %rdi
callq 0x10d0
testq %rax, %rax
je 0x12d1
movq %rax, %rbx
movq %r13, 0x8(%rsp)
leal 0x1(%r14), %r13d
leaq 0x8(,%r14,8), %rdx
movq %r12, 0x10(%rsp)
movq 0x28(%r15), %r12
shlq $0x10, %r12
xorq 0x20(%r15), %r12
movq %r12, %rax
shrq $0x20, %rax
movq %r12, %rcx
shrq $0x30, %rcx
addq %rax, %rcx
movq %rcx, %rsi
shrq $0x8, %rsi
addl %ecx, %esi
movq %rbx, %rdi
addq $0x8, %rdi
callq 0x1090
movl $0xe, %ecx
movq 0x8(%rsp), %rax
movq %rax, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, 0x70(%rax)
movl %r13d, (%rbx)
movl %r14d, 0x4(%rbx)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rbx)
movq %r12, 0x10(%rbx)
xorl %eax, %eax
cmpl $0x40, %ebp
jl 0x12d6
movq 0x8(%rbx), %rdi
movl $0x1, %ecx
movabsq $0x5851f42d4c957f2d, %rdx # imm = 0x5851F42D4C957F2D
movq %rdi, %rsi
shrq $0x3e, %rsi
xorq %rdi, %rsi
imulq %rdx, %rsi
addq %rcx, %rsi
xorq 0x8(%rbx,%rcx,8), %rsi
movq %rsi, 0x8(%rbx,%rcx,8)
incq %rcx
movq %rsi, %rdi
cmpq %rcx, %r13
jne 0x12ac
jmp 0x12d6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MersenneTwister-Lab[P]MTGP/mtgp64-ref.c
// Function: mtgp64_print_idstring
void mtgp64_print_idstring(const mtgp64_ref_t *mtgp64, FILE *fp) {
    int i;
    fprintf(fp, "mtgp64:%d:", mtgp64->params.mexp);
    for (i = 0; i < 20; i++) {
	fprintf(fp, "%02x", (unsigned int)mtgp64->params.poly_sha1[i]);
    }
    fprintf(fp, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %edx
leaq 0x16a5(%rip), %rsi      # 0x3018
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
leaq 0x169f(%rip), %r15      # 0x3023
xorl %r12d, %r12d
movzbl 0x58(%r14,%r12), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
incq %r12
cmpq $0x14, %r12
jne 0x1987
movl $0xa, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x10a0
// File: /workspace/github_c_makefile_star2_O1/MersenneTwister-Lab[P]MTGP/mtgp64-ref.c
// Function: mtgp64_genrand_uint64
static void next_state(mtgp64_ref_t *mtgp64) {
    uint64_t *array = mtgp64->status->array;
    int idx;
    int size = mtgp64->status->size;
    uint64_t x;
    uint64_t y;
    uint64_t r;
    uint32_t xh;
    uint32_t xl;
    uint32_t yh;
    uint32_t yl;

    mtgp64->status->idx += 1;
    if (mtgp64->status->idx >= size) {
	mtgp64->status->idx = 0;
    }
    idx = mtgp64->status->idx;
    x = (array[idx] & mtgp64->params.mask) ^ array[(idx + 1) % size];
    y = array[(idx + mtgp64->params.pos) % size];
    xh = (uint32_t)(x >> 32);
    xl = (uint32_t)(x & 0xffffffffU);
    yh = (uint32_t)(y >> 32);
    yl = (uint32_t)(y & 0xffffffffU);
    xh ^= xh << mtgp64->params.sh1;
    xl ^= xl << mtgp64->params.sh1;
    yh = xl ^ (yh >> mtgp64->params.sh2);
    yl = xh ^ (yl >> mtgp64->params.sh2);
    r = ((uint64_t)yh << 32) | yl;
    if (yl & 1) {
	r ^= mtgp64->params.tbl[0];
    }
    if (yl & 2) {
	r ^= mtgp64->params.tbl[1];
    }
    if (yl & 4) {
	r ^= mtgp64->params.tbl[2];
    }
    if (yl & 8) {
	r ^= mtgp64->params.tbl[3];
    }
    array[idx] = r;
}

// Assembly:
pushq %rbp
pushq %rbx
movq 0x70(%rdi), %rsi
movl (%rsi), %ecx
movl 0x4(%rsi), %eax
incl %eax
xorl %edx, %edx
cmpl %ecx, %eax
cmovll %eax, %edx
movl %edx, 0x4(%rsi)
movslq %edx, %r8
movq 0x50(%rdi), %r10
andq 0x8(%rsi,%r8,8), %r10
leal 0x1(%r8), %eax
cltd
idivl %ecx
movslq %edx, %rax
xorq 0x8(%rsi,%rax,8), %r10
movl 0x4(%rdi), %r9d
leal (%r9,%r8), %eax
cltd
idivl %ecx
movslq %edx, %rax
movq 0x8(%rsi,%rax,8), %rax
movq %r10, %rdx
shrq $0x20, %rdx
movb 0x8(%rdi), %cl
movl %edx, %r11d
shll %cl, %r11d
movq %rax, %rbx
shrq $0x20, %rbx
movl %r10d, %ebp
shll %cl, %ebp
movb 0xc(%rdi), %cl
shrl %cl, %ebx
xorl %ebp, %ebx
xorl %r10d, %ebx
shrl %cl, %eax
xorl %edx, %eax
xorl %r11d, %eax
shlq $0x20, %rbx
leaq (%rax,%rbx), %rcx
testb $0x1, %al
je 0x1a3d
xorq 0x10(%rdi), %rcx
testb $0x2, %al
je 0x1a45
xorq 0x18(%rdi), %rcx
testb $0x4, %al
je 0x1a4d
xorq 0x20(%rdi), %rcx
testb $0x8, %al
je 0x1a55
xorq 0x28(%rdi), %rcx
movq %rcx, 0x8(%rsi,%r8,8)
movq 0x70(%rdi), %rsi
movslq 0x4(%rsi), %rax
movq 0x8(%rsi,%rax,8), %rcx
addl %r9d, %eax
decl %eax
cltd
idivl (%rsi)
movslq %edx, %rax
movq 0x8(%rsi,%rax,8), %rax
movq %rax, %rdx
shrq $0x10, %rdx
xorq %rax, %rdx
movq %rdx, %rax
shrq $0x8, %rax
xorq %rdx, %rax
testb $0x1, %al
je 0x1a93
xorq 0x30(%rdi), %rcx
testb $0x2, %al
je 0x1a9b
xorq 0x38(%rdi), %rcx
testb $0x4, %al
je 0x1aa3
xorq 0x40(%rdi), %rcx
testb $0x8, %al
je 0x1aab
xorq 0x48(%rdi), %rcx
movq %rcx, %rax
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/MersenneTwister-Lab[P]MTGP/mtgp64-ref.c
// Function: mtgp64_genrand_close1_open2
double mtgp64_genrand_close1_open2(mtgp64_ref_t *mtgp64) {
    union {
	uint64_t u;
	double d;
    } x;
    x.u = mtgp64_genrand_uint64(mtgp64);
    x.u = (x.u >> 12) | UINT64_C(0x3ff0000000000000);
    return x.d;
}

// Assembly:
pushq %rax
callq 0x19bb
shrq $0xc, %rax
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
orq %rax, %rcx
movq %rcx, %xmm0
popq %rax
retq