// File: /workspace/github_c_makefile_star2_O3/aparrish[P]rwet-examples-c/ut_randlines.c
// Function: main
int main(int argc, char* argv[]) {

	/* create ut array, use built-in str array helper type */
	UT_array* lines;
	utarray_new(lines, &ut_str_icd);

	srand(time(NULL));

	/* read in lines */
	while (!feof(stdin)) {
		int len = 0;
		char* line = NULL;

		/* ap_getline populates line with pointer to malloced char* */
		len = ap_getline(&line, stdin);
		utarray_push_back(lines, &line);

		/* push_back copies the string, so we can free ours here */
		free(line); 
	}

	/* shuffle the lines */
	utarray_sort(lines, shuffle);

	/* iterate through the lines */
	char** current = NULL;
	while ((current = (char**)utarray_next(lines, current))) {
		printf("%s", *current);
	}

	utarray_free(lines);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0x1, %edi
movl $0x30, %esi
callq 0x1070
movups 0x2b90(%rip), %xmm0     # 0x3dd0
movups %xmm0, 0x8(%rax)
movups 0x2b95(%rip), %xmm0     # 0x3de0
movq %rax, 0x8(%rsp)
movups %xmm0, 0x18(%rax)
xorl %ebp, %ebp
xorl %edi, %edi
callq 0x10a0
movl %eax, %edi
callq 0x1060
movq 0x2d75(%rip), %rbx      # 0x3fe0
movq (%rbx), %rdi
callq 0x1080
movl $0x8, %r14d
movl $0x0, %r15d
testl %eax, %eax
jne 0x1387
movq 0x8(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x20(%rsp)
xorl %r12d, %r12d
leaq 0x1ab(%rip), %rax       # 0x144a
movq %rax, 0x18(%rsp)
movl $0x8, %r15d
xorl %r13d, %r13d
movq %rbx, %rcx
xorl %ebx, %ebx
movq $0x0, 0x10(%rsp)
movq (%rcx), %rsi
leaq 0x10(%rsp), %rdi
callq 0x1474
leal 0x1(%rbx), %ebp
cmpl %r13d, %ebp
jbe 0x1318
testl %r13d, %r13d
leal (%r13,%r13), %eax
movl %eax, %r13d
cmovel %r15d, %r13d
cmpl %r13d, %ebp
ja 0x12d0
movq 0x8(%rsp), %rcx
movl %r13d, 0x4(%rcx)
movl %r13d, %eax
imulq %rax, %r14
movq %r12, %rdi
movq %r14, %rsi
movq %rcx, %r14
callq 0x10c0
movq %rax, 0x28(%r14)
testq %rax, %rax
je 0x1440
movq %rax, %r12
movq 0x18(%r14), %rcx
jmp 0x131d
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rax
movq (%rax), %r14
movl %ebx, %edi
imulq %r14, %rdi
testq %rcx, %rcx
movq %rcx, 0x18(%rsp)
je 0x1341
addq %r12, %rdi
leaq 0x10(%rsp), %rsi
callq *%rcx
jmp 0x1351
addq %r12, %rdi
leaq 0x10(%rsp), %rsi
movq %r14, %rdx
callq 0x1090
movq 0x2c88(%rip), %rbx      # 0x3fe0
movq 0x8(%rsp), %rax
movl %ebp, (%rax)
movq 0x10(%rsp), %rdi
callq 0x1030
movq (%rbx), %rdi
callq 0x1080
movq %rbx, %rcx
movl %ebp, %ebx
testl %eax, %eax
je 0x12b2
movq 0x8(%rsp), %rax
movq 0x28(%rax), %r15
movl %ebp, %r12d
leaq -0x185(%rip), %rcx      # 0x120c
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x1040
leaq 0xc5e(%rip), %r13       # 0x2004
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x13bb
subq %r15, %rbp
jae 0x13c5
testq %r12, %r12
je 0x13f4
xorl %ebp, %ebp
jmp 0x13d8
movq %r15, %rbp
testq %r12, %r12
jne 0x13df
jmp 0x13f4
movq %rbp, %rax
xorl %edx, %edx
divq %r14
movq %rax, %rbp
incq %rbp
cmpq %r12, %rbp
jae 0x13f4
imulq %r14, %rbp
addq %r15, %rbp
testq %rbp, %rbp
je 0x13f4
movq (%rbp), %rsi
movq %r13, %rdi
xorl %eax, %eax
callq 0x1050
jmp 0x13a8
movq 0x8(%rsp), %rdi
cmpl $0x0, 0x4(%rdi)
je 0x142a
movq 0x20(%rdi), %rbx
testq %rbx, %rbx
je 0x141d
testl %r12d, %r12d
je 0x141d
movq %r15, %r13
movq %r13, %rdi
callq *%rbx
addq %r14, %r13
decq %r12
jne 0x1410
movq %r15, %rdi
callq 0x1030
movq 0x8(%rsp), %rdi
callq 0x1030
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x10d0