// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq 0x78cb(%rip), %rbx      # 0x1d190
leaq 0x2793(%rip), %rax      # 0x1805f
movq %rax, -0x98(%rbp)
leaq 0x27a2(%rip), %r13      # 0x1807c
movq %r13, -0x90(%rbp)
leaq -0x230(%rbp), %r14
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0x31b0
leaq -0xa8(%rbp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
leaq -0x48(%rbp), %rsi
movb $0x22, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x3180
leaq 0x3082(%rip), %rsi      # 0x189b3
leaq -0x230(%rbp), %rdi
movl $0x12, %edx
callq 0x3180
leaq 0x308a(%rip), %rsi      # 0x189d3
leaq -0x230(%rbp), %rdi
movl $0xe, %edx
callq 0x3180
leaq -0x228(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x31e0
leaq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %r14
movq %r14, %rsi
callq 0x3190
movq (%r14), %rdi
leaq -0x38(%rbp), %r12
cmpq %r12, %rdi
je 0x15995
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0xb8(%rbp), %rax
leaq -0x280(%rbp), %rcx
movq %rax, (%rcx)
addq -0xb0(%rbp), %rax
movq %rax, 0x8(%rcx)
leaq -0x98(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x3290
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x159e0
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3140
movq 0x75e1(%rip), %rsi      # 0x1cfc8
leaq -0x230(%rbp), %rdi
callq 0x30b0
leaq -0x1c0(%rbp), %rdi
callq 0x3060
movq 0x778a(%rip), %rbx      # 0x1d190
leaq 0x2652(%rip), %rax      # 0x1805f
movq %rax, -0x88(%rbp)
movq %r13, -0x80(%rbp)
leaq -0x230(%rbp), %r14
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0x31b0
movq %r15, 0x178(%r14)
movq $0x0, 0x180(%r14)
movb $0x0, 0x188(%r14)
leaq -0x48(%rbp), %rsi
movb $0x22, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x3180
leaq 0x2f48(%rip), %rsi      # 0x189b3
leaq -0x230(%rbp), %rdi
movl $0x12, %edx
callq 0x3180
leaq 0x2f5f(%rip), %rsi      # 0x189e2
leaq -0x230(%rbp), %rdi
movl $0xf, %edx
callq 0x3180
leaq -0x228(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x31e0
leaq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %r14
movq %r14, %rsi
callq 0x3190
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x15acb
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0xb8(%rbp), %rax
leaq -0x270(%rbp), %rcx
movq %rax, (%rcx)
addq -0xb0(%rbp), %rax
movq %rax, 0x8(%rcx)
leaq -0x88(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x3290
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x15b16
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3140
movq 0x74ab(%rip), %rsi      # 0x1cfc8
leaq -0x230(%rbp), %rdi
callq 0x30b0
leaq -0x1c0(%rbp), %rdi
callq 0x3060
movq 0x7654(%rip), %rbx      # 0x1d190
leaq 0x251c(%rip), %rax      # 0x1805f
movq %rax, -0x78(%rbp)
movq %r13, -0x70(%rbp)
leaq -0x230(%rbp), %r14
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0x31b0
movq %r15, 0x178(%r14)
movq $0x0, 0x180(%r14)
movb $0x0, 0x188(%r14)
leaq -0x48(%rbp), %rsi
movb $0x22, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x3180
leaq 0x2e15(%rip), %rsi      # 0x189b3
leaq -0x230(%rbp), %rdi
movl $0x12, %edx
callq 0x3180
leaq 0x2e3c(%rip), %rsi      # 0x189f2
leaq -0x230(%rbp), %rdi
movl $0xc, %edx
callq 0x3180
leaq -0x228(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x31e0
leaq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %r14
movq %r14, %rsi
callq 0x3190
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x15bfe
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0xb8(%rbp), %rax
leaq -0x260(%rbp), %rcx
movq %rax, (%rcx)
addq -0xb0(%rbp), %rax
movq %rax, 0x8(%rcx)
leaq -0x78(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x3290
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x15c46
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3140
movq 0x737b(%rip), %rsi      # 0x1cfc8
leaq -0x230(%rbp), %rdi
callq 0x30b0
leaq -0x1c0(%rbp), %rdi
callq 0x3060
callq 0x15efc
movq 0x751f(%rip), %rbx      # 0x1d190
leaq 0x23e7(%rip), %rax      # 0x1805f
movq %rax, -0x68(%rbp)
movq %r13, -0x60(%rbp)
leaq -0x230(%rbp), %r14
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0x31b0
movq %r15, 0x178(%r14)
movq $0x0, 0x180(%r14)
movb $0x0, 0x188(%r14)
leaq -0x48(%rbp), %rsi
movb $0x22, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x3180
leaq 0x2ce0(%rip), %rsi      # 0x189b3
leaq -0x230(%rbp), %rdi
movl $0x12, %edx
callq 0x3180
leaq 0x2d14(%rip), %rsi      # 0x189ff
leaq -0x230(%rbp), %rdi
movl $0x12, %edx
callq 0x3180
leaq -0x228(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x31e0
leaq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %r14
movq %r14, %rsi
callq 0x3190
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x15d33
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0xb8(%rbp), %rax
leaq -0x250(%rbp), %rcx
movq %rax, (%rcx)
addq -0xb0(%rbp), %rax
movq %rax, 0x8(%rcx)
leaq -0x68(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x3290
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x15d7b
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3140
movq 0x7246(%rip), %rsi      # 0x1cfc8
leaq -0x230(%rbp), %rdi
callq 0x30b0
leaq -0x1c0(%rbp), %rdi
callq 0x3060
movq 0x73ef(%rip), %rbx      # 0x1d190
leaq 0x22b7(%rip), %rax      # 0x1805f
movq %rax, -0x58(%rbp)
movq %r13, -0x50(%rbp)
leaq -0x230(%rbp), %r14
movl $0x198, %edx            # imm = 0x198
movq %r14, %rdi
xorl %esi, %esi
callq 0x30c0
movq %r14, %rdi
callq 0x31b0
movq %r15, 0x178(%r14)
movq $0x0, 0x180(%r14)
movb $0x0, 0x188(%r14)
leaq -0x48(%rbp), %rsi
movb $0x22, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x3180
leaq 0x2bb0(%rip), %rsi      # 0x189b3
leaq -0x230(%rbp), %rdi
movl $0x12, %edx
callq 0x3180
leaq 0x2bf7(%rip), %rsi      # 0x18a12
leaq -0x230(%rbp), %rdi
movl $0xe, %edx
callq 0x3180
leaq -0x228(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x31e0
leaq -0xb8(%rbp), %rdi
leaq -0x48(%rbp), %r14
movq %r14, %rsi
callq 0x3190
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x15e63
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3140
movq -0xb8(%rbp), %rax
leaq -0x240(%rbp), %rcx
movq %rax, (%rcx)
addq -0xb0(%rbp), %rax
movq %rax, 0x8(%rcx)
leaq -0x58(%rbp), %rsi
movl $0x180, %edx            # imm = 0x180
movq %rbx, %rdi
callq 0x3290
movq -0xb8(%rbp), %rdi
cmpq %r15, %rdi
je 0x15eab
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3140
movq 0x7116(%rip), %rsi      # 0x1cfc8
leaq -0x230(%rbp), %rdi
callq 0x30b0
leaq -0x1c0(%rbp), %rdi
callq 0x3060
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x15ee4
jmp 0x15ee4
jmp 0x15ee4
jmp 0x15ee4
movq %rax, %rbx
leaq -0x230(%rbp), %rdi
callq 0x1652e
movq %rbx, %rdi
callq 0x3250
nop