; LLVM IR from apigee/apib :: third_party/http_parser/contrib (parsertrace)

; Unoptimized IR (clang -disable-llvm-passes):
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-unknown-linux-gnu"

%struct.http_parser_settings = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.http_parser = type { i32, i32, i64, i16, i16, i32, ptr }

@stderr = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_message_begin(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_headers_complete(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_message_complete(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_url(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_header_field(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_header_value(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_body(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @usage(ptr noundef) #0

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i32 @main(i32 noundef %0, ptr noundef %1) #0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca %struct.http_parser_settings, align 8
  %13 = alloca %struct.http_parser, align 8
  %14 = alloca i64, align 8
  %15 = alloca i32, align 4
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #6
  %16 = load i32, ptr %4, align 4, !tbaa !5
  %17 = icmp ne i32 %16, 3
  br i1 %17, label %18, label %22

18:                                               ; preds = %2
  %19 = load ptr, ptr %5, align 8, !tbaa !9
  %20 = getelementptr inbounds ptr, ptr %19, i64 0
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  call void @usage(ptr noundef %21)
  br label %22

22:                                               ; preds = %18, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #6
  %23 = load ptr, ptr %5, align 8, !tbaa !9
  %24 = getelementptr inbounds ptr, ptr %23, i64 1
  %25 = load ptr, ptr %24, align 8, !tbaa !9
  store ptr %25, ptr %7, align 8, !tbaa !9
  %26 = load ptr, ptr %7, align 8, !tbaa !9
  %27 = getelementptr inbounds i8, ptr %26, i64 0
  %28 = load i8, ptr %27, align 1, !tbaa !11
  %29 = sext i8 %28 to i32
  %30 = icmp ne i32 %29, 45
  br i1 %30, label %31, label %35

31:                                               ; preds = %22
  %32 = load ptr, ptr %5, align 8, !tbaa !9
  %33 = getelementptr inbounds ptr, ptr %32, i64 0
  %34 = load ptr, ptr %33, align 8, !tbaa !9
  call void @usage(ptr noundef %34)
  br label %35

35:                                               ; preds = %31, %22
  %36 = load ptr, ptr %7, align 8, !tbaa !9
  %37 = getelementptr inbounds i8, ptr %36, i64 1
  %38 = load i8, ptr %37, align 1, !tbaa !11
  %39 = sext i8 %38 to i32
  switch i32 %39, label %43 [
    i32 114, label %40
    i32 113, label %41
    i32 98, label %42
  ]

40:                                               ; preds = %35
  store i32 1, ptr %6, align 4, !tbaa !5
  br label %47

41:                                               ; preds = %35
  store i32 0, ptr %6, align 4, !tbaa !5
  br label %47

42:                                               ; preds = %35
  store i32 2, ptr %6, align 4, !tbaa !5
  br label %47

43:                                               ; preds = %35
  %44 = load ptr, ptr %5, align 8, !tbaa !9
  %45 = getelementptr inbounds ptr, ptr %44, i64 0
  %46 = load ptr, ptr %45, align 8, !tbaa !9
  call void @usage(ptr noundef %46)
  br label %47

47:                                               ; preds = %43, %42, %41, %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  %48 = load ptr, ptr %5, align 8, !tbaa !9
  %49 = getelementptr inbounds ptr, ptr %48, i64 2
  %50 = load ptr, ptr %49, align 8, !tbaa !9
  store ptr %50, ptr %8, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #6
  %51 = load ptr, ptr %8, align 8, !tbaa !9
  %52 = call noalias ptr @fopen(ptr noundef %51, ptr noundef @.str.8)
  store ptr %52, ptr %9, align 8, !tbaa !9
  %53 = load ptr, ptr %9, align 8, !tbaa !9
  %54 = icmp eq ptr %53, null
  br i1 %54, label %55, label %56

55:                                               ; preds = %47
  call void @perror(ptr noundef @.str.9)
  br label %109

56:                                               ; preds = %47
  %57 = load ptr, ptr %9, align 8, !tbaa !9
  %58 = call i32 @fseek(ptr noundef %57, i64 noundef 0, i32 noundef 2)
  %59 = load ptr, ptr %9, align 8, !tbaa !9
  %60 = call i64 @ftell(ptr noundef %59)
  store i64 %60, ptr %10, align 8, !tbaa !12
  %61 = load i64, ptr %10, align 8, !tbaa !12
  %62 = icmp eq i64 %61, -1
  br i1 %62, label %63, label %64

63:                                               ; preds = %56
  call void @perror(ptr noundef @.str.10)
  br label %109

64:                                               ; preds = %56
  %65 = load ptr, ptr %9, align 8, !tbaa !9
  %66 = call i32 @fseek(ptr noundef %65, i64 noundef 0, i32 noundef 0)
  %67 = load i64, ptr %10, align 8, !tbaa !12
  %68 = call noalias ptr @malloc(i64 noundef %67) #7
  store ptr %68, ptr %11, align 8, !tbaa !9
  %69 = load ptr, ptr %11, align 8, !tbaa !9
  %70 = load i64, ptr %10, align 8, !tbaa !12
  %71 = load ptr, ptr %9, align 8, !tbaa !9
  %72 = call i64 @fread(ptr noundef %69, i64 noundef 1, i64 noundef %70, ptr noundef %71)
  %73 = load i64, ptr %10, align 8, !tbaa !12
  %74 = icmp ne i64 %72, %73
  br i1 %74, label %75, label %79

75:                                               ; preds = %64
  %76 = load ptr, ptr @stderr, align 8, !tbaa !9
  %77 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %76, ptr noundef @.str.11) #6
  %78 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %78) #6
  br label %109

79:                                               ; preds = %64
  call void @llvm.memset.p0.i64(ptr align 8 %12, i8 0, i64 80, i1 false)
  %80 = getelementptr inbounds %struct.http_parser_settings, ptr %12, i32 0, i32 0
  store ptr @on_message_begin, ptr %80, align 8, !tbaa !14
  %81 = getelementptr inbounds %struct.http_parser_settings, ptr %12, i32 0, i32 1
  store ptr @on_url, ptr %81, align 8, !tbaa !16
  %82 = getelementptr inbounds %struct.http_parser_settings, ptr %12, i32 0, i32 3
  store ptr @on_header_field, ptr %82, align 8, !tbaa !17
  %83 = getelementptr inbounds %struct.http_parser_settings, ptr %12, i32 0, i32 4
  store ptr @on_header_value, ptr %83, align 8, !tbaa !18
  %84 = getelementptr inbounds %struct.http_parser_settings, ptr %12, i32 0, i32 5
  store ptr @on_headers_complete, ptr %84, align 8, !tbaa !19
  %85 = getelementptr inbounds %struct.http_parser_settings, ptr %12, i32 0, i32 6
  store ptr @on_body, ptr %85, align 8, !tbaa !20
  %86 = getelementptr inbounds %struct.http_parser_settings, ptr %12, i32 0, i32 7
  store ptr @on_message_complete, ptr %86, align 8, !tbaa !21
  %87 = load i32, ptr %6, align 4, !tbaa !5
  call void @http_parser_init(ptr noundef %13, i32 noundef %87)
  %88 = load ptr, ptr %11, align 8, !tbaa !9
  %89 = load i64, ptr %10, align 8, !tbaa !12
  %90 = call i64 @http_parser_execute(ptr noundef %13, ptr noundef %12, ptr noundef %88, i64 noundef %89)
  store i64 %90, ptr %14, align 8, !tbaa !12
  %91 = load ptr, ptr %11, align 8, !tbaa !9
  call void @free(ptr noundef %91) #6
  %92 = load i64, ptr %14, align 8, !tbaa !12
  %93 = load i64, ptr %10, align 8, !tbaa !12
  %94 = icmp ne i64 %92, %93
  br i1 %94, label %95, label %108

95:                                               ; preds = %79
  %96 = load ptr, ptr @stderr, align 8, !tbaa !9
  %97 = getelementptr inbounds %struct.http_parser, ptr %13, i32 0, i32 5
  %98 = load i32, ptr %97, align 4
  %99 = lshr i32 %98, 24
  %100 = and i32 %99, 127
  %101 = call ptr @http_errno_description(i32 noundef %100)
  %102 = getelementptr inbounds %struct.http_parser, ptr %13, i32 0, i32 5
  %103 = load i32, ptr %102, align 4
  %104 = lshr i32 %103, 24
  %105 = and i32 %104, 127
  %106 = call ptr @http_errno_name(i32 noundef %105)
  %107 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %96, ptr noundef @.str.12, ptr noundef %101, ptr noundef %106) #6
  br label %109

108:                                              ; preds = %79
  store i32 0, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %112

109:                                              ; preds = %95, %75, %63, %55
  %110 = load ptr, ptr %9, align 8, !tbaa !9
  %111 = call i32 @fclose(ptr noundef %110)
  store i32 1, ptr %3, align 4
  store i32 1, ptr %15, align 4
  br label %112

112:                                              ; preds = %109, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #6
  %113 = load i32, ptr %3, align 4
  ret i32 %113
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #2

declare noalias ptr @fopen(ptr noundef, ptr noundef) #3

declare void @perror(ptr noundef) #3

declare i32 @fseek(ptr noundef, i64 noundef, i32 noundef) #3

declare i64 @ftell(ptr noundef) #3

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #4

declare i64 @fread(ptr noundef, i64 noundef, i64 noundef, ptr noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #5

declare void @http_parser_init(ptr noundef, i32 noundef) #3

declare i64 @http_parser_execute(ptr noundef, ptr noundef, ptr noundef, i64 noundef) #3

declare ptr @http_errno_description(i32 noundef) #3

declare ptr @http_errno_name(i32 noundef) #3

declare i32 @fclose(ptr noundef) #3

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #2

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind allocsize(0) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #6 = { nounwind }
attributes #7 = { nounwind allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !10, i64 0}
!15 = !{!"http_parser_settings", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72}
!16 = !{!15, !10, i64 8}
!17 = !{!15, !10, i64 24}
!18 = !{!15, !10, i64 32}
!19 = !{!15, !10, i64 40}
!20 = !{!15, !10, i64 48}
!21 = !{!15, !10, i64 56}


; Optimized IR (opt -passes='default<O3>'):
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-unknown-linux-gnu"

%struct.http_parser_settings = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.http_parser = type { i32, i32, i64, i16, i16, i32, ptr }

@stderr = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [27 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [16 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_message_begin(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_headers_complete(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_message_complete(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_url(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_header_field(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_header_value(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i32 @on_body(ptr noundef, ptr noundef, i64 noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @usage(ptr noundef) local_unnamed_addr #0

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, 2) i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = alloca %struct.http_parser_settings, align 8
  %4 = alloca %struct.http_parser, align 8
  %.not = icmp eq i32 %0, 3
  br i1 %.not, label %7, label %5

5:                                                ; preds = %2
  %6 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @usage(ptr noundef %6)
  br label %7

7:                                                ; preds = %5, %2
  %8 = getelementptr inbounds i8, ptr %1, i64 8
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = load i8, ptr %9, align 1, !tbaa !9
  %.not30 = icmp eq i8 %10, 45
  br i1 %.not30, label %13, label %11

11:                                               ; preds = %7
  %12 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @usage(ptr noundef %12)
  br label %13

13:                                               ; preds = %11, %7
  %14 = getelementptr inbounds i8, ptr %9, i64 1
  %15 = load i8, ptr %14, align 1, !tbaa !9
  switch i8 %15, label %18 [
    i8 114, label %20
    i8 113, label %16
    i8 98, label %17
  ]

16:                                               ; preds = %13
  br label %20

17:                                               ; preds = %13
  br label %20

18:                                               ; preds = %13
  %19 = load ptr, ptr %1, align 8, !tbaa !5
  tail call void @usage(ptr noundef %19)
  br label %20

20:                                               ; preds = %13, %18, %17, %16
  %.027 = phi i32 [ undef, %18 ], [ 2, %17 ], [ 0, %16 ], [ 1, %13 ]
  %21 = getelementptr inbounds i8, ptr %1, i64 16
  %22 = load ptr, ptr %21, align 8, !tbaa !5
  %23 = tail call noalias ptr @fopen(ptr noundef %22, ptr noundef nonnull @.str.8)
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %26

25:                                               ; preds = %20
  tail call void @perror(ptr noundef nonnull @.str.9) #6
  br label %59

26:                                               ; preds = %20
  %27 = tail call i32 @fseek(ptr noundef nonnull %23, i64 noundef 0, i32 noundef 2)
  %28 = tail call i64 @ftell(ptr noundef nonnull %23)
  %29 = icmp eq i64 %28, -1
  br i1 %29, label %30, label %31

30:                                               ; preds = %26
  tail call void @perror(ptr noundef nonnull @.str.10) #6
  br label %59

31:                                               ; preds = %26
  %32 = tail call i32 @fseek(ptr noundef nonnull %23, i64 noundef 0, i32 noundef 0)
  %33 = tail call noalias ptr @malloc(i64 noundef %28) #7
  %34 = tail call i64 @fread(ptr noundef %33, i64 noundef 1, i64 noundef %28, ptr noundef nonnull %23)
  %.not31 = icmp eq i64 %34, %28
  br i1 %.not31, label %38, label %35

35:                                               ; preds = %31
  %36 = load ptr, ptr @stderr, align 8, !tbaa !5
  %37 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %36, ptr noundef nonnull @.str.11) #8
  tail call void @free(ptr noundef %33) #9
  br label %59

38:                                               ; preds = %31
  %39 = getelementptr inbounds i8, ptr %3, i64 16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(80) %39, i8 0, i64 64, i1 false)
  store ptr @on_message_begin, ptr %3, align 8, !tbaa !10
  %40 = getelementptr inbounds i8, ptr %3, i64 8
  store ptr @on_url, ptr %40, align 8, !tbaa !12
  %41 = getelementptr inbounds i8, ptr %3, i64 24
  store ptr @on_header_field, ptr %41, align 8, !tbaa !13
  %42 = getelementptr inbounds i8, ptr %3, i64 32
  store ptr @on_header_value, ptr %42, align 8, !tbaa !14
  %43 = getelementptr inbounds i8, ptr %3, i64 40
  store ptr @on_headers_complete, ptr %43, align 8, !tbaa !15
  %44 = getelementptr inbounds i8, ptr %3, i64 48
  store ptr @on_body, ptr %44, align 8, !tbaa !16
  %45 = getelementptr inbounds i8, ptr %3, i64 56
  store ptr @on_message_complete, ptr %45, align 8, !tbaa !17
  call void @http_parser_init(ptr noundef nonnull %4, i32 noundef %.027) #9
  %46 = call i64 @http_parser_execute(ptr noundef nonnull %4, ptr noundef nonnull %3, ptr noundef %33, i64 noundef %28) #9
  call void @free(ptr noundef %33) #9
  %.not32 = icmp eq i64 %46, %28
  br i1 %.not32, label %61, label %47

47:                                               ; preds = %38
  %48 = load ptr, ptr @stderr, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %4, i64 20
  %50 = load i32, ptr %49, align 4
  %51 = lshr i32 %50, 24
  %52 = and i32 %51, 127
  %53 = call ptr @http_errno_description(i32 noundef %52) #9
  %54 = load i32, ptr %49, align 4
  %55 = lshr i32 %54, 24
  %56 = and i32 %55, 127
  %57 = call ptr @http_errno_name(i32 noundef %56) #9
  %58 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %48, ptr noundef nonnull @.str.12, ptr noundef %53, ptr noundef %57) #8
  br label %59

59:                                               ; preds = %47, %35, %30, %25
  %60 = call i32 @fclose(ptr noundef %23)
  br label %61

61:                                               ; preds = %38, %59
  %.0 = phi i32 [ 1, %59 ], [ 0, %38 ]
  ret i32 %.0
}

; Function Attrs: nofree nounwind
declare noalias noundef ptr @fopen(ptr nocapture noundef readonly, ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare void @perror(ptr nocapture noundef readonly) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @fseek(ptr nocapture noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i64 @ftell(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #2

; Function Attrs: nofree nounwind
declare noundef i64 @fread(ptr nocapture noundef, i64 noundef, i64 noundef, ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

declare void @http_parser_init(ptr noundef, i32 noundef) local_unnamed_addr #5

declare i64 @http_parser_execute(ptr noundef, ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #5

declare ptr @http_errno_description(i32 noundef) local_unnamed_addr #5

declare ptr @http_errno_name(i32 noundef) local_unnamed_addr #5

; Function Attrs: nofree nounwind
declare noundef i32 @fclose(ptr nocapture noundef) local_unnamed_addr #1

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #5 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #6 = { cold }
attributes #7 = { nounwind allocsize(0) }
attributes #8 = { cold nounwind }
attributes #9 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 0}
!11 = !{!"http_parser_settings", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!12 = !{!11, !6, i64 8}
!13 = !{!11, !6, i64 24}
!14 = !{!11, !6, i64 32}
!15 = !{!11, !6, i64 40}
!16 = !{!11, !6, i64 48}
!17 = !{!11, !6, i64 56}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass