digraph elvis_kt { graph [nodesep=3] node [shape=box penwidth=2] edge [penwidth=2] subgraph cluster_0 { color=red 0 [label="Enter class A" style="filled" fillcolor=red]; 1 [label="Exit class A" style="filled" fillcolor=red]; } subgraph cluster_1 { color=blue 2 [label="Enter function foo" style="filled" fillcolor=red]; 3 [label="Exit function foo" style="filled" fillcolor=red]; } 0 -> {1} [color=green]; 1 -> {2} [color=green]; 1 -> {2} [style=dashed]; 2 -> {3}; subgraph cluster_2 { color=red 4 [label="Enter function test_1" style="filled" fillcolor=red]; subgraph cluster_3 { color=blue 5 [label="Enter block"]; subgraph cluster_4 { color=blue 6 [label="Enter when"]; subgraph cluster_5 { color=blue 7 [label="Enter when branch condition "]; 8 [label="Access variable R|/x|"]; 9 [label="Enter safe call"]; 10 [label="Access variable R|/A.b|"]; 11 [label="Exit safe call"]; 12 [label="Exit lhs of ?:"]; 13 [label="Enter rhs of ?:"]; 14 [label="Jump: ^test_1 Unit"]; 15 [label="Stub" style="filled" fillcolor=gray]; 16 [label="Lhs of ?: is not null"]; 17 [label="Exit ?:"]; 18 [label="Exit when branch condition"]; } 19 [label="Synthetic else branch"]; 20 [label="Enter when branch result"]; subgraph cluster_6 { color=blue 21 [label="Enter block"]; 22 [label="Access variable R|/x|"]; 23 [label="Smart cast: R|/x|"]; 24 [label="Function call: R|/x|.R|/A.foo|()" style="filled" fillcolor=yellow]; 25 [label="Exit block"]; } 26 [label="Exit when branch result"]; 27 [label="Exit when"]; } 28 [label="Exit block"]; } 29 [label="Exit function test_1" style="filled" fillcolor=red]; } 4 -> {5}; 5 -> {6}; 6 -> {7}; 7 -> {8}; 8 -> {9 13}; 9 -> {10}; 10 -> {11}; 11 -> {12}; 12 -> {13 16}; 13 -> {14}; 14 -> {29}; 14 -> {15} [style=dotted]; 15 -> {17} [style=dotted]; 16 -> {17}; 17 -> {18}; 18 -> {19 20}; 19 -> {27}; 20 -> {21}; 21 -> {22}; 22 -> {23}; 23 -> {24}; 24 -> {25}; 25 -> {26}; 26 -> {27}; 27 -> {28}; 28 -> {29}; subgraph cluster_7 { color=red 30 [label="Enter function test2" style="filled" fillcolor=red]; subgraph cluster_8 { color=blue 31 [label="Enter block"]; subgraph cluster_9 { color=blue 32 [label="Enter when"]; subgraph cluster_10 { color=blue 33 [label="Enter when branch condition "]; 34 [label="Access variable R|/b|"]; 35 [label="Type operator: (R|/b| !is R|kotlin/String|)"]; 36 [label="Exit when branch condition"]; } 37 [label="Synthetic else branch"]; 38 [label="Enter when branch result"]; subgraph cluster_11 { color=blue 39 [label="Enter block"]; 40 [label="Const: String()"]; 41 [label="Jump: ^test2 String()"]; 42 [label="Stub" style="filled" fillcolor=gray]; 43 [label="Exit block" style="filled" fillcolor=gray]; } 44 [label="Exit when branch result" style="filled" fillcolor=gray]; 45 [label="Exit when"]; } subgraph cluster_12 { color=blue 46 [label="Enter when"]; subgraph cluster_13 { color=blue 47 [label="Enter when branch condition "]; 48 [label="Access variable R|/a|"]; 49 [label="Type operator: (R|/a| !is R|kotlin/String?|)"]; 50 [label="Exit when branch condition"]; } 51 [label="Synthetic else branch"]; 52 [label="Enter when branch result"]; subgraph cluster_14 { color=blue 53 [label="Enter block"]; 54 [label="Const: String()"]; 55 [label="Jump: ^test2 String()"]; 56 [label="Stub" style="filled" fillcolor=gray]; 57 [label="Exit block" style="filled" fillcolor=gray]; } 58 [label="Exit when branch result" style="filled" fillcolor=gray]; 59 [label="Exit when"]; } 60 [label="Access variable R|/a|"]; 61 [label="Smart cast: R|/a|"]; 62 [label="Exit lhs of ?:"]; 63 [label="Enter rhs of ?:"]; 64 [label="Access variable R|/b|"]; 65 [label="Smart cast: R|/b|"]; 66 [label="Lhs of ?: is not null"]; 67 [label="Exit ?:"]; 68 [label="Jump: ^test2 R|/a| ?: R|/b|"]; 69 [label="Stub" style="filled" fillcolor=gray]; 70 [label="Exit block" style="filled" fillcolor=gray]; } 71 [label="Exit function test2" style="filled" fillcolor=red]; } 30 -> {31}; 31 -> {32}; 32 -> {33}; 33 -> {34}; 34 -> {35}; 35 -> {36}; 36 -> {37 38}; 37 -> {45}; 38 -> {39}; 39 -> {40}; 40 -> {41}; 41 -> {71}; 41 -> {42} [style=dotted]; 42 -> {43} [style=dotted]; 43 -> {44} [style=dotted]; 44 -> {45} [style=dotted]; 45 -> {46}; 46 -> {47}; 47 -> {48}; 48 -> {49}; 49 -> {50}; 50 -> {51 52}; 51 -> {59}; 52 -> {53}; 53 -> {54}; 54 -> {55}; 55 -> {71}; 55 -> {56} [style=dotted]; 56 -> {57} [style=dotted]; 57 -> {58} [style=dotted]; 58 -> {59} [style=dotted]; 59 -> {60}; 60 -> {61}; 61 -> {62}; 62 -> {63 66}; 63 -> {64}; 64 -> {65}; 65 -> {67}; 66 -> {67}; 67 -> {68}; 68 -> {71}; 68 -> {69} [style=dotted]; 69 -> {70} [style=dotted]; 70 -> {71} [style=dotted]; }