// File: /workspace/github_c_makefile_star2_O0/mikecat[P]x86_interpreter/dmem_libc_time.c
// Function: dmem_libc_strftime
int dmem_libc_strftime(uint32_t* ret, uint32_t esp) {
	static const char* const weekday_name_full[] = {
		"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
	};
	static const char* const weekday_name_abb[] = {
		"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
	};
	static const char* month_name_full[] = {
		"January", "February", "March", "April", "May", "June",
		"July", "August", "September", "October", "November", "December"
	};
	static const char* month_name_abb[] = {
		"Jan", "Feb", "Mar", "Apr", "May", "Jun",
		"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
	};
	uint32_t out_ptr, out_max, format_ptr, tm_ptr;
	uint32_t sec, min, hour, mday, mon, year, wday, yday;
	char* format;
	char* out_data;
	const char* format_itr = NULL;
	const char* format_itr_ret = NULL;
	int alt_format = 0;
	uint32_t out_count = 0;
	int ok;
	if (!dmem_get_args(esp, 4, &out_ptr, &out_max, &format_ptr, &tm_ptr)) return 0;
	if (!dmemory_is_allocated(out_ptr, out_max)) return 0;

	sec = dmem_read_uint(&ok, tm_ptr + 0, 4); if (!ok) return 0;
	min = dmem_read_uint(&ok, tm_ptr + 4, 4); if (!ok) return 0;
	hour = dmem_read_uint(&ok, tm_ptr + 8, 4); if (!ok) return 0;
	mday = dmem_read_uint(&ok, tm_ptr + 12, 4); if (!ok) return 0;
	mon = dmem_read_uint(&ok, tm_ptr + 16, 4); if (!ok) return 0;
	year = dmem_read_uint(&ok, tm_ptr + 20, 4); if (!ok) return 0;
	wday = dmem_read_uint(&ok, tm_ptr + 24, 4); if (!ok) return 0;
	yday = dmem_read_uint(&ok, tm_ptr + 28, 4); if (!ok) return 0;

	format = dmem_read_string(format_ptr);
	if (format == NULL) return 0;
	out_data = malloc(out_max);
	if (out_data == NULL) {
		free(format);
		return 0;
	}

	for (format_itr = format; out_count < out_max;) {
		if (*format_itr == '\0' && alt_format) {
			format_itr = format_itr_ret;
			alt_format = 0;
		}
		if (*format_itr == '\0') {
			break;
		} else if (*format_itr == '%') {
			const char* append_str = NULL;
			int do_append_int = 0;
			uint32_t append_int_digits = 0;
			uint32_t append_int = 0;
			format_itr++;
			if (*format_itr == 'E' || *format_itr == 'O') format_itr++;
			if (*format_itr == '\0') break;
			switch (*(format_itr++)) {
			case 'a':
				if (wday < 7) append_str = weekday_name_abb[wday];
				break;
			case 'A':
				if (wday < 7) append_str = weekday_name_full[wday];
				break;
			case 'b':
				if (mon < 12) append_str = month_name_abb[mon];
				break;
			case 'B':
				if (mon < 12) append_str = month_name_full[mon];
				break;
			case 'c':
				format_itr_ret = format_itr;
				format_itr = "%a %b %e %H:%M:%S %Y"; /* "%a %b %e %T %Y" with %T expanded */
				alt_format = 1;
				break;
			case 'C':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = (year + 1900) / 100;
				break;
			case 'd':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = mday;
				break;
			case 'D':
				format_itr_ret = format_itr;
				format_itr = "%m/%d/%y";
				alt_format = 1;
				break;
			case 'e':
				if (mday < 10) {
					out_data[out_count++] = ' ';
					if (out_count < out_max) out_data[out_count++] = '0' + mday;
				} else {
					do_append_int = 1;
					append_int_digits = 2;
					append_int = mday;
				}
				break;
			case 'F':
				format_itr_ret = format_itr;
				format_itr = "%Y-%m-%d";
				alt_format = 1;
				break;
			case 'G':
				/* TODO (not supported) */
				append_str = "%G";
				break;
			case 'h':
				format_itr_ret = format_itr;
				format_itr = "%b";
				alt_format = 1;
				break;
			case 'H':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = hour;
				break;
			case 'I':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = hour % 12 == 0 ? 12 : hour % 12;
				break;
			case 'j':
				do_append_int = 1;
				append_int_digits = 3;
				append_int = yday + 1;
				break;
			case 'm':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = mon + 1;
				break;
			case 'M':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = min;
				break;
			case 'n':
				append_str = "\n";
				break;
			case 'p':
				append_str = hour >= 12 ? "PM" : "AM";
				break;
			case 'r':
				format_itr_ret = format_itr;
				format_itr = "%I:%M:%S %p";
				alt_format = 1;
				break;
			case 'R':
				format_itr_ret = format_itr;
				format_itr = "%H:%M";
				alt_format = 1;
				break;
			case 'S':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = sec;
				break;
			case 't':
				append_str = "\t";
				break;
			case 'T':
				format_itr_ret = format_itr;
				format_itr = "%H:%M:%S";
				alt_format = 1;
				break;
			case 'u':
				do_append_int = 1;
				append_int_digits = 1;
				append_int = wday == 0 ? 7 : wday;
				break;
			case 'U':
				/* TODO (not supported) */
				append_str = "%U";
				break;
			case 'V':
				/* TODO (not supported) */
				append_str = "%V";
				break;
			case 'w':
				do_append_int = 1;
				append_int_digits = 1;
				append_int = wday;
				break;
			case 'W':
				/* TODO (not supported) */
				append_str = "%W";
				break;
			case 'x':
				format_itr_ret = format_itr;
				format_itr = "%m/%d/%y";
				alt_format = 1;
				break;
			case 'X':
				format_itr_ret = format_itr;
				format_itr = "%H:%M:%S"; /* "%T" with %T expanded */
				alt_format = 1;
				break;
			case 'y':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = year % 100;
				break;
			case 'Y':
				do_append_int = 1;
				append_int_digits = 2;
				append_int = year + 1900;
				break;
			case 'z':
				append_str = "+0900";
				break;
			case 'Z':
				append_str = "JST";
				break;
			case '%':
				append_str = "%";
				break;
			}
			if (append_str != NULL) {
				const char* as_ptr = append_str;
				while (*as_ptr != '\0' && out_count < out_max) {
					out_data[out_count++] = *(as_ptr++);
				}
			}
			if (do_append_int) {
				uint64_t pos = 1;
				uint32_t i;
				for (i = 0; i < append_int_digits || pos <= append_int; i++) pos *= 10;
				for (pos /= 10; out_count < out_max && pos > 0; pos /= 10) {
					out_data[out_count++] = '0' + ((uint32_t)(append_int / pos) % 10);
				}
			}
		} else {
			out_data[out_count++] = *(format_itr++);
		}
	}

	if (out_count < out_max) {
		out_data[out_count] = '\0';
		dmemory_write(out_data, out_ptr, out_count + 1);
		*ret = out_count;
	} else {
		*ret = 0;
	}

	free(format);
	free(out_data);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movl $0x0, -0x6c(%rbp)
movl $0x0, -0x70(%rbp)
movl -0x14(%rbp), %edi
movl $0x4, %esi
leaq -0x18(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
leaq -0x20(%rbp), %r8
leaq -0x24(%rbp), %r9
movb $0x0, %al
callq 0x8280
cmpl $0x0, %eax
jne 0xbe40
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x7f60
cmpl $0x0, %eax
jne 0xbe5c
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0x0, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbe85
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0x4, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbeae
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0x8, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbed7
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0xc, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbf00
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0x10, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x38(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbf29
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0x14, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbf52
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0x18, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbf7b
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x24(%rbp), %esi
addl $0x1c, %esi
leaq -0x74(%rbp), %rdi
movl $0x4, %edx
callq 0x8110
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x74(%rbp)
jne 0xbfa4
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x20(%rbp), %edi
callq 0x81d0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0xbfc3
movl $0x0, -0x4(%rbp)
jmp 0xc789
movl -0x1c(%rbp), %eax
movl %eax, %edi
callq 0x1110
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0xbfed
movq -0x50(%rbp), %rdi
callq 0x1030
movl $0x0, -0x4(%rbp)
jmp 0xc789
movq -0x50(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x70(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0xc736
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xc022
cmpl $0x0, -0x6c(%rbp)
je 0xc022
movq -0x68(%rbp), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x6c(%rbp)
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xc033
jmp 0xc736
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x25, %eax
jne 0xc70a
movq $0x0, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl $0x0, -0x88(%rbp)
movl $0x0, -0x8c(%rbp)
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x45, %eax
je 0xc08d
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4f, %eax
jne 0xc099
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xc0aa
jmp 0xc736
movq -0x60(%rbp), %rax
movq %rax, %rcx
incq %rcx
movq %rcx, -0x60(%rbp)
movsbl (%rax), %eax
addl $-0x25, %eax
movl %eax, %ecx
movq %rcx, -0xb0(%rbp)
subl $0x55, %eax
ja 0xc586
movq -0xb0(%rbp), %rax
leaq 0x5cde(%rip), %rcx      # 0x11dbc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpl $0x7, -0x40(%rbp)
jae 0xc101
movl -0x40(%rbp), %eax
movl %eax, %ecx
leaq 0x8ca7(%rip), %rax      # 0x14da0
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
jmp 0xc586
cmpl $0x7, -0x40(%rbp)
jae 0xc120
movl -0x40(%rbp), %eax
movl %eax, %ecx
leaq 0x8c48(%rip), %rax      # 0x14d60
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
jmp 0xc586
cmpl $0xc, -0x38(%rbp)
jae 0xc13f
movl -0x38(%rbp), %eax
movl %eax, %ecx
leaq 0x9019(%rip), %rax      # 0x15150
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
jmp 0xc586
cmpl $0xc, -0x38(%rbp)
jae 0xc15e
movl -0x38(%rbp), %eax
movl %eax, %ecx
leaq 0x8f9a(%rip), %rax      # 0x150f0
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5e79(%rip), %rax      # 0x11feb
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x3c(%rbp), %eax
addl $0x76c, %eax            # imm = 0x76C
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x8c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5e1d(%rip), %rax      # 0x12000
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
cmpl $0xa, -0x34(%rbp)
jae 0xc234
movq -0x58(%rbp), %rax
movl -0x70(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x70(%rbp)
movl %ecx, %ecx
movb $0x20, (%rax,%rcx)
movl -0x70(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0xc232
movl -0x34(%rbp), %eax
addl $0x30, %eax
movb %al, %dl
movq -0x58(%rbp), %rax
movl -0x70(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x70(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0xc251
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5da4(%rip), %rax      # 0x12009
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
leaq 0x5d96(%rip), %rax      # 0x12012
movq %rax, -0x80(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5d81(%rip), %rax      # 0x12015
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x30(%rbp), %eax
movl $0xc, %ecx
xorl %edx, %edx
divl %ecx
cmpl $0x0, %edx
jne 0xc2f8
movl $0xc, %edx
movl %edx, -0xb4(%rbp)
jmp 0xc30a
movl -0x30(%rbp), %eax
movl $0xc, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x3, -0x88(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
leaq 0x5114(%rip), %rax      # 0x114a2
movq %rax, -0x80(%rbp)
jmp 0xc586
movl -0x30(%rbp), %edx
leaq 0x5c7a(%rip), %rax      # 0x1201b
leaq 0x5c70(%rip), %rcx      # 0x12018
cmpl $0xc, %edx
cmovaeq %rcx, %rax
movq %rax, -0x80(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5c57(%rip), %rax      # 0x1201e
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5c44(%rip), %rax      # 0x1202a
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
leaq 0x5c11(%rip), %rax      # 0x12030
movq %rax, -0x80(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5bfb(%rip), %rax      # 0x12032
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x1, -0x88(%rbp)
cmpl $0x0, -0x40(%rbp)
jne 0xc46e
movl $0x7, %eax
movl %eax, -0xb8(%rbp)
jmp 0xc477
movl -0x40(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
leaq 0x5bac(%rip), %rax      # 0x1203b
movq %rax, -0x80(%rbp)
jmp 0xc586
leaq 0x5b9f(%rip), %rax      # 0x1203e
movq %rax, -0x80(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x1, -0x88(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0x8c(%rbp)
jmp 0xc586
leaq 0x5b70(%rip), %rax      # 0x12041
movq %rax, -0x80(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5b17(%rip), %rax      # 0x12000
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x5b2a(%rip), %rax      # 0x12032
movq %rax, -0x60(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x3c(%rbp), %eax
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, -0x8c(%rbp)
jmp 0xc586
movl $0x1, -0x84(%rbp)
movl $0x2, -0x88(%rbp)
movl -0x3c(%rbp), %eax
addl $0x76c, %eax            # imm = 0x76C
movl %eax, -0x8c(%rbp)
jmp 0xc586
leaq 0x5adc(%rip), %rax      # 0x12044
movq %rax, -0x80(%rbp)
jmp 0xc586
leaq 0x5ad5(%rip), %rax      # 0x1204a
movq %rax, -0x80(%rbp)
jmp 0xc586
leaq 0x5acc(%rip), %rax      # 0x1204e
movq %rax, -0x80(%rbp)
cmpq $0x0, -0x80(%rbp)
je 0xc5f9
movq -0x80(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xb9(%rbp)
je 0xc5be
movl -0x70(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setb %al
movb %al, -0xb9(%rbp)
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0xc5ca
jmp 0xc5f7
movq -0x98(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x98(%rbp)
movb (%rax), %dl
movq -0x58(%rbp), %rax
movl -0x70(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x70(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0xc598
jmp 0xc5f9
cmpl $0x0, -0x84(%rbp)
je 0xc708
movq $0x1, -0xa0(%rbp)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %ecx
movb $0x1, %al
cmpl -0x88(%rbp), %ecx
movb %al, -0xba(%rbp)
jb 0xc64a
movq -0xa0(%rbp), %rax
movl -0x8c(%rbp), %ecx
cmpq %rcx, %rax
setbe %al
movb %al, -0xba(%rbp)
movb -0xba(%rbp), %al
testb $0x1, %al
jne 0xc656
jmp 0xc676
imulq $0xa, -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0xc61b
movq -0xa0(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xa0(%rbp)
movl -0x70(%rbp), %ecx
xorl %eax, %eax
cmpl -0x1c(%rbp), %ecx
movb %al, -0xbb(%rbp)
jae 0xc6af
cmpq $0x0, -0xa0(%rbp)
seta %al
movb %al, -0xbb(%rbp)
movb -0xbb(%rbp), %al
testb $0x1, %al
jne 0xc6bb
jmp 0xc706
movl -0x8c(%rbp), %eax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0xa0(%rbp)
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
addl $0x30, %edx
movq -0x58(%rbp), %rax
movl -0x70(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x70(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movq -0xa0(%rbp), %rax
movl $0xa, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, -0xa0(%rbp)
jmp 0xc68e
jmp 0xc708
jmp 0xc72f
movq -0x60(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x60(%rbp)
movb (%rax), %dl
movq -0x58(%rbp), %rax
movl -0x70(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x70(%rbp)
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
jmp 0xc731
jmp 0xbff5
movl -0x70(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jae 0xc766
movq -0x58(%rbp), %rax
movl -0x70(%rbp), %ecx
movb $0x0, (%rax,%rcx)
movq -0x58(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x70(%rbp), %edx
addl $0x1, %edx
callq 0x7ad0
movl -0x70(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
jmp 0xc770
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
movq -0x50(%rbp), %rdi
callq 0x1030
movq -0x58(%rbp), %rdi
callq 0x1030
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop