// File: menhits[P]phplus/src/PhplusStdLib.cpp
// Function: populateStdFuncs()
void populateStdFuncs()
{
	//mencetak
	
	func("cetak", Void, Void, Void,
		cout << endl;
	,
		"fputs(\"\\n\", stdout)"
	);
	
	func("cetak", Void, Bool, Void,
		cout << (right?"benar":"salah") << endl;
	,
		"fputs($:?\"benar\\n\":\"salah\\n\", stdout)"
	);
	
	func("cetak", Void, Byte, Void,
		cout << right << endl;
	,
		"printf(\"%c\", $:)"
	);
	
	func("cetak", Void, Int, Void,
		cout << right << endl;
	,
		"printf(\"%d\\n\", $:)"
	);
	
	func("cetak", Void, Dub, Void,
		cout << doubleToString(right) << endl;
	,
		ADD_CPP_HEADER
		{
			addToProgDoubleToStr(prog);
			addToProgCStr(prog);
			
			prog->code("printf");
			prog->pushExpr();
				prog->code("\"%s\\n\", ");
				prog->name("$cStr");
				prog->pushExpr();
					prog->name("$doubleToStr");
					prog->pushExpr();
						right->addToProg(prog);
					prog->popExpr();
				prog->popExpr();
			prog->popExpr();
		}
	);
	
	addAction("cetak", Void, String, Void,
		LAMBDA_HEADER
		{
			cout << pncnStr2CppStr(rightIn) << endl;
			return nullptr;
		},
		ADD_CPP_HEADER
		{
			addToProgCStr(prog);
			
			prog->code("printf");
			prog->pushExpr();
				prog->code("\"%s\\n\", ");
				prog->name("$cStr");
				prog->pushExpr();
					right->addToProg(prog);
				prog->popExpr();
			prog->popExpr();
		}
	);
}

// Assembly:
subq $0x478, %rsp            # imm = 0x478
leaq 0x457(%rsp), %rdi
movq %rdi, 0xc0(%rsp)
callq 0xb690
movq 0xc0(%rsp), %rdx
leaq 0x77508(%rip), %rsi     # 0xd5523
leaq 0x458(%rsp), %rdi
callq 0xb4c0
jmp 0x5e02a
leaq 0xba477(%rip), %rsi     # 0x1184a8
movq %rsi, 0xb0(%rsp)
leaq 0x430(%rsp), %rdi
callq 0x1a920
movq 0xb0(%rsp), %rsi
leaq 0x420(%rsp), %rdi
callq 0x1a920
movq 0xb0(%rsp), %rsi
leaq 0x410(%rsp), %rdi
callq 0x1a920
leaq 0x3f0(%rsp), %rdi
leaq 0x3ef(%rsp), %rsi
callq 0x5eac0
leaq 0x3c7(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0xb690
movq 0xb8(%rsp), %rdx
leaq 0x77480(%rip), %rsi     # 0xd5529
leaq 0x3c8(%rsp), %rdi
callq 0xb4c0
jmp 0x5e0b8
leaq 0x458(%rsp), %rdi
leaq 0x430(%rsp), %rsi
leaq 0x420(%rsp), %rdx
leaq 0x410(%rsp), %rcx
leaq 0x3f0(%rsp), %r8
leaq 0x3c8(%rsp), %r9
callq 0x4ec40
jmp 0x5e0ef
leaq 0x3c8(%rsp), %rdi
callq 0xb6e8
leaq 0x3c7(%rsp), %rdi
callq 0xb3f0
leaq 0x3f0(%rsp), %rdi
callq 0x95c00
leaq 0x410(%rsp), %rdi
callq 0x1a950
leaq 0x420(%rsp), %rdi
callq 0x1a950
leaq 0x430(%rsp), %rdi
callq 0x1a950
leaq 0x458(%rsp), %rdi
callq 0xb6e8
leaq 0x457(%rsp), %rdi
callq 0xb3f0
leaq 0x39f(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0xb690
movq 0xa8(%rsp), %rdx
leaq 0x773a8(%rip), %rsi     # 0xd5523
leaq 0x3a0(%rsp), %rdi
callq 0xb4c0
jmp 0x5e18a
leaq 0xba317(%rip), %rsi     # 0x1184a8
movq %rsi, 0x98(%rsp)
leaq 0x388(%rsp), %rdi
callq 0x1a920
leaq 0xba31b(%rip), %rsi     # 0x1184c8
leaq 0x378(%rsp), %rdi
callq 0x1a920
movq 0x98(%rsp), %rsi
leaq 0x368(%rsp), %rdi
callq 0x1a920
leaq 0x348(%rsp), %rdi
leaq 0x347(%rsp), %rsi
callq 0x5eb50
leaq 0x31f(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0xb690
movq 0xa0(%rsp), %rdx
leaq 0x77335(%rip), %rsi     # 0xd553d
leaq 0x320(%rsp), %rdi
callq 0xb4c0
jmp 0x5e217
leaq 0x3a0(%rsp), %rdi
leaq 0x388(%rsp), %rsi
leaq 0x378(%rsp), %rdx
leaq 0x368(%rsp), %rcx
leaq 0x348(%rsp), %r8
leaq 0x320(%rsp), %r9
callq 0x4ec40
jmp 0x5e24e
leaq 0x320(%rsp), %rdi
callq 0xb6e8
leaq 0x31f(%rsp), %rdi
callq 0xb3f0
leaq 0x348(%rsp), %rdi
callq 0x95c00
leaq 0x368(%rsp), %rdi
callq 0x1a950
leaq 0x378(%rsp), %rdi
callq 0x1a950
leaq 0x388(%rsp), %rdi
callq 0x1a950
leaq 0x3a0(%rsp), %rdi
callq 0xb6e8
leaq 0x39f(%rsp), %rdi
callq 0xb3f0
leaq 0x2f7(%rsp), %rdi
movq %rdi, 0x90(%rsp)
callq 0xb690
movq 0x90(%rsp), %rdx
leaq 0x77249(%rip), %rsi     # 0xd5523
leaq 0x2f8(%rsp), %rdi
callq 0xb4c0
jmp 0x5e2e9
leaq 0xba1b8(%rip), %rsi     # 0x1184a8
movq %rsi, 0x80(%rsp)
leaq 0x2e0(%rsp), %rdi
callq 0x1a920
leaq 0xba1cc(%rip), %rsi     # 0x1184d8
leaq 0x2d0(%rsp), %rdi
callq 0x1a920
movq 0x80(%rsp), %rsi
leaq 0x2c0(%rsp), %rdi
callq 0x1a920
leaq 0x2a0(%rsp), %rdi
leaq 0x29f(%rsp), %rsi
callq 0x5ebe0
leaq 0x277(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0xb690
movq 0x88(%rsp), %rdx
leaq 0x771fc(%rip), %rsi     # 0xd5563
leaq 0x278(%rsp), %rdi
callq 0xb4c0
jmp 0x5e376
leaq 0x2f8(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
leaq 0x2d0(%rsp), %rdx
leaq 0x2c0(%rsp), %rcx
leaq 0x2a0(%rsp), %r8
leaq 0x278(%rsp), %r9
callq 0x4ec40
jmp 0x5e3ad
leaq 0x278(%rsp), %rdi
callq 0xb6e8
leaq 0x277(%rsp), %rdi
callq 0xb3f0
leaq 0x2a0(%rsp), %rdi
callq 0x95c00
leaq 0x2c0(%rsp), %rdi
callq 0x1a950
leaq 0x2d0(%rsp), %rdi
callq 0x1a950
leaq 0x2e0(%rsp), %rdi
callq 0x1a950
leaq 0x2f8(%rsp), %rdi
callq 0xb6e8
leaq 0x2f7(%rsp), %rdi
callq 0xb3f0
leaq 0x24f(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0xb690
movq 0x78(%rsp), %rdx
leaq 0x770f0(%rip), %rsi     # 0xd5523
leaq 0x250(%rsp), %rdi
callq 0xb4c0
jmp 0x5e442
leaq 0xba05f(%rip), %rsi     # 0x1184a8
movq %rsi, 0x68(%rsp)
leaq 0x238(%rsp), %rdi
callq 0x1a920
leaq 0xba086(%rip), %rsi     # 0x1184e8
leaq 0x228(%rsp), %rdi
callq 0x1a920
movq 0x68(%rsp), %rsi
leaq 0x218(%rsp), %rdi
callq 0x1a920
leaq 0x1f8(%rsp), %rdi
leaq 0x1f7(%rsp), %rsi
callq 0x5ec70
leaq 0x1cf(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0xb690
movq 0x70(%rsp), %rdx
leaq 0x770c0(%rip), %rsi     # 0xd5574
leaq 0x1d0(%rsp), %rdi
callq 0xb4c0
jmp 0x5e4c3
leaq 0x250(%rsp), %rdi
leaq 0x238(%rsp), %rsi
leaq 0x228(%rsp), %rdx
leaq 0x218(%rsp), %rcx
leaq 0x1f8(%rsp), %r8
leaq 0x1d0(%rsp), %r9
callq 0x4ec40
jmp 0x5e4fa
leaq 0x1d0(%rsp), %rdi
callq 0xb6e8
leaq 0x1cf(%rsp), %rdi
callq 0xb3f0
leaq 0x1f8(%rsp), %rdi
callq 0x95c00
leaq 0x218(%rsp), %rdi
callq 0x1a950
leaq 0x228(%rsp), %rdi
callq 0x1a950
leaq 0x238(%rsp), %rdi
callq 0x1a950
leaq 0x250(%rsp), %rdi
callq 0xb6e8
leaq 0x24f(%rsp), %rdi
callq 0xb3f0
leaq 0xb9f3f(%rip), %rsi     # 0x1184a8
movq %rsi, 0x38(%rsp)
leaq 0x1b8(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x1a920
leaq 0xb9f71(%rip), %rsi     # 0x1184f8
leaq 0x1a8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x1a920
movq 0x38(%rsp), %rsi
leaq 0x198(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x1a920
leaq 0x178(%rsp), %rdi
movq %rdi, 0x58(%rsp)
leaq 0x177(%rsp), %rsi
callq 0x5ed00
leaq 0x150(%rsp), %rdi
movq %rdi, 0x60(%rsp)
leaq 0x14f(%rsp), %rsi
callq 0x5ed90
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x58(%rsp), %r8
movq 0x60(%rsp), %r9
leaq 0x76f1f(%rip), %rdi     # 0xd5523
callq 0x96b70
jmp 0x5e60b
leaq 0x150(%rsp), %rdi
callq 0x95bf0
leaq 0x178(%rsp), %rdi
callq 0x95c00
leaq 0x198(%rsp), %rdi
callq 0x1a950
leaq 0x1a8(%rsp), %rdi
callq 0x1a950
leaq 0x1b8(%rsp), %rdi
callq 0x1a950
leaq 0xb9e55(%rip), %rsi     # 0x1184a8
movq %rsi, 0x8(%rsp)
leaq 0x138(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x1a920
leaq 0xb9e97(%rip), %rsi     # 0x118508
leaq 0x128(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x1a920
movq 0x8(%rsp), %rsi
leaq 0x118(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x1a920
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0xf7(%rsp), %rsi
callq 0x5ee20
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x30(%rsp)
leaq 0xcf(%rsp), %rsi
callq 0x5eeb0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %r8
movq 0x30(%rsp), %r9
leaq 0x76e35(%rip), %rdi     # 0xd5523
callq 0x96b70
jmp 0x5e6f5
leaq 0xd0(%rsp), %rdi
callq 0x95bf0
leaq 0xf8(%rsp), %rdi
callq 0x95c00
leaq 0x118(%rsp), %rdi
callq 0x1a950
leaq 0x128(%rsp), %rdi
callq 0x1a950
leaq 0x138(%rsp), %rdi
callq 0x1a950
addq $0x478, %rsp            # imm = 0x478
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e7dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e78e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
leaq 0x3c8(%rsp), %rdi
callq 0xb6e8
leaq 0x3c7(%rsp), %rdi
callq 0xb3f0
leaq 0x3f0(%rsp), %rdi
callq 0x95c00
leaq 0x410(%rsp), %rdi
callq 0x1a950
leaq 0x420(%rsp), %rdi
callq 0x1a950
leaq 0x430(%rsp), %rdi
callq 0x1a950
leaq 0x458(%rsp), %rdi
callq 0xb6e8
leaq 0x457(%rsp), %rdi
callq 0xb3f0
jmp 0x5eaaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e88c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e83e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
leaq 0x320(%rsp), %rdi
callq 0xb6e8
leaq 0x31f(%rsp), %rdi
callq 0xb3f0
leaq 0x348(%rsp), %rdi
callq 0x95c00
leaq 0x368(%rsp), %rdi
callq 0x1a950
leaq 0x378(%rsp), %rdi
callq 0x1a950
leaq 0x388(%rsp), %rdi
callq 0x1a950
leaq 0x3a0(%rsp), %rdi
callq 0xb6e8
leaq 0x39f(%rsp), %rdi
callq 0xb3f0
jmp 0x5eaaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e93c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e8ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
leaq 0x278(%rsp), %rdi
callq 0xb6e8
leaq 0x277(%rsp), %rdi
callq 0xb3f0
leaq 0x2a0(%rsp), %rdi
callq 0x95c00
leaq 0x2c0(%rsp), %rdi
callq 0x1a950
leaq 0x2d0(%rsp), %rdi
callq 0x1a950
leaq 0x2e0(%rsp), %rdi
callq 0x1a950
leaq 0x2f8(%rsp), %rdi
callq 0xb6e8
leaq 0x2f7(%rsp), %rdi
callq 0xb3f0
jmp 0x5eaaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e9ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
jmp 0x5e99e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
leaq 0x1d0(%rsp), %rdi
callq 0xb6e8
leaq 0x1cf(%rsp), %rdi
callq 0xb3f0
leaq 0x1f8(%rsp), %rdi
callq 0x95c00
leaq 0x218(%rsp), %rdi
callq 0x1a950
leaq 0x228(%rsp), %rdi
callq 0x1a950
leaq 0x238(%rsp), %rdi
callq 0x1a950
leaq 0x250(%rsp), %rdi
callq 0xb6e8
leaq 0x24f(%rsp), %rdi
callq 0xb3f0
jmp 0x5eaaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x95bf0
leaq 0x178(%rsp), %rdi
callq 0x95c00
leaq 0x198(%rsp), %rdi
callq 0x1a950
leaq 0x1a8(%rsp), %rdi
callq 0x1a950
leaq 0x1b8(%rsp), %rdi
callq 0x1a950
jmp 0x5eaaa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x448(%rsp)
movl %eax, 0x444(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x95bf0
leaq 0xf8(%rsp), %rdi
callq 0x95c00
leaq 0x118(%rsp), %rdi
callq 0x1a950
leaq 0x128(%rsp), %rdi
callq 0x1a950
leaq 0x138(%rsp), %rdi
callq 0x1a950
movq 0x448(%rsp), %rdi
callq 0xb680
nopw (%rax,%rax)