c中的setjump和longjump

概念

goto可能会导致程序逻辑的混乱,并且非常容易导致程序栈帧的混乱,造成不可预知的后果。

setjump和longjump用于代替goto。由于操作系统调用会有很“深”的函数调用,当某些操作完成后,系统调用函数想要快速返回用户层函数而不是一层层地返回,所以这里经常用setjmp/longjmp。

另外笔者实践发现,某些时候递归函数使用setump/longjmp也能有很神奇的用处。

  • 使用setjmp/longjmp宏要包含setjmp.h
    1
    int setjmp(jmp_buf env);
  • env是jmp_buf类型的变量,用于保存setjmp时的环境
  • 第一次调用setjmp必返回0,之后依据longjmp返回
1
void longjmp(jmp_buf env,int ret_val);

(void是我猜的)

  • env 之前setjmp保存的环境,跳转到保存的那一行
  • ret_val 跳转到setjmp时返回值

例子

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <setjmp.h>

jmp_buf buf;
void second(){
printf("second\n");
longjmp(buf,1); // setjmp返回1
}
void first(){
second();
printf("first\n"); // 执行不到这一行
}
int main() {
if(!setjmp(buf)){ // 第一次返回0,所以执行first,第二次由于longjmp,返回1,执行else
first();
}else{
printf("main\n");
}

}

输出

1
2
second
main

底层实现

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

buf:
.zero 200
.LC0:
.string "second"
second():
push rbp
mov rbp, rsp
mov edi, OFFSET FLAT:.LC0
call puts
mov esi, 1
mov edi, OFFSET FLAT:buf
call longjmp
.LC1:
.string "first"
first():
push rbp
mov rbp, rsp
call second()
mov edi, OFFSET FLAT:.LC1
call puts
nop
pop rbp
ret
.LC2:
.string "main"
main:
push rbp
mov rbp, rsp
mov edi, OFFSET FLAT:buf
call _setjmp
test eax, eax
sete al
test al, al
je .L5
call first()
jmp .L6
.L5:
mov edi, OFFSET FLAT:.LC2
call puts
.L6:
mov eax, 0
pop rbp
ret
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
typedef struct _JUMP_BUFFER
{
unsigned __int64 Frame;
unsigned __int64 Rbx;
unsigned __int64 Rsp;
unsigned __int64 Rbp;
unsigned __int64 Rsi;
unsigned __int64 Rdi;
unsigned __int64 R12;
unsigned __int64 R13;
unsigned __int64 R14;
unsigned __int64 R15;
unsigned __int64 Rip;
unsigned long MxCsr;
unsigned short FpCsr;
unsigned short Spare;

SETJMP_FLOAT128 Xmm6;
SETJMP_FLOAT128 Xmm7;
SETJMP_FLOAT128 Xmm8;
SETJMP_FLOAT128 Xmm9;
SETJMP_FLOAT128 Xmm10;
SETJMP_FLOAT128 Xmm11;
SETJMP_FLOAT128 Xmm12;
SETJMP_FLOAT128 Xmm13;
SETJMP_FLOAT128 Xmm14;
SETJMP_FLOAT128 Xmm15;
} _JUMP_BUFFER;

可以看到buffer内保存了所有寄存器和相关信息

参考资料

[1] C 库宏 - setjmp()

c++中的lambda表达式

C++ 11及以后才有

完整声明

1
[capture list] (params list) mutable exception-> return type { function body }
  • capture list: 捕获的外部变量
  • params list: 参数列表
  • mutable: 是否可以修改捕获的变量
  • exception: 异常设定
  • return type: 返回值类型
  • function body: 函数体

声明中存在可以省略的项,以下为三种可以简化的类型

序号 格式
1 [capture list] (params list) -> return type {function body}
2 [capture list] (params list) {function body}
3 [capture list] {function body}

例子

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
#include <string>
#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

bool cmp(int a,int b){
return a<b;
}
ostream& operator<<(ostream &os,vector<int> v){
for(vector<int>::const_iterator i=v.begin();i<v.end();i++){
os<<*i<<",";
}
os<<endl;
return os;
}
int main(){
vector<int> v{5,4,3,1,2,0};
vector<int> lbv(v);
cout<<v<<endl;
// lambda表达式写法
sort(v.begin(),v.end(),[](int a,int b)->bool {return a<b;});
cout<<v<<endl;
// 传统写法
sort(lbv.begin(),lbv.end(),cmp);
cout<<lbv<<endl;
int c=3;
// 常量捕获,捕获后c不可修改
auto f1 = [c](int a)->bool {bool res = a<c;return res;};
vector<int> v2;
for(auto a:v){
if(f1(a)){
v2.push_back(a);
}
}
cout<<v2<<endl;
// 引用捕获,捕获后c可以修改
auto f2 = [&c](int a)->bool {bool res = a<c;c=0;return res;};
vector<int> v3;
for(auto a:v){
if(f2(a)){
v3.push_back(a);
}
}
cout<<v3<<endl;

return 0;
}

底层实现

将上面的代码放入 godbolt.org,得到底层实现

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
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
std::__lg(long):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
bsr rax, rax
xor rax, 63
mov edx, eax
mov eax, 63
sub eax, edx
cdqe
pop rbp
ret
operator new(unsigned long, void*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
pop rbp
ret
cmp(int, int):
push rbp
mov rbp, rsp
mov DWORD PTR [rbp-4], edi
mov DWORD PTR [rbp-8], esi
mov eax, DWORD PTR [rbp-4]
cmp eax, DWORD PTR [rbp-8]
setl al
pop rbp
ret
.LC0:
.string ","
operator<<(std::basic_ostream<char, std::char_traits<char> >&, std::vector<int, std::allocator<int> >):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov rax, QWORD PTR [rbp-48]
mov rdi, rax
call std::vector<int, std::allocator<int> >::begin()
mov QWORD PTR [rbp-16], rax
lea rdx, [rbp-16]
lea rax, [rbp-24]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::__normal_iterator<int*>(__gnu_cxx::__normal_iterator<int*, __gnu_cxx::__enable_if<std::__are_same<int*, int*>::__value, std::vector<int, std::allocator<int> > >::__type> const&)
.L9:
mov rax, QWORD PTR [rbp-48]
mov rdi, rax
call std::vector<int, std::allocator<int> >::end()
mov QWORD PTR [rbp-8], rax
lea rdx, [rbp-8]
lea rax, [rbp-24]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator< <int const*, int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L8
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-40]
mov esi, edx
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(int)
mov esi, OFFSET FLAT:.LC0
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)
lea rax, [rbp-24]
mov esi, 0
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::operator++(int)
jmp .L9
.L8:
mov rax, QWORD PTR [rbp-40]
mov esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
mov rax, QWORD PTR [rbp-40]
leave
ret
main::{lambda(int, int)#1}::operator()(int, int) const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov DWORD PTR [rbp-12], esi
mov DWORD PTR [rbp-16], edx
mov eax, DWORD PTR [rbp-12]
cmp eax, DWORD PTR [rbp-16]
setl al
pop rbp
ret
main::{lambda(int)#2}::operator()(int) const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-24], rdi
mov DWORD PTR [rbp-28], esi
mov rax, QWORD PTR [rbp-24]
mov eax, DWORD PTR [rax]
cmp DWORD PTR [rbp-28], eax
setl al
mov BYTE PTR [rbp-1], al
movzx eax, BYTE PTR [rbp-1]
pop rbp
ret
std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl() [base object destructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::allocator<int>::~allocator() [base object destructor]
nop
leave
ret
std::_Vector_base<int, std::allocator<int> >::_Vector_base() [base object constructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_impl::_Vector_impl() [complete object constructor]
nop
leave
ret
std::vector<int, std::allocator<int> >::vector() [base object constructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_base() [base object constructor]
nop
leave
ret
main::{lambda(int)#3}::operator()(int) const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-24], rdi
mov DWORD PTR [rbp-28], esi
mov rax, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rax]
mov eax, DWORD PTR [rax]
cmp DWORD PTR [rbp-28], eax
setl al
mov BYTE PTR [rbp-1], al
mov rax, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rax]
mov DWORD PTR [rax], 0
movzx eax, BYTE PTR [rbp-1]
pop rbp
ret
main:
push rbp
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 392
mov DWORD PTR [rbp-240], 5
mov DWORD PTR [rbp-236], 4
mov DWORD PTR [rbp-232], 3
mov DWORD PTR [rbp-228], 1
mov DWORD PTR [rbp-224], 2
mov DWORD PTR [rbp-220], 0
lea rax, [rbp-240]
mov r12, rax
mov r13d, 6
lea rax, [rbp-209]
mov rdi, rax
call std::allocator<int>::allocator() [complete object constructor]
lea rdx, [rbp-209]
mov rsi, r12
mov rdi, r13
mov rcx, r12
mov rbx, r13
mov rdi, rbx
lea rax, [rbp-272]
mov rcx, rdx
mov rdx, rdi
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector(std::initializer_list<int>, std::allocator<int> const&)
lea rax, [rbp-209]
mov rdi, rax
call std::allocator<int>::~allocator() [complete object destructor]
lea rdx, [rbp-272]
lea rax, [rbp-304]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector(std::vector<int, std::allocator<int> > const&)
lea rdx, [rbp-272]
lea rax, [rbp-208]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector(std::vector<int, std::allocator<int> > const&)
lea rax, [rbp-208]
mov rsi, rax
mov edi, OFFSET FLAT:_ZSt4cout
call operator<<(std::basic_ostream<char, std::char_traits<char> >&, std::vector<int, std::allocator<int> >)
mov esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
lea rax, [rbp-208]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
lea rax, [rbp-272]
mov rdi, rax
call std::vector<int, std::allocator<int> >::end()
mov rbx, rax
lea rax, [rbp-272]
mov rdi, rax
call std::vector<int, std::allocator<int> >::begin()
mov rsi, rbx
mov rdi, rax
call void std::sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, main::{lambda(int, int)#1}>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, main::{lambda(int, int)#1}, main::{lambda(int, int)#1})
lea rdx, [rbp-272]
lea rax, [rbp-176]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector(std::vector<int, std::allocator<int> > const&)
lea rax, [rbp-176]
mov rsi, rax
mov edi, OFFSET FLAT:_ZSt4cout
call operator<<(std::basic_ostream<char, std::char_traits<char> >&, std::vector<int, std::allocator<int> >)
mov esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
lea rax, [rbp-176]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
lea rax, [rbp-304]
mov rdi, rax
call std::vector<int, std::allocator<int> >::end()
mov rbx, rax
lea rax, [rbp-304]
mov rdi, rax
call std::vector<int, std::allocator<int> >::begin()
mov edx, OFFSET FLAT:cmp(int, int)
mov rsi, rbx
mov rdi, rax
call void std::sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, bool (*)(int, int)>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, bool (*)(int, int))
lea rdx, [rbp-304]
lea rax, [rbp-144]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector(std::vector<int, std::allocator<int> > const&)
lea rax, [rbp-144]
mov rsi, rax
mov edi, OFFSET FLAT:_ZSt4cout
call operator<<(std::basic_ostream<char, std::char_traits<char> >&, std::vector<int, std::allocator<int> >)
mov esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
lea rax, [rbp-144]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
mov DWORD PTR [rbp-308], 3
mov eax, DWORD PTR [rbp-308]
mov DWORD PTR [rbp-312], eax
lea rax, [rbp-336]
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector() [complete object constructor]
lea rax, [rbp-272]
mov QWORD PTR [rbp-40], rax
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::begin()
mov QWORD PTR [rbp-384], rax
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::end()
mov QWORD PTR [rbp-392], rax
.L23:
lea rdx, [rbp-392]
lea rax, [rbp-384]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L21
lea rax, [rbp-384]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-372], eax
mov edx, DWORD PTR [rbp-372]
lea rax, [rbp-312]
mov esi, edx
mov rdi, rax
call main::{lambda(int)#2}::operator()(int) const
test al, al
je .L22
lea rdx, [rbp-372]
lea rax, [rbp-336]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::push_back(int const&)
.L22:
lea rax, [rbp-384]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L23
.L21:
lea rdx, [rbp-336]
lea rax, [rbp-112]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector(std::vector<int, std::allocator<int> > const&)
lea rax, [rbp-112]
mov rsi, rax
mov edi, OFFSET FLAT:_ZSt4cout
call operator<<(std::basic_ostream<char, std::char_traits<char> >&, std::vector<int, std::allocator<int> >)
mov esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
lea rax, [rbp-112]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
lea rax, [rbp-308]
mov QWORD PTR [rbp-344], rax
lea rax, [rbp-368]
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector() [complete object constructor]
lea rax, [rbp-272]
mov QWORD PTR [rbp-48], rax
mov rax, QWORD PTR [rbp-48]
mov rdi, rax
call std::vector<int, std::allocator<int> >::begin()
mov QWORD PTR [rbp-408], rax
mov rax, QWORD PTR [rbp-48]
mov rdi, rax
call std::vector<int, std::allocator<int> >::end()
mov QWORD PTR [rbp-416], rax
.L26:
lea rdx, [rbp-416]
lea rax, [rbp-408]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L24
lea rax, [rbp-408]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-396], eax
mov edx, DWORD PTR [rbp-396]
lea rax, [rbp-344]
mov esi, edx
mov rdi, rax
call main::{lambda(int)#3}::operator()(int) const
test al, al
je .L25
lea rdx, [rbp-396]
lea rax, [rbp-368]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::push_back(int const&)
.L25:
lea rax, [rbp-408]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L26
.L24:
lea rdx, [rbp-368]
lea rax, [rbp-80]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::vector(std::vector<int, std::allocator<int> > const&)
lea rax, [rbp-80]
mov rsi, rax
mov edi, OFFSET FLAT:_ZSt4cout
call operator<<(std::basic_ostream<char, std::char_traits<char> >&, std::vector<int, std::allocator<int> >)
mov esi, OFFSET FLAT:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_
mov rdi, rax
call std::basic_ostream<char, std::char_traits<char> >::operator<<(std::basic_ostream<char, std::char_traits<char> >& (*)(std::basic_ostream<char, std::char_traits<char> >&))
lea rax, [rbp-80]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
mov ebx, 0
lea rax, [rbp-368]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
lea rax, [rbp-336]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
lea rax, [rbp-304]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
lea rax, [rbp-272]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
mov eax, ebx
jmp .L48
mov rbx, rax
lea rax, [rbp-209]
mov rdi, rax
call std::allocator<int>::~allocator() [complete object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
mov rbx, rax
lea rax, [rbp-208]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L30
mov rbx, rax
lea rax, [rbp-176]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L30
mov rbx, rax
lea rax, [rbp-144]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L30
mov rbx, rax
lea rax, [rbp-112]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L34
mov rbx, rax
lea rax, [rbp-80]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L36
mov rbx, rax
.L36:
lea rax, [rbp-368]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L34
mov rbx, rax
.L34:
lea rax, [rbp-336]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L30
mov rbx, rax
.L30:
lea rax, [rbp-304]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
jmp .L37
mov rbx, rax
.L37:
lea rax, [rbp-272]
mov rdi, rax
call std::vector<int, std::allocator<int> >::~vector() [complete object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
.L48:
add rsp, 392
pop rbx
pop r12
pop r13
pop rbp
ret
std::vector<int, std::allocator<int> >::begin():
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::__normal_iterator(int* const&)
mov rax, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::__normal_iterator<int*>(__gnu_cxx::__normal_iterator<int*, __gnu_cxx::__enable_if<std::__are_same<int*, int*>::__value, std::vector<int, std::allocator<int> > >::__type> const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
nop
leave
ret
std::vector<int, std::allocator<int> >::end():
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov rax, QWORD PTR [rbp-24]
lea rdx, [rax+8]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::__normal_iterator(int* const&)
mov rax, QWORD PTR [rbp-8]
leave
ret
bool __gnu_cxx::operator< <int const*, int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::base() const
mov rbx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
cmp rbx, rax
setb al
mov rbx, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::operator++(int):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov DWORD PTR [rbp-28], esi
mov rax, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rax]
lea rcx, [rax+4]
mov rdx, QWORD PTR [rbp-24]
mov QWORD PTR [rdx], rcx
mov QWORD PTR [rbp-8], rax
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::__normal_iterator(int const* const&)
mov rax, QWORD PTR [rbp-16]
leave
ret
__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::operator*() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
pop rbp
ret
std::allocator<int>::allocator() [base object constructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call __gnu_cxx::new_allocator<int>::new_allocator() [base object constructor]
nop
leave
ret
std::allocator<int>::~allocator() [base object destructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call __gnu_cxx::new_allocator<int>::~new_allocator() [base object destructor]
nop
leave
ret
std::vector<int, std::allocator<int> >::vector(std::initializer_list<int>, std::allocator<int> const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov rax, rsi
mov rsi, rdx
mov rdx, rsi
mov QWORD PTR [rbp-64], rax
mov QWORD PTR [rbp-56], rdx
mov QWORD PTR [rbp-48], rcx
mov rax, QWORD PTR [rbp-40]
mov rdx, QWORD PTR [rbp-48]
mov rsi, rdx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_base(std::allocator<int> const&)
lea rax, [rbp-64]
mov rdi, rax
call std::initializer_list<int>::end() const
mov rbx, rax
lea rax, [rbp-64]
mov rdi, rax
call std::initializer_list<int>::begin() const
mov rcx, rax
mov rax, QWORD PTR [rbp-40]
mov rdx, rbx
mov rsi, rcx
mov rdi, rax
call void std::vector<int, std::allocator<int> >::_M_range_initialize<int const*>(int const*, int const*, std::forward_iterator_tag)
jmp .L65
mov rbx, rax
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::~_Vector_base() [base object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
.L65:
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::vector<int, std::allocator<int> >::~vector() [base object destructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rdx, rax
mov rax, QWORD PTR [rbp-8]
mov rcx, QWORD PTR [rax+8]
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
mov rsi, rcx
mov rdi, rax
call void std::_Destroy<int*, int>(int*, int*, std::allocator<int>&)
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::~_Vector_base() [base object destructor]
nop
leave
ret
std::vector<int, std::allocator<int> >::vector(std::vector<int, std::allocator<int> > const&):
push rbp
mov rbp, rsp
push r13
push r12
push rbx
sub rsp, 40
mov QWORD PTR [rbp-56], rdi
mov QWORD PTR [rbp-64], rsi
mov rbx, QWORD PTR [rbp-56]
mov rax, QWORD PTR [rbp-64]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator() const
mov rdx, rax
lea rax, [rbp-33]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__alloc_traits<std::allocator<int>, int>::_S_select_on_copy(std::allocator<int> const&)
mov rax, QWORD PTR [rbp-64]
mov rdi, rax
call std::vector<int, std::allocator<int> >::size() const
mov rcx, rax
lea rax, [rbp-33]
mov rdx, rax
mov rsi, rcx
mov rdi, rbx
call std::_Vector_base<int, std::allocator<int> >::_Vector_base(unsigned long, std::allocator<int> const&)
lea rax, [rbp-33]
mov rdi, rax
call std::allocator<int>::~allocator() [complete object destructor]
mov rax, QWORD PTR [rbp-56]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov r13, rax
mov rax, QWORD PTR [rbp-56]
mov rbx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-64]
mov rdi, rax
call std::vector<int, std::allocator<int> >::end() const
mov r12, rax
mov rax, QWORD PTR [rbp-64]
mov rdi, rax
call std::vector<int, std::allocator<int> >::begin() const
mov rcx, r13
mov rdx, rbx
mov rsi, r12
mov rdi, rax
call int* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*, int>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*, std::allocator<int>&)
mov rdx, QWORD PTR [rbp-56]
mov QWORD PTR [rdx+8], rax
jmp .L72
mov rbx, rax
lea rax, [rbp-33]
mov rdi, rax
call std::allocator<int>::~allocator() [complete object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
mov rbx, rax
mov rax, QWORD PTR [rbp-56]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::~_Vector_base() [base object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
.L72:
add rsp, 40
pop rbx
pop r12
pop r13
pop rbp
ret
void std::sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, main::{lambda(int, int)#1}>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, main::{lambda(int, int)#1}, main::{lambda(int, int)#1}):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
call __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> __gnu_cxx::__ops::__iter_comp_iter<main::{lambda(int, int)#1}>(__gnu_cxx::__ops::_Iter_comp_iter)
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::__sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
nop
leave
ret
void std::sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, bool (*)(int, int)>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, bool (*)(int, int)):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> __gnu_cxx::__ops::__iter_comp_iter<bool (*)(int, int)>(bool (*)(int, int))
mov rdx, rax
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
nop
leave
ret
std::_Vector_base<int, std::allocator<int> >::_Vector_impl::_Vector_impl() [base object constructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::allocator<int>::allocator() [base object constructor]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_impl_data::_Vector_impl_data() [base object constructor]
nop
leave
ret
std::_Vector_base<int, std::allocator<int> >::~_Vector_base() [base object destructor]:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rax+16]
mov rax, QWORD PTR [rbp-8]
mov rcx, QWORD PTR [rax]
mov rax, rdx
sub rax, rcx
sar rax, 2
mov rdx, rax
mov rax, QWORD PTR [rbp-8]
mov rcx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned long)
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl() [complete object destructor]
nop
leave
ret
bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rbx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
cmp rbx, rax
setne al
mov rbx, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++():
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
lea rdx, [rax+4]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
pop rbp
ret
std::vector<int, std::allocator<int> >::push_back(int const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rax+8]
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax+16]
cmp rdx, rax
je .L84
mov rax, QWORD PTR [rbp-8]
mov rcx, QWORD PTR [rax+8]
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rbp-16]
mov rsi, rcx
mov rdi, rax
call void std::allocator_traits<std::allocator<int> >::construct<int, int const&>(std::allocator<int>&, int*, int const&)
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax+8]
lea rdx, [rax+4]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax+8], rdx
jmp .L86
.L84:
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::vector<int, std::allocator<int> >::end()
mov rcx, rax
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::vector<int, std::allocator<int> >::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int const&)
.L86:
nop
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::__normal_iterator(int* const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
nop
pop rbp
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::base() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::__normal_iterator(int const* const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
nop
pop rbp
ret
__gnu_cxx::new_allocator<int>::new_allocator() [base object constructor]:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
nop
pop rbp
ret
__gnu_cxx::new_allocator<int>::~new_allocator() [base object destructor]:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
nop
pop rbp
ret
std::_Vector_base<int, std::allocator<int> >::_Vector_base(std::allocator<int> const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rbp-16]
mov rsi, rdx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_impl::_Vector_impl(std::allocator<int> const&)
nop
leave
ret
std::initializer_list<int>::begin() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
pop rbp
ret
std::initializer_list<int>::end() const:
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call std::initializer_list<int>::begin() const
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call std::initializer_list<int>::size() const
sal rax, 2
add rax, rbx
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::vector<int, std::allocator<int> >::_M_range_initialize<int const*>(int const*, int const*, std::forward_iterator_tag):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
mov rdx, QWORD PTR [rbp-56]
mov rax, QWORD PTR [rbp-48]
mov rsi, rdx
mov rdi, rax
call std::iterator_traits<int const*>::difference_type std::distance<int const*>(int const*, int const*)
mov QWORD PTR [rbp-24], rax
mov rbx, QWORD PTR [rbp-40]
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rdx, rax
mov rax, QWORD PTR [rbp-24]
mov rsi, rdx
mov rdi, rax
call std::vector<int, std::allocator<int> >::_S_check_init_len(unsigned long, std::allocator<int> const&)
mov rsi, rax
mov rdi, rbx
call std::_Vector_base<int, std::allocator<int> >::_M_allocate(unsigned long)
mov rdx, QWORD PTR [rbp-40]
mov QWORD PTR [rdx], rax
mov rax, QWORD PTR [rbp-40]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-24]
sal rax, 2
add rdx, rax
mov rax, QWORD PTR [rbp-40]
mov QWORD PTR [rax+16], rdx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rcx, rax
mov rax, QWORD PTR [rbp-40]
mov rdx, QWORD PTR [rax]
mov rsi, QWORD PTR [rbp-56]
mov rax, QWORD PTR [rbp-48]
mov rdi, rax
call int* std::__uninitialized_copy_a<int const*, int*, int>(int const*, int const*, int*, std::allocator<int>&)
mov rdx, QWORD PTR [rbp-40]
mov QWORD PTR [rdx+8], rax
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator():
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
void std::_Destroy<int*, int>(int*, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::_Destroy<int*>(int*, int*)
nop
leave
ret
std::vector<int, std::allocator<int> >::size() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rax+8]
mov rax, QWORD PTR [rbp-8]
mov rcx, QWORD PTR [rax]
mov rax, rdx
sub rax, rcx
sar rax, 2
pop rbp
ret
__gnu_cxx::__alloc_traits<std::allocator<int>, int>::_S_select_on_copy(std::allocator<int> const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rbp-16]
mov rsi, rdx
mov rdi, rax
call std::allocator_traits<std::allocator<int> >::select_on_container_copy_construction(std::allocator<int> const&)
mov rax, QWORD PTR [rbp-8]
leave
ret
std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
std::_Vector_base<int, std::allocator<int> >::_Vector_base(unsigned long, std::allocator<int> const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-24]
mov rdx, QWORD PTR [rbp-40]
mov rsi, rdx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_impl::_Vector_impl(std::allocator<int> const&)
mov rdx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rdx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_create_storage(unsigned long)
jmp .L113
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_impl::~_Vector_impl() [complete object destructor]
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
.L113:
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::vector<int, std::allocator<int> >::begin() const:
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::__normal_iterator(int const* const&)
mov rax, QWORD PTR [rbp-8]
leave
ret
std::vector<int, std::allocator<int> >::end() const:
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov rax, QWORD PTR [rbp-24]
lea rdx, [rax+8]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::__normal_iterator(int const* const&)
mov rax, QWORD PTR [rbp-8]
leave
ret
int* std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*, int>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::uninitialized_copy<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*)
leave
ret
__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> __gnu_cxx::__ops::__iter_comp_iter<main::{lambda(int, int)#1}>(__gnu_cxx::__ops::_Iter_comp_iter):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
lea rax, [rbp-33]
mov rdi, rax
call std::remove_reference<main::{lambda(int, int)#1}&>::type&& std::move<main::{lambda(int, int)#1}&>(std::remove_reference&&)
lea rax, [rbp-17]
mov rdi, rax
call __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::_Iter_comp_iter({lambda(int, int)#1})
nop
mov eax, ebx
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
lea rdx, [rbp-16]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L124
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov rdi, rax
call std::__lg(long)
lea rdx, [rax+rax]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__introsort_loop<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, long, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
.L124:
nop
leave
ret
__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> __gnu_cxx::__ops::__iter_comp_iter<bool (*)(int, int)>(bool (*)(int, int)):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
lea rax, [rbp-24]
mov rdi, rax
call std::remove_reference<bool (*&)(int, int)>::type&& std::move<bool (*&)(int, int)>(bool (*&)(int, int))
mov rdx, QWORD PTR [rax]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::_Iter_comp_iter(bool (*)(int, int))
mov rax, QWORD PTR [rbp-8]
leave
ret
void std::__sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
lea rdx, [rbp-16]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L129
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov rdi, rax
call std::__lg(long)
lea rdi, [rax+rax]
mov rdx, QWORD PTR [rbp-24]
mov rsi, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rcx, rdx
mov rdx, rdi
mov rdi, rax
call void std::__introsort_loop<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
.L129:
nop
leave
ret
std::_Vector_base<int, std::allocator<int> >::_Vector_impl_data::_Vector_impl_data() [base object constructor]:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], 0
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax+8], 0
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax+16], 0
nop
pop rbp
ret
std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned long):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
cmp QWORD PTR [rbp-16], 0
je .L133
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rsi, rcx
mov rdi, rax
call std::allocator_traits<std::allocator<int> >::deallocate(std::allocator<int>&, int*, unsigned long)
.L133:
nop
leave
ret
void std::allocator_traits<std::allocator<int> >::construct<int, int const&>(std::allocator<int>&, int*, int const&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call int const& std::forward<int const&>(std::remove_reference<int const&>::type&)
mov rdx, rax
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void __gnu_cxx::new_allocator<int>::construct<int, int const&>(int*, int const&)
nop
leave
ret
std::vector<int, std::allocator<int> >::_S_use_relocate():
push rbp
mov rbp, rsp
sub rsp, 16
call std::vector<int, std::allocator<int> >::_S_nothrow_relocate(std::integral_constant<bool, true>)
leave
ret
std::vector<int, std::allocator<int> >::_S_nothrow_relocate(std::integral_constant<bool, true>):
push rbp
mov rbp, rsp
mov eax, 1
pop rbp
ret
.LC1:
.string "vector::_M_realloc_insert"
void std::vector<int, std::allocator<int> >::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 104
mov QWORD PTR [rbp-88], rdi
mov QWORD PTR [rbp-96], rsi
mov QWORD PTR [rbp-104], rdx
mov rax, QWORD PTR [rbp-88]
mov edx, OFFSET FLAT:.LC1
mov esi, 1
mov rdi, rax
call std::vector<int, std::allocator<int> >::_M_check_len(unsigned long, char const*) const
mov QWORD PTR [rbp-32], rax
mov rax, QWORD PTR [rbp-88]
mov rax, QWORD PTR [rax]
mov QWORD PTR [rbp-40], rax
mov rax, QWORD PTR [rbp-88]
mov rax, QWORD PTR [rax+8]
mov QWORD PTR [rbp-48], rax
mov rax, QWORD PTR [rbp-88]
mov rdi, rax
call std::vector<int, std::allocator<int> >::begin()
mov QWORD PTR [rbp-72], rax
lea rdx, [rbp-72]
lea rax, [rbp-96]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov QWORD PTR [rbp-56], rax
mov rax, QWORD PTR [rbp-88]
mov rdx, QWORD PTR [rbp-32]
mov rsi, rdx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_allocate(unsigned long)
mov QWORD PTR [rbp-64], rax
mov rax, QWORD PTR [rbp-64]
mov QWORD PTR [rbp-24], rax
mov rax, QWORD PTR [rbp-104]
mov rdi, rax
call int const& std::forward<int const&>(std::remove_reference<int const&>::type&)
mov rdx, rax
mov rax, QWORD PTR [rbp-56]
lea rcx, [0+rax*4]
mov rax, QWORD PTR [rbp-64]
add rcx, rax
mov rax, QWORD PTR [rbp-88]
mov rsi, rcx
mov rdi, rax
call void std::allocator_traits<std::allocator<int> >::construct<int, int const&>(std::allocator<int>&, int*, int const&)
mov QWORD PTR [rbp-24], 0
call std::vector<int, std::allocator<int> >::_S_use_relocate()
test al, al
je .L140
mov rax, QWORD PTR [rbp-88]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rbx, rax
lea rax, [rbp-96]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rsi, QWORD PTR [rax]
mov rdx, QWORD PTR [rbp-64]
mov rax, QWORD PTR [rbp-40]
mov rcx, rbx
mov rdi, rax
call std::vector<int, std::allocator<int> >::_S_relocate(int*, int*, int*, std::allocator<int>&)
mov QWORD PTR [rbp-24], rax
add QWORD PTR [rbp-24], 4
mov rax, QWORD PTR [rbp-88]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rbx, rax
lea rax, [rbp-96]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
mov rdx, QWORD PTR [rbp-24]
mov rsi, QWORD PTR [rbp-48]
mov rcx, rbx
mov rdi, rax
call std::vector<int, std::allocator<int> >::_S_relocate(int*, int*, int*, std::allocator<int>&)
mov QWORD PTR [rbp-24], rax
jmp .L141
.L140:
mov rax, QWORD PTR [rbp-88]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rbx, rax
lea rax, [rbp-96]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rsi, QWORD PTR [rax]
mov rdx, QWORD PTR [rbp-64]
mov rax, QWORD PTR [rbp-40]
mov rcx, rbx
mov rdi, rax
call int* std::__uninitialized_move_if_noexcept_a<int*, int*, std::allocator<int> >(int*, int*, int*, std::allocator<int>&)
mov QWORD PTR [rbp-24], rax
add QWORD PTR [rbp-24], 4
mov rax, QWORD PTR [rbp-88]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rbx, rax
lea rax, [rbp-96]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
mov rdx, QWORD PTR [rbp-24]
mov rsi, QWORD PTR [rbp-48]
mov rcx, rbx
mov rdi, rax
call int* std::__uninitialized_move_if_noexcept_a<int*, int*, std::allocator<int> >(int*, int*, int*, std::allocator<int>&)
mov QWORD PTR [rbp-24], rax
.L141:
call std::vector<int, std::allocator<int> >::_S_use_relocate()
xor eax, 1
test al, al
je .L142
mov rax, QWORD PTR [rbp-88]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rdx, rax
mov rcx, QWORD PTR [rbp-48]
mov rax, QWORD PTR [rbp-40]
mov rsi, rcx
mov rdi, rax
call void std::_Destroy<int*, int>(int*, int*, std::allocator<int>&)
.L142:
mov rax, QWORD PTR [rbp-88]
mov rdx, QWORD PTR [rbp-88]
mov rdx, QWORD PTR [rdx+16]
sub rdx, QWORD PTR [rbp-40]
sar rdx, 2
mov rcx, QWORD PTR [rbp-40]
mov rsi, rcx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned long)
mov rax, QWORD PTR [rbp-88]
mov rdx, QWORD PTR [rbp-64]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR [rbp-88]
mov rdx, QWORD PTR [rbp-24]
mov QWORD PTR [rax+8], rdx
mov rax, QWORD PTR [rbp-32]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-64]
add rdx, rax
mov rax, QWORD PTR [rbp-88]
mov QWORD PTR [rax+16], rdx
jmp .L149
mov rdi, rax
call __cxa_begin_catch
cmp QWORD PTR [rbp-24], 0
jne .L144
mov rax, QWORD PTR [rbp-56]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-64]
add rdx, rax
mov rax, QWORD PTR [rbp-88]
mov rsi, rdx
mov rdi, rax
call void std::allocator_traits<std::allocator<int> >::destroy<int>(std::allocator<int>&, int*)
jmp .L145
.L144:
mov rax, QWORD PTR [rbp-88]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator()
mov rdx, rax
mov rcx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-64]
mov rsi, rcx
mov rdi, rax
call void std::_Destroy<int*, int>(int*, int*, std::allocator<int>&)
.L145:
mov rax, QWORD PTR [rbp-88]
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-64]
mov rsi, rcx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_deallocate(int*, unsigned long)
call __cxa_rethrow
mov rbx, rax
call __cxa_end_catch
mov rax, rbx
mov rdi, rax
call _Unwind_Resume
.L149:
mov rbx, QWORD PTR [rbp-8]
leave
ret

std::_Vector_base<int, std::allocator<int> >::_Vector_impl::_Vector_impl(std::allocator<int> const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call std::allocator<int>::allocator(std::allocator<int> const&)
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_Vector_impl_data::_Vector_impl_data() [base object constructor]
nop
leave
ret
std::initializer_list<int>::size() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax+8]
pop rbp
ret
std::iterator_traits<int const*>::difference_type std::distance<int const*>(int const*, int const*):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
lea rax, [rbp-8]
mov rdi, rax
call std::iterator_traits<int const*>::iterator_category std::__iterator_category<int const*>(int const* const&)
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rbp-16]
mov rsi, rdx
mov rdi, rax
call std::iterator_traits<int const*>::difference_type std::__distance<int const*>(int const*, int const*, std::random_access_iterator_tag)
leave
ret
.LC2:
.string "cannot create std::vector larger than max_size()"
std::vector<int, std::allocator<int> >::_S_check_init_len(unsigned long, std::allocator<int> const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov rdx, QWORD PTR [rbp-48]
lea rax, [rbp-17]
mov rsi, rdx
mov rdi, rax
call std::allocator<int>::allocator(std::allocator<int> const&)
lea rax, [rbp-17]
mov rdi, rax
call std::vector<int, std::allocator<int> >::_S_max_size(std::allocator<int> const&)
cmp QWORD PTR [rbp-40], rax
seta bl
lea rax, [rbp-17]
mov rdi, rax
call std::allocator<int>::~allocator() [complete object destructor]
test bl, bl
je .L156
mov edi, OFFSET FLAT:.LC2
call std::__throw_length_error(char const*)
.L156:
mov rax, QWORD PTR [rbp-40]
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::_Vector_base<int, std::allocator<int> >::_M_allocate(unsigned long):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
cmp QWORD PTR [rbp-16], 0
je .L159
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rbp-16]
mov rsi, rdx
mov rdi, rax
call std::allocator_traits<std::allocator<int> >::allocate(std::allocator<int>&, unsigned long)
jmp .L161
.L159:
mov eax, 0
.L161:
leave
ret
int* std::__uninitialized_copy_a<int const*, int*, int>(int const*, int const*, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::uninitialized_copy<int const*, int*>(int const*, int const*, int*)
leave
ret
void std::_Destroy<int*>(int*, int*):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::_Destroy_aux<true>::__destroy<int*>(int*, int*)
nop
leave
ret
std::allocator_traits<std::allocator<int> >::select_on_container_copy_construction(std::allocator<int> const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call std::allocator<int>::allocator(std::allocator<int> const&)
mov rax, QWORD PTR [rbp-8]
leave
ret
std::allocator<int>::allocator(std::allocator<int> const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::new_allocator<int>::new_allocator(__gnu_cxx::new_allocator<int> const&)
nop
leave
ret
std::_Vector_base<int, std::allocator<int> >::_M_create_storage(unsigned long):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_allocate(unsigned long)
mov rdx, QWORD PTR [rbp-8]
mov QWORD PTR [rdx], rax
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax+8], rdx
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-16]
sal rax, 2
add rdx, rax
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax+16], rdx
nop
leave
ret
int* std::uninitialized_copy<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov BYTE PTR [rbp-1], 1
mov rdx, QWORD PTR [rbp-40]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rcx
mov rdi, rax
call int* std::__uninitialized_copy<true>::__uninit_copy<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*)
leave
ret
std::remove_reference<main::{lambda(int, int)#1}&>::type&& std::move<main::{lambda(int, int)#1}&>(std::remove_reference&&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::_Iter_comp_iter({lambda(int, int)#1}):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
lea rax, [rbp-9]
mov rdi, rax
call std::remove_reference<main::{lambda(int, int)#1}&>::type&& std::move<main::{lambda(int, int)#1}&>(std::remove_reference&&)
nop
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rbx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rdx, QWORD PTR [rax]
mov rax, rbx
sub rax, rdx
sar rax, 2
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__introsort_loop<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, long, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
.L179:
lea rdx, [rbp-24]
lea rax, [rbp-32]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 16
setg al
test al, al
je .L176
cmp QWORD PTR [rbp-40], 0
jne .L178
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rcx
mov rdi, rax
call void std::__partial_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
jmp .L176
.L178:
sub QWORD PTR [rbp-40], 1
mov rdx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition_pivot<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
mov QWORD PTR [rbp-8], rax
mov rdx, QWORD PTR [rbp-40]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__introsort_loop<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, long, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rbp-32], rax
jmp .L179
.L176:
leave
ret
void std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 16
setg al
test al, al
je .L181
lea rax, [rbp-8]
mov esi, 16
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rdx, rax
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::__insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
lea rax, [rbp-8]
mov esi, 16
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rdx, rax
mov rax, QWORD PTR [rbp-16]
mov rsi, rax
mov rdi, rdx
call void std::__unguarded_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
jmp .L183
.L181:
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::__insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
.L183:
nop
leave
ret
std::remove_reference<bool (*&)(int, int)>::type&& std::move<bool (*&)(int, int)>(bool (*&)(int, int)):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::_Iter_comp_iter(bool (*)(int, int)):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
lea rax, [rbp-16]
mov rdi, rax
call std::remove_reference<bool (*&)(int, int)>::type&& std::move<bool (*&)(int, int)>(bool (*&)(int, int))
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
nop
leave
ret
void std::__introsort_loop<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov QWORD PTR [rbp-48], rcx
.L190:
lea rdx, [rbp-24]
lea rax, [rbp-32]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 16
setg al
test al, al
je .L187
cmp QWORD PTR [rbp-40], 0
jne .L189
mov rcx, QWORD PTR [rbp-48]
mov rdx, QWORD PTR [rbp-32]
mov rsi, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call void std::__partial_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
jmp .L187
.L189:
sub QWORD PTR [rbp-40], 1
mov rdx, QWORD PTR [rbp-48]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rcx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition_pivot<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
mov QWORD PTR [rbp-8], rax
mov rcx, QWORD PTR [rbp-48]
mov rdx, QWORD PTR [rbp-40]
mov rsi, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call void std::__introsort_loop<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rbp-32], rax
jmp .L190
.L187:
leave
ret
void std::__final_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 16
setg al
test al, al
je .L192
lea rax, [rbp-8]
mov esi, 16
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rcx, rax
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
lea rax, [rbp-8]
mov esi, 16
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rcx, rax
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-16]
mov rsi, rax
mov rdi, rcx
call void std::__unguarded_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
jmp .L194
.L192:
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
.L194:
nop
leave
ret
std::allocator_traits<std::allocator<int> >::deallocate(std::allocator<int>&, int*, unsigned long):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call __gnu_cxx::new_allocator<int>::deallocate(int*, unsigned long)
nop
leave
ret
int const& std::forward<int const&>(std::remove_reference<int const&>::type&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
void __gnu_cxx::new_allocator<int>::construct<int, int const&>(int*, int const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call int const& std::forward<int const&>(std::remove_reference<int const&>::type&)
mov ebx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov rsi, rax
mov edi, 4
call operator new(unsigned long, void*)
mov DWORD PTR [rax], ebx
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::vector<int, std::allocator<int> >::_M_check_len(unsigned long, char const*) const:
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::max_size() const
mov rbx, rax
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::size() const
sub rbx, rax
mov rdx, rbx
mov rax, QWORD PTR [rbp-48]
cmp rdx, rax
setb al
test al, al
je .L200
mov rax, QWORD PTR [rbp-56]
mov rdi, rax
call std::__throw_length_error(char const*)
.L200:
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::size() const
mov rbx, rax
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::size() const
mov QWORD PTR [rbp-32], rax
lea rdx, [rbp-48]
lea rax, [rbp-32]
mov rsi, rdx
mov rdi, rax
call unsigned long const& std::max<unsigned long>(unsigned long const&, unsigned long const&)
mov rax, QWORD PTR [rax]
add rax, rbx
mov QWORD PTR [rbp-24], rax
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::size() const
cmp QWORD PTR [rbp-24], rax
jb .L201
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::max_size() const
cmp QWORD PTR [rbp-24], rax
jbe .L202
.L201:
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call std::vector<int, std::allocator<int> >::max_size() const
jmp .L203
.L202:
mov rax, QWORD PTR [rbp-24]
.L203:
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::vector<int, std::allocator<int> >::_S_relocate(int*, int*, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov rcx, QWORD PTR [rbp-32]
mov rdx, QWORD PTR [rbp-24]
mov rsi, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::vector<int, std::allocator<int> >::_S_do_relocate(int*, int*, int*, std::allocator<int>&, std::integral_constant<bool, true>)
leave
ret
int* std::__uninitialized_move_if_noexcept_a<int*, int*, std::allocator<int> >(int*, int*, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov QWORD PTR [rbp-48], rcx
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call std::move_iterator<int*> std::__make_move_if_noexcept_iterator<int, std::move_iterator<int*> >(int*)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call std::move_iterator<int*> std::__make_move_if_noexcept_iterator<int, std::move_iterator<int*> >(int*)
mov rdi, rax
mov rdx, QWORD PTR [rbp-48]
mov rax, QWORD PTR [rbp-40]
mov rcx, rdx
mov rdx, rax
mov rsi, rbx
call int* std::__uninitialized_copy_a<std::move_iterator<int*>, int*, int>(std::move_iterator<int*>, std::move_iterator<int*>, int*, std::allocator<int>&)
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::allocator_traits<std::allocator<int> >::destroy<int>(std::allocator<int>&, int*):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void __gnu_cxx::new_allocator<int>::destroy<int>(int*)
nop
leave
ret
std::iterator_traits<int const*>::iterator_category std::__iterator_category<int const*>(int const* const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
nop
pop rbp
ret
std::iterator_traits<int const*>::difference_type std::__distance<int const*>(int const*, int const*, std::random_access_iterator_tag):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
sub rax, QWORD PTR [rbp-8]
sar rax, 2
pop rbp
ret
std::vector<int, std::allocator<int> >::_S_max_size(std::allocator<int> const&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
movabs rax, 2305843009213693951
mov QWORD PTR [rbp-8], rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call std::allocator_traits<std::allocator<int> >::max_size(std::allocator<int> const&)
mov QWORD PTR [rbp-16], rax
lea rdx, [rbp-16]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call unsigned long const& std::min<unsigned long>(unsigned long const&, unsigned long const&)
mov rax, QWORD PTR [rax]
leave
ret
std::allocator_traits<std::allocator<int> >::allocate(std::allocator<int>&, unsigned long):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov edx, 0
mov rsi, rcx
mov rdi, rax
call __gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*)
leave
ret
int* std::uninitialized_copy<int const*, int*>(int const*, int const*, int*):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov BYTE PTR [rbp-1], 1
mov rdx, QWORD PTR [rbp-40]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rcx
mov rdi, rax
call int* std::__uninitialized_copy<true>::__uninit_copy<int const*, int*>(int const*, int const*, int*)
leave
ret
void std::_Destroy_aux<true>::__destroy<int*>(int*, int*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
nop
pop rbp
ret
__gnu_cxx::new_allocator<int>::new_allocator(__gnu_cxx::new_allocator<int> const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
nop
pop rbp
ret
int* std::__uninitialized_copy<true>::__uninit_copy<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::copy<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*)
leave
ret
void std::__partial_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__heap_select<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
lea rdx, [rbp-25]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__sort_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&)
nop
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition_pivot<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov rdx, rax
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-24], rax
lea rax, [rbp-48]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator-(long) const
mov rbx, rax
lea rax, [rbp-40]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rsi, rax
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov rcx, rbx
mov rdi, rax
call void std::__move_median_to_first<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
lea rax, [rbp-40]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rcx, rax
mov rdx, QWORD PTR [rbp-40]
mov rax, QWORD PTR [rbp-48]
mov rsi, rax
mov rdi, rcx
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
mov rbx, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const:
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
sal rax, 2
add rax, rdx
mov QWORD PTR [rbp-8], rax
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::__normal_iterator(int* const&)
mov rax, QWORD PTR [rbp-16]
leave
ret
void std::__insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
lea rdx, [rbp-48]
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator==<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
jne .L236
lea rax, [rbp-40]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-24], rax
.L235:
lea rdx, [rbp-48]
lea rax, [rbp-24]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L229
mov rdx, QWORD PTR [rbp-40]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-49]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L233
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-28], eax
lea rax, [rbp-24]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rdx, rax
mov rcx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov rsi, rcx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::move_backward<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
lea rax, [rbp-28]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
jmp .L234
.L233:
call __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}> __gnu_cxx::__ops::__val_comp_iter<main::{lambda(int, int)#1}>(__gnu_cxx::__ops::_Iter_comp_iter<__gnu_cxx::__ops::_Val_comp_iter>)
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}>)
.L234:
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L235
.L236:
nop
.L229:
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__unguarded_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rbp-8], rax
.L239:
lea rdx, [rbp-32]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L240
call __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}> __gnu_cxx::__ops::__val_comp_iter<main::{lambda(int, int)#1}>(__gnu_cxx::__ops::_Iter_comp_iter<__gnu_cxx::__ops::_Val_comp_iter>)
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}>)
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L239
.L240:
nop
leave
ret
void std::__partial_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov rcx, QWORD PTR [rbp-32]
mov rdx, QWORD PTR [rbp-24]
mov rsi, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call void std::__heap_select<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
lea rdx, [rbp-32]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call void std::__sort_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&)
nop
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition_pivot<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov rdx, rax
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-24], rax
lea rax, [rbp-48]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator-(long) const
mov rbx, rax
lea rax, [rbp-40]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rsi, rax
mov rcx, QWORD PTR [rbp-56]
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov r8, rcx
mov rcx, rbx
mov rdi, rax
call void std::__move_median_to_first<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
lea rax, [rbp-40]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rdi, rax
mov rcx, QWORD PTR [rbp-56]
mov rdx, QWORD PTR [rbp-40]
mov rax, QWORD PTR [rbp-48]
mov rsi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
lea rdx, [rbp-48]
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator==<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
jne .L251
lea rax, [rbp-40]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-24], rax
.L250:
lea rdx, [rbp-48]
lea rax, [rbp-24]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L244
mov rdx, QWORD PTR [rbp-40]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-56]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L248
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-28], eax
lea rax, [rbp-24]
mov esi, 1
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rdx, rax
mov rcx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov rsi, rcx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::move_backward<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
lea rax, [rbp-28]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
jmp .L249
.L248:
mov rax, QWORD PTR [rbp-56]
mov rdi, rax
call __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)> __gnu_cxx::__ops::__val_comp_iter<bool (*)(int, int)>(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
mov rdx, rax
mov rax, QWORD PTR [rbp-24]
mov rsi, rdx
mov rdi, rax
call void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>)
.L249:
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L250
.L251:
nop
.L244:
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__unguarded_insertion_sort<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rbp-8], rax
.L254:
lea rdx, [rbp-32]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator!=<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L255
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)> __gnu_cxx::__ops::__val_comp_iter<bool (*)(int, int)>(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
mov rdx, rax
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>)
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L254
.L255:
nop
leave
ret
__gnu_cxx::new_allocator<int>::deallocate(int*, unsigned long):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rax, QWORD PTR [rbp-24]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-16]
mov rsi, rdx
mov rdi, rax
call operator delete(void*, unsigned long)
nop
leave
ret
std::vector<int, std::allocator<int> >::max_size() const:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call std::_Vector_base<int, std::allocator<int> >::_M_get_Tp_allocator() const
mov rdi, rax
call std::vector<int, std::allocator<int> >::_S_max_size(std::allocator<int> const&)
leave
ret
unsigned long const& std::max<unsigned long>(unsigned long const&, unsigned long const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-8]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rax]
cmp rdx, rax
jnb .L260
mov rax, QWORD PTR [rbp-16]
jmp .L261
.L260:
mov rax, QWORD PTR [rbp-8]
.L261:
pop rbp
ret
std::vector<int, std::allocator<int> >::_S_do_relocate(int*, int*, int*, std::allocator<int>&, std::integral_constant<bool, true>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov rcx, QWORD PTR [rbp-32]
mov rdx, QWORD PTR [rbp-24]
mov rsi, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call int* std::__relocate_a<int*, int*, std::allocator<int> >(int*, int*, int*, std::allocator<int>&)
leave
ret
std::move_iterator<int*> std::__make_move_if_noexcept_iterator<int, std::move_iterator<int*> >(int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call std::move_iterator<int*>::move_iterator(int*)
mov rax, QWORD PTR [rbp-8]
leave
ret
int* std::__uninitialized_copy_a<std::move_iterator<int*>, int*, int>(std::move_iterator<int*>, std::move_iterator<int*>, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::uninitialized_copy<std::move_iterator<int*>, int*>(std::move_iterator<int*>, std::move_iterator<int*>, int*)
leave
ret
void __gnu_cxx::new_allocator<int>::destroy<int>(int*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
nop
pop rbp
ret
std::allocator_traits<std::allocator<int> >::max_size(std::allocator<int> const&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call __gnu_cxx::new_allocator<int>::max_size() const
leave
ret
unsigned long const& std::min<unsigned long>(unsigned long const&, unsigned long const&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
cmp rdx, rax
jnb .L272
mov rax, QWORD PTR [rbp-16]
jmp .L273
.L272:
mov rax, QWORD PTR [rbp-8]
.L273:
pop rbp
ret
__gnu_cxx::new_allocator<int>::allocate(unsigned long, void const*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call __gnu_cxx::new_allocator<int>::_M_max_size() const
cmp QWORD PTR [rbp-16], rax
seta al
test al, al
je .L275
call std::__throw_bad_alloc()
.L275:
mov rax, QWORD PTR [rbp-16]
sal rax, 2
mov rdi, rax
call operator new(unsigned long)
leave
ret
int* std::__uninitialized_copy<true>::__uninit_copy<int const*, int*>(int const*, int const*, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::copy<int const*, int*>(int const*, int const*, int*)
leave
ret
int* std::copy<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > std::__miter_base<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > std::__miter_base<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >)
mov rcx, rax
mov rax, QWORD PTR [rbp-40]
mov rdx, rax
mov rsi, rbx
mov rdi, rcx
call int* std::__copy_move_a<false, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*)
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__heap_select<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
lea rdx, [rbp-41]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rcx
mov rdi, rax
call void std::__make_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&)
mov rax, QWORD PTR [rbp-32]
mov QWORD PTR [rbp-8], rax
.L284:
lea rdx, [rbp-40]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator< <int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L285
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-8]
lea rax, [rbp-41]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L283
lea rcx, [rbp-41]
mov rdx, QWORD PTR [rbp-8]
mov rsi, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call void std::__pop_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&)
.L283:
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L284
.L285:
nop
leave
ret
void std::__sort_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
.L288:
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 1
setg al
test al, al
je .L289
lea rax, [rbp-16]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
mov rcx, QWORD PTR [rbp-24]
mov rdx, QWORD PTR [rbp-16]
mov rsi, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call void std::__pop_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&)
jmp .L288
.L289:
nop
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator-(long) const:
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
sal rax, 2
neg rax
add rax, rdx
mov QWORD PTR [rbp-8], rax
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::__normal_iterator(int* const&)
mov rax, QWORD PTR [rbp-16]
leave
ret
bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rbx, QWORD PTR [rbp-24]
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov r12d, DWORD PTR [rax]
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov eax, DWORD PTR [rax]
mov edx, r12d
mov esi, eax
mov rdi, rbx
call main::{lambda(int, int)#1}::operator()(int, int) const
add rsp, 32
pop rbx
pop r12
pop rbp
ret
void std::__move_median_to_first<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
lea rax, [rbp-33]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L295
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-33]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L296
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L301
.L296:
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-16]
lea rax, [rbp-33]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L298
mov rdx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L301
.L298:
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L301
.L295:
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-16]
lea rax, [rbp-33]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L299
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L301
.L299:
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-33]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L300
mov rdx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L301
.L300:
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
.L301:
nop
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
.L304:
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-8]
lea rax, [rbp-25]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L303
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L304
.L303:
lea rax, [rbp-16]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
.L306:
mov rdx, QWORD PTR [rbp-16]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-25]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L305
lea rax, [rbp-16]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
jmp .L306
.L305:
lea rdx, [rbp-16]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator< <int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
xor eax, 1
test al, al
je .L307
mov rax, QWORD PTR [rbp-8]
jmp .L309
.L307:
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L304
.L309:
leave
ret
bool __gnu_cxx::operator==<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rbx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
cmp rbx, rax
sete al
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::remove_reference<int&>::type&& std::move<int&>(int&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::move_backward<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__miter_base<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__miter_base<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
mov rcx, rax
mov rax, QWORD PTR [rbp-40]
mov rdx, rax
mov rsi, rbx
mov rdi, rcx
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__copy_move_backward_a<true, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
mov rbx, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}> __gnu_cxx::__ops::__val_comp_iter<main::{lambda(int, int)#1}>(__gnu_cxx::__ops::_Iter_comp_iter<__gnu_cxx::__ops::_Val_comp_iter>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
lea rax, [rbp-33]
mov rdi, rax
call std::remove_reference<__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&>::type&& std::move<__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&>(std::remove_reference&&)
mov rdx, rax
lea rax, [rbp-17]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}>::_Val_comp_iter(__gnu_cxx::__ops::_Iter_comp_iter<{lambda(int, int)#1}>&&)
nop
mov eax, ebx
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-40], rdi
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-20], eax
mov rax, QWORD PTR [rbp-40]
mov QWORD PTR [rbp-32], rax
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
.L320:
mov rdx, QWORD PTR [rbp-32]
lea rcx, [rbp-20]
lea rax, [rbp-41]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}>::operator()<int, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(int&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L319
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-32]
mov QWORD PTR [rbp-40], rax
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
jmp .L320
.L319:
lea rax, [rbp-20]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__heap_select<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov QWORD PTR [rbp-48], rcx
lea rdx, [rbp-48]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rcx
mov rdi, rax
call void std::__make_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&)
mov rax, QWORD PTR [rbp-32]
mov QWORD PTR [rbp-8], rax
.L324:
lea rdx, [rbp-40]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator< <int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
test al, al
je .L325
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-8]
lea rax, [rbp-48]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L323
lea rcx, [rbp-48]
mov rdx, QWORD PTR [rbp-8]
mov rsi, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call void std::__pop_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&)
.L323:
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L324
.L325:
nop
leave
ret
void std::__sort_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
.L328:
lea rdx, [rbp-8]
lea rax, [rbp-16]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 1
setg al
test al, al
je .L329
lea rax, [rbp-16]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
mov rcx, QWORD PTR [rbp-24]
mov rdx, QWORD PTR [rbp-16]
mov rsi, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call void std::__pop_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&)
jmp .L328
.L329:
nop
leave
ret
bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-24]
mov r12, QWORD PTR [rax]
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov ebx, DWORD PTR [rax]
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov eax, DWORD PTR [rax]
mov esi, ebx
mov edi, eax
call r12
add rsp, 32
pop rbx
pop r12
pop rbp
ret
void std::__move_median_to_first<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
mov QWORD PTR [rbp-40], r8
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
lea rax, [rbp-40]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L333
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-40]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L334
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L339
.L334:
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-16]
lea rax, [rbp-40]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L336
mov rdx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L339
.L336:
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L339
.L333:
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-16]
lea rax, [rbp-40]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L337
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L339
.L337:
mov rdx, QWORD PTR [rbp-32]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-40]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L338
mov rdx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
jmp .L339
.L338:
mov rdx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
.L339:
nop
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__unguarded_partition<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov QWORD PTR [rbp-32], rcx
.L342:
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-8]
lea rax, [rbp-32]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L341
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L342
.L341:
lea rax, [rbp-16]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
.L344:
mov rdx, QWORD PTR [rbp-16]
mov rcx, QWORD PTR [rbp-24]
lea rax, [rbp-32]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L343
lea rax, [rbp-16]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
jmp .L344
.L343:
lea rdx, [rbp-16]
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call bool __gnu_cxx::operator< <int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
xor eax, 1
test al, al
je .L345
mov rax, QWORD PTR [rbp-8]
jmp .L347
.L345:
mov rdx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rdx
mov rdi, rax
call void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator++()
jmp .L342
.L347:
leave
ret
__gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)> __gnu_cxx::__ops::__val_comp_iter<bool (*)(int, int)>(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
lea rax, [rbp-24]
mov rdi, rax
call std::remove_reference<__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&>::type&& std::move<__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&>(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&)
mov rdx, rax
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>::_Val_comp_iter(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&&)
mov rax, QWORD PTR [rbp-8]
leave
ret
void std::__unguarded_linear_insert<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-20], eax
mov rax, QWORD PTR [rbp-40]
mov QWORD PTR [rbp-32], rax
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
.L352:
mov rdx, QWORD PTR [rbp-32]
lea rcx, [rbp-20]
lea rax, [rbp-48]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>::operator()<int, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(int&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L351
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-32]
mov QWORD PTR [rbp-40], rax
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--()
jmp .L352
.L351:
lea rax, [rbp-20]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
int* std::__relocate_a<int*, int*, std::allocator<int> >(int*, int*, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov QWORD PTR [rbp-48], rcx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov r12, rax
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov rdi, rax
mov rax, QWORD PTR [rbp-48]
mov rcx, rax
mov rdx, r12
mov rsi, rbx
call std::enable_if<std::__is_bitwise_relocatable<int, void>::value, int*>::type std::__relocate_a_1<int, int>(int*, int*, int*, std::allocator<int>&)
add rsp, 32
pop rbx
pop r12
pop rbp
ret
std::move_iterator<int*>::move_iterator(int*):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
lea rax, [rbp-16]
mov rdi, rax
call std::remove_reference<int*&>::type&& std::move<int*&>(int*&)
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
nop
leave
ret
int* std::uninitialized_copy<std::move_iterator<int*>, int*>(std::move_iterator<int*>, std::move_iterator<int*>, int*):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov BYTE PTR [rbp-1], 1
mov rdx, QWORD PTR [rbp-40]
mov rcx, QWORD PTR [rbp-32]
mov rax, QWORD PTR [rbp-24]
mov rsi, rcx
mov rdi, rax
call int* std::__uninitialized_copy<true>::__uninit_copy<std::move_iterator<int*>, int*>(std::move_iterator<int*>, std::move_iterator<int*>, int*)
leave
ret
__gnu_cxx::new_allocator<int>::max_size() const:
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call __gnu_cxx::new_allocator<int>::_M_max_size() const
leave
ret
__gnu_cxx::new_allocator<int>::_M_max_size() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
movabs rax, 2305843009213693951
pop rbp
ret
int* std::copy<int const*, int*>(int const*, int const*, int*):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call int const* std::__miter_base<int const*>(int const*)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call int const* std::__miter_base<int const*>(int const*)
mov rcx, rax
mov rax, QWORD PTR [rbp-40]
mov rdx, rax
mov rsi, rbx
mov rdi, rcx
call int* std::__copy_move_a<false, int const*, int*>(int const*, int const*, int*)
mov rbx, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > std::__miter_base<__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
int* std::__copy_move_a<false, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >, int*):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov r12, rax
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call int const* std::__niter_base<int const*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call int const* std::__niter_base<int const*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >)
mov rdx, r12
mov rsi, rbx
mov rdi, rax
call int* std::__copy_move_a1<false, int const*, int*>(int const*, int const*, int*)
mov rdx, rax
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call int* std::__niter_wrap<int*>(int* const&, int*)
add rsp, 32
pop rbx
pop r12
pop rbp
ret
void std::__make_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&):
push rbp
mov rbp, rsp
sub rsp, 64
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 1
setle al
test al, al
jne .L373
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov QWORD PTR [rbp-16], rax
mov rax, QWORD PTR [rbp-16]
sub rax, 2
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov QWORD PTR [rbp-8], rax
.L372:
mov rdx, QWORD PTR [rbp-8]
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-24], rax
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-28], eax
lea rax, [rbp-28]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov ecx, DWORD PTR [rax]
mov rdx, QWORD PTR [rbp-16]
mov rsi, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
cmp QWORD PTR [rbp-8], 0
je .L374
sub QWORD PTR [rbp-8], 1
jmp .L372
.L373:
nop
jmp .L368
.L374:
nop
.L368:
leave
ret
bool __gnu_cxx::operator< <int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rbx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
cmp rbx, rax
setb al
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__pop_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
mov QWORD PTR [rbp-64], rcx
lea rax, [rbp-56]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-20], eax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-56]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
lea rax, [rbp-20]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov ebx, DWORD PTR [rax]
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov rdx, rax
mov rax, QWORD PTR [rbp-40]
mov ecx, ebx
mov esi, 0
mov rdi, rax
call void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>)
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator--():
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
lea rdx, [rax-4]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
void std::iter_swap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
push rbx
sub rsp, 24
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rbx, rax
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rsi, rbx
mov rdi, rax
call std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<int> >, std::is_move_constructible<int>, std::is_move_assignable<int> >::value, void>::type std::swap<int>(int&, int&)
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__miter_base<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__copy_move_backward_a<true, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call int* std::__niter_base<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
mov r12, rax
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call int* std::__niter_base<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call int* std::__niter_base<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
mov rdx, r12
mov rsi, rbx
mov rdi, rax
call int* std::__copy_move_backward_a1<true, int*, int*>(int*, int*, int*)
mov rdx, rax
mov rax, QWORD PTR [rbp-40]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__niter_wrap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int*)
add rsp, 32
pop rbx
pop r12
pop rbp
ret
std::remove_reference<__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&>::type&& std::move<__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&>(std::remove_reference&&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}>::_Val_comp_iter(__gnu_cxx::__ops::_Iter_comp_iter<{lambda(int, int)#1}>&&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdi, rax
call std::remove_reference<main::{lambda(int, int)#1}&>::type&& std::move<main::{lambda(int, int)#1}&>(std::remove_reference&&)
nop
leave
ret
bool __gnu_cxx::__ops::_Val_comp_iter<main::{lambda(int, int)#1}>::operator()<int, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(int&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rbx, QWORD PTR [rbp-24]
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov eax, DWORD PTR [rax]
mov esi, eax
mov rdi, rbx
call main::{lambda(int, int)#1}::operator()(int, int) const
mov rbx, QWORD PTR [rbp-8]
leave
ret
void std::__make_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&):
push rbp
mov rbp, rsp
sub rsp, 64
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
cmp rax, 1
setle al
test al, al
jne .L395
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov QWORD PTR [rbp-16], rax
mov rax, QWORD PTR [rbp-16]
sub rax, 2
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov QWORD PTR [rbp-8], rax
.L394:
mov rdx, QWORD PTR [rbp-8]
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-24], rax
lea rax, [rbp-24]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-28], eax
lea rax, [rbp-28]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov ecx, DWORD PTR [rax]
mov rdi, QWORD PTR [rbp-56]
mov rdx, QWORD PTR [rbp-16]
mov rsi, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rbp-40]
mov r8, QWORD PTR [rdi]
mov rdi, rax
call void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, long, int, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
cmp QWORD PTR [rbp-8], 0
je .L396
sub QWORD PTR [rbp-8], 1
jmp .L394
.L395:
nop
jmp .L390
.L396:
nop
.L390:
leave
ret
void std::__pop_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 56
mov QWORD PTR [rbp-40], rdi
mov QWORD PTR [rbp-48], rsi
mov QWORD PTR [rbp-56], rdx
mov QWORD PTR [rbp-64], rcx
lea rax, [rbp-56]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-20], eax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
lea rax, [rbp-56]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
lea rax, [rbp-20]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov ebx, DWORD PTR [rax]
lea rdx, [rbp-40]
lea rax, [rbp-48]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::difference_type __gnu_cxx::operator-<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > const&)
mov rsi, rax
mov rdx, QWORD PTR [rbp-64]
mov rax, QWORD PTR [rbp-40]
mov r8, QWORD PTR [rdx]
mov ecx, ebx
mov rdx, rsi
mov esi, 0
mov rdi, rax
call void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, long, int, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>)
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::remove_reference<__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&>::type&& std::move<__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&>(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
__gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>::_Val_comp_iter(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdi, rax
call std::remove_reference<bool (*&)(int, int)>::type&& std::move<bool (*&)(int, int)>(bool (*&)(int, int))
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
nop
leave
ret
bool __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>::operator()<int, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(int&, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-24]
mov rbx, QWORD PTR [rax]
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov eax, DWORD PTR [rax]
mov esi, edx
mov edi, eax
call rbx
mov rbx, QWORD PTR [rbp-8]
leave
ret
int* std::__niter_base<int*>(int*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
std::enable_if<std::__is_bitwise_relocatable<int, void>::value, int*>::type std::__relocate_a_1<int, int>(int*, int*, int*, std::allocator<int>&):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov QWORD PTR [rbp-48], rcx
mov rax, QWORD PTR [rbp-32]
sub rax, QWORD PTR [rbp-24]
sar rax, 2
mov QWORD PTR [rbp-8], rax
cmp QWORD PTR [rbp-8], 0
jle .L406
mov rax, QWORD PTR [rbp-8]
lea rdx, [0+rax*4]
mov rcx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov rsi, rcx
mov rdi, rax
call memmove
.L406:
mov rax, QWORD PTR [rbp-8]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-40]
add rax, rdx
leave
ret
std::remove_reference<int*&>::type&& std::move<int*&>(int*&):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
int* std::__uninitialized_copy<true>::__uninit_copy<std::move_iterator<int*>, int*>(std::move_iterator<int*>, std::move_iterator<int*>, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::copy<std::move_iterator<int*>, int*>(std::move_iterator<int*>, std::move_iterator<int*>, int*)
leave
ret
int const* std::__miter_base<int const*>(int const*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
int* std::__copy_move_a<false, int const*, int*>(int const*, int const*, int*):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov r12, rax
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call int const* std::__niter_base<int const*>(int const*)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call int const* std::__niter_base<int const*>(int const*)
mov rdx, r12
mov rsi, rbx
mov rdi, rax
call int* std::__copy_move_a1<false, int const*, int*>(int const*, int const*, int*)
mov rdx, rax
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call int* std::__niter_wrap<int*>(int* const&, int*)
add rsp, 32
pop rbx
pop r12
pop rbp
ret
int const* std::__niter_base<int const*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int const*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
leave
ret
int* std::__copy_move_a1<false, int const*, int*>(int const*, int const*, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::__copy_move_a2<false, int const*, int*>(int const*, int const*, int*)
leave
ret
int* std::__niter_wrap<int*>(int* const&, int*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
pop rbp
ret
void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int, __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 104
mov QWORD PTR [rbp-88], rdi
mov QWORD PTR [rbp-96], rsi
mov QWORD PTR [rbp-104], rdx
mov DWORD PTR [rbp-108], ecx
mov rax, QWORD PTR [rbp-96]
mov QWORD PTR [rbp-32], rax
mov rax, QWORD PTR [rbp-96]
mov QWORD PTR [rbp-24], rax
.L425:
mov rax, QWORD PTR [rbp-104]
sub rax, 1
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
cmp QWORD PTR [rbp-24], rax
jge .L423
mov rax, QWORD PTR [rbp-24]
add rax, 1
add rax, rax
mov QWORD PTR [rbp-24], rax
mov rax, QWORD PTR [rbp-24]
lea rdx, [rax-1]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rbx, rax
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rcx, rax
lea rax, [rbp-109]
mov rdx, rbx
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, std::vector<int, std::allocator<int> >)
test al, al
je .L424
sub QWORD PTR [rbp-24], 1
.L424:
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-64], rax
lea rax, [rbp-64]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-96]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-56], rax
lea rax, [rbp-56]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rbp-96], rax
jmp .L425
.L423:
mov rax, QWORD PTR [rbp-104]
and eax, 1
test rax, rax
jne .L426
mov rax, QWORD PTR [rbp-104]
sub rax, 2
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
cmp QWORD PTR [rbp-24], rax
jne .L426
mov rax, QWORD PTR [rbp-24]
add rax, 1
add rax, rax
mov QWORD PTR [rbp-24], rax
mov rax, QWORD PTR [rbp-24]
lea rdx, [rax-1]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-48], rax
lea rax, [rbp-48]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-96]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-40], rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-24]
sub rax, 1
mov QWORD PTR [rbp-96], rax
.L426:
lea rax, [rbp-109]
mov rdi, rax
call std::remove_reference<__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&>::type&& std::move<__gnu_cxx::__ops::_Iter_comp_iter<main::{lambda(int, int)#1}>&>(std::remove_reference&&)
mov rdx, rax
lea rax, [rbp-65]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}>::_Iter_comp_val(__gnu_cxx::__ops::_Iter_comp_iter<{lambda(int, int)#1}>&&)
lea rax, [rbp-108]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov ecx, DWORD PTR [rax]
lea rdi, [rbp-65]
mov rdx, QWORD PTR [rbp-32]
mov rsi, QWORD PTR [rbp-96]
mov rax, QWORD PTR [rbp-88]
mov r8, rdi
mov rdi, rax
call void std::__push_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int, __gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}>&)
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
std::enable_if<std::__and_<std::__not_<std::__is_tuple_like<int> >, std::is_move_constructible<int>, std::is_move_assignable<int> >::value, void>::type std::swap<int>(int&, int&):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov eax, DWORD PTR [rax]
mov DWORD PTR [rbp-4], eax
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-24]
mov DWORD PTR [rax], edx
lea rax, [rbp-4]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov edx, DWORD PTR [rax]
mov rax, QWORD PTR [rbp-32]
mov DWORD PTR [rax], edx
nop
leave
ret
int* std::__niter_base<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
lea rax, [rbp-8]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::base() const
mov rax, QWORD PTR [rax]
leave
ret
int* std::__copy_move_backward_a1<true, int*, int*>(int*, int*, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::__copy_move_backward_a2<true, int*, int*>(int*, int*, int*)
leave
ret
__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > std::__niter_wrap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int*>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int*):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-8]
mov rdi, rax
call int* std::__niter_base<int*, std::vector<int, std::allocator<int> > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
mov rdx, rax
mov rax, QWORD PTR [rbp-16]
sub rax, rdx
sar rax, 2
mov rdx, rax
lea rax, [rbp-8]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
leave
ret
void std::__adjust_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, long, int, __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>):
push rbp
mov rbp, rsp
push rbx
sub rsp, 120
mov QWORD PTR [rbp-88], rdi
mov QWORD PTR [rbp-96], rsi
mov QWORD PTR [rbp-104], rdx
mov DWORD PTR [rbp-108], ecx
mov QWORD PTR [rbp-120], r8
mov rax, QWORD PTR [rbp-96]
mov QWORD PTR [rbp-32], rax
mov rax, QWORD PTR [rbp-96]
mov QWORD PTR [rbp-24], rax
.L437:
mov rax, QWORD PTR [rbp-104]
sub rax, 1
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
cmp QWORD PTR [rbp-24], rax
jge .L435
mov rax, QWORD PTR [rbp-24]
add rax, 1
add rax, rax
mov QWORD PTR [rbp-24], rax
mov rax, QWORD PTR [rbp-24]
lea rdx, [rax-1]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rbx, rax
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rcx, rax
lea rax, [rbp-120]
mov rdx, rbx
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > > >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >)
test al, al
je .L436
sub QWORD PTR [rbp-24], 1
.L436:
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-64], rax
lea rax, [rbp-64]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-96]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-56], rax
lea rax, [rbp-56]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rbp-96], rax
jmp .L437
.L435:
mov rax, QWORD PTR [rbp-104]
and eax, 1
test rax, rax
jne .L438
mov rax, QWORD PTR [rbp-104]
sub rax, 2
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
cmp QWORD PTR [rbp-24], rax
jne .L438
mov rax, QWORD PTR [rbp-24]
add rax, 1
add rax, rax
mov QWORD PTR [rbp-24], rax
mov rax, QWORD PTR [rbp-24]
lea rdx, [rax-1]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-48], rax
lea rax, [rbp-48]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-96]
lea rax, [rbp-88]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-40], rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-24]
sub rax, 1
mov QWORD PTR [rbp-96], rax
.L438:
lea rax, [rbp-120]
mov rdi, rax
call std::remove_reference<__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&>::type&& std::move<__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&>(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&)
mov rdx, rax
lea rax, [rbp-72]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>::_Iter_comp_val(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&&)
lea rax, [rbp-108]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov ecx, DWORD PTR [rax]
lea rdi, [rbp-72]
mov rdx, QWORD PTR [rbp-32]
mov rsi, QWORD PTR [rbp-96]
mov rax, QWORD PTR [rbp-88]
mov r8, rdi
mov rdi, rax
call void std::__push_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, long, int, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>&)
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
int* std::copy<std::move_iterator<int*>, int*>(std::move_iterator<int*>, std::move_iterator<int*>, int*):
push rbp
mov rbp, rsp
push rbx
sub rsp, 40
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call decltype (__miter_base(({parm#1}.base)())) std::__miter_base<int*>(std::move_iterator<int*>)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call decltype (__miter_base(({parm#1}.base)())) std::__miter_base<int*>(std::move_iterator<int*>)
mov rcx, rax
mov rax, QWORD PTR [rbp-40]
mov rdx, rax
mov rsi, rbx
mov rdi, rcx
call int* std::__copy_move_a<true, int*, int*>(int*, int*, int*)
mov rbx, QWORD PTR [rbp-8]
leave
ret
int const* std::__niter_base<int const*>(int const*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
int* std::__copy_move_a2<false, int const*, int*>(int const*, int const*, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<int>(int const*, int const*, int*)
leave
ret
__gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}>::_Iter_comp_val(__gnu_cxx::__ops::_Iter_comp_iter<{lambda(int, int)#1}>&&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdi, rax
call std::remove_reference<main::{lambda(int, int)#1}&>::type&& std::move<main::{lambda(int, int)#1}&>(std::remove_reference&&)
nop
leave
ret
void std::__push_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int, __gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}>&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 88
mov QWORD PTR [rbp-56], rdi
mov QWORD PTR [rbp-64], rsi
mov QWORD PTR [rbp-72], rdx
mov DWORD PTR [rbp-76], ecx
mov QWORD PTR [rbp-88], r8
mov rax, QWORD PTR [rbp-64]
sub rax, 1
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov QWORD PTR [rbp-24], rax
.L450:
mov rax, QWORD PTR [rbp-64]
cmp rax, QWORD PTR [rbp-72]
jle .L447
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rcx, rax
lea rdx, [rbp-76]
mov rax, QWORD PTR [rbp-88]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int&)
test al, al
je .L447
mov eax, 1
jmp .L448
.L447:
mov eax, 0
.L448:
test al, al
je .L449
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-48], rax
lea rax, [rbp-48]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-64]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-40], rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rbp-64], rax
mov rax, QWORD PTR [rbp-64]
sub rax, 1
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov QWORD PTR [rbp-24], rax
jmp .L450
.L449:
lea rax, [rbp-76]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-64]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-32], rax
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
int* std::__copy_move_backward_a2<true, int*, int*>(int*, int*, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::__copy_move_backward<true, true, std::random_access_iterator_tag>::__copy_move_b<int>(int const*, int const*, int*)
leave
ret
__gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>::_Iter_comp_val(__gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>&&):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov rax, QWORD PTR [rbp-16]
mov rdi, rax
call std::remove_reference<bool (*&)(int, int)>::type&& std::move<bool (*&)(int, int)>(bool (*&)(int, int))
mov rdx, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-8]
mov QWORD PTR [rax], rdx
nop
leave
ret
void std::__push_heap<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, int, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)> >(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, long, long, int, __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>&):
push rbp
mov rbp, rsp
push rbx
sub rsp, 88
mov QWORD PTR [rbp-56], rdi
mov QWORD PTR [rbp-64], rsi
mov QWORD PTR [rbp-72], rdx
mov DWORD PTR [rbp-76], ecx
mov QWORD PTR [rbp-88], r8
mov rax, QWORD PTR [rbp-64]
sub rax, 1
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov QWORD PTR [rbp-24], rax
.L458:
mov rax, QWORD PTR [rbp-64]
cmp rax, QWORD PTR [rbp-72]
jle .L455
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov rcx, rax
lea rdx, [rbp-76]
mov rax, QWORD PTR [rbp-88]
mov rsi, rcx
mov rdi, rax
call bool __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int&)
test al, al
je .L455
mov eax, 1
jmp .L456
.L455:
mov eax, 0
.L456:
test al, al
je .L457
mov rdx, QWORD PTR [rbp-24]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-48], rax
lea rax, [rbp-48]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-64]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-40], rax
lea rax, [rbp-40]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
mov rax, QWORD PTR [rbp-24]
mov QWORD PTR [rbp-64], rax
mov rax, QWORD PTR [rbp-64]
sub rax, 1
mov rdx, rax
shr rdx, 63
add rax, rdx
sar rax
mov QWORD PTR [rbp-24], rax
jmp .L458
.L457:
lea rax, [rbp-76]
mov rdi, rax
call std::remove_reference<int&>::type&& std::move<int&>(int&)
mov rbx, rax
mov rdx, QWORD PTR [rbp-64]
lea rax, [rbp-56]
mov rsi, rdx
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator+(long) const
mov QWORD PTR [rbp-32], rax
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov edx, DWORD PTR [rbx]
mov DWORD PTR [rax], edx
nop
mov rbx, QWORD PTR [rbp-8]
leave
ret
decltype (__miter_base(({parm#1}.base)())) std::__miter_base<int*>(std::move_iterator<int*>):
push rbp
mov rbp, rsp
sub rsp, 16
mov QWORD PTR [rbp-8], rdi
lea rax, [rbp-8]
mov rdi, rax
call std::move_iterator<int*>::base() const
mov rdi, rax
call int* std::__miter_base<int*>(int*)
leave
ret
int* std::__copy_move_a<true, int*, int*>(int*, int*, int*):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-40]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov r12, rax
mov rax, QWORD PTR [rbp-32]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov rbx, rax
mov rax, QWORD PTR [rbp-24]
mov rdi, rax
call int* std::__niter_base<int*>(int*)
mov rdx, r12
mov rsi, rbx
mov rdi, rax
call int* std::__copy_move_a1<true, int*, int*>(int*, int*, int*)
mov rdx, rax
lea rax, [rbp-40]
mov rsi, rdx
mov rdi, rax
call int* std::__niter_wrap<int*>(int* const&, int*)
add rsp, 32
pop rbx
pop r12
pop rbp
ret
int* std::__copy_move<false, true, std::random_access_iterator_tag>::__copy_m<int>(int const*, int const*, int*):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-32]
sub rax, QWORD PTR [rbp-24]
sar rax, 2
mov QWORD PTR [rbp-8], rax
cmp QWORD PTR [rbp-8], 0
je .L464
mov rax, QWORD PTR [rbp-8]
lea rdx, [0+rax*4]
mov rcx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov rsi, rcx
mov rdi, rax
call memmove
.L464:
mov rax, QWORD PTR [rbp-8]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-40]
add rax, rdx
leave
ret
bool __gnu_cxx::__ops::_Iter_comp_val<main::{lambda(int, int)#1}>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int&):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rbx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov r12d, DWORD PTR [rax]
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov eax, DWORD PTR [rax]
mov edx, r12d
mov esi, eax
mov rdi, rbx
call main::{lambda(int, int)#1}::operator()(int, int) const
add rsp, 32
pop rbx
pop r12
pop rbp
ret
int* std::__copy_move_backward<true, true, std::random_access_iterator_tag>::__copy_move_b<int>(int const*, int const*, int*):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-32]
sub rax, QWORD PTR [rbp-24]
sar rax, 2
mov QWORD PTR [rbp-8], rax
cmp QWORD PTR [rbp-8], 0
je .L469
mov rax, QWORD PTR [rbp-8]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-8]
sal rax, 2
neg rax
mov rcx, rax
mov rax, QWORD PTR [rbp-40]
add rcx, rax
mov rax, QWORD PTR [rbp-24]
mov rsi, rax
mov rdi, rcx
call memmove
.L469:
mov rax, QWORD PTR [rbp-8]
sal rax, 2
neg rax
mov rdx, rax
mov rax, QWORD PTR [rbp-40]
add rax, rdx
leave
ret
bool __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>::operator()<__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int>(__gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >, int&):
push rbp
mov rbp, rsp
push r12
push rbx
sub rsp, 32
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-24]
mov r12, QWORD PTR [rax]
mov rax, QWORD PTR [rbp-40]
mov ebx, DWORD PTR [rax]
lea rax, [rbp-32]
mov rdi, rax
call __gnu_cxx::__normal_iterator<int*, std::vector<int, std::allocator<int> > >::operator*() const
mov eax, DWORD PTR [rax]
mov esi, ebx
mov edi, eax
call r12
add rsp, 32
pop rbx
pop r12
pop rbp
ret
std::move_iterator<int*>::base() const:
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
mov rax, QWORD PTR [rax]
pop rbp
ret
int* std::__miter_base<int*>(int*):
push rbp
mov rbp, rsp
mov QWORD PTR [rbp-8], rdi
mov rax, QWORD PTR [rbp-8]
pop rbp
ret
int* std::__copy_move_a1<true, int*, int*>(int*, int*, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::__copy_move_a2<true, int*, int*>(int*, int*, int*)
leave
ret
int* std::__copy_move_a2<true, int*, int*>(int*, int*, int*):
push rbp
mov rbp, rsp
sub rsp, 32
mov QWORD PTR [rbp-8], rdi
mov QWORD PTR [rbp-16], rsi
mov QWORD PTR [rbp-24], rdx
mov rdx, QWORD PTR [rbp-24]
mov rcx, QWORD PTR [rbp-16]
mov rax, QWORD PTR [rbp-8]
mov rsi, rcx
mov rdi, rax
call int* std::__copy_move<true, true, std::random_access_iterator_tag>::__copy_m<int>(int const*, int const*, int*)
leave
ret
int* std::__copy_move<true, true, std::random_access_iterator_tag>::__copy_m<int>(int const*, int const*, int*):
push rbp
mov rbp, rsp
sub rsp, 48
mov QWORD PTR [rbp-24], rdi
mov QWORD PTR [rbp-32], rsi
mov QWORD PTR [rbp-40], rdx
mov rax, QWORD PTR [rbp-32]
sub rax, QWORD PTR [rbp-24]
sar rax, 2
mov QWORD PTR [rbp-8], rax
cmp QWORD PTR [rbp-8], 0
je .L482
mov rax, QWORD PTR [rbp-8]
lea rdx, [0+rax*4]
mov rcx, QWORD PTR [rbp-24]
mov rax, QWORD PTR [rbp-40]
mov rsi, rcx
mov rdi, rax
call memmove
.L482:
mov rax, QWORD PTR [rbp-8]
lea rdx, [0+rax*4]
mov rax, QWORD PTR [rbp-40]
add rax, rdx
leave
ret
__static_initialization_and_destruction_0(int, int):
push rbp
mov rbp, rsp
sub rsp, 16
mov DWORD PTR [rbp-4], edi
mov DWORD PTR [rbp-8], esi
cmp DWORD PTR [rbp-4], 1
jne .L486
cmp DWORD PTR [rbp-8], 65535
jne .L486
mov edi, OFFSET FLAT:_ZStL8__ioinit
call std::ios_base::Init::Init() [complete object constructor]
mov edx, OFFSET FLAT:__dso_handle
mov esi, OFFSET FLAT:_ZStL8__ioinit
mov edi, OFFSET FLAT:_ZNSt8ios_base4InitD1Ev
call __cxa_atexit
.L486:
nop
leave
ret
_GLOBAL__sub_I_cmp(int, int):
push rbp
mov rbp, rsp
mov esi, 65535
mov edi, 1
call __static_initialization_and_destruction_0(int, int)
pop rbp
ret

可以看到lambda表达式被编译成了正常的函数,并且拥有特定的函数签名

参考资料

[1] C++ 11 Lambda表达式

游戏开发中的基础知识

游戏中的概念

  1. 导演

    一个游戏中只存在一个导演对象,负责游戏中场景的切换以及游戏流程

  2. 场景

    游戏中存在多个被导演管理的场景,每一个场景代表了游戏的一个状态。在这个状态下,游戏会显示对应的界面,多个场景组成了有限状态机。无论有多少个状态,只有当前状态处于运行当中

    大多数游戏都存在菜单场景、游戏场景和结束场景

  3. 层次

    场景中,游戏画面被分为多个层次,层次是比场景低一级的显示画面,它们可以彼此互相包含,也可以同时处在一个场景中。

  4. 精灵

    层次中就是用于表现游戏物体的精灵。

  5. 摄像机

    用于从不同角度来观察物体,借助OpenGL的gluLookAt()来定位摄像机和物体之间的关系。物体属性改变时会导致摄像机的重置。

消息处理机制

接收–>分发–>处理

分发的时候委托对象存在优先级

3D数学知识

Unity创建游戏

  1. File->new 新建工程

    新工程有默认光线、摄像机、场景

  2. File->new Scene

    新建场景

  3. GameObject

    可以新建各种精灵

  4. 凡是出现在Hierachy视图中的元素,都是游戏对象

    摄像机、灯光、脚本。。。

maya入门--maya建模方法和基本概念

maya建模方法

  1. NURBS建模

  2. 多边形建模

  3. 纹理置换建模

  4. 雕刻建模

基本概念

https://www.douban.com/note/651075924/

参考资料

[1] Maya的几种建模方法 - fashion游戏建模的文章 - 知乎

官方教程

F11

帮助-> 教程

基本操作视频教程 https://knowledge.autodesk.com/search-result/caas/simplecontent/content/maya-1-minute-startup-movies.html

实例教程 https://knowledge.autodesk.com/zh-hans/support/maya/learn-explore/caas/simplecontent/content/maya-tutorials.html

zbrush

官方文档 http://docs.autodesk.com/MAYAUL/2015/CHS/GettingStarted/#!/url=./files/The_Maya_user_interface_The_Maya_interface.htm

创建菜单的复选项是交互式创建

Alt+鼠标 左=旋转视图 中=移动 右=缩放

按6可以显示实体,按4显示线框,对应的是视图下面那一排,应该是工具栏?

ViewCube控制显示角度 窗口 > 设置/首选项 > 首选项”(Window > Settings/Preferences > Preferences))中打开“ViewCube”类别并确保“显示 ViewCube”(Show the ViewCube)。2019版似乎没有,使用旋转平移也行。

