LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/moefh[P]hed/src/editor.c
// Function: cursor_right
static void cursor_right(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->cursor_pos + 1 < file->data_len) {
    file->cursor_pos++;
    size_t n_page_lines = get_num_displayed_file_lines(editor);
    while (file->cursor_pos >= 16 * (file->top_line + n_page_lines))
      file->top_line++;
    scr->redraw_needed = true;
  }
}

// Assembly:
movq 0x628(%rdi), %rax
movq 0x38(%rax), %rcx
incq %rcx
cmpq 0x18(%rax), %rcx
jae 0x57ed
movq %rcx, 0x38(%rax)
movzbl 0x29(%rax), %r8d
movslq 0x110(%rdi), %rdx
movq 0x40(%rax), %rsi
xorq $0x1, %r8
leaq (%r8,%r8,4), %r8
addq %rsi, %rdx
addq %r8, %rdx
shlq $0x4, %rdx
addq $-0xa0, %rdx
incq %rsi
cmpq %rdx, %rcx
jb 0x57e6
movq %rsi, 0x40(%rax)
addq $0x10, %rdx
jmp 0x57d4
movb $0x1, 0x115(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/moefh[P]hed/src/editor.c
// Function: cursor_up
static void cursor_up(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->cursor_pos >= 16) {
    file->cursor_pos -= 16;
    while (file->cursor_pos < 16 * file->top_line)
      file->top_line--;
    scr->redraw_needed = true;
  }
}

