{"name": "cp15_tls_load_store", "code": "__int64 __fastcall cp15_tls_load_store ( __int64 @@a1@@ , _DWORD * @@a2@@ , unsigned int @@a3@@ , int @@a4@@ ) { unsigned int v7 ; unsigned int v8 ; unsigned int v9 ; unsigned int v10 ; int @@v11@@ ; int @@v12@@ ; int @@v13@@ ; @@v11@@ = HIWORD ( @@a3@@ ) & Number ; @@v12@@ = @@a3@@ & Number ; @@v13@@ = ( ( unsigned __int8 ) @@a3@@ >> Number ) | ( @@a3@@ >> Number ) & Number ; if ( ! arm_feature ( @@a1@@ , Number ) ) return Number L ; if ( @@v11@@ != Number || @@v12@@ ) return Number L ; if ( ( @@a3@@ & Number ) != Number ) { if ( @@v13@@ == Number ) { v9 = load_cpu_offset ( Number ) ; store_reg ( ( __int64 ) @@a2@@ , @@a4@@ , v9 ) ; } else { if ( @@v13@@ > Number ) return Number L ; if ( @@v13@@ == Number ) { v7 = load_cpu_offset ( Number ) ; store_reg ( ( __int64 ) @@a2@@ , @@a4@@ , v7 ) ; } else { if ( @@v13@@ != Number ) return Number L ; v8 = load_cpu_offset ( Number ) ; store_reg ( ( __int64 ) @@a2@@ , @@a4@@ , v8 ) ; } } return Number L ; } v10 = load_reg ( @@a2@@ , @@a4@@ ) ; if ( @@v13@@ == Number ) { store_cpu_offset ( v10 , Number ) ; } else { if ( @@v13@@ > Number ) { LABEL_24 : tcg_temp_free_i32 ( v10 ) ; return Number L ; } if ( @@v13@@ == Number ) { store_cpu_offset ( v10 , Number ) ; } else { if ( @@v13@@ != Number ) goto LABEL_24 ; store_cpu_offset ( v10 , Number ) ; } } return Number L ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a4", "t": {"T": 1, "n": "int", "s": 4}, "location": "r24"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_DWORD"}, "location": "r64"}, {"n": "v13", "t": {"T": 1, "n": "int", "s": 4}, "location": "s12"}, {"n": "v12", "t": {"T": 1, "n": "int", "s": 4}, "location": "s16"}, {"n": "v11", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}]}
{"name": "arm_feature", "code": "_BOOL8 __fastcall arm_feature ( __int64 @@a1@@ , char @@a2@@ ) { return ( * ( _DWORD * ) ( @@a1@@ + Number ) & ( Number << @@a2@@ ) ) != Number ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "char", "s": 1}, "location": "r64"}]} {"name": "load_cpu_offset", "code": "__int64 __fastcall load_cpu_offset ( int @@a1@@ ) { unsigned int @@v2@@ ; @@v2@@ = tcg_temp_new_i32 ( ) ; tcg_gen_ld_i32 ( @@v2@@ , cpu_env , @@a1@@ ) ; return @@v2@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "int", "s": 4}, "location": "r56"}, {"n": "v2", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}]} {"name": "store_cpu_offset", "code": "unsigned __int64 __fastcall store_cpu_offset ( unsigned int @@a1@@ , int @@a2@@ ) { unsigned __int64 @@v3@@ ; @@v3@@ = __readfsqword ( Number ) ; tcg_gen_st_i32 ( @@a1@@ , cpu_env , @@a2@@ ) ; tcg_temp_free_i32 ( @@a1@@ ) ; return __readfsqword ( Number ) ^ @@v3@@ ; }", "source": [{"n": "a1", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "load_reg", "code": "__int64 __fastcall load_reg ( _DWORD * @@a1@@ , int @@a2@@ ) { unsigned int @@v3@@ ; @@v3@@ = tcg_temp_new_i32 ( ) ; load_reg_var ( @@a1@@ , @@v3@@ , @@a2@@ ) ; return @@v3@@ ; }", "source": [{"n": "a1", "t": {"T": 3, "t": "_DWORD"}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s12"}]} {"name": "store_reg", "code": "unsigned __int64 __fastcall store_reg ( __int64 @@a1@@ , int @@a2@@ , unsigned int @@a3@@ ) { unsigned __int64 @@v5@@ ; @@v5@@ = __readfsqword ( Number ) ; if ( @@a2@@ == Number ) { tcg_gen_andi_i32 ( @@a3@@ , @@a3@@ , Number ) ; * ( _DWORD * ) ( @@a1@@ + Number ) = Number ; } tcg_gen_mov_i32 ( cpu_R [ @@a2@@ ] , @@a3@@ ) ; tcg_temp_free_i32 ( @@a3@@ ) ; return __readfsqword ( Number ) ^ @@v5@@ ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 1, "n": "int", "s": 4}, "location": "r64"}, {"n": "v5", "t": {"T": 1, "n": "unsigned __int64", "s": 8}, "location": "s8"}]} {"name": "disas_cp15_insn", "code": "_BOOL8 __fastcall disas_cp15_insn ( __int64 @@a1@@ , _DWORD * @@a2@@ , unsigned int @@a3@@ ) { unsigned int @@v4@@ ; int @@v6@@ ; unsigned int @@v7@@ ; unsigned int v8 ; unsigned int v9 ; if ( arm_feature ( @@a1@@ , Number ) ) return Number L ; if ( ( @@a3@@ & Number ) == Number ) return ( @@a3@@ & Number ) != Number ; if ( ( @@a3@@ & Number ) == Number ) return Number L ; @@v4@@ = @@a3@@ & Number ; if ( ( @@a3@@ & Number ) != Number ) { if ( @@v4@@ > Number ) goto LABEL_22 ; if ( @@v4@@ != Number ) { if ( @@v4@@ > Number ) goto LABEL_22 ; if ( @@v4@@ != Number ) { if ( @@v4@@ <= Number ) { if ( @@v4@@ == Number ) return Number L ; if ( @@v4@@ <= Number && @@v4@@ == Number && arm_feature ( @@a1@@ , Number ) ) return Number L ; } goto LABEL_22 ; } } } if ( arm_feature ( @@a1@@ , Number ) ) return Number L ; LABEL_22 : if ( ! ( unsigned int ) cp15_user_ok ( @@a1@@ , @@a3@@ ) ) return Number L ; @@v6@@ = ( unsigned __int16 ) @@a3@@ >> Number ; if ( ( unsigned int ) cp15_tls_load_store ( @@a1@@ , @@a2@@ , @@a3@@ , @@v6@@ ) ) return Number L ; @@v7@@ = tcg_const_i32 ( @@a3@@ ) ; if ( ( @@a3@@ & Number ) != Number ) { v8 = tcg_temp_new_i32 ( ) ; gen_helper_get_cp15 ( v8 , cpu_env , @@v7@@ ) ; if ( @@v6@@ == Number ) tcg_temp_free_i32 ( v8 ) ; else store_reg ( ( __int64 ) @@a2@@ , @@v6@@ , v8 ) ; } else { v9 = load_reg ( @@a2@@ , @@v6@@ ) ; gen_helper_set_cp15 ( cpu_env , @@v7@@ , v9 ) ; tcg_temp_free_i32 ( v9 ) ; if ( ! arm_feature ( @@a1@@ , Number ) || ( @@a3@@ & Number ) != Number ) gen_lookup_tb ( @@a2@@ ) ; } tcg_temp_free_i32 ( @@v7@@ ) ; return Number L ; }", "source": [{"n": "a3", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r16"}, {"n": "a1", "t": {"T": 1, "n": "__int64", "s": 8}, "location": "r56"}, {"n": "a2", "t": {"T": 3, "t": "_DWORD"}, "location": "r64"}, {"n": "v4", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "r8"}, {"n": "v7", "t": {"T": 1, "n": "unsigned int", "s": 4}, "location": "s16"}, {"n": "v6", "t": {"T": 1, "n": "int", "s": 4}, "location": "s20"}]}