LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
leaq 0xde1(%rip), %rdi       # 0x2004
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1090
movl %eax, %eax
movq %rax, -0x50(%rbp)
callq 0x1200
movq %rax, %rcx
movq -0x50(%rbp), %rax
addq %rcx, %rax
movl %eax, %edi
callq 0x1070
callq 0x10f0
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movslq %edx, %rax
movq %rax, -0x20(%rbp)
movl 0x2e2f(%rip), %eax      # 0x40a0
cmpl $0x0, %eax
jne 0x127d
callq 0x1380
jmp 0x126b
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x129f
pause
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1285
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x1, -0x40(%rbp)
cmpq $0x1312d00, -0x30(%rbp) # imm = 0x1312D00
jae 0x1364
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movl %eax, %edx
movq -0x30(%rbp), %rcx
leaq 0x2dd6(%rip), %rax      # 0x40b0
movl %edx, (%rax,%rcx,4)
movq -0x30(%rbp), %rcx
leaq 0x2dc8(%rip), %rax      # 0x40b0
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x1390
cmpl $0x0, %eax
jne 0x1338
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x19f0
movq -0x58(%rbp), %rsi
movl %eax, %ecx
leaq 0xceb(%rip), %rdi       # 0x200e
movl $0x100000, %edx         # imm = 0x100000
movb $0x0, %al
callq 0x1050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x136b
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
leaq 0x2d65(%rip), %rax      # 0x40b0
movslq (%rax,%rcx,4), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x12b7
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
leaq 0xc6e(%rip), %rdi       # 0x2041
movb $0x0, %al
callq 0x1050
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x1090
movl %eax, %eax
movq %rax, -0x58(%rbp)
callq 0x1200
movq %rax, %rcx
movq -0x58(%rbp), %rax
addq %rcx, %rax
movl %eax, %edi
callq 0x1070
callq 0x10f0
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
movslq %edx, %rax
movq %rax, -0x20(%rbp)
movl 0x2c7f(%rip), %eax      # 0x40a0
cmpl $0x0, %eax
jne 0x142d
callq 0x1380
jmp 0x141b
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x144f
pause
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1435
movq $0x0, -0x30(%rbp)
movq $0x0, -0x38(%rbp)
movq $0x1, -0x40(%rbp)
cmpq $0x1312d00, -0x30(%rbp) # imm = 0x1312D00
jae 0x14d9
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movl %eax, -0x44(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x14f0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1497
jmp 0x1499
jmp 0x147c
movq -0x50(%rbp), %rax
movl (%rax), %eax
cmpl -0x44(%rbp), %eax
je 0x14bb
leaq 0xba0(%rip), %rdi       # 0x204b
movb $0x0, %al
callq 0x1050
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x14e0
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movslq -0x44(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x1467
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x1, 0x2b6a(%rip)      # 0x40a0
movq -0x8(%rbp), %rdi
callq 0x1210
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1556
leaq 0xb0b(%rip), %rdi       # 0x205a
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x13c0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0x1576
leaq 0xafd(%rip), %rdi       # 0x206c
movb $0x0, %al
callq 0x1050
cmpl $0x0, -0x10(%rbp)
jne 0x1582
cmpl $0x0, -0xc(%rbp)
je 0x1592
leaq 0xaf4(%rip), %rdi       # 0x207d
movb $0x0, %al
callq 0x1050
jmp 0x15a0
leaq 0xaff(%rip), %rdi       # 0x2098
movb $0x0, %al
callq 0x1050
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x18(%rbp)
movl $0x0, 0x2ada(%rip)      # 0x40a0
movq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rdi
leaq -0x215(%rip), %rsi      # 0x13c0
callq 0x1700
movq -0x18(%rbp), %rdx
leaq -0x28(%rbp), %rdi
leaq -0x3d9(%rip), %rsi      # 0x1210
callq 0x1700
movl $0x1, %edi
callq 0x10e0
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x1, 0x2a89(%rip)      # 0x40a0
movq -0x20(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1740
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x1740
rdtsc
shlq $0x20, %rdx
orq %rdx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x30(%rbp)
jne 0x1652
cmpl $0x0, -0x2c(%rbp)
je 0x1662
leaq 0xa5c(%rip), %rdi       # 0x20b5
movb $0x0, %al
callq 0x1050
jmp 0x1670
leaq 0xa5f(%rip), %rdi       # 0x20c8
movb $0x0, %al
callq 0x1050
movq -0x40(%rbp), %rax
subq -0x38(%rbp), %rax
movl $0x1312d00, %ecx        # imm = 0x1312D00
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
leaq 0xa56(%rip), %rdi       # 0x20e2
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
callq 0x19f0
cltq
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x19f0
cltq
movq -0x18(%rbp), %rcx
cmpq 0x48(%rcx), %rax
je 0x16c9
movq -0x48(%rbp), %rsi
leaq 0xa39(%rip), %rdi       # 0x20fb
movb $0x0, %al
callq 0x1050
movq -0x18(%rbp), %rdi
callq 0x1890
movl %eax, -0x4c(%rbp)
cmpl $0x0, -0x4c(%rbp)
je 0x16ec
movl -0x4c(%rbp), %esi
leaq 0xa50(%rip), %rdi       # 0x2135
movb $0x0, %al
callq 0x1050
xorl %eax, %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/stv0g[P]c11-queues/spsc_test_fib.c
// Function: main
int main()
{
	struct spsc_queue* q = NULL;
	q = spsc_queue_init(q, 1<<24, &memtype_heap);
	
	test_multi_threaded(q);
	//test_single_threaded(q); /** Single threaded test fails with N > queue size*/
	
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x4(%rbp)
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x1000000, %esi        # imm = 0x1000000
leaq 0x25c9(%rip), %rdx      # 0x3d80
callq 0x17e0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x15b0
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x2, -0x18(%rbp)
jb 0x1810
movq -0x18(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x181a
movq $0x0, -0x8(%rbp)
jmp 0x1884
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
shlq $0x3, %rsi
addq $0x98, %rsi
callq 0x1c30
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1847
movq $0x0, -0x8(%rbp)
jmp 0x1884
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x50(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x94(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19f0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
ja 0x1921
movq $0x0, -0x18(%rbp)
jmp 0x197a
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19f0
movq -0x38(%rbp), %rcx
movl %eax, %edx
movq -0x30(%rbp), %rax
movslq %edx, %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x1978
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19f0
movl %eax, %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x197a
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x19da
movq -0x8(%rbp), %rax
addq $0x98, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movslq 0x94(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
addq $0x1, %rcx
xorl %edx, %edx
divq %rcx
movq %rdx, %rax
movq -0x48(%rbp), %rdx
shlq $0x3, %rax
addq %rax, %rdx
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1981
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19f0
cltq
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x20(%rbp), %rax
jbe 0x1a95
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1b01
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movl 0x50(%rax), %ecx
movslq %ecx, %rcx
movq %rdx, 0x98(%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl 0x50(%rax), %eax
incl %eax
cltq
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
incq %rcx
xorl %edx, %edx
divq %rcx
movq -0x38(%rbp), %rax
movl %edx, %ecx
movl %ecx, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
movl %ecx, 0x50(%rax)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x1a9d
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19f0
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
ja 0x1b51
movq $0x0, -0x18(%rbp)
jmp 0x1baa
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19f0
movq -0x40(%rbp), %rcx
movl %eax, %edx
movq -0x38(%rbp), %rax
movslq %edx, %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x1ba8
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
callq 0x19f0
movl %eax, %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
subq %rcx, %rax
movq %rax, -0x18(%rbp)
jmp 0x1baa
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x1c22
movq -0x8(%rbp), %rax
movl 0x94(%rax), %ecx
movslq %ecx, %rcx
movq 0x98(%rax,%rcx,8), %rcx
movq -0x10(%rbp), %rax
movq -0x20(%rbp), %rdx
movq (%rax,%rdx,8), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movl 0x94(%rax), %eax
incl %eax
cltq
movq -0x8(%rbp), %rcx
movq 0x48(%rcx), %rcx
incq %rcx
xorl %edx, %edx
divq %rcx
movq -0x50(%rbp), %rax
movl %edx, %ecx
movl %ecx, -0x24(%rbp)
movl -0x24(%rbp), %ecx
movl %ecx, 0x94(%rax)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x1bb2
movq -0x18(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movb $0x1, 0x31b00(%rip)     # 0x3549a
cmpq $0x0, -0x10(%rbp)
je 0x39dc
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %eax
movl %eax, %edx
movq -0x10(%rbp), %rcx
movl $0x1, %esi
callq 0x3470
cmpq $0x0, %rax
je 0x39dc
movb $0x0, 0x31ad5(%rip)     # 0x3549a
movl -0x1c(%rbp), %eax
addq 0x30971(%rip), %rax     # 0x34340
movq %rax, 0x3096a(%rip)     # 0x34340
movb $0x1, -0x1(%rbp)
jmp 0x39e7
movb $0x0, 0x31ab7(%rip)     # 0x3549a
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x3c(%rbp), %rdi
leaq 0x1a5cd(%rip), %rsi     # 0x1e030
movl $0x2c, %edx
callq 0x31d0
movq -0x48(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movzwl -0x26(%rbp), %ecx
imull %ecx, %eax
movl %eax, -0x40(%rbp)
movzwl -0x1a(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x40(%rbp), %eax
imull %ecx, %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x1a5bd(%rip), %rsi     # 0x1e063
callq 0x32f0
movq %rax, 0x30886(%rip)     # 0x34338
cmpq $0x0, %rax
je 0x3aef
movq 0x30879(%rip), %rcx     # 0x34338
leaq -0x3c(%rbp), %rdi
movl $0x2c, %esi
movl $0x1, %edx
callq 0x3470
cmpq $0x0, %rax
je 0x3ae1
movb $0x1, 0x30852(%rip)     # 0x34331
jmp 0x3aed
movq 0x30850(%rip), %rdi     # 0x34338
callq 0x3260
jmp 0x3aef
movb 0x3083c(%rip), %al      # 0x34331
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
testb $0x1, 0x31987(%rip)     # 0x3549a
je 0x3b17
jmp 0x3b0c
cmpq $0x0, 0x30819(%rip)     # 0x34338
je 0x3bb7
movq 0x3080c(%rip), %rdi     # 0x34338
callq 0x3030
subq $0x8, %rax
movl %eax, -0xc(%rbp)
movq 0x307f9(%rip), %rdi     # 0x34338
movl $0x4, %esi
xorl %edx, %edx
callq 0x32e0
movq 0x307e6(%rip), %rcx     # 0x34338
leaq -0xc(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movl -0xc(%rbp), %eax
subq $0x2c, %rax
addq $0x8, %rax
movl %eax, -0xc(%rbp)
movq 0x307be(%rip), %rdi     # 0x34338
movl $0x24, %esi
xorl %edx, %edx
callq 0x32e0
movq 0x307ab(%rip), %rcx     # 0x34338
leaq -0xc(%rbp), %rdi
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq 0x30791(%rip), %rdi     # 0x34338
callq 0x3260
movq $0x0, 0x30781(%rip) # 0x34338
movb $0x0, 0x30773(%rip)     # 0x34331
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, 0x10(%rax)
je 0x3e1e
movl $0x1, %edi
callq 0x31a0
movq -0x40(%rbp), %rcx
movl 0x8(%rcx), %eax
imull $0x3e8, %eax, %eax      # imm = 0x3E8
movq 0x10(%rcx), %rcx
movzwl 0x8(%rcx), %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edi
callq 0x3180
callq 0x3140
movl $0x20, %edi
callq 0x3270
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x18(%rbp)
movw -0xc(%rbp), %dx
movq 0x10(%rax), %rcx
movw %dx, 0x8(%rcx)
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x33c0
jmp 0x3d55
cmpq $0x0, -0x18(%rbp)
je 0x3e00
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rcx
movq %rcx, -0x30(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, %rax
je 0x3d90
movq -0x48(%rbp), %rdi
movl $0x20, %esi
callq 0x3280
jmp 0x3e00
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3e32
movq -0x20(%rbp), %rdi
callq 0x30e0
movq %rax, -0x38(%rbp)
movq 0x2022e(%rip), %rdi     # 0x23ff0
leaq 0x1a29d(%rip), %rsi     # 0x1e066
callq 0x3250
movq %rax, -0x50(%rbp)
jmp 0x3dd4
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x3250
movq %rax, -0x58(%rbp)
jmp 0x3de7
movq -0x58(%rbp), %rdi
movq 0x201c6(%rip), %rsi     # 0x23fb8
callq 0x3290
jmp 0x3df9
callq 0x33e0
jmp 0x3e20
xorl %edi, %edi
callq 0x31a0
jmp 0x3e09
jmp 0x3dfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x33e0
jmp 0x3e32
jmp 0x3e20
movq -0x40(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x3c70
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3410
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
leaq 0x1f79d(%rip), %rcx     # 0x23ab8
movq %rcx, (%rax)
movl $0x1, %edi
callq 0x31a0
jmp 0x432a
movl $0x14, %edi
callq 0x3180
jmp 0x4336
callq 0x3140
jmp 0x433d
callq 0x3490
jmp 0x4344
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x4371
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x436f
movq -0x18(%rbp), %rdi
movl $0x20, %esi
callq 0x3280
jmp 0x4371
leaq 0x2ffa0(%rip), %rax     # 0x34318
cmpq $0x0, (%rax)
je 0x439d
leaq 0x2ff93(%rip), %rax     # 0x34318
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x439b
movq -0x20(%rbp), %rdi
callq 0x3330
jmp 0x439d
movq -0x10(%rbp), %rdi
callq 0x3bf0
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x4440
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x20(%rax), %rax
movzbl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4a5f
movq -0x18(%rbp), %rdi
movq 0x20(%rdi), %rax
movq %rax, -0x20(%rbp)
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rdi
callq 0x3100
movq -0x18(%rbp), %rdi
addq $0x9, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
callq *0x8(%rax)
movq %rax, %rdi
callq 0x3100
movq -0x18(%rbp), %rdi
movq %rax, %rcx
movq -0x30(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq (%rdi), %rax
callq *(%rax)
movq %rax, %rdi
callq 0x3100
movq -0x28(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
addq %rdx, %rcx
movzbl 0x3(%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x4a66
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq 0x20(%rax), %rax
movzbl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4aff
movq -0x18(%rbp), %rdi
movq 0x20(%rdi), %rax
movq %rax, -0x20(%rbp)
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, %rdi
callq 0x3100
movq -0x18(%rbp), %rdi
addq $0x9, %rax
movq %rax, -0x30(%rbp)
movq (%rdi), %rax
callq *0x8(%rax)
movq %rax, %rdi
callq 0x3100
movq -0x18(%rbp), %rdi
movq %rax, %rcx
movq -0x30(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq (%rdi), %rax
callq *(%rax)
movq %rax, %rdi
callq 0x3100
movq -0x28(%rbp), %rcx
movq %rax, %rdx
movq -0x20(%rbp), %rax
addq %rdx, %rcx
movzbl 0x3(%rax,%rcx), %eax
movl %eax, -0x4(%rbp)
jmp 0x4b06
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x1efc9(%rip), %rcx     # 0x23ba0
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rcx
movq %rcx, 0x40(%rax)
movb $0x0, 0x38(%rax)
movl $0x0, 0x24(%rax)
movb $0x0, 0xa4(%rax)
movl $0xffff, 0x10(%rax)     # imm = 0xFFFF
movl $0x0, -0x24(%rbp)
cmpl $0xb, -0x24(%rbp)
jae 0x4c49
movq -0x30(%rbp), %rax
movslq -0x24(%rbp), %rcx
movl $0x10000, 0x48(%rax,%rcx,8) # imm = 0x10000
movslq -0x24(%rbp), %rcx
movb $0x0, 0x4c(%rax,%rcx,8)
movslq -0x24(%rbp), %rcx
movb $0x1, 0x4d(%rax,%rcx,8)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4c16
movq -0x30(%rbp), %rax
movl $0x0, 0xa0(%rax)
leaq 0x30852(%rip), %rdi     # 0x354b0
xorl %esi, %esi
movl $0x3fc, %edx            # imm = 0x3FC
callq 0x3130
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
addq $0x8, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x9, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x14, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x1c, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x1d, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movq -0x20(%rbp), %rdi
addq $0x1e, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x3470
movb $0x1, %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
addq $0x8, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0x9, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0xc, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x33a0
movq -0x20(%rbp), %rdi
movl 0x10(%rdi), %eax
andl $0xffff, %eax           # imm = 0xFFFF
movl %eax, 0x10(%rdi)
addq $0x20, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0x14, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0x18, %rdi
movq -0x18(%rbp), %rcx
movl $0x4, %esi
movl $0x1, %edx
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0x1c, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0x1d, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x33a0
movq -0x20(%rbp), %rdi
addq $0x1e, %rdi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
movq %rdx, %rsi
callq 0x33a0
movb $0x1, %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/Cpu.cpp
// Function: CPU::Reset()
void CPU::Reset()
{
	ST=0x24;
	softreset();
	IRQcount = cycle = 0;
	irq_sequence = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
movl $0x24, 0x18(%rdi)
callq 0x4f80
movq -0x10(%rbp), %rax
movl $0x0, 0x20(%rax)
movl $0x0, 0x24(%rax)
movb $0x0, 0x38(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x10510(%rip), %rax     # 0x23be0
movq %rax, (%rdi)
movl -0x14(%rbp), %eax
andl $-0x2, %eax
movl %eax, 0x8(%rdi)
movq $0x0, 0x10(%rdi)
movq $0x0, 0x20(%rdi)
movl -0x10(%rbp), %eax
movl %eax, 0x3c(%rdi)
movl $0xc, 0x40(%rdi)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x48(%rdi)
movl -0xc(%rbp), %eax
cvtsi2sd %rax, %xmm0
movl -0x10(%rbp), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x13730
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x28(%rbp)
movl $0x0, -0x14(%rbp)
movl 0x28(%rcx), %eax
movl %eax, -0x18(%rbp)
movl 0x28(%rcx), %eax
addl $0x1, %eax
xorl %edx, %edx
divl 0x18(%rcx)
movq -0x28(%rbp), %rax
movl %edx, 0x28(%rax)
movswl -0xa(%rbp), %esi
movq 0x20(%rax), %rcx
movslq -0x18(%rbp), %rdx
movl %esi, (%rcx,%rdx,4)
movl 0x18(%rax), %eax
subl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x28(%rbp), %rcx
movq 0x20(%rcx), %rax
movslq -0x18(%rbp), %rdx
movl (%rax,%rdx,4), %eax
movq 0x10(%rcx), %rcx
movslq -0x10(%rbp), %rdx
imull (%rcx,%rdx,4), %eax
addl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x18(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x1401b
movq -0x28(%rbp), %rax
movl 0x18(%rax), %eax
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0x1401d
movl -0x10(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x10(%rbp)
cmpl $0x0, %eax
jne 0x13fde
movq -0x28(%rbp), %rcx
movl -0x14(%rbp), %eax
movl 0x40(%rcx), %ecx
sarl %cl, %eax
movw %ax, -0x1a(%rbp)
movw -0x1a(%rbp), %ax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
testl %eax, %eax
jne 0x144f0
jmp 0x144e0
movq -0x18(%rbp), %rax
movl $0xd87c0, 0x41c0(%rax)  # imm = 0xD87C0
jmp 0x144fe
movq -0x18(%rbp), %rax
movl $0xf08a0, 0x41c0(%rax)  # imm = 0xF08A0
movq -0x18(%rbp), %rdi
callq 0x14460
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xf69f(%rip), %rcx      # 0x23c00
addq $0x10, %rcx
movq %rcx, (%rax)
movb $0x0, 0x41b5(%rax)
movl $0x0, -0x14(%rbp)
cmpl $0x3, -0x14(%rbp)
jae 0x14653
movq -0x20(%rbp), %rax
movl -0x14(%rbp), %edx
movq %rax, %rcx
addq $0x8, %rcx
movl -0x14(%rbp), %esi
imulq $0x78, %rsi, %rsi
addq %rsi, %rcx
movl %edx, (%rcx)
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl $0x3, %ecx
xorl %edx, %edx
divl %ecx
movq -0x20(%rbp), %rax
movl %edx, %ecx
movq -0x30(%rbp), %rdx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rdx
movq %rax, %rcx
addq $0x8, %rcx
movl -0x14(%rbp), %esi
imulq $0x78, %rsi, %rsi
addq %rsi, %rcx
movq %rdx, 0x10(%rcx)
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl $0x3, %ecx
xorl %edx, %edx
divl %ecx
movq -0x20(%rbp), %rax
movl %edx, %ecx
movq -0x28(%rbp), %rdx
movl %ecx, %ecx
imulq $0x78, %rcx, %rcx
addq %rcx, %rdx
movq %rax, %rcx
addq $0x8, %rcx
movl -0x14(%rbp), %esi
imulq $0x78, %rsi, %rsi
addq %rsi, %rcx
movq %rdx, 0x18(%rcx)
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
shrl %cl, %edx
movl %edx, %ecx
andl $0x1, %ecx
cmpl $0x0, %ecx
setne %cl
xorb $-0x1, %cl
xorb $-0x1, %cl
addq $0x8, %rax
movl -0x14(%rbp), %edx
imulq $0x78, %rdx, %rdx
addq %rdx, %rax
andb $0x1, %cl
movb %cl, 0x6c(%rax)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x14576
movq -0x20(%rbp), %rdi
movl $0x0, 0x198(%rdi)
movl -0xc(%rbp), %esi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
xorl %esi, %esi
callq *0x28(%rax)
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::read(unsigned int)
unsigned char SIDsound::read(unsigned int adr)
{
	switch(adr) {
		case 0x19:
		case 0x1A:
			// POTX/POTY paddle AD converters (unemulated)
			lastByteWritten = 0;
			return 0xFF;

		// Voice 3 (only) oscillator readout
		case 0x1B:
			lastByteWritten = 0;
			return (unsigned char)(getWaveSample(voice[2]) >> 4); // 4?

		// Voice 3 EG readout
		case 0x1C:
			return (unsigned char)(voice[2].envCurrLevel);

		case 0x1E: // Digiblaster DAC readout
			if (enableDigiBlaster && model_ == SID8580)
			{
				return (unsigned char) (dcDigiBlaster >> DIGIBLASTER_MULT);
			}
			return lastByteWritten;

		default:
			// Write-only registers return the last value written
			return lastByteWritten;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %eax
addl $-0x19, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x5, %eax
ja 0x149fe
movq -0x20(%rbp), %rax
leaq 0xaa19(%rip), %rcx      # 0x1f390
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x28(%rbp), %rax
movb $0x0, 0x41b4(%rax)
movb $-0x1, -0x1(%rbp)
jmp 0x14a0b
movq -0x28(%rbp), %rdi
movb $0x0, 0x41b4(%rdi)
addq $0x8, %rdi
addq $0xf0, %rdi
callq 0x152a0
sarl $0x4, %eax
movb %al, -0x1(%rbp)
jmp 0x14a0b
movq -0x28(%rbp), %rax
movl 0x140(%rax), %eax
movb %al, -0x1(%rbp)
jmp 0x14a0b
movq -0x28(%rbp), %rax
testb $0x1, 0x41b5(%rax)
je 0x149ef
movq -0x28(%rbp), %rax
cmpl $0x1, 0x41bc(%rax)
jne 0x149ef
movq -0x28(%rbp), %rax
movl 0x18c(%rax), %eax
sarl $0xe, %eax
movb %al, -0x1(%rbp)
jmp 0x14a0b
movq -0x28(%rbp), %rax
movb 0x41b4(%rax), %al
movb %al, -0x1(%rbp)
jmp 0x14a0b
movq -0x28(%rbp), %rax
movb 0x41b4(%rax), %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::setFilterCutoff()
inline void SIDsound::setFilterCutoff()
{
	const double freqDomainDivCoeff = 2 * M_PI * 1.048576;
	w0 = int(cutOffFreq[filterCutoff] * freqDomainDivCoeff);
	// Limit cutoff to Nyquist frq to keep the sample based filter stable
	const double NyquistFrq = double(sampleRate) / 2;
	const double maxCutOff = NyquistFrq > 16000.0 ? 16000.0 : NyquistFrq;
	const int w0MaxDt = int(maxCutOff * freqDomainDivCoeff); // 16000
	if (w0 > w0MaxDt) w0 = w0MaxDt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movabsq $0x401a5a84d380747d, %rcx # imm = 0x401A5A84D380747D
movq %rcx, -0x10(%rbp)
movl 0x198(%rax), %ecx
movsd 0x1a0(%rax,%rcx,8), %xmm0
movsd 0xa1c3(%rip), %xmm1     # 0x1f368
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, 0x41a4(%rax)
movl 0x41b8(%rax), %eax
cvtsi2sd %rax, %xmm0
movsd 0xa0b2(%rip), %xmm1     # 0x1f278
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd 0xa184(%rip), %xmm1     # 0x1f360
ucomisd %xmm1, %xmm0
jbe 0x151f1
movsd 0xa176(%rip), %xmm0     # 0x1f360
movsd %xmm0, -0x38(%rbp)
jmp 0x151fb
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %rax
movsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0xa157(%rip), %xmm0     # 0x1f368
mulsd -0x20(%rbp), %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, -0x24(%rbp)
movl 0x41a4(%rax), %eax
cmpl -0x24(%rbp), %eax
jle 0x15235
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %ecx
movl %ecx, 0x41a4(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::getWaveSample(SIDsound::SIDVoice&)
inline int SIDsound::getWaveSample(SIDVoice &v)
{
	switch (v.wave) {
		case WAVE_TRI:
			return waveTriangle(v);
		case WAVE_SAW:
			return waveSaw(v);
		case WAVE_PULSE:
			return wavePulse(v);
		case WAVE_TRISAW:
			return waveTriSaw(v);
		case WAVE_TRIPULSE:
			return waveTriPulse(v);
		case WAVE_SAWPULSE:
			return waveSawPulse(v);
		case WAVE_TRISAWPULSE:
			return waveTriSawPulse(v);
		case WAVE_NOISE:
			return v.waveNoiseOut;
		case WAVE_NONE:
			if (v.accu) {
				int rv = (v.accu >> 12);
				//v.accu >>= 1;
				//return rv;
			}
		default:
			return 0x000;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movq %rax, -0x20(%rbp)
subq $0x8, %rax
ja 0x1535f
movq -0x20(%rbp), %rax
leaq 0xa2b0(%rip), %rcx      # 0x1f57c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
callq 0x157d0
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rdi
callq 0x15840
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rdi
callq 0x15860
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rdi
callq 0x15890
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rdi
callq 0x158d0
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rdi
callq 0x15910
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rdi
callq 0x15950
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x15366
movq -0x10(%rbp), %rax
cmpl $0x0, 0x20(%rax)
je 0x1535d
movq -0x10(%rbp), %rax
movl 0x20(%rax), %eax
shrl $0xc, %eax
movl %eax, -0x14(%rbp)
jmp 0x1535f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::clock()
inline unsigned int SIDsound::clock()
{
	unsigned int count = sidCyclesPerSampleInt;
	unsigned int newCount = clockDeltaFraction + clockDeltaRemainder;

	if (newCount >= sampleRate) {
		clockDeltaRemainder = newCount - sampleRate;
		count++;
	} else
		clockDeltaRemainder = newCount;
	return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0x174(%rcx), %eax
movl %eax, -0xc(%rbp)
movl 0x17c(%rcx), %eax
addl 0x178(%rcx), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl 0x41b8(%rcx), %eax
jb 0x153c1
movq -0x18(%rbp), %rax
movl -0x10(%rbp), %ecx
subl 0x41b8(%rax), %ecx
movl %ecx, 0x178(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x153ce
movq -0x18(%rbp), %rax
movl -0x10(%rbp), %ecx
movl %ecx, 0x178(%rax)
movl -0xc(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/calmopyrin[P]tedplay/Sid.cpp
// Function: SIDsound::updateShiftReg(SIDsound::SIDVoice&)
inline void SIDsound::updateShiftReg(SIDVoice &v)
{
	unsigned int &shiftReg = v.shiftReg;
	unsigned int bit22 = bit(shiftReg,22);
	unsigned int bit17 = bit(shiftReg,17);

	// Shift 1 bit left
	shiftReg = ((shiftReg) << 1);// & 0x7fffff;

	// Feed bit 0
	shiftReg = shiftReg | (bit22 ^ bit17);
	// Store output
	v.waveNoiseOut = waveNoise(v);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
movl $0x16, %esi
callq 0x15150
movl %eax, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, %edi
movl $0x11, %esi
callq 0x15150
movl %eax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
shll %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movl -0x1c(%rbp), %eax
xorl -0x20(%rbp), %eax
orl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x159a0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x2c(%rax)
addq $0x20, %rsp
popq %rbp
retq