-- SPDX-License-Identifier: MIT
-- Copyright (C) 2018-present iced project and contributors

-- ⚠️This file was generated by GENERATOR!🦹‍♂️

---@meta
---@diagnostic disable unused-local

---x86 formatter that supports GNU Assembler, Intel XED, masm and nasm syntax
---
---@class Formatter
local Formatter = {}

---Creates a new x86 formatter that supports GNU Assembler, Intel XED, masm and nasm syntax
---
---@param syntax integer #Formatter syntax (A `FormatterSyntax` enum value)
---@return Formatter
---
---# Examples
---
---```lua
---local Decoder = require("iced_x86.Decoder")
---local Formatter = require("iced_x86.Formatter")
---local FormatterSyntax = require("iced_x86.FormatterSyntax")
---
---local data = "\098\242\079\221\114\080\001"
---local decoder = Decoder.new(64, data)
---local instr = decoder:decode()
---
---local formatter = Formatter.new(FormatterSyntax.Masm)
---formatter:set_uppercase_mnemonics(true)
---local disasm = formatter:format(instr)
---assert(disasm == "VCVTNE2PS2BF16 zmm2{k5}{z},zmm6,dword bcst [rax+4]")
---```
function Formatter.new(syntax) end

---Formats the whole instruction: prefixes, mnemonic, operands
---
---@param instruction Instruction #Instruction to format
---@return string #The formatted string
function Formatter:format(instruction) end

---Formats the mnemonic and any prefixes
---
---@param instruction Instruction #Instruction to format
---@param options? integer #(default = `FormatMnemonicOptions.None`) Options (A `FormatMnemonicOptions` enum value)
---@return string #The formatted string
function Formatter:format_mnemonic(instruction, options) end

---Gets the number of operands that will be formatted. A formatter can add and remove operands
---
---@param instruction Instruction #Instruction
---@return integer #Operand count
function Formatter:operand_count(instruction) end

---Returns the operand access but only if it's an operand added by the formatter.
---
---@param instruction Instruction #Instruction
---@param operand integer #Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand. See `Formatter:operand_count()`
---@return integer|nil #Operand access (an `OpAccess` enum value) or `nil`
function Formatter:op_access(instruction, operand) end

---Converts a formatter operand index to an instruction operand index.
---
---Returns `nil` if it's an operand added by the formatter
---
---@param instruction Instruction #Instruction
---@param operand integer #Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand. See `Formatter:operand_count()`
---@return integer|nil #Instruction operand or `nil` if it's an operand added by the formatter
function Formatter:get_instruction_operand(instruction, operand) end

---Converts an instruction operand index to a formatter operand index.
---
---Returns `nil` if the instruction operand isn't used by the formatter
---
---@param instruction Instruction #Instruction
---@param instruction_operand integer #Instruction operand
---@return integer|nil #Instruction operand or `nil` if the instruction operand isn't used by the formatter
function Formatter:get_formatter_operand(instruction, instruction_operand) end

---Formats an operand.
---
---@param instruction Instruction #Instruction
---@param operand integer #Operand number, 0-based. This is a formatter operand and isn't necessarily the same as an instruction operand. See `Formatter:operand_count()`
---@return string #The formatted string
function Formatter:format_operand(instruction, operand) end

---Formats an operand separator
---
---@param instruction Instruction #Instruction
---@return string #The formatted string
function Formatter:format_operand_separator(instruction) end

---Formats all operands
---
---@param instruction Instruction #Instruction to format
---@return string #The formatted string
function Formatter:format_all_operands(instruction) end

---Formats a register
---
---@param register integer #Register (A `Register` enum value)
---@return string #The formatted string
function Formatter:format_register(register) end

---Formats a `i8`
---
---@param value integer #(`i8`) Value
---@return string #The formatted string
function Formatter:format_i8(value) end

---Formats a `i16`
---
---@param value integer #(`i16`) Value
---@return string #The formatted string
function Formatter:format_i16(value) end

---Formats a `i32`
---
---@param value integer #(`i32`) Value
---@return string #The formatted string
function Formatter:format_i32(value) end

---Formats a `i64`
---
---@param value integer #(`i64`) Value
---@return string #The formatted string
function Formatter:format_i64(value) end

---Formats a `u8`
---
---@param value integer #(`u8`) Value
---@return string #The formatted string
function Formatter:format_u8(value) end

---Formats a `u16`
---
---@param value integer #(`u16`) Value
---@return string #The formatted string
function Formatter:format_u16(value) end

---Formats a `u32`
---
---@param value integer #(`u32`) Value
---@return string #The formatted string
function Formatter:format_u32(value) end

---Formats a `u64`
---
---@param value integer #(`u64`) Value
---@return string #The formatted string
function Formatter:format_u64(value) end

---Prefixes are uppercased
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `REP stosd`
---👍 | `false` | `rep stosd`
function Formatter:uppercase_prefixes() end

---Prefixes are uppercased
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `REP stosd`
---👍 | `false` | `rep stosd`
function Formatter:set_uppercase_prefixes(new_value) end

---Mnemonics are uppercased
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `MOV rcx,rax`
---👍 | `false` | `mov rcx,rax`
function Formatter:uppercase_mnemonics() end

---Mnemonics are uppercased
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `MOV rcx,rax`
---👍 | `false` | `mov rcx,rax`
function Formatter:set_uppercase_mnemonics(new_value) end

---Registers are uppercased
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov RCX,[RAX+RDX*8]`
---👍 | `false` | `mov rcx,[rax+rdx*8]`
function Formatter:uppercase_registers() end

---Registers are uppercased
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov RCX,[RAX+RDX*8]`
---👍 | `false` | `mov rcx,[rax+rdx*8]`
function Formatter:set_uppercase_registers(new_value) end

---Keywords are uppercased (eg. `BYTE PTR`, `SHORT`)
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov BYTE PTR [rcx],12h`
---👍 | `false` | `mov byte ptr [rcx],12h`
function Formatter:uppercase_keywords() end

---Keywords are uppercased (eg. `BYTE PTR`, `SHORT`)
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov BYTE PTR [rcx],12h`
---👍 | `false` | `mov byte ptr [rcx],12h`
function Formatter:set_uppercase_keywords(new_value) end

---Uppercase decorators, eg. `{z}`, `{sae}`, `{rd-sae}` (but not opmask registers: `{k1}`)
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `vunpcklps xmm2{k5}{Z},xmm6,dword bcst [rax+4]`
---👍 | `false` | `vunpcklps xmm2{k5}{z},xmm6,dword bcst [rax+4]`
function Formatter:uppercase_decorators() end

---Uppercase decorators, eg. `{z}`, `{sae}`, `{rd-sae}` (but not opmask registers: `{k1}`)
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `vunpcklps xmm2{k5}{Z},xmm6,dword bcst [rax+4]`
---👍 | `false` | `vunpcklps xmm2{k5}{z},xmm6,dword bcst [rax+4]`
function Formatter:set_uppercase_decorators(new_value) end

---Everything is uppercased, except numbers and their prefixes/suffixes
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `MOV EAX,GS:[RCX*4+0ffh]`
---👍 | `false` | `mov eax,gs:[rcx*4+0ffh]`
function Formatter:uppercase_all() end

---Everything is uppercased, except numbers and their prefixes/suffixes
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `MOV EAX,GS:[RCX*4+0ffh]`
---👍 | `false` | `mov eax,gs:[rcx*4+0ffh]`
function Formatter:set_uppercase_all(new_value) end

---(`u32`) Character index (0-based) where the first operand is formatted. Can be set to 0 to format it immediately after the mnemonic.
---At least one space or tab is always added between the mnemonic and the first operand.
---
---@return integer
---
---Default | Value | Example
-----------|-------|--------
---👍 | `0` | `mov•rcx,rbp`
---_ | `8` | `mov•••••rcx,rbp`
function Formatter:first_operand_char_index() end

---(`u32`) Character index (0-based) where the first operand is formatted. Can be set to 0 to format it immediately after the mnemonic.
---At least one space or tab is always added between the mnemonic and the first operand.
---
---@param new_value integer #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `0` | `mov•rcx,rbp`
---_ | `8` | `mov•••••rcx,rbp`
function Formatter:set_first_operand_char_index(new_value) end

---(`u32`) Size of a tab character or 0 to use spaces
---
---@return integer
---
---Default: `0`
function Formatter:tab_size() end

---(`u32`) Size of a tab character or 0 to use spaces
---
---@param new_value integer #New value
---
---Default: `0`
function Formatter:set_tab_size(new_value) end

---Add a space after the operand separator
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov rax, rcx`
---👍 | `false` | `mov rax,rcx`
function Formatter:space_after_operand_separator() end

---Add a space after the operand separator
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov rax, rcx`
---👍 | `false` | `mov rax,rcx`
function Formatter:set_space_after_operand_separator(new_value) end

---Add a space between the memory expression and the brackets
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[ rcx+rdx ]`
---👍 | `false` | `mov eax,[rcx+rdx]`
function Formatter:space_after_memory_bracket() end

---Add a space between the memory expression and the brackets
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[ rcx+rdx ]`
---👍 | `false` | `mov eax,[rcx+rdx]`
function Formatter:set_space_after_memory_bracket(new_value) end

---Add spaces between memory operand `+` and `-` operators
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rcx + rdx*8 - 80h]`
---👍 | `false` | `mov eax,[rcx+rdx*8-80h]`
function Formatter:space_between_memory_add_operators() end

---Add spaces between memory operand `+` and `-` operators
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rcx + rdx*8 - 80h]`
---👍 | `false` | `mov eax,[rcx+rdx*8-80h]`
function Formatter:set_space_between_memory_add_operators(new_value) end

---Add spaces between memory operand `*` operator
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rcx+rdx * 8-80h]`
---👍 | `false` | `mov eax,[rcx+rdx*8-80h]`
function Formatter:space_between_memory_mul_operators() end

---Add spaces between memory operand `*` operator
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rcx+rdx * 8-80h]`
---👍 | `false` | `mov eax,[rcx+rdx*8-80h]`
function Formatter:set_space_between_memory_mul_operators(new_value) end

---Show memory operand scale value before the index register
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[8*rdx]`
---👍 | `false` | `mov eax,[rdx*8]`
function Formatter:scale_before_index() end

---Show memory operand scale value before the index register
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[8*rdx]`
---👍 | `false` | `mov eax,[rdx*8]`
function Formatter:set_scale_before_index(new_value) end

---Always show the scale value even if it's `*1`
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rbx+rcx*1]`
---👍 | `false` | `mov eax,[rbx+rcx]`
function Formatter:always_show_scale() end

---Always show the scale value even if it's `*1`
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rbx+rcx*1]`
---👍 | `false` | `mov eax,[rbx+rcx]`
function Formatter:set_always_show_scale(new_value) end

---Always show the effective segment register.
---
---@return boolean
---
---If the option is `false`, only show the segment register if there's a segment override prefix.
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,ds:[ecx]`
---👍 | `false` | `mov eax,[ecx]`
function Formatter:always_show_segment_register() end

---Always show the effective segment register.
---
---@param new_value boolean #New value
---
---If the option is `false`, only show the segment register if there's a segment override prefix.
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,ds:[ecx]`
---👍 | `false` | `mov eax,[ecx]`
function Formatter:set_always_show_segment_register(new_value) end

---Show zero displacements
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rcx*2+0]`
---👍 | `false` | `mov eax,[rcx*2]`
function Formatter:show_zero_displacements() end

---Show zero displacements
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rcx*2+0]`
---👍 | `false` | `mov eax,[rcx*2]`
function Formatter:set_show_zero_displacements(new_value) end

---Hex number prefix or an empty string, eg. `"0x"`
---
---@return string
---
---Default: `""` (masm/nasm/intel), `"0x"` (gas)
function Formatter:hex_prefix() end

---Hex number prefix or an empty string, eg. `"0x"`
---
---@param new_value string #New value
---
---Default: `""` (masm/nasm/intel), `"0x"` (gas)
function Formatter:set_hex_prefix(new_value) end

