diff --git a/jadx-core/src/main/java/jadx/core/dex/visitors/regions/maker/IfRegionMaker.java b/jadx-core/src/main/java/jadx/core/dex/visitors/regions/maker/IfRegionMaker.java index 4497adbaa..63fe63986 100644 --- a/jadx-core/src/main/java/jadx/core/dex/visitors/regions/maker/IfRegionMaker.java +++ b/jadx-core/src/main/java/jadx/core/dex/visitors/regions/maker/IfRegionMaker.java @@ -400,6 +400,11 @@ final class IfRegionMaker { skipBlocks.add(first); return second; } + if (BlockUtils.isDuplicateBlockPath(first, second)) { + first.add(AFlag.REMOVE); + skipBlocks.add(first); + return second; + } BlockNode cross = BlockUtils.getPathCross(mth, first, second); if (cross != null) { BlockUtils.visitBlocksOnPath(mth, first, cross, skipBlocks::add); @@ -465,48 +470,12 @@ final class IfRegionMaker { if (successors.size() != 1) { return null; } - BlockNode next = successors.get(0); - if (next.getPredecessors().size() != 1) { + if (next.getPredecessors().size() != 1 || next.contains(AFlag.ADDED_TO_REGION)) { return null; } - if (next.contains(AFlag.ADDED_TO_REGION)) { - return null; - } - List insns = block.getInstructions(); - boolean pass = true; List forceInlineInsns = new ArrayList<>(); - if (!insns.isEmpty()) { - // check that all instructions can be inlined - for (InsnNode insn : insns) { - RegisterArg res = insn.getResult(); - if (res == null) { - pass = false; - break; - } - List useList = res.getSVar().getUseList(); - int useCount = useList.size(); - if (useCount == 0) { - // TODO? - pass = false; - break; - } - InsnArg arg = useList.get(0); - InsnNode usePlace = arg.getParentInsn(); - if (!BlockUtils.blockContains(block, usePlace) - && !BlockUtils.blockContains(next, usePlace)) { - pass = false; - break; - } - if (useCount > 1) { - forceInlineInsns.add(insn); - } else { - // allow only forced assign inline - pass = false; - } - } - } - if (!pass) { + if (!checkInsnsInline(block, next, forceInlineInsns)) { return null; } IfInfo nextInfo = makeIfInfo(info.getMth(), next); @@ -516,4 +485,40 @@ final class IfRegionMaker { nextInfo.addInsnsForForcedInline(forceInlineInsns); return nextInfo; } + + /** + * Check that all instructions can be inlined + */ + private static boolean checkInsnsInline(BlockNode block, BlockNode next, List forceInlineInsns) { + List insns = block.getInstructions(); + if (insns.isEmpty()) { + return true; + } + boolean pass = true; + for (InsnNode insn : insns) { + RegisterArg res = insn.getResult(); + if (res == null) { + return false; + } + List useList = res.getSVar().getUseList(); + int useCount = useList.size(); + if (useCount == 0) { + // TODO? + return false; + } + InsnArg arg = useList.get(0); + InsnNode usePlace = arg.getParentInsn(); + if (!BlockUtils.blockContains(block, usePlace) + && !BlockUtils.blockContains(next, usePlace)) { + return false; + } + if (useCount > 1) { + forceInlineInsns.add(insn); + } else { + // allow only forced assign inline + pass = false; + } + } + return pass; + } } diff --git a/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java b/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java index ba28ca1c0..c761967a1 100644 --- a/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java +++ b/jadx-core/src/main/java/jadx/core/utils/BlockUtils.java @@ -10,6 +10,7 @@ import java.util.Deque; import java.util.HashSet; import java.util.LinkedHashSet; import java.util.List; +import java.util.Objects; import java.util.Queue; import java.util.Set; import java.util.function.Consumer; @@ -1208,7 +1209,7 @@ public class BlockUtils { if (b1 == null || b2 == null) { return false; } - return isEqualReturnBlocks(b1, b2) || isEmptySyntheticPath(b1, b2); + return isEqualReturnBlocks(b1, b2) || isEmptySyntheticPath(b1, b2) || isDuplicateBlockPath(b1, b2); } private static boolean isEmptySyntheticPath(BlockNode b1, BlockNode b2) { @@ -1244,4 +1245,45 @@ public class BlockUtils { } return firstArg.equals(secondArg); } + + public static boolean isDuplicateBlockPath(BlockNode first, BlockNode second) { + if (first.getSuccessors().size() == 1 && second.getSuccessors().size() == 1 + && first.getSuccessors().get(0).equals(second.getSuccessors().get(0))) { + return isSameInsnsBlocks(first, second); + } + return false; + } + + public static boolean isSameInsnsBlocks(BlockNode first, BlockNode second) { + List firstInsns = first.getInstructions(); + List secondInsns = second.getInstructions(); + if (firstInsns.size() != secondInsns.size()) { + return false; + } + int len = firstInsns.size(); + for (int i = 0; i < len; i++) { + InsnNode firstInsn = firstInsns.get(i); + InsnNode secondInsn = secondInsns.get(i); + if (!isInsnDeepEquals(firstInsn, secondInsn)) { + return false; + } + } + return true; + } + + private static boolean isInsnDeepEquals(InsnNode first, InsnNode second) { + if (first == second) { + return true; + } + return first.isSame(second) + && Objects.equals(first.getArguments(), second.getArguments()) + && resultIsSameReg(first.getResult(), second.getResult()); + } + + private static boolean resultIsSameReg(RegisterArg first, RegisterArg second) { + if (first == null || second == null) { + return first == second; + } + return first.getRegNum() == second.getRegNum(); + } } diff --git a/jadx-core/src/test/java/jadx/tests/external/BaseExternalTest.java b/jadx-core/src/test/java/jadx/tests/external/BaseExternalTest.java index 6294a63fd..efc1914cf 100644 --- a/jadx-core/src/test/java/jadx/tests/external/BaseExternalTest.java +++ b/jadx-core/src/test/java/jadx/tests/external/BaseExternalTest.java @@ -131,7 +131,7 @@ public abstract class BaseExternalTest extends TestUtils { for (MethodNode mth : classNode.getMethods()) { if (isMthMatch(mth, mthPattern)) { LOG.info("Print method: {}\n{}\n{}\n{}", - mth.getMethodInfo().getShortId(), + mth.getMethodInfo().getRawFullId(), dashLine, mth.getCodeStr(), dashLine); diff --git a/jadx-core/src/test/java/jadx/tests/integration/conditions/TestComplexIf3.java b/jadx-core/src/test/java/jadx/tests/integration/conditions/TestComplexIf3.java new file mode 100644 index 000000000..001bf3669 --- /dev/null +++ b/jadx-core/src/test/java/jadx/tests/integration/conditions/TestComplexIf3.java @@ -0,0 +1,19 @@ +package jadx.tests.integration.conditions; + +import org.junit.jupiter.api.Test; + +import jadx.tests.api.SmaliTest; + +import static jadx.tests.api.utils.assertj.JadxAssertions.assertThat; + +public class TestComplexIf3 extends SmaliTest { + + @Test + public void test() { + disableCompilation(); + assertThat(getClassNodeFromSmali()) + .code() + .countString(1, "iArr = null;") + .countString(2, "z = false;"); + } +} diff --git a/jadx-core/src/test/smali/conditions/TestComplexIf3.smali b/jadx-core/src/test/smali/conditions/TestComplexIf3.smali new file mode 100644 index 000000000..6f1f49346 --- /dev/null +++ b/jadx-core/src/test/smali/conditions/TestComplexIf3.smali @@ -0,0 +1,830 @@ +.class public final Lconditions/TestComplexIf3; +.super Ljava/lang/Object; + +.method public test(Landroid/os/Message;)V + .registers 10 + + .prologue + const/16 v7, 0xf + + const/4 v6, 0x4 + + const/4 v0, 0x0 + + const/4 v1, 0x1 + + const/4 v2, 0x0 + + .line 3307 + const-string/jumbo v3, "Service" + + new-instance v4, Ljava/lang/StringBuilder; + + invoke-direct {v4}, Ljava/lang/StringBuilder;->()V + + const-string/jumbo v5, "handle: " + + invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; + + move-result-object v4 + + iget v5, p1, Landroid/os/Message;->what:I + + invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; + + move-result-object v4 + + invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; + + move-result-object v4 + + invoke-static {v3, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I + + .line 3308 + iget v3, p1, Landroid/os/Message;->what:I + + sparse-switch v3, :sswitch_data_2d0 + + .line 3516 + :cond_27 + :goto_27 + return-void + + .line 3312 + :sswitch_28 + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3313 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap27(Lconditions/TestComplexIf3;Landroid/os/Bundle;)V + + goto :goto_27 + + .line 3318 + :sswitch_32 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-wrap26(Lconditions/TestComplexIf3;)V + + goto :goto_27 + + .line 3323 + :sswitch_38 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get18(Lconditions/TestComplexIf3;)Z + + move-result v0 + + if-eqz v0, :cond_45 + + .line 3324 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0, v2}, Lconditions/TestComplexIf3;->-wrap33(Lconditions/TestComplexIf3;Z)V + + .line 3326 + :cond_45 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-wrap9(Lconditions/TestComplexIf3;)Z + + .line 3327 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-wrap0(Lconditions/TestComplexIf3;)Z + + .line 3329 + new-instance v0, Landroid/os/Bundle; + + invoke-direct {v0, v1}, Landroid/os/Bundle;->(I)V + + .line 3330 + const-string/jumbo v1, "flag" + + const/16 v2, 0xb + + invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V + + .line 3331 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap28(Lconditions/TestComplexIf3;Landroid/os/Bundle;)V + + .line 3333 + invoke-static {}, Lconditions/TestComplexIf3;->-get28()Lconditions/TestComplexIf3$OnExitListener; + + move-result-object v0 + + if-eqz v0, :cond_27 + + .line 3334 + invoke-static {}, Lconditions/TestComplexIf3;->-get28()Lconditions/TestComplexIf3$OnExitListener; + + move-result-object v0 + + invoke-interface {v0}, Lconditions/TestComplexIf3$OnExitListener;->onExit()V + + goto :goto_27 + + .line 3340 + :sswitch_6f + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3341 + const-string/jumbo v3, "value" + + invoke-virtual {v0, v3}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I + + move-result v3 + + .line 3347 + if-nez v3, :cond_8e + + .line 3349 + const-string/jumbo v2, "flag" + + invoke-virtual {v0, v2, v6}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V + + .line 3351 + const-string/jumbo v2, "key" + + invoke-virtual {v0, v2, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V + + .line 3352 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap28(Lconditions/TestComplexIf3;Landroid/os/Bundle;)V + + goto :goto_27 + + .line 3357 + :cond_8e + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1}, Lconditions/TestComplexIf3;->-get22(Lconditions/TestComplexIf3;)I + + move-result v1 + + const/4 v3, 0x7 + + if-eq v1, v3, :cond_27 + + .line 3358 + const-string/jumbo v1, "flag" + + invoke-virtual {v0, v1, v6}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V + + .line 3360 + const-string/jumbo v1, "key" + + invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V + + .line 3361 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap28(Lconditions/TestComplexIf3;Landroid/os/Bundle;)V + + goto/16 :goto_27 + + .line 3368 + :sswitch_aa + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3369 + const-string/jumbo v1, "f" + + invoke-virtual {v0, v1}, Landroid/os/Bundle;->getFloat(Ljava/lang/String;)F + + move-result v0 + + .line 3370 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap12(Lconditions/TestComplexIf3;F)Z + + move-result v1 + + .line 3372 + if-nez v1, :cond_c7 + + .line 3373 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get7(Lconditions/TestComplexIf3;)I + + move-result v0 + + invoke-static {v0}, Ltest/Utils;->computeFrequency(I)F + + move-result v0 + + .line 3375 + :cond_c7 + new-instance v2, Landroid/os/Bundle; + + const/4 v3, 0x3 + + invoke-direct {v2, v3}, Landroid/os/Bundle;->(I)V + + .line 3376 + const-string/jumbo v3, "flag" + + invoke-virtual {v2, v3, v7}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V + + .line 3378 + const-string/jumbo v3, "key" + + invoke-virtual {v2, v3, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V + + .line 3379 + const-string/jumbo v1, "key" + + invoke-virtual {v2, v1, v0}, Landroid/os/Bundle;->putFloat(Ljava/lang/String;F)V + + .line 3380 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0, v2}, Lconditions/TestComplexIf3;->-wrap28(Lconditions/TestComplexIf3;Landroid/os/Bundle;)V + + goto/16 :goto_27 + + .line 3385 + :sswitch_e6 + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3386 + iget-object v3, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v3, v1}, Lconditions/TestComplexIf3;->-set5(Lconditions/TestComplexIf3;Z)Z + + .line 3387 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + const-string/jumbo v3, "f" + + invoke-virtual {v0, v3}, Landroid/os/Bundle;->getFloat(Ljava/lang/String;)F + + move-result v3 + + .line 3388 + const-string/jumbo v4, "o" + + invoke-virtual {v0, v4}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z + + move-result v0 + + .line 3387 + invoke-static {v1, v3, v0}, Lconditions/TestComplexIf3;->-wrap13(Lconditions/TestComplexIf3;FZ)F + + move-result v0 + + .line 3390 + invoke-static {v0}, Ltest/Utils;->computeStation(F)I + + move-result v1 + + .line 3391 + invoke-static {v1}, Ltest/Utils;->isValidStation(I)Z + + move-result v1 + + if-eqz v1, :cond_2cd + + .line 3392 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap12(Lconditions/TestComplexIf3;F)Z + + move-result v1 + + .line 3395 + :goto_113 + if-nez v1, :cond_11f + + .line 3396 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get7(Lconditions/TestComplexIf3;)I + + move-result v0 + + invoke-static {v0}, Ltest/Utils;->computeFrequency(I)F + + move-result v0 + + .line 3398 + :cond_11f + new-instance v3, Landroid/os/Bundle; + + const/4 v4, 0x2 + + invoke-direct {v3, v4}, Landroid/os/Bundle;->(I)V + + .line 3399 + const-string/jumbo v4, "flag" + + invoke-virtual {v3, v4, v7}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V + + .line 3401 + const-string/jumbo v4, "key_is_tune" + + invoke-virtual {v3, v4, v1}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V + + .line 3402 + const-string/jumbo v1, "key_tune_to_station" + + invoke-virtual {v3, v1, v0}, Landroid/os/Bundle;->putFloat(Ljava/lang/String;F)V + + .line 3403 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0, v3}, Lconditions/TestComplexIf3;->-wrap28(Lconditions/TestComplexIf3;Landroid/os/Bundle;)V + + .line 3404 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0, v2}, Lconditions/TestComplexIf3;->-set5(Lconditions/TestComplexIf3;Z)Z + + goto/16 :goto_27 + + .line 3414 + :sswitch_143 + iget-object v3, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v3, v1}, Lconditions/TestComplexIf3;->-set4(Lconditions/TestComplexIf3;Z)Z + + .line 3418 + iget-object v3, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + iget-object v4, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v4}, Lconditions/TestComplexIf3;->-get6(Lconditions/TestComplexIf3;)Landroid/content/Context; + + move-result-object v4 + + invoke-static {v4}, Ltest/Station;->getCurrentStation(Landroid/content/Context;)I + + move-result v4 + + invoke-static {v3, v4}, Lconditions/TestComplexIf3;->-set0(Lconditions/TestComplexIf3;I)I + + .line 3419 + iget-object v3, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v3}, Lconditions/TestComplexIf3;->-get19(Lconditions/TestComplexIf3;)I + + move-result v3 + + sget v4, Lconditions/TestComplexIf3;->POWER_UP:I + + if-eq v3, v4, :cond_185 + + .line 3420 + iget-object v3, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + iget-object v4, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v4}, Lconditions/TestComplexIf3;->-get7(Lconditions/TestComplexIf3;)I + + move-result v4 + + invoke-static {v4}, Ltest/Utils;->computeFrequency(I)F + + move-result v4 + + invoke-static {v3, v4}, Lconditions/TestComplexIf3;->-wrap10(Lconditions/TestComplexIf3;F)Z + + move-result v3 + + if-eqz v3, :cond_21f + + .line 3421 + iget-object v3, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + iget-object v4, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v4}, Lconditions/TestComplexIf3;->-get7(Lconditions/TestComplexIf3;)I + + move-result v4 + + invoke-static {v4}, Ltest/Utils;->computeFrequency(I)F + + move-result v4 + + invoke-static {v3, v4}, Lconditions/TestComplexIf3;->-wrap8(Lconditions/TestComplexIf3;F)Z + + move-result v3 + + .line 3419 + if-eqz v3, :cond_2c9 + + .line 3422 + :cond_185 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get27(Lconditions/TestComplexIf3;)Landroid/os/PowerManager$WakeLock; + + move-result-object v0 + + if-eqz v0, :cond_222 + + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get27(Lconditions/TestComplexIf3;)Landroid/os/PowerManager$WakeLock; + + move-result-object v0 + + invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->isHeld()Z + + move-result v0 + + xor-int/lit8 v0, v0, 0x1 + + if-eqz v0, :cond_2c6 + + .line 3424 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get27(Lconditions/TestComplexIf3;)Landroid/os/PowerManager$WakeLock; + + move-result-object v0 + + invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->acquire()V + + move v0, v1 + + .line 3426 + :goto_1a5 + const-string/jumbo v3, "Service" + + const-string/jumbo v4, "handle: start" + + invoke-static {v3, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 3427 + iget-object v3, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v3}, Lconditions/TestComplexIf3;->-wrap14(Lconditions/TestComplexIf3;)[I + + move-result-object v3 + + .line 3429 + :goto_1b4 + const-string/jumbo v4, "Service" + + const-string/jumbo v5, "handle: end" + + invoke-static {v4, v5}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I + + .line 3431 + if-eqz v3, :cond_224 + + aget v4, v3, v2 + + const/16 v5, -0x64 + + if-ne v4, v5, :cond_224 + + .line 3434 + const/4 v3, -0x1 + + .line 3433 + filled-new-array {v3, v2}, [I + + move-result-object v3 + + move-object v4, v3 + + move v3, v2 + + .line 3448 + :goto_1cc + iget-object v5, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v5}, Lconditions/TestComplexIf3;->-get9(Lconditions/TestComplexIf3;)Z + + move-result v5 + + if-eqz v5, :cond_1d9 + + .line 3449 + iget-object v5, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-virtual {v5, v2}, Lconditions/TestComplexIf3;->setMute(Z)I + + .line 3452 + :cond_1d9 + if-eqz v0, :cond_1f8 + + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get27(Lconditions/TestComplexIf3;)Landroid/os/PowerManager$WakeLock; + + move-result-object v0 + + if-eqz v0, :cond_1f8 + + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get27(Lconditions/TestComplexIf3;)Landroid/os/PowerManager$WakeLock; + + move-result-object v0 + + invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->isHeld()Z + + move-result v0 + + if-eqz v0, :cond_1f8 + + .line 3453 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-get27(Lconditions/TestComplexIf3;)Landroid/os/PowerManager$WakeLock; + + move-result-object v0 + + invoke-virtual {v0}, Landroid/os/PowerManager$WakeLock;->release()V + + .line 3456 + :cond_1f8 + new-instance v0, Landroid/os/Bundle; + + invoke-direct {v0, v6}, Landroid/os/Bundle;->(I)V + + .line 3457 + const-string/jumbo v5, "callback_flag" + + .line 3458 + const/16 v6, 0xd + + .line 3457 + invoke-virtual {v0, v5, v6}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V + + .line 3460 + const-string/jumbo v5, "key_station_num" + + aget v1, v4, v1 + + invoke-virtual {v0, v5, v1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V + + .line 3461 + const-string/jumbo v1, "key_is_scan" + + invoke-virtual {v0, v1, v3}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V + + .line 3463 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v2}, Lconditions/TestComplexIf3;->-set4(Lconditions/TestComplexIf3;Z)Z + + .line 3465 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap29(Lconditions/TestComplexIf3;Landroid/os/Bundle;)V + + goto/16 :goto_27 + + :cond_21f + move-object v3, v0 + + move v0, v2 + + .line 3421 + goto :goto_1b4 + + :cond_222 + move v0, v2 + + .line 3422 + goto :goto_1a5 + + .line 3437 + :cond_224 + iget-object v4, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v4, v3}, Lconditions/TestComplexIf3;->-wrap15(Lconditions/TestComplexIf3;[I)[I + + move-result-object v3 + + .line 3438 + aget v4, v3, v2 + + .line 3439 + iget-object v4, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + iget-object v5, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v5}, Lconditions/TestComplexIf3;->-get7(Lconditions/TestComplexIf3;)I + + move-result v5 + + invoke-static {v5}, Ltest/Utils;->computeFrequency(I)F + + move-result v5 + + invoke-static {v4, v5}, Lconditions/TestComplexIf3;->-wrap12(Lconditions/TestComplexIf3;F)Z + + move-result v4 + + if-eqz v4, :cond_2c2 + + .line 3440 + iget-object v4, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + iget-object v5, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v5}, Lconditions/TestComplexIf3;->-get7(Lconditions/TestComplexIf3;)I + + move-result v5 + + invoke-virtual {v4, v5}, Lconditions/TestComplexIf3;->initService(I)V + + move-object v4, v3 + + move v3, v1 + + goto :goto_1cc + + .line 3470 + :sswitch_24c + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3471 + const-string/jumbo v1, "key_audiofocus_changed" + + invoke-virtual {v0, v1}, Landroid/os/Bundle;->getInt(Ljava/lang/String;)I + + move-result v0 + + .line 3472 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap43(Lconditions/TestComplexIf3;I)V + + goto/16 :goto_27 + + .line 3476 + :sswitch_25e + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3477 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + const-string/jumbo v2, "option" + + invoke-virtual {v0, v2}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z + + move-result v0 + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap19(Lconditions/TestComplexIf3;Z)I + + goto/16 :goto_27 + + .line 3481 + :sswitch_270 + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3482 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + const-string/jumbo v2, "option" + + invoke-virtual {v0, v2}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z + + move-result v0 + + invoke-virtual {v1, v0}, Lconditions/TestComplexIf3;->setMute(Z)I + + goto/16 :goto_27 + + .line 3486 + :sswitch_282 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-wrap16(Lconditions/TestComplexIf3;)I + + goto/16 :goto_27 + + .line 3491 + :sswitch_289 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-wrap38(Lconditions/TestComplexIf3;)V + + goto/16 :goto_27 + + .line 3495 + :sswitch_290 + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-wrap11(Lconditions/TestComplexIf3;)Z + + goto/16 :goto_27 + + .line 3499 + :sswitch_297 + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3500 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + const-string/jumbo v2, "option" + + invoke-virtual {v0, v2}, Landroid/os/Bundle;->getBoolean(Ljava/lang/String;)Z + + move-result v0 + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap36(Lconditions/TestComplexIf3;Z)V + + goto/16 :goto_27 + + .line 3504 + :sswitch_2a9 + invoke-virtual {p1}, Landroid/os/Message;->getData()Landroid/os/Bundle; + + move-result-object v0 + + .line 3505 + iget-object v1, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + const-string/jumbo v2, "name" + + invoke-virtual {v0, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String; + + move-result-object v0 + + invoke-static {v1, v0}, Lconditions/TestComplexIf3;->-wrap32(Lconditions/TestComplexIf3;Ljava/lang/String;)V + + goto/16 :goto_27 + + .line 3510 + :sswitch_2bb + iget-object v0, p0, Lconditions/TestComplexIf3$Handler;->this$0:Lconditions/TestComplexIf3; + + invoke-static {v0}, Lconditions/TestComplexIf3;->-wrap37(Lconditions/TestComplexIf3;)V + + goto/16 :goto_27 + + :cond_2c2 + move-object v4, v3 + + move v3, v1 + + goto/16 :goto_1cc + + :cond_2c6 + move v0, v2 + + goto/16 :goto_1a5 + + :cond_2c9 + move-object v3, v0 + + move v0, v2 + + goto/16 :goto_1b4 + + :cond_2cd + move v1, v2 + + goto/16 :goto_113 + + .line 3308 + :sswitch_data_2d0 + .sparse-switch + 0x4 -> :sswitch_6f + 0x5 -> :sswitch_25e + 0x7 -> :sswitch_270 + 0x9 -> :sswitch_28 + 0xa -> :sswitch_32 + 0xb -> :sswitch_38 + 0xd -> :sswitch_143 + 0xf -> :sswitch_aa + 0x10 -> :sswitch_e6 + 0x12 -> :sswitch_282 + 0x15 -> :sswitch_297 + 0x16 -> :sswitch_289 + 0x17 -> :sswitch_290 + 0x1a -> :sswitch_2a9 + 0x1e -> :sswitch_24c + 0x66 -> :sswitch_2bb + .end sparse-switch +.end method