LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: test_contention
static void test_contention(skinny_mutex_t *mutex)
{
	struct test_contention tc;
	pthread_t threads[10];
	int i;

	tc.mutex = mutex;
	tc.held = 0;
	tc.count = 0;

	assert(!skinny_mutex_lock(tc.mutex));

	for (i = 0; i < 10; i++)
		assert(!pthread_create(&threads[i], NULL, bump, &tc));

	assert(!skinny_mutex_unlock(tc.mutex));

	for (i = 0; i < 10; i++)
		assert(!pthread_join(threads[i], NULL));

	assert(!skinny_mutex_lock(tc.mutex));
	assert(!tc.held);
	assert(tc.count == 10);
	assert(!skinny_mutex_unlock(tc.mutex));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rdi, (%rsp)
andq $0x0, 0x8(%rsp)
callq 0x2642
testl %eax, %eax
jne 0x1ea6
xorl %ecx, %ecx
leaq 0x9f8(%rip), %rbx       # 0x27d9
movq %rsp, %r14
leaq 0x8(%rcx), %r15
cmpq $0x58, %r15
je 0x1e23
leaq (%rsp,%rcx), %rdi
addq $0x10, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1130
movq %r15, %rcx
testl %eax, %eax
je 0x1de4
leaq 0x180e(%rip), %rdi      # 0x361f
leaq 0x133e(%rip), %rsi      # 0x3156
leaq 0x17d9(%rip), %rcx      # 0x35f8
pushq $0x42
jmp 0x1e66
movq (%rsp), %rdi
callq 0x2655
testl %eax, %eax
jne 0x1ebf
xorl %ebx, %ebx
cmpq $0xa, %rbx
je 0x1e6c
movq 0x10(%rsp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1170
incq %rbx
testl %eax, %eax
je 0x1e36
leaq 0x1816(%rip), %rdi      # 0x366c
leaq 0x12f9(%rip), %rsi      # 0x3156
leaq 0x1794(%rip), %rcx      # 0x35f8
pushq $0x47
popq %rdx
callq 0x10b0
movq (%rsp), %rdi
callq 0x2642
testl %eax, %eax
jne 0x1ed8
cmpl $0x0, 0x8(%rsp)
jne 0x1ef4
cmpl $0xa, 0xc(%rsp)
jne 0x1f10
movq (%rsp), %rdi
callq 0x2655
testl %eax, %eax
jne 0x1f2c
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x172e(%rip), %rdi      # 0x35db
leaq 0x12a2(%rip), %rsi      # 0x3156
leaq 0x173d(%rip), %rcx      # 0x35f8
pushq $0x3f
jmp 0x1e66
leaq 0x1787(%rip), %rdi      # 0x364d
leaq 0x1289(%rip), %rsi      # 0x3156
leaq 0x1724(%rip), %rcx      # 0x35f8
pushq $0x44
jmp 0x1e66
leaq 0x16fc(%rip), %rdi      # 0x35db
leaq 0x1270(%rip), %rsi      # 0x3156
leaq 0x170b(%rip), %rcx      # 0x35f8
pushq $0x49
jmp 0x1e66
leaq 0x1791(%rip), %rdi      # 0x368c
leaq 0x1254(%rip), %rsi      # 0x3156
leaq 0x16ef(%rip), %rcx      # 0x35f8
pushq $0x4a
jmp 0x1e66
leaq 0x177e(%rip), %rdi      # 0x3695
leaq 0x1238(%rip), %rsi      # 0x3156
leaq 0x16d3(%rip), %rcx      # 0x35f8
pushq $0x4b
jmp 0x1e66
leaq 0x171a(%rip), %rdi      # 0x364d
leaq 0x121c(%rip), %rsi      # 0x3156
leaq 0x16b7(%rip), %rcx      # 0x35f8
pushq $0x4c
jmp 0x1e66
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: test_lock_cancellation
static void test_lock_cancellation(skinny_mutex_t *mutex)
{
	pthread_t thread;
	void *retval;

	assert(!skinny_mutex_lock(mutex));
	assert(!pthread_create(&thread, NULL, lock_cancellation_thread,
			       mutex));
	delay();
	assert(!pthread_cancel(thread));
	assert(!skinny_mutex_unlock(mutex));
	assert(!pthread_join(thread, &retval));
	assert(!retval);
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x2642
testl %eax, %eax
jne 0x1fb3
leaq 0x901(%rip), %rdx       # 0x2861
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x1fcc
callq 0x2797
movq (%rsp), %rdi
callq 0x1190
testl %eax, %eax
jne 0x1fe5
movq %rbx, %rdi
callq 0x2655
testl %eax, %eax
jne 0x1ffe
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1170
testl %eax, %eax
jne 0x2017
cmpq $0x0, 0x8(%rsp)
jne 0x2030
addq $0x10, %rsp
popq %rbx
retq
leaq 0x15c3(%rip), %rdi      # 0x357d
leaq 0x1195(%rip), %rsi      # 0x3156
leaq 0x1737(%rip), %rcx      # 0x36ff
pushq $0x5d
jmp 0x2047
leaq 0x175a(%rip), %rdi      # 0x372d
leaq 0x117c(%rip), %rsi      # 0x3156
leaq 0x171e(%rip), %rcx      # 0x36ff
pushq $0x5f
jmp 0x2047
leaq 0x1781(%rip), %rdi      # 0x376d
leaq 0x1163(%rip), %rsi      # 0x3156
leaq 0x1705(%rip), %rcx      # 0x36ff
pushq $0x61
jmp 0x2047
leaq 0x15ba(%rip), %rdi      # 0x35bf
leaq 0x114a(%rip), %rsi      # 0x3156
leaq 0x16ec(%rip), %rcx      # 0x36ff
pushq $0x62
jmp 0x2047
leaq 0x1767(%rip), %rdi      # 0x3785
leaq 0x1131(%rip), %rsi      # 0x3156
leaq 0x16d3(%rip), %rcx      # 0x36ff
pushq $0x63
jmp 0x2047
leaq 0x176d(%rip), %rdi      # 0x37a4
leaq 0x1118(%rip), %rsi      # 0x3156
leaq 0x16ba(%rip), %rcx      # 0x36ff
pushq $0x64
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: test_trylock
static void test_trylock(skinny_mutex_t *mutex)
{
	pthread_t thread1, thread2;

	assert(!skinny_mutex_trylock(mutex));

	assert(!pthread_create(&thread1, NULL, trylock_thread, mutex));
	assert(!pthread_join(thread1, NULL));

	assert(!pthread_create(&thread1, NULL, trylock_contender_thread,
			       mutex));
	delay();
	assert(!pthread_create(&thread2, NULL, trylock_thread, mutex));
	assert(!pthread_join(thread2, NULL));
	assert(!skinny_mutex_unlock(mutex));
	assert(!pthread_join(thread1, NULL));
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x14e5
testl %eax, %eax
jne 0x210d
leaq 0x84b(%rip), %rdx       # 0x28b4
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x2126
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x213f
leaq 0x848(%rip), %rdx       # 0x28e0
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x215c
callq 0x2797
leaq 0x7fb(%rip), %rdx       # 0x28b4
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x217b
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x219a
movq %rbx, %rdi
callq 0x2655
testl %eax, %eax
jne 0x21b9
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x21d8
addq $0x10, %rsp
popq %rbx
retq
leaq 0x16bf(%rip), %rdi      # 0x37d3
leaq 0x103b(%rip), %rsi      # 0x3156
leaq 0x16ce(%rip), %rcx      # 0x37f0
pushq $0x7c
jmp 0x2156
leaq 0x16e7(%rip), %rdi      # 0x3814
leaq 0x1022(%rip), %rsi      # 0x3156
leaq 0x16b5(%rip), %rcx      # 0x37f0
pushq $0x7e
jmp 0x2156
leaq 0x1705(%rip), %rdi      # 0x384b
leaq 0x1009(%rip), %rsi      # 0x3156
leaq 0x169c(%rip), %rcx      # 0x37f0
pushq $0x7f
popq %rdx
callq 0x10b0
leaq 0x1705(%rip), %rdi      # 0x3868
leaq 0xfec(%rip), %rsi       # 0x3156
leaq 0x167f(%rip), %rcx      # 0x37f0
movl $0x82, %edx
callq 0x10b0
leaq 0x1727(%rip), %rdi      # 0x38a9
leaq 0xfcd(%rip), %rsi       # 0x3156
leaq 0x1660(%rip), %rcx      # 0x37f0
movl $0x84, %edx
callq 0x10b0
leaq 0x173f(%rip), %rdi      # 0x38e0
leaq 0xfae(%rip), %rsi       # 0x3156
leaq 0x1641(%rip), %rcx      # 0x37f0
movl $0x85, %edx
callq 0x10b0
leaq 0x13ff(%rip), %rdi      # 0x35bf
leaq 0xf8f(%rip), %rsi       # 0x3156
leaq 0x1622(%rip), %rcx      # 0x37f0
movl $0x86, %edx
callq 0x10b0
leaq 0x166c(%rip), %rdi      # 0x384b
leaq 0xf70(%rip), %rsi       # 0x3156
leaq 0x1603(%rip), %rcx      # 0x37f0
movl $0x87, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: test_cond_wait
static void test_cond_wait(skinny_mutex_t *mutex)
{
	struct test_cond_wait tcw;
	pthread_t thread;

	tcw.mutex = mutex;
	assert(!pthread_cond_init(&tcw.cond, NULL));
	tcw.flag = 0;

	assert(!pthread_create(&thread, NULL, test_cond_wait_thread, &tcw));

	delay();
	assert(!skinny_mutex_lock(mutex));
	tcw.flag = 1;
	assert(!pthread_cond_signal(&tcw.cond));
	assert(!skinny_mutex_unlock(mutex));

	assert(!pthread_join(thread, NULL));

	assert(!pthread_cond_destroy(&tcw.cond));
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r14
leaq 0x10(%rsp), %rbx
movq %rdi, -0x8(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10f0
testl %eax, %eax
jne 0x22a6
leaq 0x8(%rsp), %rcx
andl $0x0, 0x38(%rcx)
leaq 0x711(%rip), %rdx       # 0x293d
movq %rsp, %rdi
xorl %esi, %esi
callq 0x1130
testl %eax, %eax
jne 0x22c5
callq 0x2797
movq %r14, %rdi
callq 0x2642
testl %eax, %eax
jne 0x22e4
movl $0x1, 0x40(%rsp)
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
jne 0x2303
movq %r14, %rdi
callq 0x2655
testl %eax, %eax
jne 0x2322
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x2341
movq %rbx, %rdi
callq 0x1150
testl %eax, %eax
jne 0x2360
addq $0x48, %rsp
popq %rbx
popq %r14
retq
leaq 0x16b9(%rip), %rdi      # 0x3966
leaq 0xea2(%rip), %rsi       # 0x3156
leaq 0x16cf(%rip), %rcx      # 0x398a
movl $0xaa, %edx
callq 0x10b0
leaq 0x16e4(%rip), %rdi      # 0x39b0
leaq 0xe83(%rip), %rsi       # 0x3156
leaq 0x16b0(%rip), %rcx      # 0x398a
movl $0xad, %edx
callq 0x10b0
leaq 0x1292(%rip), %rdi      # 0x357d
leaq 0xe64(%rip), %rsi       # 0x3156
leaq 0x1691(%rip), %rcx      # 0x398a
movl $0xb0, %edx
callq 0x10b0
leaq 0x16e2(%rip), %rdi      # 0x39ec
leaq 0xe45(%rip), %rsi       # 0x3156
leaq 0x1672(%rip), %rcx      # 0x398a
movl $0xb2, %edx
callq 0x10b0
leaq 0x1296(%rip), %rdi      # 0x35bf
leaq 0xe26(%rip), %rsi       # 0x3156
leaq 0x1653(%rip), %rcx      # 0x398a
movl $0xb3, %edx
callq 0x10b0
leaq 0xfe2(%rip), %rdi       # 0x332a
leaq 0xe07(%rip), %rsi       # 0x3156
leaq 0x1634(%rip), %rcx      # 0x398a
movl $0xb5, %edx
callq 0x10b0
leaq 0x16a5(%rip), %rdi      # 0x3a0c
leaq 0xde8(%rip), %rsi       # 0x3156
leaq 0x1615(%rip), %rcx      # 0x398a
movl $0xb7, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: test_cond_timedwait
static void test_cond_timedwait(skinny_mutex_t *mutex)
{
	pthread_cond_t cond;
	struct timespec t;

	assert(!pthread_cond_init(&cond, NULL));

	assert(!clock_gettime(CLOCK_REALTIME, &t));

	t.tv_nsec += 1000000;
	if (t.tv_nsec > 1000000000) {
		t.tv_nsec -= 1000000000;
		t.tv_sec++;
	}

	assert(!skinny_mutex_lock(mutex));
	assert(skinny_mutex_cond_timedwait(&cond, mutex, &t) == ETIMEDOUT);
	assert(!skinny_mutex_unlock(mutex));

	assert(!pthread_cond_destroy(&cond));
}

// Assembly:
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x10f0
testl %eax, %eax
jne 0x2422
movq %rsp, %rsi
xorl %edi, %edi
callq 0x1050
testl %eax, %eax
jne 0x2441
movq 0x8(%rsp), %rax
leaq 0xf4240(%rax), %rcx
movq %rcx, 0x8(%rsp)
cmpq $0x3b8b87c1, %rax       # imm = 0x3B8B87C1
jl 0x23d5
addq $-0x3b8b87c0, %rax      # imm = 0xC4747840
movq %rax, 0x8(%rsp)
incq (%rsp)
movq %rbx, %rdi
callq 0x2642
testl %eax, %eax
jne 0x2460
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x17ad
cmpl $0x6e, %eax
jne 0x247f
movq %rbx, %rdi
callq 0x2655
testl %eax, %eax
jne 0x249e
leaq 0x10(%rsp), %rdi
callq 0x1150
testl %eax, %eax
jne 0x24bd
addq $0x40, %rsp
popq %rbx
retq
leaq 0x16bc(%rip), %rdi      # 0x3ae5
leaq 0xd26(%rip), %rsi       # 0x3156
leaq 0x16ce(%rip), %rcx      # 0x3b05
movl $0xbf, %edx
callq 0x10b0
leaq 0x16e8(%rip), %rdi      # 0x3b30
leaq 0xd07(%rip), %rsi       # 0x3156
leaq 0x16af(%rip), %rcx      # 0x3b05
movl $0xc1, %edx
callq 0x10b0
leaq 0x1116(%rip), %rdi      # 0x357d
leaq 0xce8(%rip), %rsi       # 0x3156
leaq 0x1690(%rip), %rcx      # 0x3b05
movl $0xc9, %edx
callq 0x10b0
leaq 0x16cd(%rip), %rdi      # 0x3b53
leaq 0xcc9(%rip), %rsi       # 0x3156
leaq 0x1671(%rip), %rcx      # 0x3b05
movl $0xca, %edx
callq 0x10b0
leaq 0x111a(%rip), %rdi      # 0x35bf
leaq 0xcaa(%rip), %rsi       # 0x3156
leaq 0x1652(%rip), %rcx      # 0x3b05
movl $0xcb, %edx
callq 0x10b0
leaq 0x16ca(%rip), %rdi      # 0x3b8e
leaq 0xc8b(%rip), %rsi       # 0x3156
leaq 0x1633(%rip), %rcx      # 0x3b05
movl $0xcd, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: test_cond_wait_cancellation
static void test_cond_wait_cancellation(skinny_mutex_t *mutex)
{
	struct test_cond_wait tcw;
	pthread_t thread;
	void *retval;

	tcw.mutex = mutex;
	assert(!pthread_cond_init(&tcw.cond, NULL));
	tcw.flag = 0;

	assert(!pthread_create(&thread, NULL, test_cond_wait_thread, &tcw));

	delay();
	assert(!pthread_cancel(thread));
	assert(!pthread_join(thread, &retval));
	assert(retval == PTHREAD_CANCELED);

	assert(!pthread_cond_destroy(&tcw.cond));
}

// Assembly:
pushq %rbx
subq $0x50, %rsp
leaq 0x18(%rsp), %rbx
movq %rdi, -0x8(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10f0
testl %eax, %eax
jne 0x255c
leaq 0x10(%rsp), %rcx
andl $0x0, 0x38(%rcx)
leaq 0x435(%rip), %rdx       # 0x293d
movq %rsp, %rdi
xorl %esi, %esi
callq 0x1130
testl %eax, %eax
jne 0x257b
callq 0x2797
movq (%rsp), %rdi
callq 0x1190
testl %eax, %eax
jne 0x259a
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1170
testl %eax, %eax
jne 0x25b9
cmpq $-0x1, 0x8(%rsp)
jne 0x25d8
movq %rbx, %rdi
callq 0x1150
testl %eax, %eax
jne 0x25f7
addq $0x50, %rsp
popq %rbx
retq
leaq 0x1403(%rip), %rdi      # 0x3966
leaq 0xbec(%rip), %rsi       # 0x3156
leaq 0x163a(%rip), %rcx      # 0x3bab
movl $0xd7, %edx
callq 0x10b0
leaq 0x142e(%rip), %rdi      # 0x39b0
leaq 0xbcd(%rip), %rsi       # 0x3156
leaq 0x161b(%rip), %rcx      # 0x3bab
movl $0xda, %edx
callq 0x10b0
leaq 0x11cc(%rip), %rdi      # 0x376d
leaq 0xbae(%rip), %rsi       # 0x3156
leaq 0x15fc(%rip), %rcx      # 0x3bab
movl $0xdd, %edx
callq 0x10b0
leaq 0x11c5(%rip), %rdi      # 0x3785
leaq 0xb8f(%rip), %rsi       # 0x3156
leaq 0x15dd(%rip), %rcx      # 0x3bab
movl $0xde, %edx
callq 0x10b0
leaq 0xf0a(%rip), %rdi       # 0x34e9
leaq 0xb70(%rip), %rsi       # 0x3156
leaq 0x15be(%rip), %rcx      # 0x3bab
movl $0xdf, %edx
callq 0x10b0
leaq 0x140e(%rip), %rdi      # 0x3a0c
leaq 0xb51(%rip), %rsi       # 0x3156
leaq 0x159f(%rip), %rcx      # 0x3bab
movl $0xe1, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: do_test_cond_thread
static void *do_test_cond_thread(void *v_dt)
{
	struct do_test_cond *dt = v_dt;

	assert(!skinny_mutex_lock(&dt->mutex));
	dt->phase = 1;
	assert(!pthread_cond_signal(&dt->cond));

	do {
		assert(!skinny_mutex_cond_wait(&dt->cond, &dt->mutex));
	} while (dt->phase != 2);

	assert(!skinny_mutex_unlock(&dt->mutex));

	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2642
testl %eax, %eax
jne 0x26d9
movl $0x1, 0x38(%rbx)
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x10c0
testl %eax, %eax
jne 0x26f8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x189f
testl %eax, %eax
jne 0x26ba
cmpl $0x2, 0x38(%rbx)
jne 0x268f
movq %rbx, %rdi
callq 0x2655
testl %eax, %eax
jne 0x2717
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xd27(%rip), %rdi       # 0x33e8
leaq 0xa8e(%rip), %rsi       # 0x3156
leaq 0xcd7(%rip), %rcx       # 0x33a6
movl $0x101, %edx            # imm = 0x101
callq 0x10b0
leaq 0xca7(%rip), %rdi       # 0x3387
leaq 0xa6f(%rip), %rsi       # 0x3156
leaq 0xcb8(%rip), %rcx       # 0x33a6
movl $0xfc, %edx
callq 0x10b0
leaq 0xcc9(%rip), %rdi       # 0x33c8
leaq 0xa50(%rip), %rsi       # 0x3156
leaq 0xc99(%rip), %rcx       # 0x33a6
movl $0xfe, %edx
callq 0x10b0
leaq 0xcf9(%rip), %rdi       # 0x3417
leaq 0xa31(%rip), %rsi       # 0x3156
leaq 0xc7a(%rip), %rcx       # 0x33a6
movl $0x104, %edx            # imm = 0x104
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: do_test_hammer_thread
static void *do_test_hammer_thread(void *v_m)
{
	skinny_mutex_t *m = v_m;

	for (;;) {
		assert(!skinny_mutex_lock(m));
		assert(!skinny_mutex_unlock(m));
		pthread_testcancel();
	}

	return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x2642
testl %eax, %eax
jne 0x2759
movq %rbx, %rdi
callq 0x2655
testl %eax, %eax
jne 0x2778
callq 0x10e0
jmp 0x273a
leaq 0xda4(%rip), %rdi       # 0x3504
leaq 0x9ef(%rip), %rsi       # 0x3156
leaq 0xdac(%rip), %rcx       # 0x351a
movl $0x12d, %edx            # imm = 0x12D
callq 0x10b0
leaq 0xdbf(%rip), %rdi       # 0x353e
leaq 0x9d0(%rip), %rsi       # 0x3156
leaq 0xd8d(%rip), %rcx       # 0x351a
movl $0x12e, %edx            # imm = 0x12E
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: delay
static void delay(void)
{
	struct timespec ts;
	ts.tv_sec = 0;
	ts.tv_nsec = 1000000;
	assert(!nanosleep(&ts, NULL));
}

// Assembly:
subq $0x18, %rsp
leaq 0x8(%rsp), %rdi
andq $0x0, (%rdi)
movq $0xf4240, 0x8(%rdi)     # imm = 0xF4240
xorl %esi, %esi
callq 0x10a0
testl %eax, %eax
jne 0x27bc
addq $0x18, %rsp
retq
leaq 0xd93(%rip), %rdi       # 0x3556
leaq 0x98c(%rip), %rsi       # 0x3156
leaq 0xd9b(%rip), %rcx       # 0x356c
pushq $0x1d
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: bump
static void *bump(void *v_tc)
{
	struct test_contention *tc = v_tc;

	assert(!skinny_mutex_lock(tc->mutex));
	assert(!tc->held);
	tc->held = 1;
	delay();
	tc->held = 0;
	tc->count++;
	assert(!skinny_mutex_unlock(tc->mutex));

	return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2642
testl %eax, %eax
jne 0x2812
cmpl $0x0, 0x8(%rbx)
jne 0x282b
movl $0x1, 0x8(%rbx)
callq 0x2797
andl $0x0, 0x8(%rbx)
incl 0xc(%rbx)
movq (%rbx), %rdi
callq 0x2655
testl %eax, %eax
jne 0x2844
xorl %eax, %eax
popq %rbx
retq
leaq 0xe8b(%rip), %rdi       # 0x36a4
leaq 0x936(%rip), %rsi       # 0x3156
leaq 0xe9b(%rip), %rcx       # 0x36c2
pushq $0x2a
jmp 0x285b
leaq 0xea3(%rip), %rdi       # 0x36d5
leaq 0x91d(%rip), %rsi       # 0x3156
leaq 0xe82(%rip), %rcx       # 0x36c2
pushq $0x2b
jmp 0x285b
leaq 0xe94(%rip), %rdi       # 0x36df
leaq 0x904(%rip), %rsi       # 0x3156
leaq 0xe69(%rip), %rcx       # 0x36c2
pushq $0x30
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: lock_cancellation_thread
static void *lock_cancellation_thread(void *v_mutex)
{
	skinny_mutex_t *mutex = v_mutex;
 	assert(!skinny_mutex_lock(mutex));
	assert(!skinny_mutex_unlock(mutex));
	return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2642
testl %eax, %eax
jne 0x287e
movq %rbx, %rdi
callq 0x2655
testl %eax, %eax
jne 0x2897
xorl %eax, %eax
popq %rbx
retq
leaq 0xcf8(%rip), %rdi       # 0x357d
leaq 0x8ca(%rip), %rsi       # 0x3156
leaq 0xf19(%rip), %rcx       # 0x37ac
pushq $0x52
jmp 0x28ae
leaq 0xd21(%rip), %rdi       # 0x35bf
leaq 0x8b1(%rip), %rsi       # 0x3156
leaq 0xf00(%rip), %rcx       # 0x37ac
pushq $0x53
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: trylock_contender_thread
static void *trylock_contender_thread(void *v_mutex)
{
	skinny_mutex_t *mutex = v_mutex;
	assert(!skinny_mutex_lock(mutex));
	delay();
	delay();
	assert(!skinny_mutex_unlock(mutex));
	return NULL;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x2642
testl %eax, %eax
jne 0x2907
callq 0x2797
callq 0x2797
movq %rbx, %rdi
callq 0x2655
testl %eax, %eax
jne 0x2920
xorl %eax, %eax
popq %rbx
retq
leaq 0xc6f(%rip), %rdi       # 0x357d
leaq 0x841(%rip), %rsi       # 0x3156
leaq 0x1023(%rip), %rcx      # 0x393f
pushq $0x71
jmp 0x2937
leaq 0xc98(%rip), %rdi       # 0x35bf
leaq 0x828(%rip), %rsi       # 0x3156
leaq 0x100a(%rip), %rcx      # 0x393f
pushq $0x74
popq %rdx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/dpw[P]skinny-mutex/test.c
// Function: test_cond_wait_thread
static void *test_cond_wait_thread(void *v_tcw)
{
	struct test_cond_wait *tcw = v_tcw;

	assert(!skinny_mutex_lock(tcw->mutex));
	pthread_cleanup_push(test_cond_wait_cleanup, tcw);

	while (!tcw->flag)
		assert(!skinny_mutex_cond_wait(&tcw->cond, tcw->mutex));

	pthread_cleanup_pop(1);
	return NULL;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2642
testl %eax, %eax
jne 0x29cb
movq %rsp, %rdi
xorl %esi, %esi
callq 0x1180
testl %eax, %eax
jne 0x29bb
movq %rsp, %rdi
callq 0x1160
leaq 0x8(%rbx), %r14
cmpl $0x0, 0x38(%rbx)
jne 0x29a1
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x189f
testl %eax, %eax
je 0x296d
leaq 0x10e7(%rip), %rdi      # 0x3a70
leaq 0x7c6(%rip), %rsi       # 0x3156
leaq 0x10b5(%rip), %rcx      # 0x3a4c
movl $0x9e, %edx
callq 0x10b0
movq %rsp, %rdi
callq 0x1090
movq %rbx, %rdi
callq 0x29ea
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x29ea
movq %rsp, %rdi
callq 0x1120
leaq 0x105b(%rip), %rdi      # 0x3a2d
leaq 0x77d(%rip), %rsi       # 0x3156
leaq 0x106c(%rip), %rcx      # 0x3a4c
movl $0x9a, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glXCreateNewContext
extern GLXContext glXCreateNewContext( Display *dpy, GLXFBConfig config, int renderType, GLXContext shareList, Bool direct )
{
	GLXContext ctx;

	ctx = override_create_context(dpy, NULL, &config, shareList, direct, NULL);
	if (ctx == NULL) {
		GH_GET_PTR_GL(glXCreateNewContext);
		ctx=GH_glXCreateNewContext(dpy, config, renderType, shareList, direct);
	}
	create_context(ctx);
	return ctx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %ebp
movq %rdi, %r15
leaq 0x8(%rsp), %rdx
movq %rsi, (%rdx)
xorl %esi, %esi
xorl %r9d, %r9d
callq 0x2f64
movq %rax, %r12
testq %rax, %rax
jne 0x3f2d
leaq 0x728d(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x72c8(%rip)      # 0xb1b8
jne 0x3f05
leaq 0x3215(%rip), %rdi      # 0x710e
callq 0x3991
movq %rax, 0x72b3(%rip)      # 0xb1b8
leaq 0x7264(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x72a0(%rip), %rax      # 0xb1b8
movq 0x8(%rsp), %rsi
movq %r15, %rdi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
callq *%rax
movq %rax, %r12
movq %r12, %rdi
callq 0x3a74
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glXCreateContextAttribsARB
extern GLXContext glXCreateContextAttribsARB (Display * dpy, GLXFBConfig config, GLXContext shareList, Bool direct, const int *attr)
{
	GLXContext ctx;

	ctx = override_create_context(dpy, NULL, &config, shareList, direct, attr);
	if (ctx == NULL) {
		GH_GET_PTR_GL(glXCreateContextAttribsARB);
		ctx=GH_glXCreateContextAttribsARB(dpy, config, shareList, direct, attr);
	}
	create_context(ctx);
	return ctx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %rbx
movl %ecx, %ebp
movq %rdx, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %rdx
movq %rsi, (%rdx)
xorl %esi, %esi
movq %r14, %rcx
movl %ebp, %r8d
movq %rbx, %r9
callq 0x2f64
movq %rax, %r12
testq %rax, %rax
jne 0x3fcd
leaq 0x71ed(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x7230(%rip)      # 0xb1c0
jne 0x3fa5
leaq 0x3189(%rip), %rdi      # 0x7122
callq 0x3991
movq %rax, 0x721b(%rip)      # 0xb1c0
leaq 0x71c4(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x7208(%rip), %rax      # 0xb1c0
movq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movl %ebp, %ecx
movq %rbx, %r8
callq *%rax
movq %rax, %r12
movq %r12, %rdi
callq 0x3a74
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glXImportContextEXT
extern GLXContext glXImportContextEXT (Display *dpy, GLXContextID id)
{
	GLXContext ctx;

	GH_GET_PTR_GL(glXImportContextEXT);
	ctx=GH_glXImportContextEXT(dpy, id);
	create_context(ctx);
	return ctx;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x717a(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x71c5(%rip)      # 0xb1c8
jne 0x4018
leaq 0x3131(%rip), %rdi      # 0x713d
callq 0x3991
movq %rax, 0x71b0(%rip)      # 0xb1c8
leaq 0x7151(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x719d(%rip), %rax      # 0xb1c8
movq %r14, %rdi
movq %rbx, %rsi
callq *%rax
movq %rax, %rbx
movq %rax, %rdi
callq 0x3a74
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glXCreateContextWithConfigSGIX
extern GLXContext glXCreateContextWithConfigSGIX (Display *dpy, GLXFBConfigSGIX config, int renderType, GLXContext shareList, Bool direct)
{
	GLXContext ctx;

	/* TODO: override_create_context for this case */
	GH_GET_PTR_GL(glXCreateContextWithConfigSGIX);
	ctx=GH_glXCreateContextWithConfigSGIX(dpy, config, renderType, shareList, direct);
	create_context(ctx);
	return ctx;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
leaq 0x710a(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x715d(%rip)      # 0xb1d0
jne 0x4088
leaq 0x30d5(%rip), %rdi      # 0x7151
callq 0x3991
movq %rax, 0x7148(%rip)      # 0xb1d0
leaq 0x70e1(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x7135(%rip), %rax      # 0xb1d0
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
callq *%rax
movq %rax, %rbx
movq %rax, %rdi
callq 0x3a74
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glDebugMessageCallback
extern void glDebugMessageCallback(GLDEBUGPROC proc, const GLvoid *user_ptr)
{
	GH_GET_PTR_GL(glDebugMessageCallback);
	if (GH_glDebugMessageCallback) {
		gl_context_t *glc=(gl_context_t*)pthread_getspecific(ctx_current);
		if (glc) {
			glc->original_debug_callback = proc;
			glc->original_debug_callback_user_ptr = user_ptr;

			if (glc->flags & GH_GL_INTERCEPT_DEBUG) {
				GH_verbose(GH_MSG_INFO, "injecting debug output [core]!\n");
				proc = GH_debug_callback;
				user_ptr = glc;
			}
		} else {
			GH_verbose(GH_MSG_WARNING, "debug message callback without current context!\n");
		}
		GH_glDebugMessageCallback(proc, user_ptr);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x620b(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x628e(%rip)      # 0xb200
jne 0x4f87
leaq 0x2219(%rip), %rdi      # 0x7194
callq 0x3991
movq %rax, 0x6279(%rip)      # 0xb200
leaq 0x61e2(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x6265(%rip)      # 0xb200
je 0x4fe1
movl 0x6265(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x4fe7
movq %rax, %r15
movq %r14, 0x818(%rax)
movq %rbx, 0x828(%rax)
testb $0x4, 0x18(%rax)
je 0x4ff8
leaq 0x21e0(%rip), %rsi      # 0x71ab
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2c49
leaq 0x30(%rip), %r14        # 0x500c
movq %r15, %rbx
jmp 0x4ff8
popq %rbx
popq %r14
popq %r15
retq
leaq 0x21dd(%rip), %rsi      # 0x71cb
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2c49
movq 0x6201(%rip), %rax      # 0xb200
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: GH_debug_callback
static void APIENTRY
GH_debug_callback(GLenum source, GLenum type, GLuint id, GLenum severity,
		  GLsizei length, const GLchar *message, const GLvoid* userParam)
{
	const gl_context_t *glc=(const gl_context_t*)userParam;
	if (glc) {
		GH_verbose(GH_MSG_INFO, "GLDEBUG: %s %s %s [0x%x]: %s\n",
					translateDebugSourceEnum(source),
					translateDebugTypeEnum(type),
					translateDebugSeverityEnum(severity),
					id, message);
		if (glc->original_debug_callback) {
			glc->original_debug_callback(source, type, id, severity,
						     length, message, glc->original_debug_callback_user_ptr);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x50(%rsp)
je 0x50e2
movl %esi, %r15d
movl %edi, %r13d
leal -0x8246(%r13), %eax
cmpl $0x5, %eax
ja 0x504a
movl %eax, %eax
leaq 0x1fdb(%rip), %rdi      # 0x701c
movslq (%rdi,%rax,4), %rbp
addq %rdi, %rbp
jmp 0x5051
leaq 0x33a9(%rip), %rbp      # 0x83fa
movl %edx, 0x14(%rsp)
leal -0x824c(%r15), %eax
cmpl $0x5, %eax
movl %r8d, 0x10(%rsp)
movq %r9, %r14
ja 0x507b
movl %eax, %eax
leaq 0x1fc2(%rip), %rdx      # 0x7034
movslq (%rdx,%rax,4), %rbx
addq %rdx, %rbx
jmp 0x5082
leaq 0x33bf(%rip), %rbx      # 0x8441
movl %ecx, %edi
movl %ecx, %r12d
callq 0x6461
movq %r14, (%rsp)
leaq 0x3307(%rip), %rsi      # 0x839e
pushq $0x3
popq %rdi
movq %rbp, %rdx
movq %rbx, %rcx
movq %rax, %r8
movl 0x14(%rsp), %ebx
movl %ebx, %r9d
xorl %eax, %eax
callq 0x2c49
movq 0x50(%rsp), %rdx
movq 0x818(%rdx), %rax
testq %rax, %rax
movl 0x10(%rsp), %r8d
je 0x50e2
movq 0x828(%rdx), %rdx
movq %rdx, (%rsp)
movl %r13d, %edi
movl %r15d, %esi
movl %ebx, %edx
movl %r12d, %ecx
movq %r14, %r9
callq *%rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glDebugMessageCallbackARB
extern void glDebugMessageCallbackARB(GLDEBUGPROC proc, const GLvoid *user_ptr)
{
	GH_GET_PTR_GL(glDebugMessageCallbackARB);
	if (GH_glDebugMessageCallbackARB) {
		gl_context_t *glc=(gl_context_t*)pthread_getspecific(ctx_current);
		if (glc) {
			glc->original_debug_callback = proc;
			glc->original_debug_callback_user_ptr = user_ptr;

			if (glc->flags & GH_GL_INTERCEPT_DEBUG) {
				GH_verbose(GH_MSG_INFO, "injecting debug output [ARB]!\n");
				proc = GH_debug_callback;
				user_ptr = glc;
			}
		} else {
			GH_verbose(GH_MSG_WARNING, "debug message callback without current context!\n");
		}
		GH_glDebugMessageCallbackARB(proc, user_ptr);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x606d(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x6100(%rip)      # 0xb210
jne 0x5125
leaq 0x20e3(%rip), %rdi      # 0x71fc
callq 0x3991
movq %rax, 0x60eb(%rip)      # 0xb210
leaq 0x6044(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x60d7(%rip)      # 0xb210
je 0x517f
movl 0x60c7(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x5185
movq %rax, %r15
movq %r14, 0x818(%rax)
movq %rbx, 0x828(%rax)
testb $0x4, 0x18(%rax)
je 0x5196
leaq 0x20ad(%rip), %rsi      # 0x7216
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2c49
leaq -0x16e(%rip), %r14      # 0x500c
movq %r15, %rbx
jmp 0x5196
popq %rbx
popq %r14
popq %r15
retq
leaq 0x203f(%rip), %rsi      # 0x71cb
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2c49
movq 0x6073(%rip), %rax      # 0xb210
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glDebugMessageCallbackKHR
extern void glDebugMessageCallbackKHR(GLDEBUGPROC proc, const GLvoid *user_ptr)
{
	GH_GET_PTR_GL(glDebugMessageCallbackKHR);
	if (GH_glDebugMessageCallbackKHR) {
		gl_context_t *glc=(gl_context_t*)pthread_getspecific(ctx_current);
		if (glc) {
			glc->original_debug_callback = proc;
			glc->original_debug_callback_user_ptr = user_ptr;

			if (glc->flags & GH_GL_INTERCEPT_DEBUG) {
				GH_verbose(GH_MSG_INFO, "injecting debug output [KHR]!\n");
				proc = GH_debug_callback;
				user_ptr = glc;
			}
		} else {
			GH_verbose(GH_MSG_WARNING, "debug message callback without current context!\n");
		}
		GH_glDebugMessageCallbackKHR(proc, user_ptr);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5fb4(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x604f(%rip)      # 0xb218
jne 0x51de
leaq 0x2063(%rip), %rdi      # 0x7235
callq 0x3991
movq %rax, 0x603a(%rip)      # 0xb218
leaq 0x5f8b(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x6026(%rip)      # 0xb218
je 0x5238
movl 0x600e(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x523e
movq %rax, %r15
movq %r14, 0x818(%rax)
movq %rbx, 0x828(%rax)
testb $0x4, 0x18(%rax)
je 0x524f
leaq 0x202d(%rip), %rsi      # 0x724f
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2c49
leaq -0x227(%rip), %r14      # 0x500c
movq %r15, %rbx
jmp 0x524f
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1f86(%rip), %rsi      # 0x71cb
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2c49
movq 0x5fc2(%rip), %rax      # 0xb218
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: glDebugMessageCallbackAMD
extern void glDebugMessageCallbackAMD(GLDEBUGPROCAMD proc, GLvoid *user_ptr)
{
	GH_GET_PTR_GL(glDebugMessageCallbackAMD);
	if (GH_glDebugMessageCallbackAMD) {
		gl_context_t *glc=(gl_context_t*)pthread_getspecific(ctx_current);
		if (glc) {
			glc->original_debug_callback_AMD = proc;
			glc->original_debug_callback_AMD_user_ptr = user_ptr;

			if (glc->flags & GH_GL_INTERCEPT_DEBUG) {
				GH_verbose(GH_MSG_INFO, "injecting debug output [AMD]!\n");
				proc = GH_debug_callback_AMD;
				user_ptr = glc;
			}
		} else {
			GH_verbose(GH_MSG_WARNING, "debug message callback without current context!\n");
		}
		GH_glDebugMessageCallbackAMD(proc, user_ptr);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x5efb(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x5f9e(%rip)      # 0xb220
jne 0x5297
leaq 0x1fe3(%rip), %rdi      # 0x726e
callq 0x3991
movq %rax, 0x5f89(%rip)      # 0xb220
leaq 0x5ed2(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x5f75(%rip)      # 0xb220
je 0x52f1
movl 0x5f55(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x52f7
movq %rax, %r15
movq %r14, 0x820(%rax)
movq %rbx, 0x830(%rax)
testb $0x4, 0x18(%rax)
je 0x5308
leaq 0x1fad(%rip), %rsi      # 0x7288
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2c49
leaq 0x30(%rip), %r14        # 0x531c
movq %r15, %rbx
jmp 0x5308
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1ecd(%rip), %rsi      # 0x71cb
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2c49
movq 0x5f11(%rip), %rax      # 0xb220
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: GH_debug_callback_AMD
static void APIENTRY
GH_debug_callback_AMD(GLuint id, GLenum category, GLenum severity,
		  GLsizei length, const GLchar *message, GLvoid* userParam)
{
	const gl_context_t *glc=(const gl_context_t*)userParam;

	if (glc) {
		GH_verbose(GH_MSG_INFO, "GLDEBUG[AMD]: %s %s %s [0x%x]: %s\n",
					translateDebugCategoryEnum(category),
					translateDebugSeverityEnum(severity),
					id, message);
		if (glc->original_debug_callback_AMD) {
			glc->original_debug_callback_AMD(id, category, severity,
							 length, message,
							 glc->original_debug_callback_AMD_user_ptr);
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %r9, %r9
je 0x53c1
movq %r9, %r15
movq %r8, %rbx
movl %edx, %r14d
movl %esi, %r12d
movl %edi, %r13d
movl %ecx, 0x4(%rsp)
leal -0x9149(%r12), %eax
cmpl $0x7, %eax
ja 0x5362
movl %eax, %eax
leaq 0x1cf3(%rip), %rcx      # 0x704c
movslq (%rcx,%rax,4), %rbp
addq %rcx, %rbp
jmp 0x5369
leaq 0x3150(%rip), %rbp      # 0x84b9
movl %r14d, %edi
callq 0x6461
leaq 0x3108(%rip), %rsi      # 0x8480
pushq $0x3
popq %rdi
movq %rbp, %rdx
movq %rax, %rcx
movl %r13d, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x2c49
movq 0x820(%r15), %rax
testq %rax, %rax
movl 0x4(%rsp), %ecx
je 0x53c1
movq 0x830(%r15), %r9
movl %r13d, %edi
movl %r12d, %esi
movl %r14d, %edx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: latency_before_swap
static void
latency_before_swap(GH_latency *lat)
{
	GLsync sync;

	switch(lat->latency) {
		case GH_LATENCY_NOP:
		case GH_LATENCY_FINISH_AFTER:
			(void)lat;
			break;
		case GH_LATENCY_FINISH_BEFORE:
			GH_glFinish();
			break;
		default:
			if ( (sync=lat->sync_object[lat->cur_pos]) ) {
				if (lat->flags & GH_LATENCY_FLAG_MANUAL_WAIT) {
					/* check for the fence in a loop */
					while(GH_glClientWaitSync(sync, GL_SYNC_FLUSH_COMMANDS_BIT, lat->gl_wait_interval) == GL_TIMEOUT_EXPIRED) {
						if (lat->self_wait_interval) {
							usleep(lat->self_wait_interval);
						}
					}
				} else {
					/* just wait for the fence */
					GH_glClientWaitSync(sync, GL_SYNC_FLUSH_COMMANDS_BIT, lat->gl_wait_timeout);
					/* NOTE: we do not care about the result */
				}
			}
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl (%rdi), %eax
leal 0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x5b64
popq %rbx
popq %r14
popq %rbp
retq
testl %eax, %eax
jne 0x5b72
popq %rbx
popq %r14
popq %rbp
jmpq *0x5756(%rip)           # 0xb2c8
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x10(%rdi), %ecx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x5b5f
testb $0x1, 0x14(%rbx)
jne 0x5ba2
movq 0x5776(%rip), %rax      # 0xb308
movq 0x18(%rbx), %rdx
pushq $0x1
popq %rsi
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmpq *%rax
pushq $0x1
popq %rbp
movq 0x20(%rbx), %rdx
movq %r14, %rdi
movl %ebp, %esi
callq *0x5754(%rip)           # 0xb308
cmpl $0x911b, %eax           # imm = 0x911B
jne 0x5b5f
movl 0x28(%rbx), %edi
testl %edi, %edi
je 0x5ba5
callq 0x21d0
jmp 0x5ba5
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: latency_after_swap
static void
latency_after_swap(GH_latency *lat)
{
	switch(lat->latency) {
		case GH_LATENCY_NOP:
		case GH_LATENCY_FINISH_BEFORE:
			(void)lat;
			break;
		case GH_LATENCY_FINISH_AFTER:
			GH_glFinish();
			break;
		default:
			if ( (lat->sync_object[lat->cur_pos]) ) {
				GH_glDeleteSync(lat->sync_object[lat->cur_pos]);
			}
			lat->sync_object[lat->cur_pos]=GH_glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0);
			if (++lat->cur_pos == (unsigned)lat->latency) {
				lat->cur_pos=0;
			}
	}
}

// Assembly:
movl (%rdi), %eax
cmpl $-0x2, %eax
je 0x5c26
testl %eax, %eax
je 0x5c26
cmpl $-0x1, %eax
jne 0x5bdf
jmpq *0x56e9(%rip)           # 0xb2c8
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x10(%rdi), %ecx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x5bfb
callq *0x5705(%rip)           # 0xb300
xorl %ebp, %ebp
movl $0x9117, %edi           # imm = 0x9117
xorl %esi, %esi
callq *0x56ee(%rip)           # 0xb2f8
movq 0x8(%rbx), %rcx
movl 0x10(%rbx), %edx
movq %rax, (%rcx,%rdx,8)
leal 0x1(%rdx), %eax
cmpl (%rbx), %eax
cmovel %ebp, %eax
movl %eax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: parse_name
static void
parse_name(char *buf, size_t size, const char *name_template, unsigned int ctx_num)
{
	struct timespec ts_now;
	int in_escape=0;
	size_t pos=0;
	char c;

	buf[--size]=0; /* resverve space for final NUL terminator */
	while ( (pos < size) && (c=*(name_template++)) ) {
		if (in_escape) {
			switch(c) {
				case '%':
					buf[pos++]=c;
					break;
				case 'c':
					pos=buf_printf(buf,pos,size,"%u",ctx_num);
					break;
				case 'p':
					pos=buf_printf(buf,pos,size,"%u",(unsigned)getpid());
					break;
				case 't':
					clock_gettime(CLOCK_REALTIME, &ts_now);
					pos=buf_printf(buf,pos,size,"%09lld.%ld",
							(long long)ts_now.tv_sec,
							ts_now.tv_nsec);
					break;
				default:
					pos=buf_printf(buf,pos,size,"%%%c",c);
			}
			in_escape=0;
		} else {
			switch(c) {
				case '%':
					in_escape=1;
					break;
				default:
					buf[pos++]=c;
			}
		}
	}
	buf[pos]=0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r14
movb $0x0, 0xfff(%rdi)
leaq 0x8(%rsp), %r12
leaq 0x1875(%rip), %rbp      # 0x74e3
leaq 0x186b(%rip), %rbx      # 0x74e0
leaq 0x1872(%rip), %rsi      # 0x74ee
xorl %r13d, %r13d
incq %r15
movb $0x1, %al
movq %r15, %rcx
cmpq $0xffe, %r13            # imm = 0xFFE
ja 0x5d9e
movq %rcx, %r15
movsbl -0x1(%rcx), %r8d
testl %r8d, %r8d
je 0x5d9e
testb $0x1, %al
je 0x5cbe
leaq 0x1(%r15), %rcx
xorl %eax, %eax
cmpb $0x25, %r8b
je 0x5c87
movb %r8b, (%r14,%r13)
incq %r13
jmp 0x5c7f
movzbl %r8b, %eax
cmpl $0x74, %eax
je 0x5d37
cmpl $0x63, %eax
je 0x5ce4
cmpl $0x70, %eax
je 0x5d0c
cmpl $0x25, %eax
jne 0x5d75
movb $0x25, (%r14,%r13)
incq %r13
jmp 0x5c7f
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rcx
movl %edx, %r8d
xorl %eax, %eax
movl %edx, %r13d
callq 0x5db2
leaq 0x17ed(%rip), %rsi      # 0x74ee
movl %r13d, %edx
movq %rax, %r13
jmp 0x5c7f
movl %edx, %ebp
movq %rsi, %r12
callq 0x2090
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rcx
movl %eax, %r8d
xorl %eax, %eax
callq 0x5db2
movq %r12, %rsi
movl %ebp, %edx
leaq 0x17ae(%rip), %rbp      # 0x74e3
jmp 0x5d91
xorl %edi, %edi
movq %r12, %rsi
movl %edx, %ebx
callq 0x2080
movq 0x8(%rsp), %r8
movq 0x10(%rsp), %r9
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rcx
xorl %eax, %eax
callq 0x5db2
leaq 0x178a(%rip), %rsi      # 0x74ee
movl %ebx, %edx
leaq 0x1773(%rip), %rbx      # 0x74e0
movq %rax, %r13
jmp 0x5c7f
movq %r14, %rdi
movq %rsi, %r12
movq %r13, %rsi
movq %r12, %rcx
xorl %eax, %eax
movl %edx, %r13d
callq 0x5db2
movq %r12, %rsi
movl %r13d, %edx
leaq 0x8(%rsp), %r12
movq %rax, %r13
jmp 0x5c7f
movb $0x0, (%r14,%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: GH_get_gl_proc
static void *
GH_get_gl_proc(const char *name)
{
	static void *proc;

	/* try glXGetProcAddressARB first */
	GH_GET_PTR(glXGetProcAddressARB);
	if (GH_glXGetProcAddressARB && (proc=GH_glXGetProcAddressARB(name)) )
		return proc;

	/* try glXGetProcAddress as second chance */
	GH_GET_PTR(glXGetProcAddress);
	if (GH_glXGetProcAddress && (proc=GH_glXGetProcAddress(name)) )
		return proc;

	/* try dlsym as last resort */
	return GH_dlsym_gl(name);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x5302(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x532d(%rip)      # 0xb1a8
jne 0x5e90
leaq 0x1243(%rip), %rdi      # 0x70c7
callq 0x2c17
movq %rax, 0x5318(%rip)      # 0xb1a8
leaq 0x52d9(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x5304(%rip)      # 0xb1a8
je 0x5ebe
movq 0x52fb(%rip), %rax      # 0xb1a8
movq %rbx, %rdi
callq *%rax
movq %rax, 0x53bf(%rip)      # 0xb278
testq %rax, %rax
jne 0x5f15
leaq 0x52ab(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x52ce(%rip)      # 0xb1a0
jne 0x5ee7
leaq 0x11bc(%rip), %rdi      # 0x7097
callq 0x2c17
movq %rax, 0x52b9(%rip)      # 0xb1a0
leaq 0x5282(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x52a5(%rip)      # 0xb1a0
je 0x5f17
movq 0x529c(%rip), %rax      # 0xb1a0
movq %rbx, %rdi
callq *%rax
movq %rax, 0x5368(%rip)      # 0xb278
testq %rax, %rax
je 0x5f17
popq %rbx
retq
movq %rbx, %rdi
popq %rbx
jmp 0x3991
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: get_envui
static unsigned int
get_envui(const char *name, unsigned int def)
{
	const char *s=getenv(name);
	int i;

	if (s) {
		i=(unsigned)strtoul(s,NULL,0);
	} else {
		i=def;
	}
	return i;
}

// Assembly:
pushq %rbx
movl %esi, %ebx
callq 0x2030
testq %rax, %rax
je 0x6243
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2170
movq %rax, %rbx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: frametimes_flush
static void
frametimes_flush(GH_frametimes *ft)
{
	unsigned int i;
	GH_frametime *last;
	const GH_frametime *cur,*prev=&ft->frametime[ft->num_results * ft->num_timestamps];

	if (ft->cur_result == 0) {
		return;
	}

	GH_verbose(GH_MSG_DEBUG, "frametimes: dumping results of %u frames\n", ft->cur_result);
	for (i=0; i<ft->cur_result; i++) {
		unsigned int frame=ft->frame - ft->cur_result + i;
		if (frame >= ft->delay) {
			fprintf(ft->dump, "%u", frame - ft->delay);
			cur=&ft->frametime[i * ft->num_timestamps];
			frametimes_dump_results(ft, cur, prev);
			prev=cur;
			fputc('\n', ft->dump);
		}
	}
	fflush(ft->dump);
	/* copy the last result */
	last=&ft->frametime[ft->num_results * ft->num_timestamps];
	cur=&ft->frametime[(ft->cur_result-1) * ft->num_timestamps];
	for (i=0; i<ft->num_timestamps; i++) {
		last[i]=cur[i];
	}


	ft->cur_result=0;
}

// Assembly:
movl 0x28(%rdi), %edx
testl %edx, %edx
je 0x6388
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x8(%rdi), %eax
imull 0xc(%rdi), %eax
imulq $0x18, %rax, %r15
addq 0x20(%rdi), %r15
leaq 0x1ecc(%rip), %rsi      # 0x8142
pushq $0x4
popq %rdi
xorl %eax, %eax
callq 0x2c49
xorl %r12d, %r12d
movl 0x28(%rbx), %eax
cmpl %eax, %r12d
jae 0x6329
movl 0x2c(%rbx), %edx
subl %eax, %edx
addl %r12d, %edx
subl 0x4(%rbx), %edx
jb 0x6321
movq 0x30(%rbx), %rdi
leaq 0x1235(%rip), %rsi      # 0x74e0
xorl %eax, %eax
callq 0x2100
movq 0x20(%rbx), %rcx
movl 0x8(%rbx), %eax
movl %eax, %edx
imull %r12d, %edx
imulq $0x18, %rdx, %rdx
leaq (%rcx,%rdx), %r13
leaq (%rcx,%rdx), %r14
addq $0x10, %r14
xorl %ebp, %ebp
movl %eax, %eax
cmpq %rax, %rbp
jae 0x6312
movq -0x10(%r14), %rsi
movq 0x18(%r15), %rdx
movq %rbx, %rdi
callq 0x63b9
movq (%r14), %rsi
movq 0x28(%r15), %rdx
movq %rbx, %rdi
callq 0x63b9
movq -0x8(%r14), %rdx
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x63b9
incq %rbp
movl 0x8(%rbx), %eax
addq $0x18, %r14
jmp 0x62d1
movq 0x30(%rbx), %rsi
pushq $0xa
popq %rdi
callq 0x20d0
movq %r13, %r15
incl %r12d
jmp 0x6283
movq 0x30(%rbx), %rdi
callq 0x2140
movq 0x20(%rbx), %rax
movl 0x8(%rbx), %esi
movl 0xc(%rbx), %ecx
imull %esi, %ecx
movl 0x28(%rbx), %edx
decl %edx
imull %esi, %edx
imulq $0x18, %rcx, %rcx
imulq $0x18, %rdx, %rdx
xorl %edi, %edi
movl %esi, %esi
cmpq %rsi, %rdi
jae 0x6376
movq 0x10(%rax,%rdx), %rsi
movq %rsi, 0x10(%rax,%rcx)
movups (%rax,%rdx), %xmm0
movups %xmm0, (%rax,%rcx)
incq %rdi
movl 0x8(%rbx), %esi
addq $0x18, %rax
jmp 0x6351
andl $0x0, 0x28(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/derhass[P]glx_hook/glx_hook.c
// Function: timestamp_set
static void
timestamp_set(GH_timestamp *ts, GH_frametime *rs, GH_frametime_mode mode)
{
	/* CPU */
	/* collect previous result */
	rs->cpu=(uint64_t)ts->timestamp_cpu.tv_sec * (uint64_t)1000000000UL
		+ (uint64_t)ts->timestamp_cpu.tv_nsec;
	/* new query */
	clock_gettime(CLOCK_REALTIME, &ts->timestamp_cpu);

	/* GPU */
	if (mode >= GH_FRAMETIME_CPU_GPU) {
		/* collect previous result */
		if (ts->query_object) {
			GLuint64 value;
			GH_glGetQueryObjectui64v(ts->query_object, GL_QUERY_RESULT, &value);
			rs->gpu=(uint64_t)value;
		} else {
			GH_glGenQueries(1, &ts->query_object);
		}
		rs->gl=(uint64_t)(ts->timestamp_gl);
		/* new query */
		GH_glQueryCounter(ts->query_object, GL_TIMESTAMP);
		GH_glGetInteger64v(GL_TIMESTAMP, (GLint64*)&ts->timestamp_gl);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
imulq $0x3b9aca00, (%rdi), %rax # imm = 0x3B9ACA00
movq %rsi, %r14
addq 0x8(%rdi), %rax
movq %rax, (%rsi)
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2080
cmpl $0x2, %ebp
jb 0x6456
movl 0x18(%rbx), %edi
testl %edi, %edi
je 0x6421
movq %rsp, %r15
movl $0x8866, %esi           # imm = 0x8866
movq %r15, %rdx
callq *0x4ed8(%rip)           # 0xb2f0
movq (%r15), %rax
movq %rax, 0x10(%r14)
jmp 0x642e
leaq 0x18(%rbx), %rsi
pushq $0x1
popq %rdi
callq *0x4ea2(%rip)           # 0xb2d0
leaq 0x10(%rbx), %r15
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r14)
movl 0x18(%rbx), %edi
movl $0x8e28, %esi           # imm = 0x8E28
callq *0x4ea0(%rip)           # 0xb2e8
movl $0x8e28, %edi           # imm = 0x8E28
movq %r15, %rsi
callq *0x4e8a(%rip)           # 0xb2e0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: path_destroy
void path_destroy(path_t *path)
{
    if (path->sid)
        free(path->sid);
    if (path->v)
        free(path->v);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x3060
movq 0x10(%rbx), %rdi
popq %rbx
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: path_v_destroy
void path_v_destroy(path_v *path)
{
    size_t i;
    for (i = 0; i < path->n; ++i)
        path_destroy(&path->a[i]);
    free(path->a);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
xorl %r15d, %r15d
movq 0x10(%rbx), %rdi
cmpq (%rbx), %r15
jae 0x444a
addq %r14, %rdi
callq 0x440c
incq %r15
addq $0x30, %r14
jmp 0x4430
popq %rbx
popq %r14
popq %r15
jmp 0x3060
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: asg_seg_len
uint64_t asg_seg_len(asg_t *asg)
{
    asmg_t *g = asg->asmg;
    uint64_t i, seg_len = 0;
    for (i = 0; i < g->n_vtx; ++i) {
        if (g->vtx[i].del) continue;
        seg_len += g->vtx[i].len;
    }
    return seg_len;
}

// Assembly:
movq 0x20(%rdi), %rcx
movq (%rcx), %rdx
pushq $0x20
popq %rsi
xorl %eax, %eax
subq $0x1, %rdx
jb 0x447c
movq 0x10(%rcx), %rdi
testb $0x40, 0x3(%rdi,%rsi)
jne 0x4476
addq -0x8(%rdi,%rsi), %rax
addq $0x28, %rsi
jmp 0x4460
retq
// File: /workspace/github_c_makefile_star2_O2/c-zhou[P]oatk/path.c
// Function: new_node
static llnode *new_node(int v) {
    llnode *node;
    MYMALLOC(node, 1);
    node->v = v;
    node->n_m = 4;
    node->n_n = 0;
    node->prev = NULL;
    MYMALLOC(node->next, node->n_m);
    return node;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
pushq $0x28
popq %rdi
callq 0x32f0
movq %rax, %r14
movl %ebx, (%rax)
movq $0x4, 0x10(%rax)
andq $0x0, 0x18(%rax)
andq $0x0, 0x8(%rax)
pushq $0x20
popq %rdi
callq 0x32f0
movq %rax, 0x20(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq