package gojay

import (
	
)

// DecodeUint8 reads the next JSON-encoded value from the decoder's input (io.Reader) and stores it in the uint8 pointed to by v.
//
// See the documentation for Unmarshal for details about the conversion of JSON into a Go value.
func ( *Decoder) ( *uint8) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeUint8()
}

func ( *Decoder) ( *uint8) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint8()
			if  != nil {
				return 
			}
			* = 
			return nil
		case '-': // if negative, we just set it to 0 and set error
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}
func ( *Decoder) ( **uint8) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint8()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint8)
			}
			** = 
			return nil
		case '-': // if negative, we just set it to 0 and set error
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint8)
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}

func ( *Decoder) () (uint8, error) {
	var  = .cursor
	var  = .cursor
	// look for following numbers
	for  := .cursor + 1;  < .length || .read(); ++ {
		switch .data[] {
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			 = 
			continue
		case ' ', '\n', '\t', '\r':
			continue
		case '.', ',', '}', ']':
			.cursor = 
			return .atoui8(, ), nil
		}
		// invalid json we expect numbers, dot (single one), comma, or spaces
		return 0, .raiseInvalidJSONErr(.cursor)
	}
	return .atoui8(, ), nil
}

// DecodeUint16 reads the next JSON-encoded value from the decoder's input (io.Reader) and stores it in the uint16 pointed to by v.
//
// See the documentation for Unmarshal for details about the conversion of JSON into a Go value.
func ( *Decoder) ( *uint16) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeUint16()
}

func ( *Decoder) ( *uint16) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint16()
			if  != nil {
				return 
			}
			* = 
			return nil
		case '-':
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}
func ( *Decoder) ( **uint16) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint16()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint16)
			}
			** = 
			return nil
		case '-':
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint16)
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}

func ( *Decoder) () (uint16, error) {
	var  = .cursor
	var  = .cursor
	// look for following numbers
	for  := .cursor + 1;  < .length || .read(); ++ {
		switch .data[] {
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			 = 
			continue
		case ' ', '\n', '\t', '\r':
			continue
		case '.', ',', '}', ']':
			.cursor = 
			return .atoui16(, ), nil
		}
		// invalid json we expect numbers, dot (single one), comma, or spaces
		return 0, .raiseInvalidJSONErr(.cursor)
	}
	return .atoui16(, ), nil
}

// DecodeUint32 reads the next JSON-encoded value from the decoder's input (io.Reader) and stores it in the uint32 pointed to by v.
//
// See the documentation for Unmarshal for details about the conversion of JSON into a Go value.
func ( *Decoder) ( *uint32) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeUint32()
}

func ( *Decoder) ( *uint32) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint32()
			if  != nil {
				return 
			}
			* = 
			return nil
		case '-':
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}
func ( *Decoder) ( **uint32) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint32()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint32)
			}
			** = 
			return nil
		case '-':
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint32)
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}

func ( *Decoder) () (uint32, error) {
	var  = .cursor
	var  = .cursor
	// look for following numbers
	for  := .cursor + 1;  < .length || .read(); ++ {
		switch .data[] {
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			 = 
			continue
		case ' ', '\n', '\t', '\r':
			continue
		case '.', ',', '}', ']':
			.cursor = 
			return .atoui32(, ), nil
		}
		// invalid json we expect numbers, dot (single one), comma, or spaces
		return 0, .raiseInvalidJSONErr(.cursor)
	}
	return .atoui32(, ), nil
}

// DecodeUint64 reads the next JSON-encoded value from the decoder's input (io.Reader) and stores it in the uint64 pointed to by v.
//
// See the documentation for Unmarshal for details about the conversion of JSON into a Go value.
func ( *Decoder) ( *uint64) error {
	if .isPooled == 1 {
		panic(InvalidUsagePooledDecoderError("Invalid usage of pooled decoder"))
	}
	return .decodeUint64()
}
func ( *Decoder) ( *uint64) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint64()
			if  != nil {
				return 
			}
			* = 
			return nil
		case '-':
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}
func ( *Decoder) ( **uint64) error {
	for ; .cursor < .length || .read(); .cursor++ {
		switch  := .data[.cursor];  {
		case ' ', '\n', '\t', '\r', ',':
			continue
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			,  := .getUint64()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint64)
			}
			** = 
			return nil
		case '-':
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			if * == nil {
				* = new(uint64)
			}
			return nil
		case 'n':
			.cursor++
			 := .assertNull()
			if  != nil {
				return 
			}
			return nil
		default:
			.err = .makeInvalidUnmarshalErr()
			 := .skipData()
			if  != nil {
				return 
			}
			return nil
		}
	}
	return .raiseInvalidJSONErr(.cursor)
}

func ( *Decoder) () (uint64, error) {
	var  = .cursor
	var  = .cursor
	// look for following numbers
	for  := .cursor + 1;  < .length || .read(); ++ {
		switch .data[] {
		case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
			 = 
			continue
		case ' ', '\n', '\t', '\r', '.', ',', '}', ']':
			.cursor = 
			return .atoui64(, ), nil
		}
		// invalid json we expect numbers, dot (single one), comma, or spaces
		return 0, .raiseInvalidJSONErr(.cursor)
	}
	return .atoui64(, ), nil
}

