LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/zdump.c
// Function: dumptime
static void
dumptime(timeptr)
register const struct tm *	timeptr;
{
	static const char	wday_name[][3] = {
		"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
	};
	static const char	mon_name[][3] = {
		"Jan", "Feb", "Mar", "Apr", "May", "Jun",
		"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
	};
	register const char *	wn;
	register const char *	mn;
	register int		lead;
	register int		trail;

	if (timeptr == NULL) {
		(void) printf("NULL");
		return;
	}
	/*
	** The packaged versions of localtime and gmtime never put out-of-range
	** values in tm_wday or tm_mon, but since this code might be compiled
	** with other (perhaps experimental) versions, paranoia is in order.
	*/
	if (timeptr->tm_wday < 0 || timeptr->tm_wday >=
		(int) (sizeof wday_name / sizeof wday_name[0]))
			wn = "???";
	else		wn = wday_name[timeptr->tm_wday];
	if (timeptr->tm_mon < 0 || timeptr->tm_mon >=
		(int) (sizeof mon_name / sizeof mon_name[0]))
			mn = "???";
	else		mn = mon_name[timeptr->tm_mon];
	(void) printf("%.3s %.3s%3d %.2d:%.2d:%.2d ",
		wn, mn,
		timeptr->tm_mday, timeptr->tm_hour,
		timeptr->tm_min, timeptr->tm_sec);
#define DIVISOR	10
	trail = timeptr->tm_year % DIVISOR + TM_YEAR_BASE % DIVISOR;
	lead = timeptr->tm_year / DIVISOR + TM_YEAR_BASE / DIVISOR +
		trail / DIVISOR;
	trail %= DIVISOR;
	if (trail < 0 && lead > 0) {
		trail += DIVISOR;
		--lead;
	} else if (lead < 0 && trail > 0) {
		trail -= DIVISOR;
		++lead;
	}
	if (lead == 0)
		(void) printf("%d", trail);
	else	(void) printf("%d%d", lead, ((trail < 0) ? -trail : trail));
}

// Assembly:
testq %rdi, %rdi
je 0x218a
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x18(%rdi), %eax
leaq (%rax,%rax,2), %rcx
leaq 0x30d5(%rip), %rsi      # 0x51d0
addq %rcx, %rsi
cmpq $0x7, %rax
leaq 0x2ffb(%rip), %rax      # 0x5104
cmovaeq %rax, %rsi
movl 0x10(%rdi), %ecx
leaq (%rcx,%rcx,2), %rdi
leaq 0x30d5(%rip), %rdx      # 0x51f0
addq %rdi, %rdx
cmpq $0xc, %rcx
cmovaeq %rax, %rdx
movl 0xc(%rbx), %ecx
movl 0x8(%rbx), %r8d
movl (%rbx), %eax
movl 0x4(%rbx), %r9d
movl %eax, (%rsp)
leaq 0x2fcb(%rip), %rdi      # 0x5108
xorl %eax, %eax
callq 0x10e0
movslq 0x14(%rbx), %rcx
cmpq $-0x76b, %rcx           # imm = 0xF895
setl %dl
imulq $0x66666667, %rcx, %rsi # imm = 0x66666667
movq %rsi, %rax
shrq $0x3f, %rax
sarq $0x22, %rsi
addl %eax, %esi
leal (%rsi,%rsi), %eax
leal (%rax,%rax,4), %edi
movl %ecx, %eax
subl %edi, %eax
setns %dil
orb %dl, %dil
leaq 0x10(%rsp), %rsp
popq %rbx
jne 0x2198
addl $0xa, %eax
addl $0xbd, %esi
jmp 0x21bb
leaq 0x2f6e(%rip), %rdi      # 0x50ff
xorl %eax, %eax
jmp 0x10e0
cmpl $0xfffff88b, %ecx       # imm = 0xFFFFF88B
setge %cl
testl %eax, %eax
setle %dl
orb %cl, %dl
jne 0x21b5
addl $-0xa, %eax
addl $0xbf, %esi
jmp 0x21bb
addl $0xbe, %esi
testl %esi, %esi
je 0x21d4
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
leaq 0x2f58(%rip), %rdi      # 0x5125
xorl %eax, %eax
jmp 0x10e0
leaq 0x2f1d(%rip), %rdi      # 0x50f8
movl %eax, %esi
xorl %eax, %eax
jmp 0x10e0
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/localtime.c
// Function: tzset
void
tzset(void)
{
	register const char *	name;

	name = getenv("TZ");
	if (name == NULL) {
		tzsetwall();
		return;
	}

	if (lcl_is_set > 0 && strcmp(lcl_TZname, name) == 0)
		return;
	lcl_is_set = strlen(name) < sizeof lcl_TZname;
	if (lcl_is_set)
		(void) strcpy(lcl_TZname, name);

#ifdef ALL_STATE
	if (lclptr == NULL) {
		lclptr = (struct state *) calloc(1, sizeof *lclptr);
		if (lclptr == NULL) {
			settzname();	/* all we can do */
			return;
		}
	}
#endif /* defined ALL_STATE */
	if (*name == '\0') {
		/*
		** User wants it fast rather than right.
		*/
		lclptr->leapcnt = 0;		/* so, we're off a little */
		lclptr->timecnt = 0;
		lclptr->typecnt = 0;
		lclptr->ttis[0].tt_isdst = 0;
		lclptr->ttis[0].tt_gmtoff = 0;
		lclptr->ttis[0].tt_abbrind = 0;
		(void) strcpy(lclptr->chars, gmt);
	} else if (tzload(name, lclptr, TRUE) != 0)
		if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0)
			(void) gmtload(lclptr);
	settzname();
}