着色->对所有项目进行平滑着色处理

窗口->常规编辑器->Hyphergraph

将对象转为模板可以防止意外选择

材质与灯光照射有关

多边形建模

在 Maya 中,建模是指为 Maya 场景中的角色和对象创建虚拟的 3D 曲面。曲面对于创建有说服力的 3D 图像非常重要

Maya中有两种曲面类型,多边形曲面和NURBS

多边形曲面是由三个或更多边的平面(称为面)组成的网络,这些面连接在一起以创建多边形网格。多边形网格由顶点、面和边组成。

网格上的线框线表示每个面的边。这些边围住的区域称为面。这些边彼此相交的位置是一个称为顶点的点的位置。

多边形可以轻松地表示平面以及曲线式 3D 形状

可以使用所有 3D 曲面类型的最少量数据描述多边形曲面,所以性能好

四视图下,左上左下右下依次为:俯视图,前视图,侧视图,每一个视图都有自己的面板菜单

视图摄影机直接单击属性编辑器即可

立方体基本体由称为“四边形”的四边多边形面构成。四边形多边形经常与 3D 角色模型一起使用,因为这些多边形在绑定到骨架时很容易进行平滑,并且变形得很好

建模时可以删除一半,另一半使用对称完成

双击工具可以显示设置

网格工具->创建多边形工具

