#!/bin/sed -f
/"errop/	{s/.type =/& R_ANAL_OP_TYPE_TRAP |/};
/"abs/		{s/.type =/& R_ANAL_OP_TYPE_ABS |/};
/"copy/		{s/.type =/& R_ANAL_OP_TYPE_MOV |/};
/"not[wd]/	{s/.type =/& R_ANAL_OP_TYPE_NOT |/};
/"add/		{s/.type =/& R_ANAL_OP_TYPE_ADD |/};
/"sbf/		{s/.type =/& R_ANAL_OP_TYPE_SUB |/};
/"and/		{s/.type =/& R_ANAL_OP_TYPE_AND |/};
/"mul/		{s/.type =/& R_ANAL_OP_TYPE_MUL |/};
/"nop/		{s/.type =/& R_ANAL_OP_TYPE_NOP |/};
/"nor/		{s/.type =/& R_ANAL_OP_TYPE_NOR |/};
/"neg/		{s/.type =/& R_ANAL_OP_TYPE_CPL |/};
/"or[wd]/	{s/.type =/& R_ANAL_OP_TYPE_OR |/};
/"xor[wd]/	{s/.type =/& R_ANAL_OP_TYPE_XOR |/};
/"srl[hwd]/	{s/.type =/& R_ANAL_OP_TYPE_SHR |/};
/"sll[hwd]/	{s/.type =/& R_ANAL_OP_TYPE_SHL |/};
/"rol/		{s/.type =/& R_ANAL_OP_TYPE_ROL |/};
/"ror/		{s/.type =/& R_ANAL_OP_TYPE_ROR |/};
/"comp/		{s/.type =/& R_ANAL_OP_TYPE_CMP |/};
/"cmove/	{s/.type =/& R_ANAL_OP_TYPE_CMOV |/};
/"goto/		{s/.type =/& R_ANAL_OP_TYPE_JMP |/};
/"igoto/	{s/.type =/& R_ANAL_OP_TYPE_RJMP |/};
/"cb\./		{s/.type =/& R_ANAL_OP_TYPE_CJMP |/};
/"call/		{s/.type =/& R_ANAL_OP_TYPE_CALL |/};
/"icall/	{s/.type =/& R_ANAL_OP_TYPE_RCALL |/};
/"scall/	{s/.type =/& R_ANAL_OP_TYPE_SWI |/};
/"ret/		{s/.type =/& R_ANAL_OP_TYPE_RET |/};
/"rfe/		{s/.type =/& R_ANAL_OP_TYPE_RET |/};
/"s[bhwdqov]["\.]/	{s/.type =/& R_ANAL_OP_TYPE_STORE |/};
/"l[bhwdqov]["\.sz]/	{s/.type =/& R_ANAL_OP_TYPE_LOAD |/};
/"l[bhw][sz]/	{s/.type =/& R_ANAL_OP_TYPE_LOAD |/};
/"loopdo/	{s/.type =/& R_ANAL_OP_TYPE_REP |/};

/\.[dw]\?eqz"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/;s/.cond =/& R_ANAL_COND_EQ |/};
/\.[dw]\?nez"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/;s/.cond =/& R_ANAL_COND_NE |/};
/\.[dw]\?gez"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/;s/.cond =/& R_ANAL_COND_GE |/};
/\.[dw]\?gtz"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/;s/.cond =/& R_ANAL_COND_GT |/};
/\.[dw]\?lez"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/;s/.cond =/& R_ANAL_COND_LE |/};
/\.[dw]\?ltz"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/;s/.cond =/& R_ANAL_COND_LT |/};
/\.even"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/};
/\.odd"/	{s/.type =/& R_ANAL_OP_TYPE_COND |/};

/.*hv0/{s/"%s/&.lo/};
/.*hv1/{s/"%s/&.hi/};
/.*bv0/{s/"%s/&.x/};
/.*bv1/{s/"%s/&.y/};
/.*bv2/{s/"%s/&.z/};
/.*bv3/{s/"%s/&.t/};