// Assembly:
pushq %rbx
leaq 0x303c(%rip), %rdi      # 0x5228
callq 0x1030
movq %rax, %rbx
movl 0x53b6(%rip), %eax      # 0x75b0
testq %rbx, %rbx
je 0x2279
testl %eax, %eax
jle 0x221a
leaq 0x53b6(%rip), %rdi      # 0x75c0
movq %rbx, %rsi
callq 0x1140
testl %eax, %eax
je 0x22ac
movq %rbx, %rdi
callq 0x10b0
xorl %ecx, %ecx
cmpq $0x100, %rax            # imm = 0x100
setb %cl
movl %ecx, 0x537d(%rip)      # 0x75b0
jae 0x2244
leaq 0x5384(%rip), %rdi      # 0x75c0
movq %rbx, %rsi
callq 0x1080
cmpb $0x0, (%rbx)
je 0x22ae
leaq 0x5470(%rip), %rsi      # 0x76c0
movq %rbx, %rdi
movl $0x1, %edx
callq 0x22dd
testl %eax, %eax
je 0x22d7
cmpb $0x3a, (%rbx)
je 0x229e
leaq 0x5453(%rip), %rsi      # 0x76c0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x2b84
jmp 0x229a
testl %eax, %eax
js 0x22ac
movl $0xffffffff, 0x5329(%rip) # imm = 0xFFFFFFFF
leaq 0x5432(%rip), %rsi      # 0x76c0
xorl %edi, %edi
movl $0x1, %edx
callq 0x22dd
testl %eax, %eax
je 0x22d7
leaq 0x541b(%rip), %rdi      # 0x76c0
callq 0x30b8
jmp 0x22d7
popq %rbx
retq
movq $0x0, 0x5407(%rip) # 0x76c0
movl $0x0, 0x5405(%rip)      # 0x76c8
xorps %xmm0, %xmm0
movups %xmm0, 0x7e3b(%rip)     # 0xa108
movl $0x544d47, 0x9631(%rip) # imm = 0x544D47
popq %rbx
jmp 0x30eb
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/localtime.c
// Function: settzname
static void
settzname(void)
{
	register struct state * const	sp = lclptr;
	register int			i;

	tzname[0] = wildabbr;
	tzname[1] = wildabbr;
#ifdef USG_COMPAT
	daylight = 0;
	timezone = 0;
#endif /* defined USG_COMPAT */
#ifdef ALTZONE
	altzone = 0;
#endif /* defined ALTZONE */
#ifdef ALL_STATE
	if (sp == NULL) {
		tzname[0] = tzname[1] = gmt;
		return;
	}
#endif /* defined ALL_STATE */
	/*
	** And to get the latest zone names into tzname. . .
	*/
	for (i = 0; i < sp->timecnt; ++i) {
		register const struct ttinfo * const	ttisp =
							&sp->ttis[
								sp->types[i]];

		tzname[ttisp->tt_isdst] =
			&sp->chars[ttisp->tt_abbrind];
#ifdef USG_COMPAT
		if (ttisp->tt_isdst)
			daylight = 1;
		if (!ttisp->tt_isdst)
			timezone = -(ttisp->tt_gmtoff);
#endif /* defined USG_COMPAT */
#ifdef ALTZONE
		if (ttisp->tt_isdst)
			altzone = -(ttisp->tt_gmtoff);
#endif /* defined ALTZONE */
	}
	/*
	** Finally, scrub the abbreviations.
	** First, replace bogus characters.
	*/
	for (i = 0; i < sp->charcnt; ++i)
		if (strchr(TZ_ABBR_CHAR_SET, sp->chars[i]) == NULL)
			sp->chars[i] = TZ_ABBR_ERR_CHAR;
	/*
	** Second, truncate long abbreviations.
	*/
	for (i = 0; i < sp->typecnt; ++i) {
		register const struct ttinfo * const	ttisp = &sp->ttis[i];
		register char *				cp = &sp->chars[ttisp->tt_abbrind];

		if (strlen(cp) > TZ_ABBR_MAX_LEN &&
			strcmp(cp, GRANDPARENTED) != 0)
				*(cp + TZ_ABBR_MAX_LEN) = '\0';
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x4053(%rip), %rax      # 0x7150
movq %rax, 0x405c(%rip)      # 0x7160
movq %rax, 0x405d(%rip)      # 0x7168
movslq 0x45b2(%rip), %rax      # 0x76c4
leaq 0x45a7(%rip), %r15      # 0x76c0
testq %rax, %rax
jle 0x315a
xorl %ecx, %ecx
leaq 0x4039(%rip), %rdx      # 0x7160
movzbl 0x2598(%rcx,%r15), %esi
leaq (%rsi,%rsi,2), %rsi
movslq 0x2a54(%r15,%rsi,8), %rdi
addq %r15, %rdi
addq $0x4248, %rdi           # imm = 0x4248
movslq 0x2a50(%r15,%rsi,8), %rsi
movq %rdi, (%rdx,%rsi,8)
incq %rcx
cmpq %rcx, %rax
jne 0x3127
movslq 0x456b(%rip), %r14      # 0x76cc
testq %r14, %r14
jle 0x319c
xorl %r12d, %r12d
leaq 0x20f8(%rip), %rbx      # 0x5268
movsbl 0x4248(%r12,%r15), %esi
movl $0x45, %edx
movq %rbx, %rdi
callq 0x1110
testq %rax, %rax
jne 0x3194
movb $0x5f, 0x4248(%r12,%r15)
incq %r12
cmpq %r12, %r14
jne 0x3170
movl 0x4526(%rip), %ebp      # 0x76c8
testl %ebp, %ebp
jle 0x31fd
leaq 0x6f67(%rip), %r12      # 0xa114
xorl %r13d, %r13d
leaq 0x20f6(%rip), %rbx      # 0x52ad
movslq (%r12), %rax
leaq (%rax,%r15), %r14
addq $0x4248, %r14           # imm = 0x4248
movq %r14, %rdi
callq 0x10b0
cmpq $0x11, %rax
jb 0x31ee
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1140
testl %eax, %eax
je 0x31ee
movb $0x0, 0x10(%r14)
movl 0x44da(%rip), %ebp      # 0x76c8
incq %r13
movslq %ebp, %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0x31b7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/lyda[P]tz/localtime.c
// Function: typesequiv
static int
typesequiv(sp, a, b)
const struct state * const	sp;
const int			a;
const int			b;
{
	register int	result;

	if (sp == NULL ||
		a < 0 || a >= sp->typecnt ||
		b < 0 || b >= sp->typecnt)
			result = FALSE;
	else {
		register const struct ttinfo *	ap = &sp->ttis[a];
		register const struct ttinfo *	bp = &sp->ttis[b];
		result = ap->tt_gmtoff == bp->tt_gmtoff &&
			ap->tt_isdst == bp->tt_isdst &&
			ap->tt_ttisstd == bp->tt_ttisstd &&
			ap->tt_ttisgmt == bp->tt_ttisgmt &&
			strcmp(&sp->chars[ap->tt_abbrind],
			&sp->chars[bp->tt_abbrind]) == 0;
	}
	return result;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x370a
movl 0x8(%rdi), %ecx
cmpl %esi, %ecx
setle %r8b
cmpl %edx, %ecx
setle %cl
orb %r8b, %cl
jne 0x370a
movl %esi, %ecx
leaq (%rcx,%rcx,2), %rcx
movl %edx, %edx
leaq (%rdx,%rdx,2), %rsi
movq 0x2a48(%rdi,%rcx,8), %rdx
cmpq 0x2a48(%rdi,%rsi,8), %rdx
jne 0x370a
leaq (%rdi,%rcx,8), %rdx
addq $0x2a48, %rdx           # imm = 0x2A48
leaq (%rdi,%rsi,8), %rcx
addq $0x2a48, %rcx           # imm = 0x2A48
movl 0x8(%rdx), %esi
cmpl 0x8(%rcx), %esi
jne 0x370a
movl 0x10(%rdx), %esi
cmpl 0x10(%rcx), %esi
jne 0x370a
movl 0x14(%rdx), %esi
cmpl 0x14(%rcx), %esi
jne 0x370a
pushq %rax
movslq 0xc(%rdx), %rax
addq %rdi, %rax
addq $0x4248, %rax           # imm = 0x4248
movslq 0xc(%rcx), %rcx
leaq (%rdi,%rcx), %rsi
addq $0x4248, %rsi           # imm = 0x4248
movq %rax, %rdi
callq 0x1140
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
sete %al
addq $0x8, %rsp
retq
// File: /workspace/github_c_makefile_star2_O3/dpw[P]skinny-mutex/test.c
// Function: main
int main(void)
{
	test_static_mutex();

	do_test(test_lock_unlock, 1);
	do_test(test_contention, 1);
	do_test(test_lock_cancellation, 1);
	do_test(test_trylock, 0);
	do_test(test_cond_wait, 1);
	do_test(test_cond_timedwait, 1);
	do_test(test_cond_wait_cancellation, 1);
	do_test(test_unlock_not_held, 0);

	return 0;
}

// Assembly:
pushq %rax
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, 0x433b(%rip)      # 0x60f8
jne 0x1e6d
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, 0x4325(%rip)      # 0x60f8
jne 0x1e77
cmpq $0x0, 0x4317(%rip)      # 0x60f8
jne 0x1e81
leaq 0x44e(%rip), %rdi       # 0x223c
movl $0x1, %esi
callq 0x1ea0
leaq 0x473(%rip), %rdi       # 0x2272
movl $0x1, %esi
callq 0x1ea0
leaq 0x5ce(%rip), %rdi       # 0x23de
movl $0x1, %esi
callq 0x1ea0
leaq 0x6bb(%rip), %rdi       # 0x24dc
xorl %esi, %esi
callq 0x1ea0
leaq 0x84e(%rip), %rdi       # 0x267d
movl $0x1, %esi
callq 0x1ea0
leaq 0x99a(%rip), %rdi       # 0x27da
movl $0x1, %esi
callq 0x1ea0
leaq 0xab4(%rip), %rdi       # 0x2905
movl $0x1, %esi
callq 0x1ea0
leaq 0xbe0(%rip), %rdi       # 0x2a42
xorl %esi, %esi
callq 0x1ea0
xorl %eax, %eax
popq %rcx
retq
callq 0x11d0
jmp 0x1dc3
callq 0x1200
jmp 0x1dd9
leaq 0x1316(%rip), %rdi      # 0x319e
leaq 0x12c7(%rip), %rsi      # 0x3156
leaq 0x12c7(%rip), %rcx      # 0x315d
movl $0xe, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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)
movq $0x0, 0x8(%rsp)
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x2343
xorl %r15d, %r15d
leaq 0x94f(%rip), %rbx       # 0x2bf3
movq %rsp, %r14
leaq (%rsp,%r15), %rdi
addq $0x10, %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1130
testl %eax, %eax
jne 0x2362
addq $0x8, %r15
cmpq $0x50, %r15
jne 0x22a7
movq (%rsp), %rdi
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x234d
xorl %ebx, %ebx
movq 0x10(%rsp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x2381
incq %rbx
cmpq $0xa, %rbx
jne 0x22e2
movq (%rsp), %rdi
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x2354
cmpl $0x0, 0x8(%rsp)
jne 0x23a0
cmpl $0xa, 0xc(%rsp)
jne 0x23bf
movq (%rsp), %rdi
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x235b
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x132e
jmp 0x229a
callq 0x1357
jmp 0x22e0
callq 0x1380
jmp 0x2311
callq 0x13a9
jmp 0x2339
leaq 0x12b6(%rip), %rdi      # 0x361f
leaq 0xde6(%rip), %rsi       # 0x3156
leaq 0x1281(%rip), %rcx      # 0x35f8
movl $0x42, %edx
callq 0x10b0
leaq 0x12e4(%rip), %rdi      # 0x366c
leaq 0xdc7(%rip), %rsi       # 0x3156
leaq 0x1262(%rip), %rcx      # 0x35f8
movl $0x47, %edx
callq 0x10b0
leaq 0x12e5(%rip), %rdi      # 0x368c
leaq 0xda8(%rip), %rsi       # 0x3156
leaq 0x1243(%rip), %rcx      # 0x35f8
movl $0x4a, %edx
callq 0x10b0
leaq 0x12cf(%rip), %rdi      # 0x3695
leaq 0xd89(%rip), %rsi       # 0x3156
leaq 0x1224(%rip), %rcx      # 0x35f8
movl $0x4b, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x244c
leaq 0x86b(%rip), %rdx       # 0x2c66
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x2460
callq 0x2bac
movq (%rsp), %rdi
callq 0x1190
testl %eax, %eax
jne 0x247f
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rbx)
jne 0x2456
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1170
testl %eax, %eax
jne 0x249e
cmpq $0x0, 0x8(%rsp)
jne 0x24bd
addq $0x10, %rsp
popq %rbx
retq
movq %rbx, %rdi
callq 0x13d2
jmp 0x23f4
movq %rbx, %rdi
callq 0x13fb
jmp 0x242c
leaq 0x12c6(%rip), %rdi      # 0x372d
leaq 0xce8(%rip), %rsi       # 0x3156
leaq 0x128a(%rip), %rcx      # 0x36ff
movl $0x5f, %edx
callq 0x10b0
leaq 0x12e7(%rip), %rdi      # 0x376d
leaq 0xcc9(%rip), %rsi       # 0x3156
leaq 0x126b(%rip), %rcx      # 0x36ff
movl $0x61, %edx
callq 0x10b0
leaq 0x12e0(%rip), %rdi      # 0x3785
leaq 0xcaa(%rip), %rsi       # 0x3156
leaq 0x124c(%rip), %rcx      # 0x36ff
movl $0x63, %edx
callq 0x10b0
leaq 0x12e0(%rip), %rdi      # 0x37a4
leaq 0xc8b(%rip), %rsi       # 0x3156
leaq 0x122d(%rip), %rcx      # 0x36ff
movl $0x64, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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 0x19c5
testl %eax, %eax
jne 0x25a4
leaq 0x7a6(%rip), %rdx       # 0x2c9e
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x25c3
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x25e2
leaq 0x7a5(%rip), %rdx       # 0x2ccc
movq %rsp, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x2601
callq 0x2bac
leaq 0x756(%rip), %rdx       # 0x2c9e
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1130
testl %eax, %eax
jne 0x2620
movq 0x8(%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x263f
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rbx)
jne 0x259a
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x265e
addq $0x10, %rsp
popq %rbx
retq
movq %rbx, %rdi
callq 0x1424
jmp 0x2581
leaq 0x1228(%rip), %rdi      # 0x37d3
leaq 0xba4(%rip), %rsi       # 0x3156
leaq 0x1237(%rip), %rcx      # 0x37f0
movl $0x7c, %edx
callq 0x10b0
leaq 0x124a(%rip), %rdi      # 0x3814
leaq 0xb85(%rip), %rsi       # 0x3156
leaq 0x1218(%rip), %rcx      # 0x37f0
movl $0x7e, %edx
callq 0x10b0
leaq 0x1262(%rip), %rdi      # 0x384b
leaq 0xb66(%rip), %rsi       # 0x3156
leaq 0x11f9(%rip), %rcx      # 0x37f0
movl $0x7f, %edx
callq 0x10b0
leaq 0x1260(%rip), %rdi      # 0x3868
leaq 0xb47(%rip), %rsi       # 0x3156
leaq 0x11da(%rip), %rcx      # 0x37f0
movl $0x82, %edx
callq 0x10b0
leaq 0x1282(%rip), %rdi      # 0x38a9
leaq 0xb28(%rip), %rsi       # 0x3156
leaq 0x11bb(%rip), %rcx      # 0x37f0
movl $0x84, %edx
callq 0x10b0
leaq 0x129a(%rip), %rdi      # 0x38e0
leaq 0xb09(%rip), %rsi       # 0x3156
leaq 0x119c(%rip), %rcx      # 0x37f0
movl $0x85, %edx
callq 0x10b0
leaq 0x11e6(%rip), %rdi      # 0x384b
leaq 0xaea(%rip), %rsi       # 0x3156
leaq 0x117d(%rip), %rcx      # 0x37f0
movl $0x87, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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 0x273f
leaq 0x8(%rsp), %rcx
movl $0x0, 0x38(%rcx)
leaq 0x659(%rip), %rdx       # 0x2d0e
movq %rsp, %rdi
xorl %esi, %esi
callq 0x1130
testl %eax, %eax
jne 0x275e
callq 0x2bac
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%r14)
jne 0x272b
movl $0x1, 0x40(%rsp)
movq %rbx, %rdi
callq 0x10c0
testl %eax, %eax
jne 0x277d
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%r14)
jne 0x2735
movq (%rsp), %rdi
xorl %esi, %esi
callq 0x1170
testl %eax, %eax
jne 0x279c
movq %rbx, %rdi
callq 0x1150
testl %eax, %eax
jne 0x27bb
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x144f
jmp 0x26da
movq %r14, %rdi
callq 0x147a
jmp 0x2700
leaq 0x1220(%rip), %rdi      # 0x3966
leaq 0xa09(%rip), %rsi       # 0x3156
leaq 0x1236(%rip), %rcx      # 0x398a
movl $0xaa, %edx
callq 0x10b0
leaq 0x124b(%rip), %rdi      # 0x39b0
leaq 0x9ea(%rip), %rsi       # 0x3156
leaq 0x1217(%rip), %rcx      # 0x398a
movl $0xad, %edx
callq 0x10b0
leaq 0x1268(%rip), %rdi      # 0x39ec
leaq 0x9cb(%rip), %rsi       # 0x3156
leaq 0x11f8(%rip), %rcx      # 0x398a
movl $0xb2, %edx
callq 0x10b0
leaq 0xb87(%rip), %rdi       # 0x332a
leaq 0x9ac(%rip), %rsi       # 0x3156
leaq 0x11d9(%rip), %rcx      # 0x398a
movl $0xb5, %edx
callq 0x10b0
leaq 0x124a(%rip), %rdi      # 0x3a0c
leaq 0x98d(%rip), %rsi       # 0x3156
leaq 0x11ba(%rip), %rcx      # 0x398a
movl $0xb7, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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 0x2889
movq %rsp, %rsi
xorl %edi, %edi
callq 0x1050
testl %eax, %eax
jne 0x28a8
movq 0x8(%rsp), %rax
leaq 0xf4240(%rax), %rcx
movq %rcx, 0x8(%rsp)
cmpq $0x3b8b87c1, %rax       # imm = 0x3B8B87C1
jl 0x2830
addq $-0x3b8b87c0, %rax      # imm = 0xC4747840
movq %rax, 0x8(%rsp)
incq (%rsp)
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rbx)
jne 0x2875
leaq 0x10(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x1cb5
cmpl $0x6e, %eax
jne 0x28c7
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rbx)
jne 0x287f
leaq 0x10(%rsp), %rdi
callq 0x1150
testl %eax, %eax
jne 0x28e6
addq $0x40, %rsp
popq %rbx
retq
movq %rbx, %rdi
callq 0x14a5
jmp 0x283e
movq %rbx, %rdi
callq 0x14d0
jmp 0x2861
leaq 0x1255(%rip), %rdi      # 0x3ae5
leaq 0x8bf(%rip), %rsi       # 0x3156
leaq 0x1267(%rip), %rcx      # 0x3b05
movl $0xbf, %edx
callq 0x10b0
leaq 0x1281(%rip), %rdi      # 0x3b30
leaq 0x8a0(%rip), %rsi       # 0x3156
leaq 0x1248(%rip), %rcx      # 0x3b05
movl $0xc1, %edx
callq 0x10b0
leaq 0x1285(%rip), %rdi      # 0x3b53
leaq 0x881(%rip), %rsi       # 0x3156
leaq 0x1229(%rip), %rcx      # 0x3b05
movl $0xca, %edx
callq 0x10b0
leaq 0x12a1(%rip), %rdi      # 0x3b8e
leaq 0x862(%rip), %rsi       # 0x3156
leaq 0x120a(%rip), %rcx      # 0x3b05
movl $0xcd, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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 0x2988
leaq 0x10(%rsp), %rcx
movl $0x0, 0x38(%rcx)
leaq 0x3da(%rip), %rdx       # 0x2d0e
movq %rsp, %rdi
xorl %esi, %esi
callq 0x1130
testl %eax, %eax
jne 0x29a7
callq 0x2bac
movq (%rsp), %rdi
callq 0x1190
testl %eax, %eax
jne 0x29c6
movq (%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x1170
testl %eax, %eax
jne 0x29e5
cmpq $-0x1, 0x8(%rsp)
jne 0x2a04
movq %rbx, %rdi
callq 0x1150
testl %eax, %eax
jne 0x2a23
addq $0x50, %rsp
popq %rbx
retq
leaq 0xfd7(%rip), %rdi       # 0x3966
leaq 0x7c0(%rip), %rsi       # 0x3156
leaq 0x120e(%rip), %rcx      # 0x3bab
movl $0xd7, %edx
callq 0x10b0
leaq 0x1002(%rip), %rdi      # 0x39b0
leaq 0x7a1(%rip), %rsi       # 0x3156
leaq 0x11ef(%rip), %rcx      # 0x3bab
movl $0xda, %edx
callq 0x10b0
leaq 0xda0(%rip), %rdi       # 0x376d
leaq 0x782(%rip), %rsi       # 0x3156
leaq 0x11d0(%rip), %rcx      # 0x3bab
movl $0xdd, %edx
callq 0x10b0
leaq 0xd99(%rip), %rdi       # 0x3785
leaq 0x763(%rip), %rsi       # 0x3156
leaq 0x11b1(%rip), %rcx      # 0x3bab
movl $0xde, %edx
callq 0x10b0
leaq 0xade(%rip), %rdi       # 0x34e9
leaq 0x744(%rip), %rsi       # 0x3156
leaq 0x1192(%rip), %rcx      # 0x3bab
movl $0xdf, %edx
callq 0x10b0
leaq 0xfe2(%rip), %rdi       # 0x3a0c
leaq 0x725(%rip), %rsi       # 0x3156
leaq 0x1173(%rip), %rcx      # 0x3bab
movl $0xe1, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x2ad5
movl $0x1, 0x38(%rbx)
leaq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x10c0
testl %eax, %eax
jne 0x2b08
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1da3
testl %eax, %eax
jne 0x2ae9
cmpl $0x2, 0x38(%rbx)
jne 0x2aa8
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rbx)
jne 0x2adf
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rbx, %rdi
callq 0x14fb
jmp 0x2a91
movq %rbx, %rdi
callq 0x1526
jmp 0x2acb
leaq 0x8f8(%rip), %rdi       # 0x33e8
leaq 0x65f(%rip), %rsi       # 0x3156
leaq 0x8a8(%rip), %rcx       # 0x33a6
movl $0x101, %edx            # imm = 0x101
callq 0x10b0
leaq 0x8b9(%rip), %rdi       # 0x33c8
leaq 0x640(%rip), %rsi       # 0x3156
leaq 0x889(%rip), %rcx       # 0x33a6
movl $0xfe, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %r14d, %r14d
movl $0x1, %r15d
xorl %eax, %eax
lock
cmpxchgq %r15, (%rbx)
jne 0x2b54
movl $0x1, %eax
lock
cmpxchgq %r14, (%rbx)
jne 0x2b62
callq 0x10e0
jmp 0x2b38
movq %rbx, %rdi
callq 0x178c
testl %eax, %eax
je 0x2b41
jmp 0x2b8d
movq %rbx, %rdi
callq 0x1b78
testl %eax, %eax
je 0x2b4d
leaq 0x9c9(%rip), %rdi       # 0x353e
leaq 0x5da(%rip), %rsi       # 0x3156
leaq 0x997(%rip), %rcx       # 0x351a
movl $0x12e, %edx            # imm = 0x12E
callq 0x10b0
leaq 0x970(%rip), %rdi       # 0x3504
leaq 0x5bb(%rip), %rsi       # 0x3156
leaq 0x978(%rip), %rcx       # 0x351a
movl $0x12d, %edx            # imm = 0x12D
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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
movq $0x0, (%rdi)
movq $0xf4240, 0x8(%rdi)     # imm = 0xF4240
xorl %esi, %esi
callq 0x10a0
testl %eax, %eax
jne 0x2bd4
addq $0x18, %rsp
retq
leaq 0x97b(%rip), %rdi       # 0x3556
leaq 0x574(%rip), %rsi       # 0x3156
leaq 0x983(%rip), %rcx       # 0x356c
movl $0x1d, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x2c39
cmpl $0x0, 0x8(%rbx)
jne 0x2c47
movl $0x1, 0x8(%rbx)
callq 0x2bac
movl $0x0, 0x8(%rbx)
incl 0xc(%rbx)
movq (%rbx), %rdi
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x2c40
xorl %eax, %eax
popq %rbx
retq
callq 0x1551
jmp 0x2c08
callq 0x157a
jmp 0x2c35
leaq 0xa87(%rip), %rdi       # 0x36d5
leaq 0x501(%rip), %rsi       # 0x3156
leaq 0xa66(%rip), %rcx       # 0x36c2
movl $0x2b, %edx
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x2c8a
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rbx)
jne 0x2c94
xorl %eax, %eax
popq %rbx
retq
movq %rbx, %rdi
callq 0x15a3
jmp 0x2c78
movq %rbx, %rdi
callq 0x15cc
jmp 0x2c86
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgq %rcx, (%rdi)
jne 0x2cfa
callq 0x2bac
callq 0x2bac
xorl %ecx, %ecx
movl $0x1, %eax
lock
cmpxchgq %rcx, (%rbx)
jne 0x2d04
xorl %eax, %eax
popq %rbx
retq
movq %rbx, %rdi
callq 0x15f5
jmp 0x2cde
movq %rbx, %rdi
callq 0x161e
jmp 0x2cf6
// File: /workspace/github_c_makefile_star2_O3/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
xorl %eax, %eax
movl $0x1, %ecx
lock
cmpxchgq %rcx, (%rdi)
jne 0x2d91
movq %rsp, %rdi
xorl %esi, %esi
callq 0x1180
testl %eax, %eax
jne 0x2d98
movq %rsp, %rdi
callq 0x1160
leaq 0x8(%rbx), %r14
cmpl $0x0, 0x38(%rbx)
jne 0x2d77
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x1da3
testl %eax, %eax
je 0x2d43
leaq 0xd11(%rip), %rdi       # 0x3a70
leaq 0x3f0(%rip), %rsi       # 0x3156
leaq 0xcdf(%rip), %rcx       # 0x3a4c
movl $0x9e, %edx
callq 0x10b0
movq %rsp, %rdi
callq 0x1090
movq (%rbx), %rdi
callq 0x2da8
xorl %eax, %eax
addq $0x68, %rsp
popq %rbx
popq %r14
retq
callq 0x1647
jmp 0x2d29
movq (%rbx), %rdi
callq 0x2da8
movq %rsp, %rdi
callq 0x1120
// File: /workspace/github_c_makefile_star2_O3/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 0x303f
movq %rax, %r12
testq %rax, %rax
jne 0x3eec
leaq 0x72ce(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x7309(%rip)      # 0xb1b8
jne 0x3ec4
leaq 0x3256(%rip), %rdi      # 0x710e
callq 0x3b35
movq %rax, 0x72f4(%rip)      # 0xb1b8
leaq 0x72a5(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x72e1(%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 0x3c27
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x303f
movq %rax, %r12
testq %rax, %rax
jne 0x3f8c
leaq 0x722e(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x7271(%rip)      # 0xb1c0
jne 0x3f64
leaq 0x31ca(%rip), %rdi      # 0x7122
callq 0x3b35
movq %rax, 0x725c(%rip)      # 0xb1c0
leaq 0x7205(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x7249(%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 0x3c27
movq %r12, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x71bb(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x7206(%rip)      # 0xb1c8
jne 0x3fd7
leaq 0x3172(%rip), %rdi      # 0x713d
callq 0x3b35
movq %rax, 0x71f1(%rip)      # 0xb1c8
leaq 0x7192(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x71de(%rip), %rax      # 0xb1c8
movq %r14, %rdi
movq %rbx, %rsi
callq *%rax
movq %rax, %rbx
movq %rax, %rdi
callq 0x3c27
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x714b(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x719e(%rip)      # 0xb1d0
jne 0x4047
leaq 0x3116(%rip), %rdi      # 0x7151
callq 0x3b35
movq %rax, 0x7189(%rip)      # 0xb1d0
leaq 0x7122(%rip), %rdi      # 0xb170
callq 0x2120
movq 0x7176(%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 0x3c27
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x613d(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x61c0(%rip)      # 0xb200
jne 0x5055
leaq 0x214b(%rip), %rdi      # 0x7194
callq 0x3b35
movq %rax, 0x61ab(%rip)      # 0xb200
leaq 0x6114(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x6197(%rip)      # 0xb200
je 0x50b1
movl 0x6197(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x50b7
movq %rax, %r15
movq %r14, 0x818(%rax)
movq %rbx, 0x828(%rax)
testb $0x4, 0x18(%rax)
je 0x50ca
leaq 0x2112(%rip), %rsi      # 0x71ab
movl $0x3, %edi
xorl %eax, %eax
callq 0x2cac
leaq 0x32(%rip), %r14        # 0x50de
movq %r15, %rbx
jmp 0x50ca
popq %rbx
popq %r14
popq %r15
retq
leaq 0x210d(%rip), %rsi      # 0x71cb
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
movq 0x612f(%rip), %rax      # 0xb200
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/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
movq 0x50(%rsp), %rbx
testq %rbx, %rbx
je 0x5202
movl %ecx, %r14d
movl %edx, %r12d
movl %esi, %r13d
leal -0x8246(%rdi), %eax
cmpl $0x5, %eax
ja 0x5120
movl %eax, %eax
leaq 0x1f05(%rip), %rcx      # 0x701c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmp 0x5127
leaq 0x32d3(%rip), %rdx      # 0x83fa
leal -0x824c(%r13), %eax
cmpl $0x5, %eax
ja 0x5145
movl %eax, %eax
leaq 0x1ef8(%rip), %r11      # 0x7034
movslq (%r11,%rax,4), %rcx
addq %r11, %rcx
jmp 0x514c
leaq 0x32f5(%rip), %rcx      # 0x8441
cmpl $0x9146, %r14d          # imm = 0x9146
movq %rdi, 0x10(%rsp)
jg 0x5178
cmpl $0x826b, %r14d          # imm = 0x826B
je 0x51a2
cmpl $0x9146, %r14d          # imm = 0x9146
jne 0x5196
movl %r8d, %ebp
leaq 0x32da(%rip), %r8       # 0x8450
jmp 0x51b8
cmpl $0x9148, %r14d          # imm = 0x9148
je 0x51ae
cmpl $0x9147, %r14d          # imm = 0x9147
jne 0x5196
movl %r8d, %ebp
leaq 0x32c1(%rip), %r8       # 0x8455
jmp 0x51b8
movl %r8d, %ebp
leaq 0x32cd(%rip), %r8       # 0x846d
jmp 0x51b8
movl %r8d, %ebp
leaq 0x32b4(%rip), %r8       # 0x8460
jmp 0x51b8
movl %r8d, %ebp
leaq 0x32a4(%rip), %r8       # 0x845c
movq %r9, (%rsp)
leaq 0x31db(%rip), %rsi      # 0x839e
movl $0x3, %edi
movq %r9, %r15
movl %r12d, %r9d
xorl %eax, %eax
callq 0x2cac
movq 0x818(%rbx), %rax
testq %rax, %rax
movq 0x10(%rsp), %rdi
je 0x5202
movq 0x828(%rbx), %rcx
movq %rcx, (%rsp)
movl %r13d, %esi
movl %r12d, %edx
movl %r14d, %ecx
movl %ebp, %r8d
movq %r15, %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_O3/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 0x5f4d(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x5fe0(%rip)      # 0xb210
jne 0x5245
leaq 0x1fc3(%rip), %rdi      # 0x71fc
callq 0x3b35
movq %rax, 0x5fcb(%rip)      # 0xb210
leaq 0x5f24(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x5fb7(%rip)      # 0xb210
je 0x52a1
movl 0x5fa7(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x52a7
movq %rax, %r15
movq %r14, 0x818(%rax)
movq %rbx, 0x828(%rax)
testb $0x4, 0x18(%rax)
je 0x52ba
leaq 0x1f8d(%rip), %rsi      # 0x7216
movl $0x3, %edi
xorl %eax, %eax
callq 0x2cac
leaq -0x1be(%rip), %r14      # 0x50de
movq %r15, %rbx
jmp 0x52ba
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1f1d(%rip), %rsi      # 0x71cb
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
movq 0x5f4f(%rip), %rax      # 0xb210
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/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 0x5e90(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x5f2b(%rip)      # 0xb218
jne 0x5302
leaq 0x1f3f(%rip), %rdi      # 0x7235
callq 0x3b35
movq %rax, 0x5f16(%rip)      # 0xb218
leaq 0x5e67(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x5f02(%rip)      # 0xb218
je 0x535e
movl 0x5eea(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x5364
movq %rax, %r15
movq %r14, 0x818(%rax)
movq %rbx, 0x828(%rax)
testb $0x4, 0x18(%rax)
je 0x5377
leaq 0x1f09(%rip), %rsi      # 0x724f
movl $0x3, %edi
xorl %eax, %eax
callq 0x2cac
leaq -0x27b(%rip), %r14      # 0x50de
movq %r15, %rbx
jmp 0x5377
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1e60(%rip), %rsi      # 0x71cb
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
movq 0x5e9a(%rip), %rax      # 0xb218
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/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 0x5dd3(%rip), %rdi      # 0xb170
callq 0x21a0
cmpq $0x0, 0x5e76(%rip)      # 0xb220
jne 0x53bf
leaq 0x1ebb(%rip), %rdi      # 0x726e
callq 0x3b35
movq %rax, 0x5e61(%rip)      # 0xb220
leaq 0x5daa(%rip), %rdi      # 0xb170
callq 0x2120
cmpq $0x0, 0x5e4d(%rip)      # 0xb220
je 0x541b
movl 0x5e2d(%rip), %edi      # 0xb208
callq 0x2070
testq %rax, %rax
je 0x5421
movq %rax, %r15
movq %r14, 0x820(%rax)
movq %rbx, 0x830(%rax)
testb $0x4, 0x18(%rax)
je 0x5434
leaq 0x1e85(%rip), %rsi      # 0x7288
movl $0x3, %edi
xorl %eax, %eax
callq 0x2cac
leaq 0x32(%rip), %r14        # 0x5448
movq %r15, %rbx
jmp 0x5434
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1da3(%rip), %rsi      # 0x71cb
movl $0x2, %edi
xorl %eax, %eax
callq 0x2cac
movq 0x5de5(%rip), %rax      # 0xb220
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmpq *%rax
// File: /workspace/github_c_makefile_star2_O3/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 0x5535
movq %r9, %r15
movq %r8, %rbx
movl %ecx, %ebp
movl %edx, %r14d
movl %esi, %r12d
movl %edi, %r13d
leal -0x9149(%r12), %eax
cmpl $0x7, %eax
ja 0x548c
movl %eax, %eax
leaq 0x1bc9(%rip), %rcx      # 0x704c
movslq (%rcx,%rax,4), %rdx
addq %rcx, %rdx
jmp 0x5493
leaq 0x3026(%rip), %rdx      # 0x84b9
cmpl $0x9146, %r14d          # imm = 0x9146
jg 0x54b7
cmpl $0x826b, %r14d          # imm = 0x826B
je 0x54db
cmpl $0x9146, %r14d          # imm = 0x9146
jne 0x54d2
leaq 0x2f9b(%rip), %rcx      # 0x8450
jmp 0x54eb
cmpl $0x9148, %r14d          # imm = 0x9148
je 0x54e4
cmpl $0x9147, %r14d          # imm = 0x9147
jne 0x54d2
leaq 0x2f85(%rip), %rcx      # 0x8455
jmp 0x54eb
leaq 0x2f94(%rip), %rcx      # 0x846d
jmp 0x54eb
leaq 0x2f7e(%rip), %rcx      # 0x8460
jmp 0x54eb
leaq 0x2f71(%rip), %rcx      # 0x845c
leaq 0x2f8e(%rip), %rsi      # 0x8480
movl $0x3, %edi
movl %r13d, %r8d
movq %rbx, %r9
xorl %eax, %eax
callq 0x2cac
movq 0x820(%r15), %rax
testq %rax, %rax
je 0x5535
movq 0x830(%r15), %r9
movl %r13d, %edi
movl %r12d, %esi
movl %r14d, %edx
movl %ebp, %ecx
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_O3/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 %r14
pushq %rbx
pushq %rax
movl (%rdi), %eax
leal 0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x5d73
addq $0x8, %rsp
popq %rbx
popq %r14
retq
testl %eax, %eax
jne 0x5d84
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *0x5544(%rip)           # 0xb2c8
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x10(%rdi), %ecx
movq (%rax,%rcx,8), %r14
testq %r14, %r14
je 0x5d6b
testb $0x1, 0x14(%rbx)
jne 0x5db9
movq 0x5564(%rip), %rax      # 0xb308
movq 0x18(%rbx), %rdx
movq %r14, %rdi
movl $0x1, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmpq *%rax
movq 0x20(%rbx), %rdx
movq %r14, %rdi
movl $0x1, %esi
callq *0x553d(%rip)           # 0xb308
cmpl $0x911b, %eax           # imm = 0x911B
jne 0x5d6b
movl 0x28(%rbx), %edi
testl %edi, %edi
je 0x5db9
callq 0x21d0
jmp 0x5db9
// File: /workspace/github_c_makefile_star2_O3/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 0x5e3d
testl %eax, %eax
je 0x5e3d
cmpl $-0x1, %eax
jne 0x5df6
jmpq *0x54d2(%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 0x5e12
callq *0x54ee(%rip)           # 0xb300
xorl %ebp, %ebp
movl $0x9117, %edi           # imm = 0x9117
xorl %esi, %esi
callq *0x54d7(%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