桥接之前需要先合并,使用网格->结合工具

切割:网格工具->多切割

多边形建模满足四边形约束

软化边:网格显示->软化边

b键软选择,选择周围的点

移动工具的反射=对称

NURBS(非均匀有理 B 样条线)使用数学方法描述非常适合 3D 应用程序的曲线和曲面。NURBS 的特点是它们能够产生平滑的有机形状。

可以使用多种方法快速对 NURBS 曲面进行建模和编辑。使用一条或多条 NURBS 曲线(定义了想要用于曲面的形状的轮廓)创建 NURBS 曲面,然后使用特定的构建方法创建完成的曲面。

NURBS建模

NURBS(非均匀有理 B 样条线)使用数学方法描述非常适合 3D 应用程序的曲线和曲面。NURBS 的特点是它们能够产生平滑的有机形状。

可以使用多种方法快速对 NURBS 曲面进行建模和编辑。使用一条或多条 NURBS 曲线(定义了想要用于曲面的形状的轮廓)创建 NURBS 曲面,然后使用特定的构建方法创建完成的曲面。

NURBS 曲面是由互连曲线形成的网。创建曲线用于创建并在随后修改曲面

分别按1,2,3可以以不同的精细度显示曲面。这些热键对应“显示 > NURBS”(Display > NURBS)菜单项下的菜单项(“粗糙”(Rough) /“中等”(Medium) /“精细”(Fine))

曲面->雕刻几何工具

NURBS建模,CV(控制顶点)起作用

曲面->插入等参线

3d建模入门操作

太难了啊,版本更新得亲妈都不认识了,操作和选项都找不到

基本操作

  • s缩放

    在中间正上方可以选择缩放中心

  • 新建物体

    编辑模式下上方有个添加,添加后选项位于左下角

  • 环切加线

    在要添加的位置稍下方才可以添加成功,可能是视角问题

  • 点选一个物体之后,按A可以全选

  • Shift+d复制物体,这时是鼠标移动模式,按esc可以进入具体数值调整

  • Alt+e挤出面,挤出选项

    左侧挤出选区选项是安装原方向挤出

  • 鼠标中键旋转视图,加按shift键平移视图

  • 按shift选择面

  • x键删除

  • m键合并点

感想

这个好多选项找不到,感觉要换了,这玩意咋也得入门理解了那些意义再说建模得事情。

参考资料

[1] 【教程篇】Blender实例教程(一)——制作一个酷炫的三叶草星_张同光 (Tongguang Zhang):Hello everyone !-CSDN博客

笔记

Substance Pianter

3dmax新手-> maya进阶-> ZBrash大神 模型雕刻

场景 角色:

低模:只能看到大概轮廓,无法看到细节。 面数少,结构粗糙(模型精度低)。通过手绘表现细节。
内存需求小,配置要求低。画质低。

高模: 很多细节都是建模出来的。面数多。结构丰富(模型精度高)。通过材质球上纯色。画质精细,配置要求高。

画皮模型:真人做动作,直接往上填颜色。

次时代模型:先建模高模,再建模一个低模,高模的皮附在低模上。
配置需求小,画质好

穿模

相关工作

美术盒子,猪八戒,解放号,一品威客:第三方平台

C类低模,B类高模/次世代,A类团队

配置要求

i3起 2-4G独立显卡 4-8G运存,越高越好

高模到次时代的坎

实际使用中会结合高模和次世代

3D打印代打

引擎:动态效果,渲染调试,水流

dll注入技术

由于学习hook技术过程中需要dll注入,递归学习至此

总体步骤

  1. 附加到目标/远程进程

  2. 在目标/远程进程内分配内存

  3. 将DLL文件路径,dll文件,复制到目标/远程进程的内存空间

  4. 控制进程运行dll文件

相关API

  • CreateRemoteThread()

  • NtCreateThreadEx()

  • QueueUserAPC()

  • SetWindowsHookEx()

  • RtlCreateUserThread()

  • SetThreadContext()

  • 反射DLL

实现方法

  • 创建远程线程

  • 使用注册表

  • 消息hook

注册表方法

Windows注册表中有AppInit_DLLs与LoadAppInit_DLLs两个注册表项,把要注入的DLL路径写入AppInit_DLLs,然后将LoadAppInit_DLLs项设置为1.重启后,指定DLL就会注入所有运行进程。

原理:user32.dll被加载到进程时,会读取AppInit_DLLs注册表项,如果有值,就加载到加载user32.dll的进程。WindowsXP会忽略LoadAppInit_DLLs的注册表项。

创建远程线程方法

  1. 获取目标进程句柄

  2. 将要注入的dll路径写入目标进程内存

  3. 获取LoadLibraryW() API地址

  4. 在目标进程中运行远程线程

注入器

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
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <tchar.h>
#include <Windows.h>
#include <iostream>
#include <fstream>
#include <TlHelp32.h>
#include <comdef.h>

using namespace std;

#define DEF_PROCESS_NAME "notepad.exe"

LPVOID WriteFileAddress = NULL;
CREATE_PROCESS_DEBUG_INFO CreateProcessDebugInfomation;
BYTE INT3 = 0xCC, OldByte = 0;
/*
* @method 注入dll到指定进程
*/
BOOL injectDll(int pid, wchar_t* szDllPath) {

HANDLE hProcess = NULL, hThread = NULL;
HMODULE hMod = NULL;
LPVOID pRemoteBuf = NULL;
DWORD dwBufSize = (DWORD)(_tcslen(szDllPath) + 1) * sizeof(TCHAR);
LPTHREAD_START_ROUTINE pThreadProc;
// 使用pid获取目标进程句柄
if (!(hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid))) {
_tprintf(L"OpenProcess(%d) failed [%d]\n", pid,GetLastError());
return FALSE;
}
// 在目标进程中分配内存
// 这个API返回的地址是目标进程的地址
pRemoteBuf = VirtualAllocEx(hProcess, NULL, dwBufSize, MEM_COMMIT, PAGE_READWRITE);
// 将dll写入内存
WriteProcessMemory(hProcess, pRemoteBuf, (LPVOID)szDllPath, dwBufSize, NULL);
// 获取LoadLibraryW() API地址
hMod = GetModuleHandle(L"kernel32.dll");
pThreadProc = (LPTHREAD_START_ROUTINE)GetProcAddress(hMod, "LoadLibraryW");
// 运行线程
hThread = CreateRemoteThread(hProcess, NULL, 0, pThreadProc, pRemoteBuf, 0, NULL);
WaitForSingleObject(hThread, INFINITE);
CloseHandle(hThread);
CloseHandle(hProcess);
return TRUE;
}
/*
* @method 遍历进程寻找notepad.exe的pid
*/
int traverseProcesses() {
PROCESSENTRY32 pe32;
pe32.dwSize = sizeof(pe32);
HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (hProcessSnap == INVALID_HANDLE_VALUE) {
printf("Create snap Error!\n");
return false;
}
BOOL bResult = Process32First(hProcessSnap, &pe32);
int num(0);
while (bResult) {
_bstr_t b(pe32.szExeFile); // 将宽字节转化为窄字节
if (!strcmp(b, "notepad.exe")) {
printf("[*] Find notepad.exe: %d\n", pe32.th32ProcessID);
return pe32.th32ProcessID;
}
bResult = Process32Next(hProcessSnap, &pe32);
}
return -1;
}
int _tmain(int argc, TCHAR* argv[]) {
wchar_t dllName[] = L"myhackdll.dll";
int pid = traverseProcesses();
if (pid == -1) {
printf("[-] Not found\n");
exit(-1);
}
if (injectDll(pid, dllName)) {
_tprintf(L"Inject success\n");
}
else {
_tprintf(L"Inject failed\n");
}
return 0;
}

myhackdll.dll代码(要注入的dll)

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
#include "pch.h"
#include <tchar.h>
#include <stdio.h>

// 加载静态链接库
#pragma comment(lib,"urlmon.lib")
// dllMain函数是程序的入口点
HMODULE g_hMod = NULL;

DWORD WINAPI ThreadProc(LPVOID lParam) {
TCHAR szPath[MAX_PATH] = { 0, };
if (!GetModuleFileName(g_hMod, szPath, MAX_PATH)) {
return FALSE;
}
FILE* f = fopen("Hello.txt","w");
if (!f)return FALSE;
fprintf(f, "Hello! You are hacked!\n");
fclose(f);
return 0;
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
){
HANDLE hThread = NULL;
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
OutputDebugString(L"myhack.dll Inject!!!");
hThread = CreateThread(NULL, 0, ThreadProc, NULL, 0, NULL);
CloseHandle(hThread);
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

调试的方法

这里讲如何在调试器中看到dll注入后的效果

  1. 使用调试器attach后按f9继续运行

  2. 选项中选中”pause on new modules”

  3. 运行注入器,dll将在注入的dll入口点暂停

dll卸载

  1. 获取目标进程pid

  2. 获取进程加载的dll信息

  3. 获取FreeLibraryAPI地址

  4. 在目标进程中运行线程

SetWindowsHookEx方法

这同时也是一种hook方法,参见windows hook

参考资料

[1] 《逆向工程核心原理》

湘湖杯2020wp(只有RE部分)

easyZ

  1. 使用strings找到input相关字符串

  2. 使用vim搜索到偏移量

  3. 根据偏移量找到主函数汇编指令代码

  4. 判断相关的字符串偏移量

    1000bc2 wrong

    1000bb2 win

  5. 猜测 brasl 为跳转指令,后面还有判断指令

  6. 网上搜索到一个pdf http://read.pudn.com/downloads92/ebook/356133/IBM%20S390%20%BB%E3%B1%E0%D3%EF%D1%D4.pdf

    从这里面看到了函数结尾的形式,即先加载地址,然后br跳转到那个地址,由此可以确定两个关键函数的结尾

  7. 1000910 判断字符集合法性,只能0-9 a-f 长度为32

    1000a08 验证函数

  8. google搜索 llcr site:www.ibm.com得到一个指令集文档

    https://www.ibm.com/support/pages/sites/default/files/2020-07/SA22-7871-10.pdf

    起飞

  9. 实际程序逻辑是一个多项式,可以按位穷举

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
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <string.h>
#include <math.h>

void printArray(char *name,uint8_t *data,size_t len){
printf("==============%s========\n",name);
for(size_t i=0;i<len;i++){
printf("0x%02x,",data[i]);
}
printf("\n================================\n");
}
uint32_t calc(uint32_t d1,uint32_t d2,uint32_t d3,uint32_t d4){
return d1*d1*d2+d1*d3+d4;
}
int main(){
uint32_t addDat[] = {0xb2b0,0x6e72,0x6061,0x565d,0x942d,0xac79,0x391c,0x643d,0xec3f,0xbd10,0xc43e,0x7a65,0x184b,0xef5b,0x5a06,0xa8c0,0xf64b,0xc774,0x02ff,0x8e57,0xaed9,0xd8a9,0x230c,0x74e8,0xc2a6,0x88b3,0xaf2a,0x9ea7,0xce8a,0x5924,0xd276,0x56d4,0x77d7,0x990e,0xb585,0x4bcd,0x5277,0x1afc,0x8c8a,0xcdb5,0x6e26,0x4c22,0x673f,0xdaff,0x0fac,0x86c7,0xe048,0xc483,0x85d3,0x2204,0xc2ee,0xe07f,0x0caf,0xbf76,0x63fe,0xbffb,0x4b09,0xe5b3,0x8bda,0x96df,0x866d,0x1719,0x6bcf,0xadcc,0x0f2b,0x51ce,0x1549,0x20c1,0x3a8d,0x05f5,0x5403,0x1125,0x9161,0xe2a5,0x5196,0xd8d2,0xd644,0xee86,0x3896,0x2e71,0xa6f1,0xdfcf,0x3ece,0x7d49,0xc24d,0x237e,0x9352,0x7a97,0x7bfa,0xcbaa,0x10dc,0x3bd9,0x7d7b,0x3b88,0xb0d0,0xe8bc};
uint32_t cmpDat[] = {0x08a73233,0x116db0f6,0x0e654937,0x03c374a7,0x16bc8ed9,0x0846b755,0x08949f47,0x04a13c27,0x0976cf0a,0x07461189,0x1e1a5c12,0x11e64d96,0x03cf09b3,0x093cb610,0x0d41ea64,0x07648050,0x092039bf,0x08e7f1f7,0x004d871f,0x1680f823,0x06f3c3eb,0x2205134d,0x015c6a7c,0x11c67ed0,0x0817b32e,0x06bd9b92,0x08806b0c,0x06aaa515,0x205b9f76,0x0de963e9,0x2194e8e2,0x047593bc};
printf("%d\n",sizeof(addDat)/4);
printf("%d\n",sizeof(cmpDat)/4);
printf("0x%08x 0x%08x 0x%08x\n",addDat[0],addDat[1],cmpDat[0]);
uint8_t flag[33]={0};
uint32_t addT;
char dic[] = "0123456789abcdef";

for(size_t i=0;i<32;i++){

// flag[i]=(uint32_t)sqrt(cmpDat[i]);
for(size_t j=0;j<16;j++){
if(calc(dic[j],addDat[i],addDat[i+32],addDat[i+64])==cmpDat[i]){
flag[i]=dic[j];
break;
}
}
}
printArray("flag",flag,32);
printf("%s\n",flag);
printf("%d\n",strlen(flag));
return 0;
}

[rev] easyre

  1. IDA进入主函数没发现什么

  2. 使用调试器发现返回后进入变换和检测函数

  3. 程序逻辑为所有数组成一个整体循环右移5位,之后每一个数异或自己的下标。第0Byte异或0所以不受影响。

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
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <string.h>
#include <math.h>

void printArray(char *name,uint8_t *data,size_t len){
printf("==============%s========\n",name);
for(size_t i=0;i<len;i++){
printf("0x%02x,",data[i]);
}
printf("\n================================\n");
}
int main(){
uint8_t a[] = {0x2b, 0x08, 0xa9, 0xc8, 0x97, 0x2f, 0xff, 0x8c, 0x92, 0xf0, 0xa3, 0x89, 0xf7, 0x26, 0x07, 0xa4, 0xda, 0xea, 0xb3, 0x91, 0xef, 0xdc, 0x95, 0xab,0};
printf("%d\n",sizeof(a));
uint8_t flag[25]={0};
for(size_t i=0;i<24;i++){
a[i]^=i;
}
for(size_t i=0;i<24;i++){
flag[i]=a[(i-1)%24]<<5|a[i]>>3;
}
printArray("flag",flag,24);
printf("%s\n",flag);
return 0;
}

这个脚本跑出来最后一位错误,但是根据语义推测最后一位为u

easy_c++

把用户输入和下标做异或处理

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <string.h>
#include <math.h>

void printArray(char *name,uint8_t *data,size_t len){
printf("==============%s========\n",name);
for(size_t i=0;i<len;i++){
printf("0x%02x,",data[i]);
}
printf("\n================================\n");
}
int main(){
char s[] = "7d21e<e3<:3;9;ji t r#w\"$*{*+*$|,";
for(size_t i=0;i<strlen(s);i++){
s[i]^=i;
}
printf("%s\n",s);
printf("%d\n",strlen(s));

return 0;
}

[rev]ReMe

  1. 有个python图标,猜测是pyinstaller打包的

    这一点也可以ida打开查看字符串

  2. 使用pyinstxtractor解包程序

  3. 解包之后,猜测文件夹中ReMe是主程序的pyc文件,但是没有pyc的文件头

  4. 找个同文件夹下的pyc文件头,插入到这个文件开头,使用uncompyle6反编译,得到1.py文件

  5. 查看程序逻辑之后发现可以按位穷举

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
import base64
import hashlib
import random,string
from Crypto.Cipher import AES
from math import *
import string
import base64
import ctypes
import time

check = [
'e5438e78ec1de10a2693f9cffb930d23',
'08e8e8855af8ea652df54845d21b9d67',
'a905095f0d801abd5865d649a646b397',
'bac8510b0902185146c838cdf8ead8e0',
'f26f009a6dc171e0ca7a4a770fecd326',
'cffd0b9d37e7187483dc8dd19f4a8fa8',
'4cb467175ab6763a9867b9ed694a2780',
'8e50684ac9ef90dfdc6b2e75f2e23741',
'cffd0b9d37e7187483dc8dd19f4a8fa8',
'fd311e9877c3db59027597352999e91f',
'49733de19d912d4ad559736b1ae418a7',
'7fb523b42413495cc4e610456d1f1c84',
'8e50684ac9ef90dfdc6b2e75f2e23741',
'acb465dc618e6754de2193bf0410aafe',
'bc52c927138231e29e0b05419e741902',
'515b7eceeb8f22b53575afec4123e878',
'451660d67c64da6de6fadc66079e1d8a',
'8e50684ac9ef90dfdc6b2e75f2e23741',
'fe86104ce1853cb140b7ec0412d93837',
'acb465dc618e6754de2193bf0410aafe',
'c2bab7ea31577b955e2c2cac680fb2f4',
'8e50684ac9ef90dfdc6b2e75f2e23741',
'f077b3a47c09b44d7077877a5aff3699',
'620741f57e7fafe43216d6aa51666f1d',
'9e3b206e50925792c3234036de6a25ab',
'49733de19d912d4ad559736b1ae418a7',
'874992ac91866ce1430687aa9f7121fc']

def func(num):
result = []
while num != 1:
num = num * 3 + 1 if num % 2 else num // 2
result.append(num)

return result


if __name__ == '__main__':
print('Your input is not the FLAG!')
flag = ''
for j in range(27):
for i in range(0x20,0x7f):
ret_list = func(i)
s = ''
for idx in range(len(ret_list)):
s += str(ret_list[idx])
s += str(ret_list[(len(ret_list) - idx - 1)])
md5 = hashlib.md5()
md5.update(s.encode('utf-8'))
if md5.hexdigest()==check[j]:
flag+=chr(i)
print(flag)
break

md5 = hashlib.md5()
md5.update(flag.encode('utf-8'))
print('You win!')
print('flag{' + md5.hexdigest() + '}')

红蓝对抗中学到的东西

信息搜集非常重要

  • 使用扫描器对网站进行扫描

  • 使用搜索引擎google, baidu

    inurl:

    site:

    domain:

    +/-

  • github

https://docs.github.com/cn/free-pro-team@latest/github/searching-for-information-on-github/searching-on-github

  • reg007

    查询注册过哪些网站

  • 各类违法公式网站

  • 社工库

口令爆破

  • 慎用远程穷举爆破

    容易被蓝方发现,入侵检测器发现,还有被当成ddos而禁IP

  • 可以尝试常用密码,一些中间件或管理工具的默认密码

  • 信息收集非常重要

突破点

  • 上传文件的地方

  • 下载文件的地方

  • 搜索命令

  • 有的信息系统是外边强,内网弱,找到一个突破口进去

  • 要有耐心,多思考,多动手,多抓包分析

如果有大佬,以上可无视

渗透测试笔记

内网渗透环境搭建

搭建四个靶机,两台Windows,两台Linux

  • Linux#1: centos

    搭载lamp服务+带漏洞的cms靶场

  • Linux#2:

    作为Linux#1的mysql服务

  • Windows#1 2008或7

  • Windows#2 2008或7

Linux#1桥接192和172

其它桥接192

本机桥接172

这样本机就只能访问172网段,其它可以互ping但是ping不通外网

参考资料

雪殇佬

Windows hook介绍

windows下hook机制主要是替换程序要使用的函数,以替换掉原函数的功能或者添加功能。

比如杀软主动防御功能,监控敏感API,对这些函数进行hook;木马病毒可能hook键盘消息来窃取用户输入,从而获得某些密码

windows下的hook主要分为应用层和内核层,内核层一般在x86平台使用,因为从Windows Vista x64开始引入Patch Guard技术极大地限制了Windows内核挂钩的使用。

内核层hook:

  • SSDT hook

应用层hook

  • 消息hook

    • SetWindowsHook
  • 注入hook

    • IAT hook

    • Inline Hook

    • HotFix Hook

  • 调试Hook

    • DebugActiveProcess

消息hook

Windows消息流:

  1. 发生键盘输入事件时,WM_KEYDOWN消息被添加到[OS message queue]

  2. OS判断哪个应用程序发生了事件,然后从[OS message queue]取出消息,添加到相应应用程序的[application message queue]中

  3. 应用程序监视自身的[application message queue],发现WM_KEYDOWN消息调用相应的事件处理程序

钩子位于[OS message queue]和[application message queue]

代码实现:调用SetWindowsHookEx API

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
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <Windows.h>
#include <iostream>
#include <fstream>

using namespace std;

#define DEF_PROCESS_NAME "notepad.exe"

HHOOK g_hHook;
HINSTANCE g_HInstance;

LRESULT CALLBACK KeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) {
char szPath[MAX_PATH] = { 0 };
KBDLLHOOKSTRUCT* keyNum = (KBDLLHOOKSTRUCT*)lParam;

if (keyNum->flags == 128 || keyNum->flags == 129) {
printf("0x%x\n", keyNum->vkCode);
}
return CallNextHookEx(NULL, nCode, wParam, lParam);
}

_declspec(dllexport) void HookStart() {
g_HInstance = GetModuleHandleA(NULL);
g_hHook = SetWindowsHookExA(WH_KEYBOARD_LL, KeyboardProc, g_HInstance, NULL);
if (g_hHook) {
printf("Hook Success\n");
}
else {
printf("Hook Failed\n");
}

}
_declspec(dllexport) void HookStop() {
if (g_hHook) {
UnhookWindowsHookEx(g_hHook);
g_hHook = NULL;
printf("Unhook Success\n");
}
}
int main() {
char buf[256] = { 0 };
HookStart();
MSG msg;
while (1) {
// 这里的代码参考了 https://blog.csdn.net/Simon798/article/details/98848050
if (PeekMessageA(
&msg, // MSG 接收这个消息
NULL, // 检测消息的窗口句柄,NULL:检索当前线程所有窗口消息
NULL, // 检查消息范围中第一个消息的值,NULL:检查所有消息(必须和下面的同时为NULL)
NULL, // 检查消息范围中最后一个消息的值,NULL:检查所有消息(必须和上面的同时为NULL)
PM_REMOVE // 处理消息的方式,PM_REMOVE:处理后将消息从队列中删除
)) {
// 把按键消息传递给字符消息
TranslateMessage(&msg);

// 将消息分派给窗口程序
DispatchMessageW(&msg);
}
else
Sleep(0); //避免CPU全负载运行
}
HookStop();
return 0;
}

这里处理了所有的按键消息,如果有需要可以查阅相关资料。

如果有图形化界面,可以不用处理消息。因为图形化界面允许回调函数的。

弊端是只能监视较少消息,如击键消息,鼠标消息,窗口消息

调试Hook

和调试器类似,让进程发生异常,然后自己捕获异常,对于被调试状态下的级进行恶意操作。

核心思路是将API的第一个字节修改为0xCC(INT 3),当API被调用时,由于触发了异常,控制权交给调试器。

相关函数

  • CreateProcess()

    启动调试一个进程

  • DebugActiveProcess(ProcessID)

    附加到一个进程

  • 获取进程PID

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    bool traverseProcesses() {
    PROCESSENTRY32 pe32;
    pe32.dwSize = sizeof(pe32);
    HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
    if (hProcessSnap == INVALID_HANDLE_VALUE) {
    printf("Create snap Error!\n");
    return false;
    }
    BOOL bResult = Process32First(hProcessSnap, &pe32);
    int num(0);
    while (bResult) {
    _bstr_t b(pe32.szExeFile); // 将宽字节转化为窄字节
    cout << '[' << num++ << ']' << ' ' << b << ' ' << pe32.th32ProcessID << endl;
    bResult = Process32Next(hProcessSnap, &pe32);
    }
    return true;
    }

代码实现(64位,需要先阅读文档查看传参规则)

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
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <Windows.h>
#include <iostream>
#include <fstream>
#include <TlHelp32.h>
#include <comdef.h>

using namespace std;

#define DEF_PROCESS_NAME "notepad.exe"

LPVOID WriteFileAddress = NULL;
CREATE_PROCESS_DEBUG_INFO CreateProcessDebugInfomation;
BYTE INT3 = 0xCC, OldByte = 0;

BOOL OnCreateProcessDebugEvent(LPDEBUG_EVENT pde)
{
// WriteFile()函数地址
WriteFileAddress = GetProcAddress(GetModuleHandleA("kernel32.dll"), "WriteFile");

// API Hook - WriteFile()
//将WriteFile函数的首个字节改为0xcc
memcpy(&CreateProcessDebugInfomation, &pde->u.CreateProcessInfo, sizeof(CREATE_PROCESS_DEBUG_INFO));
ReadProcessMemory(CreateProcessDebugInfomation.hProcess, WriteFileAddress,
&OldByte, sizeof(BYTE), NULL);
WriteProcessMemory(CreateProcessDebugInfomation.hProcess, WriteFileAddress,
&INT3, sizeof(BYTE), NULL);

return TRUE;
}

BOOL OnExceptionDebugEvent(LPDEBUG_EVENT pDebugEvent)
{
CONTEXT Context;
PBYTE lpBuffer = NULL;
DWORD64 dwNumOfBytesToWrite, dwAddrOfBuffer, i;
PEXCEPTION_RECORD pExceptionRecord = &pDebugEvent->u.Exception.ExceptionRecord;
cout <<hex<< EXCEPTION_BREAKPOINT;
cout << ' ';
cout << hex << pExceptionRecord->ExceptionCode;
cout << endl;
// BreakPoint exception
if (EXCEPTION_BREAKPOINT == pExceptionRecord->ExceptionCode)
{
// 发生异常的地方是否为我们要钩取的函数
if (WriteFileAddress == pExceptionRecord->ExceptionAddress)
{
// #1. Unhook
// 先恢复,以免进入死循环
WriteProcessMemory(CreateProcessDebugInfomation.hProcess, WriteFileAddress,
&OldByte, sizeof(BYTE), NULL);

// #2. 获得线程上下背景文 为了修改EIp的值,来使进程恢复正常运行
Context.ContextFlags = CONTEXT_FULL;
GetThreadContext(CreateProcessDebugInfomation.hThread, &Context);

// #3. WriteFile() 根据ESP来获得WriteFile 函数的参数,以达到修改数据的目的

//ReadProcessMemory(CreateProcessDebugInfomation.hProcess, (LPVOID)(Context.Rsp + 0x8),
// &dwAddrOfBuffer, sizeof(DWORD), NULL);

//ReadProcessMemory(CreateProcessDebugInfomation.hProcess, (LPVOID)(Context.Rsp + 0xC),
// &dwNumOfBytesToWrite, sizeof(DWORD), NULL);
// 调试发现,64位情况下传参使用rcx,rdx,r8d,r9
dwAddrOfBuffer = Context.Rdx;
dwNumOfBytesToWrite = Context.R8;
cout <<hex<< Context.Rip << endl;
// #4.
lpBuffer = (PBYTE)malloc(dwNumOfBytesToWrite + 1);
memset(lpBuffer, 0, dwNumOfBytesToWrite + 1);

// #5. WriteFile()
ReadProcessMemory(CreateProcessDebugInfomation.hProcess, (LPVOID)dwAddrOfBuffer,
lpBuffer, dwNumOfBytesToWrite, NULL);
printf("\n### original string ###\n%s\n", lpBuffer);

// #6. 修改数据
for (i = 0; i < dwNumOfBytesToWrite; i++)
{
if (0x61 <= lpBuffer[i] && lpBuffer[i] <= 0x7A)
lpBuffer[i] -= 0x20;
}

printf("\n### converted string ###\n%s\n", lpBuffer);

// #7. 调用原函数
WriteProcessMemory(CreateProcessDebugInfomation.hProcess, (LPVOID)dwAddrOfBuffer,
lpBuffer, dwNumOfBytesToWrite, NULL);
free(lpBuffer);
// 设置EIP的值来实现正常运行,注意EIP的值为0xcc的下一条指令的地址。
Context.Rip = (DWORD64)WriteFileAddress;
SetThreadContext(CreateProcessDebugInfomation.hThread, &Context);

// 运行
ContinueDebugEvent(pDebugEvent->dwProcessId, pDebugEvent->dwThreadId, DBG_CONTINUE);
Sleep(0);

// 再次钩取
WriteProcessMemory(CreateProcessDebugInfomation.hProcess, WriteFileAddress,
&INT3, sizeof(BYTE), NULL);

return TRUE;
}
}

return FALSE;
}

void DebugLoop()
{
DEBUG_EVENT DebugEvent;
DWORD dwContinueStatus;

// 等待调试事件
while (WaitForDebugEvent(&DebugEvent, INFINITE))
{
dwContinueStatus = DBG_CONTINUE;

// 调试事件为创建进程
if (CREATE_PROCESS_DEBUG_EVENT == DebugEvent.dwDebugEventCode)
{
OnCreateProcessDebugEvent(&DebugEvent);
}
// 调试事件
else if (EXCEPTION_DEBUG_EVENT == DebugEvent.dwDebugEventCode)
{
if (OnExceptionDebugEvent(&DebugEvent))
continue;
}
// 调试进程退出
else if (EXIT_PROCESS_DEBUG_EVENT == DebugEvent.dwDebugEventCode)
{

break;
}


ContinueDebugEvent(DebugEvent.dwProcessId, DebugEvent.dwThreadId, dwContinueStatus);
}
}
DWORD traverseProcesses() {
PROCESSENTRY32 pe32;
pe32.dwSize = sizeof(pe32);
HANDLE hProcessSnap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (hProcessSnap == INVALID_HANDLE_VALUE) {
printf("Create snap Error!\n");
return -1;
}
BOOL bResult = Process32First(hProcessSnap, &pe32);
int num(0);
while (bResult) {
_bstr_t b(pe32.szExeFile);
if (!strcmp(b, "notepad.exe")) {
cout <<"find: "<<b<<" "<< pe32.th32ProcessID << endl;
return pe32.th32ProcessID;
}
bResult = Process32Next(hProcessSnap, &pe32);
}
return -1;
}
void debugHook(DWORD pid) {
printf("attach pid %d\n", pid);
if (!DebugActiveProcess(pid)) {
printf("attach Failed %d\n",GetLastError());
exit(-1);
}
DebugLoop();
}
int main() {
DWORD pid = traverseProcesses();
debugHook(pid);
return 0;
}

注入Hook

核心思想是修改API代码,使用DLL注入技术,将Hook的代码注入到另一进程,此时DLL在B进程的内存中,就有权限直接修改B内存中的代码了。

以下内容需要了解dll注入技术。

IAT Hook

修改IAT里的函数地址对API进行Hook

把IAT表中API的地址修改为恶意代码地址,就可以实现Hook效果

要hook的dll: 在main函数中计算IAT的位置并且修改对应的代码

  1. 穷举所有模块,找到要hook的模块

  2. 修改内存属性

  3. 替换iat表中表项

  4. 改回内存属性

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
#include "pch.h"
#include <tchar.h>
#include <iostream>
#include <fstream>
#include <stdio.h>

using namespace std;

// 加载静态链接库
#pragma comment(lib,"urlmon.lib")
// dllMain函数是程序的入口点
HMODULE hMod = NULL;
PBYTE pAddr = NULL;
DWORD64 dwRVA;
PIMAGE_IMPORT_DESCRIPTOR pImportDesc;
LPCSTR szLibName;
char szDllName[] = "kernel32.dll";
PIMAGE_THUNK_DATA pThunk;
DWORD dwOldProtect;

typedef BOOL (*FnWriteFile)(
HANDLE hFile,
LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped
);

FnWriteFile pfnOld = nullptr;

BOOL pfnNew(HANDLE hFile,
LPCVOID lpBuffer,
DWORD nNumberOfBytesToWrite,
LPDWORD lpNumberOfBytesWritten,
LPOVERLAPPED lpOverlapped){

char szHookText[] = "IBinary -> Iat Hook";
MessageBoxA(NULL, "Successed", (LPCSTR)lpBuffer, MB_OK);
if (pfnOld != nullptr)
{
return pfnOld(hFile,
lpBuffer,
nNumberOfBytesToWrite,
lpNumberOfBytesWritten,
lpOverlapped);//调用以前的
}
return FALSE;
}
void iatHook()
{
MessageBoxA(NULL, "开始进行HOOK", NULL, NULL);
FARPROC pHookAddress = GetProcAddress(GetModuleHandleA("kernel32.dll"), "WriteFile"); //你要HOOK的函数.
if (nullptr == pHookAddress)
{
OutputDebugString(TEXT("获取函数地址失败"));
MessageBoxA(NULL, "获取函数地址失败HOOK", NULL, NULL);

return;
}
pfnOld = (FnWriteFile)pHookAddress; //保存旧的函数指针.
//解析PE头.寻找IAT.

HMODULE hModImageBase = GetModuleHandle(NULL);//获取当前的ImagBase
PIMAGE_DOS_HEADER pDosHead = (PIMAGE_DOS_HEADER)(DWORD64)hModImageBase; //获取DOS头
DWORD64 dwTemp = (DWORD64)pDosHead + (DWORD64)pDosHead->e_lfanew;
PIMAGE_NT_HEADERS pNtHead = (PIMAGE_NT_HEADERS)dwTemp;
PIMAGE_FILE_HEADER pFileHead = (PIMAGE_FILE_HEADER)&pNtHead->FileHeader;
PIMAGE_OPTIONAL_HEADER pOptHead = (PIMAGE_OPTIONAL_HEADER)&pNtHead->OptionalHeader;

//寻找导出表的位置.
DWORD dwExportLocal = pOptHead->DataDirectory[1].VirtualAddress; //找到导出表偏移.
//定位到导出表
dwTemp = (DWORD64)GetModuleHandle(NULL) + dwExportLocal;
PIMAGE_IMPORT_DESCRIPTOR pImport = (PIMAGE_IMPORT_DESCRIPTOR)dwTemp;
PIMAGE_IMPORT_DESCRIPTOR pCurrent = pImport;
DWORD64* pFirstThunk; //导入表子表,也就是IAT存储函数地址的表.
//遍历导入表

while (pCurrent->Characteristics && pCurrent->FirstThunk != NULL)
{
dwTemp = pCurrent->FirstThunk + (DWORD64)GetModuleHandle(NULL);//找到导入表
pFirstThunk = (DWORD64*)dwTemp; //加上偏移才是真正的导入表.
while (*(DWORD64*)pFirstThunk != NULL)
{
//遍历子表
if (*(DWORD64*)pFirstThunk == (DWORD64)pfnOld)
{
//找到要修改的导入表了//修改内存保护属性.写入我们新的函数地址.
DWORD oldProtected;
VirtualProtect(pFirstThunk, 0x1000, PAGE_EXECUTE_READWRITE, &oldProtected);
dwTemp = (DWORD64)pfnNew;
memcpy(pFirstThunk, (DWORD64*)&dwTemp, 8); //将变量中保存的函数地址拷贝到导入表中.
VirtualProtect(pFirstThunk, 0x1000, oldProtected, &oldProtected);
}
pFirstThunk++; //继续遍历.
}
pCurrent++; //每次是加一个导入表结构.
}

}

BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
){
HANDLE hThread = NULL;
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
iatHook();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

Inline Hook

直接修改内存中任意函数的代码,将其劫持至Hook API。劫持后先进行“脱钩”,即能正常调用原函数,执行完毕后再次Hook。

步骤:

  1. 修改被hook函数的前几个字节,使其跳转到恶意函数

  2. 恶意函数的操作

    • 修复函数

    • 执行原函数

    • 执行恶意操作

    • 最后要把函数修改以便下次hook

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
#include "pch.h"
#include <tchar.h>
#include <iostream>
#include <fstream>
#include <stdio.h>

using namespace std;
// 加载静态链接库
#pragma comment(lib,"urlmon.lib")
DWORD dwOldProtect;

typedef void (*FnPrintHello)(void);

FnPrintHello pfnOld = nullptr;


BYTE pOldBytes[5];

BOOL pfnNew(HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType);
BOOL inlineHook() {
MessageBoxA(NULL, "start", "StartHook", MB_OK);
DWORD dwOldProtect;
DWORD64 dwAddress;
BYTE pBuf[5] = { 0xE9,0, };
PBYTE pByte;
pfnOld = (FnPrintHello)((0x140011C20LL - 0x140001000+ 0x1000LL) + (DWORD64)GetModuleHandleA("Project1.exe"));
pByte = (PBYTE)pfnOld;
// 已经被hook
if (pByte[0] == 0xE9)return FALSE;
VirtualProtect((LPVOID)pfnOld, 5, PAGE_EXECUTE_READWRITE, &dwOldProtect);
memcpy(pOldBytes, pfnOld, 5);
// 计算相对偏移
dwAddress = (DWORD64)pfnNew - (DWORD64)pfnOld - 5;
cout <<hex<< dwAddress << endl;
memcpy(&pBuf[1], &dwAddress, 4);
// hook
memcpy(pfnOld, pBuf, 5);
VirtualProtect((LPVOID)pfnOld, 5, dwOldProtect, &dwOldProtect);
return TRUE;
}
BOOL inlineUnHook() {
DWORD dwOldProtect;
BYTE pBuf[5] = { 0xE9,0, };
PBYTE pByte;
// 这里是使用IDA查看的printHello函数地址+基址+text段基址
pfnOld = (FnPrintHello)((0x140011C20LL - 0x140001000LL+0x1000)+(DWORD64)GetModuleHandleA("Project1.exe"));
pByte = (PBYTE)pfnOld;
VirtualProtect((LPVOID)pfnOld, 5, PAGE_EXECUTE_READWRITE, &dwOldProtect);
memcpy(pBuf, pOldBytes,5);
// hook
memcpy(pfnOld, pBuf, 5);
VirtualProtect((LPVOID)pfnOld, 5, dwOldProtect, &dwOldProtect);
return TRUE;
}
BOOL pfnNew(HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType){

char szHookText[] = "IBinary -> Iat Hook";
MessageBoxA(NULL, "Successed", (LPCSTR)lpText, MB_OK);
// unhook
inlineUnHook();

BOOL result=FALSE;
if (pfnOld != nullptr){
pfnOld();//调用以前的
}
// hook again
inlineHook();
return result;
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
){
HANDLE hThread = NULL;
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
inlineHook();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}

被Hook的程序代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include <iostream>
#include <stdio.h>
#include <Windows.h>

void printHello() {
printf("HelloWorld\n");
}
int main() {
// 这里是应用程序自己加载,当然也可以dll注入
LoadLibraryA("myhackdll.dll");
printHello();

return 0;
}

HotFix Hook

上面的Hook方法存在效率问题(每次都需要修改程序的前5字节),并且不支持多线程。HotFix Hook可以解决这些问题。

API函数以 MOV EDI,EDI开始,并且上方有5个NOP指令。可以利用这7个字节来进行Hook操作。

当API被调用时,先jmp short至上面5个字节,然后再jmp至恶意代码。

代码实现(还未实验)

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
#include "pch.h"
#include <tchar.h>
#include <iostream>
#include <fstream>
#include <stdio.h>

using namespace std;

// 加载静态链接库
#pragma comment(lib,"urlmon.lib")
DWORD dwOldProtect;
ofstream ofs("hack.txt");

typedef BOOL(*FnMessageBoxA)(
HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType
);

FnMessageBoxA pfnOld = nullptr;
FnMessageBoxA realFn = nullptr;

BOOL pfnNew(HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType);
BOOL hotfixHook() {
DWORD dwOldProtect;
DWORD64 dwAddress;
PBYTE pByte;
MessageBoxA(NULL, "Start", "Hook start!!", MB_OK);
pfnOld = (FnMessageBoxA)GetProcAddress(GetModuleHandleA("user32.dll"),"MessageBoxA");
realFn = (FnMessageBoxA)((DWORD64)pfnOld + 2);
BYTE pBuf[5] = { 0xE9,0, };
BYTE pBuf2[2] = { 0xEB,0xF9 };

pByte = (PBYTE)pfnOld;
if (pByte[0] == 0xEB)
return FALSE;
VirtualProtect((LPVOID)((DWORD64)pfnOld - 5), 7, PAGE_EXECUTE_READWRITE, &dwOldProtect);
// 计算目标地址
dwAddress = (DWORD)pfnNew - (DWORD)pfnOld;
memcpy(&pBuf[1], &dwAddress, 4);
// hook
memcpy((LPVOID)((DWORD)pfnOld - 5), pBuf, 5);
memcpy(pfnOld, pBuf2, 2);
// 改回内存属性
VirtualProtect((LPVOID)((DWORD64)pfnOld - 5), 7, dwOldProtect, &dwOldProtect);
return TRUE;
}

BOOL pfnNew(HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType){

ofs << "Your infomation is mine!!" << endl;
BOOL result=FALSE;
if (pfnOld != nullptr){
realFn(hWnd,lpText,lpCaption,uType);//调用以前的
}
return result;
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
){
HANDLE hThread = NULL;
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
hotfixHook();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
ofs.close();
break;
}
return TRUE;
}

并不是所有都适用,如果没有7字节,只能用5字节修改技术。

SSDT Hook

用户层API最后的实质也是内核层API(Kernel32->Ntdll->Ntoskrnl)

该Hook方法最为强大

内核通过SSDT(System Device Descriptor Table)调用各种函数,SSDT是一个函数表,得到一个索引值,就能根据这个索引值在该表中得到想要的地址。

先找到SSDT的首地址,然后就可以根据索引,找到相应的函数

找索引号

1
u nt!函数名

根据反汇编结果找到索引号

内核Hook步骤

  1. 修改内存属性为RWX

  2. 拼接汇编代码jmp [Hook Func]

  3. 保存源代码头5个字节

  4. 将头5个字节替换为2的汇编码

  5. 恢复前5字节

  6. 恢复内存属性

由于内核层hook需要有权限,所以使用驱动方法

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
#include <ntifs.h>

//内核之SSDT-HOOK
//系统服务表
typedef struct _KSYSTEM_SERVICE_TABLE
{
PULONG ServiceTableBase; //函数地址表的首地址
PULONG ServiceCounterTableBase;//函数表中每个函数被调用的次数
ULONG NumberOfService; //服务函数的个数
ULONG ParamTableBase; //参数个数表首地址
}KSYSTEM_SERVICE_TABLE;

//服务描述符
typedef struct _KSERVICE_TABLE_DESCRIPTOR
{
KSYSTEM_SERVICE_TABLE ntoskrnl;//ntoskrnl.exe的服务函数,SSDT
KSYSTEM_SERVICE_TABLE win32k; //win32k.sys的服务函数,ShadowSSDT
KSYSTEM_SERVICE_TABLE notUsed1;//暂时没用1
KSYSTEM_SERVICE_TABLE notUsed2;//暂时没用2
}KSERVICE_TABLE_DESCRIPTOR;

//定义HOOK的函数的类型
typedef NTSTATUS (NTAPI*FuZwOpenProcess)(
_Out_ PHANDLE ProcessHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_In_opt_ PCLIENT_ID ClientId
);

//自写的函数声明
NTSTATUS NTAPI MyZwOpenProcess(
_Out_ PHANDLE ProcessHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_In_opt_ PCLIENT_ID ClientId
);

//记录系统的该函数
FuZwOpenProcess g_OldZwOpenProcess;
//服务描述符表指针
KSERVICE_TABLE_DESCRIPTOR* g_pServiceTable = NULL;
//要保护进程的ID
ULONG g_Pid = 9527;

//安装钩子
void InstallHook();
//卸载钩子
void UninstallHook();
//关闭页写入保护
void ShutPageProtect();
//开启页写入保护
void OpenPageProtect();

//卸载驱动
void OutLoad(DRIVER_OBJECT* obj);



////***驱动入口主函数***/
NTSTATUS DriverEntry(DRIVER_OBJECT* driver, UNICODE_STRING* path)
{
path;
KdPrint(("驱动启动成功!\n"));
//DbgBreakPoint();

//安装钩子
InstallHook();

driver->DriverUnload = OutLoad;
return STATUS_SUCCESS;
}

//卸载驱动
void OutLoad(DRIVER_OBJECT* obj)
{
obj;
//卸载钩子
UninstallHook();
}

//安装钩子
void InstallHook()
{
//1.获取KTHREAD
PETHREAD pNowThread = PsGetCurrentThread();
//2.获取ServiceTable表
g_pServiceTable = (KSERVICE_TABLE_DESCRIPTOR*)
(*(ULONG*)((ULONG)pNowThread + 0xbc));
//3.保存旧的函数
g_OldZwOpenProcess = (FuZwOpenProcess)
g_pServiceTable->ntoskrnl.ServiceTableBase[0xbe];
//4.关闭页只读保护
ShutPageProtect();
//5.写入自己的函数到SSDT表内
g_pServiceTable->ntoskrnl.ServiceTableBase[0xbe]
= (ULONG)MyZwOpenProcess;
//6.开启页只读保护
OpenPageProtect();
}

//卸载钩子
void UninstallHook()
{
//1.关闭页只读保护
ShutPageProtect();
//2.写入原来的函数到SSDT表内
g_pServiceTable->ntoskrnl.ServiceTableBase[0xbe]
= (ULONG)g_OldZwOpenProcess;
//3.开启页只读保护
OpenPageProtect();
}

//关闭页只读保护
void _declspec(naked) ShutPageProtect()
{
__asm
{
push eax;
mov eax, cr0;
and eax, ~0x10000;
mov cr0, eax;
pop eax;
ret;
}
}

//开启页只读保护
void _declspec(naked) OpenPageProtect()
{
__asm
{
push eax;
mov eax, cr0;
or eax, 0x10000;
mov cr0, eax;
pop eax;
ret;
}
}

//自写的函数
NTSTATUS NTAPI MyZwOpenProcess(
_Out_ PHANDLE ProcessHandle,
_In_ ACCESS_MASK DesiredAccess,
_In_ POBJECT_ATTRIBUTES ObjectAttributes,
_In_opt_ PCLIENT_ID ClientId
)
{
//当此进程为要保护的进程时
if (ClientId->UniqueProcess == (HANDLE)g_Pid &&
DesiredAccess == PROCESS_TERMINATE)
{
//设为拒绝访问
DesiredAccess = 0;
}
//调用原函数
return g_OldZwOpenProcess(
ProcessHandle,
DesiredAccess,
ObjectAttributes,
ClientId);
}

参考资料

[1] HOOK实例之一:实现键盘钩子截获密码等键盘输入(vs2013详细流程)_Childe_Mu的博客-CSDN博客

[2] Hooks Overview - Win32 apps | Microsoft Docs

[3] C++ Hook 键盘记录器_LYSM-CSDN博客

[4] c++ 遍历获取所有进程名及PID_o_ohello的博客-CSDN博客

[5] IAT Hook - iBinary - 博客园

[6] [原创]SSDT-HOOK–看雪

[7] Windows Hook原理与实现_安全杂货铺-CSDN博客