Last active
October 1, 2022 00:06
-
-
Save Lusamine/2aa650e02b52b3b203bec23097412b5b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unsigned __int8 __fastcall select_judgment_type( | |
__int64 a1, | |
unsigned __int8 attacker_index, | |
unsigned __int8 defender_index) | |
{ | |
Pml_PokePara_CoreParam_o *arceus; // x20 | |
Pml_PokePara_CoreParam_o *opponent; // x23 | |
unsigned __int8 opp_type_1; // w22 | |
unsigned __int8 opp_type_2; // w21 | |
unsigned __int16 v9; // w0 | |
__int64 v10; // x8 | |
unsigned __int16 op_def_types; // w23 | |
__int32 highest_effectiveness; // w25 | |
int atk_type; // w24 | |
__int32 effectiveness_total; // w0 | |
__int64 v15; // x8 | |
__int64 v16; // x9 | |
const char **copy_table_start; // x23 | |
__int64 copy_table_end; // x24 | |
int best_def_effectiveness; // w25 | |
int effectiveness_vs_type1; // w0 | |
const char **v22; // x24 | |
const char **v23; // x22 | |
unsigned __int64 StatusReg; // x25 | |
const char **copy_table_start1; // x22 | |
__int64 copy_table_end1; // x23 | |
int best_def_effectiveness1; // w24 | |
int effectiveness_vs_type2; // w0 | |
const char **v30; // x23 | |
const char **v31; // x21 | |
unsigned __int64 v32; // x24 | |
unsigned __int8 arceus_type; // w0 | |
const char **v34; // x20 | |
unsigned __int8 final_type; // w19 | |
__int64 v36; // x0 | |
int index; // w0 | |
const char **v38; // x22 | |
const char **v39; // x21 | |
unsigned __int64 v40; // x23 | |
const char **copy_table; // [xsp+0h] [xbp-B0h] BYREF | |
const char **v43; // [xsp+8h] [xbp-A8h] | |
__int64 v44; // [xsp+10h] [xbp-A0h] | |
const char **v45; // [xsp+18h] [xbp-98h] | |
const char **best_types_table_start; // [xsp+38h] [xbp-78h] BYREF | |
const char **best_types_table_end; // [xsp+40h] [xbp-70h] | |
__int64 v48; // [xsp+48h] [xbp-68h] | |
const char **v49; // [xsp+50h] [xbp-60h] | |
__int64 v50; // [xsp+58h] [xbp-58h] | |
__int64 v51; // [xsp+60h] [xbp-50h] | |
int v52; // [xsp+68h] [xbp-48h] | |
unsigned __int8 candidate_types[4]; // [xsp+7Ch] [xbp-34h] BYREF | |
arceus = sub_7100833EEC(*(*(a1 + 104) + 208LL), attacker_index); | |
opponent = sub_7100833EEC(*(*(a1 + 104) + 208LL), defender_index); | |
opp_type_1 = Pml_PokePara_CoreParam__GetType1(opponent); | |
opp_type_2 = Pml_PokePara_CoreParam__GetType2(opponent); | |
v9 = sub_7100831F40(opponent); | |
v10 = *(a1 + 8); | |
op_def_types = v9; | |
highest_effectiveness = 0; | |
atk_type = 0; | |
v52 = 0; | |
best_types_table_start = 0LL; | |
best_types_table_end = 0LL; | |
v48 = 0LL; | |
v49 = v10; | |
v50 = -1LL; | |
v51 = 0LL; | |
do | |
{ | |
effectiveness_total = get_effectiveness_total(atk_type, op_def_types); | |
if ( highest_effectiveness < effectiveness_total || best_types_table_start == best_types_table_end ) | |
{ | |
best_types_table_end = best_types_table_start; | |
highest_effectiveness = effectiveness_total; | |
LABEL_3: | |
LOBYTE(copy_table) = atk_type; | |
add_entry_to_type_table(&best_types_table_start, ©_table); | |
goto LABEL_4; | |
} | |
if ( highest_effectiveness == effectiveness_total ) | |
goto LABEL_3; | |
LABEL_4: | |
++atk_type; | |
} | |
while ( atk_type != 18 ); | |
v16 = best_types_table_start; | |
v15 = best_types_table_end; | |
if ( (best_types_table_end - best_types_table_start) <= 1 ) | |
goto LABEL_48; | |
copy_type_table(©_table, &best_types_table_start); | |
copy_table_start = copy_table; // Working copy of best types table. | |
copy_table_end = v43; | |
best_types_table_end = best_types_table_start; | |
if ( copy_table != v43 ) // Copy table has entries. | |
{ | |
best_def_effectiveness = 0; | |
while ( 1 ) | |
{ | |
candidate_types[0] = *copy_table_start; | |
effectiveness_vs_type1 = get_effectiveness_single(opp_type_1, candidate_types[0]); | |
if ( effectiveness_vs_type1 < best_def_effectiveness || best_types_table_start == best_types_table_end ) | |
{ | |
best_types_table_end = best_types_table_start; | |
best_def_effectiveness = effectiveness_vs_type1; | |
} | |
else if ( best_def_effectiveness != effectiveness_vs_type1 ) | |
{ | |
goto LABEL_14; | |
} | |
remove_from_best_types(&best_types_table_start, candidate_types); | |
LABEL_14: | |
copy_table_start = (copy_table_start + 1); | |
if ( copy_table_end == copy_table_start ) | |
{ | |
copy_table_start = copy_table; | |
break; | |
} | |
} | |
} | |
if ( copy_table_start ) | |
{ | |
v22 = v45; | |
v43 = copy_table_start; | |
v23 = (v44 - copy_table_start); | |
if ( ((*(*v45 + 24))(v45) & 1) == 0 ) | |
goto LABEL_27; | |
StatusReg = _ReadStatusReg(ARM64_SYSREG(3, 3, 13, 0, 2)); | |
if ( !*(StatusReg + 3724424) ) | |
{ | |
*(StatusReg + 3724424) = 1; | |
*(StatusReg + 3724408) = 0LL; | |
*(StatusReg + 3724416) = 0LL; | |
_cxa_thread_atexit_0(nullsub_5029, (StatusReg + 524408), &off_710401A000); | |
} | |
if ( *(StatusReg + 3724416) >= 1 ) | |
sub_7102ACC824(v22, copy_table_start, v23, 1); | |
else | |
LABEL_27: | |
(*(*v22 + 3))(v22, copy_table_start, v23, 1LL); | |
} | |
v16 = best_types_table_start; | |
v15 = best_types_table_end; | |
if ( (best_types_table_end - best_types_table_start) < 2 )// 0-1 types left | |
goto LABEL_48; | |
copy_type_table(©_table, &best_types_table_start); | |
copy_table_start1 = copy_table; | |
copy_table_end1 = v43; | |
best_types_table_end = best_types_table_start; | |
if ( copy_table == v43 ) | |
goto LABEL_41; | |
best_def_effectiveness1 = 0; | |
while ( 2 ) | |
{ | |
candidate_types[0] = *copy_table_start1; | |
effectiveness_vs_type2 = get_effectiveness_single(opp_type_2, candidate_types[0]); | |
if ( effectiveness_vs_type2 < best_def_effectiveness1 || best_types_table_start == best_types_table_end ) | |
{ | |
best_types_table_end = best_types_table_start; | |
best_def_effectiveness1 = effectiveness_vs_type2; | |
LABEL_32: | |
remove_from_best_types(&best_types_table_start, candidate_types); | |
goto LABEL_33; | |
} | |
if ( best_def_effectiveness1 == effectiveness_vs_type2 ) | |
goto LABEL_32; | |
LABEL_33: | |
copy_table_start1 = (copy_table_start1 + 1); | |
if ( copy_table_end1 != copy_table_start1 ) | |
continue; | |
break; | |
} | |
copy_table_start1 = copy_table; | |
LABEL_41: | |
if ( copy_table_start1 ) | |
{ | |
v30 = v45; | |
v43 = copy_table_start1; | |
v31 = (v44 - copy_table_start1); | |
if ( ((*(*v45 + 24))(v45) & 1) == 0 ) | |
goto LABEL_46; | |
v32 = _ReadStatusReg(ARM64_SYSREG(3, 3, 13, 0, 2)); | |
if ( !*(v32 + 3724424) ) | |
{ | |
*(v32 + 3724424) = 1; | |
*(v32 + 3724408) = 0LL; | |
*(v32 + 3724416) = 0LL; | |
_cxa_thread_atexit_0(nullsub_5029, (v32 + 524408), &off_710401A000); | |
} | |
if ( *(v32 + 3724416) >= 1 ) | |
sub_7102ACC824(v30, copy_table_start1, v31, 1); | |
else | |
LABEL_46: | |
(*(*v30 + 3))(v30, copy_table_start1, v31, 1LL); | |
} | |
v16 = best_types_table_start; | |
v15 = best_types_table_end; | |
LABEL_48: | |
if ( v15 == v16 ) // No best types. | |
{ | |
arceus_type = Pml_PokePara_CoreParam__GetType1(arceus); | |
v34 = best_types_table_start; | |
final_type = arceus_type; | |
if ( !best_types_table_start ) | |
return final_type; | |
LABEL_52: | |
v38 = v49; | |
best_types_table_end = v34; | |
v39 = (v48 - v34); | |
if ( ((*(*v49 + 24))(v49) & 1) == 0 ) | |
goto LABEL_56; | |
v40 = _ReadStatusReg(ARM64_SYSREG(3, 3, 13, 0, 2)); | |
if ( !*(v40 + 3724424) ) | |
{ | |
*(v40 + 3724424) = 1; | |
*(v40 + 3724408) = 0LL; | |
*(v40 + 3724416) = 0LL; | |
_cxa_thread_atexit_0(nullsub_5029, (v40 + 524408), &off_710401A000); | |
} | |
if ( *(v40 + 3724416) >= 1 ) | |
sub_7102ACC824(v38, v34, v39, 1); | |
else | |
LABEL_56: | |
(*(*v38 + 3))(v38, v34, v39, 1LL); | |
} | |
else | |
{ | |
v36 = sub_7100823BF0(*(a1 + 104)); | |
index = select_from_table(v36, best_types_table_end - best_types_table_start);// Xoroshiro to decide which one if multiple are equally effective | |
v34 = best_types_table_start; | |
final_type = *(best_types_table_start + index); | |
if ( best_types_table_start ) | |
goto LABEL_52; | |
} | |
return final_type; | |
} | |
------ | |
.text:000000710081C398 | |
.text:000000710081C398 ; =============== S U B R O U T I N E ======================================= | |
.text:000000710081C398 | |
.text:000000710081C398 ; Attributes: bp-based frame | |
.text:000000710081C398 | |
.text:000000710081C398 ; unsigned __int8 __fastcall select_judgment_type(__int64 a1, unsigned __int8 attacker_index, unsigned __int8 defender_index) | |
.text:000000710081C398 select_judgment_type ; CODE XREF: sub_710081C360+18↑p | |
.text:000000710081C398 | |
.text:000000710081C398 copy_table = -0xB0 | |
.text:000000710081C398 var_A8 = -0xA8 | |
.text:000000710081C398 var_A0 = -0xA0 | |
.text:000000710081C398 anonymous_0 = -0x98 | |
.text:000000710081C398 best_types_table_start= -0x78 | |
.text:000000710081C398 best_types_table_end= -0x70 | |
.text:000000710081C398 var_68 = -0x68 | |
.text:000000710081C398 anonymous_1 = -0x60 | |
.text:000000710081C398 var_58 = -0x58 | |
.text:000000710081C398 anonymous_2 = -0x50 | |
.text:000000710081C398 var_48 = -0x48 | |
.text:000000710081C398 var_40 = -0x40 | |
.text:000000710081C398 candidate_types = -0x34 | |
.text:000000710081C398 var_30 = -0x30 | |
.text:000000710081C398 var_20 = -0x20 | |
.text:000000710081C398 var_10 = -0x10 | |
.text:000000710081C398 var_s0 = 0 | |
.text:000000710081C398 | |
.text:000000710081C398 SUB SP, SP, #0xC0 | |
.text:000000710081C39C STR X25, [SP,#0xB0+var_40] | |
.text:000000710081C3A0 STP X24, X23, [SP,#0xB0+var_30] | |
.text:000000710081C3A4 STP X22, X21, [SP,#0xB0+var_20] | |
.text:000000710081C3A8 STP X20, X19, [SP,#0xB0+var_10] | |
.text:000000710081C3AC STP X29, X30, [SP,#0xB0+var_s0] | |
.text:000000710081C3B0 ADD X29, SP, #0xB0 | |
.text:000000710081C3B4 LDR X8, [X0,#0x68] | |
.text:000000710081C3B8 MOV X19, X0 | |
.text:000000710081C3BC MOV W21, W2 | |
.text:000000710081C3C0 LDR X0, [X8,#0xD0] | |
.text:000000710081C3C4 BL sub_7100833EEC | |
.text:000000710081C3C8 LDR X8, [X19,#0x68] | |
.text:000000710081C3CC MOV X20, X0 | |
.text:000000710081C3D0 MOV W1, W21 | |
.text:000000710081C3D4 LDR X0, [X8,#0xD0] | |
.text:000000710081C3D8 BL sub_7100833EEC | |
.text:000000710081C3DC MOV X23, X0 | |
.text:000000710081C3E0 BL Pml.PokePara.CoreParam$$GetType1 | |
.text:000000710081C3E4 MOV W22, W0 | |
.text:000000710081C3E8 MOV X0, X23 ; a1 | |
.text:000000710081C3EC BL Pml.PokePara.CoreParam$$GetType2 | |
.text:000000710081C3F0 MOV W21, W0 | |
.text:000000710081C3F4 MOV X0, X23 | |
.text:000000710081C3F8 BL sub_7100831F40 | |
.text:000000710081C3FC LDR X8, [X19,#8] | |
.text:000000710081C400 MOV W23, W0 | |
.text:000000710081C404 MOV W25, WZR | |
.text:000000710081C408 MOV W24, WZR | |
.text:000000710081C40C MOV X9, #0xFFFFFFFFFFFFFFFF | |
.text:000000710081C410 STR WZR, [SP,#0xB0+var_48] | |
.text:000000710081C414 STP XZR, XZR, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C418 STP XZR, X8, [SP,#0xB0+var_68] | |
.text:000000710081C41C STP X9, XZR, [SP,#0xB0+var_58] | |
.text:000000710081C420 B loc_710081C448 | |
.text:000000710081C424 ; --------------------------------------------------------------------------- | |
.text:000000710081C424 | |
.text:000000710081C424 loc_710081C424 ; CODE XREF: select_judgment_type+C4↓j | |
.text:000000710081C424 ; select_judgment_type+D0↓j | |
.text:000000710081C424 STR X8, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C428 MOV X1, SP | |
.text:000000710081C42C MOV W25, W0 | |
.text:000000710081C430 | |
.text:000000710081C430 loc_710081C430 ; CODE XREF: select_judgment_type+E0↓j | |
.text:000000710081C430 STRB W24, [SP,#0xB0+copy_table] | |
.text:000000710081C434 ADD X0, SP, #0xB0+best_types_table_start | |
.text:000000710081C438 BL add_entry_to_type_table | |
.text:000000710081C43C | |
.text:000000710081C43C loc_710081C43C ; CODE XREF: select_judgment_type+D8↓j | |
.text:000000710081C43C ADD W24, W24, #1 | |
.text:000000710081C440 CMP W24, #0x12 | |
.text:000000710081C444 B.EQ loc_710081C47C | |
.text:000000710081C448 | |
.text:000000710081C448 loc_710081C448 ; CODE XREF: select_judgment_type+88↑j | |
.text:000000710081C448 MOV W0, W24 ; atk_type | |
.text:000000710081C44C MOV W1, W23 ; def_type | |
.text:000000710081C450 BL get_effectiveness_total | |
.text:000000710081C454 LDR X8, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C458 CMP W25, W0 | |
.text:000000710081C45C B.LT loc_710081C424 | |
.text:000000710081C460 LDR X9, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C464 CMP X8, X9 | |
.text:000000710081C468 B.EQ loc_710081C424 | |
.text:000000710081C46C CMP W25, W0 | |
.text:000000710081C470 B.NE loc_710081C43C | |
.text:000000710081C474 MOV X1, SP | |
.text:000000710081C478 B loc_710081C430 | |
.text:000000710081C47C ; --------------------------------------------------------------------------- | |
.text:000000710081C47C | |
.text:000000710081C47C loc_710081C47C ; CODE XREF: select_judgment_type+AC↑j | |
.text:000000710081C47C LDP X9, X8, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C480 SUB X10, X8, X9 | |
.text:000000710081C484 CMP X10, #1 | |
.text:000000710081C488 B.LS loc_710081C698 | |
.text:000000710081C48C MOV X0, SP | |
.text:000000710081C490 ADD X1, SP, #0xB0+best_types_table_start | |
.text:000000710081C494 BL copy_type_table | |
.text:000000710081C498 LDP X23, X24, [SP,#0xB0+copy_table] | |
.text:000000710081C49C CMP X23, X24 | |
.text:000000710081C4A0 LDR X8, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C4A4 STR X8, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C4A8 B.EQ loc_710081C504 | |
.text:000000710081C4AC MOV W25, WZR | |
.text:000000710081C4B0 B loc_710081C4D4 | |
.text:000000710081C4B4 ; --------------------------------------------------------------------------- | |
.text:000000710081C4B4 | |
.text:000000710081C4B4 loc_710081C4B4 ; CODE XREF: select_judgment_type+158↓j | |
.text:000000710081C4B4 STR X8, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C4B8 MOV W25, W0 | |
.text:000000710081C4BC | |
.text:000000710081C4BC loc_710081C4BC ; CODE XREF: select_judgment_type+160↓j | |
.text:000000710081C4BC ADD X0, SP, #0xB0+best_types_table_start | |
.text:000000710081C4C0 SUB X1, X29, #-candidate_types | |
.text:000000710081C4C4 BL remove_from_best_types | |
.text:000000710081C4C8 | |
.text:000000710081C4C8 loc_710081C4C8 ; CODE XREF: select_judgment_type+164↓j | |
.text:000000710081C4C8 ADD X23, X23, #1 | |
.text:000000710081C4CC CMP X24, X23 | |
.text:000000710081C4D0 B.EQ loc_710081C500 | |
.text:000000710081C4D4 | |
.text:000000710081C4D4 loc_710081C4D4 ; CODE XREF: select_judgment_type+118↑j | |
.text:000000710081C4D4 LDRB W1, [X23] ; unsigned __int8 | |
.text:000000710081C4D8 MOV W0, W22 ; unsigned __int8 | |
.text:000000710081C4DC STURB W1, [X29,#candidate_types] | |
.text:000000710081C4E0 BL get_effectiveness_single | |
.text:000000710081C4E4 LDP X8, X9, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C4E8 CMP W0, W25 | |
.text:000000710081C4EC CCMP X8, X9, #4, GE | |
.text:000000710081C4F0 B.EQ loc_710081C4B4 | |
.text:000000710081C4F4 CMP W25, W0 | |
.text:000000710081C4F8 B.EQ loc_710081C4BC | |
.text:000000710081C4FC B loc_710081C4C8 | |
.text:000000710081C500 ; --------------------------------------------------------------------------- | |
.text:000000710081C500 | |
.text:000000710081C500 loc_710081C500 ; CODE XREF: select_judgment_type+138↑j | |
.text:000000710081C500 LDR X23, [SP,#0xB0+copy_table] | |
.text:000000710081C504 | |
.text:000000710081C504 loc_710081C504 ; CODE XREF: select_judgment_type+110↑j | |
.text:000000710081C504 CBZ X23, loc_710081C588 | |
.text:000000710081C508 LDP X8, X24, [SP,#0xB0+var_A0] | |
.text:000000710081C50C STR X23, [SP,#0xB0+var_A8] | |
.text:000000710081C510 SUB X22, X8, X23 | |
.text:000000710081C514 LDR X8, [X24] | |
.text:000000710081C518 LDR X8, [X8,#0xC0] | |
.text:000000710081C51C MOV X0, X24 | |
.text:000000710081C520 BLR X8 | |
.text:000000710081C524 TBZ W0, #0, loc_710081C56C | |
.text:000000710081C528 MOV X0, #0x38D488 | |
.text:000000710081C530 NOP | |
.text:000000710081C534 NOP | |
.text:000000710081C538 MRS X25, #3, c13, c0, #2 | |
.text:000000710081C53C LDRB W8, [X25,X0] | |
.text:000000710081C540 CBZ W8, loc_710081C818 | |
.text:000000710081C544 | |
.text:000000710081C544 loc_710081C544 ; CODE XREF: select_judgment_type+4D0↓j | |
.text:000000710081C544 MOV X0, #0x80078 | |
.text:000000710081C54C NOP | |
.text:000000710081C550 NOP | |
.text:000000710081C554 ADD X8, X25, X0 | |
.text:000000710081C558 MOV W9, #0x30D408 | |
.text:000000710081C560 LDR W8, [X8,X9] | |
.text:000000710081C564 CMP W8, #1 | |
.text:000000710081C568 B.GE loc_710081C794 | |
.text:000000710081C56C | |
.text:000000710081C56C loc_710081C56C ; CODE XREF: select_judgment_type+18C↑j | |
.text:000000710081C56C LDR X8, [X24] | |
.text:000000710081C570 MOV X0, X24 | |
.text:000000710081C574 MOV X1, X23 | |
.text:000000710081C578 MOV X2, X22 | |
.text:000000710081C57C LDR X8, [X8,#0x18] | |
.text:000000710081C580 MOV W3, #1 | |
.text:000000710081C584 BLR X8 | |
.text:000000710081C588 | |
.text:000000710081C588 loc_710081C588 ; CODE XREF: select_judgment_type:loc_710081C504↑j | |
.text:000000710081C588 ; select_judgment_type+410↓j | |
.text:000000710081C588 LDP X9, X8, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C58C SUB X10, X8, X9 | |
.text:000000710081C590 CMP X10, #2 | |
.text:000000710081C594 B.CC loc_710081C698 | |
.text:000000710081C598 MOV X0, SP | |
.text:000000710081C59C ADD X1, SP, #0xB0+best_types_table_start | |
.text:000000710081C5A0 BL copy_type_table | |
.text:000000710081C5A4 LDP X22, X23, [SP,#0xB0+copy_table] | |
.text:000000710081C5A8 CMP X22, X23 | |
.text:000000710081C5AC LDR X8, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C5B0 STR X8, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C5B4 B.EQ loc_710081C610 | |
.text:000000710081C5B8 MOV W24, WZR | |
.text:000000710081C5BC B loc_710081C5E0 | |
.text:000000710081C5C0 ; --------------------------------------------------------------------------- | |
.text:000000710081C5C0 | |
.text:000000710081C5C0 loc_710081C5C0 ; CODE XREF: select_judgment_type+264↓j | |
.text:000000710081C5C0 STR X8, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C5C4 MOV W24, W0 | |
.text:000000710081C5C8 | |
.text:000000710081C5C8 loc_710081C5C8 ; CODE XREF: select_judgment_type+26C↓j | |
.text:000000710081C5C8 ADD X0, SP, #0xB0+best_types_table_start | |
.text:000000710081C5CC SUB X1, X29, #-candidate_types | |
.text:000000710081C5D0 BL remove_from_best_types | |
.text:000000710081C5D4 | |
.text:000000710081C5D4 loc_710081C5D4 ; CODE XREF: select_judgment_type+270↓j | |
.text:000000710081C5D4 ADD X22, X22, #1 | |
.text:000000710081C5D8 CMP X23, X22 | |
.text:000000710081C5DC B.EQ loc_710081C60C | |
.text:000000710081C5E0 | |
.text:000000710081C5E0 loc_710081C5E0 ; CODE XREF: select_judgment_type+224↑j | |
.text:000000710081C5E0 LDRB W1, [X22] ; unsigned __int8 | |
.text:000000710081C5E4 MOV W0, W21 ; unsigned __int8 | |
.text:000000710081C5E8 STURB W1, [X29,#candidate_types] | |
.text:000000710081C5EC BL get_effectiveness_single | |
.text:000000710081C5F0 LDP X8, X9, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C5F4 CMP W0, W24 | |
.text:000000710081C5F8 CCMP X8, X9, #4, GE | |
.text:000000710081C5FC B.EQ loc_710081C5C0 | |
.text:000000710081C600 CMP W24, W0 | |
.text:000000710081C604 B.EQ loc_710081C5C8 | |
.text:000000710081C608 B loc_710081C5D4 | |
.text:000000710081C60C ; --------------------------------------------------------------------------- | |
.text:000000710081C60C | |
.text:000000710081C60C loc_710081C60C ; CODE XREF: select_judgment_type+244↑j | |
.text:000000710081C60C LDR X22, [SP,#0xB0+copy_table] | |
.text:000000710081C610 | |
.text:000000710081C610 loc_710081C610 ; CODE XREF: select_judgment_type+21C↑j | |
.text:000000710081C610 CBZ X22, loc_710081C694 | |
.text:000000710081C614 LDP X8, X23, [SP,#0xB0+var_A0] | |
.text:000000710081C618 STR X22, [SP,#0xB0+var_A8] | |
.text:000000710081C61C SUB X21, X8, X22 | |
.text:000000710081C620 LDR X8, [X23] | |
.text:000000710081C624 LDR X8, [X8,#0xC0] | |
.text:000000710081C628 MOV X0, X23 | |
.text:000000710081C62C BLR X8 | |
.text:000000710081C630 TBZ W0, #0, loc_710081C678 | |
.text:000000710081C634 MOV X0, #0x38D488 | |
.text:000000710081C63C NOP | |
.text:000000710081C640 NOP | |
.text:000000710081C644 MRS X24, #3, c13, c0, #2 | |
.text:000000710081C648 LDRB W8, [X24,X0] | |
.text:000000710081C64C CBZ W8, loc_710081C86C | |
.text:000000710081C650 | |
.text:000000710081C650 loc_710081C650 ; CODE XREF: select_judgment_type+524↓j | |
.text:000000710081C650 MOV X0, #0x80078 | |
.text:000000710081C658 NOP | |
.text:000000710081C65C NOP | |
.text:000000710081C660 ADD X8, X24, X0 | |
.text:000000710081C664 MOV W9, #0x30D408 | |
.text:000000710081C66C LDR W8, [X8,X9] | |
.text:000000710081C670 CMP W8, #1 | |
.text:000000710081C674 B.GE loc_710081C7AC | |
.text:000000710081C678 | |
.text:000000710081C678 loc_710081C678 ; CODE XREF: select_judgment_type+298↑j | |
.text:000000710081C678 LDR X8, [X23] | |
.text:000000710081C67C MOV X0, X23 | |
.text:000000710081C680 MOV X1, X22 | |
.text:000000710081C684 MOV X2, X21 | |
.text:000000710081C688 LDR X8, [X8,#0x18] | |
.text:000000710081C68C MOV W3, #1 | |
.text:000000710081C690 BLR X8 | |
.text:000000710081C694 | |
.text:000000710081C694 loc_710081C694 ; CODE XREF: select_judgment_type:loc_710081C610↑j | |
.text:000000710081C694 ; select_judgment_type+428↓j | |
.text:000000710081C694 LDP X9, X8, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C698 | |
.text:000000710081C698 loc_710081C698 ; CODE XREF: select_judgment_type+F0↑j | |
.text:000000710081C698 ; select_judgment_type+1FC↑j | |
.text:000000710081C698 CMP X8, X9 | |
.text:000000710081C69C B.NE loc_710081C6B8 | |
.text:000000710081C6A0 MOV X0, X20 ; __int64 | |
.text:000000710081C6A4 BL Pml.PokePara.CoreParam$$GetType1 | |
.text:000000710081C6A8 LDR X20, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C6AC MOV W19, W0 | |
.text:000000710081C6B0 CBNZ X20, loc_710081C6DC | |
.text:000000710081C6B4 B loc_710081C75C | |
.text:000000710081C6B8 ; --------------------------------------------------------------------------- | |
.text:000000710081C6B8 | |
.text:000000710081C6B8 loc_710081C6B8 ; CODE XREF: select_judgment_type+304↑j | |
.text:000000710081C6B8 LDR X0, [X19,#0x68] | |
.text:000000710081C6BC BL sub_7100823BF0 | |
.text:000000710081C6C0 LDR W8, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C6C4 LDR W9, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C6C8 SUB W1, W8, W9 ; total_best_types | |
.text:000000710081C6CC BL select_from_table | |
.text:000000710081C6D0 LDR X20, [SP,#0xB0+best_types_table_start] | |
.text:000000710081C6D4 LDRB W19, [X20,W0,SXTW] | |
.text:000000710081C6D8 CBZ X20, loc_710081C75C | |
.text:000000710081C6DC | |
.text:000000710081C6DC loc_710081C6DC ; CODE XREF: select_judgment_type+318↑j | |
.text:000000710081C6DC LDP X8, X22, [SP,#0xB0+var_68] | |
.text:000000710081C6E0 STR X20, [SP,#0xB0+best_types_table_end] | |
.text:000000710081C6E4 SUB X21, X8, X20 | |
.text:000000710081C6E8 LDR X8, [X22] | |
.text:000000710081C6EC LDR X8, [X8,#0xC0] | |
.text:000000710081C6F0 MOV X0, X22 | |
.text:000000710081C6F4 BLR X8 | |
.text:000000710081C6F8 TBZ W0, #0, loc_710081C740 | |
.text:000000710081C6FC MOV X0, #0x38D488 | |
.text:000000710081C704 NOP | |
.text:000000710081C708 NOP | |
.text:000000710081C70C MRS X23, #3, c13, c0, #2 | |
.text:000000710081C710 LDRB W8, [X23,X0] | |
.text:000000710081C714 CBZ W8, loc_710081C7C4 | |
.text:000000710081C718 | |
.text:000000710081C718 loc_710081C718 ; CODE XREF: select_judgment_type+47C↓j | |
.text:000000710081C718 MOV X0, #0x80078 | |
.text:000000710081C720 NOP | |
.text:000000710081C724 NOP | |
.text:000000710081C728 ADD X8, X23, X0 | |
.text:000000710081C72C MOV W9, #0x30D408 | |
.text:000000710081C734 LDR W8, [X8,X9] | |
.text:000000710081C738 CMP W8, #1 | |
.text:000000710081C73C B.GE loc_710081C77C | |
.text:000000710081C740 | |
.text:000000710081C740 loc_710081C740 ; CODE XREF: select_judgment_type+360↑j | |
.text:000000710081C740 LDR X8, [X22] | |
.text:000000710081C744 MOV X0, X22 | |
.text:000000710081C748 MOV X1, X20 | |
.text:000000710081C74C MOV X2, X21 | |
.text:000000710081C750 LDR X8, [X8,#0x18] | |
.text:000000710081C754 MOV W3, #1 | |
.text:000000710081C758 BLR X8 | |
.text:000000710081C75C | |
.text:000000710081C75C loc_710081C75C ; CODE XREF: select_judgment_type+31C↑j | |
.text:000000710081C75C ; select_judgment_type+340↑j ... | |
.text:000000710081C75C MOV W0, W19 | |
.text:000000710081C760 LDP X29, X30, [SP,#0xB0+var_s0] | |
.text:000000710081C764 LDP X20, X19, [SP,#0xB0+var_10] | |
.text:000000710081C768 LDR X25, [SP,#0xB0+var_40] | |
.text:000000710081C76C LDP X22, X21, [SP,#0xB0+var_20] | |
.text:000000710081C770 LDP X24, X23, [SP,#0xB0+var_30] | |
.text:000000710081C774 ADD SP, SP, #0xC0 | |
.text:000000710081C778 RET | |
.text:000000710081C77C ; --------------------------------------------------------------------------- | |
.text:000000710081C77C | |
.text:000000710081C77C loc_710081C77C ; CODE XREF: select_judgment_type+3A4↑j | |
.text:000000710081C77C MOV X0, X22 | |
.text:000000710081C780 MOV X1, X20 | |
.text:000000710081C784 MOV X2, X21 | |
.text:000000710081C788 MOV W3, #1 | |
.text:000000710081C78C BL sub_7102ACC824 | |
.text:000000710081C790 B loc_710081C75C | |
.text:000000710081C794 ; --------------------------------------------------------------------------- | |
.text:000000710081C794 | |
.text:000000710081C794 loc_710081C794 ; CODE XREF: select_judgment_type+1D0↑j | |
.text:000000710081C794 MOV X0, X24 | |
.text:000000710081C798 MOV X1, X23 | |
.text:000000710081C79C MOV X2, X22 | |
.text:000000710081C7A0 MOV W3, #1 | |
.text:000000710081C7A4 BL sub_7102ACC824 | |
.text:000000710081C7A8 B loc_710081C588 | |
.text:000000710081C7AC ; --------------------------------------------------------------------------- | |
.text:000000710081C7AC | |
.text:000000710081C7AC loc_710081C7AC ; CODE XREF: select_judgment_type+2DC↑j | |
.text:000000710081C7AC MOV X0, X23 | |
.text:000000710081C7B0 MOV X1, X22 | |
.text:000000710081C7B4 MOV X2, X21 | |
.text:000000710081C7B8 MOV W3, #1 | |
.text:000000710081C7BC BL sub_7102ACC824 | |
.text:000000710081C7C0 B loc_710081C694 | |
.text:000000710081C7C4 ; --------------------------------------------------------------------------- | |
.text:000000710081C7C4 | |
.text:000000710081C7C4 loc_710081C7C4 ; CODE XREF: select_judgment_type+37C↑j | |
.text:000000710081C7C4 MOV X0, #0x38D488 | |
.text:000000710081C7CC NOP | |
.text:000000710081C7D0 NOP | |
.text:000000710081C7D4 MOV W8, #1 | |
.text:000000710081C7D8 STRB W8, [X23,X0] | |
.text:000000710081C7DC MOV X0, #0x80078 | |
.text:000000710081C7E4 NOP | |
.text:000000710081C7E8 NOP | |
.text:000000710081C7EC ADD X1, X23, X0 ; obj | |
.text:000000710081C7F0 MOV W8, #0x30D400 | |
.text:000000710081C7F8 ADD X8, X1, X8 | |
.text:000000710081C7FC STP XZR, XZR, [X8] | |
.text:000000710081C800 ADRL X0, nullsub_5029 ; lpfunc | |
.text:000000710081C808 ADRL X2, off_710401A000 ; lpdso_handle | |
.text:000000710081C810 BL __cxa_thread_atexit_0 | |
.text:000000710081C814 B loc_710081C718 | |
.text:000000710081C818 ; --------------------------------------------------------------------------- | |
.text:000000710081C818 | |
.text:000000710081C818 loc_710081C818 ; CODE XREF: select_judgment_type+1A8↑j | |
.text:000000710081C818 MOV X0, #0x38D488 | |
.text:000000710081C820 NOP | |
.text:000000710081C824 NOP | |
.text:000000710081C828 MOV W8, #1 | |
.text:000000710081C82C STRB W8, [X25,X0] | |
.text:000000710081C830 MOV X0, #0x80078 | |
.text:000000710081C838 NOP | |
.text:000000710081C83C NOP | |
.text:000000710081C840 ADD X1, X25, X0 ; obj | |
.text:000000710081C844 MOV W8, #0x30D400 | |
.text:000000710081C84C ADD X8, X1, X8 | |
.text:000000710081C850 STP XZR, XZR, [X8] | |
.text:000000710081C854 ADRL X0, nullsub_5029 ; lpfunc | |
.text:000000710081C85C ADRL X2, off_710401A000 ; lpdso_handle | |
.text:000000710081C864 BL __cxa_thread_atexit_0 | |
.text:000000710081C868 B loc_710081C544 | |
.text:000000710081C86C ; --------------------------------------------------------------------------- | |
.text:000000710081C86C | |
.text:000000710081C86C loc_710081C86C ; CODE XREF: select_judgment_type+2B4↑j | |
.text:000000710081C86C MOV X0, #0x38D488 | |
.text:000000710081C874 NOP | |
.text:000000710081C878 NOP | |
.text:000000710081C87C MOV W8, #1 | |
.text:000000710081C880 STRB W8, [X24,X0] | |
.text:000000710081C884 MOV X0, #0x80078 | |
.text:000000710081C88C NOP | |
.text:000000710081C890 NOP | |
.text:000000710081C894 ADD X1, X24, X0 ; obj | |
.text:000000710081C898 MOV W8, #0x30D400 | |
.text:000000710081C8A0 ADD X8, X1, X8 | |
.text:000000710081C8A4 STP XZR, XZR, [X8] | |
.text:000000710081C8A8 ADRL X0, nullsub_5029 ; lpfunc | |
.text:000000710081C8B0 ADRL X2, off_710401A000 ; lpdso_handle | |
.text:000000710081C8B8 BL __cxa_thread_atexit_0 | |
.text:000000710081C8BC B loc_710081C650 | |
.text:000000710081C8BC ; End of function select_judgment_type | |
.text:000000710081C8BC |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment