// File: /workspace/github_cpp_makefile_star2_O2/aisthesis[P]realnumber/tst/array_arithmetic_test.cpp
// Function: division::approximate_result_invoker()
BOOST_AUTO_TEST_CASE(approximate_result) {
		unsigned char dividend[] = {1, 0, 0, 0};
		unsigned char divisor[] = {0, 3, 0, 0};
		unsigned char result[] = {0, 0, 0, 0};
		// result will represent 256 / 3 = 85.3333
		array_arithmetic::divide(dividend, divisor, result, 4, 1);
		BOOST_CHECK_EQUAL(result[0], 85);
		// 85 infinitely repeating is the representation of 1 / 3 in base 256
		BOOST_CHECK_EQUAL(result[1], 85);
		BOOST_CHECK_EQUAL(result[2], 85);
		BOOST_CHECK_EQUAL(result[3], 85);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x240, %rsp            # imm = 0x240
movq 0x7dc3(%rip), %rbx      # 0x16198
leaq 0x2c7f(%rip), %r15      # 0x1105b
movq %r15, -0x70(%rbp)
leaq 0x2c91(%rip), %r12      # 0x11078
movq %r12, -0x68(%rbp)
leaq -0x208(%rbp), %r14
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0xeecc
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x31a0
leaq 0x3594(%rip), %rsi      # 0x119af
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq 0x35a1(%rip), %rsi      # 0x119cf
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq -0x208(%rbp), %rdi
callq 0xeefe
movq (%rax), %rdx
leaq -0x258(%rbp), %rcx
movq %rdx, (%rcx)
addq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
leaq -0x70(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x32a0
leaq -0x208(%rbp), %rdi
callq 0xef42
movq 0x7d19(%rip), %rbx      # 0x16198
movq %r15, -0x60(%rbp)
movq %r12, -0x58(%rbp)
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0xeecc
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x31a0
leaq 0x34ff(%rip), %rsi      # 0x119af
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq 0x351b(%rip), %rsi      # 0x119de
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq -0x208(%rbp), %rdi
callq 0xeefe
movq (%rax), %rdx
leaq -0x248(%rbp), %rcx
movq %rdx, (%rcx)
addq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
leaq -0x60(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x32a0
leaq -0x208(%rbp), %rdi
callq 0xef42
movq 0x7c84(%rip), %rbx      # 0x16198
movq %r15, -0x50(%rbp)
movq %r12, -0x48(%rbp)
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0xeecc
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x31a0
leaq 0x346a(%rip), %rsi      # 0x119af
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq 0x3496(%rip), %rsi      # 0x119ee
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq -0x208(%rbp), %rdi
callq 0xeefe
movq (%rax), %rdx
leaq -0x238(%rbp), %rcx
movq %rdx, (%rcx)
addq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
leaq -0x50(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x32a0
leaq -0x208(%rbp), %rdi
callq 0xef42
callq 0xe700
movq 0x7bea(%rip), %rbx      # 0x16198
movq %r15, -0x40(%rbp)
movq %r12, -0x38(%rbp)
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0xeecc
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x31a0
leaq 0x33d0(%rip), %rsi      # 0x119af
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq 0x3409(%rip), %rsi      # 0x119fb
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq -0x208(%rbp), %rdi
callq 0xeefe
movq (%rax), %rdx
leaq -0x228(%rbp), %rcx
movq %rdx, (%rcx)
addq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
leaq -0x40(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x32a0
leaq -0x208(%rbp), %rdi
callq 0xef42
movq 0x7b55(%rip), %rbx      # 0x16198
movq %r15, -0x30(%rbp)
movq %r12, -0x28(%rbp)
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0xeecc
pushq $0x22
popq %rsi
movq %r14, %rdi
callq 0x31a0
leaq 0x333b(%rip), %rsi      # 0x119af
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq 0x3387(%rip), %rsi      # 0x11a0e
leaq -0x208(%rbp), %rdi
callq 0x3140
leaq -0x208(%rbp), %rdi
callq 0xeefe
movq (%rax), %rdx
leaq -0x218(%rbp), %rcx
movq %rdx, (%rcx)
addq 0x8(%rax), %rdx
movq %rdx, 0x8(%rcx)
leaq -0x30(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x32a0
leaq -0x208(%rbp), %rdi
callq 0xef42
addq $0x240, %rsp            # imm = 0x240
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xe6e9
jmp 0xe6e9
jmp 0xe6e9
jmp 0xe6e9
movq %rax, %rbx
leaq -0x208(%rbp), %rdi
callq 0xef42
movq %rbx, %rdi
callq 0x3260