FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
  FUN name:test1 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
    BLOCK_BODY
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
          then: BLOCK type=kotlin.Unit origin=null
            CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:runStatic visibility:public modality:OPEN <> (r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
              r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
  FUN name:test2 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
    BLOCK_BODY
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
          then: BLOCK type=kotlin.Unit origin=null
            CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run1 visibility:public modality:OPEN <> ($this:<root>.J, r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
              $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
              r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
  FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
    BLOCK_BODY
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
          then: BLOCK type=kotlin.Unit origin=null
            CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run2 visibility:public modality:OPEN <> ($this:<root>.J, r1:java.lang.Runnable?, r2:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
              $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
              r1: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
              r2: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
  FUN name:test4 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>, b:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
    VALUE_PARAMETER name:b index:1 type:kotlin.Function0<kotlin.Unit> flags:[]
    BLOCK_BODY
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
          then: BLOCK type=kotlin.Unit origin=null
            CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run2 visibility:public modality:OPEN <> ($this:<root>.J, r1:java.lang.Runnable?, r2:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
              $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
              r1: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
              r2: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:b index:1 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
  FUN name:test5 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]
    BLOCK_BODY
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
          then: BLOCK type=kotlin.Unit origin=null
            CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run1 visibility:public modality:OPEN <> ($this:<root>.J, r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
              $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
              r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
  FUN name:test5x visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]
    BLOCK_BODY
      WHEN type=kotlin.Unit origin=IF
        BRANCH
          if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=java.lang.Runnable
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
          then: BLOCK type=kotlin.Unit origin=null
            TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
              typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
              TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Function0 modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Function<kotlin.Function0.R>]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
            CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run1 visibility:public modality:OPEN <> ($this:<root>.J, r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
              $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
              r: TYPE_OP type=java.lang.Runnable origin=IMPLICIT_CAST typeOperand=java.lang.Runnable
                typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
                GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
  FUN name:test6 visibility:public modality:FINAL <> (a:kotlin.Any) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]
    BLOCK_BODY
      TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
        typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
        TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
          typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Function0 modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Function<kotlin.Function0.R>]
          GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
      CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run1 visibility:public modality:OPEN <> ($this:<root>.J, r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
        $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
        r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
          typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
          TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Function0 modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Function<kotlin.Function0.R>]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Any flags:[]' type=kotlin.Any origin=null
  FUN name:test7 visibility:public modality:FINAL <> (a:kotlin.Function1<kotlin.Int, kotlin.Int>) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Function1<kotlin.Int, kotlin.Int> flags:[]
    BLOCK_BODY
      TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
        typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags:[] superTypes:[kotlin.Any]
        TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
          typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Function0 modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Function<kotlin.Function0.R>]
          GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function1<kotlin.Int, kotlin.Int> flags:[]' type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=null
      CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run1 visibility:public modality:OPEN <> ($this:<root>.J, r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
        $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
        r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
          typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
          TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
            typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Function0 modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Function<kotlin.Function0.R>]
            GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function1<kotlin.Int, kotlin.Int> flags:[]' type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=null
  FUN name:test8 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit flags:[]
    VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]
    BLOCK_BODY
      CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run1 visibility:public modality:OPEN <> ($this:<root>.J, r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
        $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
        r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
          typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
          CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:id visibility:public modality:OPEN <T> (x:<root>.J.id.T?) returnType:<root>.J.id.T? flags:[]' type=kotlin.Function0<kotlin.Unit>? origin=null
            <T : Any!>: kotlin.Function0<kotlin.Unit>?
            x: GET_VAR 'VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit> flags:[]' type=kotlin.Function0<kotlin.Unit> origin=null
  FUN name:test9 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:[]
    BLOCK_BODY
      CALL 'FUN IR_EXTERNAL_JAVA_DECLARATION_STUB name:run1 visibility:public modality:OPEN <> ($this:<root>.J, r:java.lang.Runnable?) returnType:kotlin.Unit flags:[]' type=kotlin.Unit origin=null
        $this: CALL 'CONSTRUCTOR IR_EXTERNAL_JAVA_DECLARATION_STUB visibility:public <> () returnType:<root>.J flags:[primary]' type=<root>.J origin=null
        r: TYPE_OP type=java.lang.Runnable? origin=SAM_CONVERSION typeOperand=java.lang.Runnable?
          typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB INTERFACE name:Runnable modality:ABSTRACT visibility:public flags:[] superTypes:[kotlin.Any]
          FUNCTION_REFERENCE 'FUN name:test9 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags:[]' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null