---Hex number suffix or an empty string, eg. `"h"`
---
---@return string
---
---Default: `"h"` (masm/nasm/intel), `""` (gas)
function Formatter:hex_suffix() end

---Hex number suffix or an empty string, eg. `"h"`
---
---@param new_value string #New value
---
---Default: `"h"` (masm/nasm/intel), `""` (gas)
function Formatter:set_hex_suffix(new_value) end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@return integer
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `0x12345678`
---👍 | `4` | `0x1234_5678`
function Formatter:hex_digit_group_size() end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@param new_value integer #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `0x12345678`
---👍 | `4` | `0x1234_5678`
function Formatter:set_hex_digit_group_size(new_value) end

---Decimal number prefix or an empty string
---
---@return string
---
---Default: `""`
function Formatter:decimal_prefix() end

---Decimal number prefix or an empty string
---
---@param new_value string #New value
---
---Default: `""`
function Formatter:set_decimal_prefix(new_value) end

---Decimal number suffix or an empty string
---
---@return string
---
---Default: `""`
function Formatter:decimal_suffix() end

---Decimal number suffix or an empty string
---
---@param new_value string #New value
---
---Default: `""`
function Formatter:set_decimal_suffix(new_value) end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@return integer
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `12345678`
---👍 | `3` | `12_345_678`
function Formatter:decimal_digit_group_size() end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@param new_value integer #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `12345678`
---👍 | `3` | `12_345_678`
function Formatter:set_decimal_digit_group_size(new_value) end

---Octal number prefix or an empty string
---
---@return string
---
---Default: `""` (masm/nasm/intel), `"0"` (gas)
function Formatter:octal_prefix() end

---Octal number prefix or an empty string
---
---@param new_value string #New value
---
---Default: `""` (masm/nasm/intel), `"0"` (gas)
function Formatter:set_octal_prefix(new_value) end

---Octal number suffix or an empty string
---
---@return string
---
---Default: `"o"` (masm/nasm/intel), `""` (gas)
function Formatter:octal_suffix() end

---Octal number suffix or an empty string
---
---@param new_value string #New value
---
---Default: `"o"` (masm/nasm/intel), `""` (gas)
function Formatter:set_octal_suffix(new_value) end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@return integer
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `12345670`
---👍 | `4` | `1234_5670`
function Formatter:octal_digit_group_size() end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@param new_value integer #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `12345670`
---👍 | `4` | `1234_5670`
function Formatter:set_octal_digit_group_size(new_value) end

---Binary number prefix or an empty string
---
---@return string
---
---Default: `""` (masm/nasm/intel), `"0b"` (gas)
function Formatter:binary_prefix() end

---Binary number prefix or an empty string
---
---@param new_value string #New value
---
---Default: `""` (masm/nasm/intel), `"0b"` (gas)
function Formatter:set_binary_prefix(new_value) end

---Binary number suffix or an empty string
---
---@return string
---
---Default: `"b"` (masm/nasm/intel), `""` (gas)
function Formatter:binary_suffix() end

---Binary number suffix or an empty string
---
---@param new_value string #New value
---
---Default: `"b"` (masm/nasm/intel), `""` (gas)
function Formatter:set_binary_suffix(new_value) end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@return integer
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `11010111`
---👍 | `4` | `1101_0111`
function Formatter:binary_digit_group_size() end

---(`u8`) Size of a digit group, see also `Formatter:digit_separator()`
---
---@param new_value integer #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `0` | `11010111`
---👍 | `4` | `1101_0111`
function Formatter:set_binary_digit_group_size(new_value) end

---Digit separator or an empty string. See also eg. `Formatter:hex_digit_group_size()`
---
---@return string
---
---Default | Value | Example
-----------|-------|--------
---👍 | `""` | `0x12345678`
---_ | `"_"` | `0x1234_5678`
function Formatter:digit_separator() end

---Digit separator or an empty string. See also eg. `Formatter:hex_digit_group_size()`
---
---@param new_value string #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `""` | `0x12345678`
---_ | `"_"` | `0x1234_5678`
function Formatter:set_digit_separator(new_value) end

---Add leading zeros to hexadecimal/octal/binary numbers.
---
---@return boolean
---
---This option has no effect on branch targets and displacements, use `Formatter:branch_leading_zeros()`
---and `Formatter:displacement_leading_zeros()`.
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `0x0000000A`/`0000000Ah`
---👍 | `false` | `0xA`/`0Ah`
function Formatter:leading_zeros() end

---Add leading zeros to hexadecimal/octal/binary numbers.
---
---@param new_value boolean #New value
---
---This option has no effect on branch targets and displacements, use `Formatter:branch_leading_zeros()`
---and `Formatter:displacement_leading_zeros()`.
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `0x0000000A`/`0000000Ah`
---👍 | `false` | `0xA`/`0Ah`
function Formatter:set_leading_zeros(new_value) end

---Use uppercase hex digits
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `0xFF`
---_ | `false` | `0xff`
function Formatter:uppercase_hex() end

---Use uppercase hex digits
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `0xFF`
---_ | `false` | `0xff`
function Formatter:set_uppercase_hex(new_value) end

---Small hex numbers (-9 .. 9) are shown in decimal
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `9`
---_ | `false` | `0x9`
function Formatter:small_hex_numbers_in_decimal() end

---Small hex numbers (-9 .. 9) are shown in decimal
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `9`
---_ | `false` | `0x9`
function Formatter:set_small_hex_numbers_in_decimal(new_value) end

---Add a leading zero to hex numbers if there's no prefix and the number starts with hex digits `A-F`
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `0FFh`
---_ | `false` | `FFh`
function Formatter:add_leading_zero_to_hex_numbers() end

---Add a leading zero to hex numbers if there's no prefix and the number starts with hex digits `A-F`
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `0FFh`
---_ | `false` | `FFh`
function Formatter:set_add_leading_zero_to_hex_numbers(new_value) end

---Number base (`2`, `8`, `10`, `16`)
---
---@return integer
---
---Default: `16`
function Formatter:number_base() end

---Number base (`2`, `8`, `10`, `16`)
---
---@param new_value integer #New value
---
---Default: `16`
function Formatter:set_number_base(new_value) end

---Add leading zeros to branch offsets. Used by `CALL NEAR`, `CALL FAR`, `JMP NEAR`, `JMP FAR`, `Jcc`, `LOOP`, `LOOPcc`, `XBEGIN`
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `je 00000123h`
---_ | `false` | `je 123h`
function Formatter:branch_leading_zeros() end

---Add leading zeros to branch offsets. Used by `CALL NEAR`, `CALL FAR`, `JMP NEAR`, `JMP FAR`, `Jcc`, `LOOP`, `LOOPcc`, `XBEGIN`
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `je 00000123h`
---_ | `false` | `je 123h`
function Formatter:set_branch_leading_zeros(new_value) end

---Show immediate operands as signed numbers
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,-1`
---👍 | `false` | `mov eax,FFFFFFFF`
function Formatter:signed_immediate_operands() end

---Show immediate operands as signed numbers
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,-1`
---👍 | `false` | `mov eax,FFFFFFFF`
function Formatter:set_signed_immediate_operands(new_value) end

---Displacements are signed numbers
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `mov al,[eax-2000h]`
---_ | `false` | `mov al,[eax+0FFFFE000h]`
function Formatter:signed_memory_displacements() end

---Displacements are signed numbers
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `mov al,[eax-2000h]`
---_ | `false` | `mov al,[eax+0FFFFE000h]`
function Formatter:set_signed_memory_displacements(new_value) end

---Add leading zeros to displacements
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov al,[eax+00000012h]`
---👍 | `false` | `mov al,[eax+12h]`
function Formatter:displacement_leading_zeros() end

---Add leading zeros to displacements
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov al,[eax+00000012h]`
---👍 | `false` | `mov al,[eax+12h]`
function Formatter:set_displacement_leading_zeros(new_value) end

---Options that control if the memory size (eg. `DWORD PTR`) is shown or not.
---
---@return integer #A `MemorySizeOptions` enum value
---
---This is ignored by the gas (AT&T) formatter.
---
---Default: `MemorySizeOptions.Default`
function Formatter:memory_size_options() end

---Options that control if the memory size (eg. `DWORD PTR`) is shown or not.
---
---@param new_value integer #New value (A `MemorySizeOptions` enum value)
---
---This is ignored by the gas (AT&T) formatter.
---
---Default: `MemorySizeOptions.Default`
function Formatter:set_memory_size_options(new_value) end

---Show `RIP+displ` or the virtual address
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rip+12345678h]`
---👍 | `false` | `mov eax,[1029384756AFBECDh]`
function Formatter:rip_relative_addresses() end

---Show `RIP+displ` or the virtual address
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[rip+12345678h]`
---👍 | `false` | `mov eax,[1029384756AFBECDh]`
function Formatter:set_rip_relative_addresses(new_value) end

---Show `NEAR`, `SHORT`, etc if it's a branch instruction
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `je short 1234h`
---_ | `false` | `je 1234h`
function Formatter:show_branch_size() end

---Show `NEAR`, `SHORT`, etc if it's a branch instruction
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `je short 1234h`
---_ | `false` | `je 1234h`
function Formatter:set_show_branch_size(new_value) end

---Use pseudo instructions
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `vcmpnltsd xmm2,xmm6,xmm3`
---_ | `false` | `vcmpsd xmm2,xmm6,xmm3,5`
function Formatter:use_pseudo_ops() end

---Use pseudo instructions
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `vcmpnltsd xmm2,xmm6,xmm3`
---_ | `false` | `vcmpsd xmm2,xmm6,xmm3,5`
function Formatter:set_use_pseudo_ops(new_value) end

---Show the original value after the symbol name
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[myfield (12345678)]`
---👍 | `false` | `mov eax,[myfield]`
function Formatter:show_symbol_address() end

---Show the original value after the symbol name
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,[myfield (12345678)]`
---👍 | `false` | `mov eax,[myfield]`
function Formatter:set_show_symbol_address(new_value) end

