// File: /workspace/github_c_makefile_star2_O0/aparrish[P]rwet-examples-c/markov_gen.c
// Function: markov_gen_dump
void markov_gen_dump(markov_gen_t* mg) {
	ngram_t* current, * tmp;
	char* joined_nexts, * joined_ngram;
	int joined_len, i;

	printf("ngrams:\n");
	HASH_ITER(hh, mg->ngrams, current, tmp) {
		joined_len = join_new(&joined_ngram, current->ngram, " ");
		joined_len = join_new(&joined_nexts, current->possible_nexts, ", ");
		printf("\t%s -> %s\n", joined_ngram, joined_nexts);
		free(joined_ngram);
		free(joined_nexts);
	}

	printf("beginnings:\n");
	for (i = 0; i < utarray_len(mg->beginnings); i++) {
		current = *((ngram_t**)utarray_eltptr(mg->beginnings, i));
		printf("\t%s\n", current->ngram_key);
	}

	printf("a random beginning:\n");
	current = *((ngram_t**)utarray_choice(mg->beginnings));
	printf("\t%s\n", current->ngram_key);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xf8c(%rip), %rdi       # 0x50af
movb $0x0, %al
callq 0x1060
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x4153
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
jmp 0x415b
xorl %eax, %eax
movq %rax, -0x38(%rbp)
jmp 0x415b
movq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x41fe
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x28(%rbp), %rdi
leaq 0xf38(%rip), %rdx       # 0x50b9
callq 0x1780
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x20(%rbp), %rdi
leaq 0xf1c(%rip), %rdx       # 0x50b8
callq 0x1780
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq 0xf08(%rip), %rdi       # 0x50bb
movb $0x0, %al
callq 0x1060
movq -0x28(%rbp), %rdi
callq 0x1030
movq -0x20(%rbp), %rdi
callq 0x1030
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x41e9
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x41f1
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x41f1
movq -0x40(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x4163
leaq 0xec1(%rip), %rdi       # 0x50c6
movb $0x0, %al
callq 0x1060
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl (%rcx), %eax
jae 0x428d
movl -0x30(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
cmpl (%rcx), %eax
jae 0x425a
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rcx
movslq -0x30(%rbp), %rdx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x4262
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x4262
movq -0x48(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0xe58(%rip), %rdi       # 0x50d3
movb $0x0, %al
callq 0x1060
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4213
leaq 0xe44(%rip), %rdi       # 0x50d8
movb $0x0, %al
callq 0x1060
callq 0x1150
movq -0x8(%rbp), %rcx
movq 0x10(%rcx), %rcx
xorl %edx, %edx
divl (%rcx)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpl (%rax), %edx
jae 0x4300
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
callq 0x1150
movq -0x60(%rbp), %rcx
movq -0x8(%rbp), %rdx
movq 0x10(%rdx), %rsi
xorl %edx, %edx
divl (%rsi)
movq -0x58(%rbp), %rax
movl %edx, %edx
imulq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
jmp 0x4308
xorl %eax, %eax
movq %rax, -0x50(%rbp)
jmp 0x4308
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rsi
leaq 0xdb2(%rip), %rdi       # 0x50d3
movb $0x0, %al
callq 0x1060
addq $0x60, %rsp
popq %rbp
retq
nop