// File: JMMackenzie[P]binary_to_jass/./compress_integer_variable_byte.h
// Function: void JASS::compress_integer_variable_byte::decompress_into<unsigned char const*>(unsigned int*, unsigned char const*&)
static inline void decompress_into(integer *decoded, SOURCE &source)
				{
				/*
					If the high bit is set the sequence is over, otherwise, in an unwound loop, decode the integers one at a time.
				*/
				if (*source & 0x80)
					{
					*decoded = *source & 0x7F;
					++source;
					}
				else
					{
					*decoded = *source;
					++source;
					if (*source & 0x80)
						{
						*decoded = (*decoded << 7) | (*source & 0x7F);
						++source;
						}
					else
						{
						*decoded = (*decoded << 7) | *source;
						++source;
						if (*source & 0x80)
							{
							*decoded = (*decoded << 7) | (*source & 0x7F);
							++source;
							}
						else
							{
							*decoded = (*decoded << 7) | *source;
							++source;
							if (*source & 0x80)
								{
								*decoded = (*decoded << 7) | (*source & 0x7F);
								++source;
								}
							else
								{
								*decoded = (*decoded << 7) | *source;
								++source;
								if (*source & 0x80)
									{
									*decoded = (*decoded << 7) | (*source & 0x7F);
									++source;
									}
								else
									{
	#if JASS_COMPRESS_INTEGER_BITS_PER_INTEGER == 64
									*decoded = (*decoded << 7) | *source;
									++source;
									if (*source & 0x80)
										{
										*decoded = (*decoded << 7) | (*source & 0x7F);
										++source;
										}
									else
										{
										*decoded = (*decoded << 7) | *source;
										++source;
										if (*source & 0x80)
											{
											*decoded = (*decoded << 7) | (*source & 0x7F);
											++source;
											}
										else
											{
											*decoded = (*decoded << 7) | *source;
											++source;
											if (*source & 0x80)
												{
												*decoded = (*decoded << 7) | (*source & 0x7F);
												++source;
												}
											else
												{
												*decoded = (*decoded << 7) | *source;
												++source;
												if (*source & 0x80)
													{
													*decoded = (*decoded << 7) | (*source & 0x7F);
													++source;
													}
												else
													{
													*decoded = (*decoded << 7) | *source;
													++source;
													if (*source & 0x80)
														{
														*decoded = (*decoded << 7) | (*source & 0x7F);
														++source;
														}
													else
														{
														*decoded = (*decoded << 7) | *source;
														++source;
														}
													}
												}
											}
										}
	#endif
									}
								}
							}
						}
					}
				}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x301bd8
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %ecx
andl $0x7f, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x301dac
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x301c43
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0x7, %ecx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x7f, %eax
orl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x301daa
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0x7, %ecx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
orl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x301cba
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0x7, %ecx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x7f, %eax
orl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x301da8
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0x7, %ecx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
orl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x301d2e
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0x7, %ecx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x7f, %eax
orl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x301da6
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0x7, %ecx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
orl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x301da2
movq -0x8(%rsp), %rax
movl (%rax), %ecx
shll $0x7, %ecx
movq -0x10(%rsp), %rax
movq (%rax), %rax
movzbl (%rax), %eax
andl $0x7f, %eax
orl %eax, %ecx
movq -0x8(%rsp), %rax
movl %ecx, (%rax)
movq -0x10(%rsp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x301da4
jmp 0x301da4
jmp 0x301da6
jmp 0x301da8
jmp 0x301daa
jmp 0x301dac
retq
nopl (%rax)