LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/aap[P]rx-0/misc/crt.c
// Function: pixelthread
static void*
pixelthread(void *arg)
{
	u32 cmd;
	int x;
	int y;
	int intensity;
	int i, v;
	Pixel *px;
	CRT *crt = arg;

	while(readn(sock, &cmd, 4) == 0){
		/* Queue pixel to display */
		x = cmd&01777;
		y = cmd>>10 & 01777;
//printf("%o %o\n", x, y);
		y = 1023-y;
		intensity = cmd>>20 & 7;

		intensity = pxintensity[intensity];
		i = 1024*y + x;
		v = crt->pxvals[i];

		lock(&crtlock);
		if(cmd & 1<<23)
			age++;

		if(intensity){
			if(v == 0){
				/* Add new pixel */
				px = &crt->pxlist[crt->numPixels++];
				px->x = x;
				px->y = y;
				px->l = blurLevelsDefault;
				crt->pxvals[i] = intensity;
			}else if(intensity > v)
				/* Intensify old pixel */
				crt->pxvals[i] = intensity;
		}
		unlock(&crtlock);
	}
	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movl 0x55c3(%rip), %edi      # 0x8290
leaq -0x2c(%rbp), %rsi
movl $0x4, %edx
callq 0x425c
testl %eax, %eax
jne 0x2db3
leaq 0x1d0563e(%rip), %rdi   # 0x1d08328
movl -0x2c(%rbp), %eax
movl %eax, %r13d
andl $0x3ff, %r13d           # imm = 0x3FF
movl %eax, %r12d
notl %r12d
shrl $0xa, %r12d
andl $0x3ff, %r12d           # imm = 0x3FF
shrl $0x14, %eax
andl $0x7, %eax
leaq 0x1d05607(%rip), %rcx   # 0x1d0831c
movb (%rax,%rcx), %r15b
movl %r12d, %r14d
shll $0xa, %r14d
orq %r13, %r14
movq -0x38(%rbp), %rax
movb 0x1600014(%rax,%r14), %bl
callq 0x3a10
testb $-0x80, -0x2a(%rbp)
je 0x2d40
incl 0x1d055d8(%rip)         # 0x1d08318
testb %r15b, %r15b
je 0x2d84
testb %bl, %bl
je 0x2d50
cmpb %bl, %r15b
ja 0x2d78
jmp 0x2d84
movq -0x38(%rbp), %rdx
movslq 0x600000(%rdx), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x600000(%rdx)
leaq (%rax,%rax,2), %rax
movw %r13w, (%rdx,%rax,2)
movw %r12w, 0x2(%rdx,%rax,2)
movb $0x4, 0x4(%rdx,%rax,2)
movq -0x38(%rbp), %rax
movb %r15b, 0x1600014(%rax,%r14)
leaq 0x1d0559d(%rip), %rdi   # 0x1d08328
callq 0x3ae6
movl 0x54fa(%rip), %edi      # 0x8290
leaq -0x2c(%rbp), %rsi
movl $0x4, %edx
callq 0x425c
leaq 0x1d0557d(%rip), %rdi   # 0x1d08328
testl %eax, %eax
je 0x2cea
movl $0x1, %edi
callq 0x22d0
// File: /workspace/github_c_makefile_star2_O1/aap[P]rx-0/misc/crt.c
// Function: threadmain
int
threadmain(int argc, char *argv[])
{
	int port = 3400;
	ARGBEGIN{
	case 'p':
		port = atoi(EARGF(usage()));
		break;
	case 's':
		winsize = atoi(EARGF(usage()));
		break;
	}ARGEND;

	serve(port, startcrt, nil);
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
cmpq $0x0, 0x1d04c03(%rip)   # 0x1d08310
jne 0x3719
movq (%rbx), %rax
movq %rax, 0x1d04bf7(%rip)   # 0x1d08310
movl $0xd48, %r14d           # imm = 0xD48
leaq 0x1b5f(%rip), %r15      # 0x5285
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x37c0
cmpb $0x2d, (%rdi)
jne 0x37c0
movzbl 0x1(%rdi), %eax
cmpl $0x2d, %eax
je 0x374b
testl %eax, %eax
jne 0x3751
jmp 0x37c0
cmpb $0x0, 0x2(%rdi)
je 0x37b0
addq $0x8, %rbx
incq %rdi
movb (%rdi), %al
movb $0x1, %r12b
testb %al, %al
je 0x37b7
incq %rdi
cmpb $0x73, %al
je 0x378c
movzbl %al, %eax
cmpl $0x70, %eax
jne 0x37ac
cmpb $0x0, (%rdi)
jne 0x3782
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x37dc
addq $0x8, %rbx
callq 0x23e0
movl %eax, %r14d
jmp 0x37a9
cmpb $0x0, (%rdi)
jne 0x379e
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x37dc
addq $0x8, %rbx
callq 0x23e0
movl %eax, 0x4abf(%rip)      # 0x8268
movq %r15, %rdi
movb (%rdi), %al
jmp 0x375d
addq $0x10, %rbx
xorl %r12d, %r12d
testb %r12b, %r12b
jne 0x3726
leaq -0xb52(%rip), %rsi      # 0x2c75
movl %r14d, %edi
xorl %edx, %edx
callq 0x24c0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x36ca
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_init
void dthread_init() {

    dthread_spin_init(&lock);

    threads = (list *)malloc(sizeof(list));
    main_thread_pid = getpid();
    init_threads(threads);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x2ec6(%rip)      # 0x40e0
movl $0x18, %edi
callq 0x10b0
movq %rax, 0x2ebd(%rip)      # 0x40e8
callq 0x1060
movl %eax, 0x2eba(%rip)      # 0x40f0
movq 0x2eab(%rip), %rdi      # 0x40e8
popq %rbp
jmp 0x167c
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_cleanup
void dthread_cleanup() {
    dthread_spin_lock(&lock);
    dthread *td;
    
    int count = threads->count;

    for(int i = 0; i < count; i++){
        td = remove_last(threads);
        if(td != NULL)
            free(td);
    }
    //final threads remove
    free(threads);
    dthread_spin_unlock(&lock);

}

// Assembly:
movl $0x1, %eax
xchgl %eax, 0x2e84(%rip)      # 0x40e0
testl %eax, %eax
jne 0x1251
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x2e7b(%rip), %rax      # 0x40e8
movl 0x10(%rax), %ebx
testl %ebx, %ebx
jle 0x1291
movq 0x2e6d(%rip), %rdi      # 0x40e8
callq 0x1753
testq %rax, %rax
je 0x128d
movq %rax, %rdi
callq 0x1030
decl %ebx
jne 0x1274
movq 0x2e50(%rip), %rdi      # 0x40e8
callq 0x1030
cmpl $0x1, 0x2e3c(%rip)      # 0x40e0
leaq 0x8(%rsp), %rsp
popq %rbx
popq %rbp
jne 0x12b7
movl $0x0, 0x2e29(%rip)      # 0x40e0
retq
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_create
int dthread_create(dthread_t *thread, void *(*start_routine) (void *), void *args) {

    dthread_spin_lock(&lock);
    struct dthread *t;
    t = (dthread *) malloc(sizeof(dthread));
    if(t == NULL) {
        dthread_spin_unlock(&lock);
        return -1;        
    }
    int clone_return;
    char *stack_top;

    // by using mmap allocate the stack
    t->stack = mmap(NULL, THREAD_STACK_SIZE, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_STACK, -1, 0);
    if (t->stack == MAP_FAILED) {
        dthread_spin_unlock(&lock);
        return EAGAIN;
    }
    
    stack_top = t->stack + THREAD_STACK_SIZE;

    t->args = args;
    t->start_routine = start_routine;
    t->state = JOINABLE;
    clone_return = clone(fn, stack_top, SIGCHLD | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_VM, (void *)t);
    if(clone_return == -1) {
        dthread_spin_unlock(&lock);
        return EINVAL;
    }
    t->tid = clone_return;      //assigning the thread_id

    insert_beg(threads, t);
    *thread = t->tid;
    dthread_spin_unlock(&lock);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, %eax
xchgl %eax, 0x2dc1(%rip)      # 0x40e0
testl %eax, %eax
jne 0x1314
movl $0x30, %edi
callq 0x10b0
testq %rax, %rax
je 0x13b1
movq %rax, %r14
movl $0x10000, %esi          # imm = 0x10000
xorl %edi, %edi
movl $0x3, %edx
movl $0x20022, %ecx          # imm = 0x20022
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x1070
movq %rax, 0x10(%r14)
cmpq $-0x1, %rax
je 0x13b9
addq $0x10000, %rax          # imm = 0x10000
movq %r12, 0x20(%r14)
movq %r15, 0x18(%r14)
movl $0x1, 0x8(%r14)
leaq -0x98(%rip), %rdi       # 0x12e3
xorl %r15d, %r15d
movq %rax, %rsi
movl $0xf11, %edx            # imm = 0xF11
movq %r14, %rcx
xorl %eax, %eax
callq 0x1050
cmpl $-0x1, %eax
je 0x13c1
cltq
movq %rax, (%r14)
movq 0x2d47(%rip), %rdi      # 0x40e8
movq %r14, %rsi
callq 0x168f
movq (%r14), %rax
movq %rax, (%rbx)
jmp 0x13c7
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x13c7
movl $0xb, %r15d
jmp 0x13c7
movl $0x16, %r15d
cmpl $0x1, 0x2d12(%rip)      # 0x40e0
jne 0x13da
movl $0x0, 0x2d06(%rip)      # 0x40e0
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_exit
void dthread_exit(void *retval) {
    dthread_t tid = dthread_self();

    //get the node with tid and change its return value;
    dthread *td = get_node_by_tid(threads, tid);
    
    if(main_thread_pid == tid) {
        // fetch all the tid and pass it to join function 
        node *ptr;
        if(threads->head == NULL) {
            // printf("\nEmpty");
            return;
        }
        dthread_spin_lock(&lock);
        ptr = threads->head;
        dthread_spin_unlock(&lock);

        while(ptr != NULL) {
            if(ptr->td->state == JOINABLE) {
                dthread_join(ptr->td->tid, NULL);
            }
            ptr = ptr->next;
        }
        dthread_cleanup();
        exit(0);
    }
    if(td == NULL) {
        return;
    }
    
    td->retval = retval;
    exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x1040
movslq %eax, %r14
movq 0x2ce9(%rip), %rdi      # 0x40e8
movq %r14, %rsi
callq 0x17b5
cmpl 0x2ce2(%rip), %r14d     # 0x40f0
jne 0x144b
movq 0x2cd1(%rip), %rax      # 0x40e8
cmpq $0x0, (%rax)
je 0x1450
movl $0x1, %eax
xchgl %eax, 0x2cb8(%rip)      # 0x40e0
testl %eax, %eax
jne 0x141d
movq 0x2cb5(%rip), %rax      # 0x40e8
movq (%rax), %rbx
cmpl $0x1, 0x2ca3(%rip)      # 0x40e0
jne 0x146c
movl $0x0, 0x2c97(%rip)      # 0x40e0
jmp 0x146c
testq %rax, %rax
jne 0x1478
popq %rbx
popq %r14
popq %rbp
retq
movq (%rbx), %rax
cmpl $0x1, 0x8(%rax)
jne 0x1468
movq (%rax), %rdi
xorl %esi, %esi
callq 0x1490
movq 0x8(%rbx), %rbx
testq %rbx, %rbx
jne 0x1455
callq 0x1251
jmp 0x147c
movq %rbx, 0x28(%rax)
xorl %edi, %edi
callq 0x10e0
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_join
int dthread_join(dthread_t thread, void **retval) {

    // function shall suspend execution of the calling thread until the target thread terminates,
    dthread_spin_lock(&lock);
    dthread *td = get_node_by_tid(threads, thread);
    dthread_t tid = dthread_self();
    dthread_spin_unlock(&lock);

    //join calling from same calling function
    if(tid == thread) {
        return EDEADLK;
    }

    if(td == NULL){
        return ESRCH;
    }

    
    if(td->state == JOINED) {
        return EINVAL;
    }
    int status;

    if(td->state == JOINABLE) {
        td->state = JOINED;
        waitpid(thread,&status, 0);
        if(status == -1) {
            perror("waitpid");
            exit(EXIT_FAILURE);
        }
    } 
    //updating the retval
    if(retval) {
        *retval = td->retval;
    }
    return 0; //success
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movl $0x1, %eax
xchgl %eax, 0x2c30(%rip)      # 0x40e0
testl %eax, %eax
jne 0x14a5
movq 0x2c2d(%rip), %rdi      # 0x40e8
movq %r14, %rsi
callq 0x17b5
movq %rax, %r15
callq 0x1040
movslq %eax, %rcx
cmpl $0x1, 0x2c0b(%rip)      # 0x40e0
jne 0x14e1
movl $0x0, 0x2bff(%rip)      # 0x40e0
movl $0x23, %eax
cmpq %r14, %rcx
je 0x1538
testq %r15, %r15
je 0x1533
movl 0x8(%r15), %ecx
movl $0x16, %eax
cmpl $0x2, %ecx
je 0x1538
cmpl $0x1, %ecx
jne 0x1523
movl $0x2, 0x8(%r15)
leaq -0x24(%rbp), %r12
movl %r14d, %edi
movq %r12, %rsi
xorl %edx, %edx
callq 0x10c0
cmpl $-0x1, (%r12)
je 0x1545
testq %rbx, %rbx
je 0x152f
movq 0x28(%r15), %rax
movq %rax, (%rbx)
xorl %eax, %eax
jmp 0x1538
movl $0x3, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x1100
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_kill
int dthread_kill(dthread_t thread, int sig) {
    //if sig is 0, no signal is sent
    if(sig == 0) {
        return 0;
    }

    if(sig < 0 || sig > 64) {
        return EINVAL;
    }
    //check if the thread exist
    dthread *temp = get_node_by_tid(threads,thread);

    if(temp == NULL) {
        return ESRCH;
    }
    
    temp->state = SIGNAL;
    int status = kill(thread,sig);
    return status;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
testl %esi, %esi
je 0x158d
movl %esi, %ebx
movl $0x16, %eax
cmpl $0x40, %esi
ja 0x1596
movq %rdi, %r14
movq 0x2b7d(%rip), %rdi      # 0x40e8
movq %r14, %rsi
callq 0x17b5
testq %rax, %rax
je 0x1591
movl $0x3, 0x8(%rax)
movl %r14d, %edi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x10a0
xorl %eax, %eax
jmp 0x1596
movl $0x3, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_mutex_lock
int dthread_mutex_lock(dthread_mutex_t *mutex) {
    
    unsigned int temp = __sync_val_compare_and_swap(mutex, 0, 1);
    if(temp != 0) {
        do  {
            if((temp == 2) || __sync_val_compare_and_swap(mutex, 1, 2) != 0)
                syscall(SYS_futex, mutex, FUTEX_WAIT_PRIVATE, 2, 0, 0, 0);
        } while((temp = __sync_val_compare_and_swap(mutex, 0, 2)) != 0);
    }
    return 0;
}

// Assembly:
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgl %ecx, (%rdi)
je 0x162b
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x2, %r14d
cmpl $0x2, %eax
je 0x15f4
movl $0x1, %eax
lock
cmpxchgl %r14d, (%rbx)
testl %eax, %eax
je 0x161a
movl $0x0, (%rsp)
movl $0xca, %edi
movq %rbx, %rsi
movl $0x80, %edx
movl $0x2, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x1090
xorl %eax, %eax
lock
cmpxchgl %r14d, (%rbx)
jne 0x15e1
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/dthread.c
// Function: dthread_mutex_unlock
int dthread_mutex_unlock(dthread_mutex_t *mutex) {
    if(__sync_fetch_and_sub(mutex, 1) != 1)  {
    *mutex = 0;
    syscall(SYS_futex, mutex, FUTEX_WAKE_PRIVATE, 1, 0, 0, 0);
   }
   return 0;
}

// Assembly:
lock
decl (%rdi)
je 0x1666
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, %rsi
xorl %eax, %eax
movl %eax, (%rdi)
movl %eax, (%rsp)
movl $0xca, %edi
movl $0x81, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x1090
addq $0x10, %rsp
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/singlyll.c
// Function: insert_beg
void insert_beg(list *t, dthread *td) {
    //add condition for maximum
    node *ptr;
    ptr = (node*)malloc(sizeof(node));
    if(ptr == NULL) {
        printf("\nMemory full");
        return;
    }
    ptr->td = td;
    ptr->next = NULL;
    if(t->head == NULL) {
        t->head = ptr;
        t->tail = ptr;
    }
    else {
        ptr->next = t->head;
        t->head = ptr;
    }
    t->count = t->count + 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movl $0x10, %edi
callq 0x10b0
testq %rax, %rax
je 0x16c7
movq %r14, (%rax)
movq $0x0, 0x8(%rax)
movq (%rbx), %rcx
testq %rcx, %rcx
je 0x16d9
movq %rcx, 0x8(%rax)
movq %rbx, %rcx
jmp 0x16e0
leaq 0x93e(%rip), %rdi       # 0x200c
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x1080
movq %rax, (%rbx)
leaq 0x8(%rbx), %rcx
movq %rax, (%rcx)
incl 0x10(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/singlyll.c
// Function: remove_last
dthread* remove_last(list *t) {
    node *temp;
    dthread *td;
    if(t->count == 0) {
        printf("\nEmpty list");
        return NULL;
    }
    temp = t->head;
    if(t->count == 1) {
        td = temp->td;
        t->tail = NULL;
        t->head = NULL;
        t->count = t->count -1;
        return td;
    }
    
    while(temp->next != t->tail ) {
        temp = temp->next;
    }
    td = t->tail->td;
    t->tail = temp;
    t->tail->next = NULL;
    t->count = t->count -1;
    return td;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x10(%rdi), %eax
testl %eax, %eax
je 0x1775
movq (%rdi), %rcx
cmpl $0x1, %eax
jne 0x1787
movq (%rcx), %rbx
decl %eax
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
jmp 0x17a8
leaq 0x8b9(%rip), %rdi       # 0x2035
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x1080
jmp 0x17ab
movq 0x8(%rdi), %rdx
movq %rcx, %rsi
movq 0x8(%rcx), %rcx
cmpq %rdx, %rcx
jne 0x178b
movq (%rdx), %rbx
movq %rsi, 0x8(%rdi)
movq $0x0, 0x8(%rsi)
decl %eax
movl %eax, 0x10(%rdi)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/deepika9294[P]Threading-Library/one-one/singlyll.c
// Function: get_node_by_tid
dthread* get_node_by_tid(list *t, dthread_t tid) {
    node *temp;
    dthread *td;
    if(t->tail == NULL) {
        return NULL;
    }
    temp = t->head;
    while(temp != NULL) {
        if(tid == temp->td->tid) {
            return temp->td;
        }
        else {
            temp = temp->next;
        }
    }
    return NULL;
}

// Assembly:
cmpq $0x0, 0x8(%rdi)
je 0x17dd
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x17dd
pushq %rbp
movq %rsp, %rbp
movq (%rcx), %rax
cmpq %rsi, (%rax)
je 0x17db
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
jne 0x17c8
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/Tarsnap[P]libcperciva/tests/mpool/main.c
// Function: main
int
main(int argc, char * argv[])
{
	unsigned long sets, reps;
	unsigned int use_mpool;
	long long delta_us;

	WARNP_INIT;

	/* Parse args. */
	if ((argc != 4) || (PARSENUM(&sets, argv[1])) ||
	    (PARSENUM(&reps, argv[2])) || (PARSENUM(&use_mpool, argv[3]))) {
		printf("usage: test_mpool SETS REPS TYPE\n");
		goto err0;
	}

	/* Sanity check. */
	if (!((sets > 0) && (reps > 0))) {
		fprintf(stderr, "SETS and REPS must be greater than zero\n");
		goto err0;
	}

	/* Time memory allocation method, and output it. */
	if ((delta_us = time_func(sets, reps, use_mpool)) < 0)
		goto err0;
	printf("%lld\n", delta_us);

	/* Success! */
	exit(0);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %ebx
movq (%rsi), %rdi
testq %rdi, %rdi
je 0x179f
callq 0x1bac
cmpl $0x4, %ebx
jne 0x18c3
callq 0x1060
movl $0x0, (%rax)
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x18d1
movq %rax, %r14
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x1140
movq %rax, %rbx
movq (%r13), %rax
cmpq %r12, %rax
je 0x17e4
cmpb $0x0, (%rax)
je 0x17eb
movl $0x16, (%r14)
cmpl $0x0, (%r14)
jne 0x18c3
movl $0x0, (%r14)
movq 0x10(%r15), %r13
testq %r13, %r13
je 0x18d1
movq %rsp, %rbp
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x1140
movq %rax, %r12
movq (%rbp), %rax
cmpq %r13, %rax
je 0x182a
cmpb $0x0, (%rax)
je 0x1831
movl $0x16, (%r14)
cmpl $0x0, (%r14)
jne 0x18c3
movl $0x0, (%r14)
movq 0x18(%r15), %r15
testq %r15, %r15
je 0x18d1
movq %rsp, %r13
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x1140
movq (%r13), %rdx
movl $0x16, %ecx
cmpq %r15, %rdx
je 0x1880
cmpb $0x0, (%rdx)
jne 0x1880
movq %rax, %rcx
shrq $0x20, %rcx
movl $0x22, %ecx
je 0x1883
movl %ecx, (%r14)
cmpl $0x0, (%r14)
jne 0x18c3
testq %rbx, %rbx
setne %cl
testq %r12, %r12
setne %dl
testb %dl, %cl
jne 0x18f0
movq 0x2758(%rip), %rax      # 0x3ff8
movq (%rax), %rcx
leaq 0x809(%rip), %rdi       # 0x20b3
movl $0x28, %esi
movl $0x1, %edx
callq 0x1180
movl $0x1, %edi
callq 0x1170
leaq 0x8df(%rip), %rdi       # 0x21a9
callq 0x1070
jmp 0x18b9
leaq 0x85c(%rip), %rdi       # 0x2134
leaq 0x85f(%rip), %rsi       # 0x213e
leaq 0x86e(%rip), %rcx       # 0x2154
movl $0xbb, %edx
callq 0x10b0
movq %rbx, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x13d5
testq %rax, %rax
js 0x18b9
leaq 0x7d3(%rip), %rdi       # 0x20dc
movq %rax, %rsi
xorl %eax, %eax
callq 0x10a0
xorl %edi, %edi
callq 0x1170
// File: /workspace/github_c_makefile_star2_O1/kilobyte[P]colormatch/ct.c
// Function: main
int main()
{
    double a[3], b[3];
    rgb2lab(0xfffffe, a);
    printf("%g %g %g\n", a[0], a[1], a[2]);
    rgb2lab(0xffffff, b);
    printf("%g %g %g\n", b[0], b[1], b[2]);
    printf("dist=%g\n", deltaE2000(a,b));
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq 0x20(%rsp), %rbx
movl $0xfffffe, %edi         # imm = 0xFFFFFE
movq %rbx, %rsi
callq 0x1884
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
leaq 0xe38(%rip), %r14       # 0x2004
movq %r14, %rdi
movb $0x3, %al
callq 0x1040
movq %rsp, %r15
movl $0xffffff, %edi         # imm = 0xFFFFFF
movq %r15, %rsi
callq 0x1884
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
movsd 0x10(%r15), %xmm2
movq %r14, %rdi
movb $0x3, %al
callq 0x1040
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1228
leaq 0xdfb(%rip), %rdi       # 0x200e
movb $0x1, %al
callq 0x1040
xorl %eax, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/codeniko[P]CS214-Malloc-Free/Test2.c
// Function: main
void main()
{
    int* p = malloc(sizeof(int));
    *p = 5;
    printf("address: %p, value: %d\n",p, *p);
    free(p);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0xeaa(%rip), %rbx       # 0x2004
movl $0x4, %edi
movq %rbx, %rsi
movl $0x6, %edx
callq 0x11a0
movq %rax, %r14
movl $0x5, (%rax)
leaq 0xe90(%rip), %rdi       # 0x200c
movq %rax, %rsi
movl $0x5, %edx
xorl %eax, %eax
callq 0x1030
movq %r14, %rdi
movq %rbx, %rsi
movl $0x9, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0x1300
nop
// File: /workspace/github_c_makefile_star2_O1/wuxb45[P]SLB/ibkvcli.c
// Function: test_ibkv
int
test_ibkv(const int argc, char ** const argv)
{
  if (argc < 6 || (strcmp(argv[0], "api") != 0)) {
    return -1;
  }

  const u64 pid = strtoull(argv[1], NULL, 10);
  char * const host = argv[2];
  const int pn = atoi(argv[3]);
  const u64 depth = strtoull(argv[4], NULL, 10);
  const u64 batch = strtoull(argv[5], NULL, 10);

  char *pref[64] = {};
  for (int i = 0; i < 6; i++) {
    pref[i] = argv[i];
  }
  pref[6] = NULL;

  struct worker_info wi;
  wi.port = ib_port_create(pid);
  wi.host = host;
  wi.pn = pn;
  wi.depth = depth;
  wi.batch = batch;

  struct pass_info pi = {};
  pi.api = &wi;
  pi.vctr_size = 4;
  pi.wf = ibkv_worker;
  pi.af = ibkv_analyze;
  const int n2 = maptest_passes(argc - 6, argv + 6, pref, &pi);
  ib_port_destroy(wi.port);
  if (n2 < 0) {
    return n2;
  }
  return 6 + n2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x6, %edi
jl 0x7101
movq %rsi, %rbx
movl %edi, %r14d
movq (%rsi), %rdi
leaq 0xe031(%rip), %rsi      # 0x15010
callq 0x64b0
testl %eax, %eax
jne 0x7101
movq 0x8(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
movq %rax, -0x38(%rbp)
movq 0x10(%rbx), %rax
movq %rax, -0x40(%rbp)
movq 0x18(%rbx), %rdi
callq 0x63e0
movl %eax, -0x2c(%rbp)
movq 0x20(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
movq %rax, %r13
movq 0x28(%rbx), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x6580
movq %rax, %r15
leaq -0x270(%rbp), %r12
movl $0x1d0, %edx            # imm = 0x1D0
movq %r12, %rdi
xorl %esi, %esi
callq 0x6080
vmovups (%rbx), %ymm0
vmovups 0x10(%rbx), %ymm1
vmovups %ymm0, -0x30(%r12)
vmovups %ymm1, -0x20(%r12)
movq $0x0, (%r12)
movq -0x38(%rbp), %rdi
vzeroupper
callq 0x14520
leaq -0x98(%rbp), %r12
movq %rax, (%r12)
movq -0x40(%rbp), %rax
movq %rax, 0x8(%r12)
movl -0x2c(%rbp), %eax
movl %eax, 0x10(%r12)
movq %r13, 0x18(%r12)
movq %r15, 0x20(%r12)
vxorps %xmm0, %xmm0, %xmm0
leaq -0x70(%rbp), %rcx
vmovups %ymm0, (%rcx)
movq %r12, 0x8(%rcx)
movq $0x4, 0x10(%rcx)
leaq 0x56(%rip), %rax        # 0x7116
movq %rax, 0x18(%rcx)
leaq 0x49d(%rip), %rax       # 0x7568
movq %rax, 0x20(%rcx)
addl $-0x6, %r14d
addq $0x30, %rbx
leaq -0x2a0(%rbp), %rdx
movl %r14d, %edi
movq %rbx, %rsi
vzeroupper
callq 0x13955
movl %eax, %ebx
movq (%r12), %rdi
callq 0x146b9
leal 0x6(%rbx), %r15d
testl %ebx, %ebx
cmovsl %ebx, %r15d
movl %r15d, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wuxb45[P]SLB/ibkvcli.c
// Function: ibkv_analyze
static bool
ibkv_analyze(struct vctr * const va, const double dt, struct damp * const damp, char * const out)
{
  u64 v[8];
  for (u64 i = 0; i < 4; i++) {
    v[i] = vctr_get(va, i);
  }

  const u64 nrop = v[XSA] + v[XDA] + v[XGA] + v[XPA];
  const double mops = ((double)nrop) / (dt * 1.0e6);
  const bool done = damp_add_test(damp, mops);
  const double havg = damp_average(damp);
  const char * const pat = " set %"PRIu64" del %"PRIu64" get %"PRIu64" pro %"PRIu64" mops %.2lf havg %.2lf\n";
  sprintf(out, pat, v[XSA], v[XDA], v[XGA], v[XPA], mops, havg);
  return done;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, -0x40(%rbp)
movq %rsi, %r14
vmovsd %xmm0, -0x30(%rbp)
movq %rdi, %r15
xorl %r12d, %r12d
movq %r15, %rdi
movq %r12, %rsi
callq 0x9ed5
movq %rax, -0x80(%rbp,%r12,8)
incq %r12
cmpq $0x4, %r12
jne 0x758b
movq -0x80(%rbp), %r15
movq -0x78(%rbp), %r12
movq -0x70(%rbp), %r13
movq -0x68(%rbp), %rbx
leaq (%r13,%rbx), %rcx
addq %r12, %rcx
addq %r15, %rcx
vcvtusi2sd %rcx, %xmm1, %xmm0
vmovsd -0x30(%rbp), %xmm1
vmulsd 0xda36(%rip), %xmm1, %xmm1 # 0x15008
vdivsd %xmm1, %xmm0, %xmm0
vmovsd %xmm0, -0x38(%rbp)
movq %r14, %rdi
callq 0x9cfa
movb %al, -0x30(%rbp)
movq %r14, %rdi
callq 0x9c0e
vmovapd %xmm0, %xmm1
leaq 0xda1b(%rip), %rsi      # 0x15014
movq -0x40(%rbp), %rdi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
movq %rbx, %r9
vmovsd -0x38(%rbp), %xmm0
movb $0x2, %al
callq 0x6300
movb -0x30(%rbp), %al
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/evm.c
// Function: disassemble
static void disassemble(const char *contents) {
    disassembleInit();
    while (disassembleValid(&contents)) {
        disassembleNextOp(&contents);
    }
    disassembleFinalize();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq %rdi, (%rbx)
xorl %eax, %eax
callq 0x10d3c
movq %rbx, %rdi
callq 0x11595
testl %eax, %eax
je 0x47f4
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x10df0
movq %rbx, %rdi
callq 0x11595
testl %eax, %eax
jne 0x47e0
xorl %eax, %eax
callq 0x115a6
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/dio.c
// Function: jsonScanChar
static void jsonScanChar(const char **iter, char expected) {
    for (char ch; (ch = **iter) != expected; (*iter)++) {
        if (jsonIgnores(ch)) {
            if (ch == '\n') {
                lineNumber++;
            }
        } else {
            fprintf(stderr, "Config: when seeking '%c' found unexpected character '%c' on line %" PRIu64 "\n", expected, ch, lineNumber);
            _exit(1);
        }
    }
    (*iter)++;
}

// Assembly:
pushq %rax
movq (%rdi), %rcx
movb (%rcx), %r9b
cmpb %sil, %r9b
je 0x701f
movq 0x1aa90(%rip), %rdx     # 0x21a48
incq %rcx
movabsq $0xa00000001000401, %r8 # imm = 0xA00000001000401
movzbl %r9b, %eax
leal -0x22(%rax), %r10d
cmpl $0x3b, %r10d
ja 0x6fd9
btq %r10, %r8
jb 0x7027
cmpl $0x7b, %eax
je 0x7027
cmpl $0x7d, %eax
je 0x7027
leal -0x30(%r9), %r10d
cmpb $0xa, %r10b
jb 0x7027
movl %r9d, %r10d
andb $-0x21, %r10b
addb $-0x41, %r10b
cmpb $0x1a, %r10b
jb 0x7027
cmpb $0xa, %r9b
jne 0x700e
incq %rdx
movq %rdx, 0x1aa3a(%rip)     # 0x21a48
movq %rcx, (%rdi)
movb (%rcx), %r9b
incq %rcx
cmpb %sil, %r9b
jne 0x6fc5
decq %rcx
incq %rcx
movq %rcx, (%rdi)
popq %rax
retq
movzbl %sil, %esi
movl %eax, %edi
callq 0x358f
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/dio.c
// Function: jsonScanStr
static const char *jsonScanStr(const char **iter) {
    jsonScanChar(iter, '"');
    const char *start = *iter;
    for (char ch; (ch = **iter) != '"' && ch; (*iter)++);
    jsonSkipExpectedChar(iter, '"');
    return start;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x22, %esi
callq 0x6fa5
movq (%rbx), %r14
leaq 0x1(%r14), %rax
movzbl -0x1(%rax), %ecx
cmpl $0x22, %ecx
je 0x73d1
testl %ecx, %ecx
je 0x73d1
movq %rax, (%rbx)
incq %rax
jmp 0x73bc
movq %rbx, %rdi
movl $0x22, %esi
callq 0x70a1
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/dio.c
// Function: jsonReadAddressString
static address_t *jsonReadAddressString(const char **iter) {
    jsonSkipExpectedChar(iter, '"');
    address_t *address = jsonReadAddress(iter);
    jsonSkipExpectedChar(iter, '"');
    return address;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x22, %esi
callq 0x70a1
movq %rbx, %rdi
callq 0x741d
movq %rax, %r14
movq %rbx, %rdi
movl $0x22, %esi
callq 0x70a1
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/dio.c
// Function: jsonReadAddress
static address_t *jsonReadAddress(const char **iter) {
    jsonSkipExpectedChar(iter, '0');
    jsonSkipExpectedChar(iter, 'x');
    address_t *address = malloc(sizeof(address_t));
    for (unsigned int i = 0; i < 20; i++) {
        address->address[i] = hexString16ToUint8(*iter);
        *iter += 2;
    }
    return address;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x30, %esi
callq 0x70a1
movq %rbx, %rdi
movl $0x78, %esi
callq 0x70a1
movl $0x14, %edi
callq 0x3200
movq %rax, %r14
movq 0x11ba2(%rip), %rdx     # 0x18ff8
leaq 0xad4e(%rip), %r15      # 0x121ab
xorl %r13d, %r13d
movq (%rbx), %r12
movzbl (%r12), %ecx
leal -0x30(%rcx), %ebp
cmpb $0xa, %bpl
jb 0x7489
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x747d
addb $-0x57, %cl
jmp 0x7487
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x74c8
addb $-0x37, %cl
movl %ecx, %ebp
movzbl 0x1(%r12), %ecx
leal -0x30(%rcx), %eax
cmpb $0xa, %al
jb 0x74ae
leal -0x61(%rcx), %eax
cmpb $0x5, %al
ja 0x74a2
addb $-0x57, %cl
jmp 0x74ac
leal -0x41(%rcx), %eax
cmpb $0x5, %al
ja 0x74e2
addb $-0x37, %cl
movl %ecx, %eax
shlb $0x4, %bpl
addb %al, %bpl
movb %bpl, (%r14,%r13)
addq $0x2, (%rbx)
incq %r13
cmpq $0x14, %r13
jne 0x7460
jmp 0x74fb
movq (%rdx), %rdi
movq %r15, %rsi
movq %rdx, %rbp
movl %ecx, %edx
xorl %eax, %eax
callq 0x31d0
movq %rbp, %rdx
movb $-0x1, %bpl
jmp 0x7489
movq (%rdx), %rdi
movq %r15, %rsi
movq %rdx, %r12
movl %ecx, %edx
xorl %eax, %eax
callq 0x31d0
movq %r12, %rdx
movb $-0x1, %al
jmp 0x74ae
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/dio.c
// Function: verifyConstructResult
static void verifyConstructResult(result_t *constructResult, entry_t *entry) {
    if (entry->code.size) {
        // verify result code matches entry->code if present
        if (constructResult->returnData.size != entry->code.size || memcmp(constructResult->returnData.content, entry->code.content, entry->code.size)) {
            fputs("Code mismatch at address ", stderr);
            fprintAddress(stderr, (*entry->address));
            fprintf(stderr, ":\n`%s -c %s`:\n", derivedPath, entry->constructPath);
            fprintData(stderr, constructResult->returnData);
            fprintf(stderr, "\nexpected:\n");
            fprintData(stderr, entry->code);
            fputc('\n', stderr);
            _exit(-1);
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x38(%rsi), %rdx
testq %rdx, %rdx
je 0x7536
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rdx, (%rdi)
jne 0x753e
movq 0x8(%rbx), %rdi
movq 0x40(%r14), %rsi
callq 0x3210
testl %eax, %eax
jne 0x753e
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x38(%r14), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3627
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: fprintLog
uint16_t fprintLog(FILE *file, const logChanges_t *log, int showLogIndex) {
    if (log == NULL) {
        return 0;
    }
    uint16_t items = fprintLog(file, log->prev, showLogIndex);
    if (items) {
        fputc(',', file);
    }
    if (showLogIndex) {
        fprintf(file, "{\"logIndex\":\"0x%x\",\"data\":\"0x", log->logIndex);
    } else {
        fprintf(file, "{\"data\":\"0x");
    }
    for (size_t i = 0; i < log->data.size; i++) {
        fprintf(file, "%02x", log->data.content[i]);
    }
    fputs("\",\"topics\":[", file);
    for (uint8_t i = log->topicCount; i-->0;) {
        fprintf(file, "\"0x%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "%016" PRIx64 "\"",
            UPPER(UPPER(log->topics[i])),
            LOWER(UPPER(log->topics[i])),
            UPPER(LOWER(log->topics[i])),
            LOWER(LOWER(log->topics[i]))
        );
        if (i) {
            fputc(',', file);
        }
    }
    fputs("]}", file);
    return items + 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x7a59
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq 0x20(%rsi), %rsi
callq 0x7a08
movl %eax, %ebx
testw %ax, %ax
je 0x7a3d
movl $0x2c, %edi
movq %r14, %rsi
callq 0x3180
testl %ebp, %ebp
je 0x7a60
movzwl 0xa(%r15), %edx
leaq 0xaeef(%rip), %rsi      # 0x1293c
movq %r14, %rdi
xorl %eax, %eax
callq 0x31d0
jmp 0x7a79
xorl %ebx, %ebx
jmp 0x7b52
leaq 0xaef3(%rip), %rdi      # 0x1295a
movl $0xb, %esi
movl $0x1, %edx
movq %r14, %rcx
callq 0x3290
cmpq $0x0, 0x10(%r15)
je 0x7aa9
leaq 0xa8f7(%rip), %r12      # 0x1237e
xorl %r13d, %r13d
movq 0x18(%r15), %rax
movzbl (%rax,%r13), %edx
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x31d0
incq %r13
cmpq 0x10(%r15), %r13
jb 0x7a8a
leaq 0xaeb6(%rip), %rdi      # 0x12966
movq %r14, %rsi
callq 0x3130
movzbl 0x8(%r15), %r13d
testq %r13, %r13
je 0x7b41
leaq -0x1(%r13), %rbp
movq (%r15), %rax
movq %rbp, %rsi
shlq $0x5, %rsi
movq (%rax,%rsi), %rdx
movq 0x8(%rax,%rsi), %rcx
movq 0x10(%rax,%rsi), %r8
movq 0x18(%rax,%rsi), %r9
leaq 0xae89(%rip), %rsi      # 0x12973
movq %r14, %rdi
xorl %eax, %eax
callq 0x31d0
testq %rbp, %rbp
je 0x7b41
shll $0x5, %r13d
addq $-0x28, %r13
leaq 0xae6b(%rip), %r12      # 0x12973
movl $0x2c, %edi
movq %r14, %rsi
callq 0x3180
movq (%r15), %rax
movq -0x18(%rax,%r13), %rdx
movq -0x10(%rax,%r13), %rcx
movq -0x8(%rax,%r13), %r8
movq (%rax,%r13), %r9
movq %r14, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x31d0
addq $-0x20, %r13
decq %rbp
jne 0x7b08
leaq 0xae48(%rip), %rdi      # 0x12990
movq %r14, %rsi
callq 0x3130
incl %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: fprintLogs
uint16_t fprintLogs(FILE *file, const stateChanges_t *account, int showLogIndex) {
    fputs("{", file);
    uint16_t items = _fprintLogs(file, account, showLogIndex);
    fputs("}", file);
    return items;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0xab58(%rip), %rdi      # 0x129ba
movq %r15, %rsi
callq 0x3130
movq %r15, %rdi
movq %r14, %rsi
movl %ebx, %edx
callq 0x7e90
movl %eax, %ebx
leaq 0xa329(%rip), %rdi      # 0x121a9
movq %r15, %rsi
callq 0x3130
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: fprintLogs
static uint16_t _fprintLogs(FILE *file, const stateChanges_t *account, int showLogIndex) {
    if (account == NULL) {
        return 0;
    }
    uint16_t items = _fprintLogs(file, account->next, showLogIndex);
    if (account->logChanges == NULL) {
        return items;
    }
    if (items) {
        fputc(',', file);
    }
    fputs("\"", file);
    fprintAddress(file, account->account);
    fputs("\":[", file);
    items += fprintLog(file, account->logChanges, showLogIndex);
    fputc(']', file);
    return items;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
testq %rsi, %rsi
je 0x8013
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq 0x28(%rsi), %rsi
callq 0x7e90
movl %eax, %ebx
cmpq $0x0, 0x18(%r15)
je 0x8015
movl %ebp, 0xc(%rsp)
testw %bx, %bx
je 0x7edb
movl $0x2c, %edi
movq %r14, %rsi
callq 0x3180
leaq 0xa2b4(%rip), %rdi      # 0x12196
movq %r14, %rsi
callq 0x3130
movzbl (%r15), %edx
movzbl 0x1(%r15), %ecx
movzbl 0x2(%r15), %r8d
movzbl 0x3(%r15), %r9d
movzbl 0x4(%r15), %eax
movq %rax, 0x60(%rsp)
movzbl 0x5(%r15), %eax
movq %rax, 0x58(%rsp)
movzbl 0x6(%r15), %eax
movq %rax, 0x50(%rsp)
movzbl 0x7(%r15), %eax
movq %rax, 0x48(%rsp)
movzbl 0x8(%r15), %eax
movq %rax, 0x40(%rsp)
movzbl 0x9(%r15), %eax
movq %rax, 0x38(%rsp)
movzbl 0xa(%r15), %eax
movq %rax, 0x30(%rsp)
movzbl 0xb(%r15), %eax
movq %rax, 0x28(%rsp)
movzbl 0xc(%r15), %eax
movq %rax, 0x20(%rsp)
movzbl 0xd(%r15), %eax
movq %rax, 0x18(%rsp)
movzbl 0xe(%r15), %eax
movq %rax, 0x10(%rsp)
movzbl 0xf(%r15), %r13d
movzbl 0x10(%r15), %r10d
movzbl 0x11(%r15), %r11d
movzbl 0x12(%r15), %r12d
movzbl 0x13(%r15), %ebp
leaq 0xa3a5(%rip), %rsi      # 0x12330
movq %r14, %rdi
xorl %eax, %eax
pushq %rbp
pushq %r12
pushq %r11
pushq %r10
pushq %r13
pushq 0x38(%rsp)
pushq 0x48(%rsp)
pushq 0x58(%rsp)
pushq 0x68(%rsp)
pushq 0x78(%rsp)
pushq 0x88(%rsp)
pushq 0x98(%rsp)
pushq 0xa8(%rsp)
pushq 0xb8(%rsp)
pushq 0xc8(%rsp)
pushq 0xd8(%rsp)
callq 0x31d0
addq $0x80, %rsp
leaq 0xa985(%rip), %rdi      # 0x1296f
movq %r14, %rsi
callq 0x3130
movq 0x18(%r15), %rsi
movq %r14, %rdi
movl 0xc(%rsp), %edx
callq 0x7a08
addl %eax, %ebx
movl $0x5d, %edi
movq %r14, %rsi
callq 0x3180
jmp 0x8015
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: getCurrentAccountStateChanges
stateChanges_t *getCurrentAccountStateChanges(result_t *result, context_t *context) {
    stateChanges_t **stateChanges = &result->stateChanges;
    while (*stateChanges != NULL) {
        if (AddressEqual(&(*stateChanges)->account, &context->account->address)) {
            return *stateChanges;
        }
        stateChanges = &(*stateChanges)->next;
    }
    // DNF
    *stateChanges = calloc(1, sizeof(stateChanges_t));
    AddressCopy(&(*stateChanges)->account, &context->account->address);
    return *stateChanges;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x38(%rdi), %rax
addq $0x38, %rbx
testq %rax, %rax
je 0x807e
movq 0x8008(%r14), %rcx
movb (%rcx), %dl
cmpb %dl, (%rax)
jne 0x806b
xorl %edi, %edi
movq %rdi, %rsi
cmpq $0x13, %rdi
je 0x8065
movb 0x1(%rax,%rsi), %r8b
leaq 0x1(%rsi), %rdi
cmpb 0x1(%rcx,%rsi), %r8b
je 0x804c
cmpq $0x12, %rsi
ja 0x80a3
movq %rax, %rbx
movq 0x28(%rax), %rsi
addq $0x28, %rbx
movq %rsi, %rax
testq %rsi, %rsi
jne 0x8046
movl $0x1, %edi
movl $0x30, %esi
callq 0x31b0
movq %rax, (%rbx)
movq 0x8008(%r14), %rcx
movups (%rcx), %xmm0
movups %xmm0, (%rax)
movl 0x10(%rcx), %ecx
movl %ecx, 0x10(%rax)
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: evmMockBalance
void evmMockBalance(address_t from, const val_t balance) {
    account_t *account = getAccount(from);
    account->balance[0] = balance[0];
    account->balance[1] = balance[1];
    account->balance[2] = balance[2];
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl 0x40(%rsp), %eax
movl %eax, 0x10(%rsp)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x82ed
movl (%rbx), %ecx
movl %ecx, 0x14(%rax)
movl 0x4(%rbx), %ecx
movl %ecx, 0x18(%rax)
movl 0x8(%rbx), %ecx
movl %ecx, 0x1c(%rax)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: getAccountStorage
static storage_t *getAccountStorage(account_t *account, const uint256_t *key) {
    storage_t **storage = &account->storage;
    while (*storage != NULL) {
        if (equal256(&(*storage)->key, key)) {
            return *storage;
        }
        storage = &(*storage)->next;
    }
    *storage = calloc(1, sizeof(storage_t));
    copy256(&(*storage)->key, key);
    return *storage;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x40(%rdi), %rdi
addq $0x40, %rbx
testq %rdi, %rdi
je 0x86af
movq %r14, %rsi
callq 0xd232
testb %al, %al
jne 0x86cc
movq (%rbx), %rbx
movq 0x68(%rbx), %rdi
addq $0x68, %rbx
jmp 0x8691
movl $0x1, %edi
movl $0x70, %esi
callq 0x31b0
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0xc9b5
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: txCreate
result_t txCreate(address_t from, uint64_t gas, val_t value, data_t input) {
    account_t *fromAccount = getAccount(from);
    fromAccount->warm = evmIteration;
    account_t *coinbaseAccount = getAccount(coinbase);
    coinbaseAccount->warm = evmIteration;
    result_t result = evmCreate(fromAccount, gas, value, input);
    evmIteration++;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r14
movl 0x60(%rsp), %eax
movl %eax, 0x10(%rsp)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rsp)
callq 0x82ed
movq %rax, %rbp
movq 0x2050b7a(%rip), %rax   # 0x2059a80
movq %rax, 0x38(%rbp)
movl 0x2050b98(%rip), %eax   # 0x2059aa8
movl %eax, 0x10(%rsp)
movups 0x2050b7d(%rip), %xmm0  # 0x2059a98
movups %xmm0, (%rsp)
callq 0x82ed
movq 0x2050b55(%rip), %rcx   # 0x2059a80
movq %rcx, 0x38(%rax)
movq %r14, %rdi
movq %rbp, %rsi
movq %r13, %rdx
movq %r12, %rcx
movq %r15, %r8
movq %rbx, %r9
callq 0x8d23
incq 0x2050b33(%rip)         # 0x2059a80
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: evmCall
static result_t _evmCall(context_t *callContext) {
    callContext->top = callContext->bottom;
    callContext->returnData.size = 0;

    memory_init(&callContext->memory, 0);

    uint64_t startGas = callContext->gas;

    callstack.next += 1;
    result_t result = doCall(callContext);
    callstack.next -= 1;

    result.gasRemaining = callContext->gas;
    if (SHOW_CALLS) {
        fRepeat(stderr, "\t", depthOf(callContext));
        fprintf(stderr, "gasUsed: %" PRIu64, startGas - callContext->gas);
        if (startGas < 600000000) {
            fprintf(stderr, " / %" PRIu64, startGas);
        }
        fputc('\n', stderr);
    }

    if (zero256(&result.status)) {
        evmRevert(&result.stateChanges);
    }

    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, 0x8000(%rsi)
xorl %eax, %eax
movq %rax, 0x8048(%rsi)
movq %rax, 0x8058(%rsi)
movq %rax, 0x8068(%rsi)
movl $0x1, %esi
xorl %edi, %edi
callq 0x31b0
movq %rax, 0x8060(%r14)
movq 0x8080(%r14), %r15
leaq 0x18ab4(%rip), %r12     # 0x21a60
addq $0x8090, 0x2024000(%r12) # imm = 0x8090
movq %rbx, %rdi
movq %r14, %rsi
callq 0x907e
addq $-0x8090, 0x2024000(%r12) # imm = 0xFFFF7F70
movq 0x8080(%r14), %rax
movq %rax, 0x30(%rbx)
testb $0x20, 0x203ca87(%rip)  # 0x2045a68
jne 0x900b
leaq 0x10(%rbx), %rdi
callq 0xc986
testb %al, %al
je 0x8ffc
movq %rbx, %rdi
addq $0x38, %rdi
callq 0x901f
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x8080(%r14), %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x3b47
jmp 0x8fe3
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: evmRevert
static void evmRevert(stateChanges_t **changes) {
    if (*changes == NULL) {
        return;
    }
    account_t *account = getAccount((*changes)->account);
    evmRevertStorageChanges(account, &(*changes)->storageChanges);
    evmRevertLogChanges(&(*changes)->logChanges);

    evmRevert(&(*changes)->next);
    free(*changes);
    *changes = NULL;
}

// Assembly:
movq (%rdi), %rax
testq %rax, %rax
je 0x907d
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl 0x10(%rax), %ecx
movl %ecx, 0x10(%rsp)
movups (%rax), %xmm0
movups %xmm0, (%rsp)
callq 0x82ed
movq (%rbx), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0xc73f
movq (%rbx), %rdi
addq $0x18, %rdi
callq 0xc7d4
movq (%rbx), %rdi
addq $0x28, %rdi
callq 0x901f
movq (%rbx), %rdi
callq 0x3040
movq $0x0, (%rbx)
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: warmStorage
static storage_t *warmStorage(context_t *callContext, uint256_t *key, uint64_t warmGasCost) {
    account_t *account = callContext->account;
    storage_t *storage = getAccountStorage(account, key);
    if (storage->warm != evmIteration) {
        if (callContext->gas < warmGasCost) {
            return NULL;
        }
        callContext->gas -= warmGasCost;
        storage->warm = evmIteration;
        copy256(&storage->original, &storage->value);
    }
    return storage;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %r14
movq 0x8008(%rdi), %rdi
callq 0x867f
movq %rax, %rbx
movq 0x204d491(%rip), %rax   # 0x2059a80
cmpq %rax, 0x60(%rbx)
je 0xc620
movq 0x8080(%r14), %rcx
subq %r15, %rcx
jae 0xc605
xorl %ebx, %ebx
jmp 0xc620
movq %rcx, 0x8080(%r14)
movq %rax, 0x60(%rbx)
leaq 0x40(%rbx), %rdi
movq %rbx, %rsi
addq $0x20, %rsi
callq 0xc9b5
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: getAccountTransientStorage
static tstorage_t *getAccountTransientStorage(account_t *account, const uint256_t *key) {
    tstorage_t **tstorage = &account->tstorage;
    while (*tstorage != NULL) {
        if (equal256(&(*tstorage)->key, key)) {
            return *tstorage;
        }
        tstorage = &(*tstorage)->next;
    }
    *tstorage = calloc(1, sizeof(tstorage_t));
    copy256(&(*tstorage)->key, key);
    return *tstorage;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
addq $0x48, %rbx
testq %rdi, %rdi
je 0xc655
movq %r14, %rsi
callq 0xd232
testb %al, %al
jne 0xc672
movq (%rbx), %rbx
movq 0x48(%rbx), %rdi
jmp 0xc637
movl $0x1, %edi
movl $0x50, %esi
callq 0x31b0
movq %rax, (%rbx)
movq %rax, %rdi
movq %r14, %rsi
callq 0xc9b5
movq (%rbx), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/wjmelements[P]evm/src/evm.c
// Function: mergeStateChanges
static void mergeStateChanges(stateChanges_t **dst, stateChanges_t *src) {
    if (src == NULL) {
        return;
    }
    mergeStateChanges(dst, src->next);

    while (*dst != NULL) {
        if (AddressEqual(&src->account, &(*dst)->account)) {
            // merge!

            // concatenate the linked lists
            storageChanges_t **storageEnd = &src->storageChanges;
            while (*storageEnd != NULL) {
                storageEnd = &(*storageEnd)->prev;
            }
            *storageEnd = (*dst)->storageChanges;
            (*dst)->storageChanges = src->storageChanges;

            logChanges_t **logsEnd = &src->logChanges;
            while (*logsEnd != NULL) {
                logsEnd = &(*logsEnd)->prev;
            }
            *logsEnd = (*dst)->logChanges;
            (*dst)->logChanges = src->logChanges;

            return;
        }
        dst = &(*dst)->next;
    }
    // reuse src
    src->next = *dst;
    *dst = src;
}

// Assembly:
testq %rsi, %rsi
je 0xc73e
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x28(%rsi), %rsi
callq 0xc67d
movq (%r14), %rax
testq %rax, %rax
je 0xc6db
movb (%rbx), %cl
cmpb (%rax), %cl
jne 0xc6c8
xorl %esi, %esi
movq %rsi, %rdx
cmpq $0x13, %rsi
je 0xc6c2
movb 0x1(%rbx,%rdx), %dil
leaq 0x1(%rdx), %rsi
cmpb 0x1(%rax,%rdx), %dil
je 0xc6a9
cmpq $0x13, %rdx
jae 0xc6e8
movq %rax, %r14
movq 0x28(%rax), %rdx
addq $0x28, %r14
movq %rdx, %rax
testq %rdx, %rdx
jne 0xc6a3
movq $0x0, 0x28(%rbx)
movq %rbx, (%r14)
jmp 0xc737
leaq 0x20(%rbx), %rdx
movq %rdx, %rcx
movq (%rdx), %rsi
leaq 0x68(%rsi), %rdx
testq %rsi, %rsi
jne 0xc6ec
movq 0x20(%rax), %rax
movq %rax, (%rcx)
movq 0x20(%rbx), %rax
movq (%r14), %rcx
movq %rax, 0x20(%rcx)
addq $0x18, %rbx
movq %rbx, %rcx
movq %rcx, %rax
movq (%rcx), %rdx
leaq 0x20(%rdx), %rcx
testq %rdx, %rdx
jne 0xc714
movq (%r14), %rcx
movq 0x18(%rcx), %rcx
movq %rcx, (%rax)
movq (%rbx), %rax
movq (%r14), %rcx
movq %rax, 0x18(%rcx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq