// File: /workspace/github_c_makefile_star2_O0/Ihsoh[P]ilang/compiler/assembler/ins_enc.c
// Function: ins_enc_IN_eAX_DX
void ins_enc_IN_eAX_DX(
	Instruction *ins,
	InstructionEncoderData *data
) {
	_CHECK_PARAMS(2);

	ParserASTNode *ins_node = data->ins_node;

	ParserASTNode *target = ins_node->childs[0];

	EncoderInstruction enc_ins;

	ins_init(data->ctx, ins, ins_node, &enc_ins);

	InsRegister *target_reg = ASM_REG_AST_NODE_GET_REG(target);

	switch (ASM_PARSER_CONTEXT_DATA_GET_ARCH(data->ctx)) {
		case ASM_ARCH_BIT16: {
			switch (target_reg->type) {
				case INS_REGISTER_GENERAL_2BYTE: {
					
					break;
				}
				case INS_REGISTER_GENERAL_4BYTE: {
					enc_ins.legacy_prefix.operand_size_override = true;
					break;
				}
				default: {
					assert(0);
					break;
				}
			}
			break;
		}
		case ASM_ARCH_BIT32:
		case ASM_ARCH_BIT64: {
			switch (target_reg->type) {
				case INS_REGISTER_GENERAL_2BYTE: {
					enc_ins.legacy_prefix.operand_size_override = true;
					break;
				}
				case INS_REGISTER_GENERAL_4BYTE: {
					
					break;
				}
				default: {
					assert(0);
					break;
				}
			}
			break;
		}
		default: {
			assert(0);
			break;
		}
	}

	_output(data, &enc_ins);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x24f1c
jmp 0x24f3b
leaq 0x24be3(%rip), %rdi     # 0x49b06
leaq 0x260f6(%rip), %rsi     # 0x4b020
movl $0x992, %edx            # imm = 0x992
leaq 0x271b3(%rip), %rcx     # 0x4c0e9
callq 0xa0b0
cmpq $0x0, -0x10(%rbp)
je 0x24f44
jmp 0x24f63
leaq 0x2b0a4(%rip), %rdi     # 0x4ffef
leaq 0x260ce(%rip), %rsi     # 0x4b020
movl $0x992, %edx            # imm = 0x992
leaq 0x2718b(%rip), %rcx     # 0x4c0e9
callq 0xa0b0
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x24f6f
jmp 0x24f8e
leaq 0x26107(%rip), %rdi     # 0x4b07d
leaq 0x260a3(%rip), %rsi     # 0x4b020
movl $0x992, %edx            # imm = 0x992
leaq 0x27160(%rip), %rcx     # 0x4c0e9
callq 0xa0b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x2, 0x44(%rax)
jne 0x24f9d
jmp 0x24fbc
leaq 0x260e8(%rip), %rdi     # 0x4b08c
leaq 0x26075(%rip), %rsi     # 0x4b020
movl $0x992, %edx            # imm = 0x992
leaq 0x27132(%rip), %rcx     # 0x4c0e9
callq 0xa0b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq 0x1a9e0
movq -0x20(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movl 0xb0(%rax), %eax
movl %eax, -0x8c(%rbp)
subl $0x1, %eax
je 0x25036
jmp 0x25019
movl -0x8c(%rbp), %eax
subl $0x2, %eax
je 0x25083
jmp 0x25026
movl -0x8c(%rbp), %eax
subl $0x4, %eax
je 0x25083
jmp 0x250d0
movq -0x88(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x90(%rbp)
subl $0x3, %eax
je 0x2505a
jmp 0x2504d
movl -0x90(%rbp), %eax
subl $0x4, %eax
je 0x2505c
jmp 0x25062
jmp 0x25081
movb $0x1, -0x75(%rbp)
jmp 0x25081
leaq 0x223fc(%rip), %rdi     # 0x47465
leaq 0x25fb0(%rip), %rsi     # 0x4b020
movl $0x9aa, %edx            # imm = 0x9AA
leaq 0x2706d(%rip), %rcx     # 0x4c0e9
callq 0xa0b0
jmp 0x250ef
movq -0x88(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x94(%rbp)
subl $0x3, %eax
je 0x250a7
jmp 0x2509a
movl -0x94(%rbp), %eax
subl $0x4, %eax
je 0x250ad
jmp 0x250af
movb $0x1, -0x75(%rbp)
jmp 0x250ce
jmp 0x250ce
leaq 0x223af(%rip), %rdi     # 0x47465
leaq 0x25f63(%rip), %rsi     # 0x4b020
movl $0x9bc, %edx            # imm = 0x9BC
leaq 0x27020(%rip), %rcx     # 0x4c0e9
callq 0xa0b0
jmp 0x250ef
leaq 0x2238e(%rip), %rdi     # 0x47465
leaq 0x25f42(%rip), %rsi     # 0x4b020
movl $0x9c3, %edx            # imm = 0x9C3
leaq 0x26fff(%rip), %rcx     # 0x4c0e9
callq 0xa0b0
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1e570
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)