// Assembly:
movq 0x628(%rdi), %rax
movq 0x38(%rax), %rcx
cmpq $0x10, %rcx
jb 0x582c
addq $-0x10, %rcx
movq %rcx, 0x38(%rax)
movq 0x40(%rax), %rdx
leaq -0x1(%rdx), %rsi
shlq $0x4, %rdx
cmpq %rdx, %rcx
jae 0x5825
movq %rsi, 0x40(%rax)
decq %rsi
addq $-0x10, %rdx
jmp 0x5813
movb $0x1, 0x115(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/moefh[P]hed/src/editor.c
// Function: cursor_down
static void cursor_down(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;

  if (file->cursor_pos + 16 < file->data_len) {
    file->cursor_pos += 16;
    size_t n_page_lines = get_num_displayed_file_lines(editor);
    while (file->cursor_pos >= 16 * (file->top_line + n_page_lines))
      file->top_line++;
    scr->redraw_needed = true;
  }
}

// Assembly:
movq 0x628(%rdi), %rax
movq 0x38(%rax), %rcx
addq $0x10, %rcx
cmpq 0x18(%rax), %rcx
jae 0x5888
movq %rcx, 0x38(%rax)
movzbl 0x29(%rax), %r8d
movslq 0x110(%rdi), %rdx
movq 0x40(%rax), %rsi
xorq $0x1, %r8
leaq (%r8,%r8,4), %r8
addq %rsi, %rdx
addq %r8, %rdx
shlq $0x4, %rdx
addq $-0xa0, %rdx
incq %rsi
cmpq %rdx, %rcx
jb 0x5881
movq %rsi, 0x40(%rax)
addq $0x10, %rdx
jmp 0x586f
movb $0x1, 0x115(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/moefh[P]hed/src/editor.c
// Function: cursor_page_up
static void cursor_page_up(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;
  int cursor_delta = file->cursor_pos - 16*file->top_line;
  size_t n_page_lines = get_num_displayed_file_lines(editor);

  if (file->top_line == 0)
    cursor_delta %= 16;
  else if (file->top_line >= n_page_lines)
    file->top_line -= n_page_lines;
  else
    file->top_line = 0;
  file->cursor_pos = 16*file->top_line + cursor_delta;
  scr->redraw_needed = true;
}

// Assembly:
movq 0x628(%rdi), %rcx
movl 0x38(%rcx), %eax
movq 0x40(%rcx), %rsi
movl %esi, %edx
shll $0x4, %edx
subl %edx, %eax
testq %rsi, %rsi
je 0x58cb
movzbl 0x29(%rcx), %edx
movslq 0x110(%rdi), %r8
xorq $0x1, %rdx
leaq (%rdx,%rdx,4), %rdx
addq %r8, %rdx
addq $-0xa, %rdx
subq %rdx, %rsi
jae 0x58d7
andq $0x0, 0x40(%rcx)
xorl %esi, %esi
jmp 0x58df
pushq $0x10
popq %rsi
cltd
idivl %esi
xorl %esi, %esi
movl %edx, %eax
jmp 0x58df
movq %rsi, 0x40(%rcx)
shlq $0x4, %rsi
cltq
addq %rsi, %rax
movq %rax, 0x38(%rcx)
movb $0x1, 0x115(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O2/moefh[P]hed/src/editor.c
// Function: cursor_page_down
static void cursor_page_down(struct hed_editor *editor)
{
  struct hed_screen *scr = &editor->screen;
  struct hed_file *file = editor->file;
  int cursor_delta = file->cursor_pos - 16*file->top_line;
  size_t n_page_lines = get_num_displayed_file_lines(editor);
  size_t last_line = file->data_len / 16 + (file->data_len % 16 != 0);

  if (last_line < n_page_lines || file->top_line == last_line - n_page_lines) {
    if (last_line < n_page_lines)
      file->top_line = 0;
    cursor_delta = file->data_len - 16*file->top_line - 1;
  } else if (last_line > n_page_lines && file->top_line + 2*n_page_lines < last_line)
    file->top_line += n_page_lines;
  else
    file->top_line = last_line - n_page_lines;
  file->cursor_pos = 16*file->top_line + cursor_delta;
  scr->redraw_needed = true;
}

// Assembly:
movq 0x628(%rdi), %rax
movq 0x18(%rax), %rcx
movzbl 0x29(%rax), %edx
movslq 0x110(%rdi), %rsi
xorq $0x1, %rdx
leaq (%rdx,%rdx,4), %rdx
leaq (%rsi,%rdx), %r8
addq $-0xa, %r8
movq %rcx, %r9
shrq $0x4, %r9
movl %ecx, %edx
andl $0xf, %edx
cmpq $0x1, %rdx
sbbq $-0x1, %r9
movq %r9, %rdx
subq %r8, %rdx
jae 0x593b
andq $0x0, 0x40(%rax)
xorl %esi, %esi
jmp 0x5944
movq 0x40(%rax), %rsi
cmpq %rdx, %rsi
jne 0x596a
movq %rsi, %rdx
shlq $0x4, %rdx
notq %rdx
addq %rdx, %rcx
movq %rsi, %rdx
shlq $0x4, %rdx
movslq %ecx, %rcx
addq %rdx, %rcx
movq %rcx, 0x38(%rax)
movb $0x1, 0x115(%rdi)
retq
movq 0x38(%rax), %rcx
movq %rsi, %r10
shlq $0x4, %r10
subq %r10, %rcx
cmpq %r8, %r9
jbe 0x598f
leaq (%rsi,%r8,2), %r10
cmpq %r9, %r10
jae 0x598f
addq %r8, %rsi
movq %rsi, 0x40(%rax)
jmp 0x5951
movq %rdx, 0x40(%rax)
jmp 0x5954
// File: /workspace/github_c_makefile_star2_O2/moefh[P]hed/src/help.c
// Function: move_text_down
static void move_text_down(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;
  size_t n_page_lines = scr->h - EDITOR_BORDER_LINES;

  if (hs->top_line + n_page_lines < hs->num_lines) {
    hs->top_line++;
    scr->redraw_needed = true;
  }
}

// Assembly:
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movslq 0x110(%rax), %rdx
addq %rcx, %rdx
addq $-0x5, %rdx
cmpq 0x20(%rdi), %rdx
jae 0x60ae
incq %rcx
movq %rcx, 0x10(%rdi)
movb $0x1, 0x115(%rax)
retq
// File: /workspace/github_c_makefile_star2_O2/moefh[P]hed/src/help.c
// Function: move_text_page_down
static void move_text_page_down(struct help_state *hs)
{
  struct hed_screen *scr = &hs->editor->screen;
  size_t n_page_lines = scr->h - EDITOR_BORDER_LINES;

  if (hs->top_line + 2*n_page_lines < hs->num_lines)
    hs->top_line += n_page_lines;
  else
    hs->top_line = hs->num_lines - n_page_lines;
  scr->redraw_needed = true;
}

// Assembly:
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movslq 0x110(%rax), %rdx
leaq -0x5(%rdx), %rsi
leaq (%rcx,%rdx,2), %r8
addq $-0xa, %r8
movq 0x20(%rdi), %r9
movq %r9, %r10
subq %rsi, %r10
cmpq %r9, %r8
leaq -0x5(%rcx,%rdx), %rcx
cmovaeq %r10, %rcx
movq %rcx, 0x10(%rdi)
movb $0x1, 0x115(%rax)
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/rmdir.c
// Function: parse_arg
struct rmdir_args *parse_arg(struct rmdir_args *args, int argc, char **argv){
    args->paths = calloc(1, sizeof(char*) * argc);
    args->pcount = 0;
    for(int i = 0; i < argc; i++){
        if(!strcmp(argv[i], "--ignore-fail-on-non-empty")){
            args->ignore_fail = true;
        }
        else if(!strcmp(argv[i], "-p") || !strcmp(argv[i], "--parents")){
            args->parents = true;
        }
        else if(!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose")){
            args->verbose = true;
        }
        else if(argv[i][0] == '-'){
            fprintf(stderr, "%s: invalid operand '%s'\n", argv[0], argv[i]);
            exit(1);
        }
        else {
            args->paths[args->pcount++] = argv[i];
        }
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movq %rdi, %r14
movslq %esi, %r12
leaq (,%r12,8), %rsi
pushq $0x1
popq %rdi
callq 0x1060
movq %rax, 0x8(%r14)
andl $0x0, 0x10(%r14)
xorl %ecx, %ecx
testl %r12d, %r12d
movl $0x0, %eax
movq %rax, -0x30(%rbp)
cmovlel %ecx, %r12d
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x12a5
movq -0x38(%rbp), %rax
movq (%rax,%r15,8), %r13
movq %r13, %rdi
leaq 0xdf4(%rip), %rsi       # 0x2004
callq 0x1070
testl %eax, %eax
je 0x128b
movb (%r13), %bl
cmpb $0x2d, %bl
jne 0x1230
cmpb $0x70, 0x1(%r13)
jne 0x1230
cmpb $0x0, 0x2(%r13)
je 0x1291
movq %r13, %rdi
leaq 0xde5(%rip), %rsi       # 0x201f
callq 0x1070
testl %eax, %eax
je 0x1291
cmpb $0x2d, %bl
jne 0x1256
cmpb $0x76, 0x1(%r13)
jne 0x1256
cmpb $0x0, 0x2(%r13)
je 0x1298
movq %r13, %rdi
leaq 0xdc9(%rip), %rsi       # 0x2029
callq 0x1070
testl %eax, %eax
je 0x1298
cmpb $0x2d, %bl
je 0x12b7
movq 0x8(%r14), %rax
movq -0x30(%rbp), %rdx
movslq %edx, %rcx
incl %edx
movl %edx, 0x10(%r14)
movq %r13, (%rax,%rcx,8)
movl %edx, %eax
movq %rax, -0x30(%rbp)
jmp 0x129d
movb $0x1, (%r14)
jmp 0x129d
movb $0x1, 0x1(%r14)
jmp 0x129d
movb $0x1, 0x2(%r14)
incq %r15
jmp 0x11f5
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d3a(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x38(%rbp), %rax
movq (%rax), %rdx
leaq 0xd64(%rip), %rsi       # 0x2033
movq %r13, %rcx
xorl %eax, %eax
callq 0x1080
pushq $0x1
popq %rdi
callq 0x1090
// File: /workspace/github_c_makefile_star2_O2/ikbenlike[P]nngutils/src/rmdir.c
// Function: main
int main(int argc, char **argv){
    if(argc == 1){
        fprintf(stderr, "%s: missing operand\n", argv[0]);
        return 1;
    }
    struct rmdir_args *args = calloc(1, sizeof(struct rmdir_args));
    args = parse_arg(args, argc, argv);
    for(int i = 1; i < args->pcount; i++){
        if(args->verbose){
            fprintf(stdout, "%s: removing directory, '%s'\n", argv[0], args->paths[i]);
        }
        if(rmdir(args->paths[i]) == -1){
            if(errno == ENOTEMPTY && !args->ignore_fail){
                fprintf(stderr, "%s: failed to remove '%s': %s\n", argv[0], args->paths[i], strerror(errno));
                return 1;
            }
        }
    }
    free(args->paths);
    free(args);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpl $0x1, %edi
je 0x139e
movl %edi, %r12d
pushq $0x1
popq %r15
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x1060
movq %rax, %r14
movq %rax, %rdi
movl %r12d, %esi
movq %rbx, %rdx
callq 0x11ac
movq 0x2cb3(%rip), %r13      # 0x3fd8
leaq 0xd36(%rip), %r12       # 0x2062
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x137c
cmpb $0x1, 0x2(%r14)
jne 0x1355
movq (%r13), %rdi
movq (%rbx), %rdx
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rcx
movq %r12, %rsi
xorl %eax, %eax
callq 0x1080
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %rdi
callq 0x1050
cmpl $-0x1, %eax
jne 0x1377
callq 0x1040
cmpl $0x27, (%rax)
jne 0x1377
cmpb $0x0, (%r14)
je 0x13be
incq %r15
jmp 0x132c
movq 0x8(%r14), %rdi
callq 0x1030
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2c53(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq (%rbx), %rdx
leaq 0xc9b(%rip), %rsi       # 0x204d
xorl %eax, %eax
callq 0x1080
pushq $0x1
popq %rax
jmp 0x138f
movq 0x2c33(%rip), %rax      # 0x3ff8
movq (%rax), %r12
movq (%rbx), %rbx
movq 0x8(%r14), %rax
movq (%rax,%r15,8), %r14
pushq $0x27
popq %rdi
callq 0x10a0
leaq 0xc9e(%rip), %rsi       # 0x2080
movq %r12, %rdi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x1080
jmp 0x13b9
// File: /workspace/github_c_makefile_star2_O2/tarun388[P]myexpos_2019/expl/./ltranslate.c
// Function: append_table
void append_table(char *label, int addr)
{
	struct LTable *temp;
	temp = (struct LTable *)malloc(sizeof(struct LTable));
	temp->name = label;
	temp->addr = addr;

	if (LThead == NULL)
	{
		LThead = temp;
		LTtail = temp;
	}
	else
	{
		LTtail->next = temp;
		LTtail = LTtail->next;
	}
	return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
pushq $0x18
popq %rdi
callq 0x1120
movq %r14, (%rax)
movl %ebx, 0x8(%rax)
leaq 0x3e56(%rip), %rcx      # 0x5100
movq 0x3e57(%rip), %rdx      # 0x5108
addq $0x10, %rdx
cmpq $0x0, 0x3e43(%rip)      # 0x5100
cmoveq %rcx, %rdx
movq %rax, (%rdx)
movq %rax, 0x3e3d(%rip)      # 0x5108
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/tarun388[P]myexpos_2019/expl/./ltranslate.c
// Function: find_map
int find_map(char *name)
{
	struct LTable *temp;

	temp = LThead;
	while (temp != NULL)
	{
		if (strcmp(name, temp->name) == 0)
			return temp->addr;

		temp = temp->next;
	}
	return -1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x3e1e(%rip), %r15      # 0x5100
pushq $-0x1
popq %rbx
movq (%r15), %r15
testq %r15, %r15
je 0x1306
movq (%r15), %rsi
movq %r14, %rdi
callq 0x10e0
testl %eax, %eax
je 0x1302
addq $0x10, %r15
jmp 0x12e5
movl 0x8(%r15), %ebx
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/tarun388[P]myexpos_2019/expl/./ltranslate.c
// Function: print_table
void print_table()
{
	struct LTable *temp;

	temp = LThead;
	while (temp != NULL)
	{
		printf("%s : %d\n", temp->name, temp->addr);
		temp = temp->next;
	}
	return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x3de7(%rip), %r14      # 0x5100
leaq 0x20aa(%rip), %rbx      # 0x33ca
movq (%r14), %r14
testq %r14, %r14
je 0x133f
movq (%r14), %rsi
movl 0x8(%r14), %edx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x10b0
addq $0x10, %r14
jmp 0x1320
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/openshmem-org[P]openshmem-examples/c/heapput.c
// Function: main
int
main()
{
    int me;

    shmem_init();

    me = shmem_my_pe();

    if (me == 0) {
        long src = 4321;
        shmem_long_put(&dest, &src, 1, 1);
    }

    shmem_barrier_all();

    printf("%d: dest = %ld\n", me, dest);

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
callq 0x1080
callq 0x1060
movl %eax, %ebx
testl %eax, %eax
jne 0x11bf
leaq 0x8(%rsp), %rsi
movq $0x10e1, (%rsi)         # imm = 0x10E1
leaq 0x2ea4(%rip), %rdi      # 0x4058
pushq $0x1
popq %rdx
pushq $0x1
popq %rcx
callq 0x1040
callq 0x1070
movq 0x2e8d(%rip), %rdx      # 0x4058
leaq 0xe32(%rip), %rdi       # 0x2004
movl %ebx, %esi
xorl %eax, %eax
callq 0x1030
callq 0x1050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/giometti[P]mastering_UNIX_programming/chapter_06/fstatus.c
// Function: main
int main(void)
{
	FILE *fp;
	char c;

	/* Open a file for writing */
	fp = fopen("file.txt", "w");
	if (!fp) {
		perror("fopen");
		return -1;
	}
	printf("file descriptor number is %d\n", fileno(fp));

	/* Try to read data from file */
	while (!ferror(fp))
		c = fgetc(fp);
	status(fp);

	/* Clear the error status and re-check it */
	clearerr(fp);
	status(fp);

	fclose(fp);

	return 0;
}

// Assembly:
pushq %rbx
leaq 0xe49(%rip), %rdi       # 0x2026
leaq 0xe4b(%rip), %rsi       # 0x202f
callq 0x1090
testq %rax, %rax
je 0x1240
movq %rax, %rbx
movq %rax, %rdi
callq 0x1080
leaq 0xe37(%rip), %rdi       # 0x2037
movl %eax, %esi
xorl %eax, %eax
callq 0x1050
movq %rbx, %rdi
callq 0x1030
movq %rbx, %rdi
testl %eax, %eax
jne 0x121f
callq 0x1060
jmp 0x1209
callq 0x11ac
movq %rbx, %rdi
callq 0x1070
movq %rbx, %rdi
callq 0x11ac
movq %rbx, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
retq
leaq 0xdea(%rip), %rdi       # 0x2031
callq 0x10a0
pushq $-0x1
popq %rax
jmp 0x123e
// File: /workspace/github_c_makefile_star2_O2/Tarsnap[P]libcperciva/tests/json/main.c
// Function: main
int
main(int argc, char * argv[])
{
	size_t i;
	const uint8_t * found;

	(void)argc; /* UNUSED */
	(void)argv; /* UNUSED */

	/* Iterate through the tests. */
	for (i = 0; i < sizeof(tests) / sizeof(tests[0]); i++) {
		found = json_find((const uint8_t *)tests[i].json,
		    (const uint8_t *)tests[i].json + strlen(tests[i].json),
		    tests[i].tofind);
		if (strcmp((const char *)found, tests[i].answer)) {
			printf("Searching for key \"%s\" in object:\n%s\n"
			    "Found: %s\nExpected: %s\n",
			    tests[i].tofind, tests[i].json,
			    found, tests[i].answer);
			printf("FAILURE\n");
			goto err0;
		}
	}

	/* Everything went fine. */
	printf("SUCCESS\n");

	/* Success! */
	exit(0);

err0:
	/* Failure! */
	exit(1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
pushq $0x10
popq %rbp
leaq 0x18(%rbp), %r13
cmpq $0x190, %r13            # imm = 0x190
je 0x1227
leaq 0x2ad2(%rip), %r12      # 0x3c90
movq -0x10(%rbp,%r12), %rbx
movq -0x8(%rbp,%r12), %r14
movq %rbx, %rdi
callq 0x1040
leaq (%rax,%rbx), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x123c
movq %rax, %r15
movq (%rbp,%r12), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x1070
movq %r13, %rbp
testl %eax, %eax
je 0x11aa
leaq 0xe04(%rip), %rdi       # 0x2004
movq %r14, %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x1060
leaq 0xf75(%rip), %rdi       # 0x218f
callq 0x1030
pushq $0x1
popq %rdi
callq 0x1090
leaq 0xf59(%rip), %rdi       # 0x2187
callq 0x1030
xorl %edi, %edi
callq 0x1090
nop
// File: /workspace/github_c_makefile_star2_O2/motet-a[P]libforks/examples/execve.c
// Function: main
int main() {
  libforks_ServerConn conn;
  assert(libforks_start(&conn) == libforks_OK);

  int exit_fd;

  assert(libforks_fork(
    conn,
    NULL, // pid_ptr
    NULL, // socket_fd_ptr
    &exit_fd, // exit_fd_ptr
    child_main
  ) == libforks_OK);

  libforks_ExitEvent ee;
  assert(read(exit_fd, &ee, sizeof ee) == sizeof ee);

  assert(libforks_stop(conn) == libforks_OK);
  return 0;
}

// Assembly:
subq $0x18, %rsp
leaq 0x8(%rsp), %rdi
callq 0x178e
testl %eax, %eax
jne 0x1348
movq 0x8(%rsp), %rdi
leaq 0xa6(%rip), %r8         # 0x13b0
leaq 0x4(%rsp), %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0x208a
testl %eax, %eax
jne 0x1361
movl 0x4(%rsp), %edi
leaq 0x10(%rsp), %rsi
pushq $0x8
popq %rdx
callq 0x10f0
cmpq $0x8, %rax
jne 0x137a
movq 0x8(%rsp), %rdi
callq 0x222e
testl %eax, %eax
jne 0x1393
xorl %eax, %eax
addq $0x18, %rsp
retq
leaq 0x1cb5(%rip), %rdi      # 0x3004
leaq 0x1cd3(%rip), %rsi      # 0x3029
leaq 0x1cde(%rip), %rcx      # 0x303b
pushq $0x1b
jmp 0x13aa
leaq 0x1cde(%rip), %rdi      # 0x3046
leaq 0x1cba(%rip), %rsi      # 0x3029
leaq 0x1cc5(%rip), %rcx      # 0x303b
pushq $0x25
jmp 0x13aa
leaq 0x1d0c(%rip), %rdi      # 0x308d
leaq 0x1ca1(%rip), %rsi      # 0x3029
leaq 0x1cac(%rip), %rcx      # 0x303b
pushq $0x28
jmp 0x13aa
leaq 0x1d1e(%rip), %rdi      # 0x30b8
leaq 0x1c88(%rip), %rsi      # 0x3029
leaq 0x1c93(%rip), %rcx      # 0x303b
pushq $0x2a
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/motet-a[P]libforks/examples/execve.c
// Function: child_main
static void child_main(libforks_ServerConn conn, int socket_fd) {
  assert(socket_fd == -1);

  // not strictly required but recommended
  assert(libforks_free_conn(conn) == libforks_OK);

  char * const argv[] = {
    "echo",
    "hello, world!",
    NULL
  };
  execve("/bin/echo", argv, environ);
  perror("execve");
  abort();
}

// Assembly:
subq $0x18, %rsp
cmpl $-0x1, %esi
jne 0x1401
callq 0x2257
testl %eax, %eax
jne 0x141a
movq 0x4a17(%rip), %rax      # 0x5de0
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
movaps 0x49f9(%rip), %xmm0     # 0x5dd0
movaps %xmm0, (%rsi)
movq 0x4bff(%rip), %rax      # 0x5fe0
movq (%rax), %rdx
leaq 0x1d60(%rip), %rdi      # 0x314b
callq 0x1100
leaq 0x1d5e(%rip), %rdi      # 0x3155
callq 0x11b0
callq 0x1040
leaq 0x1cd3(%rip), %rdi      # 0x30db
leaq 0x1c1a(%rip), %rsi      # 0x3029
leaq 0x1cd5(%rip), %rcx      # 0x30eb
pushq $0xa
jmp 0x1431
leaq 0x1cf4(%rip), %rdi      # 0x3115
leaq 0x1c01(%rip), %rsi      # 0x3029
leaq 0x1cbc(%rip), %rcx      # 0x30eb
pushq $0xd
popq %rdx
callq 0x10b0
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/main.c
// Function: main
int	main(int argc, char *argv[])
{
	t_game	game;
	int		w;

	ft_bzero(&game, sizeof(t_game));
	if (argc == 2)
	{
		if (check_map(argv[1], &game))
			game_config(&game);
		else
			return (check_error(INVALID_MAP));
		game_init(&game);
	}
	else
		return (check_error(INVALID_PARAM_NB));
	return (SUCCESS);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x8(%rsp), %rdi
movl $0x160, %esi            # imm = 0x160
callq 0x65f8
cmpl $0x2, %ebp
jne 0x6589
movq 0x8(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x6c27
testl %eax, %eax
je 0x658d
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x6f44
movq %rbx, %rdi
callq 0x7674
xorl %eax, %eax
jmp 0x6595
pushq $0x2
jmp 0x658f
pushq $0x1
popq %rdi
callq 0x6e10
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/ft_calloc.c
// Function: ft_calloc
void	*ft_calloc(size_t nmemb, size_t size)
{
	void	*r;
	int		index;

	index = 0;
	if (nmemb * size > INT_MAX)
	{
		errno = 12;
		return (0);
	}
	r = malloc(nmemb * size);
	if (r)
	{
		while (index < nmemb * size)
		{
			((char *)r)[index] = 0;
			index++;
		}
		return (r);
	}
	return (0);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
imulq %rsi, %rbx
testq $-0x80000000, %rbx      # imm = 0x80000000
je 0x65be
callq 0x6290
movl $0xc, (%rax)
jmp 0x65db
movq %rbx, %rdi
callq 0x6120
testq %rax, %rax
je 0x65db
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x65dd
movb $0x0, (%rax,%rcx)
incq %rcx
jmp 0x65cd
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/ft_strlen.c
// Function: ft_strlen
int	ft_strlen(const char *s)
{
	size_t	index;

	index = 0;
	while (s[index] && s[index] != '\n')
		index++;
	return (index);
}

// Assembly:
xorl %eax, %eax
movzbl (%rdi,%rax), %ecx
testl %ecx, %ecx
je 0x65f4
cmpl $0xa, %ecx
je 0x65f4
incq %rax
jmp 0x65e2
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/get_next_line.c
// Function: get_line_size
size_t	get_line_size(char	*data)
{
	size_t	size;

	size = 0;
	while (data[size] && data[size] != '\n')
		size++;
	if (data[size] == '\n')
		size++;
	return (size);
}

// Assembly:
xorl %ecx, %ecx
movzbl (%rdi,%rcx), %edx
testl %edx, %edx
je 0x6620
cmpl $0xa, %edx
je 0x6620
incq %rcx
jmp 0x660e
xorl %eax, %eax
cmpb $0xa, %dl
sete %al
addq %rcx, %rax
retq
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/get_next_line.c
// Function: append_line
int	append_line(char *line, char *data)
{
	int		index;
	int		sub_index;

	sub_index = 0;
	index = 0;
	while (line[index])
		index++;
	while (data[sub_index])
	{
		line[index + sub_index] = data[sub_index];
		if (data[sub_index] == '\n')
			return (sub_index + 1);
		sub_index++;
	}
	return (-1);
}

// Assembly:
pushq $-0x1
popq %rax
movq %rdi, %rcx
incl %eax
cmpb $0x0, (%rcx)
leaq 0x1(%rcx), %rcx
jne 0x6632
movl %eax, %eax
addq %rax, %rdi
xorl %ecx, %ecx
pushq $-0x1
popq %rax
movb (%rsi,%rcx), %dl
testb %dl, %dl
je 0x6660
movb %dl, (%rdi,%rcx)
cmpb $0xa, (%rsi,%rcx)
je 0x665c
incq %rcx
jmp 0x6647
incl %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/get_next_line.c
// Function: get_line
void	get_line(t_buffer *buffer)
{
	size_t	size;
	char	*tmp;
	int		desloc;

	desloc = buffer->desloc;
	size = get_line_size(&buffer->data[desloc]);
	if (buffer->line)
		size += get_line_size(buffer->line);
	tmp = (char *) ft_calloc(size + 1, sizeof(char));
	if (buffer->line)
	{
		append_line(tmp, buffer->line);
		free(buffer->line);
	}
	desloc = append_line(tmp, &buffer->data[desloc]);
	buffer->line = tmp;
	if (desloc == -1)
	{
		ft_bzero(buffer->data, BUFFER_SIZE);
		buffer->desloc = 0;
		if ((read(buffer->fd, buffer->data, BUFFER_SIZE)) > 0)
			get_line(buffer);
	}
	else
		buffer->desloc += desloc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x4(%rdi), %r14
pushq $0x1
popq %r15
pushq $0x64
popq %r12
movslq 0x6c(%rbx), %r13
addq %r14, %r13
movq %r13, %rdi
callq 0x660c
movq %rax, %rbp
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x669e
callq 0x660c
addq %rax, %rbp
incq %rbp
movq %rbp, %rdi
movq %r15, %rsi
callq 0x65a0
movq %rax, %rbp
movq 0x70(%rbx), %rsi
testq %rsi, %rsi
je 0x66c9
movq %rbp, %rdi
callq 0x662c
movq 0x70(%rbx), %rdi
callq 0x6190
movq %rbp, %rdi
movq %r13, %rsi
callq 0x662c
movq %rbp, 0x70(%rbx)
cmpl $-0x1, %eax
jne 0x6704
movq %r14, %rdi
movq %r12, %rsi
callq 0x65f8
andl $0x0, 0x6c(%rbx)
movl (%rbx), %edi
movq %r14, %rsi
movq %r12, %rdx
callq 0x6100
testq %rax, %rax
jg 0x667b
jmp 0x6707
addl %eax, 0x6c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/get_next_line.c
// Function: get_next_line
char	*get_next_line(int fd)
{
	static t_buffer	list[255];
	t_buffer		*buffer;

	if (fd < 0 || fd > 255)
		return (0);
	buffer = &list[fd];
	buffer->fd = fd;
	buffer->line = 0;
	if (*buffer->data == 0)
	{
		if ((read(fd, buffer->data, BUFFER_SIZE)) <= 0)
			return (0);
	}
	get_line(buffer);
	if (*buffer->line == 0)
	{
		free(buffer->line);
		return (0);
	}
	return (buffer->line);
}

// Assembly:
cmpl $0xff, %edi
jbe 0x6721
xorl %eax, %eax
retq
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %eax
imulq $0x78, %rax, %r14
leaq 0xbb5e(%rip), %rbx      # 0x12290
movl %edi, (%r14,%rbx)
andq $0x0, 0x70(%r14,%rbx)
cmpb $0x0, 0x4(%r14,%rbx)
jne 0x6759
leaq (%r14,%rbx), %rsi
addq $0x4, %rsi
pushq $0x64
popq %rdx
callq 0x6100
testq %rax, %rax
jle 0x6775
addq %r14, %rbx
movq %rbx, %rdi
callq 0x6661
movq 0x70(%rbx), %rax
cmpb $0x0, (%rax)
jne 0x6777
movq %rax, %rdi
callq 0x6190
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/ft_substr.c
// Function: ft_substr
char	*ft_substr(char const *s, unsigned int start, size_t len)
{
	char	*string;
	size_t	size;
	size_t	index;

	index = 0;
	if (!s)
		return (0);
	if (start > ft_strlen(s))
		size = 0;
	else
	{
		size = ft_strlen(&s[start]);
		if (len < size)
			size = len;
	}
	string = (char *) ft_calloc(size + 1, sizeof(char));
	if (!string)
		return (0);
	while (index < size)
	{
		string[index] = s[start + index];
		index++;
	}
	string[index] = '\0';
	return (string);
}

// Assembly:
testq %rdi, %rdi
je 0x67bc
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
callq 0x65e0
movl %ebp, %r15d
cmpl %ebp, %eax
jae 0x67bf
xorl %ebx, %ebx
jmp 0x67d1
xorl %eax, %eax
retq
leaq (%r14,%r15), %rdi
callq 0x65e0
cltq
cmpq %rbx, %rax
cmovbq %rax, %rbx
leaq 0x1(%rbx), %rdi
pushq $0x1
popq %rsi
callq 0x65a0
testq %rax, %rax
je 0x67fe
addq %r15, %r14
xorl %ecx, %ecx
cmpq %rcx, %rbx
je 0x67f8
movb (%r14,%rcx), %dl
movb %dl, (%rax,%rcx)
incq %rcx
jmp 0x67e7
movb $0x0, (%rax,%rbx)
jmp 0x6800
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/pixel_manipulation.c
// Function: copy_img_from
void	copy_img_from(t_data *dest, t_data *src, int info[4])
{
	int	pixel;
	int	x;
	int	y;
	int	holder;

	x = 0;
	y = 0;
	holder = info[1];
	while (x < info[2])
	{
		while (y < info[3])
		{
			pixel = my_mlx_get_pixel(src, info[0], info[1]);
			if (pixel != 0 && pixel != -16777216)
				my_mlx_pixel_put(dest, x, y, pixel);
			y++;
			info[1]++;
		}
		y = 0;
		info[1] = holder;
		info[0]++;
		x++;
	}
	free(info);
}

// Assembly:
pushq %rbp
pushq %rbx
movq %rdx, %rcx
movl 0x4(%rdx), %r8d
xorl %r9d, %r9d
movl $0x8, %r10d
cmpl 0x8(%rcx), %r9d
jge 0x68cf
xorl %r11d, %r11d
movl %r8d, %ebx
cmpl 0xc(%rcx), %r11d
jge 0x68c4
movl 0x10(%rsi), %eax
cltd
idivl %r10d
movq 0x8(%rsi), %rdx
movl 0x14(%rsi), %ebp
imull %ebx, %ebp
imull (%rcx), %eax
addl %ebp, %eax
cltq
movl (%rdx,%rax), %ebp
cmpl $0xff000000, %ebp       # imm = 0xFF000000
je 0x68ba
testl %ebp, %ebp
je 0x68ba
movl 0x10(%rdi), %eax
cltd
idivl %r10d
movq 0x8(%rdi), %rdx
movl 0x14(%rdi), %ebx
imull %r11d, %ebx
imull %r9d, %eax
addl %ebx, %eax
cltq
movl %ebp, (%rdx,%rax)
movl 0x4(%rcx), %ebx
incl %r11d
incl %ebx
movl %ebx, 0x4(%rcx)
jmp 0x686d
movl %r8d, 0x4(%rcx)
incl (%rcx)
incl %r9d
jmp 0x6861
movq %rcx, %rdi
popq %rbx
popq %rbp
jmp 0x6190
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/pixel_manipulation.c
// Function: copy_img_to
void	copy_img_to(t_data *dest, t_data *src, int info[4])
{
	int	pixel;
	int	x;
	int	y;
	int	holder;

	x = 0;
	y = 0;
	holder = info[1];
	while (x < info[2])
	{
		while (y < info[3])
		{
			pixel = my_mlx_get_pixel(src, x, y);
			if (pixel != 0 && pixel != -16777216)
				my_mlx_pixel_put(dest, info[0], info[1], pixel);
			y++;
			info[1]++;
		}
		y = 0;
		info[1] = holder;
		info[0]++;
		x++;
	}
	free(info);
}

// Assembly:
pushq %rbp
pushq %rbx
movq %rdx, %rcx
movl 0x4(%rdx), %r8d
xorl %r9d, %r9d
movl $0x8, %r10d
cmpl 0x8(%rcx), %r9d
jge 0x6957
xorl %r11d, %r11d
movl %r8d, %ebx
cmpl 0xc(%rcx), %r11d
jge 0x694c
movl 0x10(%rsi), %eax
cltd
idivl %r10d
movq 0x8(%rsi), %rdx
movl 0x14(%rsi), %ebp
imull %r11d, %ebp
imull %r9d, %eax
addl %ebp, %eax
cltq
movl (%rdx,%rax), %ebp
cmpl $0xff000000, %ebp       # imm = 0xFF000000
je 0x6942
testl %ebp, %ebp
je 0x6942
movl 0x10(%rdi), %eax
cltd
idivl %r10d
imull 0x14(%rdi), %ebx
movq 0x8(%rdi), %rdx
imull (%rcx), %eax
addl %ebx, %eax
cltq
movl %ebp, (%rdx,%rax)
movl 0x4(%rcx), %ebx
incl %r11d
incl %ebx
movl %ebx, 0x4(%rcx)
jmp 0x68f7
movl %r8d, 0x4(%rcx)
incl (%rcx)
incl %r9d
jmp 0x68eb
movq %rcx, %rdi
popq %rbx
popq %rbp
jmp 0x6190
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/pixel_manipulation.c
// Function: to_array
int	*to_array(int x, int y, int w, int h)
{
	int	*array;

	array = (int *)malloc(sizeof(int) * 4);
	array[0] = x;
	array[1] = y;
	array[2] = w;
	array[3] = h;
	return (array);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movl %esi, %r14d
movl %edi, %r15d
pushq $0x10
popq %rdi
callq 0x6120
movl %r15d, (%rax)
movl %r14d, 0x4(%rax)
movl %ebp, 0x8(%rax)
movl %ebx, 0xc(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/ft_strcat.c
// Function: ft_strcat
void	ft_strcat(char *dest, char *src)
{
	while (*dest)
		dest++;
	while (*src && *src != '\n')
	{	
		*dest = *src;
		dest++;
		src++;
	}
}

// Assembly:
cmpb $0x0, (%rdi)
leaq 0x1(%rdi), %rdi
jne 0x69f0
xorl %eax, %eax
movzbl (%rsi,%rax), %ecx
testl %ecx, %ecx
je 0x6a11
cmpl $0xa, %ecx
je 0x6a11
movb %cl, -0x1(%rdi,%rax)
incq %rax
jmp 0x69fb
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/utils/ft_itoa.c
// Function: ft_itoa
char	*ft_itoa(int n)
{
	size_t			size;
	unsigned int	number;
	int				is_negative;

	is_negative = 0;
	if (n < 0)
	{
		number = n * -1;
		is_negative = 1;
	}
	else
		number = n;
	size = get_size(number);
	if (number == 0)
		size = 1;
	return (set_string(number, size, is_negative));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
movl %edi, %ebp
negl %ebp
cmovsl %edi, %ebp
xorl %r15d, %r15d
pushq $0xa
popq %r14
movl %ebp, %eax
testl %eax, %eax
je 0x6a3c
xorl %edx, %edx
divl %r14d
incq %r15
jmp 0x6a2e
testl %ebx, %ebx
pushq $0x1
popq %rsi
cmoveq %rsi, %r15
movl %ebx, %r12d
shrl $0x1f, %r12d
leaq (%r15,%r12), %rdi
incq %rdi
callq 0x65a0
movq %rax, %rcx
testq %rax, %rax
je 0x6a89
addq %r12, %r15
movq %r15, %rsi
subq $0x1, %rsi
jb 0x6a82
movl %ebp, %eax
xorl %edx, %edx
divl %r14d
orb $0x30, %dl
movb %dl, -0x1(%rcx,%r15)
movq %rsi, %r15
movl %eax, %ebp
jmp 0x6a66
testl %ebx, %ebx
jns 0x6a89
movb $0x2d, (%rcx)
movq %rcx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/checks/check_map.c
// Function: get_all_content
int	get_all_content(int fd, t_game *game)
{
	int		x;
	int		y;
	char	*line;
	char	*all_content;

	x = -1;
	y = 0;
	all_content = 0;
	line = get_next_line(fd);
	while (line)
	{
		if (check_format(line) && (x == -1 || x == ft_strlen(line)))
		{
			if (x == -1)
				x = ft_strlen(line);
			append(&all_content, line);
		}
		else
			return (0);
		y++;
		line = get_next_line(fd);
	}
	make_layout(game, x, y, all_content);
	free(all_content);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x8(%rsp)
movl %edi, %ebp
pushq $-0x1
popq %rax
movl %eax, 0x4(%rsp)
xorl %r15d, %r15d
leaq 0x3546(%rip), %r12      # 0xa004
xorl %r14d, %r14d
movl %ebp, %edi
callq 0x6716
testq %rax, %rax
je 0x6ba7
movq %rax, %r13
movq %rax, %rbx
movzbl (%rbx), %eax
testl %eax, %eax
je 0x6afa
cmpl $0xa, %eax
je 0x6afa
movsbl %al, %esi
movq %r12, %rdi
callq 0x6780
incq %rbx
testl %eax, %eax
jne 0x6ad7
jmp 0x6b96
movq %r13, %rdi
callq 0x65e0
movl 0x4(%rsp), %ecx
cmpl $-0x1, %ecx
je 0x6b14
cmpl %eax, %ecx
je 0x6b16
jmp 0x6b96
movl %eax, %ecx
movl %ecx, 0x4(%rsp)
testq %r14, %r14
je 0x6b63
movq %r14, %rdi
callq 0x65e0
movq %r15, %rbx
movl %eax, %r15d
movq %r13, %rdi
callq 0x65e0
addl %r15d, %eax
incl %eax
movslq %eax, %rdi
pushq $0x1
popq %rsi
callq 0x65a0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
callq 0x69f0
movq %r14, %rdi
callq 0x6190
movq %r15, %r14
movq %rbx, %r15
jmp 0x6b7b
movq %r13, %rdi
callq 0x65e0
incl %eax
movslq %eax, %rdi
pushq $0x1
popq %rsi
callq 0x65a0
movq %rax, %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x69f0
movq %r13, %rdi
callq 0x6190
incq %r15
jmp 0x6ac1
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r15d, %edi
pushq $0x8
popq %rsi
callq 0x65a0
movq 0x8(%rsp), %rcx
movq %rax, 0xc8(%rcx)
movq %r15, %rbx
movslq 0x4(%rsp), %r15
xorl %r13d, %r13d
movq %rbx, 0x10(%rsp)
movq %r14, %r12
subq $0x1, %rbx
jb 0x6bfd
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x6798
movq 0x8(%rsp), %rcx
movq 0xc8(%rcx), %rcx
movq %rax, (%rcx,%r13)
addq %r15, %r12
addq $0x8, %r13
jmp 0x6bd1
movq 0x8(%rsp), %rax
movl 0x4(%rsp), %ecx
movl %ecx, 0x128(%rax)
movq 0x10(%rsp), %rcx
movl %ecx, 0x12c(%rax)
movq %r14, %rdi
callq 0x6190
pushq $0x1
popq %rax
jmp 0x6b98
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/checks/check_map.c
// Function: check_map
int	check_map(char	*map_path, t_game *game)
{
	int		fd;
	int		x;
	int		y;

	if (!(check_ex(map_path)))
		return (0);
	fd = open(map_path, O_RDONLY);
	if (fd == -1)
		return (0);
	if (!(get_all_content(fd, game)))
	{
		close(fd);
		return (0);
	}
	close(fd);
	if (!(check_surround_wall(game)))
		return (0);
	if (!(check_structure(game)))
		return (0);
	return (1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0x6e38
xorl %ebx, %ebx
testl %eax, %eax
je 0x6c86
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x63f0
cmpl $-0x1, %eax
je 0x6c86
movl %eax, %ebp
movl %eax, %edi
movq %r14, %rsi
callq 0x6a98
movl %eax, %r15d
movl %ebp, %edi
callq 0x6060
testl %r15d, %r15d
je 0x6c86
movq %r14, %rdi
callq 0x6e6d
testl %eax, %eax
je 0x6c86
movq %r14, %rdi
callq 0x6ece
xorl %ebx, %ebx
testl %eax, %eax
setne %bl
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/checks/check_exit.c
// Function: check_exit
void	check_exit(t_game *game)
{
	static int	open;
	int			x;
	int			y;

	if (!game->items && !open)
	{
		open = 1;
		open_exits(game);
	}
	if (!game->items)
	{
		x = game->player.x + game->map.x;
		y = game->player.y + game->map.y;
		if (game->map.layout[y][x] == 'E')
			game->win = 1;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x130(%rdi), %rax
testq %rax, %rax
jne 0x6dbd
testb $0x1, 0x12d28(%rip)     # 0x19a18
jne 0x6dbd
movb $0x1, 0x12d1b(%rip)     # 0x19a18
movslq 0x128(%rbx), %rax
movslq 0x12c(%rbx), %r15
leaq 0xd0(%rbx), %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x10(%rsp)
shll $0x6, %eax
addl $-0x40, %eax
movl %eax, 0xc(%rsp)
leaq 0x20(%rsp), %r12
subq $0x1, %r15
jb 0x6db6
movl %r15d, %ebp
shll $0x6, %ebp
movl 0xc(%rsp), %r13d
movq 0x10(%rsp), %rax
movq %rax, %r14
subq $0x1, %r14
jb 0x6d2b
movq 0xc8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
cmpb $0x45, -0x1(%rcx,%rax)
jne 0x6dad
movabsq $0x4000000040, %rax     # imm = 0x4000000040
movq %rax, 0x3c(%rsp)
movq %r12, %rdi
leaq 0x3291(%rip), %rsi      # 0xa00a
movq %rbx, %rdx
callq 0x6994
movl 0x3c(%rsp), %edx
movl 0x40(%rsp), %ecx
movl %r13d, %edi
movl %ebp, %esi
callq 0x6961
movq 0x18(%rsp), %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x68d9
movq 0x20(%rsp), %rdi
callq 0x6190
addl $-0x40, %r13d
movq %r14, %rax
jmp 0x6d48
movq 0x130(%rbx), %rax
testq %rax, %rax
jne 0x6dff
movslq 0xb4(%rbx), %rax
movslq 0x120(%rbx), %rcx
addq %rax, %rcx
movslq 0xb8(%rbx), %rax
movslq 0x124(%rbx), %rdx
addq %rax, %rdx
movq 0xc8(%rbx), %rax
movq (%rax,%rdx,8), %rax
cmpb $0x45, (%rax,%rcx)
jne 0x6dff
movl $0x1, 0x158(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/checks/check_map_utils.c
// Function: check_ex
int check_ex(char *file)
{
    int index;

    index = ft_strlen(file);
    if (index-- < 4)
        return (0);
    if (file[index--] != 'r' || file[index--] != 'e' || file[index--] != 'b')
        return (0);
    if (file[index] != '.')
        return (0);
    return (1);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x65e0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x4, %ecx
jl 0x6e6b
movl %ecx, %ecx
cmpb $0x72, -0x1(%rbx,%rcx)
jne 0x6e6b
cmpb $0x65, -0x2(%rbx,%rcx)
jne 0x6e6b
cmpb $0x62, -0x3(%rbx,%rcx)
jne 0x6e6b
xorl %eax, %eax
cmpb $0x2e, -0x4(%rbx,%rcx)
sete %al
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/checks/check_map_utils.c
// Function: check_surround_wall
int check_surround_wall(t_game *game)
{
    char    **layout;
    int     x;
    int     y;

    x = game->map.w;
    y = game->map.h;
    layout = game->map.layout;
    while (x--)
    {
        if (layout[0][x] != '1')
            return (0);
        if (layout[y - 1][x] != '1')
            return (0);
    }
    x = game->map.w - 1;
    while (y--)
    {
        if (layout[y][0] != '1')
            return (0);
        if (layout[y][x] != '1')
            return (0);
    }
    return (1);
}

// Assembly:
movslq 0x128(%rdi), %rcx
movslq 0x12c(%rdi), %rdx
movq 0xc8(%rdi), %rsi
movq %rcx, %rdi
movq %rcx, %r8
xorl %eax, %eax
subq $0x1, %r8
jb 0x6ead
movq (%rsi), %r9
cmpb $0x31, -0x1(%r9,%rdi)
jne 0x6eca
movq -0x8(%rsi,%rdx,8), %r9
cmpb $0x31, -0x1(%r9,%rdi)
movq %r8, %rdi
je 0x6e8a
jmp 0x6eca
pushq $0x1
popq %rdi
xorl %eax, %eax
subq $0x1, %rdx
jb 0x6ecb
movq (%rsi,%rdx,8), %r8
cmpb $0x31, (%r8)
jne 0x6eca
cmpb $0x31, -0x1(%r8,%rcx)
je 0x6eb2
retq
movl %edi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/checks/check_map_utils.c
// Function: check_structure
int check_structure(t_game *game)
{
	int	x;
	int	x_hold;
	int	y;
	int	check[3];

	x = game->map.w;
	x_hold = game->map.w;
	y = game->map.h;
	check[0] = 0;
	check[1] = 0;
	check[2] = 0;
	while (y--)
	{
		while (x--)
		{
			if (game->map.layout[y][x] == 'C')
				check[0] = 1;
			if (game->map.layout[y][x] == 'P')
				check[1] = 1;
			if (game->map.layout[y][x] == 'E')
				check[2] = 1;
		}
		x = x_hold;
	}
	return (check[0] && check[1] && check[2]);
}

// Assembly:
pushq %rbx
movslq 0x128(%rdi), %rcx
movslq 0x12c(%rdi), %rdx
xorl %eax, %eax
movl $0x1, %r8d
xorl %esi, %esi
xorl %r9d, %r9d
subq $0x1, %rdx
jb 0x6f29
movq %rcx, %r11
movq %rcx, %r10
subq $0x1, %r10
jb 0x6eea
movq 0xc8(%rdi), %rbx
movq (%rbx,%rdx,8), %rbx
movb -0x1(%rbx,%r11), %r11b
cmpb $0x43, %r11b
cmovel %r8d, %r9d
cmpb $0x50, %r11b
cmovel %r8d, %esi
cmpb $0x45, %r11b
cmovel %r8d, %eax
movq %r10, %r11
jmp 0x6ef6
testl %r9d, %r9d
setne %cl
testl %esi, %esi
setne %dl
andb %cl, %dl
testl %eax, %eax
setne %al
andb %dl, %al
movzbl %al, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/config/game_config.c
// Function: game_config
void	game_config(t_game *game)
{
	game->vars.mlx = mlx_init();
	map_config(game);
	player_config(game);
	enemy_config(game);
	if (game->map.w > 14)
		game->width = 14;
	else
		game->width = game->map.w;
	if (game->map.h > 10)
		game->height = 10;
	else
		game->height = game->map.h;
	game->vars.win = mlx_new_window(game->vars.mlx, game->width * BLOCK_SIZE,
			game->height * BLOCK_SIZE, "Dungeon Zone");
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
callq 0x8060
movq %rax, (%rbx)
movq %rbx, %rdi
callq 0x7032
movq %rbx, %rdi
callq 0x720c
movq %rbx, %rdi
callq 0x7428
movl 0x128(%rbx), %eax
cmpl $0xe, %eax
pushq $0xe
popq %rsi
cmovll %eax, %esi
movl %esi, 0x148(%rbx)
movl 0x12c(%rbx), %eax
cmpl $0xa, %eax
pushq $0xa
popq %rdx
cmovll %eax, %edx
movl %edx, 0x14c(%rbx)
movq (%rbx), %rdi
shll $0x6, %esi
shll $0x6, %edx
leaq 0x30ae(%rip), %rcx      # 0xa052
callq 0x81b0
movq %rax, 0x8(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/config/map_config.c
// Function: get_active_map
void	get_active_map(t_game *game)
{
	int	w;
	int	h;
	int	x;
	int	y;

	w = game->width * BLOCK_SIZE;
	h = game->height * BLOCK_SIZE;
	if (!game->map.map.img)
	{
		create_img(&game->map.map, w, h, game);
		fix_cam(game);
	}
	x = game->map.x * BLOCK_SIZE;
	y = game->map.y * BLOCK_SIZE;
	copy_img_from(&game->map.map, &game->map.full_map, to_array(x, y, w, h));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x148(%rdi), %ebp
movl 0x14c(%rdi), %r14d
shll $0x6, %ebp
shll $0x6, %r14d
leaq 0xf8(%rdi), %r15
cmpq $0x0, 0xf8(%rdi)
jne 0x6ff7
movq %r15, %rdi
movl %ebp, %esi
movl %r14d, %edx
movq %rbx, %rcx
callq 0x69c5
movq %rbx, %rdi
callq 0x7510
movl 0x120(%rbx), %edi
movl 0x124(%rbx), %esi
shll $0x6, %edi
shll $0x6, %esi
addq $0xd0, %rbx
movl %ebp, %edx
movl %r14d, %ecx
callq 0x6961
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x684f
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/config/map_config.c
// Function: map_config
void	map_config(t_game *game)
{
	int		x;
	int		x_holder;
	int		y;

	x = game->map.w;
	x_holder = x;
	y = game->map.h;
	game->map.x = 0;
	game->map.y = 0;
	game->map.map.img = 0;
	create_img(&game->map.full_map, x * BLOCK_SIZE, y * BLOCK_SIZE, game);
	while (y--)
	{
		while (x--)
			draw_block(game, x, y);
		x = x_holder;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq 0x128(%rdi), %r14
movslq 0x12c(%rdi), %r15
andq $0x0, 0x120(%rdi)
andq $0x0, 0xf8(%rdi)
addq $0xd0, %rdi
movl %r14d, %ebp
shll $0x6, %ebp
movl %r15d, %edx
shll $0x6, %edx
movl %ebp, %esi
movq %rbx, %rcx
callq 0x69c5
movq %r15, %rdx
addl $-0x40, %ebp
movl %ebp, 0x4(%rsp)
movq %r14, 0x10(%rsp)
leal -0x1(%r14), %eax
movl %eax, (%rsp)
subq $0x1, %rdx
jb 0x712d
movl %edx, %r12d
shll $0x6, %r12d
movl (%rsp), %r13d
movl 0x4(%rsp), %ebp
movq 0x10(%rsp), %rax
movq %rax, %r15
movq %rdx, 0x8(%rsp)
subq $0x1, %r15
jb 0x7094
movq 0xc8(%rbx), %rcx
movq (%rcx,%rdx,8), %rcx
movzbl -0x1(%rcx,%rax), %r14d
cmpl $0x43, %r14d
je 0x70f1
cmpl $0x50, %r14d
jne 0x70fc
movl %r13d, 0xb4(%rbx)
movq 0x8(%rsp), %rax
movl %eax, 0xb8(%rbx)
jmp 0x70fc
movq %rbx, %rdi
movl %r13d, %esi
callq 0x72c0
pushq $0x30
popq %rdi
movq %rbx, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x713c
movsbl %r14b, %edi
movq %rbx, %rsi
movl %ebp, %edx
movl %r12d, %ecx
callq 0x713c
addl $-0x40, %ebp
decl %r13d
movq %r15, %rax
movq 0x8(%rsp), %rdx
jmp 0x70ba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/config/map_config.c
// Function: set_tile
static void	set_tile(char c, t_game *game, int x, int y)
{
	t_data			tile;
	char			*path;
	static size_t	i;
	int				size;

	size = BLOCK_SIZE;
	if (c == '1')
		path = "./imgs/wall3.xpm";
	if (c == 'E')
		path = "./imgs/exit_lock.xpm";
	if (c == 'C' || c == 'P' || c == '0')
	{
		if (i % 18 == 0)
			path = "./imgs/floor4.xpm";
		else if (i % 28 == 0)
			path = "./imgs/floor5.xpm";
		else
			path = "./imgs/floor3.xpm";
		i++;
	}
	load_img(&tile, path, game);
	copy_img_to(&game->map.full_map, &tile, to_array(x, y, size, size));
	free(tile.img);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %rbx
cmpb $0x45, %dil
leaq 0x2f17(%rip), %rax      # 0xa070
leaq 0x2eff(%rip), %rsi      # 0xa05f
cmoveq %rax, %rsi
addl $-0x30, %edi
cmpl $0x20, %edi
ja 0x71c6
movabsq $0x100080001, %rax      # imm = 0x100080001
btq %rdi, %rax
jae 0x71c6
movq 0x1289d(%rip), %rcx     # 0x19a20
pushq $0x12
popq %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
testq %rdx, %rdx
je 0x71b5
pushq $0x1c
popq %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rsi
testq %rdx, %rdx
leaq 0x2eef(%rip), %rax      # 0xa097
leaq 0x2efa(%rip), %rsi      # 0xa0a9
cmoveq %rax, %rsi
jmp 0x71bc
leaq 0x2ec9(%rip), %rsi      # 0xa085
incq %rcx
movq %rcx, 0x1285a(%rip)     # 0x19a20
movq %rsp, %r15
movq %r15, %rdi
movq %rbx, %rdx
callq 0x6994
addq $0xd0, %rbx
pushq $0x40
popq %rcx
movl %r14d, %edi
movl %ebp, %esi
movl %ecx, %edx
callq 0x6961
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x68d9
movq (%r15), %rdi
callq 0x6190
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/config/player_config.c
// Function: player_config
void	player_config(t_game *game)
{
	t_data		full_sprite;
	t_player	*player;
	int			i;

	i = 0;
	player = &game->player;
	player->steps = 0;
	full_sprite.w = 144;
	full_sprite.h = 256;
	player->w = 48;
	player->h = 64;
	player->frame = 2;
	load_img(&full_sprite, "./imgs/male.xpm", game);
	while (i < 4)
	{
		create_img(&player->sprites[i], player->w, player->h, game);
		copy_img_from(&player->sprites[i], &full_sprite,
			to_array(0, player->h * i, player->w, player->h));
		i++;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
andl $0x0, 0xbc(%rdi)
leaq 0x10(%rdi), %r14
movabsq $0x10000000090, %rax    # imm = 0x10000000090
movq %rsp, %r15
movq %rax, 0x1c(%r15)
movabsq $0x4000000030, %rax     # imm = 0x4000000030
movq %rax, 0xc0(%rdi)
movl $0x2, 0xb0(%rdi)
leaq 0x2e63(%rip), %rsi      # 0xa0bb
movq %r15, %rdi
movq %rbx, %rdx
callq 0x6994
xorl %r12d, %r12d
cmpq $0x4, %r12
je 0x72b3
movl 0xc0(%rbx), %esi
movl 0xc4(%rbx), %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x69c5
movl 0xc0(%rbx), %edx
movl 0xc4(%rbx), %ecx
movl %r12d, %esi
imull %ecx, %esi
xorl %edi, %edi
callq 0x6961
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x684f
incq %r12
addq $0x28, %r14
jmp 0x7266
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/alsmd[P]so_long/src/config/new_item.c
// Function: new_item
void	new_item(t_game *game, int x, int y)
{
	t_item	*begin;
	t_item	*new_item;

	new_item = (t_item *) ft_calloc(1, sizeof(t_item));
	new_item->x = x;
	new_item->y = y;
	new_item->sprite.w = BLOCK_SIZE;
	new_item->sprite.h = BLOCK_SIZE;
	load_img(&new_item->sprite, "./imgs/item.xpm", game);
	begin = game->items;
	while (begin && begin->next)
		begin = begin->next;
	if (begin)
		begin->next = new_item;
	else
		game->items = new_item;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r15d
movq %rdi, %rbx
pushq $0x1
popq %rdi
pushq $0x40
popq %rsi
callq 0x65a0
movq %rax, %r14
movl %r15d, 0x28(%rax)
movl %ebp, 0x2c(%rax)
movabsq $0x4000000040, %rax     # imm = 0x4000000040
movq %rax, 0x1c(%r14)
leaq 0x2dd2(%rip), %rsi      # 0xa0cb
movq %r14, %rdi
movq %rbx, %rdx
callq 0x6994
movq 0x130(%rbx), %rcx
addq $0x130, %rbx            # imm = 0x130
testq %rcx, %rcx
je 0x732a
movq %rcx, %rax
movq 0x38(%rcx), %rcx
testq %rcx, %rcx
jne 0x7312
addq $0x38, %rax
movq %rax, %rbx
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq