LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.c
// Function: dmat4x4transform
dvec4_t dmat4x4transform(dmat4x4_t m,dvec4_t v)
{
	return dvec4(
	v.x*m.m[0]+v.y*m.m[4]+v.z*m.m[8]+v.w*m.m[12],
	v.x*m.m[1]+v.y*m.m[5]+v.z*m.m[9]+v.w*m.m[13],
	v.x*m.m[2]+v.y*m.m[6]+v.z*m.m[10]+v.w*m.m[14],
	v.x*m.m[3]+v.y*m.m[7]+v.z*m.m[11]+v.w*m.m[15]);
}

// Assembly:
movsd 0x88(%rsp), %xmm1
movsd 0x90(%rsp), %xmm0
movsd 0x8(%rsp), %xmm5
movsd 0x28(%rsp), %xmm3
mulsd %xmm1, %xmm5
mulsd %xmm0, %xmm3
movsd 0x98(%rsp), %xmm6
movsd 0x48(%rsp), %xmm7
movsd 0xa0(%rsp), %xmm2
movsd 0x68(%rsp), %xmm4
mulsd %xmm6, %xmm7
mulsd %xmm2, %xmm4
movsd 0x10(%rsp), %xmm10
movsd 0x30(%rsp), %xmm8
mulsd %xmm1, %xmm10
mulsd %xmm0, %xmm8
movsd 0x50(%rsp), %xmm11
movsd 0x70(%rsp), %xmm9
mulsd %xmm6, %xmm11
mulsd %xmm2, %xmm9
movsd 0x18(%rsp), %xmm14
movsd 0x38(%rsp), %xmm12
mulsd %xmm1, %xmm14
mulsd %xmm0, %xmm12
movsd 0x58(%rsp), %xmm15
movsd 0x78(%rsp), %xmm13
mulsd %xmm6, %xmm15
mulsd %xmm2, %xmm13
mulsd 0x20(%rsp), %xmm1
mulsd 0x40(%rsp), %xmm0
mulsd 0x60(%rsp), %xmm6
mulsd 0x80(%rsp), %xmm2
addsd %xmm5, %xmm3
addsd %xmm7, %xmm4
addsd %xmm10, %xmm8
addsd %xmm11, %xmm9
addsd %xmm14, %xmm12
addsd %xmm15, %xmm13
addsd %xmm1, %xmm0
addsd %xmm6, %xmm2
addsd %xmm3, %xmm4
addsd %xmm8, %xmm9
addsd %xmm12, %xmm13
addsd %xmm0, %xmm2
movq %rdi, %rax
movsd %xmm4, (%rdi)
movsd %xmm9, 0x8(%rdi)
movsd %xmm13, 0x10(%rdi)
movsd %xmm2, 0x18(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.c
// Function: dmat3x3transformvec2
dvec2_t dmat3x3transformvec2(dmat3x3_t m,dvec2_t v)
{
	double z=v.x*m.m[2]+v.y*m.m[5]+m.m[8];
	return dvec2(
	(v.x*m.m[0]+v.y*m.m[3]+m.m[6])/z,
	(v.x*m.m[1]+v.y*m.m[4]+m.m[7])/z);
}

// Assembly:
movsd 0x18(%rsp), %xmm2
movsd 0x30(%rsp), %xmm3
mulsd %xmm0, %xmm2
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
addsd 0x48(%rsp), %xmm3
movsd 0xa27(%rip), %xmm4      # 0xe050
divsd %xmm3, %xmm4
movsd 0x8(%rsp), %xmm3
movsd 0x20(%rsp), %xmm2
mulsd %xmm0, %xmm3
mulsd %xmm1, %xmm2
mulsd 0x10(%rsp), %xmm0
mulsd 0x28(%rsp), %xmm1
addsd %xmm3, %xmm2
addsd %xmm0, %xmm1
addsd 0x38(%rsp), %xmm2
addsd 0x40(%rsp), %xmm1
mulsd %xmm4, %xmm2
mulsd %xmm4, %xmm1
movapd %xmm2, %xmm0
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Vector/MatrixDouble.c
// Function: dmat4x4transformvec3
dvec3_t dmat4x4transformvec3(dmat4x4_t m,dvec3_t v)
{
	double w=v.x*m.m[3]+v.y*m.m[7]+v.z*m.m[11]+m.m[15];
	return dvec3(
	(v.x*m.m[0]+v.y*m.m[4]+v.z*m.m[8]+m.m[12])/w,
	(v.x*m.m[1]+v.y*m.m[5]+v.z*m.m[9]+m.m[13])/w,
	(v.x*m.m[2]+v.y*m.m[6]+v.z*m.m[10]+m.m[14])/w);
}

// Assembly:
movsd 0x88(%rsp), %xmm2
movsd 0x90(%rsp), %xmm1
movsd 0x20(%rsp), %xmm3
movsd 0x40(%rsp), %xmm4
mulsd %xmm2, %xmm3
mulsd %xmm1, %xmm4
movsd 0x98(%rsp), %xmm0
movsd 0x60(%rsp), %xmm5
addsd %xmm3, %xmm4
mulsd %xmm0, %xmm5
addsd %xmm4, %xmm5
addsd 0x80(%rsp), %xmm5
movsd 0x990(%rip), %xmm3      # 0xe050
divsd %xmm5, %xmm3
movsd 0x8(%rsp), %xmm5
movsd 0x28(%rsp), %xmm4
mulsd %xmm2, %xmm5
mulsd %xmm1, %xmm4
movsd 0x10(%rsp), %xmm6
movsd 0x30(%rsp), %xmm7
mulsd %xmm2, %xmm6
mulsd %xmm1, %xmm7
mulsd 0x18(%rsp), %xmm2
mulsd 0x38(%rsp), %xmm1
addsd %xmm5, %xmm4
movsd 0x48(%rsp), %xmm5
addsd %xmm6, %xmm7
mulsd %xmm0, %xmm5
addsd %xmm2, %xmm1
movsd 0x50(%rsp), %xmm2
mulsd %xmm0, %xmm2
mulsd 0x58(%rsp), %xmm0
addsd %xmm4, %xmm5
addsd %xmm7, %xmm2
addsd %xmm1, %xmm0
addsd 0x68(%rsp), %xmm5
addsd 0x70(%rsp), %xmm2
addsd 0x78(%rsp), %xmm0
mulsd %xmm3, %xmm5
mulsd %xmm3, %xmm2
mulsd %xmm3, %xmm0
movq %rdi, %rax
movsd %xmm5, (%rdi)
movsd %xmm2, 0x8(%rdi)
movsd %xmm0, 0x10(%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Vector/Quaternion.c
// Function: mat3x3quat
mat3x3_t mat3x3quat(quat_t q)
{
	float s2=q.r*q.r;
	float x2=q.i.x*q.i.x;
	float y2=q.i.y*q.i.y;
	float z2=q.i.z*q.i.z;

	return mat3x3(
	s2+x2-y2-z2,
	2*(q.i.x*q.i.y-q.r*q.i.z),
	2*(q.i.x*q.i.z+q.r*q.i.y),

	2*(q.i.x*q.i.y+q.r*q.i.z),
	s2-x2+y2-z2,
	2*(q.i.y*q.i.z-q.r*q.i.x),

	2*(q.i.x*q.i.z-q.r*q.i.y),
	2*(q.i.y*q.i.z+q.r*q.i.x),
	s2-x2-y2+z2);
}

// Assembly:
movaps %xmm0, %xmm2
mulss %xmm0, %xmm2
movshdup %xmm0, %xmm7            # xmm7 = xmm0[1,1,3,3]
movshdup %xmm1, %xmm10           # xmm10 = xmm1[1,1,3,3]
movaps %xmm1, %xmm9
mulss %xmm7, %xmm9
movaps %xmm10, %xmm3
mulss %xmm7, %xmm3
movaps %xmm7, %xmm12
mulss %xmm7, %xmm12
movaps %xmm1, %xmm8
movaps %xmm10, %xmm4
movaps %xmm10, %xmm5
mulss %xmm1, %xmm8
mulss %xmm10, %xmm5
movaps %xmm2, %xmm6
mulss %xmm0, %xmm4
movaps %xmm1, %xmm11
subss %xmm12, %xmm2
mulss %xmm10, %xmm1
mulss %xmm0, %xmm11
mulss %xmm7, %xmm0
addss %xmm12, %xmm6
movaps %xmm5, %xmm13
movaps %xmm9, %xmm7
addss %xmm8, %xmm13
subss %xmm4, %xmm7
movaps %xmm3, %xmm10
movaps %xmm2, %xmm12
addss %xmm9, %xmm4
addss %xmm8, %xmm12
movaps %xmm1, %xmm9
subss %xmm11, %xmm3
subss %xmm0, %xmm9
addss %xmm1, %xmm0
addss %xmm11, %xmm10
subss %xmm8, %xmm2
subss %xmm13, %xmm6
addss %xmm4, %xmm4
addss %xmm7, %xmm7
addss %xmm3, %xmm3
subss %xmm5, %xmm12
addss %xmm0, %xmm0
movq %rdi, %rax
addss %xmm10, %xmm10
addss %xmm5, %xmm2
addss %xmm9, %xmm9
movss %xmm6, (%rdi)
movss %xmm4, 0x4(%rdi)
movss %xmm3, 0x8(%rdi)
movss %xmm7, 0xc(%rdi)
movss %xmm12, 0x10(%rdi)
movss %xmm0, 0x14(%rdi)
movss %xmm10, 0x18(%rdi)
movss %xmm9, 0x1c(%rdi)
movss %xmm2, 0x20(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/halcy[P]quasi_crystals_bot/Vector/QuaternionDouble.c
// Function: dmat3x3quat
dmat3x3_t dmat3x3quat(dquat_t q)
{
	double s2=q.r*q.r;
	double x2=q.i.x*q.i.x;
	double y2=q.i.y*q.i.y;
	double z2=q.i.z*q.i.z;

	return dmat3x3(
	s2+x2-y2-z2,
	2*(q.i.x*q.i.y-q.r*q.i.z),
	2*(q.i.x*q.i.z+q.r*q.i.y),

	2*(q.i.x*q.i.y+q.r*q.i.z),
	s2-x2+y2-z2,
	2*(q.i.y*q.i.z-q.r*q.i.x),

	2*(q.i.x*q.i.z-q.r*q.i.y),
	2*(q.i.y*q.i.z+q.r*q.i.x),
	s2-x2-y2+z2);
}

// Assembly:
movsd 0x10(%rsp), %xmm1
movsd 0x8(%rsp), %xmm5
movapd %xmm1, %xmm8
movapd %xmm5, %xmm0
mulsd %xmm1, %xmm8
mulsd %xmm5, %xmm0
movsd 0x20(%rsp), %xmm4
movapd %xmm4, %xmm2
mulsd %xmm5, %xmm2
movsd 0x18(%rsp), %xmm7
movapd %xmm7, %xmm6
movapd %xmm8, %xmm3
addsd %xmm0, %xmm3
subsd %xmm8, %xmm0
mulsd %xmm7, %xmm6
movapd %xmm7, %xmm13
movapd %xmm4, %xmm8
mulsd %xmm1, %xmm13
mulsd %xmm4, %xmm8
movapd %xmm4, %xmm9
mulsd %xmm1, %xmm9
mulsd %xmm7, %xmm4
mulsd %xmm5, %xmm7
movapd %xmm0, %xmm10
mulsd %xmm5, %xmm1
addsd %xmm6, %xmm10
movapd %xmm6, %xmm14
movapd %xmm13, %xmm11
addsd %xmm8, %xmm14
subsd %xmm2, %xmm11
movapd %xmm9, %xmm12
addsd %xmm13, %xmm2
movapd %xmm4, %xmm5
subsd %xmm7, %xmm9
subsd %xmm1, %xmm5
addsd %xmm4, %xmm1
addsd %xmm7, %xmm12
subsd %xmm6, %xmm0
subsd %xmm14, %xmm3
addsd %xmm2, %xmm2
addsd %xmm11, %xmm11
addsd %xmm9, %xmm9
subsd %xmm8, %xmm10
addsd %xmm1, %xmm1
movq %rdi, %rax
addsd %xmm12, %xmm12
addsd %xmm5, %xmm5
addsd %xmm8, %xmm0
movsd %xmm3, (%rdi)
movsd %xmm2, 0x8(%rdi)
movsd %xmm9, 0x10(%rdi)
movsd %xmm11, 0x18(%rdi)
movsd %xmm10, 0x20(%rdi)
movsd %xmm1, 0x28(%rdi)
movsd %xmm12, 0x30(%rdi)
movsd %xmm5, 0x38(%rdi)
movsd %xmm0, 0x40(%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/canboat[P]canboat/socketcan-writer/socketcan-writer.c
// Function: time_diff
unsigned long time_diff(struct timeval x, struct timeval y, char *timestamp)
{
  double x_ms, y_ms, diff;

  x_ms = (double) x.tv_sec * 1000000 + (double) x.tv_usec;
  y_ms = (double) y.tv_sec * 1000000 + (double) y.tv_usec;

  diff = (double) y_ms - (double) x_ms;
  if (diff < 0.0)
  {
    logError("Timestamp back in time at %s\n", timestamp);
    return 0;
  }

  return (unsigned long) diff;
}

// Assembly:
pushq %rbx
cvtsi2sd %rdi, %xmm1
cvtsi2sd %rsi, %xmm0
movsd 0x2791(%rip), %xmm2     # 0x5008
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
cvtsi2sd %rcx, %xmm3
mulsd %xmm2, %xmm0
addsd %xmm3, %xmm0
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
jbe 0x28b7
leaq 0x27c3(%rip), %rdi      # 0x506c
xorl %ebx, %ebx
movq %r8, %rsi
xorl %eax, %eax
callq 0x2bb8
jmp 0x28d6
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x2745(%rip), %xmm0     # 0x5010
cvttsd2si %xmm0, %rbx
andq %rcx, %rbx
orq %rax, %rbx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_test_fib.c
// Function: producer
int producer(void *ctx)
{
	printf("producer\n"); //DELETEME
	struct spsc_queue *q = (struct spsc_queue *) ctx;
	
	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();
	
		/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();
	
	/* Enqueue */
	for (unsigned long count = 0, n1 = 0, n2 = 1; count < N; count++) {
		fibs[count] = n1 + n2;
		
		void *fibptr = (void *) &fibs[count];
		
		if (!spsc_queue_push(q, fibptr)) {
			printf("Queue push failed at count %lu, %d, free slots %d\n", count, 1<<20, spsc_queue_available(q));
			return -1;
		}
		
		n1 = n2; n2 = fibs[count];
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbp
leaq 0xe8b(%rip), %rdi       # 0x20a7
callq 0x1040
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movslq %eax, %rbx
imulq $0x10624dd3, %rbx, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %ebx
cmpl $0x0, 0x2e45(%rip)      # 0x40a0
jne 0x1264
callq 0x1070
jmp 0x1254
testl %ebx, %ebx
je 0x1272
movslq %ebx, %rax
pause
decq %rax
jne 0x126b
movl $0x1, %r15d
movb $0x1, %r14b
leaq 0x2e2e(%rip), %r13      # 0x40b0
xorl %ebx, %ebx
xorl %r12d, %r12d
movq %rbp, 0x8(%rsp)
leal (%r15,%rbx), %eax
movl %eax, (%r13)
movq %r13, 0x10(%rsp)
movl $0x1, %edx
movq %rbp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x1774
movq %rbp, %rdi
movl %eax, %ebp
testl %eax, %eax
je 0x12bd
movq %r15, %rbx
movl (%r13), %r15d
jmp 0x12da
callq 0x1750
leaq 0xd3b(%rip), %rdi       # 0x2004
movq %r12, %rsi
movl $0x100000, %edx         # imm = 0x100000
movl %eax, %ecx
xorl %eax, %eax
callq 0x1060
testl %ebp, %ebp
movq 0x8(%rsp), %rbp
je 0x1302
cmpq $0x1312cff, %r12        # imm = 0x1312CFF
leaq 0x1(%r12), %rax
setb %r14b
addq $0x4, %r13
movq %rax, %r12
cmpq $0x1312d00, %rax        # imm = 0x1312D00
jne 0x128c
movzbl %r14b, %eax
andl $0x1, %eax
negl %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_test_fib.c
// Function: consumer
int consumer(void *ctx)
{
	printf("consumer\n"); 	//DELETEME
	struct spsc_queue *q = (struct spsc_queue *) ctx;
	
	srand((unsigned) time(0) + thread_get_id());
	size_t pause = rand() % 1000;

	/* Wait for global start signal */
	while (g_start == 0)
		thrd_yield();
	
	/* Wait for a random time */
	for (size_t i = 0; i != pause; i += 1)
		nop();
	
	/* Dequeue */
	for (unsigned long count = 0, n1 = 0, n2 = 1; count < N; count++) {
		int fib = n1 + n2;
		int *pulled;
		
		while (!spsc_queue_pull(q, (void **) &pulled)) {
			//printf("Queue empty: %d\n", temp);
			//return -1;
		}
		
		if (*pulled != fib) {
			printf("Pulled != fib\n");
			return -1;
		}		
		
		n1 = n2; n2 = fib;
	}
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0xd7e(%rip), %rdi       # 0x20b0
callq 0x1040
xorl %edi, %edi
callq 0x1090
leal -0x1(%rax), %edi
callq 0x1080
callq 0x10f0
movslq %eax, %r14
imulq $0x10624dd3, %r14, %rax # imm = 0x10624DD3
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x26, %rax
addl %ecx, %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
subl %eax, %r14d
cmpl $0x0, 0x2d2e(%rip)      # 0x40a0
jne 0x137b
callq 0x1070
jmp 0x136b
testl %r14d, %r14d
je 0x138a
movslq %r14d, %rax
pause
decq %rax
jne 0x1383
movl $0x1, %ecx
movb $0x1, 0x7(%rsp)
xorl %edx, %edx
leaq 0x18(%rsp), %r13
leaq 0x20(%rsp), %r14
xorl %r15d, %r15d
movq %rcx, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
leaq (%rcx,%rdx), %r12
movq %r13, 0x20(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17e2
testl %eax, %eax
je 0x13b1
movq 0x18(%rsp), %rax
movl (%rax), %ebp
cmpl %r12d, %ebp
jne 0x13e0
movq 0x8(%rsp), %rdx
movslq %r12d, %rcx
jmp 0x13f6
leaq 0xcd2(%rip), %rdi       # 0x20b9
callq 0x1040
movq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rdx
cmpl %r12d, %ebp
jne 0x1416
cmpq $0x1312cff, %r15        # imm = 0x1312CFF
leaq 0x1(%r15), %rax
setb 0x7(%rsp)
movq %rax, %r15
cmpq $0x1312d00, %rax        # imm = 0x1312D00
jne 0x13a3
movzbl 0x7(%rsp), %eax
andl $0x1, %eax
negl %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_test_fib.c
// Function: test_single_threaded
int test_single_threaded(struct spsc_queue *q)
{
	int resp, resc;
	g_start = 1;
	resp = producer(q);
	if (resp)
		printf("Enqueuing failed\n");
	
	resc = consumer(q);
	if (resc)
		printf("Consumer failed\n");
	
	if (resc || resp)
		printf("Single Thread Test Failed\n");
	else
		printf("Single Thread Test Complete\n");
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x1, 0x2c60(%rip)      # 0x40a0
callq 0x1204
movl %eax, %ebx
testl %eax, %eax
je 0x1457
leaq 0xc75(%rip), %rdi       # 0x20c7
callq 0x1040
movq %r14, %rdi
callq 0x131a
movl %eax, %ebp
testl %eax, %eax
je 0x1471
leaq 0xc6c(%rip), %rdi       # 0x20d8
callq 0x1040
orl %ebx, %ebp
leaq 0xc6e(%rip), %rax       # 0x20e8
leaq 0xc83(%rip), %rdi       # 0x2104
cmoveq %rax, %rdi
callq 0x1040
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_test_fib.c
// Function: test_multi_threaded
int test_multi_threaded(struct spsc_queue *q)
{
	thrd_t thrp, thrc;
	int resp, resc;
	
	g_start = 0;
	
	thrd_create(&thrp, consumer, q);	/** @todo Why producer thread runs earlier? */
	thrd_create(&thrc, producer, q);
	
	sleep(1);

	uint64_t start_tsc_time, end_tsc_time;

	start_tsc_time = rdtscp();
	g_start = 1;

	thrd_join(thrp, &resp);
	thrd_join(thrc, &resc);
	
	end_tsc_time = rdtscp();

	if (resc || resp)
		printf("Queue Test failed\n");
	else
		printf("Two-thread Test Complete\n");

	printf("cycles/op for rdtsc %lu\n", (end_tsc_time - start_tsc_time)/N);

	size_t used = spsc_queue_available(q);
	if (spsc_queue_available(q) != q->capacity)
		printf("%zu slots in use? There is something wrong with the test\n", used);
	
	int ret = spsc_queue_destroy(q);
	if (ret)
		printf("Failed to destroy queue: %d\n", ret);
	
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl $0x0, 0x2bf4(%rip)      # 0x40a0
leaq -0x199(%rip), %rdx      # 0x131a
leaq 0x10(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x10c0
leaq -0x2c8(%rip), %rdx      # 0x1204
leaq 0x8(%rsp), %r12
movq %r12, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x10c0
movl $0x1, %edi
callq 0x10e0
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, %r14
movl $0x1, 0x2ba2(%rip)      # 0x40a0
movq (%r15), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x10d0
movq (%r15), %r13
movq (%r12), %rdi
movq %rsp, %r15
movq %r15, %rsi
callq 0x10d0
orl (%r15), %r13d
leaq 0xc0f(%rip), %rax       # 0x2137
leaq 0xbef(%rip), %rdi       # 0x211e
cmovneq %rax, %rdi
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, %r15
callq 0x1040
subq %r14, %r15
movabsq $-0x29406b2a1a85bd43, %rcx # imm = 0xD6BF94D5E57A42BD
movq %r15, %rax
mulq %rcx
shrq $0x18, %rdx
leaq 0xad5(%rip), %rdi       # 0x2037
movq %rdx, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1750
movl %eax, %ebp
movq %rbx, %rdi
callq 0x1750
cltq
cmpq %rax, 0x48(%rbx)
je 0x1597
movslq %ebp, %rsi
leaq 0xac0(%rip), %rdi       # 0x2050
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1637
testl %eax, %eax
je 0x15b3
leaq 0xae0(%rip), %rdi       # 0x208a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_queue.c
// Function: spsc_queue_init
struct spsc_queue * spsc_queue_init(struct spsc_queue * q, size_t size, const struct memtype *mem)
{
	/* Queue size must be 2 exponent */
	if ((size < 2) || ((size & (size - 1)) != 0))
		return NULL;
	
	q = memory_alloc(mem, sizeof(struct spsc_queue) + (sizeof(q->pointers[0]) * size));
	if (!q)
		return NULL;
	
	q->mem = mem;
	
	q->capacity = size - 1;

	atomic_init(&q->_tail, 0);
	atomic_init(&q->_head, 0);

	return q;
}

// Assembly:
cmpq $0x2, %rsi
jae 0x15ed
xorl %eax, %eax
retq
pushq %r14
pushq %rbx
pushq %rax
leaq -0x1(%rsi), %r14
testq %r14, %rsi
jne 0x162d
movq %rdx, %rbx
leaq 0x98(,%rsi,8), %rsi
movq %rdx, %rdi
callq 0x18d4
movq %rax, %rcx
xorl %eax, %eax
testq %rcx, %rcx
je 0x162f
movq %rbx, 0x40(%rcx)
movq %r14, 0x48(%rcx)
movl %eax, 0x50(%rcx)
movl %eax, 0x94(%rcx)
movq %rcx, %rax
jmp 0x162f
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_queue.c
// Function: spsc_queue_get_many
int spsc_queue_get_many(struct spsc_queue *q, void **ptrs[], size_t cnt)
{
	if (q->capacity <= spsc_queue_available(q))
		cnt = 0;
	else if (cnt > q->capacity - spsc_queue_available(q))
		cnt = q->capacity - spsc_queue_available(q);
	
	/**@todo Is atomic_load_explicit needed here for loading q->_head? */
	for (int i = 0; i < cnt; i++)
		ptrs[i] = &(q->pointers[q->_head % (q->capacity + 1)]);
	
	return cnt;
}

// Assembly:
movq %rdx, %rcx
movq 0x48(%rdi), %rax
movl 0x50(%rdi), %r8d
movl 0x94(%rdi), %r9d
movl 0x94(%rdi), %edx
cmpl %r9d, %r8d
jge 0x169a
movl 0x50(%rdi), %r8d
notl %r8d
addl %r8d, %edx
jmp 0x16a4
movl 0x50(%rdi), %r8d
subl %r8d, %edx
addl 0x48(%rdi), %edx
movslq %edx, %rdx
cmpq %rdx, %rax
jbe 0x16d2
movq 0x48(%rdi), %rax
movl 0x50(%rdi), %r8d
movl 0x94(%rdi), %r9d
movl 0x94(%rdi), %edx
cmpl %r9d, %r8d
jge 0x16d6
movl 0x50(%rdi), %r8d
notl %r8d
addl %r8d, %edx
jmp 0x16e0
xorl %ecx, %ecx
jmp 0x171a
movl 0x50(%rdi), %r8d
subl %r8d, %edx
addl 0x48(%rdi), %edx
movslq %edx, %rdx
subq %rdx, %rax
cmpq %rcx, %rax
jae 0x171a
movq 0x48(%rdi), %rcx
movl 0x50(%rdi), %edx
movl 0x94(%rdi), %r8d
movl 0x94(%rdi), %eax
cmpl %r8d, %edx
jge 0x170d
movl 0x50(%rdi), %edx
notl %edx
addl %edx, %eax
jmp 0x1715
movl 0x50(%rdi), %edx
subl %edx, %eax
addl 0x48(%rdi), %eax
cltq
subq %rax, %rcx
testq %rcx, %rcx
je 0x174d
leaq 0x98(%rdi), %r8
xorl %r9d, %r9d
movl 0x94(%rdi), %eax
cltq
movq 0x48(%rdi), %r10
incq %r10
xorl %edx, %edx
divq %r10
leaq (%r8,%rdx,8), %rax
movq %rax, (%rsi,%r9,8)
incq %r9
cmpq %r9, %rcx
jne 0x1729
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_queue.c
// Function: spsc_queue_available
int spsc_queue_available(struct spsc_queue *q)
{
	if (atomic_load_explicit(&q->_tail, memory_order_acquire) < atomic_load_explicit(&q->_head, memory_order_acquire))
		return q->_head - q->_tail - 1;
	else
		return q->_head + (q->capacity - q->_tail);
}

// Assembly:
movl 0x50(%rdi), %ecx
movl 0x94(%rdi), %edx
movl 0x94(%rdi), %eax
cmpl %edx, %ecx
jge 0x176b
movl 0x50(%rdi), %ecx
notl %ecx
addl %ecx, %eax
retq
movl 0x50(%rdi), %ecx
subl %ecx, %eax
addl 0x48(%rdi), %eax
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_queue.c
// Function: spsc_queue_push_many
int spsc_queue_push_many(struct spsc_queue *q, void *ptrs[], size_t cnt)
{
	//int free_slots = q->_tail < q->_head ? q->_head - q->_tail - 1 : q->_head + (q->capacity - q->_tail);
	size_t free_slots = spsc_queue_available(q);
	
	if (cnt > free_slots)
		cnt = free_slots;
	
	for (size_t i = 0; i < cnt; i++) {
		q->pointers[q->_tail] = ptrs[i];
		atomic_store_explicit(&q->_tail, (q->_tail + 1)%(q->capacity + 1), memory_order_release);
	}
	
	return cnt;
}

// Assembly:
movq %rdx, %rcx
movl 0x50(%rdi), %edx
movl 0x94(%rdi), %r8d
movl 0x94(%rdi), %eax
cmpl %r8d, %edx
jge 0x1795
movl 0x50(%rdi), %edx
notl %edx
addl %edx, %eax
jmp 0x179d
movl 0x50(%rdi), %edx
subl %edx, %eax
addl 0x48(%rdi), %eax
cltq
cmpq %rcx, %rax
cmovbq %rax, %rcx
testq %rcx, %rcx
je 0x17df
xorl %r8d, %r8d
movq (%rsi,%r8,8), %rax
movl 0x50(%rdi), %edx
movslq %edx, %rdx
movq %rax, 0x98(%rdi,%rdx,8)
movl 0x50(%rdi), %eax
cltq
incq %rax
movq 0x48(%rdi), %r9
incq %r9
xorl %edx, %edx
divq %r9
movl %edx, 0x50(%rdi)
incq %r8
cmpq %r8, %rcx
jne 0x17ae
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/stv0g[P]c11-queues/spsc_queue.c
// Function: spsc_queue_pull_many
int spsc_queue_pull_many(struct spsc_queue *q, void **ptrs[], size_t cnt)
{
	if (q->capacity <= spsc_queue_available(q))
		cnt = 0;
	else if (cnt > q->capacity - spsc_queue_available(q))
		cnt = q->capacity - spsc_queue_available(q);
	
	for (size_t i = 0; i < cnt; i++) {
		*ptrs[i] = q->pointers[q->_head];
		atomic_store_explicit(&q->_head, (q->_head + 1)%(q->capacity + 1), memory_order_release);
	}
	
	return cnt;
}

// Assembly:
movq %rdx, %rcx
movq 0x48(%rdi), %rax
movl 0x50(%rdi), %r8d
movl 0x94(%rdi), %r9d
movl 0x94(%rdi), %edx
cmpl %r9d, %r8d
jge 0x180b
movl 0x50(%rdi), %r8d
notl %r8d
addl %r8d, %edx
jmp 0x1815
movl 0x50(%rdi), %r8d
subl %r8d, %edx
addl 0x48(%rdi), %edx
movslq %edx, %rdx
cmpq %rdx, %rax
jbe 0x1843
movq 0x48(%rdi), %rax
movl 0x50(%rdi), %r8d
movl 0x94(%rdi), %r9d
movl 0x94(%rdi), %edx
cmpl %r9d, %r8d
jge 0x1847
movl 0x50(%rdi), %r8d
notl %r8d
addl %r8d, %edx
jmp 0x1851
xorl %ecx, %ecx
jmp 0x188b
movl 0x50(%rdi), %r8d
subl %r8d, %edx
addl 0x48(%rdi), %edx
movslq %edx, %rdx
subq %rdx, %rax
cmpq %rcx, %rax
jae 0x188b
movq 0x48(%rdi), %rcx
movl 0x50(%rdi), %edx
movl 0x94(%rdi), %r8d
movl 0x94(%rdi), %eax
cmpl %r8d, %edx
jge 0x187e
movl 0x50(%rdi), %edx
notl %edx
addl %edx, %eax
jmp 0x1886
movl 0x50(%rdi), %edx
subl %edx, %eax
addl 0x48(%rdi), %eax
cltq
subq %rax, %rcx
testq %rcx, %rcx
je 0x18cf
xorl %r8d, %r8d
movl 0x94(%rdi), %eax
cltq
movq 0x98(%rdi,%rax,8), %rax
movq (%rsi,%r8,8), %rdx
movq %rax, (%rdx)
movl 0x94(%rdi), %eax
cltq
incq %rax
movq 0x48(%rdi), %r9
incq %r9
xorl %edx, %edx
divq %r9
movl %edx, 0x94(%rdi)
incq %r8
cmpq %r8, %rcx
jne 0x1893
movl %ecx, %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Audio.cpp
// Function: Audio::dumpWavData(_IO_FILE*, unsigned char*, unsigned int)
bool Audio::dumpWavData(FILE *fp, unsigned char *buffer, unsigned int length)
{
	usingFileHandle = true;
	if (fp && std::fwrite(buffer, 1, length, fp)) {
		usingFileHandle = false;
		wavDataLength += length;
		return true;
	}
	usingFileHandle = false;
	return false;
}

// Assembly:
pushq %rbx
movb $0x1, 0x21bce(%rip)     # 0x2540a
testq %rdi, %rdi
je 0x3870
movq %rsi, %rax
movq %rdi, %rcx
movl %edx, %ebx
movl $0x1, %esi
movq %rax, %rdi
movq %rbx, %rdx
callq 0x33b0
testq %rax, %rax
je 0x3870
movb $0x0, 0x21ba5(%rip)     # 0x2540a
addq %rbx, 0x20a44(%rip)     # 0x242b0
movb $0x1, %al
jmp 0x3879
movb $0x0, 0x21b93(%rip)     # 0x2540a
xorl %eax, %eax
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Audio.cpp
// Function: Audio::createWav(char const*)
bool Audio::createWav(const char *fileName)
{
	WAVHEADER wav = {
		'R','I','F','F',
		0,
		'W','A','V','E','f','m','t',' ',
		16,
		1,
		1,
		0,
		0,
		2,
		16,
		'd','a','t','a',
		0
	};

	wav.nSamplesPerSec = sampleFrq;
	wav.nAvgBytesPerSec = wav.nSamplesPerSec * wav.nChannels * (wav.nBitsPerSample/8);

	if ((wavFileHandle = std::fopen(fileName, "wb"))) {
		if (std::fwrite(&wav, sizeof(wav), 1, wavFileHandle)) {
			recording = true;
		} else {
			std::fclose(wavFileHandle);
		}
	}
	return recording;
}

// Assembly:
subq $0x38, %rsp
movq %rsi, %rax
movups 0xb7a4(%rip), %xmm0     # 0xf04c
movups %xmm0, 0x1c(%rsp)
movups 0xb78c(%rip), %xmm0     # 0xf040
movaps %xmm0, 0x10(%rsp)
movups 0xb770(%rip), %xmm0     # 0xf030
movaps %xmm0, (%rsp)
movl 0xc(%rdi), %ecx
movl %ecx, 0x18(%rsp)
movzwl 0x16(%rsp), %edx
imull %ecx, %edx
movzwl 0x22(%rsp), %ecx
shrl $0x3, %ecx
imull %edx, %ecx
movl %ecx, 0x1c(%rsp)
leaq 0xb77a(%rip), %rsi      # 0xf063
movq %rax, %rdi
callq 0x3270
movq %rax, 0x209b0(%rip)     # 0x242a8
testq %rax, %rax
je 0x392c
movq %rsp, %rdi
movl $0x2c, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x33b0
testq %rax, %rax
je 0x3920
movb $0x1, 0x20983(%rip)     # 0x242a1
jmp 0x392c
movq 0x20981(%rip), %rdi     # 0x242a8
callq 0x3220
movb 0x2096f(%rip), %al      # 0x242a1
addq $0x38, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Audio.cpp
// Function: Audio::closeWav()
void Audio::closeWav()
{
	while (usingFileHandle);
	if (wavFileHandle) {
		unsigned int foo = (unsigned int)(ftell(wavFileHandle) - 8);
		// RIFF chunk size
		std::fseek(wavFileHandle, 4, SEEK_SET);
		std::fwrite(&foo, sizeof(foo), 1, wavFileHandle);

		// data chunk size
		foo = foo - sizeof(WAVHEADER) + 8;
		std::fseek(wavFileHandle, sizeof(WAVHEADER) - sizeof(unsigned long), SEEK_SET);
		std::fwrite(&foo, sizeof(foo), 1, wavFileHandle);

		std::fclose(wavFileHandle);
		wavFileHandle = 0;
	}
	recording = false;	
}

// Assembly:
movq 0x20969(%rip), %rdi     # 0x242a8
testq %rdi, %rdi
je 0x39d3
pushq %rbx
subq $0x10, %rsp
callq 0x3030
addl $-0x8, %eax
leaq 0xc(%rsp), %rbx
movl %eax, (%rbx)
movq 0x20945(%rip), %rdi     # 0x242a8
movl $0x4, %esi
xorl %edx, %edx
callq 0x3250
movq 0x20932(%rip), %rcx     # 0x242a8
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x33b0
addl $-0x24, (%rbx)
movq 0x20916(%rip), %rdi     # 0x242a8
movl $0x24, %esi
xorl %edx, %edx
callq 0x3250
movq 0x20903(%rip), %rcx     # 0x242a8
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rdi
callq 0x33b0
movq 0x208ea(%rip), %rdi     # 0x242a8
callq 0x3220
movq $0x0, 0x208da(%rip) # 0x242a8
addq $0x10, %rsp
popq %rbx
movb $0x0, 0x208c7(%rip)     # 0x242a1
retq
nop
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/AudioSDL.cpp
// Function: AudioSDL::setSampleRate(unsigned int)
void AudioSDL::setSampleRate(unsigned int newSampleRate)
{
	if (audiohwspec) {
		SDL_PauseAudio(1);
		unsigned int fadeoutTime = 1000 * bufferLength / audiohwspec->samples;
		SDL_Delay(fadeoutTime);
		SDL_CloseAudio();

		SDL_AudioSpec *obtained = new SDL_AudioSpec;
		audiohwspec->samples = newSampleRate;
		try {
			SDL_OpenAudio(audiohwspec, obtained);
			if (obtained) {
				SDL_AudioSpec *temp = audiohwspec;
				audiohwspec = obtained;
				delete temp;
			}
			SDL_PauseAudio(0);
		} catch (char *txt) {
			std::cerr << "Exception occurred: " << txt << std::endl;
		}
	} else {
	}
	Audio::setSampleRate(newSampleRate);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
cmpq $0x0, 0x10(%rdi)
je 0x3aa8
movl $0x1, %edi
callq 0x3190
imull $0x3e8, 0x8(%r14), %eax # imm = 0x3E8
movq 0x10(%r14), %rcx
movzwl 0x8(%rcx), %ecx
xorl %edx, %edx
divl %ecx
movl %eax, %edi
callq 0x3170
callq 0x3140
movl $0x20, %edi
callq 0x3230
movq %rax, %r15
movq 0x10(%r14), %rdi
movw %bx, 0x8(%rdi)
movq %rax, %rsi
callq 0x3310
movq 0x10(%r14), %rdi
movq %r15, 0x10(%r14)
testq %rdi, %rdi
je 0x3aa1
movl $0x20, %esi
callq 0x3240
xorl %edi, %edi
callq 0x3190
movl %ebx, 0xc(%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
cmpl $0x1, %edx
jne 0x3b03
movq %r15, %rdi
callq 0x30e0
movq %rax, %r15
movq 0x10524(%rip), %rdi     # 0x13ff0
leaq 0xb593(%rip), %rsi      # 0xf066
movl $0x14, %edx
callq 0x3260
movq 0x1050c(%rip), %rdi     # 0x13ff0
movq %r15, %rsi
callq 0x3210
movq %rax, %rdi
callq 0x3110
callq 0x3330
jmp 0x3aa8
movq %rax, %r15
callq 0x3330
movq %r15, %rdi
callq 0x3360
nop
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/AudioSDL.cpp
// Function: AudioSDL::~AudioSDL()
AudioSDL::~AudioSDL()
{
    SDL_PauseAudio(1);
    SDL_Delay(20);
	SDL_CloseAudio();
	SDL_Quit();
	if (audiohwspec)
		delete audiohwspec;
	if (ringBuffer)
		delete [] ringBuffer;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xfd6f(%rip), %rax      # 0x13ae8
movq %rax, (%rdi)
movl $0x1, %edi
callq 0x3190
movl $0x14, %edi
callq 0x3170
callq 0x3140
callq 0x33c0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x3dad
movl $0x20, %esi
callq 0x3240
leaq 0x204d4(%rip), %rax     # 0x24288
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3dc2
popq %rbx
jmp 0x32a0
popq %rbx
retq
movq %rax, %rdi
callq 0x3de3
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/./CbmTune.h
// Function: CbmTune::getNrOfSubtunes()
virtual unsigned int getNrOfSubtunes() {
		if (bufferPtr[CBM8M_HDR_FIELDS] & CBM8M_FIELD_SUBTUNES)
			return bufferPtr[CBM8M_HDR_STRINGS
				+ strlen(getReleaseDate()) + strlen(getAuthor()) + strlen(getName()) + 3];
		else
			return 0;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r12
xorl %eax, %eax
testb $0x1, 0x8(%r12)
je 0x4158
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rdi
callq 0x30f0
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %rax, %rdi
callq 0x30f0
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq %rax, %rdi
callq 0x30f0
addq %r14, %r12
addq %r15, %r12
movzbl 0xc(%rax,%r12), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/./CbmTune.h
// Function: CbmTune::getDefaultSubtune()
virtual unsigned int getDefaultSubtune() {
		if (bufferPtr[CBM8M_HDR_FIELDS] & CBM8M_FIELD_DEFAULT)
			return bufferPtr[CBM8M_HDR_FIELDS
				+ 1
				+ strlen(getReleaseDate()) + strlen(getAuthor()) + strlen(getName()) + 3];
		else
			return 0;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq 0x20(%rdi), %r12
xorl %eax, %eax
testb $0x2, 0x8(%r12)
je 0x41be
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rdi
callq 0x30f0
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq %rax, %rdi
callq 0x30f0
movq %rax, %r15
movq (%rbx), %rax
movq %rbx, %rdi
callq *(%rax)
movq %rax, %rdi
callq 0x30f0
addq %r14, %r12
addq %r15, %r12
movzbl 0xc(%rax,%r12), %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Cpu.cpp
// Function: CPU::CPU(MemoryHandler*, unsigned char*, unsigned char*)
CPU::CPU( MemoryHandler *memhandler, unsigned char *irqreg, unsigned char *cpustack ) : mem(memhandler), irq_register(irqreg), stack(cpustack)
{
	irq_sequence = 0;
	IRQcount = 0;
	cpu_jammed = false;
	PC = 0xFFFF;
	for( int i=0; i<nr_of_bps; i++) {
		bp[i].address = 0x10000;
		bp[i].enabled = false;
		bp[i].slot_free = true;
	}
	nr_activebps = 0;
	memset( stats, 0, sizeof(stats));
}

// Assembly:
leaq 0xf9ed(%rip), %rax      # 0x13be0
movq %rax, (%rdi)
movq %rdx, 0x28(%rdi)
movq %rcx, 0x30(%rdi)
movq %rsi, 0x40(%rdi)
xorl %eax, %eax
movb %al, 0x38(%rdi)
movl $0x0, 0x24(%rdi)
movb %al, 0xa4(%rdi)
movl $0xffff, 0x10(%rdi)     # imm = 0xFFFF
movl $0x10000, 0x48(%rdi,%rax,8) # imm = 0x10000
movw $0x100, 0x4c(%rdi,%rax,8) # imm = 0x100
incq %rax
cmpq $0xb, %rax
jne 0x421b
movl $0x0, 0xa0(%rdi)
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Cpu.cpp
// Function: CPU::saveshot(void*)
bool CPU::saveshot(void *CPUdump)
{
	FILE *img = (FILE *) CPUdump;

	fwrite(&currins,sizeof(currins),1,img);
	fwrite(&nextins,sizeof(nextins),1,img);
	fwrite(&ptr,sizeof(ptr),1,img);
	fwrite(&PC,sizeof(PC),1,img);
	fwrite(&cycle,sizeof(cycle),1,img);
	fwrite(&SP,sizeof(SP),1,img);
  	fwrite(&ST,sizeof(ST),1,img);
   	fwrite(&AC,sizeof(AC),1,img);
   	fwrite(&X,sizeof(X),1,img);
   	fwrite(&Y,sizeof(Y),1,img);
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movsbl 0x8(%rdi), %edi
callq 0x3290
movsbl 0x9(%r14), %edi
movq %rbx, %rsi
callq 0x3290
leaq 0xc(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x33b0
leaq 0x10(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x33b0
leaq 0x20(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x33b0
movsbl 0x14(%r14), %edi
movq %rbx, %rsi
callq 0x3290
leaq 0x18(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x33b0
movsbl 0x1c(%r14), %edi
movq %rbx, %rsi
callq 0x3290
movsbl 0x1d(%r14), %edi
movq %rbx, %rsi
callq 0x3290
movsbl 0x1e(%r14), %edi
movq %rbx, %rsi
callq 0x3290
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Cpu.cpp
// Function: CPU::loadshot(void*)
bool CPU::loadshot(void *CPUdump)
{
	FILE *img = (FILE *) CPUdump;

	fread(&currins,sizeof(currins),1,img);
	fread(&nextins,sizeof(nextins),1,img);
	fread(&ptr,sizeof(ptr),1,img);
   	fread(&PC,sizeof(PC),1,img);
	PC &= 0xFFFF;
	fread(&cycle,sizeof(cycle),1,img);
   	fread(&SP,sizeof(SP),1,img);
  	fread(&ST,sizeof(ST),1,img);
   	fread(&AC,sizeof(AC),1,img);
   	fread(&X,sizeof(X),1,img);
   	fread(&Y,sizeof(Y),1,img);
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
addq $0x8, %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
leaq 0x9(%r14), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
leaq 0xc(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
leaq 0x10(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
movzwl 0x10(%r14), %eax
movl %eax, 0x10(%r14)
leaq 0x20(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
leaq 0x14(%r14), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
leaq 0x18(%r14), %rdi
movl $0x4, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
leaq 0x1c(%r14), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
leaq 0x1d(%r14), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x32e0
addq $0x1e, %r14
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
movq %rbx, %rcx
callq 0x32e0
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Cpu.cpp
// Function: CPU::Reset()
void CPU::Reset()
{
	ST=0x24;
	softreset();
	IRQcount = cycle = 0;
	irq_sequence = 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x24, 0x18(%rdi)
movq 0x40(%rdi), %rdi
movq (%rdi), %rax
movl $0xfffc, %esi           # imm = 0xFFFC
callq *0x8(%rax)
movzbl %al, %ebp
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
movl $0xfffd, %esi           # imm = 0xFFFD
callq *0x8(%rax)
movzbl %al, %eax
shll $0x8, %eax
orl %ebp, %eax
movl %eax, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movb $0x0, 0x38(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/./Cpu.h
// Function: CPU::ADC(unsigned char)
inline void CPU::ADC(const unsigned char value)
{
	if (ST&0x08) {
		unsigned int bin_adc = AC + value + (ST&0x01);
		unsigned char AL, AH;

		AL=(AC&0x0F) + (value & 0x0F) + (ST&0x01);
		AH=(AC >> 4) + (value >> 4 ) ;
		// fix lower nybble
		if (AL>9) {
			AL+=6;
			AH++;
		}
		// zero bit depends on the normal ADC...
		(bin_adc)&0xFF ? ST&=0xFD : ST|=0x02;
		// negative flag also...
		( AH & 0x08 ) ? ST|=0x80 : ST&=0x7F; 
		// V flag
		((((AH << 4) ^ AC) & 0x80) && !((AC ^ value) & 0x80)) ? SetVFlag() : ClearVFlag();
		// fix upper nybble
		if (AH>9) 
			AH+=6;
		// set the Carry if the decimal add has an overflow
		(AH > 0x0f) ? ST|=0x01 : ST&=0xFE;
		// calculate new AC value
		AC = (AH<<4)|(AL & 0x0F);
	} else {
		unsigned int bin_adc = AC + value + (ST&0x01);
		(bin_adc>=0x100) ? ST|=0x01 : ST&=0xFE;
		(!((AC ^ value) & 0x80) && ((AC ^ bin_adc) & 0x80) ) ? SetVFlag() : ClearVFlag();
		AC=(unsigned char) bin_adc;
		SETFLAGS_ZN(AC);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %eax
movzbl 0x1c(%rdi), %ecx
movl %eax, %edx
andl $0x1, %edx
leal (%rsi,%rcx), %r14d
addl %edx, %r14d
testb $0x8, %al
jne 0x80cc
movl %eax, %edx
andl $0xf6, %edx
orl $0x1, %eax
cmpl $0x100, %r14d           # imm = 0x100
cmovbl %edx, %eax
movl %eax, 0x18(%rbx)
xorl %ecx, %esi
cmpl $0x7f, %esi
ja 0x80be
xorb %r14b, %cl
js 0x8185
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x818b
movl %ecx, %edi
andl $0xf, %edi
movl %esi, %r8d
andl $0xf, %r8d
addl %r8d, %edx
leal (%rdx,%rdi), %r8d
movl %ecx, %r9d
shrb $0x4, %r9b
movl %esi, %r10d
shrb $0x4, %r10b
addb %r9b, %r10b
cmpl $0xa, %r8d
sbbb $-0x1, %r10b
cmpl $0xa, %r8d
leal 0x6(%rdi,%rdx), %ebp
cmovbl %r8d, %ebp
movl %eax, %edx
orl $0x2, %edx
andl $0xfd, %eax
testb %r14b, %r14b
cmovel %edx, %eax
movzbl %r10b, %r14d
movl %eax, %edi
andl $0x7f, %edi
movl $0x80, %edx
orl %edx, %eax
testb $0x8, %r14b
cmovel %edi, %eax
movl %eax, 0x18(%rbx)
xorl %ecx, %esi
cmpl $0x7f, %esi
ja 0x8149
movl %r14d, %esi
shll $0x4, %esi
xorl %ecx, %esi
andl %edx, %esi
je 0x8149
orl $0x40, %eax
movl %eax, 0x18(%rbx)
jmp 0x8152
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
leal 0x6(%r14), %eax
cmpb $0xa, %r14b
movzbl %al, %eax
cmovbl %r14d, %eax
movl 0x18(%rbx), %ecx
movl %ecx, %edx
andl $0xfe, %edx
orl $0x1, %ecx
cmpb $0x10, %al
cmovbl %edx, %ecx
movl %ecx, 0x18(%rbx)
shll $0x4, %eax
andl $0xf, %ebp
orl %eax, %ebp
movb %bpl, 0x1c(%rbx)
jmp 0x81ad
orl $0x40, %eax
movl %eax, 0x18(%rbx)
movb %r14b, 0x1c(%rbx)
movl 0x18(%rbx), %eax
andl $0x7d, %eax
xorl %ecx, %ecx
testb %r14b, %r14b
sete %cl
andl $0x80, %r14d
leal (%r14,%rcx,2), %ecx
orl %eax, %ecx
movl %ecx, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/./Cpu.h
// Function: CPU::SBC(unsigned char)
inline void CPU::SBC(const unsigned char value)
{
	if (ST&0x08) { // if in decimal mode
		unsigned int bin_sbc = (AC - value - (1-(ST&0x01)));
		unsigned int dec_sbc = (AC & 0x0F) - (value & 0x0F) - (1-(ST&0x01));
		// Calculate the upper nybble.
		// fix upper nybble
		if (dec_sbc&0x10)
			dec_sbc = ((dec_sbc-6)&0x0F) | ((AC&0xF0) - (value&0xF0) - 0x10);
		else
			dec_sbc = (dec_sbc&0x0F) | ((AC&0xF0) - (value&0xF0));
		
		if (dec_sbc&0x100)
			dec_sbc-= 0x60;

		// all flags depend on the normal SBC...
		(bin_sbc<0x100) ? ST|=0x01 : ST&=0xFE ; // carry flag
		SETFLAGS_ZN( bin_sbc & 0xFF );
		((AC^bin_sbc)&0x80 && (AC^value)&0x80 ) ? SetVFlag() : ClearVFlag(); // V flag

		AC=(unsigned char) dec_sbc;

	} else {
		unsigned int bin_sbc = (AC - value - (1-(ST&0x01)));
		(bin_sbc<0x100) ? ST|=0x01 : ST&=0xFE;
		(((AC ^ value) & 0x80) && ((AC ^ bin_sbc) & 0x80) ) ? SetVFlag() : ClearVFlag();
		AC=(unsigned char) bin_sbc;
		SETFLAGS_ZN(AC);
	}
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x18(%rdi), %ecx
movzbl 0x1c(%rdi), %eax
movl %ecx, %edx
orl $-0x2, %edx
incl %edx
movl %edx, %r14d
subl %esi, %r14d
addl %eax, %r14d
testb $0x8, %cl
jne 0x820e
movl %ecx, %edx
andl $0xf6, %edx
orl $0x1, %ecx
cmpl $0x100, %r14d           # imm = 0x100
cmovael %edx, %ecx
movl %ecx, 0x18(%rbx)
xorl %eax, %esi
cmpl $0x80, %esi
jb 0x8200
xorb %r14b, %al
js 0x82b7
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x82bd
movl %eax, %edi
andl $0xf, %edi
movl %esi, %r8d
andl $0xf, %r8d
subl %r8d, %edx
addl %edi, %edx
testb $0x10, %dl
jne 0x823a
andl $0xf, %edx
movl %eax, %edi
andl $-0x10, %edi
movl %esi, %r8d
andl $-0x10, %r8d
subl %r8d, %edi
orl %edx, %edi
jmp 0x8254
addl $0xa, %edx
andl $0xf, %edx
movl %eax, %edi
andl $-0x10, %edi
movl %esi, %r8d
andl $-0x10, %r8d
subl %r8d, %edi
addl %edx, %edi
addl $-0x10, %edi
leal 0xa0(%rdi), %ebp
btl $0x8, %edi
cmovael %edi, %ebp
movl %ecx, %edx
andl $0x7c, %edx
orl $0x1, %ecx
cmpl $0x100, %r14d           # imm = 0x100
cmovael %edx, %ecx
andl $0x7d, %ecx
xorl %edx, %edx
testb %r14b, %r14b
sete %dl
movl $0x80, %edi
movl %r14d, %r8d
andl %edi, %r8d
leal (%r8,%rdx,2), %edx
orl %ecx, %edx
movl %edx, 0x18(%rbx)
xorl %eax, %esi
cmpl %edi, %esi
jb 0x82a8
xorl %eax, %r14d
andl %edi, %r14d
je 0x82a8
orl $0x40, %edx
movl %edx, 0x18(%rbx)
jmp 0x82b1
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movb %bpl, 0x1c(%rbx)
jmp 0x82df
orl $0x40, %ecx
movl %ecx, 0x18(%rbx)
movb %r14b, 0x1c(%rbx)
movl 0x18(%rbx), %eax
andl $0x7d, %eax
xorl %ecx, %ecx
testb %r14b, %r14b
sete %cl
andl $0x80, %r14d
leal (%r14,%rcx,2), %ecx
orl %eax, %ecx
movl %ecx, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Filter.cpp
// Function: Filter::Filter(unsigned int, unsigned int, unsigned int)
Filter::Filter(unsigned int cutoffFrq, unsigned int sampleFrq, unsigned int order) : 
	order_((order >> 1) << 1),
	sampleFrq_(sampleFrq),
	windowTable_(0),
	sampleHistory_(0),
	precision_(12),
	mixingVolume(2.0)
{
#if 1
	setCutoffFrq(double(cutoffFrq)/double(sampleFrq));
#else
	setCutoffFrq(.000001);
#endif
}

// Assembly:
leaq 0xb915(%rip), %rax      # 0x13c10
movq %rax, (%rdi)
andl $-0x2, %ecx
movl %ecx, 0x8(%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq %rax, 0x20(%rdi)
movl %edx, 0x3c(%rdi)
movl $0xc, 0x40(%rdi)
movl %esi, %eax
cvtsi2sd %rax, %xmm0
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movl %edx, %ecx
cvtsi2sd %rcx, %xmm1
movq %rax, 0x48(%rdi)
divsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rdi)
jmp 0x834c
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Filter.cpp
// Function: Filter::lowPass(short)
short Filter::lowPass(short from)
{
	int i;
	int filteredSample = 0;

	int ptr = sampleBufPtr_;
	sampleBufPtr_ = (sampleBufPtr_ + 1) % windowTableSize;
	
	// store input sample to history ring buffer
	sampleHistory_[ptr] = int(from);
	// last coeff not used...
	i = windowTableSize - 1;
	//
	do {
		// convolve sample input with filter kernel
		filteredSample += sampleHistory_[ptr] * windowTable_[i];
		// get previous sample from ring buffer
		ptr -= 1;
		if (ptr < 0) 
			ptr += windowTableSize;
	} while (i--);
	short output = short(filteredSample >> precision_);
	return (short) output;
}

// Assembly:
movslq 0x28(%rdi), %r9
leal 0x1(%r9), %eax
xorl %ecx, %ecx
xorl %edx, %edx
divl 0x18(%rdi)
movl %edx, 0x28(%rdi)
movq 0x20(%rdi), %rdx
movl %esi, (%rdx,%r9,4)
movslq 0x18(%rdi), %rsi
movq 0x10(%rdi), %r8
movq %rsi, %r10
xorl %eax, %eax
movslq %r9d, %r9
movl -0x4(%r8,%r10,4), %r11d
imull (%rdx,%r9,4), %r11d
addl %r11d, %eax
testl %r9d, %r9d
movl %esi, %r11d
cmovgl %ecx, %r11d
addl %r11d, %r9d
decl %r9d
decq %r10
jne 0x8765
movb 0x40(%rdi), %cl
sarl %cl, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::setFrequency(unsigned int)
void SIDsound::setFrequency(unsigned int sid_frequency)
{
	switch (sid_frequency) {
		case 0:
			sidBaseFreq = TED_SOUND_CLOCK * 4; // 312 * 114 * 50 / 2;
			break;
		default:
			sidBaseFreq = SOUND_FREQ_PAL_C64;
			break;
	}
	calcEnvelopeTable();
}

// Assembly:
testl %esi, %esi
movl $0xd87c0, %eax          # imm = 0xD87C0
movl $0xf08a0, %ecx          # imm = 0xF08A0
cmovel %eax, %ecx
cvtsi2sd %ecx, %xmm0
movl %ecx, 0x41c0(%rdi)
movl 0x41b8(%rdi), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rdx
movl %edx, 0x174(%rdi)
imull %eax, %edx
subl %edx, %ecx
movl %ecx, 0x17c(%rdi)
movl $0x0, 0x178(%rdi)
retq
nop
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::SIDsound(unsigned int, unsigned int)
SIDsound::SIDsound(unsigned int model, unsigned int chnlDisableMask) : enableDigiBlaster(false)
{
	unsigned int i;

	// Link voices together
	for (i=0; i<3; i++) {
		voice[i].index = i;
		voice[i].modulatedBy = &voice[(i+2)%3]; // previous voice
		voice[i].modulatesThis = &voice[(i+1)%3]; // next voice
		voice[i].disabled = !!((chnlDisableMask >> i) & 1);
	}

	filterCutoff = 0;
	setModel(model);
	setFrequency(0);
	reset();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ecx
movq %rdi, %rbx
leaq 0xb09c(%rip), %rax      # 0x13c40
movq %rax, (%rdi)
movb $0x0, 0x41b5(%rdi)
leaq 0x8(%rdi), %r8
leaq 0xf8(%rdi), %r9
movl $0x2, %edi
xorl %r15d, %r15d
movabsq $-0x5555555555555555, %r10 # imm = 0xAAAAAAAAAAAAAAAB
movq %r8, %r11
xorl %r14d, %r14d
movq %rdi, %rax
mulq %r10
shrq %rdx
imulq $-0x168, %rdx, %rax     # imm = 0xFE98
addq %r9, %rax
incq %r14
cmpq $0x3, %r14
movl %r14d, %edx
movl $0x0, %r12d
cmovneq %rdx, %r12
imulq $0x78, %r12, %rdx
addq %r8, %rdx
btl %r15d, %ecx
setb 0x6c(%r11)
addq $0x78, %r9
incq %rdi
movl %r15d, (%r11)
movq %rax, 0x10(%r11)
movq %rdx, 0x18(%r11)
addq $0x78, %r11
movq %r14, %r15
cmpq $0x3, %r14
jne 0x8bd1
movl $0x0, 0x198(%rbx)
movq %rbx, %rdi
callq 0x8790
movq (%rbx), %rax
movq %rbx, %rdi
xorl %esi, %esi
callq *0x28(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmpq *0x10(%rax)
// File: /workspace/github_c_makefile_star2_O1/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::reset()
void SIDsound::reset(void)
{
	volume = masterVolume;

	lastByteWritten = 0;

	for (int v=0; v<3; v++) {
		voice[v].wave = WAVE_NONE;
		voice[v].egState = EG_FROZEN;
		voice[v].accu = 0;
		voice[v].freq = voice[v].pw = 0;
		voice[v].envCurrLevel = voice[v].envSustainLevel = 0;
		voice[v].gate = voice[v].ring = voice[v].test = 0;
		voice[v].filter = voice[v].sync = 0;
		voice[v].muted = 0;
		// Initial value of internal shift register
		voice[v].shiftReg = 0x7FFFFC;
		voice[v].envExpCounter = 0;
		voice[v].envAttackAdd = voice[v].envDecaySub = voice[v].envReleaseSub = 0;
		voice[v].envCounterCompare = 0;
		voice[v].envCounter = 0x7fff;
	}

	filterType = FILTER_NONE;
	filterCutoff = filterResonance = 0;

	Vhp = Vbp = Vlp = 0;
	setFilterCutoff();
	setResonance();

	dcDigiBlaster = 0;
	clockDeltaRemainder = 0;
}

// Assembly:
movl 0x1c7b2(%rip), %eax     # 0x25410
movl %eax, 0x170(%rdi)
movb $0x0, 0x41b4(%rdi)
movl $0x78, %eax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movq %rcx, -0x6c(%rdi,%rax)
movl %ecx, -0x50(%rdi,%rax)
movq %rcx, -0x40(%rdi,%rax)
movl %ecx, -0x28(%rdi,%rax)
movl %ecx, (%rdi,%rax)
movups %xmm0, -0x18(%rdi,%rax)
movl %ecx, -0x8(%rdi,%rax)
movl $0x7ffffc, -0x48(%rdi,%rax) # imm = 0x7FFFFC
movups %xmm0, -0x38(%rdi,%rax)
movl %ecx, -0x1c(%rdi,%rax)
movq $0x7fff, -0x24(%rdi,%rax) # imm = 0x7FFF
addq $0x78, %rax
cmpq $0x1e0, %rax            # imm = 0x1E0
jne 0x8c75
xorl %eax, %eax
movb %al, 0x194(%rdi)
movb %al, 0x19c(%rdi)
movl %eax, 0x198(%rdi)
movl %eax, 0x41b0(%rdi)
movq $0x0, 0x41a8(%rdi)
movsd 0x7402(%rip), %xmm0     # 0x100e8
movsd 0x1a0(%rdi), %xmm1
mulsd %xmm0, %xmm1
cvttsd2si %xmm1, %edx
movl %edx, 0x41a4(%rdi)
movl 0x41b8(%rdi), %ecx
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
mulsd 0x7326(%rip), %xmm1     # 0x10038
movsd 0x73d6(%rip), %xmm2     # 0x100f0
minsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %ecx
cmpl %ecx, %edx
jle 0x8d30
movl %ecx, 0x41a4(%rdi)
movl $0x5a8, 0x41a0(%rdi)    # imm = 0x5A8
movl %eax, 0x18c(%rdi)
movl %eax, 0x178(%rdi)
retq
nop