LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/./pl_mpeg.h
// Function: plm_video_copy_macroblock
void plm_video_copy_macroblock(plm_video_t *self, plm_frame_t *s, int motion_h, int motion_v) {
	plm_frame_t *d = &self->frame_current;
	plm_video_process_macroblock(self, s->y.data, d->y.data, motion_h, motion_v, 16, FALSE);
	plm_video_process_macroblock(self, s->cr.data, d->cr.data, motion_h / 2, motion_v / 2, 8, FALSE);
	plm_video_process_macroblock(self, s->cb.data, d->cb.data, motion_h / 2, motion_v / 2, 8, FALSE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %rsi
movq 0xc8(%rdi), %rdx
andl $0x0, (%rsp)
pushq $0x10
popq %r9
movl %r15d, %ecx
movl %ebp, %r8d
callq 0x4e93
movq 0x28(%r14), %rsi
movq 0xd8(%rbx), %rcx
pushq $0x2
popq %rdi
movl %r15d, %eax
cltd
idivl %edi
movl %eax, %r15d
movl %ebp, %eax
cltd
idivl %edi
movl %eax, %ebp
andl $0x0, (%rsp)
pushq $0x8
popq %r12
movq %rbx, %rdi
movq %rcx, %rdx
movl %r15d, %ecx
movl %eax, %r8d
movl %r12d, %r9d
callq 0x4e93
movq 0x38(%r14), %rsi
movq 0xe8(%rbx), %rdx
andl $0x0, (%rsp)
movq %rbx, %rdi
movl %r15d, %ecx
movl %ebp, %r8d
movl %r12d, %r9d
callq 0x4e93
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/./pl_mpeg.h
// Function: plm_video_interpolate_macroblock
void plm_video_interpolate_macroblock(plm_video_t *self, plm_frame_t *s, int motion_h, int motion_v) {
	plm_frame_t *d = &self->frame_current;
	plm_video_process_macroblock(self, s->y.data, d->y.data, motion_h, motion_v, 16, TRUE);
	plm_video_process_macroblock(self, s->cr.data, d->cr.data, motion_h / 2, motion_v / 2, 8, TRUE);
	plm_video_process_macroblock(self, s->cb.data, d->cb.data, motion_h / 2, motion_v / 2, 8, TRUE);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rsi), %rsi
movq 0xc8(%rdi), %rdx
pushq $0x1
popq %r13
movl %r13d, (%rsp)
pushq $0x10
popq %r9
movl %r15d, %ecx
movl %ebp, %r8d
callq 0x4e93
movq 0x28(%r14), %rsi
movq 0xd8(%rbx), %rcx
pushq $0x2
popq %rdi
movl %r15d, %eax
cltd
idivl %edi
movl %eax, %r15d
movl %ebp, %eax
cltd
idivl %edi
movl %eax, %ebp
movl %r13d, (%rsp)
pushq $0x8
popq %r12
movq %rbx, %rdi
movq %rcx, %rdx
movl %r15d, %ecx
movl %eax, %r8d
movl %r12d, %r9d
callq 0x4e93
movq 0x38(%r14), %rsi
movq 0xe8(%rbx), %rdx
movl %r13d, (%rsp)
movq %rbx, %rdi
movl %r15d, %ecx
movl %ebp, %r8d
movl %r12d, %r9d
callq 0x4e93
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/./pl_mpeg.h
// Function: plm_audio_find_frame_sync
int plm_audio_find_frame_sync(plm_audio_t *self) {
	size_t i;
	for (i = self->buffer->bit_index >> 3; i < self->buffer->length-1; i++) {
		if (
			self->buffer->bytes[i] == 0xFF &&
			(self->buffer->bytes[i+1] & 0xFE) == 0xFC
		) {
			self->buffer->bit_index = ((i+1) << 3) + 3;
			return TRUE;
		}
	}
	self->buffer->bit_index = (i + 1) << 3;
	return FALSE;
}

// Assembly:
movq 0x30(%rdi), %rcx
movq (%rcx), %rdx
movq 0x10(%rcx), %rsi
movq %rdx, %rdi
shrq $0x3, %rdi
decq %rsi
cmpq %rsi, %rdi
movq %rsi, %r8
cmovaq %rdi, %r8
andq $-0x8, %rdx
addq $0xb, %rdx
pushq $0x1
popq %rax
cmpq %rsi, %rdi
jae 0x6d4f
movq 0x58(%rcx), %r9
cmpb $-0x1, (%r9,%rdi)
jne 0x6d46
movb 0x1(%r9,%rdi), %r9b
andb $-0x2, %r9b
cmpb $-0x4, %r9b
je 0x6d59
addq $0x8, %rdx
incq %rdi
jmp 0x6d27
leaq 0x8(,%r8,8), %rdx
xorl %eax, %eax
movq %rdx, (%rcx)
retq
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/pl_mpeg_player_sdl.c
// Function: app_destroy
void app_destroy(app_t *self) {
	plm_destroy(self->plm);

	if (self->audio_device) {
		SDL_CloseAudioDevice(self->audio_device);
	}

	if (self->texture) {
		SDL_DestroyTexture(self->texture);
	}

	if (self->renderer) {
		SDL_DestroyRenderer(self->renderer);
	}

	if (self->window) {
		SDL_DestroyWindow(self->window);
	}

	SDL_Quit();
	
	free(self);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x28b1
movl 0x40(%rbx), %edi
testl %edi, %edi
je 0x7d6a
callq 0x20c0
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x7d78
callq 0x2120
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x7d86
callq 0x20b0
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x7d94
callq 0x2040
callq 0x2070
movq %rbx, %rdi
popq %rbx
jmp 0x21c0
// File: /workspace/github_c_makefile_star2_O2/phoboslab[P]pl_mpeg/pl_mpeg_player_sdl.c
// Function: main
int main(int argc, char *argv[]) {
	if (argc < 2) {
		SDL_Log("Usage: pl_mpeg_player_sdl <file.mpg>");
		exit(1);
	}

	SDL_SetMainReady();
	
	app_t *app = app_create(argv[1]);
	while (!app->wants_to_quit) {
		app_update(app);
	}
	app_destroy(app);
	
	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbx
cmpl $0x1, %edi
jle 0x7f54
movq %rsi, %rbx
callq 0x2100
movq 0x8(%rbx), %rdi
callq 0x7aac
movq %rax, %rbx
cmpl $0x0, 0x10(%rbx)
jne 0x7f48
movq %rbx, %rdi
callq 0x7da2
jmp 0x7f38
movq %rbx, %rdi
callq 0x7d52
xorl %eax, %eax
popq %rbx
retq
leaq 0x1814(%rip), %rdi      # 0x976f
xorl %eax, %eax
callq 0x2200
pushq $0x1
popq %rdi
callq 0x21d0
// File: /workspace/github_c_makefile_star2_O2/antonblanchard[P]will-it-scale/tests/context_switch1.c
// Function: testcase
void testcase(unsigned long long *iterations, unsigned long nr)
{
	struct args *a;
	char c;
	int ret;
	a = malloc(sizeof(struct args));
	assert(pipe(a->fd1) == 0);
	assert(pipe(a->fd2) == 0);

	new_task(child, a);

	while (1) {
		do {
			ret = write(a->fd1[WRITE], &c, 1);
		} while (ret != 1 && errno == EINTR);
		assert(ret == 1);

		do {
			ret = read(a->fd2[READ], &c, 1);
		} while (ret != 1 && errno == EINTR);
		assert(ret == 1);
			
		(*iterations) += 2;
	}

	free(a);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
pushq $0x10
popq %rdi
callq 0x11d0
movq %rax, %r14
movq %rax, %rdi
callq 0x1160
testl %eax, %eax
jne 0x1c54
leaq 0x8(%r14), %r15
movq %r15, %rdi
callq 0x1160
testl %eax, %eax
jne 0x1c6d
leaq 0xbe(%rip), %rdi        # 0x1cbc
movq %r14, %rsi
callq 0x139e
leaq 0xf(%rsp), %r12
pushq $0x1
popq %r13
movl 0x4(%r14), %edi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10d0
cmpl $0x1, %eax
jne 0x1c42
movl (%r15), %edi
movq %r12, %rsi
movq %r13, %rdx
callq 0x1170
cmpl $0x1, %eax
je 0x1c4e
callq 0x1070
cmpl $0x4, (%rax)
je 0x1c23
jmp 0x1c86
callq 0x1070
cmpl $0x4, (%rax)
je 0x1c0f
jmp 0x1ca3
addq $0x2, (%rbx)
jmp 0x1c0f
leaq 0x616(%rip), %rdi       # 0x2271
leaq 0x621(%rip), %rsi       # 0x2283
leaq 0x632(%rip), %rcx       # 0x229b
pushq $0x2d
jmp 0x1c9d
leaq 0x65a(%rip), %rdi       # 0x22ce
leaq 0x608(%rip), %rsi       # 0x2283
leaq 0x619(%rip), %rcx       # 0x229b
pushq $0x2e
jmp 0x1c9d
leaq 0x653(%rip), %rdi       # 0x22e0
leaq 0x5ef(%rip), %rsi       # 0x2283
leaq 0x600(%rip), %rcx       # 0x229b
pushq $0x3b
popq %rdx
callq 0x1130
leaq 0x636(%rip), %rdi       # 0x22e0
leaq 0x5d2(%rip), %rsi       # 0x2283
leaq 0x5e3(%rip), %rcx       # 0x229b
pushq $0x36
jmp 0x1c9d
// File: /workspace/github_c_makefile_star2_O2/antonblanchard[P]will-it-scale/tests/context_switch1.c
// Function: child
static void *child(void *arg)
{
	struct args *a = arg;
	char c;
	int ret;

	while (1) {
		do {
			ret = read(a->fd1[READ], &c, 1);
		} while (ret != 1 && errno == EINTR);
		assert(ret == 1);

		do {
			ret = write(a->fd2[WRITE], &c, 1);
		} while (ret != 1 && errno == EINTR);
		assert(ret == 1);
	}

	return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0xf(%rsp), %r14
pushq $0x1
popq %r15
movl (%rbx), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x1170
cmpl $0x1, %eax
jne 0x1d02
movl 0xc(%rbx), %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x10d0
cmpl $0x1, %eax
je 0x1cd1
callq 0x1070
cmpl $0x4, (%rax)
je 0x1ce3
jmp 0x1d25
callq 0x1070
cmpl $0x4, (%rax)
je 0x1cd1
leaq 0x5cd(%rip), %rdi       # 0x22e0
leaq 0x569(%rip), %rsi       # 0x2283
leaq 0x5c8(%rip), %rcx       # 0x22e9
pushq $0x1c
jmp 0x1d3c
leaq 0x5b4(%rip), %rdi       # 0x22e0
leaq 0x550(%rip), %rsi       # 0x2283
leaq 0x5af(%rip), %rcx       # 0x22e9
pushq $0x21
popq %rdx
callq 0x1130
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/glob6.c
// Function: gnew
static const char **
gnew(const char **gav)
{
	size_t siz;
	ptrdiff_t gidx;
	const char **nav;
	static unsigned mult = 1;

	if (gavp == gave) {
		mult *= GAVMULT;
		gidx  = (ptrdiff_t)(gavp - gav);
		siz   = (size_t)((gidx + (GAVNEW * mult)) * sizeof(char *));
		if ((nav = realloc(gav, siz)) == NULL)
			err(SH_ERR, FMT1S, ERR_NOMEM);
		gav   = nav;
		gavp  = gav + gidx;
		gave  = &gav[gidx + (GAVNEW * mult) - 1];
	}
	return gav;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x3adb(%rip), %r14      # 0x5108
cmpq 0x3adc(%rip), %r14      # 0x5110
jne 0x16a1
movl 0x3abc(%rip), %eax      # 0x50f8
leal (%rax,%rax), %r15d
movl %r15d, 0x3ab1(%rip)     # 0x50f8
subq %rbx, %r14
shll $0x8, %eax
leaq (%r14,%rax,8), %rsi
andq $-0x8, %rsi
movq %rbx, %rdi
callq 0x11a0
movq %rax, %rbx
testq %rax, %rax
jne 0x1684
leaq 0x1bbd(%rip), %rsi      # 0x3229
leaq 0x1ab6(%rip), %rdx      # 0x3129
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x194c
movl 0x3a74(%rip), %r15d     # 0x50f8
addq %rbx, %r14
movq %r14, 0x3a7a(%rip)      # 0x5108
shll $0x7, %r15d
leaq (%r14,%r15,8), %rax
addq $-0x8, %rax
movq %rax, 0x3a6f(%rip)      # 0x5110
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/glob6.c
// Function: gcat
static char *
gcat(const char *src1, const char *src2)
{
	size_t siz;
	char *b, buf[PATHMAX], c, *dst;
	const char *s;

	*buf = EOS, b = buf, s = src1;
	while ((c = *s++) != EOS) {
		if (b >= &buf[PATHMAX - 1])
			err(SH_ERR, FMT1S, strerror(ENAMETOOLONG));
		if ((c &= ASCII) == EOS) {
			*b++ = SLASH;
			break;
		}
		*b++ = c;
	}

	s = src2;
	do {
		if (b >= &buf[PATHMAX])
			err(SH_ERR, FMT1S, strerror(ENAMETOOLONG));
		*b++ = c = *s++;
	} while (c != EOS);

	siz = b - buf;
	gavtot += siz;
	if (gavtot > GAVMAX)
		err(SH_ERR, FMT1S, ERR_E2BIG);
	if ((dst = malloc(siz)) == NULL) {
		err(SH_ERR, FMT1S, ERR_NOMEM);
		/*NOTREACHED*/
	}

	(void)memcpy(dst, buf, siz);
	return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movq %rsi, %r14
movq %rdi, %r15
movb $0x0, (%rsp)
leaq 0x1b5d(%rip), %r12      # 0x3229
pushq $0x2
popq %r13
xorl %ebx, %ebx
movb (%r15,%rbx), %bpl
testb %bpl, %bpl
je 0x1712
cmpq $0xfff, %rbx            # imm = 0xFFF
jb 0x16fc
pushq $0x24
popq %rdi
callq 0x11c0
movl %r13d, %edi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x194c
andb $0x7f, %bpl
je 0x170b
movb %bpl, (%rsp,%rbx)
incq %rbx
jmp 0x16d2
movb $0x2f, (%rsp,%rbx)
incq %rbx
pushq $0x24
popq %rbp
leaq 0x1b0d(%rip), %r15      # 0x3229
pushq $0x2
popq %r12
cmpq $0x1000, %rbx           # imm = 0x1000
jl 0x1740
movl %ebp, %edi
callq 0x11c0
movl %r12d, %edi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x194c
movb (%r14), %al
incq %r14
movb %al, (%rsp,%rbx)
incq %rbx
testb %al, %al
jne 0x1720
movq 0x39c1(%rip), %rax      # 0x5118
addq %rbx, %rax
movq %rax, 0x39b7(%rip)      # 0x5118
cmpq $0x100001, %rax         # imm = 0x100001
jb 0x1781
leaq 0x1ab9(%rip), %rsi      # 0x3229
leaq 0x19e9(%rip), %rdx      # 0x3160
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x194c
movq %rbx, %rdi
callq 0x1180
movq %rax, %r14
testq %rax, %rax
jne 0x17a9
leaq 0x1a91(%rip), %rsi      # 0x3229
leaq 0x198a(%rip), %rdx      # 0x3129
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x194c
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x1150
movq %r14, %rax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/err.c
// Function: err
void
err(int es, const char *msgfmt, ...)
{
	va_list va;

	if (msgfmt != NULL) {
		va_start(va, msgfmt);
		wmsg(FD2, msgfmt, va);
		va_end(va);
	}
	if (myerrexit == NULL) {
		fd_print(FD2, FMT1S, "err: Invalid myerrexit function pointer");
		abort();
	}

	(*myerrexit)(es);
}

// Assembly:
pushq %rbx
subq $0xd0, %rsp
movl %edi, %ebx
movq %rdx, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x48(%rsp)
testb %al, %al
je 0x19a5
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
testq %rsi, %rsi
je 0x19d7
leaq 0x20(%rsp), %rax
movq %rsp, %rdx
movq %rax, 0x10(%rdx)
leaq 0xe0(%rsp), %rax
movq %rax, 0x8(%rdx)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rdx)
pushq $0x2
popq %rdi
callq 0x1a0d
movq 0x3742(%rip), %rax      # 0x5120
testq %rax, %rax
je 0x19f0
movl %ebx, %edi
callq *%rax
addq $0xd0, %rsp
popq %rbx
retq
leaq 0x1832(%rip), %rsi      # 0x3229
leaq 0x1774(%rip), %rdx      # 0x3172
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x1afc
callq 0x1050
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/err.c
// Function: wmsg
static void
wmsg(int wfd, const char *msgfmt, va_list va)
{
	char msg[MSGMAX];
	char fmt[FMTMAX];
	struct iovec ev[4];
	int i;

	i = snprintf(fmt, sizeof(fmt), "%s", msgfmt);
	if (i >= 1 && i < (int)sizeof(fmt)) {
		i = vsnprintf(msg, sizeof(msg), fmt, va);
		if (i >= 0 && i < (int)sizeof(msg)) {
			if (write(wfd, msg, strlen(msg)) == -1) {
				ev[0].iov_base = (char *)getmyname();
				ev[0].iov_len  = strlen(getmyname());
				ev[1].iov_base = ": ";
				ev[1].iov_len  = (size_t)2;
				ev[2].iov_base = ERR_WRITE;
				ev[2].iov_len  = strlen(ERR_WRITE);
				ev[3].iov_base = "\n";
				ev[3].iov_len  = (size_t)1;
				(void)writev(FD2, ev, 4);
			}
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x8d8, %rsp            # imm = 0x8D8
movq %rdx, %r14
movq %rsi, %rcx
movl %edi, %ebx
leaq 0x1783(%rip), %rdx      # 0x31a9
movq %rsp, %rdi
pushq $0x41
popq %rsi
xorl %eax, %eax
callq 0x10f0
decl %eax
cmpl $0x3f, %eax
ja 0x1af1
leaq 0x90(%rsp), %rdi
movq %rsp, %rdx
movl $0x841, %esi            # imm = 0x841
movq %r14, %rcx
callq 0x1090
cmpl $0x840, %eax            # imm = 0x840
ja 0x1af1
leaq 0x90(%rsp), %r14
movq %r14, %rdi
callq 0x10d0
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x10a0
cmpq $-0x1, %rax
jne 0x1af1
movq 0x369d(%rip), %rax      # 0x5128
testq %rax, %rax
leaq 0x1705(%rip), %rdi      # 0x319a
cmovneq %rax, %rdi
leaq 0x50(%rsp), %rbx
movq %rdi, (%rbx)
callq 0x10d0
movq %rax, 0x8(%rbx)
leaq 0x1712(%rip), %rax      # 0x31c3
movq %rax, 0x10(%rbx)
movq $0x2, 0x18(%rbx)
leaq 0x16e8(%rip), %rax      # 0x31ac
movq %rax, 0x20(%rbx)
movq $0xc, 0x28(%rbx)
leaq 0x16fe(%rip), %rax      # 0x31d5
movq %rax, 0x30(%rbx)
movq $0x1, 0x38(%rbx)
pushq $0x2
popq %rdi
pushq $0x4
popq %rdx
movq %rbx, %rsi
callq 0x1080
addq $0x8d8, %rsp            # imm = 0x8D8
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/s3lase[P]v6shell/err.c
// Function: setmyname
void
setmyname(const char *s)
{
	const char *p;

	if (s != NULL && *s != EOS) {
		if ((p = strrchr(s, SLASH)) != NULL)
			p++;
		else
			p = s;
		if (*p == HYPHEN && *(p + 1) != EOS)
			p++;
		else if (*p == EOS)
			/* should never (but can) be true */
			p = MYNAME;
	} else
		/* should never (but can) be true */
		p = MYNAME;

	myname = p;
}

// Assembly:
leaq 0x15df(%rip), %rcx      # 0x31a1
testq %rdi, %rdi
je 0x1c05
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x1c04
pushq $0x2f
popq %rsi
movq %rbx, %rdi
callq 0x1100
leaq 0x1(%rax), %rcx
testq %rax, %rax
cmoveq %rbx, %rcx
movb (%rcx), %al
cmpb $0x2d, %al
jne 0x1bf7
cmpb $0x0, 0x1(%rcx)
je 0x1bf7
incq %rcx
jmp 0x1c04
testb %al, %al
leaq 0x15a1(%rip), %rax      # 0x31a1
cmoveq %rax, %rcx
popq %rbx
movq %rcx, 0x351c(%rip)      # 0x5128
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/shellaes128v2d5n64/ref/shellaes.c
// Function: PXDEC
void PXDEC(const u32 mk[], const u32 isk[], const u8 L[], u8 V[], const u8 Z[], const u32 rk[], u8 I[], unsigned long long int ctlen){

    int i=0;

    u8 ct[16];
    u8 final_block_mask[16];

    /*process Z[] except the last block*/
    while(ctlen>16){
        xor_byte_string(Z, V, 16);
        aesReducedDec(mk+4*i, isk+12*i, V, ct);

        memcpy(I, ct, 16);
        memcpy(V, Z, 16);

        Z+=16;
        I+=16;
        ctlen-=16;
        ++i;

        if(i==d){
            i=0;
            aesEncrypt(rk, V, ct);
            memcpy(V, ct, 16);
        }
    }

    /*process the last block of Z[]*/
    memcpy(final_block_mask, L, 16);
    double_mask(final_block_mask);
    double_mask(final_block_mask);
    double_mask(final_block_mask);


    xor_byte_string(Z, V, 16);
    xor_byte_string(final_block_mask, V, 16);

    aesReducedDec(mk+4*i, isk+12*i, V, I);

    /*apply the final AES call*/
    memcpy(V, Z, 16);
    aesEncrypt(rk, V, ct);
    memcpy(V, ct, 16);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, (%rsp)
movq %r8, %r15
movq %rcx, %rbx
movq %rdx, 0x28(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq 0x88(%rsp), %r13
movq 0x80(%rsp), %r12
xorl %r14d, %r14d
cmpq $0x11, %r13
jb 0x2f09
movq %r15, %rdi
movq %rbx, %rsi
pushq $0x10
popq %rdx
callq 0x11f0
leal (,%r14,4), %eax
cltq
leaq (,%rax,4), %rdi
addq %rbp, %rdi
imull $0xc, %r14d, %eax
cltq
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movq %rbx, %rdx
leaq 0x10(%rsp), %rcx
callq 0x11d0
vmovaps 0x10(%rsp), %xmm0
vmovups %xmm0, (%r12)
vmovups (%r15), %xmm0
vmovups %xmm0, (%rbx)
incl %r14d
cmpl $0x5, %r14d
jne 0x2ef8
movq (%rsp), %rdi
movq %rbx, %rsi
leaq 0x10(%rsp), %rdx
callq 0x11b0
vmovaps 0x10(%rsp), %xmm0
vmovups %xmm0, (%rbx)
xorl %r14d, %r14d
addq $0x10, %r15
addq $0x10, %r12
addq $-0x10, %r13
jmp 0x2e73
movq 0x28(%rsp), %rax
vmovups (%rax), %xmm0
leaq 0x30(%rsp), %r13
vmovaps %xmm0, (%r13)
movq %r13, %rdi
callq 0x11a0
movq %r13, %rdi
callq 0x11a0
movq %r13, %rdi
callq 0x11a0
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %rbx, %rsi
callq 0x11f0
movq %r13, %rdi
movq %rbx, %rsi
pushq $0x10
popq %rdx
callq 0x11f0
leal (,%r14,4), %eax
cltq
leaq (,%rax,4), %rdi
addq %rbp, %rdi
imull $0xc, %r14d, %eax
cltq
movq 0x8(%rsp), %rcx
leaq (%rcx,%rax,4), %rsi
movq %rbx, %rdx
movq %r12, %rcx
callq 0x11d0
vmovups (%r15), %xmm0
vmovups %xmm0, (%rbx)
leaq 0x10(%rsp), %r14
movq (%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11b0
vmovaps (%r14), %xmm0
vmovups %xmm0, (%rbx)
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/shellaes128v2d5n64/ref/shellaes.c
// Function: tagVef
int tagVef(const u32 rk[], const u8 checksum[], const u8 Lprime[], const u8 U[], const u8 F[], const u8 T[], unsigned long long int ptlen){

    u8 tempT[16];
    int flag=1;
    int i;

    tagGen(rk, checksum, Lprime, U, F, tempT, ptlen);

    for(i=0; i<byte_length_tag; ++i){
        if(tempT[i]!=T[i]){
            flag=0;
        }
    }
    return flag;
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %r9, %rbx
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
leaq 0x10(%rsp), %r9
callq 0x1070
pushq $0x1
popq %rax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq $0x10, %rdx
je 0x3281
movb 0x10(%rsp,%rdx), %sil
cmpb (%rbx,%rdx), %sil
cmovnel %ecx, %eax
incq %rdx
jmp 0x326a
addq $0x20, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/shellaes128v2d5n64/ref/shellaes.c
// Function: shellaesEnc
void shellaesEnc(const u8 key[], const u8 nonce[], const u8 ad[], unsigned long long int adlen, const u8 p[], unsigned long long int ptlen, u8 c[], unsigned long long int ctlen){

    u8 tag[16];
    unsigned long long int padp_len=ptlen+16-(ptlen%16);
    u8* padp;

    /*pad plaintexts to multiple blocks*/
    padp=(u8*) malloc(padp_len);
    memcpy(padp, p, ptlen);
    memset(padp+ptlen,0x80,1);
    memset(padp+ptlen+1, 0, 15-(ptlen%16));


    /*encryption of padded plaintext*/
    shellaesEnc_fb(key, nonce, ad, adlen, padp, padp_len, c, tag);
    free(padp);

    /*append the tag to ciphertext*/
    memcpy(c+padp_len, tag, byte_length_tag);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, %r14
movq %r8, %rbx
movq %rcx, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq %rdi, (%rsp)
movl %r14d, %ebp
notl %ebp
movq %r9, %r13
andq $-0x10, %r13
leaq 0x10(%r13), %r15
movq %r15, %rdi
callq 0x10c0
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1210
leaq (%r12,%r14), %rdi
incq %rdi
movb $-0x80, -0x1(%rdi)
andl $0xf, %ebp
xorl %esi, %esi
movq %rbp, %rdx
callq 0x1060
leaq 0x20(%rsp), %rbx
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq %r12, %r8
movq %r15, %r9
pushq %rbx
movq 0x78(%rsp), %r14
pushq %r14
callq 0x1220
popq %rax
popq %rcx
movq %r12, %rdi
callq 0x1120
vmovaps (%rbx), %xmm0
vmovups %xmm0, 0x10(%r14,%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mjosaarinen[P]brutus/crypto_aead/shellaes128v2d5n64/ref/shellaes.c
// Function: shellaesDec
int shellaesDec(const u8 key[], const u8 nonce[], const u8 ad[], unsigned long long int adlen, const u8 c[], unsigned long long int ctlen, u8 p[], unsigned long long int* ptlen){

    u8 tag[16];
    int flag;

    memcpy(tag, c+*ptlen, byte_length_tag);

    flag=shellaesDecVef_fb(key, nonce, ad, adlen, c, *ptlen, p, tag);


    /*if the tag is valid, erase the padding bits*/
    if(flag){
        while(p[*ptlen-1]!=0x80){
            *ptlen=*ptlen-1;
        }

        *ptlen=*ptlen-1;
    }

    return flag;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq 0x38(%rsp), %rbx
movq 0x30(%rsp), %r14
movq (%rbx), %r9
vmovups (%r8,%r9), %xmm0
movq %rsp, %rax
vmovaps %xmm0, (%rax)
pushq %rax
pushq %r14
callq 0x10e0
addq $0x10, %rsp
testl %eax, %eax
je 0x37de
movq (%rbx), %rcx
decq %rcx
cmpb $-0x80, (%r14,%rcx)
movq %rcx, (%rbx)
leaq -0x1(%rcx), %rcx
jne 0x37d0
addq $0x18, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: rrandom_u128
F_UINT rrandom_u(int len)
{
    int bit, pos, n, end;
    F_UINT a;
    
    bit = random() & 1;
    pos = 0;
    a = 0;
    for(;;) {
        n = (random() % len) + 1;
        end = pos + n;
        if (end > len)
            end = len;
        if (bit) {
            n = end - pos;
            if (n == F_SIZE)
                a = (F_UINT)(-1);
            else
                a |= (((F_UINT)1 << n) - 1) << pos;
        }
        if (end >= len)
            break;
        pos = end;
        bit ^= 1;
    }
    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebx
callq 0x1090
movq %rax, %r15
andl $0x1, %r15d
movl %ebx, 0xc(%rsp)
movslq %ebx, %rax
movq %rax, 0x10(%rsp)
xorl %ebp, %ebp
xorl %eax, %eax
xorl %edx, %edx
movq %rdx, %rbx
movq %rax, %r14
movl %ebp, %r12d
callq 0x1090
cqto
movq 0x10(%rsp), %rcx
idivq %rcx
leal (%r12,%rdx), %r13d
incl %r13d
movl %r13d, %ebp
cmpl %ecx, %r13d
jl 0x1da4
movl 0xc(%rsp), %eax
movl %eax, %ebp
testl %r15d, %r15d
je 0x1df4
movl %ebp, %ecx
subl %r12d, %ecx
pushq $-0x1
popq %rdx
movq %rdx, %rax
cmpl $0x80, %ecx
je 0x1dfa
movl $0xff, %eax
andl %eax, %ecx
pushq $-0x1
popq %rdi
movq %rdi, %rsi
movl %ecx, %edx
callq 0x133f0
notq %rax
notq %rdx
movl $0xff, %ecx
andl %ecx, %r12d
movq %rax, %rdi
movq %rdx, %rsi
movl %r12d, %edx
callq 0x133f0
orq %rbx, %rdx
orq %r14, %rax
jmp 0x1dfa
movq %r14, %rax
movq %rbx, %rdx
xorl $0x1, %r15d
cmpl 0xc(%rsp), %r13d
jl 0x1d77
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: rrandom_sf64
F_UINT rrandom_sf(void)
{
    uint32_t a_exp, a_sign;
    F_UINT a_mant;
    a_sign = random() & 1;

    /* generate exponent close to the min/max more often than random */
    switch(random() & 15) {
    case 0:
        a_exp = (random() % (2 * MANT_SIZE)) & EXP_MASK;
        break;
    case 1:
        a_exp = (EXP_MASK - (random() % (2 * MANT_SIZE))) & EXP_MASK;
        break;
    default:
        a_exp = random() & EXP_MASK;
        break;
    }
    a_mant = rrandom_u(MANT_SIZE);
    return pack_sf(a_sign, a_exp, a_mant);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
callq 0x1090
movq %rax, %rbx
callq 0x1090
movq %rax, %r15
andl $0xf, %r15d
callq 0x1090
movq %rax, %r14
cmpq $0x1, %r15
je 0x236f
testq %r15, %r15
jne 0x2383
pushq $0x68
popq %rcx
movq %r14, %rax
cqto
idivq %rcx
movq %rdx, %r14
jmp 0x2383
pushq $0x68
popq %rcx
movq %r14, %rax
cqto
idivq %rcx
movl $0x7ff, %r14d           # imm = 0x7FF
subq %rdx, %r14
pushq $0x34
popq %rdi
callq 0x1cc6
shlq $0x3f, %rbx
andl $0x7ff, %r14d           # imm = 0x7FF
shlq $0x34, %r14
orq %rbx, %r14
movabsq $0xfffffffffffff, %rcx  # imm = 0xFFFFFFFFFFFFF
andq %rcx, %rax
orq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: print_sf64
static void print_sf(F_UINT a)
{
    uint32_t a_sign, a_exp;
    F_UINT a_mant;
    a_sign = a >> (F_SIZE - 1);
    a_exp = (a >> MANT_SIZE) & EXP_MASK;
    a_mant = a & MANT_MASK;
    printf("%u %0*x ",
           a_sign,
           (EXP_SIZE + 3) / 4, a_exp);
#if F_SIZE == 32
    printf("%0*x", (MANT_SIZE + 3) / 4, a_mant);
#elif F_SIZE == 64
    printf("%0*" PRIx64 , (MANT_SIZE + 3) / 4, a_mant);
#elif F_SIZE == 128
    printf("%0*" PRIx64 "%016" PRIx64, 
           ((MANT_SIZE - 64) + 3) / 4, (uint64_t)(a_mant >> 64), (uint64_t)a_mant);
#else
#error unsupported F_SIZE
#endif
}

// Assembly:
pushq %rbx
movq %rdi, %rcx
movabsq $0xfffffffffffff, %rbx  # imm = 0xFFFFFFFFFFFFF
andq %rdi, %rbx
movq %rdi, %rsi
shrq $0x3f, %rsi
shrq $0x34, %rcx
andl $0x7ff, %ecx            # imm = 0x7FF
leaq 0x11e36(%rip), %rdi     # 0x144b2
pushq $0x3
popq %rdx
xorl %eax, %eax
callq 0x1070
leaq 0x11e40(%rip), %rdi     # 0x144cd
pushq $0xd
popq %rsi
movq %rbx, %rdx
xorl %eax, %eax
popq %rbx
jmp 0x1070
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_fma32
void test_fma(F_UINT a, F_UINT b, F_UINT c, RoundingModeEnum rm, int it)
{
#if F_SIZE <= 64
    F_UINT r, ref;
    float_status st;
    uint32_t fflags, ref_fflags;

    fflags = 0;
    r = glue(fma_sf, F_SIZE)(a, b, c, rm, &fflags);
    
    softfloat_init_ctx(&st, rm);

    ref = softfloat_to_sf(glue(glue(float, F_SIZE), _muladd)(
                sf_to_softfloat(a),
                sf_to_softfloat(b),
                sf_to_softfloat(c),
                0, &st));
    ref_fflags = softfloat_to_fflags(&st);

    if (r != ref || ref_fflags != fflags) {
        printf("ERROR op=%s size=%d rm=%s it=%d:\n", 
               "fma", F_SIZE, rm_to_str[rm], it);
        printf("a  = "); print_sf(a); printf("\n");
        printf("b  = "); print_sf(b); printf("\n");
        printf("c  = "); print_sf(c); printf("\n");
        printf("ref= "); print_sf(ref);
        printf(" fflags=0x%02x\n", ref_fflags);
        printf("r  = "); print_sf(r);
        printf(" fflags=0x%02x\n", fflags);
        exit(1);
    }

#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %r8d, 0x4(%rsp)
movl %ecx, %r15d
movl %edx, %r12d
movl %esi, %r14d
movl %edi, %r13d
movq %rsp, %r8
andl $0x0, (%r8)
callq 0x4979
movl %eax, %ebp
leaq 0x10(%rsp), %rbx
andl $0x0, (%rbx)
andw $0x0, 0x4(%rbx)
movl %r15d, %r15d
leaq 0x12263(%rip), %rax     # 0x140d0
movb (%rax,%r15,4), %al
movb %al, 0x1(%rbx)
movb $0x1, 0x6(%rbx)
movl %r13d, %edi
movl %r14d, %esi
movl %r12d, 0x8(%rsp)
movl %r12d, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq 0xae75
movl %eax, %r12d
movq %rbx, %rdi
callq 0x137c
movl %eax, %ebx
movl %ebp, 0xc(%rsp)
cmpl %r12d, %ebp
jne 0x1eba
cmpl (%rsp), %ebx
jne 0x1eba
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x19eff(%rip), %rax     # 0x1bdc0
movq (%rax,%r15,8), %rcx
leaq 0x122ac(%rip), %rdi     # 0x14178
leaq 0x124cd(%rip), %rsi     # 0x143a0
pushq $0x20
popq %rdx
movl 0x4(%rsp), %r8d
xorl %eax, %eax
callq 0x1070
leaq 0x122b1(%rip), %rdi     # 0x1419a
xorl %eax, %eax
callq 0x1070
movl %r13d, %edi
callq 0x1565
pushq $0xa
popq %r15
movl %r15d, %edi
callq 0x1030
leaq 0x12295(%rip), %rdi     # 0x141a0
xorl %eax, %eax
callq 0x1070
movl %r14d, %edi
callq 0x1565
movl %r15d, %edi
callq 0x1030
leaq 0x1247b(%rip), %rdi     # 0x143a4
xorl %eax, %eax
callq 0x1070
movl 0x8(%rsp), %edi
callq 0x1565
movl %r15d, %edi
callq 0x1030
leaq 0x1225e(%rip), %rdi     # 0x141a6
xorl %eax, %eax
callq 0x1070
movl %r12d, %edi
callq 0x1565
leaq 0x1224e(%rip), %r14     # 0x141ac
movq %r14, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x1070
leaq 0x1224b(%rip), %rdi     # 0x141bc
xorl %eax, %eax
callq 0x1070
movl 0xc(%rsp), %edi
callq 0x1565
movl (%rsp), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1070
pushq $0x1
popq %rdi
callq 0x10b0
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_op_all64
void test_op_all(F_UINT a, F_UINT b, RoundingModeEnum rm, int it)
{
    test_op(OP_FADD, a, b, rm, it);
    test_op(OP_FMUL, a, b, rm, it);
    test_op(OP_FDIV, a, b, rm, it);
    test_op(OP_FSQRT, a, b, rm, it);
#if F_SIZE <= 64
    test_op(OP_FMIN, a, b, rm, it);
#endif
#if F_SIZE <= 64
    test_op(OP_FMAX, a, b, rm, it);
#endif
    test_cmp(a, b, it);

#if F_SIZE >= 64
    test_cvt_sf32_sf(a, rm, it);
#endif
#if F_SIZE >= 128
    test_cvt_sf64_sf(a, rm, it);
#endif
    test_cvt_int_sf(a, rm, it);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
xorl %edi, %edi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x2495
pushq $0x1
popq %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x2495
pushq $0x2
popq %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x2495
pushq $0x3
popq %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x2495
pushq $0x4
popq %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x2495
pushq $0x5
popq %rdi
movq %r14, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x2495
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x30ed
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x269b
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2852
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: test_float32
void test_float(int step)
{
    F_UINT a, b, c;
    int rm_count, i, j, k;
    RoundingModeEnum rm;

#ifdef USE_REF_X86
    rm_count = 4;
#else
    rm_count = 5;
#endif
    if (step == 0) {
        /* test all simple cases */
        for(i = 0; i < SPECIAL_COUNT; i++) {
            a = special_sf(i);
            for(j = 0; j < SPECIAL_COUNT; j++) {
                b = special_sf(j);
                for(rm = 0; rm < rm_count; rm++) {
                    test_op_all(a, b, rm, i * SPECIAL_COUNT + j);
                    for(k = 0; k < SPECIAL_COUNT; k++) {
                        c = special_sf(k);
                        test_fma(a, b, c, rm, (i * SPECIAL_COUNT + j) * SPECIAL_COUNT + k);
                    }
                }
            }
        }
    } else {
        for(i = 0; i < 1000; i++) {
            /* Note: we cannot test RM_RMM */
            a = rrandom_sf();
            b = rrandom_sf();
            c = rrandom_sf();
            for(rm = 0; rm < rm_count; rm++) {
                test_op_all(a, b, rm, i);
                test_fma(a, b, c, rm, i);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
xorl %ebx, %ebx
testl %edi, %edi
je 0x2271
cmpl $0x3e8, %ebx            # imm = 0x3E8
je 0x2324
callq 0x1239
movl %eax, %ebp
callq 0x1239
movl %eax, %r14d
xorl %r15d, %r15d
callq 0x1239
movl %eax, %r12d
cmpl $0x5, %r15d
je 0x226d
movl %ebp, %edi
movl %r14d, %esi
movl %r15d, %edx
movl %ebx, %ecx
callq 0x2161
movl %ebp, %edi
movl %r14d, %esi
movl %r12d, %edx
movl %r15d, %ecx
movl %ebx, %r8d
callq 0x1e29
incl %r15d
jmp 0x2240
incl %ebx
jmp 0x221a
xorl %r14d, %r14d
cmpl $0xc, %r14d
je 0x2324
movl %r14d, %edi
callq 0x12aa
movl %eax, %ebp
movl %r14d, (%rsp)
imull $0xc, %r14d, %eax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
movl %ebx, 0x4(%rsp)
movl %ebx, %r14d
cmpl $0xc, %r12d
je 0x230e
movl %r12d, %edi
callq 0x12aa
movl %eax, %r15d
movq 0x8(%rsp), %rax
movq %r12, 0x10(%rsp)
addl %eax, %r12d
xorl %r13d, %r13d
cmpl $0x5, %r13d
je 0x2300
movl %ebp, %edi
movl %r15d, %esi
movl %r13d, %edx
movl %r12d, %ecx
callq 0x2161
xorl %ebx, %ebx
cmpl $0xc, %ebx
je 0x22fb
movl %ebx, %edi
callq 0x12aa
leal (%r14,%rbx), %r8d
movl %ebp, %edi
movl %r15d, %esi
movl %eax, %edx
movl %r13d, %ecx
callq 0x1e29
incl %ebx
jmp 0x22d8
incl %r13d
jmp 0x22c0
movq 0x10(%rsp), %r12
incl %r12d
addl $0xc, %r14d
jmp 0x229f
movl (%rsp), %r14d
incl %r14d
movl 0x4(%rsp), %ebx
addl $0x90, %ebx
jmp 0x2274
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: special_sf128
F_UINT special_sf(int i)
{
    switch(i) {
    case 0: /* zero */
    case 1:
        return pack_sf(i & 1, 0, 0);
    case 2: /* infinity */
    case 3:
        return pack_sf(i & 1, EXP_MASK, 0);
    case 4: /* 1.0 */
    case 5:
        return pack_sf(i & 1, EXP_MASK / 2, 0);
    case 6: /* QNAN */
    case 7:
        return pack_sf(i & 1, EXP_MASK, QNAN_MASK);
    case 8: /* SNAN */
    case 9:
        return pack_sf(i & 1, EXP_MASK, 1);
    case 10: /* subnormal */
    case 11:
        return pack_sf(i & 1, 0, 1);
    default:
        abort();
    }
}

// Assembly:
cmpl $0xb, %edi
ja 0x358c
movl %edi, %eax
leaq 0x10b46(%rip), %rcx     # 0x14070
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shlq $0x3f, %rdi
jmp 0x357d
shlq $0x3f, %rdi
movabsq $0x7fff000000000000, %rax # imm = 0x7FFF000000000000
orq %rax, %rdi
jmp 0x3585
shlq $0x3f, %rdi
movabsq $0x3fff000000000000, %rax # imm = 0x3FFF000000000000
jmp 0x357a
shlq $0x3f, %rdi
movabsq $0x7fff800000000000, %rax # imm = 0x7FFF800000000000
jmp 0x357a
shlq $0x3f, %rdi
movabsq $0x7fff000000000000, %rax # imm = 0x7FFF000000000000
orq %rax, %rdi
xorl %eax, %eax
jmp 0x3588
shlq $0x3f, %rdi
pushq $0x1
popq %rax
movq %rdi, %rdx
retq
pushq %rax
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfptest_template.h
// Function: exec_ref_op128
F_UINT exec_ref_op(uint32_t *pfflags, FloatOpEnum op,
                   F_UINT a, F_UINT b, RoundingModeEnum rm)
{
    F_UINT r;
    float_status st;
    softfloat_float a1, b1, r1;

    softfloat_init_ctx(&st, rm);
    a1 = sf_to_softfloat(a);
    b1 = sf_to_softfloat(b);

    switch(op) {
    case OP_FADD:
        r1 = glue(glue(float, F_SIZE), _add)(a1, b1, &st);
        break;
    case OP_FMUL:
        r1 = glue(glue(float, F_SIZE), _mul)(a1, b1, &st);
        break;
    case OP_FDIV:
        r1 = glue(glue(float, F_SIZE), _div)(a1, b1, &st);
        break;
    case OP_FSQRT:
        r1 = glue(glue(float, F_SIZE), _sqrt)(a1, &st);
        break;
#if F_SIZE <= 64
    case OP_FMIN:
        r1 = glue(glue(float, F_SIZE), _minnum)(a1, b1, &st);
        break;
    case OP_FMAX:
        r1 = glue(glue(float, F_SIZE), _maxnum)(a1, b1, &st);
        break;
#endif
    default:
        abort();
    }
    r = softfloat_to_sf(r1);
    *pfflags = softfloat_to_fflags(&st);
    return r;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl 0x30(%rsp), %eax
andl $0x0, 0x8(%rsp)
andw $0x0, 0xc(%rsp)
leaq 0x10b1c(%rip), %rdi     # 0x140d0
movb (%rdi,%rax,4), %al
movb %al, 0x9(%rsp)
movb $0x1, 0xe(%rsp)
cmpl $0x3, %esi
ja 0x3661
movl %esi, %eax
leaq 0x10ace(%rip), %rsi     # 0x140a0
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
leaq 0x8(%rsp), %rax
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %rax, %r8
callq 0x10df2
jmp 0x363f
leaq 0x8(%rsp), %rax
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %rax, %r8
callq 0x11839
jmp 0x363f
leaq 0x8(%rsp), %rax
movq %rdx, %rdi
movq %rcx, %rsi
movq %rax, %rdx
callq 0x11f63
jmp 0x363f
leaq 0x8(%rsp), %rax
movq %rdx, %rdi
movq %rcx, %rsi
movq %r8, %rdx
movq %r9, %rcx
movq %rax, %r8
callq 0x1128b
movq %rax, %r14
movq %rdx, %r15
leaq 0x8(%rsp), %rdi
callq 0x137c
movl %eax, (%rbx)
movq %r14, %rax
movq %r15, %rdx
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
callq 0x1040
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/softfptest.c
// Function: main
int main(int argc, char **argv)
{
    int seed;

    seed = 1;
    if (argc >= 2)
        seed = atoi(argv[1]);
    srandom(seed);

    printf("Starting softfptest (stop with Ctrl-C)\n");
    test_float32(0);
    test_float64(0);
#ifdef HAVE_INT128
    test_float128(0);
#endif
    for(;;) {
        test_float32(1);
        test_float64(1);
#ifdef HAVE_INT128
        test_float128(1);
#endif
    }
    return 0;
}

// Assembly:
pushq %rbx
cmpl $0x2, %edi
jl 0x45ec
movq 0x8(%rsi), %rdi
callq 0x10a0
movl %eax, %edi
jmp 0x45ef
pushq $0x1
popq %rdi
callq 0x1050
leaq 0xfee4(%rip), %rdi      # 0x144df
callq 0x1060
xorl %edi, %edi
callq 0x2206
xorl %edi, %edi
callq 0x3370
xorl %edi, %edi
callq 0x44d5
pushq $0x1
popq %rbx
movl %ebx, %edi
callq 0x2206
movl %ebx, %edi
callq 0x3370
movl %ebx, %edi
callq 0x44d5
jmp 0x4618
nop
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfp_template.h
// Function: rshift_rnd128
static F_UINT rshift_rnd(F_UINT a, int d)
{
    F_UINT mask;
    if (d != 0) {
        if (d >= F_SIZE) {
            a = (a != 0);
        } else {
            mask = ((F_UINT)1 << d) - 1;
            a = (a >> d) | ((a & mask) != 0);
        }
    }
    return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
testl %edx, %edx
je 0x70d1
cmpl $0x80, %edx
jl 0x7094
xorl %eax, %eax
orq %r14, %rbx
setne %al
xorl %r14d, %r14d
movq %rax, %rbx
jmp 0x70d1
movzbl %dl, %ebp
pushq $-0x1
popq %rdi
movq %rdi, %rsi
movl %ebp, %edx
callq 0x133f0
movq %rax, %r15
movq %rdx, %r12
notq %r15
notq %r12
movq %rbx, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x133a0
andq %r14, %r12
andq %rbx, %r15
xorl %ebx, %ebx
orq %r12, %r15
setne %bl
orq %rax, %rbx
movq %rdx, %r14
movq %rbx, %rax
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfp_template.h
// Function: normalize_sf32
static F_UINT normalize_sf(uint32_t a_sign, int a_exp, F_UINT a_mant,
                           RoundingModeEnum rm, uint32_t *pfflags)
{
    int shift;
    shift = clz(a_mant) - (F_SIZE - 1 - IMANT_SIZE);
    assert(shift >= 0);
    a_exp -= shift;
    a_mant <<= shift;
    return round_pack_sf(a_sign, a_exp, a_mant, rm, pfflags);
}

// Assembly:
movl %ecx, %eax
testl %edx, %edx
je 0x47d5
bsrl %edx, %ecx
xorl $0x1f, %ecx
jmp 0x47d8
pushq $0x20
popq %rcx
testl %ecx, %ecx
je 0x47e9
decl %ecx
subl %ecx, %esi
shll %cl, %edx
movl %eax, %ecx
jmp 0x8c07
pushq %rax
leaq 0xfd15(%rip), %rdi      # 0x14506
leaq 0xfd19(%rip), %rsi      # 0x14511
leaq 0xfd26(%rip), %rcx      # 0x14525
movl $0xb7, %edx
callq 0x1080
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfp_template.h
// Function: sqrt_sf32
F_UINT sqrt_sf(F_UINT a, RoundingModeEnum rm,
               uint32_t *pfflags)
{
    uint32_t a_sign;
    int32_t a_exp;
    F_UINT a_mant;

    a_sign = a >> (F_SIZE - 1);
    a_exp = (a >> MANT_SIZE) & EXP_MASK;
    a_mant = a & MANT_MASK;
    if (a_exp == EXP_MASK) {
        if (a_mant != 0) {
            if (issignan_sf(a)) {
                *pfflags |= FFLAG_INVALID_OP;
            }
            return F_QNAN;
        } else if (a_sign) {
            goto neg_error;
        } else {
            return a; /* +infinity */
        }
    }
    if (a_sign) {
        if (a_exp == 0 && a_mant == 0)
            return a; /* -zero */
    neg_error:
        *pfflags |= FFLAG_INVALID_OP;
        return F_QNAN;
    }
    if (a_exp == 0) {
        if (a_mant == 0)
            return pack_sf(0, 0, 0); /* zero */
        a_mant = normalize_subnormal_sf(&a_exp, a_mant);
    } else {
        a_mant |= (F_UINT)1 << MANT_SIZE;
    }
    a_exp -= EXP_MASK / 2;
    /* simpler to handle an even exponent */
    if (a_exp & 1) {
        a_exp--;
        a_mant <<= 1;
    }
    a_exp = (a_exp >> 1) + EXP_MASK / 2;
    a_mant <<= (F_SIZE - 4 - MANT_SIZE);
    if (sqrtrem_u(&a_mant, a_mant, 0))
        a_mant |= 1;
    return normalize_sf(a_sign, a_exp, a_mant, rm, pfflags);
}

// Assembly:
movq %rdx, %r8
movl %esi, %r9d
movl %edi, %eax
movl %edi, %esi
shrl $0x17, %esi
movl $0xff, %ecx
andl %ecx, %esi
andl $0x7fffff, %edi         # imm = 0x7FFFFF
cmpl %ecx, %esi
jne 0x4f85
testl %edi, %edi
je 0x4f95
movl %eax, %ecx
andl $0x7fc00000, %ecx       # imm = 0x7FC00000
movl $0x7fc00000, %eax       # imm = 0x7FC00000
cmpl $0x7f800000, %ecx       # imm = 0x7F800000
jne 0x4f99
orb $0x10, (%r8)
retq
testl %eax, %eax
js 0x4f9a
testl %esi, %esi
je 0x4fa8
orl $0x800000, %edi         # imm = 0x800000
jmp 0x4fbc
testl %eax, %eax
js 0x4f9e
retq
orl %edi, %esi
je 0x4f99
orb $0x10, (%r8)
movl $0x7fc00000, %eax       # imm = 0x7FC00000
retq
testl %edi, %edi
je 0x5025
bsrl %edi, %ecx
xorl $0x1f, %ecx
pushq $0x9
popq %rsi
subl %ecx, %esi
addb $-0x8, %cl
shll %cl, %edi
leal -0x7f(%rsi), %eax
movl %eax, %ecx
andl $0x1, %ecx
addl $-0x80, %esi
testl %ecx, %ecx
cmovel %eax, %esi
shll %cl, %edi
sarl %esi
addl $0x7f, %esi
shll $0x5, %edi
je 0x5019
leal -0x1(%rdi), %eax
bsrl %eax, %ecx
xorl $-0x20, %ecx
shlq $0x20, %rdi
addl $0x42, %ecx
shrl %ecx
pushq $0x1
popq %rax
shlq %cl, %rax
movq %rax, %rcx
movq %rdi, %rax
xorl %edx, %edx
divq %rcx
addq %rcx, %rax
shrq %rax
cmpq %rcx, %rax
jb 0x4ff0
movq %rcx, %rax
imulq %rcx, %rax
xorl %edx, %edx
cmpq %rax, %rdi
setne %dl
orl %ecx, %edx
jmp 0x501b
xorl %edx, %edx
xorl %edi, %edi
movl %r9d, %ecx
jmp 0x47c7
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfp_template.h
// Function: min_sf32
F_UINT glue(min_sf, F_SIZE)(F_UINT a, F_UINT b, uint32_t *pfflags)
{
    uint32_t a_sign, b_sign;

    if (isnan_sf(a) || isnan_sf(b)) {
        if (issignan_sf(a) || issignan_sf(b)) {
            *pfflags |= FFLAG_INVALID_OP;
            return F_QNAN;
        } else if (isnan_sf(a)) {
            if (isnan_sf(b)) 
                return F_QNAN;
            else
                return b;
        } else {
            return a;
        }
    }
    a_sign = a >> (F_SIZE - 1);
    b_sign = b >> (F_SIZE - 1);

    if (a_sign != b_sign) {
        if (a_sign)
            return a;
        else
            return b;
    } else {
        if ((a < b) ^ a_sign)
            return a;
        else
            return b;
    }
}

// Assembly:
movl %edi, %eax
movl %edi, %ecx
notl %ecx
testl $0x7f800000, %ecx       # imm = 0x7F800000
sete %r8b
testl $0x7fffff, %edi         # imm = 0x7FFFFF
setne %dil
movl %esi, %ecx
notl %ecx
andb %r8b, %dil
jne 0x5078
testl $0x7f800000, %ecx       # imm = 0x7F800000
setne %r8b
testl $0x7fffff, %esi         # imm = 0x7FFFFF
sete %r9b
orb %r8b, %r9b
je 0x5078
movl %esi, %ecx
xorl %eax, %ecx
js 0x50e5
testl %eax, %eax
sets %cl
cmpl %esi, %eax
setae %dl
xorb %cl, %dl
jmp 0x50e1
testl $0x7fffff, %eax         # imm = 0x7FFFFF
setne %r8b
movl %eax, %r9d
andl $0x7fc00000, %r9d       # imm = 0x7FC00000
cmpl $0x7f800000, %r9d       # imm = 0x7F800000
sete %r9b
testb %r8b, %r9b
jne 0x50bf
movl %esi, %r8d
andl $0x7fc00000, %r8d       # imm = 0x7FC00000
cmpl $0x7f800000, %r8d       # imm = 0x7F800000
setne %r8b
testl $0x7fffff, %esi         # imm = 0x7FFFFF
sete %r9b
orb %r8b, %r9b
jne 0x50c8
orb $0x10, (%rdx)
movl $0x7fc00000, %eax       # imm = 0x7FC00000
retq
testb %dil, %dil
je 0x50e4
testl $0x7fffff, %esi         # imm = 0x7FFFFF
movl $0x7fc00000, %eax       # imm = 0x7FC00000
cmovel %esi, %eax
testl $0x7f800000, %ecx       # imm = 0x7F800000
cmovnel %esi, %eax
retq
testl %eax, %eax
cmovnsl %esi, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfp_template.h
// Function: eq_quiet_sf32
BOOL isnan_sf(F_UINT a)
{
    uint32_t a_exp;
    F_UINT a_mant;
    a_exp = (a >> MANT_SIZE) & EXP_MASK;
    a_mant = a & MANT_MASK;
    return (a_exp == EXP_MASK && a_mant != 0);
}

// Assembly:
movl %edi, %eax
notl %eax
testl $0x7f800000, %eax       # imm = 0x7F800000
sete %al
testl $0x7fffff, %edi         # imm = 0x7FFFFF
setne %cl
testb %cl, %al
jne 0x51f5
movl %esi, %eax
notl %eax
testl $0x7f800000, %eax       # imm = 0x7F800000
setne %al
testl $0x7fffff, %esi         # imm = 0x7FFFFF
sete %cl
orb %al, %cl
je 0x51f5
movl %esi, %eax
orl %edi, %eax
testl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
je 0x5238
xorl %eax, %eax
cmpl %esi, %edi
sete %al
retq
testl $0x7fffff, %edi         # imm = 0x7FFFFF
setne %al
andl $0x7fc00000, %edi       # imm = 0x7FC00000
cmpl $0x7f800000, %edi       # imm = 0x7F800000
sete %cl
testb %al, %cl
jne 0x5232
movl %esi, %eax
andl $0x7fc00000, %eax       # imm = 0x7FC00000
cmpl $0x7f800000, %eax       # imm = 0x7F800000
setne %cl
testl $0x7fffff, %esi         # imm = 0x7FFFFF
sete %sil
xorl %eax, %eax
orb %cl, %sil
je 0x5232
retq
orb $0x10, (%rdx)
xorl %eax, %eax
retq
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfp_template_icvt.h
// Function: internal_cvt_i64_sf32
static F_UINT glue(glue(glue(internal_cvt_i, ICVT_SIZE), _sf), F_SIZE)(ICVT_INT a, 
                                                                       RoundingModeEnum rm,
                                                                       uint32_t *pfflags,
                                                                       BOOL is_unsigned)
{
    uint32_t a_sign;
    int32_t a_exp;
    F_UINT a_mant;
    ICVT_UINT r, mask;
    int l;

    if (!is_unsigned && a < 0) {
        a_sign = 1;
        r = -(ICVT_UINT)a;
    } else {
        a_sign = 0;
        r = a;
    }
    a_exp = (EXP_MASK / 2) + F_SIZE - 2;
    /* need to reduce range before generic float normalization */
    l = ICVT_SIZE - glue(clz, ICVT_SIZE)(r) - (F_SIZE - 1);
    if (l > 0) {
        mask = r & (((ICVT_UINT)1 << l) - 1);
        r = (r >> l) | ((r & mask) != 0);
        a_exp += l;
    }
    a_mant = r;
    return normalize_sf(a_sign, a_exp, a_mant, rm, pfflags);
}

// Assembly:
movq %rdx, %r8
movl %esi, %eax
testl %ecx, %ecx
sete %cl
testq %rdi, %rdi
sets %r9b
andb %cl, %r9b
movq %rdi, %rdx
negq %rdx
testb %r9b, %r9b
cmoveq %rdi, %rdx
movl $0x9d, %esi
testq $-0x80000000, %rdx      # imm = 0x80000000
je 0x5627
bsrq %rdx, %rdi
xorq $0x3f, %rdi
movb $0x21, %cl
subb %dil, %cl
pushq $-0x1
popq %rsi
shlq %cl, %rsi
movq %rdx, %r10
shrq %cl, %r10
notq %rsi
xorl %ecx, %ecx
testq %rsi, %rdx
setne %cl
orq %r10, %rcx
movl $0xbe, %esi
subl %edi, %esi
movq %rcx, %rdx
movzbl %r9b, %edi
movl %eax, %ecx
jmp 0x47c7
// File: /workspace/github_c_makefile_star2_O2/mbitsnbites[P]SoftFP/./softfp_template.h
// Function: eq_quiet_sf64
int glue(eq_quiet_sf, F_SIZE)(F_UINT a, F_UINT b, uint32_t *pfflags)
{
    if (isnan_sf(a) || isnan_sf(b)) {
        if (issignan_sf(a) || issignan_sf(b)) {
            *pfflags |= FFLAG_INVALID_OP;
        }
        return 0;
    }

    if ((F_UINT)((a | b) << 1) == 0)
        return 1; /* zero case */
    return (a == b);
}

// Assembly:
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
movabsq $0xfffffffffffff, %rax  # imm = 0xFFFFFFFFFFFFF
movq %rdi, %r8
notq %r8
testq %rcx, %r8
sete %r8b
movq %rdi, %r9
shlq $0xc, %r9
setne %r9b
testb %r9b, %r8b
jne 0x66aa
movq %rsi, %r8
notq %r8
testq %r8, %rcx
setne %r8b
testq %rax, %rsi
sete %r9b
orb %r8b, %r9b
je 0x66aa
movq %rsi, %rax
orq %rdi, %rax
shlq %rax
testq %rax, %rax
je 0x66e8
xorl %eax, %eax
cmpq %rsi, %rdi
sete %al
retq
testq %rax, %rdi
setne %r9b
movabsq $0x7ff8000000000000, %r8 # imm = 0x7FF8000000000000
andq %r8, %rdi
cmpq %rcx, %rdi
sete %dil
testb %r9b, %dil
jne 0x66e2
andq %rsi, %r8
cmpq %rcx, %r8
setne %cl
testq %rax, %rsi
sete %sil
xorl %eax, %eax
orb %cl, %sil
je 0x66e2
retq
orb $0x10, (%rdx)
xorl %eax, %eax
retq
pushq $0x1
popq %rax
retq