---(gas only): If `true`, the formatter doesn't add `%` to registers
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,ecx`
---👍 | `false` | `mov %eax,%ecx`
function Formatter:gas_naked_registers() end

---(gas only): If `true`, the formatter doesn't add `%` to registers
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `mov eax,ecx`
---👍 | `false` | `mov %eax,%ecx`
function Formatter:set_gas_naked_registers(new_value) end

---(gas only): Shows the mnemonic size suffix even when not needed
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `movl %eax,%ecx`
---👍 | `false` | `mov %eax,%ecx`
function Formatter:gas_show_mnemonic_size_suffix() end

---(gas only): Shows the mnemonic size suffix even when not needed
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `movl %eax,%ecx`
---👍 | `false` | `mov %eax,%ecx`
function Formatter:set_gas_show_mnemonic_size_suffix(new_value) end

---(gas only): Add a space after the comma if it's a memory operand
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `(%eax, %ecx, 2)`
---👍 | `false` | `(%eax,%ecx,2)`
function Formatter:gas_space_after_memory_operand_comma() end

---(gas only): Add a space after the comma if it's a memory operand
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `(%eax, %ecx, 2)`
---👍 | `false` | `(%eax,%ecx,2)`
function Formatter:set_gas_space_after_memory_operand_comma(new_value) end

---(masm only): Add a `DS` segment override even if it's not present. Used if it's 16/32-bit code and mem op is a displ
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `mov eax,ds:[12345678]`
---_ | `false` | `mov eax,[12345678]`
function Formatter:masm_add_ds_prefix32() end

---(masm only): Add a `DS` segment override even if it's not present. Used if it's 16/32-bit code and mem op is a displ
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `mov eax,ds:[12345678]`
---_ | `false` | `mov eax,[12345678]`
function Formatter:set_masm_add_ds_prefix32(new_value) end

---(masm only): Show symbols in brackets
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `[ecx+symbol]` / `[symbol]`
---_ | `false` | `symbol[ecx]` / `symbol`
function Formatter:masm_symbol_displ_in_brackets() end

---(masm only): Show symbols in brackets
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `[ecx+symbol]` / `[symbol]`
---_ | `false` | `symbol[ecx]` / `symbol`
function Formatter:set_masm_symbol_displ_in_brackets(new_value) end

---(masm only): Show displacements in brackets
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `[ecx+1234h]`
---_ | `false` | `1234h[ecx]`
function Formatter:masm_displ_in_brackets() end

---(masm only): Show displacements in brackets
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---👍 | `true` | `[ecx+1234h]`
---_ | `false` | `1234h[ecx]`
function Formatter:set_masm_displ_in_brackets(new_value) end

---(nasm only): Shows `BYTE`, `WORD`, `DWORD` or `QWORD` if it's a sign extended immediate operand value
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `or rcx,byte -1`
---👍 | `false` | `or rcx,-1`
function Formatter:nasm_show_sign_extended_immediate_size() end

---(nasm only): Shows `BYTE`, `WORD`, `DWORD` or `QWORD` if it's a sign extended immediate operand value
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `or rcx,byte -1`
---👍 | `false` | `or rcx,-1`
function Formatter:set_nasm_show_sign_extended_immediate_size(new_value) end

---Use `st(0)` instead of `st` if `st` can be used. Ignored by the nasm formatter.
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `fadd st(0),st(3)`
---👍 | `false` | `fadd st,st(3)`
function Formatter:prefer_st0() end

---Use `st(0)` instead of `st` if `st` can be used. Ignored by the nasm formatter.
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `fadd st(0),st(3)`
---👍 | `false` | `fadd st,st(3)`
function Formatter:set_prefer_st0(new_value) end

---Show useless prefixes. If it has useless prefixes, it could be data and not code.
---
---@return boolean
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `es rep add eax,ecx`
---👍 | `false` | `add eax,ecx`
function Formatter:show_useless_prefixes() end

---Show useless prefixes. If it has useless prefixes, it could be data and not code.
---
---@param new_value boolean #New value
---
---Default | Value | Example
-----------|-------|--------
---_ | `true` | `es rep add eax,ecx`
---👍 | `false` | `add eax,ecx`
function Formatter:set_show_useless_prefixes(new_value) end

---Mnemonic condition code selector (eg. `JB` / `JC` / `JNAE`)
---
---@return integer #A `CC_b` enum value
---
---Default: `JB`, `CMOVB`, `SETB`
function Formatter:cc_b() end

---Mnemonic condition code selector (eg. `JB` / `JC` / `JNAE`)
---
---@param new_value integer #New value (A `CC_b` enum value)
---
---Default: `JB`, `CMOVB`, `SETB`
function Formatter:set_cc_b(new_value) end

---Mnemonic condition code selector (eg. `JAE` / `JNB` / `JNC`)
---
---@return integer #A `CC_ae` enum value
---
---Default: `JAE`, `CMOVAE`, `SETAE`
function Formatter:cc_ae() end

---Mnemonic condition code selector (eg. `JAE` / `JNB` / `JNC`)
---
---@param new_value integer #New value (A `CC_ae` enum value)
---
---Default: `JAE`, `CMOVAE`, `SETAE`
function Formatter:set_cc_ae(new_value) end

---Mnemonic condition code selector (eg. `JE` / `JZ`)
---
---@return integer #A `CC_e` enum value
---
---Default: `JE`, `CMOVE`, `SETE`, `LOOPE`, `REPE`
function Formatter:cc_e() end

---Mnemonic condition code selector (eg. `JE` / `JZ`)
---
---@param new_value integer #New value (A `CC_e` enum value)
---
---Default: `JE`, `CMOVE`, `SETE`, `LOOPE`, `REPE`
function Formatter:set_cc_e(new_value) end

---Mnemonic condition code selector (eg. `JNE` / `JNZ`)
---
---@return integer #A `CC_ne` enum value
---
---Default: `JNE`, `CMOVNE`, `SETNE`, `LOOPNE`, `REPNE`
function Formatter:cc_ne() end

---Mnemonic condition code selector (eg. `JNE` / `JNZ`)
---
---@param new_value integer #New value (A `CC_ne` enum value)
---
---Default: `JNE`, `CMOVNE`, `SETNE`, `LOOPNE`, `REPNE`
function Formatter:set_cc_ne(new_value) end

---Mnemonic condition code selector (eg. `JBE` / `JNA`)
---
---@return integer #A `CC_be` enum value
---
---Default: `JBE`, `CMOVBE`, `SETBE`
function Formatter:cc_be() end

---Mnemonic condition code selector (eg. `JBE` / `JNA`)
---
---@param new_value integer #New value (A `CC_be` enum value)
---
---Default: `JBE`, `CMOVBE`, `SETBE`
function Formatter:set_cc_be(new_value) end

---Mnemonic condition code selector (eg. `JA` / `JNBE`)
---
---@return integer #A `CC_a` enum value
---
---Default: `JA`, `CMOVA`, `SETA`
function Formatter:cc_a() end

---Mnemonic condition code selector (eg. `JA` / `JNBE`)
---
---@param new_value integer #New value (A `CC_a` enum value)
---
---Default: `JA`, `CMOVA`, `SETA`
function Formatter:set_cc_a(new_value) end

---Mnemonic condition code selector (eg. `JP` / `JPE`)
---
---@return integer #A `CC_p` enum value
---
---Default: `JP`, `CMOVP`, `SETP`
function Formatter:cc_p() end

---Mnemonic condition code selector (eg. `JP` / `JPE`)
---
---@param new_value integer #New value (A `CC_p` enum value)
---
---Default: `JP`, `CMOVP`, `SETP`
function Formatter:set_cc_p(new_value) end

---Mnemonic condition code selector (eg. `JNP` / `JPO`)
---
---@return integer #A `CC_np` enum value
---
---Default: `JNP`, `CMOVNP`, `SETNP`
function Formatter:cc_np() end

---Mnemonic condition code selector (eg. `JNP` / `JPO`)
---
---@param new_value integer #New value (A `CC_np` enum value)
---
---Default: `JNP`, `CMOVNP`, `SETNP`
function Formatter:set_cc_np(new_value) end

---Mnemonic condition code selector (eg. `JL` / `JNGE`)
---
---@return integer #A `CC_l` enum value
---
---Default: `JL`, `CMOVL`, `SETL`
function Formatter:cc_l() end

---Mnemonic condition code selector (eg. `JL` / `JNGE`)
---
---@param new_value integer #New value (A `CC_l` enum value)
---
---Default: `JL`, `CMOVL`, `SETL`
function Formatter:set_cc_l(new_value) end

---Mnemonic condition code selector (eg. `JGE` / `JNL`)
---
---@return integer #A `CC_ge` enum value
---
---Default: `JGE`, `CMOVGE`, `SETGE`
function Formatter:cc_ge() end

---Mnemonic condition code selector (eg. `JGE` / `JNL`)
---
---@param new_value integer #New value (A `CC_ge` enum value)
---
---Default: `JGE`, `CMOVGE`, `SETGE`
function Formatter:set_cc_ge(new_value) end

---Mnemonic condition code selector (eg. `JLE` / `JNG`)
---
---@return integer #A `CC_le` enum value
---
---Default: `JLE`, `CMOVLE`, `SETLE`
function Formatter:cc_le() end

---Mnemonic condition code selector (eg. `JLE` / `JNG`)
---
---@param new_value integer #New value (A `CC_le` enum value)
---
---Default: `JLE`, `CMOVLE`, `SETLE`
function Formatter:set_cc_le(new_value) end

---Mnemonic condition code selector (eg. `JG` / `JNLE`)
---
---@return integer #A `CC_g` enum value
---
---Default: `JG`, `CMOVG`, `SETG`
function Formatter:cc_g() end

---Mnemonic condition code selector (eg. `JG` / `JNLE`)
---
---@param new_value integer #New value (A `CC_g` enum value)
---
---Default: `JG`, `CMOVG`, `SETG`
function Formatter:set_cc_g(new_value) end

return Formatter
