// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0x34(%rsp), %rdx
leaq 0x30(%rsp), %rcx
leaq 0x64(%rsp), %r8
leaq 0x14(%rsp), %r9
movl %esi, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x735a
testl %eax, %eax
je 0xa851
movl 0x34(%rsp), %edi
movl 0x30(%rsp), %esi
callq 0x7134
testl %eax, %eax
je 0xa851
movl 0x14(%rsp), %esi
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r14)
je 0xa851
movl %eax, %ebp
movl 0x14(%rsp), %esi
addl $0x4, %esi
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r15)
je 0xa851
movl %eax, %r14d
movl 0x14(%rsp), %esi
addl $0x8, %esi
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r13)
je 0xa851
movl %eax, %r15d
movl 0x14(%rsp), %esi
addl $0xc, %esi
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r13)
je 0xa851
movl %eax, 0x24(%rsp)
movl 0x14(%rsp), %esi
addl $0x10, %esi
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r13)
je 0xa851
movq %rax, 0x48(%rsp)
movl 0x14(%rsp), %esi
addl $0x14, %esi
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r13)
je 0xa851
movl %r14d, 0x60(%rsp)
movq %rax, %r14
movl 0x14(%rsp), %esi
addl $0x18, %esi
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r13)
je 0xa851
movl %eax, 0x20(%rsp)
movl 0x14(%rsp), %esi
addl $0x1c, %esi
leaq 0x18(%rsp), %r13
movq %r13, %rdi
movl $0x4, %edx
callq 0x7250
cmpl $0x0, (%r13)
je 0xa851
movl %eax, 0x2c(%rsp)
movl 0x64(%rsp), %edi
callq 0x72dc
testq %rax, %rax
je 0xa851
movq %rax, 0x40(%rsp)
movl 0x30(%rsp), %r12d
movq %r12, %rdi
callq 0x1100
testq %rax, %rax
je 0xa841
movq %rax, %r13
movl %r15d, 0x28(%rsp)
movl $0x0, %r15d
testq %r12, %r12
je 0xa807
leal 0x76c(%r14), %ecx
movl %r14d, %eax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
shrq $0x25, %rax
imull $0x64, %eax, %eax
subl %eax, %r14d
movq %r14, 0x90(%rsp)
movq %rcx, %r8
movl 0x20(%rsp), %edi
testl %edi, %edi
movl $0x7, %eax
cmovnel %edi, %eax
movl %eax, 0x5c(%rsp)
movl 0x28(%rsp), %edx
cmpl $0xc, %edx
leaq 0x3d9c(%rip), %rax      # 0xdf64
leaq 0x3d98(%rip), %rcx      # 0xdf67
cmovaeq %rax, %rcx
movq %rcx, 0x88(%rsp)
movq 0x48(%rsp), %rsi
leal 0x1(%rsi), %eax
movl %eax, 0x58(%rsp)
incl 0x2c(%rsp)
movl %edx, %eax
movl $0xaaaaaaab, %ecx       # imm = 0xAAAAAAAB
imulq %rax, %rcx
shrq $0x23, %rcx
shll $0x2, %ecx
leal (%rcx,%rcx,2), %eax
movl %edx, %ecx
subl %eax, %ecx
movl $0xc, %eax
cmovnel %ecx, %eax
movl %eax, 0x54(%rsp)
movl 0x24(%rsp), %eax
orb $0x30, %al
movb %al, 0x1f(%rsp)
movq %r8, 0x78(%rsp)
imulq $0x51eb851f, %r8, %rax  # imm = 0x51EB851F
shrq $0x25, %rax
movq %rax, 0x80(%rsp)
movl %esi, %eax
shlq $0x2, %rax
movq %rax, 0x70(%rsp)
movl %edi, %eax
shlq $0x2, %rax
movq %rax, 0x68(%rsp)
xorl %edi, %edi
movabsq $-0x3333333333333333, %r14 # imm = 0xCCCCCCCCCCCCCCCD
xorl %r15d, %r15d
xorl %r8d, %r8d
xorl %r11d, %r11d
movq 0x40(%rsp), %rsi
testl %r8d, %r8d
movq %rsi, %rax
cmovneq %r11, %rax
cmpb $0x0, (%rsi)
cmovneq %rsi, %rax
cmovel %edi, %r8d
movzbl (%rax), %ecx
cmpl $0x25, %ecx
je 0xa29d
testl %ecx, %ecx
je 0xa807
incq %rax
movl %r15d, %edx
incl %r15d
movb %cl, (%r13,%rdx)
movq %rax, %rsi
jmp 0xa7cf
movzbl 0x1(%rax), %ecx
cmpl $0x4f, %ecx
movl 0x60(%rsp), %r10d
je 0xa2b0
cmpl $0x45, %ecx
jne 0xa2b6
addq $0x2, %rax
jmp 0xa2b9
incq %rax
movq %rax, %rsi
movzbl (%rax), %r9d
testl %r9d, %r9d
je 0xa7ca
incq %rsi
xorl %eax, %eax
leal -0x25(%r9), %ecx
cmpl $0x55, %ecx
movq %r9, 0x38(%rsp)
ja 0xa6c1
leaq 0x3989(%rip), %rdx      # 0xdc70
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl $0x1, %r8d
leaq 0x3c46(%rip), %rcx      # 0xdf4c
jmp 0xa598
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl $0x1, %r8d
leaq 0x3c5d(%rip), %rcx      # 0xdf7e
jmp 0xa598
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movq 0x78(%rsp), %rcx
jmp 0xa615
movb $0x1, %al
movq %rax, 0x8(%rsp)
cmpl $0xb, 0x48(%rsp)
ja 0xa653
leaq 0x3ad1(%rip), %rcx      # 0xde30
jmp 0xa426
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl $0x1, %r8d
leaq 0x3be7(%rip), %rcx      # 0xdf61
jmp 0xa598
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl %r10d, %esi
jmp 0xa6d2
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl 0x24(%rsp), %esi
jmp 0xa6d2
movl $0x1, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl 0x20(%rsp), %esi
jmp 0xa6d2
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x305b(%rip), %rax      # 0xd446
jmp 0xa69f
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl %ebp, %esi
jmp 0xa6d2
movb $0x1, %al
movq %rax, 0x8(%rsp)
cmpl $0xb, 0x48(%rsp)
ja 0xa653
leaq 0x39da(%rip), %rcx      # 0xde00
movq 0x70(%rsp), %rax
jmp 0xa648
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl $0x1, %r8d
leaq 0x3af1(%rip), %rcx      # 0xdf37
jmp 0xa598
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl $0x1, %r8d
leaq 0x3b15(%rip), %rcx      # 0xdf76
jmp 0xa598
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x3b20(%rip), %rax      # 0xdf96
jmp 0xa69f
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
movq %rsi, (%rsp)
movq 0x88(%rsp), %rax
jmp 0xa6ce
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x3ad7(%rip), %rax      # 0xdf7c
jmp 0xa69f
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x3ae0(%rip), %rax      # 0xdf9a
jmp 0xa69f
movb $0x1, %al
movq %rax, 0x8(%rsp)
cmpl $0x6, 0x20(%rsp)
ja 0xa653
leaq 0x38f0(%rip), %rcx      # 0xddc8
jmp 0xa643
xorl %edi, %edi
movl 0x24(%rsp), %ecx
cmpl $0x9, %ecx
ja 0xa7da
leal 0x1(%r15), %eax
movl %r15d, %ecx
movb $0x20, (%r13,%rcx)
movb $0x1, %cl
movq %rcx, 0x8(%rsp)
cmpl %r12d, %eax
jae 0xa7f7
addl $0x2, %r15d
movl %eax, %eax
movb 0x1f(%rsp), %cl
movb %cl, (%r13,%rax)
jmp 0xa653
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl $0x1, %r8d
leaq 0x3a22(%rip), %rcx      # 0xdf55
jmp 0xa598
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x3a19(%rip), %rax      # 0xdf5e
jmp 0xa69f
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movq 0x80(%rsp), %rcx
jmp 0xa615
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x3a0a(%rip), %rax      # 0xdf87
jmp 0xa69f
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movl $0x1, %r8d
leaq 0x39d2(%rip), %rcx      # 0xdf6a
movq %rcx, (%rsp)
movq %rsi, %r11
jmp 0xa6cc
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl 0x54(%rsp), %esi
jmp 0xa6d2
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl 0x28(%rsp), %esi
jmp 0xa6d2
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x399b(%rip), %rax      # 0xdf8d
jmp 0xa69f
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movq 0x90(%rsp), %rcx
movl %ecx, %esi
jmp 0xa6d2
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x395e(%rip), %rax      # 0xdf8a
jmp 0xa69f
movb $0x1, %al
movq %rax, 0x8(%rsp)
cmpl $0x6, 0x20(%rsp)
ja 0xa653
leaq 0x37a1(%rip), %rcx      # 0xdde4
movq 0x68(%rsp), %rax
movslq (%rax,%rcx), %rax
addq %rcx, %rax
xorl %edx, %edx
jmp 0xa69f
xorl %eax, %eax
jmp 0xa6c8
movl $0x2, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl 0x58(%rsp), %esi
jmp 0xa6d2
movl $0x3, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl 0x2c(%rsp), %esi
jmp 0xa6d2
movb $0x1, %al
movq %rax, 0x8(%rsp)
xorl %edx, %edx
leaq 0x38f1(%rip), %rax      # 0xdf90
movq %rsi, (%rsp)
jmp 0xa6ce
movl $0x1, %edi
movb $0x1, %dl
xorl %eax, %eax
movq %rsi, (%rsp)
movq $0x0, 0x8(%rsp)
movl 0x5c(%rsp), %esi
jmp 0xa6d2
movb $0x1, %cl
movq %rcx, 0x8(%rsp)
movq %rsi, (%rsp)
xorl %edx, %edx
xorl %edi, %edi
xorl %esi, %esi
movq %r11, %r9
testq %rax, %rax
je 0xa70f
movb (%rax), %r11b
testb %r11b, %r11b
je 0xa70f
cmpl %r12d, %r15d
jae 0xa70f
movl %r15d, %ecx
incq %rcx
incq %rax
movb %r11b, -0x1(%r13,%rcx)
movb (%rax), %r11b
incl %r15d
testb %r11b, %r11b
je 0xa70f
leaq 0x1(%rcx), %r10
incq %rax
cmpq %r12, %rcx
movq %r10, %rcx
jb 0xa6f0
cmpb $0x0, 0x8(%rsp)
je 0xa724
movq (%rsp), %rsi
xorl %edi, %edi
movq %r9, %r11
jmp 0xa7c5
movl %esi, %ecx
testl %esi, %esi
setne %al
orb %al, %dl
movl $0x1, %esi
cmpb $0x1, %dl
movl $0xcccccccd, %r10d      # imm = 0xCCCCCCCD
movq %r9, %r11
jne 0xa75a
movl $0x1, %eax
movl %eax, %edx
addq %rsi, %rsi
leaq (%rsi,%rsi,4), %rsi
leal 0x1(%rdx), %eax
cmpl %edi, %edx
jb 0xa745
cmpq %rcx, %rsi
jbe 0xa745
cmpl %r12d, %r15d
setb %al
cmpq $0xa, %rsi
setae %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0xa7bf
movl %r15d, %r11d
incq %r11
movq %rsi, %rax
mulq %r14
movq %rdx, %rdi
shrq $0x3, %rdi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
movq %rax, %rdx
imulq %r10, %rdx
shrq $0x23, %rdx
addl %edx, %edx
leal (%rdx,%rdx,4), %edx
subl %edx, %eax
orb $0x30, %al
movb %al, -0x1(%r13,%r11)
incl %r15d
cmpq %r12, %r11
jae 0xa716
incq %r11
cmpq $0x63, %rsi
movq %rdi, %rsi
ja 0xa774
jmp 0xa716
movq (%rsp), %rsi
xorl %edi, %edi
movq 0x38(%rsp), %r9
testl %r9d, %r9d
je 0xa807
cmpl %r12d, %r15d
jb 0xa262
jmp 0xa807
movl $0x2, %edi
movb $0x1, %dl
movq %rsi, (%rsp)
xorl %eax, %eax
movq $0x0, 0x8(%rsp)
movl %ecx, %esi
jmp 0xa6d2
movq %rsi, (%rsp)
movl %eax, %r15d
xorl %eax, %eax
xorl %edx, %edx
jmp 0xa6d0
cmpl %r12d, %r15d
movl $0x0, %eax
jae 0xa82d
movl %r15d, %eax
movb $0x0, (%r13,%rax)
movl 0x34(%rsp), %esi
leal 0x1(%r15), %edx
movq %r13, %rdi
callq 0x6d8a
movl %r15d, %eax
movl %eax, (%rbx)
movq 0x40(%rsp), %rdi
callq 0x1030
movl $0x1, %r12d
jmp 0xa849
xorl %r12d, %r12d
movq 0x40(%rsp), %r13
movq %r13, %rdi
callq 0x1030
movl %r12d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop