LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/mem.c
// Function: mark_roots
void mark_roots(Allocator *allocator) {
    VM *vm = (VM *)allocator;

    // Locals and Temporaries
    for (Value *slot = vm->stack; slot < vm->stack_top; slot++) {
        mark_value(allocator, *slot);
    }

    // Call Stack
    for (int i = 0; i < vm->frame_count; i++) {
        mark_object(allocator, (Object *)vm->frames[i].closure);
    }

    // Globals
    for (int i = 0; i <= vm->globals.hash_mask; i++) {
        Entry *entry = &vm->globals.entries[i];

        if (entry->key != NULL) {
            mark_object(allocator, (Object *)entry->key);
            mark_value(allocator, entry->value);
        }
    }

    // Upvalues
    for (RavUpvalue *upvalue = vm->open_upvalues; upvalue != NULL; ) {
        mark_object(allocator, (Object *)upvalue);
        upvalue = upvalue->next;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $-0x4000000000001, %r14 # imm = 0xFFFBFFFFFFFFFFFF
movabsq $0x3ffffffffffff, %r15  # imm = 0x3FFFFFFFFFFFF
leaq 0x58(%rdi), %r12
cmpq 0x40058(%rdi), %r12
jae 0xabe8
movq (%r12), %rsi
cmpq %r14, %rsi
jbe 0xabdb
andq %r15, %rsi
movq %rbx, %rdi
callq 0xac9d
addq $0x8, %r12
cmpq 0x40058(%rbx), %r12
jb 0xabc7
cmpl $0x0, 0x40c68(%rbx)
jle 0xac1a
leaq 0x40068(%rbx), %r12
xorl %r13d, %r13d
movq (%r12), %rsi
movq %rbx, %rdi
callq 0xac9d
incq %r13
movslq 0x40c68(%rbx), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0xabfb
cmpl $0x0, 0x40c7c(%rbx)
js 0xac71
movq $-0x1, %r12
movl $0x8, %r13d
movq 0x40c70(%rbx), %rbp
movq -0x8(%rbp,%r13), %rsi
testq %rsi, %rsi
je 0xac5e
movq %rbx, %rdi
callq 0xac9d
movq (%rbp,%r13), %rsi
cmpq %r14, %rsi
jbe 0xac5e
andq %r15, %rsi
movq %rbx, %rdi
callq 0xac9d
movslq 0x40c7c(%rbx), %rax
incq %r12
addq $0x10, %r13
cmpq %rax, %r12
jl 0xac30
movq 0x40c80(%rbx), %r14
testq %r14, %r14
je 0xac8e
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac9d
movq 0x20(%r14), %r14
jmp 0xac78
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/mem.c
// Function: mark_object
static void mark_object(Allocator *allocator, Object *object) {
    if (object == NULL) return;
    if (object->marked) return;

#ifdef DEBUG_TRACE_MEMORY
    printf("[Memory] %p get marked: ", object);
    value_print(Obj_Value(object));
    putchar('\n');
#endif

    object->marked = true;

    // Strings and native functions have no nested references, so no need
    // to push them into the gray stack
    if (object->type == OBJ_STRING || object->type == OBJ_CFUNCTION) {
        return;
    }

    // Add the object to the marked stack.
    if (allocator->gray_count == allocator->gray_capacity) {
        int new_capacity = Grow_Capacity(allocator->gray_capacity);
        size_t size = sizeof (Object*) * new_capacity;

        allocator->gray_stack = realloc(allocator->gray_stack, size);
        allocator->gray_capacity = new_capacity;
    }

    allocator->gray_stack[allocator->gray_count++] = object;
}

// Assembly:
testq %rsi, %rsi
je 0xad0b
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, 0x4(%rsi)
jne 0xad06
movb $0x1, 0x4(%rbx)
movl (%rbx), %eax
testl %eax, %eax
je 0xad06
cmpl $0x7, %eax
je 0xad06
movq %rdi, %r14
movl 0x28(%rdi), %eax
cmpl %eax, 0x2c(%rdi)
jne 0xacf3
leal (%rax,%rax), %ecx
cmpl $0x8, %eax
movl $0x8, %r15d
cmovgel %ecx, %r15d
leaq (,%r15,8), %rsi
movq 0x20(%r14), %rdi
callq 0x21b0
movq %rax, 0x20(%r14)
movl %r15d, 0x28(%r14)
movq 0x20(%r14), %rax
movslq 0x2c(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x2c(%r14)
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/shmem_init.c
// Function: shm_alloc
static void* shm_alloc(size_t size, unsigned int gkey, int id, int* ret_fd)
{
	if (gkey == 0) return(0);

	int fd;
	void* p0;

	struct timeval t0,t1;
	int timeout;

	char shmobj0[64];

	snprintf(shmobj0,64,"/" SHM_ALLOC_SHMOBJ_TAG ".%d.%d",gkey,id);

	if (__shmem.my_pe == 0) {

		fd = shm_open( shmobj0,O_RDWR|O_CREAT|O_EXCL,0);

		if (fd < 0) {
			fprintf(stderr,"shmem error: master shm_open failed\n");
			exit(-1);
		}

		ftruncate(fd,size);

		p0 = mmap( 0,size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);

		if (!p0) {
			close(fd);
			if (ret_fd) *ret_fd = -1;
			return(0);
		}

		fchmod(fd,S_IRUSR|S_IWUSR);

	} else {

		timeout = 0;
		gettimeofday(&t0,0);
		t0.tv_sec += SHM_ALLOC_TIMEOUT;

		do {
			fd = shm_open( shmobj0, O_RDWR,0);
			gettimeofday(&t1,0);
			timeout = (t1.tv_sec > t0.tv_sec && t1.tv_usec > t0.tv_usec)? 1:0;
		} while( (fd < 0) && !timeout );
	
		if (timeout) {
			errno = ENOKEY;
			if(ret_fd) *ret_fd = -1;
			return(0);
		}

		ftruncate(fd,size);

		p0 = mmap( 0,size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);

		if (!p0) {
			close(fd);
			if (ret_fd) *ret_fd = -1;
			return(0);
		}

	}

	if (ret_fd) *ret_fd = fd;

	return(p0);	

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
testl %esi, %esi
je 0x1c3a
movq %rcx, %rbx
movl %edx, %r8d
movl %esi, %ecx
movq %rdi, %r14
leaq 0x2641(%rip), %rdx      # 0x41be
leaq 0x30(%rsp), %rdi
movl $0x40, %esi
xorl %eax, %eax
callq 0x1100
cmpl $0x0, 0x465f(%rip)      # 0x61f4
je 0x1c42
movq %rbx, 0x8(%rsp)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x1120
movq (%r15), %r13
movq 0x8(%r15), %rbx
addq $0xa, %r13
movq %r13, (%r15)
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x1250
movl %eax, %ebp
movq %r12, %rdi
xorl %esi, %esi
callq 0x1120
cmpq %r13, 0x10(%rsp)
setle %cl
cmpq %rbx, 0x18(%rsp)
setle %al
orb %cl, %al
testl %ebp, %ebp
jns 0x1bfc
testb %al, %al
jne 0x1bc7
testb %al, %al
je 0x1c93
movl %ebp, %edi
movq %r14, %rsi
callq 0x1110
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x10e0
testq %rax, %rax
movq 0x8(%rsp), %rbx
je 0x1cad
movq %rax, %r14
jmp 0x1cbc
xorl %r14d, %r14d
jmp 0x1cc3
leaq 0x30(%rsp), %rdi
movl $0xc2, %esi
xorl %edx, %edx
callq 0x1250
testl %eax, %eax
js 0x1cd5
movl %eax, %ebp
movl %eax, %edi
movq %r14, %rsi
callq 0x1110
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x10e0
testq %rax, %rax
je 0x1cad
movq %rax, %r14
movl %ebp, %edi
movl $0x180, %esi            # imm = 0x180
callq 0x11e0
jmp 0x1cbc
callq 0x1060
movl $0x7e, (%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq 0x8(%rsp), %rbx
jmp 0x1cbc
movl %ebp, %edi
callq 0x1150
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x1cc3
movl %ebp, (%rbx)
movq %r14, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x12d3
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/shmem_sync_all.c
// Function: shmem_sync_all
SHMEM_SCOPE
void shmem_sync_all(void)
{
	int i;

	debug("shmem_sync_all begin");

	volatile int* pcount
		= (volatile int*)shmem_ptr((void*)&__shmem.giant_barrier_count,0);

	sem_t* pgate1 = (sem_t*)shmem_ptr((void*)&__shmem.giant_barrier_gate1,0);
	sem_t* pgate2 = (sem_t*)shmem_ptr((void*)&__shmem.giant_barrier_gate2,0);

	__giant_lock();
	if (++(*pcount) == __shmem.n_pes) {
		debug("shmem_sync_all: before sem_post on pgate1");
		for(i=0;i<__shmem.n_pes;i++) sem_post(pgate1);
		debug("shmem_sync_all: after sem_post on pgate1");
	}
	__giant_unlock();

	debug("shmem_sync_all: before sem_wait on pgate1");
	sem_wait(pgate1);
	debug("shmem_sync_all: after sem_wait on pgate1");

	__giant_lock();
	if (--(*pcount) == 0) {
		debug("shmem_sync_all: before sem_post on pgate2");
		for(i=0;i<__shmem.n_pes;i++) sem_post(pgate2);
		debug("shmem_sync_all: after sem_post on pgate2");
	}
	__giant_unlock();

	sem_wait(pgate2);

	debug("shmem_sync_all end");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x44a5(%rip), %r12      # 0x61f0
leaq 0xc8(%r12), %rdi
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x1cf4
movq %rax, %r14
leaq 0xd0(%r12), %rdi
xorl %esi, %esi
callq 0x1cf4
movq %rax, %r15
leaq 0xf0(%r12), %rdi
xorl %esi, %esi
callq 0x1cf4
movq %rax, %rbx
movq 0xc0(%r12), %rdi
callq 0x1070
movl (%r14), %eax
incl %eax
movl %eax, (%r14)
movl 0x8(%r12), %ecx
cmpl %ecx, %eax
setne %al
testl %ecx, %ecx
setle %cl
orb %al, %cl
jne 0x1dbc
movq %r15, %rdi
callq 0x1160
incl %ebp
cmpl 0x8(%r12), %ebp
jl 0x1dab
movq 0xc0(%r12), %rdi
callq 0x1160
movq %r15, %rdi
callq 0x1070
movq 0xc0(%r12), %rdi
callq 0x1070
decl (%r14)
jne 0x1dfe
cmpl $0x0, 0x8(%r12)
jle 0x1dfe
xorl %ebp, %ebp
movq %rbx, %rdi
callq 0x1160
incl %ebp
cmpl 0x8(%r12), %ebp
jl 0x1ded
movq 0xc0(%r12), %rdi
callq 0x1160
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1070
nop
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/xmalloc.c
// Function: wrtmessage
static void
wrtmessage(const char *p1, const char *p2, const char *p3, const char *p4)
{

    write(STDERR_FILENO, p1, strlen(p1));
    write(STDERR_FILENO, p2, strlen(p2));
    write(STDERR_FILENO, p3, strlen(p3));
    write(STDERR_FILENO, p4, strlen(p4));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
callq 0x10c0
movl $0x2, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x1090
movq %r15, %rdi
callq 0x10c0
movl $0x2, %edi
movq %r15, %rsi
movq %rax, %rdx
callq 0x1090
movq %r14, %rdi
callq 0x10c0
movl $0x2, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x1090
movq %rbx, %rdi
callq 0x10c0
movl $0x2, %edi
movq %rbx, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1090
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/xmalloc.c
// Function: xmalloc_init
struct __xmem_struct* xmalloc_init( void* ptr, size_t size, int flags )
{
	struct __xmem_struct* xm = (struct __xmem_struct*)
		calloc(1,sizeof(struct __xmem_struct));

	xm->malloc_cache = 16;

	xm->malloc_hint = 0;

	malloc_init(xm);
	
	xm->membrk = xm->memlo = ptr;
	xm->memhi = (void*)((intptr_t)ptr + size);

	return xm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %edi
movl $0x98, %esi
callq 0x1170
movq %rax, %r15
movq $0x10, 0x18(%rax)
movl $0x0, 0x6c(%rax)
movq %rax, %rdi
callq 0x1eed
movq %r14, 0x80(%r15)
movq %r14, 0x90(%r15)
addq %r14, %rbx
movq %rbx, 0x88(%r15)
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/xmalloc.c
// Function: xposix_memalign
int
xposix_memalign(struct __xmem_struct* xm, void **memptr, size_t alignment, 
	size_t size)
{
    int err;
    void *result;

    /* Make sure that alignment is a large enough power of 2. */
    if (((alignment - 1) & alignment) != 0 || alignment < sizeof(void *))
	    return EINVAL;

    /* 
     * (size & alignment) is enough to assure the requested alignment, since
     * the allocator always allocates power-of-two blocks.
     */
    err = errno; /* Protect errno against changes in pubrealloc(). */
    result = pubrealloc(xm, NULL, (size & alignment),
		" in xposix_memalign()");
    errno = err;

    if (result == NULL)
	return ENOMEM;

    *memptr = result;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x16, %r14d
cmpq $0x8, %rdx
jb 0x2597
movq %rcx, %r15
movq %rdx, %r13
movq %rdx, %rax
shrq %rax
movabsq $0x5555555555555555, %rcx # imm = 0x5555555555555555
andq %rax, %rcx
movq %rdx, %rax
subq %rcx, %rax
movabsq $0x3333333333333333, %rcx # imm = 0x3333333333333333
movq %rax, %rdx
andq %rcx, %rdx
shrq $0x2, %rax
andq %rcx, %rax
addq %rdx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
addq %rax, %rcx
movabsq $0xf0f0f0f0f0f0f0f, %rax # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rax, %rcx
shrq $0x38, %rcx
cmpl $0x1, %ecx
ja 0x2597
movq %rdi, %r12
movq %rsi, (%rsp)
callq 0x1060
movq %rax, %rbp
movl (%rax), %ebx
andq %r13, %r15
leaq 0x1cde(%rip), %rcx      # 0x424e
xorl %r14d, %r14d
movq %r12, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x21f4
movl %ebx, (%rbp)
testq %rax, %rax
je 0x2591
movq (%rsp), %rcx
movq %rax, (%rcx)
jmp 0x2597
movl $0xc, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/xmalloc.c
// Function: xcalloc
void *
xcalloc(struct __xmem_struct* xm, size_t num, size_t size)
{
    void *ret;

    if (size != 0 && (num * size) / size != num) {
	/* size_t overflow. */
	errno = ENOMEM;
	return (NULL);
    }

    ret = pubrealloc(xm, NULL, num * size, " in dcalloc():");

    if (ret != NULL)
	memset(ret, 0, num * size);

    return ret;
}

// Assembly:
pushq %rbx
movq %rdx, %rbx
testq %rdx, %rdx
je 0x25c9
movq %rbx, %rax
mulq %rsi
jno 0x25c9
callq 0x1060
movl $0xc, (%rax)
xorl %eax, %eax
jmp 0x25f1
imulq %rsi, %rbx
leaq 0x1c90(%rip), %rcx      # 0x4264
xorl %esi, %esi
movq %rbx, %rdx
callq 0x21f4
testq %rax, %rax
je 0x25f1
movq %rax, %rdi
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
jmp 0x1130
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/autogen/shmem_fcollect64.c
// Function: shmem_fcollect64
void shmem_fcollect64(void *dest, const void *source, size_t nelems, 
	int pe_start, int log_pe_stride, int pe_size, long* psync)
{
	const int step = 1 << log_pe_stride;
	const int pe_shift = pe_size << log_pe_stride;
	const int pe_end = pe_start + pe_shift;
	const int my_pe = __shmem.my_pe;

	const int nbytes = nelems << 3;

	const ptrdiff_t offset = nbytes * ((my_pe - pe_start) >> log_pe_stride);
	const void* target = (void*)((intptr_t)dest + offset);

	int pe = my_pe;

	do {
		shmemx_memcpy(shmem_ptr(target,pe), source, nelems*sizeof(int64_t));
		pe += step;
	} while (pe < pe_end);

	pe -= pe_shift;
	while (pe < my_pe) {
		shmemx_memcpy(shmem_ptr(target,pe), source, nelems*sizeof(int64_t));
		pe += step;
	}
	shmem_barrier(pe_start, log_pe_stride, pe_size, psync);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r10d
movq %rdx, %r15
movq %rsi, %r12
movl $0x1, %r14d
movl %r8d, %ecx
shll %cl, %r14d
movl %r9d, 0xc(%rsp)
movl %r9d, %edx
shll %cl, %edx
leaq 0x318c(%rip), %rax      # 0x61f0
movl 0x4(%rax), %ebx
movl %ebx, %eax
subl %r10d, %eax
movl %r8d, 0x8(%rsp)
sarl %cl, %eax
movq 0x60(%rsp), %rcx
movq %rcx, 0x18(%rsp)
movq %r10, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
leal (%rdx,%r10), %ebp
imull %r15d, %eax
shll $0x3, %eax
movslq %eax, %r13
addq %rdi, %r13
shlq $0x3, %r15
movl %ebx, 0x4(%rsp)
movq %r13, %rdi
movl %ebx, %esi
callq 0x1cf4
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x31bc
addl %r14d, %ebx
cmpl %ebp, %ebx
jl 0x30a0
subl 0x10(%rsp), %ebx
movl 0x4(%rsp), %ebp
cmpl %ebp, %ebx
jge 0x30e8
movq %r13, %rdi
movl %ebx, %esi
callq 0x1cf4
movq %rax, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x31bc
addl %r14d, %ebx
jmp 0x30c7
movq 0x20(%rsp), %rdi
movl 0x8(%rsp), %esi
movl 0xc(%rsp), %edx
movq 0x18(%rsp), %rcx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3110
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/USArmyResearchLab[P]ARL_OpenSHMEM/src/shmem_sync.c
// Function: shmem_sync
SHMEM_SCOPE
void shmem_sync(int pe_start, int log_pe_stride, int pe_size, long *psync)
{
	debug("[%d] shmem_sync begin",__shmem.my_pe);

	int pe_size_stride = pe_size << log_pe_stride;
	int pe_end = pe_size_stride + pe_start;

	int c, r;
	for (c = 0, r = (1 << log_pe_stride); r < pe_size_stride; c++, r <<= 1)
	{
		int to = __shmem.my_pe + r;
		if (to >= pe_end) to -= pe_size_stride;

		volatile long* lock = (volatile long*)(psync + c);
		long * remote_lock = (long*)shmem_ptr((void*)lock, to);

		__set_spin_lock(remote_lock);

		__clear_spin_lock(lock);
	}

	debug("[%d] shmem_sync end",__shmem.my_pe);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %ecx
shll %cl, %ebp
movl $0x1, %r15d
shll %cl, %r15d
cmpl %ebp, %r15d
jge 0x31ad
movl %edi, %r14d
addl %ebp, %r14d
leaq 0x307d(%rip), %r12      # 0x61f0
xorl %r13d, %r13d
movl 0x4(%r12), %esi
addl %r15d, %esi
cmpl %r14d, %esi
movl %ebp, %eax
cmovll %r13d, %eax
subl %eax, %esi
movq %rbx, %rdi
callq 0x1cf4
movq %rax, %rdi
callq 0x31f3
movq %rbx, %rdi
callq 0x31e4
addl %r15d, %r15d
addq $0x8, %rbx
cmpl %ebp, %r15d
jl 0x3176
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/aux_funcs.c
// Function: create_state
t_qlayer	*create_state(int node, t_vect *path)
{
	t_qlayer	*new = (t_qlayer*)malloc(sizeof(t_qlayer));
	t_vect		*copy = (t_vect*)malloc(sizeof(t_vect));

	init_vector(copy);
	for (int i = 0;i < (int)path->used; i++)
		push_back(copy, path->tab[i]);
	new->prefix = copy;
	new->node = node;
	return new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
movl $0x20, %edi
callq 0x1070
movq %rax, %r15
movl $0x18, %edi
callq 0x1070
movq %rax, %r12
movq %rax, %rdi
callq 0x1e98
cmpl $0x0, 0x10(%r14)
jle 0x1204
xorl %r13d, %r13d
movq (%r14), %rax
movl (%rax,%r13,4), %esi
movq %r12, %rdi
callq 0x1f4b
incq %r13
movslq 0x10(%r14), %rax
cmpq %rax, %r13
jl 0x11e9
movq %r12, (%r15)
movl %ebx, 0x18(%r15)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/aux_funcs.c
// Function: append
t_vect	*append(t_vect *src, int add)
{
	t_vect		*copy = (t_vect*)malloc(sizeof(t_vect));

	init_vector(copy);
	for (int i = 0; i < (int)src->used; i++)
		push_back(copy, src->tab[i]);
	push_back(copy, add);
	return copy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r15
movl $0x18, %edi
callq 0x1070
movq %rax, %r14
movq %rax, %rdi
callq 0x1e98
cmpl $0x0, 0x10(%r15)
jle 0x1267
xorl %r12d, %r12d
movq (%r15), %rax
movl (%rax,%r12,4), %esi
movq %r14, %rdi
callq 0x1f4b
incq %r12
movslq 0x10(%r15), %rax
cmpq %rax, %r12
jl 0x124c
movq %r14, %rdi
movl %ebx, %esi
callq 0x1f4b
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/comparators.c
// Function: cmp_path
int		cmp_path(const void *p, const void *q)
{
	size_t lastp = ((t_vect*)p)->used;
	size_t lastq = ((t_vect*)q)->used;
	if ((*(t_vect*)p).tab[lastp-1] == (*(t_vect*)q).tab[lastq-1])
		return (((t_vect*)p)->used - ((t_vect*)q)->used);
	return ((*(t_vect*)p).tab[lastp-1] - (*(t_vect*)q).tab[lastq-1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
movq (%rsi), %rdx
movq 0x10(%rsi), %rsi
movl -0x4(%rax,%rcx,4), %eax
subl %esi, %ecx
subl -0x4(%rdx,%rsi,4), %eax
cmovel %ecx, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/graph.c
// Function: add_edge
void	add_edge(t_graph *g, int a, int b)
{
	g->edg++;
	push_back(&g->adj[a],b);
	if (g->direct == 0)
	{
		g->edg++;
		push_back(&g->adj[b],a);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebx
movq %rdi, %r14
incl 0x2c(%rdi)
movslq %esi, %rax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq (%r14), %rdi
movl %edx, %esi
callq 0x1f4b
cmpl $0x0, 0x34(%r14)
je 0x1334
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
incl 0x2c(%r14)
movslq %r15d, %rax
leaq (%rax,%rax,2), %rdi
shlq $0x3, %rdi
addq (%r14), %rdi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x1f4b
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/graph.c
// Function: init_adj
int	init_adj(t_graph *g)
{
	if(!(g->adj = (t_vect*)malloc(sizeof(t_vect)*g->vertx)))
		return 0;
	for (int i = 0; i < g->vertx; i++)
		if (!(init_vector(&g->adj[i])))
			return 0;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x28(%rdi), %rax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdi
callq 0x1070
movq %rax, (%rbx)
testq %rax, %rax
je 0x1406
cmpl $0x0, 0x28(%rbx)
setle %r14b
jle 0x1400
movq (%rbx), %rdi
callq 0x1e98
testl %eax, %eax
je 0x1400
movl $0x18, %edi
xorl %r15d, %r15d
incq %r15
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
setge %r14b
jge 0x1400
leaq 0x18(%rdi), %r12
addq (%rbx), %rdi
callq 0x1e98
movq %r12, %rdi
testl %eax, %eax
jne 0x13dd
movzbl %r14b, %eax
jmp 0x1408
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/graph.c
// Function: get_dimensions
int		get_dimensions(t_graph *new)
{
	int n, m, dir, search;

	scanf("%d %d %d %d", &n, &m, &dir, &search);
	if (!valid_dimensions(n,m,new))
	{
		free(new);
		return 0;
	}
	if (!valid_params(dir, search, new))
	{
		free(new);
		return 0;
	}
	if (!init_adj(new))
		return 0;
	new->vis = (int*)malloc(sizeof(int) * new->vertx);
	new->rank = (int*)malloc(sizeof(int) * new->vertx);
	new->search = search - 1;
	memset(new->vis, 0, new->vertx * sizeof(int));
	memset(new->rank, 0 , new->vertx * sizeof(int));
	new->ranked = (t_vect*)malloc(sizeof(t_vect) * (new->vertx + 1));
	for (int i = 0; i < new->vertx + 1 ; i++)
		init_vector(&(new->ranked[i]));
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0xc18(%rip), %rdi       # 0x2044
xorl %r14d, %r14d
leaq -0x38(%rbp), %r15
leaq -0x34(%rbp), %r12
leaq -0x30(%rbp), %rcx
leaq -0x2c(%rbp), %r8
movq %r15, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x1080
movl (%r15), %edi
movl (%r12), %esi
movq %rbx, %rdx
callq 0x1e11
testl %eax, %eax
je 0x1525
movl -0x30(%rbp), %edi
movl -0x2c(%rbp), %esi
movq %rbx, %rdx
callq 0x1d70
testl %eax, %eax
je 0x1525
movq %rbx, %rdi
callq 0x1398
testl %eax, %eax
je 0x153f
movslq 0x28(%rbx), %r13
leaq (,%r13,4), %r14
movq %r14, %rdi
callq 0x1070
movq %rax, %r15
movq %rax, 0x18(%rbx)
movq %r14, %rdi
callq 0x1070
movq %rax, %r12
movq %rax, 0x20(%rbx)
movl -0x2c(%rbp), %eax
decl %eax
movl %eax, 0x38(%rbx)
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1060
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x1060
leaq (,%r13,2), %rax
addq %r13, %rax
leaq 0x18(,%rax,8), %rdi
callq 0x1070
movq %rax, 0x10(%rbx)
movl $0x1, %r14d
cmpl $0x0, 0x28(%rbx)
js 0x152d
movq $-0x1, %r15
xorl %r12d, %r12d
movq 0x10(%rbx), %rdi
addq %r12, %rdi
callq 0x1e98
movslq 0x28(%rbx), %rax
incq %r15
addq $0x18, %r12
cmpq %rax, %r15
jl 0x1507
jmp 0x152d
movq %rbx, %rdi
callq 0x1030
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
jmp 0x152d
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/graph.c
// Function: get_edges
int 	get_edges(t_graph *g)
{
	t_pair *got = (t_pair*)malloc(sizeof(t_pair)*g->in_edg);

	for (int i = 0; i < g->in_edg; i++)
	{
		scanf("%d %d",&(got[i].x),&(got[i].y));
		if (!valid_edge(got, i, g))
			return (error_edge(got, i));
	}
	insert_edges(got, g);
	free(got);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq 0x30(%rdi), %r15
leaq (,%r15,8), %rdi
callq 0x1070
movq %rax, %r14
testq %r15, %r15
setg %r13b
jle 0x15ee
leaq 0x4(%r14), %rdx
leaq 0xacd(%rip), %rdi       # 0x204a
xorl %r15d, %r15d
movq %r14, %rsi
xorl %eax, %eax
callq 0x1080
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x1d9b
testl %eax, %eax
je 0x15e1
movq %r14, %r12
addq $0xc, %r12
xorl %r15d, %r15d
incq %r15
movslq 0x30(%rbx), %rax
cmpq %rax, %r15
setl %r13b
jge 0x15ee
leaq -0x4(%r12), %rsi
leaq 0xa89(%rip), %rdi       # 0x204a
movq %r12, %rdx
xorl %eax, %eax
callq 0x1080
movq %r14, %rdi
movl %r15d, %esi
movq %rbx, %rdx
callq 0x1d9b
addq $0x8, %r12
testl %eax, %eax
jne 0x15a5
movq %r14, %rdi
movl %r15d, %esi
callq 0x12ac
jmp 0x15ee
testb %r13b, %r13b
jne 0x160b
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1357
movq %r14, %rdi
callq 0x1030
movl $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/jalalium[P]graph_algorithms_task/src_ranking/graph.c
// Function: generate_graph
t_graph *generate_graph()
{
	t_graph *new = (t_graph*)malloc(sizeof(t_graph));
	if (!get_dimensions(new))
		error(WRONG_INPUT);
	if (!get_edges(new))
		error(WRONG_EDGE);
	return (new);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl $0x40, %edi
callq 0x1070
movq %rax, %rbx
movq %rax, %rdi
callq 0x1411
testl %eax, %eax
jne 0x1640
xorl %edi, %edi
callq 0x12cc
movq %rbx, %rdi
callq 0x1544
testl %eax, %eax
jne 0x1656
movl $0x1, %edi
callq 0x12cc
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/graph.c
// Function: find_all_paths
void	find_all_paths(t_graph *g, int start)
{
	t_vect *spur = (t_vect*)malloc(sizeof(t_vect));
	t_queue *bfs = init_queue(); 
	init_vector(spur);
	push_back(spur, start);
	push_q(bfs, create_state(start, spur));
	while (bfs->size > 0)
	{
		t_qlayer *front = bfs->head;
		for (int i = 0; i < (int)g->adj[front->node].used; i++)
		{
			for (int j = 0; j < (int)front->prefix->used; j++)
				if (front->prefix->tab[j] == g->adj[front->node].tab[i])
					goto st;
			add_path(g, append(front->prefix, g->adj[front->node].tab[i]), start);
			push_q(bfs, create_state(g->adj[front->node].tab[i], append(front->prefix, g->adj[front->node].tab[i])));
st:;
		}	
		pop_q(bfs);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl $0x18, %edi
callq 0x1070
movq %rax, %r12
xorl %eax, %eax
callq 0x1d56
movq %rax, %r15
movq %r12, %rdi
callq 0x1e98
movq %r12, %rdi
movl %ebx, %esi
callq 0x1f4b
movl %ebx, -0x2c(%rbp)
movl %ebx, %edi
movq %r12, %rsi
callq 0x11aa
movq %r15, %rdi
movq %rax, %rsi
callq 0x1cb4
cmpq $0x0, 0x10(%r15)
je 0x179a
movq (%r15), %r13
movq (%r14), %rax
movslq 0x18(%r13), %rcx
leaq (%rcx,%rcx,2), %rdx
cmpl $0x0, 0x10(%rax,%rdx,8)
jle 0x178d
xorl %ebx, %ebx
movq (%r13), %rdi
movq 0x10(%rdi), %rsi
movl $0x7, %edx
leaq (%rcx,%rcx,2), %rcx
testl %esi, %esi
jle 0x1718
movq (%rdi), %r8
movq (%rax,%rcx,8), %r9
movl (%r9,%rbx,4), %r9d
andl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
xorl %r10d, %r10d
cmpl %r9d, (%r8,%r10,4)
je 0x1713
incq %r10
cmpq %r10, %rsi
jne 0x1703
jmp 0x1718
movl $0xa, %edx
cmpl $0xa, %edx
je 0x1771
cmpl $0x7, %edx
jne 0x178d
movq (%rax,%rcx,8), %rax
movl (%rax,%rbx,4), %esi
callq 0x121d
movq %r14, %rdi
movq %rax, %rsi
movl -0x2c(%rbp), %edx
callq 0x1c2a
movq (%r14), %rax
movslq 0x18(%r13), %rcx
leaq (%rcx,%rcx,2), %rcx
movq (%rax,%rcx,8), %rax
movl (%rax,%rbx,4), %r12d
movq (%r13), %rdi
movl %r12d, %esi
callq 0x121d
movl %r12d, %edi
movq %rax, %rsi
callq 0x11aa
movq %r15, %rdi
movq %rax, %rsi
callq 0x1cb4
incq %rbx
movq (%r14), %rax
movslq 0x18(%r13), %rcx
leaq (%rcx,%rcx,2), %rdx
movslq 0x10(%rax,%rdx,8), %rdx
cmpq %rdx, %rbx
jl 0x16da
movq %r15, %rdi
callq 0x1cf2
jmp 0x16b4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/main_rank.c
// Function: all_paths_are_good
int		all_paths_are_good(t_graph *g, int src, int dest, int rank)
{
	size_t pos = 0;
	int		tag = 0;

	while (pos < g->paths[src]->used)
	{
		if (g->paths[src]->path[pos].tab[g->paths[src]->path[pos].used - 1] != dest )
		{
			pos++;
			continue;
		}
		tag = 0;
		if ((int)g->paths[src]->path[pos].used <= 2)
			return 0;
		for (int i = 1; i < (int)g->paths[src]->path[pos].used - 1; i++)
		{
			if (g->rank[g->paths[src]->path[pos].tab[i]] == 0 || g->rank[g->paths[src]->path[pos].tab[i]] > rank)
			{
				tag = 1;
				break;
			}
		}
		if (!tag)
			return 0;
		pos++;
	}
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movq 0x8(%rdi), %rax
movslq %esi, %rsi
movq (%rax,%rsi,8), %r8
movq 0x10(%r8), %rsi
movl $0x1, %eax
testq %rsi, %rsi
je 0x1823
movq (%r8), %r8
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r11
movq (%r8,%r11,8), %r10
movq 0x10(%r8,%r11,8), %r11
cmpl %edx, -0x4(%r10,%r11,4)
jne 0x1817
cmpl $0x3, %r11d
jl 0x1821
decl %r11d
movq 0x20(%rdi), %rbx
movl $0x1, %r14d
movslq (%r10,%r14,4), %r15
movl (%rbx,%r15,4), %r15d
testl %r15d, %r15d
je 0x1817
cmpl %ecx, %r15d
jg 0x1817
incq %r14
cmpq %r14, %r11
jne 0x17fb
jmp 0x1821
incq %r9
cmpq %rsi, %r9
jne 0x17d4
jmp 0x1823
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/main_rank.c
// Function: main
int main()
{
	t_graph *g;
	g = generate_graph();
	init_paths(g);
	int unexplored = 1;
	// finds all paths between all points
	for (int i = 0; i < g->vertx; i++)
		find_all_paths(g, i);
	// loops over all scc s
	while (unexplored)
	{
		unexplored = 0;
		// greedy search for a minimal ranking
		rank(g, g->search);
		// check for unexplored vertices
		for (int i = 0; i < g->vertx; i++)
			if (g->rank[i] == 0)
			{
			   unexplored = 1;
			   g->search = i;
			}
	}
	for (int i = 0; i < g->vertx; i++)
		printf("%d ", g->rank[i]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x161a
movq %rax, %rbx
movq %rax, %rdi
callq 0x1a98
cmpl $0x0, 0x28(%rbx)
jle 0x1a49
movq %rbx, %rdi
movl %r14d, %esi
callq 0x1660
incl %r14d
cmpl 0x28(%rbx), %r14d
jl 0x1a11
jmp 0x1a49
movq 0x20(%rbx), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpl $0x0, (%rcx,%rdx,4)
jne 0x1a3d
movl %edx, 0x38(%rbx)
movl $0x1, %esi
incq %rdx
cmpq %rdx, %rax
jne 0x1a2f
testl %esi, %esi
je 0x1a5d
movl 0x38(%rbx), %esi
movq %rbx, %rdi
callq 0x182a
movslq 0x28(%rbx), %rax
testq %rax, %rax
jg 0x1a27
cmpl $0x0, 0x28(%rbx)
jle 0x1a8b
leaq 0x5e6(%rip), %r14       # 0x2050
xorl %r15d, %r15d
movq 0x20(%rbx), %rax
movl (%rax,%r15,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1050
incq %r15
movslq 0x28(%rbx), %rax
cmpq %rax, %r15
jl 0x1a6d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/path_routines.c
// Function: init_paths
void	init_paths(t_graph *g)
{
	t_paths **new = (t_paths**)malloc(sizeof(t_paths*) * g->vertx);

	for (int i = 0; i < g->vertx ; i++)
	{
		new[i] = (t_paths*)malloc(sizeof(t_paths));
		new[i]->path = (t_vect*)malloc(sizeof(t_vect)*50);
		for (int j = 0; j < 50; j++)
			init_vector(&new[i]->path[j]);
		new[i]->size = 50;
		new[i]->used = 0;
	}
	g->paths = new;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movslq 0x28(%rdi), %r15
leaq (,%r15,8), %rdi
callq 0x1070
movq %rax, %r14
testq %r15, %r15
jle 0x1b1f
xorl %r12d, %r12d
movl $0x18, %edi
callq 0x1070
movq %rax, %r15
movq %rax, (%r14,%r12,8)
movl $0x4b0, %edi            # imm = 0x4B0
callq 0x1070
movq %rax, (%r15)
xorl %r15d, %r15d
movq (%r14,%r12,8), %rax
movq (%rax), %rdi
addq %r15, %rdi
callq 0x1e98
addq $0x18, %r15
cmpq $0x4b0, %r15            # imm = 0x4B0
jne 0x1ae3
movq (%r14,%r12,8), %rax
movq $0x32, 0x8(%rax)
movq $0x0, 0x10(%rax)
incq %r12
movslq 0x28(%rbx), %rax
cmpq %rax, %r12
jl 0x1ac2
movq %r14, 0x8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/path_routines.c
// Function: extend_paths
void	extend_paths(t_graph *g, int start)
{
	size_t new_size = g->paths[start]->size * 2;

	t_vect *copy = (t_vect*)malloc(sizeof(t_vect)*new_size); 
	for (int i = 0; i < (int)new_size; i++)
		init_vector(&copy[i]);
	for (int i = 0; i < (int)g->paths[start]->size; i++)
	{
		for (int j = 0; j < (int)g->paths[start]->path[i].used; j++)
			push_back(&copy[i],g->paths[start]->path[i].tab[j]);
	}
	g->paths[start]->path = copy;
	g->paths[start]->size = new_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movslq %esi, %r12
movq (%rax,%r12,8), %rax
movq 0x8(%rax), %rax
leaq (%rax,%rax), %r13
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
callq 0x1070
movq %rax, -0x30(%rbp)
testl %r13d, %r13d
jle 0x1b88
movl %r13d, %r14d
andl $0x7ffffffe, %r14d      # imm = 0x7FFFFFFE
movq -0x30(%rbp), %r15
movq %r15, %rdi
callq 0x1e98
addq $0x18, %r15
decq %r14
jne 0x1b77
movq %r13, -0x38(%rbp)
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rcx
cmpl $0x0, 0x8(%rcx)
jle 0x1c08
xorl %esi, %esi
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rax
movq %rsi, -0x40(%rbp)
leaq (%rsi,%rsi,2), %r14
cmpl $0x0, 0x10(%rax,%r14,8)
jle 0x1bf0
leaq (%rax,%r14,8), %rax
movq -0x30(%rbp), %rcx
leaq (%rcx,%r14,8), %r15
xorl %r13d, %r13d
movq (%rax), %rax
movl (%rax,%r13,4), %esi
movq %r15, %rdi
callq 0x1f4b
incq %r13
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rax
movq (%rax), %rax
leaq (%rax,%r14,8), %rax
movslq 0x10(%rax), %rcx
cmpq %rcx, %r13
jl 0x1bc6
movq -0x40(%rbp), %rsi
incq %rsi
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rcx
movslq 0x8(%rcx), %rdx
cmpq %rdx, %rsi
jl 0x1b9c
movq -0x30(%rbp), %rdx
movq %rdx, (%rcx)
movq (%rax,%r12,8), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/path_routines.c
// Function: add_path
void	add_path(t_graph *g, t_vect *new, int start)
{
	size_t pos = g->paths[start]->used;
	size_t size = g->paths[start]->size;

	if (pos >= size)
		extend_paths(g, start);
	for (int i = 0 ; i < (int)new->used; i++)
		push_back(&g->paths[start]->path[pos], new->tab[i]);
	g->paths[start]->used++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movslq %edx, %r15
movq (%rax,%r15,8), %rax
movq 0x10(%rax), %r13
cmpq 0x8(%rax), %r13
jb 0x1c5d
movq %rbx, %rdi
movl %edx, %esi
callq 0x1b2c
cmpl $0x0, 0x10(%r14)
jle 0x1c96
xorl %r12d, %r12d
leaq (%r13,%r13,2), %r13
shlq $0x3, %r13
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rax
movq (%rax), %rdi
addq %r13, %rdi
movq (%r14), %rax
movl (%rax,%r12,4), %esi
callq 0x1f4b
incq %r12
movslq 0x10(%r14), %rax
cmpq %rax, %r12
jl 0x1c70
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rax
incq 0x10(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/queue.c
// Function: push_q
void	push_q(t_queue *que, t_qlayer *new)
{
	if (que->size == 0)
	{
		new->next = NULL;
		new->prev = NULL;
		que->head = new;
		que->tail = new;
	}
	else
	{
		new->prev = que->tail;
		que->tail->next = new;
		que->tail = new;
		new->next = NULL;
	}
	que->size++;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1cdc
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rcx
movq %rcx, 0x8(%rsi)
movq %rsi, 0x10(%rcx)
movq %rsi, 0x8(%rdi)
movq $0x0, 0x10(%rsi)
popq %rbp
jmp 0x1cea
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movq %rsi, (%rdi)
movq %rsi, 0x8(%rdi)
incq %rax
movq %rax, 0x10(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/queue.c
// Function: pop_q
void	pop_q(t_queue *que)
{
	t_qlayer *tmp;
	if (que->size < 1)
	{
		free(que->head->prefix->tab);
		free(que->head->prefix);
		free(que->head);
		return;
	}
	else
	{
		tmp = que->head->next;
		free(que->head->prefix->tab);
		free(que->head->prefix);
		free(que->head);
		que->head = tmp;
		que->size--;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x10(%rdi)
movq (%rdi), %rax
je 0x1d34
movq (%rax), %rcx
movq 0x10(%rax), %r14
movq (%rcx), %rdi
callq 0x1030
movq (%rbx), %rax
movq (%rax), %rdi
callq 0x1030
movq (%rbx), %rdi
callq 0x1030
movq %r14, (%rbx)
decq 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq (%rax), %rax
movq (%rax), %rdi
callq 0x1030
movq (%rbx), %rax
movq (%rax), %rdi
callq 0x1030
movq (%rbx), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x1030
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/validation.c
// Function: valid_params
int		valid_params(int dir, int node, t_graph *g)
{
	if (dir != 0 && dir != 1)
		return 0;
	if (node <= 0 || node > g->vertx)
		return 0;
	g->search = node - 1;
	g->direct = dir;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x2, %edi
setae %cl
testl %esi, %esi
setle %r8b
xorl %eax, %eax
orb %cl, %r8b
jne 0x1d99
cmpl %esi, 0x28(%rdx)
jl 0x1d99
decl %esi
movl %esi, 0x38(%rdx)
movl %edi, 0x34(%rdx)
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/validation.c
// Function: valid_edge
int		valid_edge(t_pair *got, int i, t_graph *g)
{
	got[i].x--;
	got[i].y--;
	if (got[i].x < 0 || got[i].x >= g->vertx)
	   return 0;
	if (got[i].y < 0 || got[i].y >= g->vertx)
		return 0;
	if (g->direct == 0 && got[i].x > got[i].y)
		swap(&got[i].x, &got[i].y);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movslq %esi, %rcx
movl (%rdi,%rcx,8), %eax
movl 0x4(%rdi,%rcx,8), %esi
leal -0x1(%rax), %r8d
movl %r8d, (%rdi,%rcx,8)
leal -0x1(%rsi), %r8d
movl %r8d, 0x4(%rdi,%rcx,8)
xorl %ebx, %ebx
testl %eax, %eax
jle 0x1e08
movl 0x28(%rdx), %r8d
cmpl %r8d, %eax
jg 0x1e08
testl %esi, %esi
setle %r9b
cmpl %r8d, %esi
setg %r8b
orb %r9b, %r8b
jne 0x1e08
cmpl $0x0, 0x34(%rdx)
sete %dl
cmpl %esi, %eax
setg %al
andb %dl, %al
movl $0x1, %ebx
cmpb $0x1, %al
jne 0x1e08
leaq (%rdi,%rcx,8), %rax
leaq (%rdi,%rcx,8), %rsi
addq $0x4, %rsi
movq %rax, %rdi
callq 0x119c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/validation.c
// Function: valid_dimensions
int 	valid_dimensions(int n, int m, t_graph *g)
{
	if (n < 0 || m < 0)
		return 0;
	g->vertx = n;
	g->edg = 0;
	g->in_edg = m;
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
orl %edi, %eax
js 0x1e2f
movl %edi, 0x28(%rdx)
movl $0x0, 0x2c(%rdx)
movl %esi, 0x30(%rdx)
movl $0x1, %eax
jmp 0x1e31
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/queue_int.c
// Function: push_q_i
void	push_q_i(t_queue_int *que, t_qlayer_int *new)
{
	if (que->size == 0)
	{
		new->next = NULL;
		new->prev = NULL;
		que->head = new;
		que->tail = new;
	}
	else
	{
		new->prev = que->tail;
		que->tail->next = new;
		que->tail = new;
		new->next = NULL;
	}
	que->size++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1e57
leaq 0x8(%rdi), %rcx
movq 0x8(%rdi), %rdx
movq %rdx, (%rsi)
movq %rsi, 0x8(%rdx)
xorl %edx, %edx
movq %rsi, %r8
jmp 0x1e66
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
movq %rdi, %rcx
movq %rdi, %r8
movq %rsi, %rdx
movq %rsi, (%rcx)
movq %rdx, 0x8(%r8)
incq %rax
movq %rax, 0x10(%rdi)
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/queue_int.c
// Function: pop_q_i
void	pop_q_i(t_queue_int *que)
{
	t_qlayer_int *tmp;
	if (que->size < 1)
		return;
	else
		tmp = que->head->next;
		que->head = tmp;
		que->size--;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1e95
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, (%rdi)
decq %rax
movq %rax, 0x10(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/vector.c
// Function: extend_vector
void	extend_vector(t_vect *v, int a)
{
	size_t	size = v->size;
	size_t	new_size = size * 2;
	int		*new_nodes = (int*)malloc(sizeof(int)*new_size);

	copy_vector(v->tab, new_nodes, size);
	free(v->tab);
	v->size = new_size;
	v->tab = new_nodes;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r15
leaq (,%r15,8), %rdi
callq 0x1070
movq %rax, %r14
movq (%rbx), %rdi
testl %r15d, %r15d
jle 0x1f11
movl %r15d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
xorl %ecx, %ecx
movl (%rdi,%rcx,4), %edx
movl %edx, (%r14,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x1f02
addq %r15, %r15
callq 0x1030
movq %r15, 0x8(%rbx)
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/jalalium[P]graph_algorithms_task/src_ranking/vector.c
// Function: push_back
void	push_back(t_vect *v, int val)
{
	size_t pos = v->used;
	size_t size = v->size;

	if (pos + 1 == size)
		extend_vector(v, val);
	v->tab[pos] = val;
	v->used++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0x10(%rdi), %r15
leaq 0x1(%r15), %rax
cmpq 0x8(%rdi), %rax
jne 0x1f71
movq %rbx, %rdi
callq 0x1ecf
movq (%rbx), %rax
movl %r14d, (%rax,%r15,4)
incq 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/salextpuru[P]speccy-toochain/src/hex2bin/mot2bin.c
// Function: PutExtension
void PutExtension(char *Flnm, char *Extension)
{
char        *Period;        /* location of period in file name */
boolean     Samename;

    /* This assumes DOS like file names */
    /* Don't use strchr(): consider the following filename:
    	../my.dir/file.hex
    */
    if ((Period = strrchr(Flnm,'.')) != NULL)
        *(Period) = '\0';

    Samename = FALSE;
    if (strcmp(Extension, Period+1)== 0)
        Samename = TRUE;

    strcat(Flnm,".");
    strcat(Flnm, Extension);
    if (Samename)
    {
        fprintf (stderr,"Input and output filenames (%s) are the same.", Flnm);
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x2e, %esi
callq 0x10a0
testq %rax, %rax
je 0x14f1
movb $0x0, (%rax)
incq %rax
movq %r14, %rdi
movq %rax, %rsi
callq 0x10f0
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1050
movw $0x2e, (%rbx,%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1130
testl %ebp, %ebp
je 0x1523
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x120b
// File: /workspace/github_c_makefile_star2_O1/zpole[P]IICV/src/test_sqrti.c
// Function: main
int
main (int argc VL_UNUSED, char** argv VL_UNUSED)
{
  vl_index i ;
  for (i = 0 ; i < 0xff ; ++i) {
    vl_uint8 x = (vl_uint8)i ;
    vl_uint8 r = vl_fast_sqrt_ui8(x) ;
    vl_uint8 r_ = (vl_uint8) floor(sqrt((double)x)) ;
    if (r != r_) abort() ;
    /* printf("sqrt(%5d) = %5d -- %5d\n", i, r, r_) ; */
  }

  for (i = 0 ; i < 0xffffffff ; ++i) {
    vl_uint16 x = (vl_uint16)i ;
    vl_uint16 r = vl_fast_sqrt_ui16(x) ;
    vl_uint16 r_ = (vl_uint8) floor(sqrt((double)x)) ;
    if (r != r_) abort() ;
    /* printf("sqrt(%5d) = %5d -- %5d\n", i, r, r_) ; */
  }

  return 0 ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
xorl %r14d, %r14d
movl $0x6, %ecx
xorl %r15d, %r15d
movl %r14d, %eax
addb %r15b, %r15b
movzbl %r15b, %r15d
leal 0x1(,%r15,2), %edx
shll %cl, %edx
movzbl %al, %eax
andl $0xfd, %edx
cmpl %eax, %edx
setbe %sil
cmoval %ebx, %edx
subb %dl, %al
orb %sil, %r15b
addl $-0x2, %ecx
cmpl $-0x2, %ecx
jne 0x1174
movzbl %r14b, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
ucomisd 0xe51(%rip), %xmm0      # 0x2008
jb 0x11bf
sqrtsd %xmm0, %xmm0
jmp 0x11c4
callq 0x1050
callq 0x1040
cvttsd2si %xmm0, %eax
cmpb %al, %r15b
jne 0x126c
incq %r14
cmpq $0xff, %r14
jne 0x1169
xorl %ebx, %ebx
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
xorl %r15d, %r15d
movl $0xe, %ecx
xorl %r12d, %r12d
movl %r15d, %eax
leal 0x1(,%r12,4), %edx
shll %cl, %edx
movzwl %ax, %esi
andl $0xfffd, %edx           # imm = 0xFFFD
xorl %edi, %edi
cmpl %esi, %edx
setbe %dil
cmoval %ebx, %edx
subl %edx, %eax
leal (%rdi,%r12,2), %r12d
addl $-0x2, %ecx
cmpl $-0x2, %ecx
jne 0x11f8
movzwl %r15w, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
ucomisd 0xdd1(%rip), %xmm0      # 0x2008
jb 0x123f
sqrtsd %xmm0, %xmm0
jmp 0x1244
callq 0x1050
callq 0x1040
cvttsd2si %xmm0, %eax
movzbl %al, %eax
cmpw %ax, %r12w
jne 0x126c
incq %r15
cmpq %r14, %r15
jne 0x11ed
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
callq 0x1030
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-1600-compact64.c
// Function: KeccakP1600_AddBytesInLane
void KeccakP1600_AddBytesInLane(void *argState, unsigned int lanePosition, const unsigned char *data, unsigned int offset, unsigned int length)
{
    unsigned int i;
    #if (PLATFORM_BYTE_ORDER == IS_LITTLE_ENDIAN)
    unsigned char * state = (unsigned char*)argState + lanePosition * sizeof(tKeccakLane) + offset;
    for(i=0; i<length; i++)
        ((unsigned char *)state)[i] ^= data[i];
    #else
    tKeccakLane lane = 0;
    for(i=0; i<length; i++)
        lane |= ((tKeccakLane)data[i]) << ((i+offset)*8);
    ((tKeccakLane*)argState)[lanePosition] ^= lane;
    #endif
}

// Assembly:
testl %r8d, %r8d
je 0x57d7
movl %esi, %eax
leaq (%rdi,%rax,8), %rsi
movl %ecx, %eax
addq %rsi, %rax
movl %r8d, %ecx
xorl %esi, %esi
movb (%rdx,%rsi), %dil
xorb %dil, (%rax,%rsi)
incq %rsi
cmpq %rsi, %rcx
jne 0x57c7
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-1600-compact64.c
// Function: KeccakP1600_ExtractAndAddBytesInLane
void KeccakP1600_ExtractAndAddBytesInLane(const void *state, unsigned int lanePosition, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
{
    tSmallUInt i;
    tKeccakLane lane = ((tKeccakLane*)state)[lanePosition];
    lane >>= offset*8;
    for(i=0; i<length; i++) {
        output[i] = input[i] ^ (lane & 0xFF);
        lane >>= 8;
    }
}

// Assembly:
testl %r9d, %r9d
je 0x5c34
movl %esi, %eax
shll $0x3, %r8d
shrxq %r8, (%rdi,%rax,8), %rax
movl %r9d, %esi
xorl %edi, %edi
movb (%rdx,%rdi), %r8b
xorb %al, %r8b
movb %r8b, (%rcx,%rdi)
shrq $0x8, %rax
incq %rdi
cmpq %rdi, %rsi
jne 0x5c1d
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-200-compact.c
// Function: KeccakP200_AddBytes
void KeccakP200_AddBytes(void *argState, const unsigned char *data, unsigned int offset, unsigned int length)
{
    tSmallUInt i;
    tKeccakLane * state = (tKeccakLane*)argState + offset;
    for(i=0; i<length; i++)
        state[i] ^= data[i];
}

// Assembly:
testl %ecx, %ecx
je 0x63d8
movl %edx, %eax
addq %rax, %rdi
movl %ecx, %eax
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
xorb %dl, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x63ca
retq
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-200-compact.c
// Function: KeccakP200_ExtractAndAddBytes
void KeccakP200_ExtractAndAddBytes(const void *argState, const unsigned char *input, unsigned char *output, unsigned int offset, unsigned int length)
{
    unsigned int i;
    tKeccakLane * state = (tKeccakLane*)argState + offset;
    for(i=0; i<length; i++)
        output[i] = input[i] ^ state[i];
}

// Assembly:
testl %r8d, %r8d
je 0x65bd
movl %ecx, %eax
addq %rax, %rdi
movl %r8d, %eax
xorl %ecx, %ecx
movb (%rdi,%rcx), %r8b
xorb (%rsi,%rcx), %r8b
movb %r8b, (%rdx,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x65a9
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mjosaarinen[P]brutus/crypto_aead/lunarkeyakv2/compact/KeccakP-800-compact.c
// Function: KeccakP800_AddBytes
void KeccakP800_AddBytes(void *argState, const unsigned char *data, unsigned int offset, unsigned int length)
{
    tSmallUInt i;
    unsigned char * state = (unsigned char*)argState + offset;

    for(i=0; i<length; i++)
        ((unsigned char *)state)[i] ^= data[i];
}

// Assembly:
testl %ecx, %ecx
je 0x6c07
movl %edx, %eax
addq %rax, %rdi
movl %ecx, %eax
xorl %ecx, %ecx
movb (%rsi,%rcx), %dl
xorb %dl, (%rdi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x6bf9
retq