-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathothers.ll
3865 lines (3338 loc) · 179 KB
/
others.ll
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
; ModuleID = 'bench/clamav/original/others.ll'
source_filename = "bench/clamav/original/others.ll"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
%struct.timeval = type { i64, i64 }
%struct.recursion_level_tag = type { i32, i64, ptr, i32, i32, i32, %struct.image_fuzzy_hash, i8 }
%struct.image_fuzzy_hash = type { [8 x i8] }
%struct.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
@have_rar = local_unnamed_addr global i32 0, align 4
@cli_debug_flag = external local_unnamed_addr global i8, align 1
@cli_always_gen_section_hash = external local_unnamed_addr global i8, align 1
@.str = private unnamed_addr constant [20 x i8] c"No viruses detected\00", align 1
@.str.1 = private unnamed_addr constant [19 x i8] c"Virus(es) detected\00", align 1
@.str.2 = private unnamed_addr constant [33 x i8] c"Null argument passed to function\00", align 1
@.str.3 = private unnamed_addr constant [36 x i8] c"Invalid argument passed to function\00", align 1
@.str.4 = private unnamed_addr constant [19 x i8] c"Malformed database\00", align 1
@.str.5 = private unnamed_addr constant [25 x i8] c"Broken or not a CVD file\00", align 1
@.str.6 = private unnamed_addr constant [32 x i8] c"Can't verify database integrity\00", align 1
@.str.7 = private unnamed_addr constant [23 x i8] c"Can't unpack some data\00", align 1
@.str.8 = private unnamed_addr constant [17 x i8] c"Can't parse data\00", align 1
@.str.9 = private unnamed_addr constant [29 x i8] c"Can't open file or directory\00", align 1
@.str.10 = private unnamed_addr constant [22 x i8] c"Can't create new file\00", align 1
@.str.11 = private unnamed_addr constant [18 x i8] c"Can't unlink file\00", align 1
@.str.12 = private unnamed_addr constant [22 x i8] c"Can't get file status\00", align 1
@.str.13 = private unnamed_addr constant [16 x i8] c"Can't read file\00", align 1
@.str.14 = private unnamed_addr constant [22 x i8] c"Can't set file offset\00", align 1
@.str.15 = private unnamed_addr constant [20 x i8] c"Can't write to file\00", align 1
@.str.16 = private unnamed_addr constant [32 x i8] c"Can't duplicate file descriptor\00", align 1
@.str.17 = private unnamed_addr constant [18 x i8] c"Can't access file\00", align 1
@.str.18 = private unnamed_addr constant [28 x i8] c"Can't create temporary file\00", align 1
@.str.19 = private unnamed_addr constant [33 x i8] c"Can't create temporary directory\00", align 1
@.str.20 = private unnamed_addr constant [27 x i8] c"Can't map file into memory\00", align 1
@.str.21 = private unnamed_addr constant [22 x i8] c"Can't allocate memory\00", align 1
@.str.22 = private unnamed_addr constant [20 x i8] c"Exceeded time limit\00", align 1
@.str.23 = private unnamed_addr constant [29 x i8] c"Exceeded max recursion depth\00", align 1
@.str.24 = private unnamed_addr constant [23 x i8] c"Exceeded max scan size\00", align 1
@.str.25 = private unnamed_addr constant [24 x i8] c"Exceeded max scan files\00", align 1
@.str.26 = private unnamed_addr constant [26 x i8] c"Bad format or broken data\00", align 1
@.str.27 = private unnamed_addr constant [32 x i8] c"Error during bytecode execution\00", align 1
@.str.28 = private unnamed_addr constant [29 x i8] c"Failure in bytecode testmode\00", align 1
@.str.29 = private unnamed_addr constant [18 x i8] c"Mutex lock failed\00", align 1
@.str.30 = private unnamed_addr constant [21 x i8] c"Scanner still active\00", align 1
@.str.31 = private unnamed_addr constant [59 x i8] c"Bad state (engine not initialized, or already initialized)\00", align 1
@.str.32 = private unnamed_addr constant [18 x i8] c"Unspecified error\00", align 1
@.str.33 = private unnamed_addr constant [51 x i8] c"The scanned object was verified and deemed trusted\00", align 1
@.str.34 = private unnamed_addr constant [19 x i8] c"Unknown error code\00", align 1
@.str.35 = private unnamed_addr constant [178 x i8] c"Unexpected problem occurred while setting up rust logging... continuing without rust logging. Please submit an issue to https://github.com/Cisco-Talos/clamav\00", align 1
@.str.36 = private unnamed_addr constant [52 x i8] c"cl_engine_new: Can't allocate memory for cl_engine\0A\00", align 1
@.str.37 = private unnamed_addr constant [54 x i8] c"cl_engine_new: Can't allocate memory for memory pool\0A\00", align 1
@.str.38 = private unnamed_addr constant [48 x i8] c"cl_engine_new: Can't allocate memory for roots\0A\00", align 1
@.str.39 = private unnamed_addr constant [55 x i8] c"cl_engine_new: Can't initialize dynamic configuration\0A\00", align 1
@.str.40 = private unnamed_addr constant [52 x i8] c"cl_engine_new: Can't initialize password databases\0A\00", align 1
@.str.41 = private unnamed_addr constant [51 x i8] c"cl_engine_new: Can't initialize root certificates\0A\00", align 1
@.str.42 = private unnamed_addr constant [57 x i8] c"cli_engine_new: Cannot initialize stats gathering mutex\0A\00", align 1
@.str.43 = private unnamed_addr constant [43 x i8] c"cli_engine_new: failed to initialize YARA\0A\00", align 1
@.str.44 = private unnamed_addr constant [23 x i8] c"Initialized %s engine\0A\00", align 1
@.str.45 = private unnamed_addr constant [128 x i8] c"Max file-size was set to %lld bytes. Unfortunately, scanning files greater than 2147483647 bytes (2 GiB - 1) is not supported.\0A\00", align 1
@.str.46 = private unnamed_addr constant [64 x i8] c"MaxRecursion: the value of 0 is not allowed, using default: %u\0A\00", align 1
@.str.47 = private unnamed_addr constant [67 x i8] c"MaxEmbeddedPE: negative values are not allowed, using default: %u\0A\00", align 1
@.str.48 = private unnamed_addr constant [70 x i8] c"MaxHTMLNormalize: negative values are not allowed, using default: %u\0A\00", align 1
@.str.49 = private unnamed_addr constant [67 x i8] c"MaxHTMLNoTags: negative values are not allowed, using default: %u\0A\00", align 1
@.str.50 = private unnamed_addr constant [72 x i8] c"MaxScriptNormalize: negative values are not allowed, using default: %u\0A\00", align 1
@.str.51 = private unnamed_addr constant [67 x i8] c"MaxZipTypeRcg: negative values are not allowed, using default: %u\0A\00", align 1
@.str.52 = private unnamed_addr constant [43 x i8] c"cl_engine_set_num: The field is read only\0A\00", align 1
@.str.53 = private unnamed_addr constant [88 x i8] c"cl_engine_set_num: CL_ENGINE_BYTECODE_SECURITY cannot be set after engine was compiled\0A\00", align 1
@.str.54 = private unnamed_addr constant [84 x i8] c"cl_engine_set_num: CL_ENGINE_BYTECODE_MODE cannot be set after engine was compiled\0A\00", align 1
@.str.55 = private unnamed_addr constant [85 x i8] c"cl_engine_set_num: CL_BYTECODE_MODE_OFF is not settable, use dboptions to turn off!\0A\00", align 1
@.str.56 = private unnamed_addr constant [30 x i8] c"bytecode engine in test mode\0A\00", align 1
@.str.57 = private unnamed_addr constant [43 x i8] c"cl_engine_set_num: Incorrect field number\0A\00", align 1
@.str.58 = private unnamed_addr constant [35 x i8] c"cl_engine_get_num: engine == NULL\0A\00", align 1
@.str.59 = private unnamed_addr constant [39 x i8] c"cl_engine_get: Incorrect field number\0A\00", align 1
@.str.60 = private unnamed_addr constant [35 x i8] c"cl_engine_get_str: engine == NULL\0A\00", align 1
@.str.61 = private unnamed_addr constant [70 x i8] c"cl_engine_settings_copy: Unable to allocate memory for settings %llu\0A\00", align 1
@.str.62 = private unnamed_addr constant [78 x i8] c"%s: scanning may be incomplete and additional analysis needed for this file.\0A\00", align 1
@.str.63 = private unnamed_addr constant [66 x i8] c"%s: scansize exceeded (initial: %lu, consumed: %lu, needed: %lu)\0A\00", align 1
@.str.64 = private unnamed_addr constant [39 x i8] c"Heuristics.Limits.Exceeded.MaxScanSize\00", align 1
@.str.65 = private unnamed_addr constant [51 x i8] c"%s: filesize exceeded (allowed: %lu, needed: %lu)\0A\00", align 1
@.str.66 = private unnamed_addr constant [39 x i8] c"Heuristics.Limits.Exceeded.MaxFileSize\00", align 1
@.str.67 = private unnamed_addr constant [35 x i8] c"%s: files limit reached (max: %u)\0A\00", align 1
@.str.68 = private unnamed_addr constant [36 x i8] c"Heuristics.Limits.Exceeded.MaxFiles\00", align 1
@.str.69 = private unnamed_addr constant [17 x i8] c"cli_updatelimits\00", align 1
@.str.70 = private unnamed_addr constant [39 x i8] c"Heuristics.Limits.Exceeded.MaxScanTime\00", align 1
@.str.71 = private unnamed_addr constant [4 x i8] c"md5\00", align 1
@.str.72 = private unnamed_addr constant [5 x i8] c"sha1\00", align 1
@.str.73 = private unnamed_addr constant [7 x i8] c"sha256\00", align 1
@.str.74 = private unnamed_addr constant [5 x i8] c"%02x\00", align 1
@.str.75 = private unnamed_addr constant [3 x i8] c"rb\00", align 1
@.str.76 = private unnamed_addr constant [36 x i8] c"cli_hashfile(): Can't open file %s\0A\00", align 1
@.str.77 = private unnamed_addr constant [40 x i8] c"cli_unlink: unlink failure for %s - %s\0A\00", align 1
@.str.78 = private unnamed_addr constant [5 x i8] c"PUA.\00", align 1
@.str.79 = private unnamed_addr constant [12 x i8] c"Heuristics.\00", align 1
@.str.80 = private unnamed_addr constant [15 x i8] c"BC.Heuristics.\00", align 1
@.str.81 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
@.str.82 = private unnamed_addr constant [25 x i8] c"cli_recursion_stack_push\00", align 1
@.str.83 = private unnamed_addr constant [89 x i8] c"cli_recursion_stack_push: Some content was skipped. The scan result will not be cached.\0A\00", align 1
@.str.84 = private unnamed_addr constant [74 x i8] c"cli_recursion_stack_push: Archive recursion limit exceeded (%u, max: %u)\0A\00", align 1
@.str.85 = private unnamed_addr constant [40 x i8] c"Heuristics.Limits.Exceeded.MaxRecursion\00", align 1
@.str.86 = private unnamed_addr constant [76 x i8] c"cli_recursion_stack_pop: recursion_level == 0, cannot pop off more layers!\0A\00", align 1
@.str.87 = private unnamed_addr constant [53 x i8] c"cli_rmdirs: Can't remove temporary directory %s: %s\0A\00", align 1
@.str.90 = private unnamed_addr constant [53 x i8] c"cli_rmdirs: Unable to allocate memory for path %llu\0A\00", align 1
@.str.91 = private unnamed_addr constant [6 x i8] c"%s/%s\00", align 1
@.str.92 = private unnamed_addr constant [76 x i8] c"cli_rmdirs: Can't remove some temporary directories due to access problem.\0A\00", align 1
@.str.93 = private unnamed_addr constant [46 x i8] c"cli_rmdirs: Can't remove nested directory %s\0A\00", align 1
@.str.94 = private unnamed_addr constant [56 x i8] c"cli_bitset_init: Unable to allocate memory for bs %llu\0A\00", align 1
@.str.95 = private unnamed_addr constant [62 x i8] c"cli_bitset_init: Unable to allocate memory for bs->bitset %u\0A\00", align 1
@cli_unrar_open = local_unnamed_addr global ptr null, align 8
@cli_unrar_peek_file_header = local_unnamed_addr global ptr null, align 8
@cli_unrar_extract_file = local_unnamed_addr global ptr null, align 8
@cli_unrar_skip_file = local_unnamed_addr global ptr null, align 8
@cli_unrar_close = local_unnamed_addr global ptr null, align 8
@is_rar_inited = internal unnamed_addr global i1 false, align 4
@.str.96 = private unnamed_addr constant [19 x i8] c"libclamunrar_iface\00", align 1
@.str.97 = private unnamed_addr constant [6 x i8] c"unrar\00", align 1
@.str.98 = private unnamed_addr constant [34 x i8] c"libclamunrar_iface_LTX_unrar_open\00", align 1
@.str.99 = private unnamed_addr constant [46 x i8] c"libclamunrar_iface_LTX_unrar_peek_file_header\00", align 1
@.str.100 = private unnamed_addr constant [42 x i8] c"libclamunrar_iface_LTX_unrar_extract_file\00", align 1
@.str.101 = private unnamed_addr constant [39 x i8] c"libclamunrar_iface_LTX_unrar_skip_file\00", align 1
@.str.102 = private unnamed_addr constant [35 x i8] c"libclamunrar_iface_LTX_unrar_close\00", align 1
@.str.103 = private unnamed_addr constant [43 x i8] c"Failed to load function from UnRAR module\0A\00", align 1
@.str.104 = private unnamed_addr constant [19 x i8] c"Version mismatch?\0A\00", align 1
@.str.105 = private unnamed_addr constant [27 x i8] c"UnRAR support unavailable\0A\00", align 1
@load_module.suffixes = internal unnamed_addr constant [4 x ptr] [ptr @.str.106, ptr @.str.107, ptr @.str.108, ptr @.str.109], align 16
@.str.106 = private unnamed_addr constant [11 x i8] c".so.12.0.3\00", align 1
@.str.107 = private unnamed_addr constant [7 x i8] c".so.12\00", align 1
@.str.108 = private unnamed_addr constant [4 x i8] c".so\00", align 1
@.str.109 = private unnamed_addr constant [4 x i8] c"..a\00", align 1
@.str.110 = private unnamed_addr constant [16 x i8] c"LD_LIBRARY_PATH\00", align 1
@.str.111 = private unnamed_addr constant [39 x i8] c"searching for %s, LD_LIBRARY_PATH: %s\0A\00", align 1
@.str.112 = private unnamed_addr constant [8 x i8] c"%s/%s%s\00", align 1
@.str.113 = private unnamed_addr constant [27 x i8] c"%s support loaded from %s\0A\00", align 1
@.str.114 = private unnamed_addr constant [32 x i8] c"searching for %s: %s not found\0A\00", align 1
@.str.115 = private unnamed_addr constant [39 x i8] c"searching for %s, user-searchpath: %s\0A\00", align 1
@.str.116 = private unnamed_addr constant [15 x i8] c"/usr/local/lib\00", align 1
@.str.117 = private unnamed_addr constant [58 x i8] c"Cannot dlopen %s: Unknown error - %s support unavailable\0A\00", align 1
@.str.118 = private unnamed_addr constant [47 x i8] c"Cannot dlopen %s: %s - %s support unavailable\0A\00", align 1
@.str.119 = private unnamed_addr constant [45 x i8] c"Failed to get function \22%s\22: Unknown error.\0A\00", align 1
@.str.120 = private unnamed_addr constant [33 x i8] c"Failed to get function \22%s\22: %s\0A\00", align 1
@.str.121 = private unnamed_addr constant [46 x i8] c"Failed to add indicator to scan evidence: %s\0A\00", align 1
@.str.122 = private unnamed_addr constant [8 x i8] c"Viruses\00", align 1
@.str.123 = private unnamed_addr constant [50 x i8] c"cli_append_virus: no memory for json virus array\0A\00", align 1
@.str.124 = private unnamed_addr constant [56 x i8] c"cli_append_virus: no memory for json virus name object\0A\00", align 1
@switch.table.cl_strerror = private unnamed_addr constant [35 x ptr] [ptr @.str, ptr @.str.1, ptr @.str.2, ptr @.str.3, ptr @.str.4, ptr @.str.5, ptr @.str.6, ptr @.str.7, ptr @.str.9, ptr @.str.10, ptr @.str.11, ptr @.str.12, ptr @.str.13, ptr @.str.14, ptr @.str.15, ptr @.str.16, ptr @.str.17, ptr @.str.18, ptr @.str.19, ptr @.str.20, ptr @.str.21, ptr @.str.22, ptr @.str.34, ptr @.str.23, ptr @.str.24, ptr @.str.25, ptr @.str.26, ptr @.str.8, ptr @.str.27, ptr @.str.28, ptr @.str.29, ptr @.str.30, ptr @.str.31, ptr @.str.33, ptr @.str.32], align 8
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: none, inaccessiblemem: none) uwtable
define void @cl_debug() local_unnamed_addr #0 {
store i8 1, ptr @cli_debug_flag, align 1, !tbaa !3
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: none, inaccessiblemem: none) uwtable
define void @cl_always_gen_section_hash() local_unnamed_addr #0 {
store i8 1, ptr @cli_always_gen_section_hash, align 1, !tbaa !3
ret void
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define noundef i32 @cl_retflevel() local_unnamed_addr #1 {
ret i32 220
}
; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) uwtable
define noundef nonnull ptr @cl_strerror(i32 noundef %0) local_unnamed_addr #1 {
%2 = icmp ult i32 %0, 35
br i1 %2, label %switch.lookup, label %4
switch.lookup: ; preds = %1
%3 = zext nneg i32 %0 to i64
%switch.gep = getelementptr inbounds nuw [35 x ptr], ptr @switch.table.cl_strerror, i64 0, i64 %3
%switch.load = load ptr, ptr %switch.gep, align 8
br label %4
4: ; preds = %1, %switch.lookup
%.0 = phi ptr [ %switch.load, %switch.lookup ], [ @.str.34, %1 ]
ret ptr %.0
}
; Function Attrs: nounwind uwtable
define i32 @cl_init(i32 noundef %0) local_unnamed_addr #2 {
%2 = alloca [512 x i8], align 16
%3 = alloca [10 x ptr], align 16
%4 = alloca %struct.timeval, align 8
call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #24
%5 = tail call i32 @getpid() #24
%6 = tail call zeroext i1 @clrs_log_init() #24
br i1 %6, label %8, label %7
7: ; preds = %1
tail call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.35) #24
br label %8
8: ; preds = %7, %1
%9 = tail call i32 @cl_initialize_crypto() #24
%.b.i = load i1, ptr @is_rar_inited, align 4
br i1 %.b.i, label %rarload.exit, label %10
10: ; preds = %8
store i1 true, ptr @is_rar_inited, align 4
%11 = load i32, ptr @have_rar, align 4, !tbaa !6
%.not.i = icmp eq i32 %11, 0
br i1 %.not.i, label %12, label %rarload.exit
12: ; preds = %10
call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #24
%13 = tail call ptr @getenv(ptr noundef nonnull @.str.110) #24
%.not.i.i = icmp eq ptr %13, null
br i1 %.not.i.i, label %31, label %14
14: ; preds = %12
%char0.i.i = load i8, ptr %13, align 1
%.not47.i.i = icmp eq i8 %char0.i.i, 0
br i1 %.not47.i.i, label %31, label %15
15: ; preds = %14
call void @llvm.lifetime.start.p0(i64 80, ptr nonnull %3) #24
%16 = tail call noalias ptr @strdup(ptr noundef nonnull %13) #24
%17 = call i64 @cli_strtokenize(ptr noundef %16, i8 noundef signext 58, i64 noundef 10, ptr noundef nonnull %3) #24
%.not8.i.i = icmp eq i64 %17, 0
br i1 %.not8.i.i, label %.thread.i.i, label %.lr.ph.i.i
.thread.i.i: ; preds = %28, %15
call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #24
br label %31
.lr.ph.i.i: ; preds = %15, %28
%.0356.i.i = phi i64 [ %29, %28 ], [ 0, %15 ]
%18 = getelementptr inbounds nuw [10 x ptr], ptr %3, i64 0, i64 %.0356.i.i
%19 = load ptr, ptr %18, align 8, !tbaa !8
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.111, ptr noundef nonnull @.str.97, ptr noundef %19) #24
br label %20
20: ; preds = %26, %.lr.ph.i.i
%.0365.i.i = phi i64 [ 0, %.lr.ph.i.i ], [ %27, %26 ]
%21 = load ptr, ptr %18, align 8, !tbaa !8
%22 = getelementptr inbounds nuw [4 x ptr], ptr @load_module.suffixes, i64 0, i64 %.0365.i.i
%23 = load ptr, ptr %22, align 8, !tbaa !8
%24 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 512, ptr noundef nonnull @.str.112, ptr noundef %21, ptr noundef nonnull @.str.96, ptr noundef %23) #24
%25 = call ptr @dlopen(ptr noundef nonnull %2, i32 noundef 2) #24
%.not48.i.i = icmp eq ptr %25, null
br i1 %.not48.i.i, label %26, label %30
26: ; preds = %20
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.114, ptr noundef nonnull @.str.97, ptr noundef nonnull %2) #24
%27 = add nuw nsw i64 %.0365.i.i, 1
%exitcond.not.i.i = icmp eq i64 %27, 4
br i1 %exitcond.not.i.i, label %28, label %20
28: ; preds = %26
%29 = add nuw i64 %.0356.i.i, 1
%exitcond12.not.i.i = icmp eq i64 %29, %17
br i1 %exitcond12.not.i.i, label %.thread.i.i, label %.lr.ph.i.i
30: ; preds = %20
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.113, ptr noundef nonnull @.str.97, ptr noundef nonnull %2) #24
call void @llvm.lifetime.end.p0(i64 80, ptr nonnull %3) #24
br label %45
31: ; preds = %.thread.i.i, %14, %12
%.039.i.i = phi ptr [ null, %14 ], [ null, %12 ], [ %16, %.thread.i.i ]
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.115, ptr noundef nonnull @.str.97, ptr noundef nonnull @.str.116) #24
br label %32
32: ; preds = %38, %31
%.17.i.i = phi i64 [ 0, %31 ], [ %39, %38 ]
%33 = getelementptr inbounds nuw [4 x ptr], ptr @load_module.suffixes, i64 0, i64 %.17.i.i
%34 = load ptr, ptr %33, align 8, !tbaa !8
%35 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 512, ptr noundef nonnull @.str.112, ptr noundef nonnull @.str.116, ptr noundef nonnull @.str.96, ptr noundef %34) #24
%36 = call ptr @dlopen(ptr noundef nonnull %2, i32 noundef 2) #24
%.not49.i.i = icmp eq ptr %36, null
br i1 %.not49.i.i, label %38, label %37
37: ; preds = %32
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.113, ptr noundef nonnull @.str.97, ptr noundef nonnull %2) #24
br label %45
38: ; preds = %32
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.114, ptr noundef nonnull @.str.97, ptr noundef nonnull %2) #24
%39 = add nuw nsw i64 %.17.i.i, 1
%exitcond13.not.i.i = icmp eq i64 %39, 4
br i1 %exitcond13.not.i.i, label %40, label %32
40: ; preds = %38
%41 = call ptr @dlerror() #24
%42 = icmp eq ptr %41, null
br i1 %42, label %43, label %44
43: ; preds = %40
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.117, ptr noundef nonnull @.str.96, ptr noundef nonnull @.str.97) #24
br label %load_module.exit.thread.i
44: ; preds = %40
call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.118, ptr noundef nonnull @.str.96, ptr noundef nonnull %41, ptr noundef nonnull @.str.97) #24
br label %load_module.exit.thread.i
load_module.exit.thread.i: ; preds = %44, %43
call void @free(ptr noundef %.039.i.i) #24
call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #24
br label %rarload.exit
45: ; preds = %37, %30
%.140.i.i = phi ptr [ %16, %30 ], [ %.039.i.i, %37 ]
%.4.i.i = phi ptr [ %25, %30 ], [ %36, %37 ]
call void @free(ptr noundef %.140.i.i) #24
call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #24
%46 = call ptr @dlsym(ptr noundef nonnull %.4.i.i, ptr noundef nonnull @.str.98) #24
%47 = icmp eq ptr %46, null
br i1 %47, label %48, label %53
48: ; preds = %45
%49 = call ptr @dlerror() #24
%50 = icmp eq ptr %49, null
br i1 %50, label %51, label %52
51: ; preds = %48
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.119, ptr noundef nonnull @.str.98) #24
br label %.sink.split.i
52: ; preds = %48
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.120, ptr noundef nonnull @.str.98, ptr noundef nonnull %49) #24
br label %.sink.split.i
53: ; preds = %45
store ptr %46, ptr @cli_unrar_open, align 8, !tbaa !11
%54 = call ptr @dlsym(ptr noundef nonnull %.4.i.i, ptr noundef nonnull @.str.99) #24
%55 = icmp eq ptr %54, null
br i1 %55, label %56, label %61
56: ; preds = %53
%57 = call ptr @dlerror() #24
%58 = icmp eq ptr %57, null
br i1 %58, label %59, label %60
59: ; preds = %56
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.119, ptr noundef nonnull @.str.99) #24
br label %.sink.split.i
60: ; preds = %56
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.120, ptr noundef nonnull @.str.99, ptr noundef nonnull %57) #24
br label %.sink.split.i
61: ; preds = %53
store ptr %54, ptr @cli_unrar_peek_file_header, align 8, !tbaa !11
%62 = call ptr @dlsym(ptr noundef nonnull %.4.i.i, ptr noundef nonnull @.str.100) #24
%63 = icmp eq ptr %62, null
br i1 %63, label %64, label %69
64: ; preds = %61
%65 = call ptr @dlerror() #24
%66 = icmp eq ptr %65, null
br i1 %66, label %67, label %68
67: ; preds = %64
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.119, ptr noundef nonnull @.str.100) #24
br label %.sink.split.i
68: ; preds = %64
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.120, ptr noundef nonnull @.str.100, ptr noundef nonnull %65) #24
br label %.sink.split.i
69: ; preds = %61
store ptr %62, ptr @cli_unrar_extract_file, align 8, !tbaa !11
%70 = call ptr @dlsym(ptr noundef nonnull %.4.i.i, ptr noundef nonnull @.str.101) #24
%71 = icmp eq ptr %70, null
br i1 %71, label %72, label %77
72: ; preds = %69
%73 = call ptr @dlerror() #24
%74 = icmp eq ptr %73, null
br i1 %74, label %75, label %76
75: ; preds = %72
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.119, ptr noundef nonnull @.str.101) #24
br label %.sink.split.i
76: ; preds = %72
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.120, ptr noundef nonnull @.str.101, ptr noundef nonnull %73) #24
br label %.sink.split.i
77: ; preds = %69
store ptr %70, ptr @cli_unrar_skip_file, align 8, !tbaa !11
%78 = call fastcc ptr @get_module_function(ptr noundef %.4.i.i, ptr noundef nonnull @.str.102)
store ptr %78, ptr @cli_unrar_close, align 8, !tbaa !11
%79 = icmp eq ptr %78, null
br i1 %79, label %80, label %81
.sink.split.i: ; preds = %76, %75, %68, %67, %60, %59, %52, %51
%cli_unrar_skip_file.sink.i = phi ptr [ @cli_unrar_open, %51 ], [ @cli_unrar_open, %52 ], [ @cli_unrar_peek_file_header, %59 ], [ @cli_unrar_peek_file_header, %60 ], [ @cli_unrar_extract_file, %67 ], [ @cli_unrar_extract_file, %68 ], [ @cli_unrar_skip_file, %75 ], [ @cli_unrar_skip_file, %76 ]
store ptr null, ptr %cli_unrar_skip_file.sink.i, align 8, !tbaa !11
br label %80
80: ; preds = %.sink.split.i, %77
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.103) #24
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.104) #24
call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.105) #24
br label %rarload.exit
81: ; preds = %77
store i32 1, ptr @have_rar, align 4, !tbaa !6
br label %rarload.exit
rarload.exit: ; preds = %8, %10, %load_module.exit.thread.i, %80, %81
%82 = call i32 @gettimeofday(ptr noundef nonnull %4, ptr noundef null) #24
%83 = zext i32 %5 to i64
%84 = getelementptr inbounds nuw i8, ptr %4, i64 8
%85 = load i64, ptr %84, align 8, !tbaa !12
%86 = add i32 %5, 1
%87 = zext i32 %86 to i64
%88 = mul nsw i64 %85, %87
%89 = add nsw i64 %88, %83
%90 = call i64 @clock() #24
%91 = add nsw i64 %89, %90
%92 = trunc i64 %91 to i32
call void @srand(i32 noundef %92) #24
%93 = call i32 @bytecode_init() #24
%.not = icmp eq i32 %93, 0
br i1 %.not, label %94, label %95
94: ; preds = %rarload.exit
call void @xmlInitParser() #24
br label %95
95: ; preds = %rarload.exit, %94
call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #24
ret i32 %93
}
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr captures(none)) #3
; Function Attrs: nounwind
declare i32 @getpid() local_unnamed_addr #4
declare zeroext i1 @clrs_log_init() local_unnamed_addr #5
declare void @cli_dbgmsg(ptr noundef, ...) local_unnamed_addr #5
declare i32 @cl_initialize_crypto() local_unnamed_addr #5
; Function Attrs: nofree nounwind
declare noundef i32 @gettimeofday(ptr noundef captures(none), ptr noundef captures(none)) local_unnamed_addr #6
; Function Attrs: nounwind
declare void @srand(i32 noundef) local_unnamed_addr #4
; Function Attrs: nounwind
declare i64 @clock() local_unnamed_addr #4
declare i32 @bytecode_init() local_unnamed_addr #5
declare void @xmlInitParser() local_unnamed_addr #5
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr captures(none)) #3
; Function Attrs: nounwind uwtable
define noundef ptr @cl_engine_new() local_unnamed_addr #2 {
%1 = tail call noalias dereferenceable_or_null(1200) ptr @calloc(i64 noundef 1, i64 noundef 1200) #25
%.not = icmp eq ptr %1, null
br i1 %.not, label %2, label %3
2: ; preds = %0
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.36) #24
br label %103
3: ; preds = %0
%4 = getelementptr inbounds nuw i8, ptr %1, i64 60
store i32 120000, ptr %4, align 4, !tbaa !15
%5 = getelementptr inbounds nuw i8, ptr %1, i64 64
store i64 419430400, ptr %5, align 8, !tbaa !36
%6 = getelementptr inbounds nuw i8, ptr %1, i64 72
store i64 104857600, ptr %6, align 8, !tbaa !37
%7 = getelementptr inbounds nuw i8, ptr %1, i64 80
store i32 17, ptr %7, align 8, !tbaa !38
%8 = getelementptr inbounds nuw i8, ptr %1, i64 84
store i32 10000, ptr %8, align 4, !tbaa !39
%9 = getelementptr inbounds nuw i8, ptr %1, i64 88
store i32 3, ptr %9, align 8, !tbaa !40
%10 = getelementptr inbounds nuw i8, ptr %1, i64 92
store i32 3, ptr %10, align 4, !tbaa !41
%11 = getelementptr inbounds nuw i8, ptr %1, i64 1040
store i64 41943040, ptr %11, align 8, !tbaa !42
%12 = getelementptr inbounds nuw i8, ptr %1, i64 1048
store i64 41943040, ptr %12, align 8, !tbaa !43
%13 = getelementptr inbounds nuw i8, ptr %1, i64 1056
store i64 8388608, ptr %13, align 8, !tbaa !44
%14 = getelementptr inbounds nuw i8, ptr %1, i64 1064
store i64 20971520, ptr %14, align 8, !tbaa !45
%15 = getelementptr inbounds nuw i8, ptr %1, i64 1072
store i64 1048576, ptr %15, align 8, !tbaa !46
%16 = getelementptr inbounds nuw i8, ptr %1, i64 56
store i32 65536, ptr %16, align 8, !tbaa !47
%17 = getelementptr inbounds nuw i8, ptr %1, i64 1024
store i32 1, ptr %17, align 8, !tbaa !48
%18 = getelementptr inbounds nuw i8, ptr %1, i64 1028
store i32 60000, ptr %18, align 4, !tbaa !49
store i32 1, ptr %1, align 8, !tbaa !50
%19 = getelementptr inbounds nuw i8, ptr %1, i64 24
store i32 2, ptr %19, align 8, !tbaa !51
%20 = getelementptr inbounds nuw i8, ptr %1, i64 28
store i32 3, ptr %20, align 4, !tbaa !52
%21 = tail call ptr @mpool_create() #24
%22 = getelementptr inbounds nuw i8, ptr %1, i64 256
store ptr %21, ptr %22, align 8, !tbaa !53
%.not103 = icmp eq ptr %21, null
br i1 %.not103, label %23, label %24
23: ; preds = %3
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.37) #24
tail call void @free(ptr noundef nonnull %1) #24
br label %103
24: ; preds = %3
%25 = tail call ptr @mpool_calloc(ptr noundef nonnull %21, i64 noundef 15, i64 noundef 8) #24
%26 = getelementptr inbounds nuw i8, ptr %1, i64 96
store ptr %25, ptr %26, align 8, !tbaa !54
%.not104 = icmp eq ptr %25, null
br i1 %.not104, label %27, label %29
27: ; preds = %24
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.38) #24
%28 = load ptr, ptr %22, align 8, !tbaa !53
tail call void @mpool_destroy(ptr noundef %28) #24
tail call void @free(ptr noundef nonnull %1) #24
br label %103
29: ; preds = %24
%30 = load ptr, ptr %22, align 8, !tbaa !53
%31 = tail call ptr @cli_dconf_init(ptr noundef %30) #24
%32 = getelementptr inbounds nuw i8, ptr %1, i64 168
store ptr %31, ptr %32, align 8, !tbaa !55
%.not105 = icmp eq ptr %31, null
br i1 %.not105, label %33, label %37
33: ; preds = %29
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.39) #24
%34 = load ptr, ptr %22, align 8, !tbaa !53
%35 = load ptr, ptr %26, align 8, !tbaa !54
tail call void @mpool_free(ptr noundef %34, ptr noundef %35) #24
%36 = load ptr, ptr %22, align 8, !tbaa !53
tail call void @mpool_destroy(ptr noundef %36) #24
tail call void @free(ptr noundef nonnull %1) #24
br label %103
37: ; preds = %29
%38 = load ptr, ptr %22, align 8, !tbaa !53
%39 = tail call ptr @mpool_calloc(ptr noundef %38, i64 noundef 3, i64 noundef 8) #24
%40 = getelementptr inbounds nuw i8, ptr %1, i64 192
store ptr %39, ptr %40, align 8, !tbaa !56
%.not106 = icmp eq ptr %39, null
br i1 %.not106, label %41, label %47
41: ; preds = %37
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.40) #24
%42 = load ptr, ptr %22, align 8, !tbaa !53
%43 = load ptr, ptr %32, align 8, !tbaa !55
tail call void @mpool_free(ptr noundef %42, ptr noundef %43) #24
%44 = load ptr, ptr %22, align 8, !tbaa !53
%45 = load ptr, ptr %26, align 8, !tbaa !54
tail call void @mpool_free(ptr noundef %44, ptr noundef %45) #24
%46 = load ptr, ptr %22, align 8, !tbaa !53
tail call void @mpool_destroy(ptr noundef %46) #24
tail call void @free(ptr noundef nonnull %1) #24
br label %103
47: ; preds = %37
%48 = getelementptr inbounds nuw i8, ptr %1, i64 264
tail call void @crtmgr_init(ptr noundef nonnull %48) #24
%49 = tail call i32 @crtmgr_add_roots(ptr noundef nonnull %1, ptr noundef nonnull %48, i32 noundef 0) #24
%.not107 = icmp eq i32 %49, 0
br i1 %.not107, label %58, label %50
50: ; preds = %47
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.41) #24
%51 = load ptr, ptr %22, align 8, !tbaa !53
%52 = load ptr, ptr %40, align 8, !tbaa !56
tail call void @mpool_free(ptr noundef %51, ptr noundef %52) #24
%53 = load ptr, ptr %22, align 8, !tbaa !53
%54 = load ptr, ptr %32, align 8, !tbaa !55
tail call void @mpool_free(ptr noundef %53, ptr noundef %54) #24
%55 = load ptr, ptr %22, align 8, !tbaa !53
%56 = load ptr, ptr %26, align 8, !tbaa !54
tail call void @mpool_free(ptr noundef %55, ptr noundef %56) #24
%57 = load ptr, ptr %22, align 8, !tbaa !53
tail call void @mpool_destroy(ptr noundef %57) #24
tail call void @free(ptr noundef nonnull %1) #24
br label %103
58: ; preds = %47
%59 = tail call noalias dereferenceable_or_null(96) ptr @calloc(i64 noundef 1, i64 noundef 96) #25
%.not108 = icmp eq ptr %59, null
br i1 %.not108, label %76, label %60
60: ; preds = %58
%61 = getelementptr inbounds nuw i8, ptr %59, i64 56
%62 = tail call i32 @pthread_mutex_init(ptr noundef nonnull %61, ptr noundef null) #24
%.not109 = icmp eq i32 %62, 0
br i1 %.not109, label %71, label %63
63: ; preds = %60
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.42) #24
%64 = load ptr, ptr %22, align 8, !tbaa !53
%65 = load ptr, ptr %40, align 8, !tbaa !56
tail call void @mpool_free(ptr noundef %64, ptr noundef %65) #24
%66 = load ptr, ptr %22, align 8, !tbaa !53
%67 = load ptr, ptr %32, align 8, !tbaa !55
tail call void @mpool_free(ptr noundef %66, ptr noundef %67) #24
%68 = load ptr, ptr %22, align 8, !tbaa !53
%69 = load ptr, ptr %26, align 8, !tbaa !54
tail call void @mpool_free(ptr noundef %68, ptr noundef %69) #24
%70 = load ptr, ptr %22, align 8, !tbaa !53
tail call void @mpool_destroy(ptr noundef %70) #24
tail call void @free(ptr noundef nonnull %1) #24
tail call void @free(ptr noundef nonnull %59) #24
br label %103
71: ; preds = %60
%72 = getelementptr inbounds nuw i8, ptr %59, i64 48
store ptr %1, ptr %72, align 8, !tbaa !57
%73 = getelementptr inbounds nuw i8, ptr %59, i64 28
store i32 50, ptr %73, align 4, !tbaa !61
%74 = getelementptr inbounds nuw i8, ptr %59, i64 32
store i32 1048576, ptr %74, align 8, !tbaa !62
%75 = getelementptr inbounds nuw i8, ptr %59, i64 36
store i32 10, ptr %75, align 4, !tbaa !63
br label %76
76: ; preds = %58, %71
%.sink = phi ptr [ %59, %71 ], [ null, %58 ]
%77 = getelementptr inbounds nuw i8, ptr %1, i64 1080
store ptr %.sink, ptr %77, align 8, !tbaa !64
%78 = getelementptr inbounds nuw i8, ptr %1, i64 1088
store ptr null, ptr %78, align 8, !tbaa !65
%79 = getelementptr inbounds nuw i8, ptr %1, i64 1112
store ptr null, ptr %79, align 8, !tbaa !66
%80 = getelementptr inbounds nuw i8, ptr %1, i64 1120
store ptr @clamav_stats_flush, ptr %80, align 8, !tbaa !67
%81 = getelementptr inbounds nuw i8, ptr %1, i64 1096
store ptr @clamav_stats_remove_sample, ptr %81, align 8, !tbaa !68
%82 = getelementptr inbounds nuw i8, ptr %1, i64 1104
store ptr @clamav_stats_decrement_count, ptr %82, align 8, !tbaa !69
%83 = getelementptr inbounds nuw i8, ptr %1, i64 1128
store ptr @clamav_stats_get_num, ptr %83, align 8, !tbaa !70
%84 = getelementptr inbounds nuw i8, ptr %1, i64 1136
store ptr @clamav_stats_get_size, ptr %84, align 8, !tbaa !71
%85 = getelementptr inbounds nuw i8, ptr %1, i64 1144
store ptr @clamav_stats_get_hostid, ptr %85, align 8, !tbaa !72
%86 = getelementptr inbounds nuw i8, ptr %1, i64 1152
store i32 50, ptr %86, align 8, !tbaa !73
%87 = getelementptr inbounds nuw i8, ptr %1, i64 1156
store i32 100, ptr %87, align 4, !tbaa !74
%88 = getelementptr inbounds nuw i8, ptr %1, i64 1160
store i32 16, ptr %88, align 8, !tbaa !75
%89 = getelementptr inbounds nuw i8, ptr %1, i64 1168
store i64 100000, ptr %89, align 8, !tbaa !76
%90 = getelementptr inbounds nuw i8, ptr %1, i64 1176
store i64 2000, ptr %90, align 8, !tbaa !77
%91 = getelementptr inbounds nuw i8, ptr %1, i64 1184
store i64 104857600, ptr %91, align 8, !tbaa !78
%92 = tail call i32 @cli_yara_init(ptr noundef nonnull %1) #24
%.not110 = icmp eq i32 %92, 0
br i1 %.not110, label %101, label %93
93: ; preds = %76
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.43) #24
%94 = load ptr, ptr %22, align 8, !tbaa !53
%95 = load ptr, ptr %40, align 8, !tbaa !56
tail call void @mpool_free(ptr noundef %94, ptr noundef %95) #24
%96 = load ptr, ptr %22, align 8, !tbaa !53
%97 = load ptr, ptr %32, align 8, !tbaa !55
tail call void @mpool_free(ptr noundef %96, ptr noundef %97) #24
%98 = load ptr, ptr %22, align 8, !tbaa !53
%99 = load ptr, ptr %26, align 8, !tbaa !54
tail call void @mpool_free(ptr noundef %98, ptr noundef %99) #24
%100 = load ptr, ptr %22, align 8, !tbaa !53
tail call void @mpool_destroy(ptr noundef %100) #24
tail call void @free(ptr noundef nonnull %1) #24
tail call void @free(ptr noundef %59) #24
br label %103
101: ; preds = %76
%102 = tail call ptr @cl_retver() #24
tail call void (ptr, ...) @cli_dbgmsg(ptr noundef nonnull @.str.44, ptr noundef %102) #24
br label %103
103: ; preds = %101, %93, %63, %50, %41, %33, %27, %23, %2
%.0 = phi ptr [ null, %50 ], [ null, %63 ], [ null, %93 ], [ %1, %101 ], [ null, %41 ], [ null, %33 ], [ null, %27 ], [ null, %23 ], [ null, %2 ]
ret ptr %.0
}
; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #7
declare void @cli_errmsg(ptr noundef, ...) local_unnamed_addr #5
declare ptr @mpool_create() local_unnamed_addr #5
; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr noundef captures(none)) local_unnamed_addr #8
declare ptr @mpool_calloc(ptr noundef, i64 noundef, i64 noundef) local_unnamed_addr #5
declare void @mpool_destroy(ptr noundef) local_unnamed_addr #5
declare ptr @cli_dconf_init(ptr noundef) local_unnamed_addr #5
declare void @mpool_free(ptr noundef, ptr noundef) local_unnamed_addr #5
declare void @crtmgr_init(ptr noundef) local_unnamed_addr #5
declare i32 @crtmgr_add_roots(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #5
; Function Attrs: nounwind
declare i32 @pthread_mutex_init(ptr noundef, ptr noundef) local_unnamed_addr #4
declare void @clamav_stats_flush(ptr noundef, ptr noundef) #5
declare void @clamav_stats_remove_sample(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #5
declare void @clamav_stats_decrement_count(ptr noundef, ptr noundef, i64 noundef, ptr noundef) #5
declare i64 @clamav_stats_get_num(ptr noundef) #5
declare i64 @clamav_stats_get_size(ptr noundef) #5
declare ptr @clamav_stats_get_hostid(ptr noundef) #5
declare i32 @cli_yara_init(ptr noundef) local_unnamed_addr #5
declare ptr @cl_retver() local_unnamed_addr #5
; Function Attrs: nounwind uwtable
define range(i32 0, 4) i32 @cl_engine_set_num(ptr noundef %0, i32 noundef %1, i64 noundef %2) local_unnamed_addr #2 {
%.not = icmp eq ptr %0, null
br i1 %.not, label %166, label %4
4: ; preds = %3
switch i32 %1, label %165 [
i32 0, label %5
i32 1, label %7
i32 2, label %17
i32 3, label %22
i32 18, label %25
i32 19, label %31
i32 20, label %37
i32 21, label %43
i32 22, label %49
i32 4, label %55
i32 5, label %58
i32 7, label %61
i32 8, label %61
i32 9, label %61
i32 10, label %62
i32 11, label %65
i32 12, label %68
i32 14, label %71
i32 23, label %74
i32 15, label %81
i32 16, label %89
i32 17, label %92
i32 25, label %105
i32 24, label %116
i32 26, label %120
i32 27, label %127
i32 28, label %133
i32 29, label %136
i32 30, label %139
i32 31, label %142
i32 32, label %145
i32 33, label %147
i32 34, label %149
i32 35, label %151
i32 36, label %158
]
5: ; preds = %4
%6 = getelementptr inbounds nuw i8, ptr %0, i64 64
store i64 %2, ptr %6, align 8, !tbaa !36
br label %166
7: ; preds = %4
%8 = icmp ugt i64 %2, 2147483645
br i1 %8, label %9, label %15
9: ; preds = %7
%10 = icmp ugt i64 %2, 2147483648
%11 = icmp ne i64 %2, 9223372036854775807
%or.cond = and i1 %10, %11
br i1 %or.cond, label %12, label %13
12: ; preds = %9
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.45, i64 noundef %2) #24
br label %13
13: ; preds = %12, %9
%14 = getelementptr inbounds nuw i8, ptr %0, i64 72
store i64 2147483645, ptr %14, align 8, !tbaa !37
br label %166
15: ; preds = %7
%16 = getelementptr inbounds nuw i8, ptr %0, i64 72
store i64 %2, ptr %16, align 8, !tbaa !37
br label %166
17: ; preds = %4
%.not111 = icmp eq i64 %2, 0
%18 = getelementptr inbounds nuw i8, ptr %0, i64 80
br i1 %.not111, label %19, label %20
19: ; preds = %17
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.46, i32 noundef 17) #24
store i32 17, ptr %18, align 8, !tbaa !38
br label %166
20: ; preds = %17
%21 = trunc i64 %2 to i32
store i32 %21, ptr %18, align 8, !tbaa !38
br label %166
22: ; preds = %4
%23 = trunc i64 %2 to i32
%24 = getelementptr inbounds nuw i8, ptr %0, i64 84
store i32 %23, ptr %24, align 4, !tbaa !39
br label %166
25: ; preds = %4
%26 = icmp slt i64 %2, 0
br i1 %26, label %27, label %29
27: ; preds = %25
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.47, i32 noundef 41943040) #24
%28 = getelementptr inbounds nuw i8, ptr %0, i64 1040
store i64 41943040, ptr %28, align 8, !tbaa !42
br label %166
29: ; preds = %25
%30 = getelementptr inbounds nuw i8, ptr %0, i64 1040
store i64 %2, ptr %30, align 8, !tbaa !42
br label %166
31: ; preds = %4
%32 = icmp slt i64 %2, 0
br i1 %32, label %33, label %35
33: ; preds = %31
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.48, i32 noundef 41943040) #24
%34 = getelementptr inbounds nuw i8, ptr %0, i64 1048
store i64 41943040, ptr %34, align 8, !tbaa !43
br label %166
35: ; preds = %31
%36 = getelementptr inbounds nuw i8, ptr %0, i64 1048
store i64 %2, ptr %36, align 8, !tbaa !43
br label %166
37: ; preds = %4
%38 = icmp slt i64 %2, 0
br i1 %38, label %39, label %41
39: ; preds = %37
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.49, i32 noundef 8388608) #24
%40 = getelementptr inbounds nuw i8, ptr %0, i64 1056
store i64 8388608, ptr %40, align 8, !tbaa !44
br label %166
41: ; preds = %37
%42 = getelementptr inbounds nuw i8, ptr %0, i64 1056
store i64 %2, ptr %42, align 8, !tbaa !44
br label %166
43: ; preds = %4
%44 = icmp slt i64 %2, 0
br i1 %44, label %45, label %47
45: ; preds = %43
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.50, i32 noundef 20971520) #24
%46 = getelementptr inbounds nuw i8, ptr %0, i64 1064
store i64 20971520, ptr %46, align 8, !tbaa !45
br label %166
47: ; preds = %43
%48 = getelementptr inbounds nuw i8, ptr %0, i64 1064
store i64 %2, ptr %48, align 8, !tbaa !45
br label %166
49: ; preds = %4
%50 = icmp slt i64 %2, 0
br i1 %50, label %51, label %53
51: ; preds = %49
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.51, i32 noundef 1048576) #24
%52 = getelementptr inbounds nuw i8, ptr %0, i64 1072
store i64 1048576, ptr %52, align 8, !tbaa !46
br label %166
53: ; preds = %49
%54 = getelementptr inbounds nuw i8, ptr %0, i64 1072
store i64 %2, ptr %54, align 8, !tbaa !46
br label %166
55: ; preds = %4
%56 = trunc i64 %2 to i32
%57 = getelementptr inbounds nuw i8, ptr %0, i64 88
store i32 %56, ptr %57, align 8, !tbaa !40
br label %166
58: ; preds = %4
%59 = trunc i64 %2 to i32
%60 = getelementptr inbounds nuw i8, ptr %0, i64 92
store i32 %59, ptr %60, align 4, !tbaa !41
br label %166
61: ; preds = %4, %4, %4
tail call void (ptr, ...) @cli_warnmsg(ptr noundef nonnull @.str.52) #24
br label %166
62: ; preds = %4
%63 = trunc i64 %2 to i32
%64 = getelementptr inbounds nuw i8, ptr %0, i64 20
store i32 %63, ptr %64, align 4, !tbaa !79
br label %166
65: ; preds = %4
%66 = trunc i64 %2 to i32
%67 = getelementptr inbounds nuw i8, ptr %0, i64 24
store i32 %66, ptr %67, align 8, !tbaa !51
br label %166
68: ; preds = %4
%69 = trunc i64 %2 to i32
%70 = getelementptr inbounds nuw i8, ptr %0, i64 28
store i32 %69, ptr %70, align 4, !tbaa !52
br label %166
71: ; preds = %4
%72 = trunc i64 %2 to i32
%73 = getelementptr inbounds nuw i8, ptr %0, i64 40
store i32 %72, ptr %73, align 8, !tbaa !80
br label %166
74: ; preds = %4
%.not110 = icmp eq i64 %2, 0
%75 = getelementptr inbounds nuw i8, ptr %0, i64 48
%76 = load i64, ptr %75, align 8, !tbaa !81
br i1 %.not110, label %79, label %77
77: ; preds = %74
%78 = or i64 %76, 2
store i64 %78, ptr %75, align 8, !tbaa !81
br label %166
79: ; preds = %74
%80 = and i64 %76, -3
store i64 %80, ptr %75, align 8, !tbaa !81
br label %166
81: ; preds = %4
%82 = getelementptr inbounds nuw i8, ptr %0, i64 8
%83 = load i32, ptr %82, align 8, !tbaa !82
%84 = and i32 %83, 1024
%.not109 = icmp eq i32 %84, 0
br i1 %.not109, label %86, label %85
85: ; preds = %81
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.53) #24
br label %166
86: ; preds = %81
%87 = trunc i64 %2 to i32
%88 = getelementptr inbounds nuw i8, ptr %0, i64 1024
store i32 %87, ptr %88, align 8, !tbaa !48
br label %166
89: ; preds = %4
%90 = trunc i64 %2 to i32
%91 = getelementptr inbounds nuw i8, ptr %0, i64 1028
store i32 %90, ptr %91, align 4, !tbaa !49
br label %166
92: ; preds = %4
%93 = getelementptr inbounds nuw i8, ptr %0, i64 8
%94 = load i32, ptr %93, align 8, !tbaa !82
%95 = and i32 %94, 1024
%.not108 = icmp eq i32 %95, 0
br i1 %.not108, label %97, label %96
96: ; preds = %92
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.54) #24
br label %166
97: ; preds = %92
%98 = icmp eq i64 %2, 4
br i1 %98, label %99, label %100
99: ; preds = %97
tail call void (ptr, ...) @cli_errmsg(ptr noundef nonnull @.str.55) #24
br label %166
100: ; preds = %97