/* Generated by libdrgn/build-aux/gen_arch_inc_strswitch.py. */

enum {
	DRGN_REGISTER_NUMBER__ra_sign_state,
	DRGN_REGISTER_NUMBER__sp,
	DRGN_REGISTER_NUMBER__x19,
	DRGN_REGISTER_NUMBER__x20,
	DRGN_REGISTER_NUMBER__x21,
	DRGN_REGISTER_NUMBER__x22,
	DRGN_REGISTER_NUMBER__x23,
	DRGN_REGISTER_NUMBER__x24,
	DRGN_REGISTER_NUMBER__x25,
	DRGN_REGISTER_NUMBER__x26,
	DRGN_REGISTER_NUMBER__x27,
	DRGN_REGISTER_NUMBER__x28,
	DRGN_REGISTER_NUMBER__x29,
	DRGN_REGISTER_NUMBER__x30,
	DRGN_REGISTER_NUMBER__x0,
	DRGN_REGISTER_NUMBER__x1,
	DRGN_REGISTER_NUMBER__x2,
	DRGN_REGISTER_NUMBER__x3,
	DRGN_REGISTER_NUMBER__x4,
	DRGN_REGISTER_NUMBER__x5,
	DRGN_REGISTER_NUMBER__x6,
	DRGN_REGISTER_NUMBER__x7,
	DRGN_REGISTER_NUMBER__x8,
	DRGN_REGISTER_NUMBER__x9,
	DRGN_REGISTER_NUMBER__x10,
	DRGN_REGISTER_NUMBER__x11,
	DRGN_REGISTER_NUMBER__x12,
	DRGN_REGISTER_NUMBER__x13,
	DRGN_REGISTER_NUMBER__x14,
	DRGN_REGISTER_NUMBER__x15,
	DRGN_REGISTER_NUMBER__x16,
	DRGN_REGISTER_NUMBER__x17,
	DRGN_REGISTER_NUMBER__x18,
	DRGN_REGISTER_NUMBER__pc,
	DRGN_REGISTER_NUMBER__pstate,
};

struct drgn_arch_register_layout {
	char ra_sign_state[8];
	char sp[8];
	char x19[8];
	char x20[8];
	char x21[8];
	char x22[8];
	char x23[8];
	char x24[8];
	char x25[8];
	char x26[8];
	char x27[8];
	char x28[8];
	char x29[8];
	char x30[8];
	char x0[8];
	char x1[8];
	char x2[8];
	char x3[8];
	char x4[8];
	char x5[8];
	char x6[8];
	char x7[8];
	char x8[8];
	char x9[8];
	char x10[8];
	char x11[8];
	char x12[8];
	char x13[8];
	char x14[8];
	char x15[8];
	char x16[8];
	char x17[8];
	char x18[8];
	char pc[8];
	char pstate[8];
};

