-u8 lightrec_alloc_reg_out(struct regcache *cache, jit_state_t *_jit, u8 reg);
-u8 lightrec_alloc_reg_in(struct regcache *cache, jit_state_t *_jit, u8 reg);
-u8 lightrec_alloc_reg_out_ext(struct regcache *cache,
- jit_state_t *_jit, u8 reg);
-u8 lightrec_alloc_reg_in_ext(struct regcache *cache, jit_state_t *_jit, u8 reg);
+u8 lightrec_alloc_reg_out(struct regcache *cache, jit_state_t *_jit,
+ u16 reg, u8 flags);
+u8 lightrec_alloc_reg_in(struct regcache *cache, jit_state_t *_jit,
+ u16 reg, u8 flags);
+
+void lightrec_remap_reg(struct regcache *cache, jit_state_t *_jit,
+ u8 jit_reg, u16 reg_out, _Bool discard);
+
+void lightrec_load_imm(struct regcache *cache,
+ jit_state_t *_jit, u8 jit_reg, u32 pc, u32 imm);
+void lightrec_load_next_pc(struct regcache *cache, jit_state_t *_jit, u8 reg);
+void lightrec_load_next_pc_imm(struct regcache *cache,
+ jit_state_t *_jit, u32 pc, u32 imm);
+
+s8 lightrec_get_reg_with_value(struct regcache *cache, intptr_t value);
+void lightrec_temp_set_value(struct regcache *cache, u8 jit_reg, intptr_t value);
+u8 lightrec_alloc_reg_temp_with_value(struct regcache *cache,
+ jit_state_t *_jit, intptr_t value);