// File: /workspace/github_cpp_makefile_star2_O3/AndrewAlbert[P]Compiler-Theory/SourceCode/codeGenerator.cpp
// Function: codeGenerator::NotOnRegister(int, int)
void codeGenerator::NotOnRegister( int type, int size ){
	if( !ShouldGenerate() ) return;
	string reg;
	comment("Not Operation on Register");
	
	//Ensure size is at least 1 for the loops
	if( size == 0 ) size++;
	
	for( int i = 0; i < size; i++ ){
		reg = popStack('E', type);
		pushStack( reg, 'R', type );
	}
	for( int i = 0; i < size; i++ ){
		reg = popStack('R', type);
		pushStack(reg, 'E', type);
		if( type == TYPE_BOOL ){
			// boolean not
			fprintf( oFile, "   %s = !( %s );\n", reg.c_str(), reg.c_str() );
		}
		else if( type == TYPE_INTEGER ){
			// bitwise not
			fprintf( oFile, "   %s = ~( %s );\n", reg.c_str(), reg.c_str() );
		}
	}
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
cmpb $0x1, 0x330(%rdi)
jne 0x132d0
movl %edx, %r13d
movl %esi, %ebp
movq %rdi, %r14
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x98(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x7d80(%rip), %rsi      # 0x1ae27
leaq 0x7d92(%rip), %rdx      # 0x1ae40
leaq 0x88(%rsp), %rdi
callq 0x3c42
movq 0x308(%r14), %rdi
movq 0x88(%rsp), %rdx
leaq 0x794e(%rip), %rsi      # 0x1aa1f
xorl %eax, %eax
callq 0x22a0
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x130f5
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2200
cmpl $0x1, %r13d
adcl $0x0, %r13d
testl %r13d, %r13d
jle 0x132b4
leaq 0x38(%rsp), %r15
leaq 0x180(%r14), %rax
movq %rax, (%rsp)
leaq 0x48(%rsp), %r12
movl %r13d, %ebx
movq %r12, %rdi
movq %r14, %rsi
movl $0x45, %edx
movl %ebp, %ecx
callq 0x11a5e
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x2270
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x13159
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r15, 0x28(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x3bac
cmpb $0x1, 0x330(%r14)
jne 0x1318d
movq (%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x17610
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x131a4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
decl %ebx
jne 0x1311e
testl %r13d, %r13d
jle 0x132b4
leaq 0x78(%rsp), %r15
leaq 0x130(%r14), %rax
movq %rax, (%rsp)
leaq 0x48(%rsp), %r12
leaq 0x68(%rsp), %rbx
movq %r12, %rdi
movq %r14, %rsi
movl $0x52, %edx
movl %ebp, %ecx
callq 0x11a5e
leaq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x2270
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x1320a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2200
movq %r15, 0x68(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0x3bac
cmpb $0x1, 0x330(%r14)
jne 0x13252
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x17610
cmpl $0x10b, %ebp            # imm = 0x10B
jne 0x1324b
incl 0x124(%r14)
jmp 0x13252
incl 0x120(%r14)
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x13269
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
cmpl $0x10a, %ebp            # imm = 0x10A
je 0x1328e
cmpl $0x10c, %ebp            # imm = 0x10C
jne 0x132ab
movq 0x308(%r14), %rdi
movq 0x8(%rsp), %rcx
leaq 0x7bb5(%rip), %rsi      # 0x1ae41
jmp 0x132a1
movq 0x308(%r14), %rdi
movq 0x8(%rsp), %rcx
leaq 0x7bb2(%rip), %rsi      # 0x1ae53
movq %rcx, %rdx
xorl %eax, %eax
callq 0x22a0
decl %r13d
jne 0x131cf
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x132d0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1331a
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x1331d
movq 0x78(%rsp), %rsi
jmp 0x1330a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r15, %rdi
je 0x1331d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
jmp 0x1331d
jmp 0x1331a
jmp 0x1331a
jmp 0x1331a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x13339
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2330
nop