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

	ParserASTNode *ins_node = data->ins_node;

	ParserASTNode *source = ins_node->childs[1];

	EncoderInstruction enc_ins;

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

	InsRegister *source_reg = ASM_REG_AST_NODE_GET_REG(source);

	switch (ASM_PARSER_CONTEXT_DATA_GET_ARCH(data->ctx)) {
		case ASM_ARCH_BIT16: {
			switch (source_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 (source_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 0x2512c
jmp 0x2514b
leaq 0x249d3(%rip), %rdi     # 0x49b06
leaq 0x25ee6(%rip), %rsi     # 0x4b020
movl $0x9cf, %edx            # imm = 0x9CF
leaq 0x26fe3(%rip), %rcx     # 0x4c129
callq 0xa0b0
cmpq $0x0, -0x10(%rbp)
je 0x25154
jmp 0x25173
leaq 0x2ae94(%rip), %rdi     # 0x4ffef
leaq 0x25ebe(%rip), %rsi     # 0x4b020
movl $0x9cf, %edx            # imm = 0x9CF
leaq 0x26fbb(%rip), %rcx     # 0x4c129
callq 0xa0b0
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2517f
jmp 0x2519e
leaq 0x25ef7(%rip), %rdi     # 0x4b07d
leaq 0x25e93(%rip), %rsi     # 0x4b020
movl $0x9cf, %edx            # imm = 0x9CF
leaq 0x26f90(%rip), %rcx     # 0x4c129
callq 0xa0b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpl $0x2, 0x44(%rax)
jne 0x251ad
jmp 0x251cc
leaq 0x25ed8(%rip), %rdi     # 0x4b08c
leaq 0x25e65(%rip), %rsi     # 0x4b020
movl $0x9cf, %edx            # imm = 0x9CF
leaq 0x26f62(%rip), %rcx     # 0x4c129
callq 0xa0b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rax
movq 0x8(%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 0x25247
jmp 0x2522a
movl -0x8c(%rbp), %eax
subl $0x2, %eax
je 0x25294
jmp 0x25237
movl -0x8c(%rbp), %eax
subl $0x4, %eax
je 0x25294
jmp 0x252e1
movq -0x88(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x90(%rbp)
subl $0x3, %eax
je 0x2526b
jmp 0x2525e
movl -0x90(%rbp), %eax
subl $0x4, %eax
je 0x2526d
jmp 0x25273
jmp 0x25292
movb $0x1, -0x75(%rbp)
jmp 0x25292
leaq 0x221eb(%rip), %rdi     # 0x47465
leaq 0x25d9f(%rip), %rsi     # 0x4b020
movl $0x9e7, %edx            # imm = 0x9E7
leaq 0x26e9c(%rip), %rcx     # 0x4c129
callq 0xa0b0
jmp 0x25300
movq -0x88(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x94(%rbp)
subl $0x3, %eax
je 0x252b8
jmp 0x252ab
movl -0x94(%rbp), %eax
subl $0x4, %eax
je 0x252be
jmp 0x252c0
movb $0x1, -0x75(%rbp)
jmp 0x252df
jmp 0x252df
leaq 0x2219e(%rip), %rdi     # 0x47465
leaq 0x25d52(%rip), %rsi     # 0x4b020
movl $0x9f9, %edx            # imm = 0x9F9
leaq 0x26e4f(%rip), %rcx     # 0x4c129
callq 0xa0b0
jmp 0x25300
leaq 0x2217d(%rip), %rdi     # 0x47465
leaq 0x25d31(%rip), %rsi     # 0x4b020
movl $0xa00, %edx            # imm = 0xA00
leaq 0x26e2e(%rip), %rcx     # 0x4c129
callq 0xa0b0
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1e570
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)