func ( *Decoder) (,  int) uint64 {
	var  =  + 1 - 
	var  = uint64(digits[.data[]])
	 =  + 1
	if  < maxUint64Length {
		for  :=  + 1;  < ; ++ {
			 := uint64(digits[.data[]])
			 = ( << 3) + ( << 1) + 
		}
	} else if  == maxUint64Length {
		for  :=  + 1;  < ; ++ {
			 := uint64(digits[.data[]])
			if  > maxUint64toMultiply {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 = ( << 3) + ( << 1)
			if math.MaxUint64- <  {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 += 
		}
	} else {
		.err = .makeInvalidUnmarshalErr()
		return 0
	}
	return 
}

func ( *Decoder) (,  int) uint32 {
	var  =  + 1 - 
	var  uint32
	 = uint32(digits[.data[]])
	 =  + 1
	if  < maxUint32Length {
		for  :=  + 1;  < ; ++ {
			 := uint32(digits[.data[]])
			 = ( << 3) + ( << 1) + 
		}
	} else if  == maxUint32Length {
		for  :=  + 1;  < ; ++ {
			 := uint32(digits[.data[]])
			if  > maxUint32toMultiply {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 = ( << 3) + ( << 1)
			if math.MaxUint32- <  {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 += 
		}
	} else if  > maxUint32Length {
		.err = .makeInvalidUnmarshalErr()
		 = 0
	}
	return 
}

func ( *Decoder) (,  int) uint16 {
	var  =  + 1 - 
	var  uint16
	 = uint16(digits[.data[]])
	 =  + 1
	if  < maxUint16Length {
		for  :=  + 1;  < ; ++ {
			 := uint16(digits[.data[]])
			 = ( << 3) + ( << 1) + 
		}
	} else if  == maxUint16Length {
		for  :=  + 1;  < ; ++ {
			 := uint16(digits[.data[]])
			if  > maxUint16toMultiply {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 = ( << 3) + ( << 1)
			if math.MaxUint16- <  {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 += 
		}
	} else if  > maxUint16Length {
		.err = .makeInvalidUnmarshalErr()
		 = 0
	}
	return 
}

func ( *Decoder) (,  int) uint8 {
	var  =  + 1 - 
	var  uint8
	 = uint8(digits[.data[]])
	 =  + 1
	if  < maxUint8Length {
		for  :=  + 1;  < ; ++ {
			 := uint8(digits[.data[]])
			 = ( << 3) + ( << 1) + 
		}
	} else if  == maxUint8Length {
		for  :=  + 1;  < ; ++ {
			 := uint8(digits[.data[]])
			if  > maxUint8toMultiply {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 = ( << 3) + ( << 1)
			if math.MaxUint8- <  {
				.err = .makeInvalidUnmarshalErr()
				return 0
			}
			 += 
		}
	} else if  > maxUint8Length {
		.err = .makeInvalidUnmarshalErr()
		 = 0
	}
	return 
}

// Add Values functions

// AddUint8 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint8, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint8) error {
	return .Uint8()
}

// AddUint8Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint8, an InvalidUnmarshalError error will be returned.
// If a `null` is encountered, gojay does not change the value of the pointer.
func ( *Decoder) ( **uint8) error {
	return .Uint8Null()
}

// AddUint16 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint16, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint16) error {
	return .Uint16()
}

// AddUint16Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint16, an InvalidUnmarshalError error will be returned.
// If a `null` is encountered, gojay does not change the value of the pointer.
func ( *Decoder) ( **uint16) error {
	return .Uint16Null()
}

// AddUint32 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint32, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint32) error {
	return .Uint32()
}

// AddUint32Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint32, an InvalidUnmarshalError error will be returned.
// If a `null` is encountered, gojay does not change the value of the pointer.
func ( *Decoder) ( **uint32) error {
	return .Uint32Null()
}

// AddUint64 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint64, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint64) error {
	return .Uint64()
}

// AddUint64Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint64, an InvalidUnmarshalError error will be returned.
// If a `null` is encountered, gojay does not change the value of the pointer.
func ( *Decoder) ( **uint64) error {
	return .Uint64Null()
}

// Uint8 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint8, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint8) error {
	 := .decodeUint8()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}

// Uint8Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint8, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( **uint8) error {
	 := .decodeUint8Null()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}

// Uint16 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint16, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint16) error {
	 := .decodeUint16()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}

// Uint16Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint16, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( **uint16) error {
	 := .decodeUint16Null()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}

// Uint32 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint32, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint32) error {
	 := .decodeUint32()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}

// Uint32Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint32, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( **uint32) error {
	 := .decodeUint32Null()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}

// Uint64 decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint64, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( *uint64) error {
	 := .decodeUint64()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}

// Uint64Null decodes the JSON value within an object or an array to an *int.
// If next key value overflows uint64, an InvalidUnmarshalError error will be returned.
func ( *Decoder) ( **uint64) error {
	 := .decodeUint64Null()
	if  != nil {
		return 
	}
	.called |= 1
	return nil
}