File: sil_combiner_concrete_prop_all_args.sil

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (707 lines) | stat: -rw-r--r-- 50,083 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
// RUN: %target-sil-opt -wmo -enable-sil-verify-all %s -inline -sil-combine -generic-specializer  -allocbox-to-stack -copy-forwarding -lower-aggregate-instrs -mem2reg -devirtualizer -inline -dead-arg-signature-opt -dce | %FileCheck %s
import Builtin
import Swift
import SwiftShims

internal protocol SomeProtocol : AnyObject {
  func foo() -> Int32
}

internal class SomeClass : SomeProtocol {
  func foo() -> Int32
}

@inline(never) internal func wrap_foo_cp(a: SomeProtocol) -> Int32

func cp()

internal protocol SomeNoClassProtocol {
  func foo() -> Int32
}

internal class SomeNoClass : SomeNoClassProtocol {
  func foo() -> Int32
}

@inline(never) internal func wrap_foo_ncp(a: SomeNoClassProtocol) -> Int32

@inline(never) func ncp()

internal protocol SomeClassProtocolComp : AnyObject {
  func foo() -> Int32
}

internal protocol SomeOtherClassProtocolComp : AnyObject {
  func bar() -> Int32
}

internal class SomeClassComp : SomeClassProtocolComp, SomeOtherClassProtocolComp {
  func foo() -> Int32
  func bar() -> Int32
}

@inline(never) internal func wrap_foo_bar_cpc(a: SomeClassProtocolComp & SomeOtherClassProtocolComp) -> Int32

func cpc()

internal protocol SomeNoClassProtocolComp {
  func foo() -> Int32
}

internal protocol SomeOtherNoClassProtocolComp {
  func bar() -> Int32
}

internal class SomeNoClassComp : SomeNoClassProtocolComp, SomeOtherNoClassProtocolComp {
  func foo() -> Int32
  func bar() -> Int32
}

@inline(never) internal func wrap_no_foo_bar_comp_ncpc(a: SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp) -> Int32

@inline(never) func ncpc()

internal protocol P : AnyObject {
  func foo() -> Int32
}

internal class K : P {
  func foo() -> Int32
}
internal class KPrime : P {
  func foo() -> Int32
}

@inline(never) internal func do_not_optimize_cp(a: P) -> Int32

internal protocol PP : AnyObject {
  func foo() -> Int32
}

internal class KK : PP {
  func foo() -> Int32
}
internal class KKPrime : PP {
  func foo() -> Int32
}

@inline(never) internal func wrap_inout_cp(a: inout PP) -> Int32

@inline(never) func do_not_optimize_inout_cp()

internal protocol PPP {
  func foo() -> Int32
}

internal class KKK : PPP {
  func foo() -> Int32
}

@inline(never) internal func wrap_inout_ncp(a: inout PPP) -> Int32

@inline(never) func inout_ncp()

internal protocol PPPP {
  func foo() -> Int32
}

internal struct SSSS : PPPP {
  func foo() -> Int32
}

@inline(never) internal func wrap_struct_inout_ncp(a: inout PPPP) -> Int32

@inline(never) func struct_inout_ncp()


sil hidden @$s21existential_transform9SomeClassC3foos5Int32VyF : $@convention(method) (@guaranteed SomeClass) -> Int32 {
bb0(%0 : $SomeClass):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform9SomeClassC3foos5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform9SomeClassCAA0C8ProtocolA2aDP3foos5Int32VyFTW : $@convention(witness_method: SomeProtocol) (@guaranteed SomeClass) -> Int32 {
bb0(%0 : $SomeClass):
  %1 = class_method %0 : $SomeClass, #SomeClass.foo : (SomeClass) -> () -> Int32, $@convention(method) (@guaranteed SomeClass) -> Int32 
  %2 = apply %1(%0) : $@convention(method) (@guaranteed SomeClass) -> Int32 
  return %2 : $Int32                              
} // end sil function '$s21existential_transform9SomeClassCAA0C8ProtocolA2aDP3foos5Int32VyFTW'

sil hidden [signature_optimized_thunk] [always_inline] @$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tF : $@convention(thin) (@guaranteed SomeProtocol) -> Int32 {
bb0(%0 : $SomeProtocol):
  %1 = function_ref @$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeProtocol> (@guaranteed τ_0_0) -> Int32 
  %2 = open_existential_ref %0 : $SomeProtocol to $@opened("CC97E160-AC7C-11E8-B742-D0817AD4059B", SomeProtocol) Self 
  %3 = apply %1<@opened("CC97E160-AC7C-11E8-B742-D0817AD4059B", SomeProtocol) Self>(%2) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeProtocol> (@guaranteed τ_0_0) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tF'

// CHECK-LABEL: sil hidden @$s21existential_transform2cpyyF : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK:  %0 = alloc_ref $SomeClass                       
// CHECK:  debug_value %0 : $SomeClass, let, name "self", argno 1 
// CHECK:  %2 = function_ref @$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tFTf4e_n4main0G5ClassC_Tg5 : $@convention(thin) (@guaranteed SomeClass) -> Int32 
// CHECK:  %3 = apply %2(%0) : $@convention(thin) (@guaranteed SomeClass) -> Int32
// CHECK:  strong_release %0 : $SomeClass                  
// CHECK:  %5 = tuple ()                                   
// CHECK:  return %5 : $()                                 
// CHECK-LABEL: } // end sil function '$s21existential_transform2cpyyF'
sil hidden @$s21existential_transform2cpyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_ref $SomeClass                       
  debug_value %0 : $SomeClass, let, name "self", argno 1 
  %2 = init_existential_ref %0 : $SomeClass : $SomeClass, $SomeProtocol 
  debug_value %2 : $SomeProtocol, let, name "magic1" 
  %4 = function_ref @$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeProtocol> (@guaranteed τ_0_0) -> Int32 
  %5 = open_existential_ref %2 : $SomeProtocol to $@opened("CC97E55C-AC7C-11E8-B742-D0817AD4059B", SomeProtocol) Self 
  %6 = apply %4<@opened("CC97E55C-AC7C-11E8-B742-D0817AD4059B", SomeProtocol) Self>(%5) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeProtocol> (@guaranteed τ_0_0) -> Int32 
  strong_release %0 : $SomeClass                  
  %8 = tuple ()                                   
  return %8 : $()                                 
} // end sil function '$s21existential_transform2cpyyF'

sil hidden @$s21existential_transform11SomeNoClassC3foos5Int32VyF : $@convention(method) (@guaranteed SomeNoClass) -> Int32 {
bb0(%0 : $SomeNoClass):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform11SomeNoClassC3foos5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform11SomeNoClassCAA0cdE8ProtocolA2aDP3foos5Int32VyFTW : $@convention(witness_method: SomeNoClassProtocol) (@in_guaranteed SomeNoClass) -> Int32 {
bb0(%0 : $*SomeNoClass):
  %1 = load %0 : $*SomeNoClass                    
  %2 = class_method %1 : $SomeNoClass, #SomeNoClass.foo : (SomeNoClass) -> () -> Int32, $@convention(method) (@guaranteed SomeNoClass) -> Int32 
  %3 = apply %2(%1) : $@convention(method) (@guaranteed SomeNoClass) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform11SomeNoClassCAA0cdE8ProtocolA2aDP3foos5Int32VyFTW'

sil hidden [signature_optimized_thunk] [always_inline] @$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tF : $@convention(thin) (@in_guaranteed SomeNoClassProtocol) -> Int32 {
bb0(%0 : $*SomeNoClassProtocol):
  %1 = function_ref @$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocol> (@in_guaranteed τ_0_0) -> Int32 
  %2 = open_existential_addr immutable_access %0 : $*SomeNoClassProtocol to $*@opened("CC97FCD6-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocol) Self 
  %3 = apply %1<@opened("CC97FCD6-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocol) Self>(%2) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocol> (@in_guaranteed τ_0_0) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tF'

// CHECK-LABEL: sil hidden [noinline] @$s21existential_transform3ncpyyF : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK:  %[[ALLOCREF:[0-9]+]] = alloc_ref $SomeNoClass                     
// CHECK:  debug_value %[[ALLOCREF]] : $SomeNoClass, let, name "self", argno 1 
// CHECK:  %[[FUNC:[0-9]+]] = function_ref @$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tFTf4e_n4main0ghI0C_Tg5 : $@convention(thin) (@guaranteed SomeNoClass) -> Int32 
// CHECK:  %[[RES:[0-9]+]] = apply %[[FUNC]](%[[ALLOCREF]]) : $@convention(thin) (@guaranteed SomeNoClass) -> Int32
// CHECK:  strong_release %[[ALLOCREF]] : $SomeNoClass                
// CHECK:  %[[RET:[0-9]+]] = tuple ()                                   
// CHECK:  return %[[RET]] : $()                                 
// CHECK-LABEL: } // end sil function '$s21existential_transform3ncpyyF'
sil hidden [noinline] @$s21existential_transform3ncpyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_stack $SomeNoClassProtocol, let, name "magic2" 
  %1 = alloc_ref $SomeNoClass                     
  debug_value %1 : $SomeNoClass, let, name "self", argno 1 
  %3 = init_existential_addr %0 : $*SomeNoClassProtocol, $SomeNoClass 
  store %1 to %3 : $*SomeNoClass                  
  %5 = function_ref @$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocol> (@in_guaranteed τ_0_0) -> Int32 
  %6 = open_existential_addr mutable_access %0 : $*SomeNoClassProtocol to $*@opened("CC9800F0-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocol) Self 
  %7 = apply %5<@opened("CC9800F0-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocol) Self>(%6) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocol> (@in_guaranteed τ_0_0) -> Int32 
  destroy_addr %0 : $*SomeNoClassProtocol         
  dealloc_stack %0 : $*SomeNoClassProtocol        
  %10 = tuple ()                                  
  return %10 : $()                                
} // end sil function '$s21existential_transform3ncpyyF'

sil hidden @$s21existential_transform13SomeClassCompC3foos5Int32VyF : $@convention(method) (@guaranteed SomeClassComp) -> Int32 {
bb0(%0 : $SomeClassComp):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform13SomeClassCompC3foos5Int32VyF'

sil hidden @$s21existential_transform13SomeClassCompC3bars5Int32VyF : $@convention(method) (@guaranteed SomeClassComp) -> Int32 {
bb0(%0 : $SomeClassComp):
  %1 = integer_literal $Builtin.Int32, 20         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform13SomeClassCompC3bars5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform13SomeClassCompCAA0cd8ProtocolE0A2aDP3foos5Int32VyFTW : $@convention(witness_method: SomeClassProtocolComp) (@guaranteed SomeClassComp) -> Int32 {
bb0(%0 : $SomeClassComp):
  %1 = class_method %0 : $SomeClassComp, #SomeClassComp.foo : (SomeClassComp) -> () -> Int32, $@convention(method) (@guaranteed SomeClassComp) -> Int32 
  %2 = apply %1(%0) : $@convention(method) (@guaranteed SomeClassComp) -> Int32 
  return %2 : $Int32                              
} // end sil function '$s21existential_transform13SomeClassCompCAA0cd8ProtocolE0A2aDP3foos5Int32VyFTW'

sil private [transparent] [thunk] @$s21existential_transform13SomeClassCompCAA0c5Otherd8ProtocolE0A2aDP3bars5Int32VyFTW : $@convention(witness_method: SomeClassProtocolComp) (@guaranteed SomeClassComp) -> Int32 {
bb0(%0 : $SomeClassComp):
  %1 = class_method %0 : $SomeClassComp, #SomeClassComp.bar : (SomeClassComp) -> () -> Int32, $@convention(method) (@guaranteed SomeClassComp) -> Int32 
  %2 = apply %1(%0) : $@convention(method) (@guaranteed SomeClassComp) -> Int32 
  return %2 : $Int32                              
} // end sil function '$s21existential_transform13SomeClassCompCAA0c5Otherd8ProtocolE0A2aDP3bars5Int32VyFTW'

sil hidden [signature_optimized_thunk] [always_inline] @$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tF : $@convention(thin) (@guaranteed SomeClassProtocolComp & SomeOtherClassProtocolComp) -> Int32 {
bb0(%0 : $SomeClassProtocolComp & SomeOtherClassProtocolComp):
  %1 = function_ref @$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeClassProtocolComp, τ_0_0 : SomeOtherClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  %2 = open_existential_ref %0 : $SomeClassProtocolComp & SomeOtherClassProtocolComp to $@opened("CC981856-AC7C-11E8-B742-D0817AD4059B", SomeClassProtocolComp & SomeOtherClassProtocolComp) Self
  %3 = apply %1<@opened("CC981856-AC7C-11E8-B742-D0817AD4059B", SomeClassProtocolComp & SomeOtherClassProtocolComp) Self>(%2) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeClassProtocolComp, τ_0_0 : SomeOtherClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tF'

// CHECK-LABEL: sil hidden @$s21existential_transform3cpcyyF : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK:  %0 = alloc_ref $SomeClassComp                   
// CHECK:  debug_value %0 : $SomeClassComp, let, name "self", argno 1 
// CHECK:  %2 = function_ref @$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tFTf4e_n4main0hiK0C_Tg5 : $@convention(thin) (@guaranteed SomeClassComp) -> Int32 
// CHECK:  %3 = apply %2(%0) : $@convention(thin) (@guaranteed SomeClassComp) -> Int32
// CHECK:  strong_release %0 : $SomeClassComp              
// CHECK:  %5 = tuple ()                                   
// CHECK:  return %5 : $()                                 
// CHECK-LABEL: } // end sil function '$s21existential_transform3cpcyyF'
sil hidden @$s21existential_transform3cpcyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_ref $SomeClassComp                   
  debug_value %0 : $SomeClassComp, let, name "self", argno 1 
  %2 = init_existential_ref %0 : $SomeClassComp : $SomeClassComp, $SomeClassProtocolComp & SomeOtherClassProtocolComp 
  debug_value %2 : $SomeClassProtocolComp & SomeOtherClassProtocolComp, let, name "magic3" 
  %4 = function_ref @$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeClassProtocolComp, τ_0_0 : SomeOtherClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  %5 = open_existential_ref %2 : $SomeClassProtocolComp & SomeOtherClassProtocolComp to $@opened("CC981D1A-AC7C-11E8-B742-D0817AD4059B", SomeClassProtocolComp & SomeOtherClassProtocolComp) Self 
  %6 = apply %4<@opened("CC981D1A-AC7C-11E8-B742-D0817AD4059B", SomeClassProtocolComp & SomeOtherClassProtocolComp) Self>(%5) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeClassProtocolComp, τ_0_0 : SomeOtherClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  strong_release %0 : $SomeClassComp              
  %8 = tuple ()                                   
  return %8 : $()                                 
} // end sil function '$s21existential_transform3cpcyyF'

sil hidden @$s21existential_transform15SomeNoClassCompC3foos5Int32VyF : $@convention(method) (@guaranteed SomeNoClassComp) -> Int32 {
bb0(%0 : $SomeNoClassComp):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform15SomeNoClassCompC3foos5Int32VyF'

sil hidden @$s21existential_transform15SomeNoClassCompC3bars5Int32VyF : $@convention(method) (@guaranteed SomeNoClassComp) -> Int32 {
bb0(%0 : $SomeNoClassComp):
  %1 = integer_literal $Builtin.Int32, 20         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform15SomeNoClassCompC3bars5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform15SomeNoClassCompCAA0cde8ProtocolF0A2aDP3foos5Int32VyFTW : $@convention(witness_method: SomeNoClassProtocolComp) (@in_guaranteed SomeNoClassComp) -> Int32 {
bb0(%0 : $*SomeNoClassComp):
  %1 = load %0 : $*SomeNoClassComp                
  %2 = class_method %1 : $SomeNoClassComp, #SomeNoClassComp.foo : (SomeNoClassComp) -> () -> Int32, $@convention(method) (@guaranteed SomeNoClassComp) -> Int32 
  %3 = apply %2(%1) : $@convention(method) (@guaranteed SomeNoClassComp) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform15SomeNoClassCompCAA0cde8ProtocolF0A2aDP3foos5Int32VyFTW'

sil private [transparent] [thunk] @$s21existential_transform15SomeNoClassCompCAA0c5Otherde8ProtocolF0A2aDP3bars5Int32VyFTW : $@convention(witness_method: SomeNoClassProtocolComp) (@in_guaranteed SomeNoClassComp) -> Int32 {
bb0(%0 : $*SomeNoClassComp):
  %1 = load %0 : $*SomeNoClassComp                
  %2 = class_method %1 : $SomeNoClassComp, #SomeNoClassComp.bar : (SomeNoClassComp) -> () -> Int32, $@convention(method) (@guaranteed SomeNoClassComp) -> Int32 
  %3 = apply %2(%1) : $@convention(method) (@guaranteed SomeNoClassComp) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform15SomeNoClassCompCAA0c5Otherde8ProtocolF0A2aDP3bars5Int32VyFTW'

sil hidden [signature_optimized_thunk] [always_inline] @$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tF : $@convention(thin) (@in_guaranteed SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp) -> Int32 {
bb0(%0 : $*SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp):
  %1 = function_ref @$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocolComp, τ_0_0 : SomeOtherNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  %2 = open_existential_addr immutable_access %0 : $*SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp to $*@opened("CC983642-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp) Self 
  %3 = apply %1<@opened("CC983642-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp) Self>(%2) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocolComp, τ_0_0 : SomeOtherNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tF'

// CHECK-LABEL: sil hidden [noinline] @$s21existential_transform4ncpcyyF : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK:  %[[ALLOCREF:[0-9]+]] = alloc_ref $SomeNoClassComp                 
// CHECK:  debug_value %[[ALLOCREF]] : $SomeNoClassComp, let, name "self", argno 1 
// CHECK:  %[[FUNC:[0-9]+]] = function_ref @$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tFTf4e_n4main0jklN0C_Tg5 : $@convention(thin) (@guaranteed SomeNoClassComp) -> Int32 
// CHECK:  %[[RES:[0-9]+]] = apply %[[FUNC]](%[[ALLOCREF]]) : $@convention(thin) (@guaranteed SomeNoClassComp) -> Int32
// CHECK:  strong_release %[[ALLOCREF]] : $SomeNoClassComp            
// CHECK:  %[[RET:[0-9]+]] = tuple ()                                   
// CHECK:  return %[[RET]] : $()                                 
// CHECK-LABEL: } // end sil function '$s21existential_transform4ncpcyyF'
sil hidden [noinline] @$s21existential_transform4ncpcyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_stack $SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp, let, name "magic4" 
  %1 = alloc_ref $SomeNoClassComp                 
  debug_value %1 : $SomeNoClassComp, let, name "self", argno 1 
  %3 = init_existential_addr %0 : $*SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp, $SomeNoClassComp 
  store %1 to %3 : $*SomeNoClassComp              
  %5 = function_ref @$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocolComp, τ_0_0 : SomeOtherNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  %6 = open_existential_addr mutable_access %0 : $*SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp to $*@opened("CC983AFC-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp) Self 
  %7 = apply %5<@opened("CC983AFC-AC7C-11E8-B742-D0817AD4059B", SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp) Self>(%6) : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocolComp, τ_0_0 : SomeOtherNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  destroy_addr %0 : $*SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp 
  dealloc_stack %0 : $*SomeNoClassProtocolComp & SomeOtherNoClassProtocolComp 
  %10 = tuple ()                                  
  return %10 : $()                                
} // end sil function '$s21existential_transform4ncpcyyF'

sil hidden @$s21existential_transform1KC3foos5Int32VyF : $@convention(method) (@guaranteed K) -> Int32 {
bb0(%0 : $K):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform1KC3foos5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform1KCAA1PA2aDP3foos5Int32VyFTW : $@convention(witness_method: P) (@guaranteed K) -> Int32 {
bb0(%0 : $K):
  %1 = class_method %0 : $K, #K.foo : (K) -> () -> Int32, $@convention(method) (@guaranteed K) -> Int32 
  %2 = apply %1(%0) : $@convention(method) (@guaranteed K) -> Int32 
  return %2 : $Int32                              
} // end sil function '$s21existential_transform1KCAA1PA2aDP3foos5Int32VyFTW'

// CHECK-LABEL: sil hidden [noinline] @$s21existential_transform18do_not_optimize_cp1as5Int32VAA1P_p_tF : $@convention(thin) (@guaranteed any P) -> Int32 {
// CHECK: bb0(%0 : $any P):
// CHECK:   debug_value %0 : $any P, let, name "a", argno 1
// CHECK:   %2 = open_existential_ref %0 : $any P to $@opened("{{.*}}", any P) Self
// CHECK:   %3 = witness_method $@opened("{{.*}}", any P) Self, #P.foo : <Self where Self : P> (Self) -> () -> Int32, %2 : $@opened("{{.*}}", any P) Self : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@guaranteed τ_0_0) -> Int32
// CHECK:   %4 = apply %3<@opened("{{.*}}", any P) Self>(%2) : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@guaranteed τ_0_0) -> Int32
// CHECK:   return %4 : $Int32                              
// CHECK-LABEL: } // end sil function '$s21existential_transform18do_not_optimize_cp1as5Int32VAA1P_p_tF'
sil hidden [noinline] @$s21existential_transform18do_not_optimize_cp1as5Int32VAA1P_p_tF : $@convention(thin) (@guaranteed P) -> Int32 {
bb0(%0 : $P):
  debug_value %0 : $P, let, name "a", argno 1     
  %2 = open_existential_ref %0 : $P to $@opened("CC9697D8-AC7C-11E8-B742-D0817AD4059B", P) Self 
  %3 = witness_method $@opened("CC9697D8-AC7C-11E8-B742-D0817AD4059B", P) Self, #P.foo : <Self where Self : P> (Self) -> () -> Int32, %2 : $@opened("CC9697D8-AC7C-11E8-B742-D0817AD4059B", P) Self : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@guaranteed τ_0_0) -> Int32 
  %4 = apply %3<@opened("CC9697D8-AC7C-11E8-B742-D0817AD4059B", P) Self>(%2) : $@convention(witness_method: P) <τ_0_0 where τ_0_0 : P> (@guaranteed τ_0_0) -> Int32 
  return %4 : $Int32                              
} // end sil function '$s21existential_transform18do_not_optimize_cp1as5Int32VAA1P_p_tF'

sil hidden @$s21existential_transform2KKC3foos5Int32VyF : $@convention(method) (@guaranteed KK) -> Int32 {
bb0(%0 : $KK):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform2KKC3foos5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform2KKCAA2PPA2aDP3foos5Int32VyFTW : $@convention(witness_method: PP) (@guaranteed KK) -> Int32 {
bb0(%0 : $KK):
  %1 = class_method %0 : $KK, #KK.foo : (KK) -> () -> Int32, $@convention(method) (@guaranteed KK) -> Int32 
  %2 = apply %1(%0) : $@convention(method) (@guaranteed KK) -> Int32 
  return %2 : $Int32                              
} // end sil function '$s21existential_transform2KKCAA2PPA2aDP3foos5Int32VyFTW'


sil hidden [noinline] @$s21existential_transform13wrap_inout_cp1as5Int32VAA2PP_pz_tF : $@convention(thin) (@inout PP) -> Int32 {
bb0(%0 : $*PP):
  debug_value %0 : $*PP, var, name "a", argno 1, expr op_deref
  %2 = load %0 : $*PP                             
  %3 = open_existential_ref %2 : $PP to $@opened("CC969B02-AC7C-11E8-B742-D0817AD4059B", PP) Self 
  %4 = witness_method $@opened("CC969B02-AC7C-11E8-B742-D0817AD4059B", PP) Self, #PP.foo : <Self where Self : PP> (Self) -> () -> Int32, %3 : $@opened("CC969B02-AC7C-11E8-B742-D0817AD4059B", PP) Self : $@convention(witness_method: PP) <τ_0_0 where τ_0_0 : PP> (@guaranteed τ_0_0) -> Int32 
  strong_retain %2 : $PP                          
  %6 = apply %4<@opened("CC969B02-AC7C-11E8-B742-D0817AD4059B", PP) Self>(%3) : $@convention(witness_method: PP) <τ_0_0 where τ_0_0 : PP> (@guaranteed τ_0_0) -> Int32 
  strong_release %2 : $PP                         
  return %6 : $Int32                              
} // end sil function '$s21existential_transform13wrap_inout_cp1as5Int32VAA2PP_pz_tF'

// CHECK-LABEL: sil hidden [noinline] @$s21existential_transform24do_not_optimize_inout_cpyyF : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK:  %0 = alloc_stack $any PP, var, name "magic5"
// CHECK:  %1 = alloc_ref $KK                              
// CHECK:  debug_value %1 : $KK, let, name "self", argno 1 
// CHECK:  %3 = init_existential_ref %1 : $KK : $KK, $any PP
// CHECK:  store %3 to %0 : $*any PP
// CHECK:  %5 = function_ref @$s21existential_transform13wrap_inout_cp1as5Int32VAA2PP_pz_tF : $@convention(thin) (@inout any PP) -> Int32
// CHECK:  %6 = apply %5(%0) : $@convention(thin) (@inout any PP) -> Int32
// CHECK:  %7 = load %0 : $*any PP
// CHECK:  strong_release %7 : $any PP
// CHECK:  dealloc_stack %0 : $*any PP
// CHECK:  %10 = tuple ()                                  
// CHECK:  return %10 : $()                                
// CHECK: } // end sil function '$s21existential_transform24do_not_optimize_inout_cpyyF'
sil hidden [noinline] @$s21existential_transform24do_not_optimize_inout_cpyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_stack $PP, var, name "magic5"        
  %1 = alloc_ref $KK                              
  debug_value %1 : $KK, let, name "self", argno 1 
  %3 = init_existential_ref %1 : $KK : $KK, $PP   
  store %3 to %0 : $*PP                           
  %5 = function_ref @$s21existential_transform13wrap_inout_cp1as5Int32VAA2PP_pz_tF : $@convention(thin) (@inout PP) -> Int32 
  %6 = apply %5(%0) : $@convention(thin) (@inout PP) -> Int32
  %7 = load %0 : $*PP                             
  strong_release %7 : $PP                         
  dealloc_stack %0 : $*PP                         
  %10 = tuple ()                                  
  return %10 : $()                                
} // end sil function '$s21existential_transform24do_not_optimize_inout_cpyyF'

sil hidden @$s21existential_transform3KKKC3foos5Int32VyF : $@convention(method) (@guaranteed KKK) -> Int32 {
bb0(%0 : $KKK):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform3KKKC3foos5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform3KKKCAA3PPPA2aDP3foos5Int32VyFTW : $@convention(witness_method: PPP) (@in_guaranteed KKK) -> Int32 {
bb0(%0 : $*KKK):
  %1 = load %0 : $*KKK                            
  %2 = class_method %1 : $KKK, #KKK.foo : (KKK) -> () -> Int32, $@convention(method) (@guaranteed KKK) -> Int32 
  %3 = apply %2(%1) : $@convention(method) (@guaranteed KKK) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform3KKKCAA3PPPA2aDP3foos5Int32VyFTW'

sil hidden [signature_optimized_thunk] [always_inline] @$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tF : $@convention(thin) (@inout PPP) -> Int32 {
bb0(%0 : $*PPP):
  %1 = function_ref @$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPP> (@inout τ_0_0) -> Int32 
  %2 = open_existential_addr mutable_access %0 : $*PPP to $*@opened("CC986BDA-AC7C-11E8-B742-D0817AD4059B", PPP) Self 
  %3 = apply %1<@opened("CC986BDA-AC7C-11E8-B742-D0817AD4059B", PPP) Self>(%2) : $@convention(thin) <τ_0_0 where τ_0_0 : PPP> (@inout τ_0_0) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tF'

// Cannot substitute a concrete address for an @inout existential argument. The wrong value would be modified.
//
// CHECK-LABEL: sil hidden [noinline] @$s21existential_transform9inout_ncpyyF : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK:  [[ALLOC:%.*]] = alloc_stack $any PPP, var, name "magic6"
// CHECK:  alloc_ref $KKK
// CHECK:  [[ADR:%.*]] = open_existential_addr mutable_access [[ALLOC]] : $*any PPP to $*@opened("{{.*}}", any PPP) Self
// CHECK:  [[CAST:%.*]] = unchecked_addr_cast [[ADR]]
// CHECK:  [[F:%.*]] = function_ref @$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tFTf4e_n4main3KKKC_Tg5 : $@convention(thin) (@inout KKK) -> Int32
// CHECK:  apply [[F]]([[CAST]])
// CHECK:  dealloc_stack %0 : $*any PPP
// CHECK-LABEL: } // end sil function '$s21existential_transform9inout_ncpyyF'
sil hidden [noinline] @$s21existential_transform9inout_ncpyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_stack $PPP, var, name "magic6"       
  %1 = alloc_ref $KKK                             
  debug_value %1 : $KKK, let, name "self", argno 1 
  %3 = init_existential_addr %0 : $*PPP, $KKK     
  store %1 to %3 : $*KKK                          
  %5 = function_ref @$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPP> (@inout τ_0_0) -> Int32 
  %6 = open_existential_addr mutable_access %0 : $*PPP to $*@opened("CC986F86-AC7C-11E8-B742-D0817AD4059B", PPP) Self 
  %7 = apply %5<@opened("CC986F86-AC7C-11E8-B742-D0817AD4059B", PPP) Self>(%6) : $@convention(thin) <τ_0_0 where τ_0_0 : PPP> (@inout τ_0_0) -> Int32 
  destroy_addr %0 : $*PPP                         
  dealloc_stack %0 : $*PPP                        
  %10 = tuple ()                                  
  return %10 : $()                                
} // end sil function '$s21existential_transform9inout_ncpyyF'

sil hidden @$s21existential_transform4SSSSV3foos5Int32VyF : $@convention(method) (SSSS) -> Int32 {
bb0(%0 : $SSSS):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform4SSSSV3foos5Int32VyF'

sil private [transparent] [thunk] @$s21existential_transform4SSSSVAA4PPPPA2aDP3foos5Int32VyFTW : $@convention(witness_method: PPPP) (@in_guaranteed SSSS) -> Int32 {
bb0(%0 : $*SSSS):
  %1 = integer_literal $Builtin.Int32, 10         
  %2 = struct $Int32 (%1 : $Builtin.Int32)        
  return %2 : $Int32                              
} // end sil function '$s21existential_transform4SSSSVAA4PPPPA2aDP3foos5Int32VyFTW'

sil hidden [signature_optimized_thunk] [always_inline] @$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tF : $@convention(thin) (@inout PPPP) -> Int32 {
bb0(%0 : $*PPPP):
  %1 = function_ref @$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPPP> (@inout τ_0_0) -> Int32 
  %2 = open_existential_addr mutable_access %0 : $*PPPP to $*@opened("CC98A1E0-AC7C-11E8-B742-D0817AD4059B", PPPP) Self 
  %3 = apply %1<@opened("CC98A1E0-AC7C-11E8-B742-D0817AD4059B", PPPP) Self>(%2) : $@convention(thin) <τ_0_0 where τ_0_0 : PPPP> (@inout τ_0_0) -> Int32 
  return %3 : $Int32                              
} // end sil function '$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tF'

// Cannot substitute a concrete value's address for an @inout existential argument. The wrong value would be modified.
//
// CHECK-LABEL: sil hidden [noinline] @$s21existential_transform16struct_inout_ncpyyF : $@convention(thin) () -> () {
// CHECK: bb0:
// CHECK:   [[ALLOC:%.*]] = alloc_stack $any PPPP, var, name "magic7"      
// CHECK:   struct $SSSS ()                            
// CHECK:   [[ADR:%.*]] = open_existential_addr mutable_access %0 : $*any PPPP to $*@opened("{{.*}}", any PPPP) Self
// CHECK:   [[CAST:%.*]] = unchecked_addr_cast [[ADR]]
// CHECK:   [[F:%.*]] = function_ref @$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tFTf4e_n4main4SSSSV_Tg5 : $@convention(thin) (@inout SSSS) -> Int32
// CHECK:  apply [[F]]([[CAST]])
// CHECK:   dealloc_stack [[ALLOC]] : $*any PPPP
// CHECK-LABEL: } // end sil function '$s21existential_transform16struct_inout_ncpyyF'
sil hidden [noinline] @$s21existential_transform16struct_inout_ncpyyF : $@convention(thin) () -> () {
bb0:
  %0 = alloc_stack $PPPP, var, name "magic7"      
  %1 = struct $SSSS ()
  %2 = init_existential_addr %0 : $*PPPP, $SSSS   
  store %1 to %2 : $*SSSS                         
  %4 = function_ref @$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPPP> (@inout τ_0_0) -> Int32
  %5 = open_existential_addr mutable_access %0 : $*PPPP to $*@opened("CC98A5E6-AC7C-11E8-B742-D0817AD4059B", PPPP) Self
  %6 = apply %4<@opened("CC98A5E6-AC7C-11E8-B742-D0817AD4059B", PPPP) Self>(%5) : $@convention(thin) <τ_0_0 where τ_0_0 : PPPP> (@inout τ_0_0) -> Int32
  destroy_addr %0 : $*PPPP                        
  dealloc_stack %0 : $*PPPP                       
  %9 = tuple ()                                   
  return %9 : $()                                 
} // end sil function '$s21existential_transform16struct_inout_ncpyyF'


// CHECK-LABEL: sil shared [noinline] @$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tFTf4e_n4main0G5ClassC_Tg5 : $@convention(thin) (@guaranteed SomeClass) -> Int32 {
// CHECK: bb0(%0 : $SomeClass):
// CHECK:  %1 = integer_literal $Builtin.Int32, 10         
// CHECK:  %2 = struct $Int32 (%1 : $Builtin.Int32)        
// CHECK:  return %2 : $Int32                              
// CHECK-LABEL: } // end sil function '$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tFTf4e_n4main0G5ClassC_Tg5'
sil shared [noinline] @$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeProtocol> (@guaranteed τ_0_0) -> Int32 {
bb0(%0 : $τ_0_0):
  %1 = witness_method $τ_0_0, #SomeProtocol.foo : <Self where Self : SomeProtocol> (Self) -> () -> Int32 : $@convention(witness_method: SomeProtocol) <τ_0_0 where τ_0_0 : SomeProtocol> (@guaranteed τ_0_0) -> Int32 
  %2 = apply %1<τ_0_0>(%0) : $@convention(witness_method: SomeProtocol) <τ_0_0 where τ_0_0 : SomeProtocol> (@guaranteed τ_0_0) -> Int32 
  return %2 : $Int32                              
} // end sil function '$s21existential_transform11wrap_foo_cp1as5Int32VAA12SomeProtocol_p_tFTf4e_n'


// CHECK-LABEL: sil shared [noinline] @$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tFTf4e_n4main0ghI0C_Tg5 : $@convention(thin) (@guaranteed SomeNoClass) -> Int32 {
// CHECK: bb0(%0 : $SomeNoClass):
// CHECK:  %1 = integer_literal $Builtin.Int32, 10         
// CHECK:  %2 = struct $Int32 (%1 : $Builtin.Int32)        
// CHECK:  return %2 : $Int32                              
// CHECK-LABEL: } // end sil function '$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tFTf4e_n4main0ghI0C_Tg5'
sil shared [noinline] @$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocol> (@in_guaranteed τ_0_0) -> Int32 {
bb0(%0 : $*τ_0_0):
  %1 = witness_method $τ_0_0, #SomeNoClassProtocol.foo : <Self where Self : SomeNoClassProtocol> (Self) -> () -> Int32 : $@convention(witness_method: SomeNoClassProtocol) <τ_0_0 where τ_0_0 : SomeNoClassProtocol> (@in_guaranteed τ_0_0) -> Int32 
  %2 = apply %1<τ_0_0>(%0) : $@convention(witness_method: SomeNoClassProtocol) <τ_0_0 where τ_0_0 : SomeNoClassProtocol> (@in_guaranteed τ_0_0) -> Int32 
  return %2 : $Int32                              
} // end sil function '$s21existential_transform12wrap_foo_ncp1as5Int32VAA19SomeNoClassProtocol_p_tFTf4e_n'

// CHECK-LABEL: sil shared [noinline] @$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tFTf4e_n4main0hiK0C_Tg5 : $@convention(thin) (@guaranteed SomeClassComp) -> Int32 {
// CHECK: bb0(%0 : $SomeClassComp):
// CHECK:  %1 = integer_literal $Builtin.Int32, 10         
// CHECK:  %2 = integer_literal $Builtin.Int32, 20         
// CHECK:  %3 = integer_literal $Builtin.Int1, -1          
// CHECK:  %4 = builtin "sadd_with_overflow_Int32"(%1 : $Builtin.Int32, %2 : $Builtin.Int32, %3 : $Builtin.Int1) : $(Builtin.Int32, Builtin.Int1) 
// CHECK:  %5 = tuple_extract %4 : $(Builtin.Int32, Builtin.Int1), 0 
// CHECK:  %6 = tuple_extract %4 : $(Builtin.Int32, Builtin.Int1), 1 
// CHECK:  cond_fail %6 : $Builtin.Int1                    
// CHECK:  %8 = struct $Int32 (%5 : $Builtin.Int32)        
// CHECK:  return %8 : $Int32                              
// CHECK: } // end sil function '$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tFTf4e_n4main0hiK0C_Tg5'
sil shared [noinline] @$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeClassProtocolComp, τ_0_0 : SomeOtherClassProtocolComp> (@guaranteed τ_0_0) -> Int32 {
bb0(%0 : $τ_0_0):
  %1 = witness_method $τ_0_0, #SomeClassProtocolComp.foo : <Self where Self : SomeClassProtocolComp> (Self) -> () -> Int32 : $@convention(witness_method: SomeClassProtocolComp) <τ_0_0 where τ_0_0 : SomeClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  %2 = apply %1<τ_0_0>(%0) : $@convention(witness_method: SomeClassProtocolComp) <τ_0_0 where τ_0_0 : SomeClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  %3 = witness_method $τ_0_0, #SomeOtherClassProtocolComp.bar : <Self where Self : SomeOtherClassProtocolComp> (Self) -> () -> Int32 : $@convention(witness_method: SomeOtherClassProtocolComp) <τ_0_0 where τ_0_0 : SomeOtherClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  %4 = apply %3<τ_0_0>(%0) : $@convention(witness_method: SomeOtherClassProtocolComp) <τ_0_0 where τ_0_0 : SomeOtherClassProtocolComp> (@guaranteed τ_0_0) -> Int32 
  %5 = struct_extract %2 : $Int32, #Int32._value  
  %6 = struct_extract %4 : $Int32, #Int32._value  
  %7 = integer_literal $Builtin.Int1, -1          
  %8 = builtin "sadd_with_overflow_Int32"(%5 : $Builtin.Int32, %6 : $Builtin.Int32, %7 : $Builtin.Int1) : $(Builtin.Int32, Builtin.Int1) 
  %9 = tuple_extract %8 : $(Builtin.Int32, Builtin.Int1), 0 
  %10 = tuple_extract %8 : $(Builtin.Int32, Builtin.Int1), 1 
  cond_fail %10 : $Builtin.Int1                   
  %12 = struct $Int32 (%9 : $Builtin.Int32)       
  return %12 : $Int32                             
} // end sil function '$s21existential_transform16wrap_foo_bar_cpc1as5Int32VAA21SomeClassProtocolComp_AA0h5OtherijK0p_tFTf4e_n'

// CHECK-LABEL: sil shared [noinline] @$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tFTf4e_n4main0jklN0C_Tg5 : $@convention(thin) (@guaranteed SomeNoClassComp) -> Int32 {
// CHECK: bb0(%0 : $SomeNoClassComp):
// CHECK:   %1 = integer_literal $Builtin.Int32, 10         
// CHECK:   %2 = integer_literal $Builtin.Int32, 20         
// CHECK:   %3 = integer_literal $Builtin.Int1, -1          
// CHECK:   %4 = builtin "sadd_with_overflow_Int32"(%1 : $Builtin.Int32, %2 : $Builtin.Int32, %3 : $Builtin.Int1) : $(Builtin.Int32, Builtin.Int1) 
// CHECK:   %5 = tuple_extract %4 : $(Builtin.Int32, Builtin.Int1), 0 
// CHECK:   %6 = tuple_extract %4 : $(Builtin.Int32, Builtin.Int1), 1 
// CHECK:   cond_fail %6 : $Builtin.Int1                    
// CHECK:   %8 = struct $Int32 (%5 : $Builtin.Int32)        
// CHECK:   return %8 : $Int32                              
// CHECK-LABEL: } // end sil function '$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tFTf4e_n4main0jklN0C_Tg5'
sil shared [noinline] @$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : SomeNoClassProtocolComp, τ_0_0 : SomeOtherNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 {
bb0(%0 : $*τ_0_0):
  %1 = witness_method $τ_0_0, #SomeNoClassProtocolComp.foo : <Self where Self : SomeNoClassProtocolComp> (Self) -> () -> Int32 : $@convention(witness_method: SomeNoClassProtocolComp) <τ_0_0 where τ_0_0 : SomeNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  %2 = apply %1<τ_0_0>(%0) : $@convention(witness_method: SomeNoClassProtocolComp) <τ_0_0 where τ_0_0 : SomeNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  %3 = witness_method $τ_0_0, #SomeOtherNoClassProtocolComp.bar : <Self where Self : SomeOtherNoClassProtocolComp> (Self) -> () -> Int32 : $@convention(witness_method: SomeOtherNoClassProtocolComp) <τ_0_0 where τ_0_0 : SomeOtherNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  %4 = apply %3<τ_0_0>(%0) : $@convention(witness_method: SomeOtherNoClassProtocolComp) <τ_0_0 where τ_0_0 : SomeOtherNoClassProtocolComp> (@in_guaranteed τ_0_0) -> Int32 
  %5 = struct_extract %2 : $Int32, #Int32._value  
  %6 = struct_extract %4 : $Int32, #Int32._value  
  %7 = integer_literal $Builtin.Int1, -1          
  %8 = builtin "sadd_with_overflow_Int32"(%5 : $Builtin.Int32, %6 : $Builtin.Int32, %7 : $Builtin.Int1) : $(Builtin.Int32, Builtin.Int1) 
  %9 = tuple_extract %8 : $(Builtin.Int32, Builtin.Int1), 0 
  %10 = tuple_extract %8 : $(Builtin.Int32, Builtin.Int1), 1 
  cond_fail %10 : $Builtin.Int1                   
  %12 = struct $Int32 (%9 : $Builtin.Int32)       
  return %12 : $Int32                             
} // end sil function '$s21existential_transform25wrap_no_foo_bar_comp_ncpc1as5Int32VAA23SomeNoClassProtocolComp_AA0j5OtherklmN0p_tFTf4e_n'

// Cannot substitute a concrete value for a mutable existential, so specialization will be blocked.
//
// CHECK-LABEL: sil shared [noinline] @$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPP> (@inout τ_0_0) -> Int32 {
// CHECK-LABEL: } // end sil function '$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tFTf4e_n'
sil shared [noinline] @$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPP> (@inout τ_0_0) -> Int32 {
bb0(%0 : $*τ_0_0):
  %1 = alloc_stack $τ_0_0                        
  copy_addr [take] %0 to [init] %1 : $*τ_0_0 
  %3 = witness_method $τ_0_0, #PPP.foo : <Self where Self : PPP> (Self) -> () -> Int32 : $@convention(witness_method: PPP) <τ_0_0 where τ_0_0 : PPP> (@in_guaranteed τ_0_0) -> Int32 
  %4 = apply %3<τ_0_0>(%1) : $@convention(witness_method: PPP) <τ_0_0 where τ_0_0 : PPP> (@in_guaranteed τ_0_0) -> Int32 
  dealloc_stack %1 : $*τ_0_0                     
  return %4 : $Int32                              
} // end sil function '$s21existential_transform14wrap_inout_ncp1as5Int32VAA3PPP_pz_tFTf4e_n'

// Cannot substitute a concrete value for a mutable existential, so specialization will be blocked.
//
// CHECK-LABEL: sil shared [noinline] @$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPPP> (@inout τ_0_0) -> Int32 {
// CHECK-LABEL: } // end sil function '$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tFTf4e_n'
sil shared [noinline] @$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tFTf4e_n : $@convention(thin) <τ_0_0 where τ_0_0 : PPPP> (@inout τ_0_0) -> Int32 {
bb0(%0 : $*τ_0_0):
  %1 = alloc_stack $τ_0_0                        
  copy_addr [take] %0 to [init] %1 : $*τ_0_0 
  %3 = witness_method $τ_0_0, #PPPP.foo : <Self where Self : PPPP> (Self) -> () -> Int32 : $@convention(witness_method: PPPP) <τ_0_0 where τ_0_0 : PPPP> (@in_guaranteed τ_0_0) -> Int32 
  %4 = apply %3<τ_0_0>(%1) : $@convention(witness_method: PPPP) <τ_0_0 where τ_0_0 : PPPP> (@in_guaranteed τ_0_0) -> Int32 
  dealloc_stack %1 : $*τ_0_0                     
  return %4 : $Int32                              
} // end sil function '$s21existential_transform21wrap_struct_inout_ncp1as5Int32VAA4PPPP_pz_tFTf4e_n'

sil_vtable SomeClass {
  #SomeClass.foo: (SomeClass) -> () -> Int32 : @$s21existential_transform9SomeClassC3foos5Int32VyF	// SomeClass.foo()
}

sil_vtable SomeNoClass {
  #SomeNoClass.foo: (SomeNoClass) -> () -> Int32 : @$s21existential_transform11SomeNoClassC3foos5Int32VyF	// SomeNoClass.foo()
}

sil_vtable SomeClassComp {
  #SomeClassComp.foo: (SomeClassComp) -> () -> Int32 : @$s21existential_transform13SomeClassCompC3foos5Int32VyF	// SomeClassComp.foo()
  #SomeClassComp.bar: (SomeClassComp) -> () -> Int32 : @$s21existential_transform13SomeClassCompC3bars5Int32VyF	// SomeClassComp.bar()
}

sil_vtable SomeNoClassComp {
  #SomeNoClassComp.foo: (SomeNoClassComp) -> () -> Int32 : @$s21existential_transform15SomeNoClassCompC3foos5Int32VyF	// SomeNoClassComp.foo()
  #SomeNoClassComp.bar: (SomeNoClassComp) -> () -> Int32 : @$s21existential_transform15SomeNoClassCompC3bars5Int32VyF	// SomeNoClassComp.bar()
}

sil_vtable K {
  #K.foo: (K) -> () -> Int32 : @$s21existential_transform1KC3foos5Int32VyF	// K.foo()
}

sil_vtable KK {
  #KK.foo: (KK) -> () -> Int32 : @$s21existential_transform2KKC3foos5Int32VyF	// KK.foo()
}

sil_vtable KKK {
  #KKK.foo: (KKK) -> () -> Int32 : @$s21existential_transform3KKKC3foos5Int32VyF	// KKK.foo()
}

sil_witness_table hidden SomeClass: SomeProtocol module existential_transform {
  method #SomeProtocol.foo: <Self where Self : SomeProtocol> (Self) -> () -> Int32 : @$s21existential_transform9SomeClassCAA0C8ProtocolA2aDP3foos5Int32VyFTW	// protocol witness for SomeProtocol.foo() in conformance SomeClass
}

sil_witness_table hidden SomeNoClass: SomeNoClassProtocol module existential_transform {
  method #SomeNoClassProtocol.foo: <Self where Self : SomeNoClassProtocol> (Self) -> () -> Int32 : @$s21existential_transform11SomeNoClassCAA0cdE8ProtocolA2aDP3foos5Int32VyFTW	// protocol witness for SomeNoClassProtocol.foo() in conformance SomeNoClass
}

sil_witness_table hidden SomeClassComp: SomeClassProtocolComp module existential_transform {
  method #SomeClassProtocolComp.foo: <Self where Self : SomeClassProtocolComp> (Self) -> () -> Int32 : @$s21existential_transform13SomeClassCompCAA0cd8ProtocolE0A2aDP3foos5Int32VyFTW	// protocol witness for SomeClassProtocolComp.foo() in conformance SomeClassComp
}

sil_witness_table hidden SomeClassComp: SomeOtherClassProtocolComp module existential_transform {
  method #SomeOtherClassProtocolComp.bar: <Self where Self : SomeOtherClassProtocolComp> (Self) -> () -> Int32 : @$s21existential_transform13SomeClassCompCAA0c5Otherd8ProtocolE0A2aDP3bars5Int32VyFTW	// protocol witness for SomeOtherClassProtocolComp.bar() in conformance SomeClassComp
}

sil_witness_table hidden SomeNoClassComp: SomeNoClassProtocolComp module existential_transform {
  method #SomeNoClassProtocolComp.foo: <Self where Self : SomeNoClassProtocolComp> (Self) -> () -> Int32 : @$s21existential_transform15SomeNoClassCompCAA0cde8ProtocolF0A2aDP3foos5Int32VyFTW	// protocol witness for SomeNoClassProtocolComp.foo() in conformance SomeNoClassComp
}

sil_witness_table hidden SomeNoClassComp: SomeOtherNoClassProtocolComp module existential_transform {
  method #SomeOtherNoClassProtocolComp.bar: <Self where Self : SomeOtherNoClassProtocolComp> (Self) -> () -> Int32 : @$s21existential_transform15SomeNoClassCompCAA0c5Otherde8ProtocolF0A2aDP3bars5Int32VyFTW	// protocol witness for SomeOtherNoClassProtocolComp.bar() in conformance SomeNoClassComp
}

sil_witness_table hidden K: P module existential_transform {
  method #P.foo: <Self where Self : P> (Self) -> () -> Int32 : @$s21existential_transform1KCAA1PA2aDP3foos5Int32VyFTW	// protocol witness for P.foo() in conformance K
}

sil_witness_table hidden KK: PP module existential_transform {
  method #PP.foo: <Self where Self : PP> (Self) -> () -> Int32 : @$s21existential_transform2KKCAA2PPA2aDP3foos5Int32VyFTW	// protocol witness for PP.foo() in conformance KK
}

sil_witness_table hidden KKK: PPP module existential_transform {
  method #PPP.foo: <Self where Self : PPP> (Self) -> () -> Int32 : @$s21existential_transform3KKKCAA3PPPA2aDP3foos5Int32VyFTW	// protocol witness for PPP.foo() in conformance KKK
}

sil_witness_table hidden SSSS: PPPP module existential_transform {
  method #PPPP.foo: <Self where Self : PPPP> (Self) -> () -> Int32 : @$s21existential_transform4SSSSVAA4PPPPA2aDP3foos5Int32VyFTW	// protocol witness for PPPP.foo() in conformance SSSS
}