static const struct drgn_register_layout register_layout[] = {
	{ offsetof(struct drgn_arch_register_layout, ra_sign_state), 8 },
	{ offsetof(struct drgn_arch_register_layout, sp), 8 },
	{ offsetof(struct drgn_arch_register_layout, x19), 8 },
	{ offsetof(struct drgn_arch_register_layout, x20), 8 },
	{ offsetof(struct drgn_arch_register_layout, x21), 8 },
	{ offsetof(struct drgn_arch_register_layout, x22), 8 },
	{ offsetof(struct drgn_arch_register_layout, x23), 8 },
	{ offsetof(struct drgn_arch_register_layout, x24), 8 },
	{ offsetof(struct drgn_arch_register_layout, x25), 8 },
	{ offsetof(struct drgn_arch_register_layout, x26), 8 },
	{ offsetof(struct drgn_arch_register_layout, x27), 8 },
	{ offsetof(struct drgn_arch_register_layout, x28), 8 },
	{ offsetof(struct drgn_arch_register_layout, x29), 8 },
	{ offsetof(struct drgn_arch_register_layout, x30), 8 },
	{ offsetof(struct drgn_arch_register_layout, x0), 8 },
	{ offsetof(struct drgn_arch_register_layout, x1), 8 },
	{ offsetof(struct drgn_arch_register_layout, x2), 8 },
	{ offsetof(struct drgn_arch_register_layout, x3), 8 },
	{ offsetof(struct drgn_arch_register_layout, x4), 8 },
	{ offsetof(struct drgn_arch_register_layout, x5), 8 },
	{ offsetof(struct drgn_arch_register_layout, x6), 8 },
	{ offsetof(struct drgn_arch_register_layout, x7), 8 },
	{ offsetof(struct drgn_arch_register_layout, x8), 8 },
	{ offsetof(struct drgn_arch_register_layout, x9), 8 },
	{ offsetof(struct drgn_arch_register_layout, x10), 8 },
	{ offsetof(struct drgn_arch_register_layout, x11), 8 },
	{ offsetof(struct drgn_arch_register_layout, x12), 8 },
	{ offsetof(struct drgn_arch_register_layout, x13), 8 },
	{ offsetof(struct drgn_arch_register_layout, x14), 8 },
	{ offsetof(struct drgn_arch_register_layout, x15), 8 },
	{ offsetof(struct drgn_arch_register_layout, x16), 8 },
	{ offsetof(struct drgn_arch_register_layout, x17), 8 },
	{ offsetof(struct drgn_arch_register_layout, x18), 8 },
	{ offsetof(struct drgn_arch_register_layout, pc), 8 },
	{ offsetof(struct drgn_arch_register_layout, pstate), 8 },
};

static drgn_register_number dwarf_regno_to_internal(uint64_t dwarf_regno)
{
	switch (dwarf_regno) {
	case 34:
		return DRGN_REGISTER_NUMBER__ra_sign_state;
	case 31:
		return DRGN_REGISTER_NUMBER__sp;
	case 19:
		return DRGN_REGISTER_NUMBER__x19;
	case 20:
		return DRGN_REGISTER_NUMBER__x20;
	case 21:
		return DRGN_REGISTER_NUMBER__x21;
	case 22:
		return DRGN_REGISTER_NUMBER__x22;
	case 23:
		return DRGN_REGISTER_NUMBER__x23;
	case 24:
		return DRGN_REGISTER_NUMBER__x24;
	case 25:
		return DRGN_REGISTER_NUMBER__x25;
	case 26:
		return DRGN_REGISTER_NUMBER__x26;
	case 27:
		return DRGN_REGISTER_NUMBER__x27;
	case 28:
		return DRGN_REGISTER_NUMBER__x28;
	case 29:
		return DRGN_REGISTER_NUMBER__x29;
	case 30:
		return DRGN_REGISTER_NUMBER__x30;
	case 0:
		return DRGN_REGISTER_NUMBER__x0;
	case 1:
		return DRGN_REGISTER_NUMBER__x1;
	case 2:
		return DRGN_REGISTER_NUMBER__x2;
	case 3:
		return DRGN_REGISTER_NUMBER__x3;
	case 4:
		return DRGN_REGISTER_NUMBER__x4;
	case 5:
		return DRGN_REGISTER_NUMBER__x5;
	case 6:
		return DRGN_REGISTER_NUMBER__x6;
	case 7:
		return DRGN_REGISTER_NUMBER__x7;
	case 8:
		return DRGN_REGISTER_NUMBER__x8;
	case 9:
		return DRGN_REGISTER_NUMBER__x9;
	case 10:
		return DRGN_REGISTER_NUMBER__x10;
	case 11:
		return DRGN_REGISTER_NUMBER__x11;
	case 12:
		return DRGN_REGISTER_NUMBER__x12;
	case 13:
		return DRGN_REGISTER_NUMBER__x13;
	case 14:
		return DRGN_REGISTER_NUMBER__x14;
	case 15:
		return DRGN_REGISTER_NUMBER__x15;
	case 16:
		return DRGN_REGISTER_NUMBER__x16;
	case 17:
		return DRGN_REGISTER_NUMBER__x17;
	case 18:
		return DRGN_REGISTER_NUMBER__x18;
	case 32:
		return DRGN_REGISTER_NUMBER__pc;
	default:
		return DRGN_REGISTER_NUMBER_UNKNOWN;
	}
}

static const struct drgn_register registers[] = {
	{
		.names = (const char * const []){
			"x0",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x0,
	},
	{
		.names = (const char * const []){
			"x1",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x1,
	},
	{
		.names = (const char * const []){
			"x2",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x2,
	},
	{
		.names = (const char * const []){
			"x3",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x3,
	},
	{
		.names = (const char * const []){
			"x4",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x4,
	},
	{
		.names = (const char * const []){
			"x5",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x5,
	},
	{
		.names = (const char * const []){
			"x6",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x6,
	},
	{
		.names = (const char * const []){
			"x7",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x7,
	},
	{
		.names = (const char * const []){
			"x8",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x8,
	},
	{
		.names = (const char * const []){
			"x9",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x9,
	},
	{
		.names = (const char * const []){
			"x10",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x10,
	},
	{
		.names = (const char * const []){
			"x11",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x11,
	},
	{
		.names = (const char * const []){
			"x12",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x12,
	},
	{
		.names = (const char * const []){
			"x13",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x13,
	},
	{
		.names = (const char * const []){
			"x14",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x14,
	},
	{
		.names = (const char * const []){
			"x15",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x15,
	},
	{
		.names = (const char * const []){
			"x16",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x16,
	},
	{
		.names = (const char * const []){
			"x17",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x17,
	},
	{
		.names = (const char * const []){
			"x18",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x18,
	},
	{
		.names = (const char * const []){
			"x19",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x19,
	},
	{
		.names = (const char * const []){
			"x20",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x20,
	},
	{
		.names = (const char * const []){
			"x21",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x21,
	},
	{
		.names = (const char * const []){
			"x22",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x22,
	},
	{
		.names = (const char * const []){
			"x23",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x23,
	},
	{
		.names = (const char * const []){
			"x24",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x24,
	},
	{
		.names = (const char * const []){
			"x25",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x25,
	},
	{
		.names = (const char * const []){
			"x26",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x26,
	},
	{
		.names = (const char * const []){
			"x27",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x27,
	},
	{
		.names = (const char * const []){
			"x28",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__x28,
	},
	{
		.names = (const char * const []){
			"x29",
			"fp",
		},
		.num_names = 2,
		.regno = DRGN_REGISTER_NUMBER__x29,
	},
	{
		.names = (const char * const []){
			"x30",
			"lr",
		},
		.num_names = 2,
		.regno = DRGN_REGISTER_NUMBER__x30,
	},
	{
		.names = (const char * const []){
			"sp",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__sp,
	},
	{
		.names = (const char * const []){
			"pstate",
		},
		.num_names = 1,
		.regno = DRGN_REGISTER_NUMBER__pstate,
	},
};

static const struct drgn_register *register_by_name(const char *name)
{
	/* Generated by libdrgn/build-aux/gen_strswitch.py. */
	switch (1) {
	default: {
		#define strswitch0_args(str) \
			const char *strswitch0_str = (str);
		strswitch0_args(
	            name
		)
		#undef strswitch0_args
		if (strswitch0_str[0] == 'f') {
			if (strswitch0_str[1] == 'p' && strswitch0_str[2] == '\0') {
				strswitch0_case30:
		return &registers[29];
				goto strswitch0_case31;
			} else {
				goto strswitch0_default;
			}
		} else if (strswitch0_str[0] == 'l') {
			if (strswitch0_str[1] == 'r' && strswitch0_str[2] == '\0') {
				strswitch0_case32:
		return &registers[30];
				goto strswitch0_case33;
			} else {
				goto strswitch0_default;
			}
		} else if (strswitch0_str[0] == 'p') {
			if (strswitch0_str[1] == 's' && strswitch0_str[2] == 't' && strswitch0_str[3] == 'a' && strswitch0_str[4] == 't' && strswitch0_str[5] == 'e' && strswitch0_str[6] == '\0') {
				strswitch0_case34:
		return &registers[32];
				goto strswitch0_default;
			} else {
				goto strswitch0_default;
			}
		} else if (strswitch0_str[0] == 's') {
			if (strswitch0_str[1] == 'p' && strswitch0_str[2] == '\0') {
				strswitch0_case33:
		return &registers[31];
				goto strswitch0_case34;
			} else {
				goto strswitch0_default;
			}
		} else if (strswitch0_str[0] == 'x') {
			if (strswitch0_str[1] == '0') {
				if (strswitch0_str[2] == '\0') {
		return &registers[0];
					goto strswitch0_case1;
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '1') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case1:
		return &registers[1];
					goto strswitch0_case2;
				} else if (strswitch0_str[2] == '0') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case10:
		return &registers[10];
						goto strswitch0_case11;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '1') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case11:
		return &registers[11];
						goto strswitch0_case12;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '2') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case12:
		return &registers[12];
						goto strswitch0_case13;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '3') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case13:
		return &registers[13];
						goto strswitch0_case14;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '4') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case14:
		return &registers[14];
						goto strswitch0_case15;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '5') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case15:
		return &registers[15];
						goto strswitch0_case16;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '6') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case16:
		return &registers[16];
						goto strswitch0_case17;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '7') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case17:
		return &registers[17];
						goto strswitch0_case18;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '8') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case18:
		return &registers[18];
						goto strswitch0_case19;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '9') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case19:
		return &registers[19];
						goto strswitch0_case20;
					} else {
						goto strswitch0_default;
					}
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '2') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case2:
		return &registers[2];
					goto strswitch0_case3;
				} else if (strswitch0_str[2] == '0') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case20:
		return &registers[20];
						goto strswitch0_case21;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '1') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case21:
		return &registers[21];
						goto strswitch0_case22;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '2') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case22:
		return &registers[22];
						goto strswitch0_case23;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '3') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case23:
		return &registers[23];
						goto strswitch0_case24;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '4') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case24:
		return &registers[24];
						goto strswitch0_case25;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '5') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case25:
		return &registers[25];
						goto strswitch0_case26;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '6') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case26:
		return &registers[26];
						goto strswitch0_case27;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '7') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case27:
		return &registers[27];
						goto strswitch0_case28;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '8') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case28:
		return &registers[28];
						goto strswitch0_case29;
					} else {
						goto strswitch0_default;
					}
				} else if (strswitch0_str[2] == '9') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case29:
		return &registers[29];
						goto strswitch0_case30;
					} else {
						goto strswitch0_default;
					}
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '3') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case3:
		return &registers[3];
					goto strswitch0_case4;
				} else if (strswitch0_str[2] == '0') {
					if (strswitch0_str[3] == '\0') {
						strswitch0_case31:
		return &registers[30];
						goto strswitch0_case32;
					} else {
						goto strswitch0_default;
					}
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '4') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case4:
		return &registers[4];
					goto strswitch0_case5;
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '5') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case5:
		return &registers[5];
					goto strswitch0_case6;
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '6') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case6:
		return &registers[6];
					goto strswitch0_case7;
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '7') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case7:
		return &registers[7];
					goto strswitch0_case8;
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '8') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case8:
		return &registers[8];
					goto strswitch0_case9;
				} else {
					goto strswitch0_default;
				}
			} else if (strswitch0_str[1] == '9') {
				if (strswitch0_str[2] == '\0') {
					strswitch0_case9:
		return &registers[9];
					goto strswitch0_case10;
				} else {
					goto strswitch0_default;
				}
			} else {
				goto strswitch0_default;
			}
		} else {
			strswitch0_default:
		return NULL;
		}
	}
	}
}

#define DRGN_ARCHITECTURE_REGISTERS \
	.register_layout = register_layout, \
	.dwarf_regno_to_internal = dwarf_regno_to_internal, \
	.registers = registers, \
	.num_registers = 33, \
	.stack_pointer_regno = DRGN_REGISTER_NUMBER__sp, \
	.register_by_name = register_by_name
