; LLVM IR from tenok-rtos/tenok :: user/shell (shell)

; 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.shell = type { i32, i32, i32, [50 x i8], [50 x i8], [50 x i8], i8, i32, i32, i32, ptr, i32, i32, i8, ptr, %struct.list_head, ptr, ptr, i32 }
%struct.list_head = type { ptr, ptr }

@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local signext i8 @shell_getc() #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @shell_listen(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca [2 x i8], align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8, !tbaa !5
  %6 = getelementptr inbounds %struct.shell, ptr %5, i32 0, i32 4
  %7 = getelementptr inbounds [50 x i8], ptr %6, i64 0, i64 0
  call void @shell_puts(ptr noundef %7)
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #2
  call void @llvm.lifetime.start.p0(i64 2, ptr %4) #2
  br label %8

8:                                                ; preds = %149, %1
  br label %9

9:                                                ; preds = %8
  %10 = call signext i8 @shell_getc()
  %11 = sext i8 %10 to i32
  store i32 %11, ptr %3, align 4, !tbaa !9
  %12 = load i32, ptr %3, align 4, !tbaa !9
  switch i32 %12, label %136 [
    i32 0, label %149
    i32 1, label %13
    i32 2, label %15
    i32 3, label %17
    i32 4, label %149
    i32 5, label %19
    i32 6, label %21
    i32 7, label %149
    i32 8, label %149
    i32 9, label %23
    i32 10, label %149
    i32 13, label %25
    i32 11, label %149
    i32 12, label %149
    i32 14, label %149
    i32 15, label %149
    i32 16, label %149
    i32 17, label %149
    i32 18, label %149
    i32 19, label %149
    i32 20, label %149
    i32 21, label %43
    i32 23, label %149
    i32 24, label %149
    i32 25, label %149
    i32 26, label %149
    i32 27, label %45
    i32 127, label %133
    i32 32, label %135
  ]

13:                                               ; preds = %9
  %14 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_ctrl_a_handler(ptr noundef %14)
  br label %149

15:                                               ; preds = %9
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_left_arrow_handler(ptr noundef %16)
  br label %149

17:                                               ; preds = %9
  %18 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_ctrl_c_handler(ptr noundef %18)
  br label %149

19:                                               ; preds = %9
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_ctrl_e_handler(ptr noundef %20)
  br label %149

21:                                               ; preds = %9
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_right_arrow_handler(ptr noundef %22)
  br label %149

23:                                               ; preds = %9
  %24 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_autocomplete(ptr noundef %24)
  br label %149

25:                                               ; preds = %9
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_reset_history_scrolling(ptr noundef %26)
  %27 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_reset_autocomplete(ptr noundef %27)
  %28 = load ptr, ptr %2, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.shell, ptr %28, i32 0, i32 1
  %30 = load i32, ptr %29, align 4, !tbaa !11
  %31 = icmp sgt i32 %30, 0
  br i1 %31, label %32, label %38

32:                                               ; preds = %25
  call void @shell_puts(ptr noundef @.str.3)
  %33 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_reset_line(ptr noundef %33)
  %34 = load ptr, ptr %2, align 8, !tbaa !5
  %35 = load ptr, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.shell, ptr %35, i32 0, i32 3
  %37 = getelementptr inbounds [50 x i8], ptr %36, i64 0, i64 0
  call void @shell_push_new_history(ptr noundef %34, ptr noundef %37)
  call void @llvm.lifetime.end.p0(i64 2, ptr %4) #2
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #2
  ret void

38:                                               ; preds = %25
  call void @shell_puts(ptr noundef @.str.3)
  %39 = load ptr, ptr %2, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.shell, ptr %39, i32 0, i32 4
  %41 = getelementptr inbounds [50 x i8], ptr %40, i64 0, i64 0
  call void @shell_puts(ptr noundef %41)
  br label %42

42:                                               ; preds = %38
  br label %149

43:                                               ; preds = %9
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_ctrl_u_handler(ptr noundef %44)
  br label %149

45:                                               ; preds = %9
  %46 = call signext i8 @shell_getc()
  %47 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 0
  store i8 %46, ptr %47, align 1, !tbaa !15
  %48 = call signext i8 @shell_getc()
  %49 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  store i8 %48, ptr %49, align 1, !tbaa !15
  %50 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 0
  %51 = load i8, ptr %50, align 1, !tbaa !15
  %52 = sext i8 %51 to i32
  %53 = icmp eq i32 %52, 91
  br i1 %53, label %54, label %132

54:                                               ; preds = %45
  %55 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %56 = load i8, ptr %55, align 1, !tbaa !15
  %57 = sext i8 %56 to i32
  %58 = icmp eq i32 %57, 65
  br i1 %58, label %59, label %61

59:                                               ; preds = %54
  %60 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_up_arrow_handler(ptr noundef %60)
  br label %149

61:                                               ; preds = %54
  %62 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %63 = load i8, ptr %62, align 1, !tbaa !15
  %64 = sext i8 %63 to i32
  %65 = icmp eq i32 %64, 66
  br i1 %65, label %66, label %68

66:                                               ; preds = %61
  %67 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_down_arrow_handler(ptr noundef %67)
  br label %149

68:                                               ; preds = %61
  %69 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %70 = load i8, ptr %69, align 1, !tbaa !15
  %71 = sext i8 %70 to i32
  %72 = icmp eq i32 %71, 67
  br i1 %72, label %73, label %75

73:                                               ; preds = %68
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_right_arrow_handler(ptr noundef %74)
  br label %149

75:                                               ; preds = %68
  %76 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %77 = load i8, ptr %76, align 1, !tbaa !15
  %78 = sext i8 %77 to i32
  %79 = icmp eq i32 %78, 68
  br i1 %79, label %80, label %82

80:                                               ; preds = %75
  %81 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_left_arrow_handler(ptr noundef %81)
  br label %149

82:                                               ; preds = %75
  %83 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %84 = load i8, ptr %83, align 1, !tbaa !15
  %85 = sext i8 %84 to i32
  %86 = icmp eq i32 %85, 72
  br i1 %86, label %87, label %89

87:                                               ; preds = %82
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_home_handler(ptr noundef %88)
  br label %149

89:                                               ; preds = %82
  %90 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %91 = load i8, ptr %90, align 1, !tbaa !15
  %92 = sext i8 %91 to i32
  %93 = icmp eq i32 %92, 49
  br i1 %93, label %94, label %97

94:                                               ; preds = %89
  %95 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_home_handler(ptr noundef %95)
  %96 = call signext i8 @shell_getc()
  br label %149

97:                                               ; preds = %89
  %98 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %99 = load i8, ptr %98, align 1, !tbaa !15
  %100 = sext i8 %99 to i32
  %101 = icmp eq i32 %100, 70
  br i1 %101, label %102, label %104

102:                                              ; preds = %97
  %103 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_end_handler(ptr noundef %103)
  br label %149

104:                                              ; preds = %97
  %105 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %106 = load i8, ptr %105, align 1, !tbaa !15
  %107 = sext i8 %106 to i32
  %108 = icmp eq i32 %107, 52
  br i1 %108, label %109, label %112

109:                                              ; preds = %104
  %110 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_end_handler(ptr noundef %110)
  %111 = call signext i8 @shell_getc()
  br label %149

112:                                              ; preds = %104
  %113 = getelementptr inbounds [2 x i8], ptr %4, i64 0, i64 1
  %114 = load i8, ptr %113, align 1, !tbaa !15
  %115 = sext i8 %114 to i32
  %116 = icmp eq i32 %115, 51
  br i1 %116, label %117, label %123

117:                                              ; preds = %112
  %118 = call signext i8 @shell_getc()
  %119 = sext i8 %118 to i32
  %120 = icmp eq i32 %119, 126
  br i1 %120, label %121, label %123

121:                                              ; preds = %117
  %122 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_delete_handler(ptr noundef %122)
  br label %149

123:                                              ; preds = %117, %112
  br label %124

124:                                              ; preds = %123
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131, %45
  br label %149

133:                                              ; preds = %9
  %134 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_backspace_handler(ptr noundef %134)
  br label %149

135:                                              ; preds = %9
  br label %136

136:                                              ; preds = %135, %9
  %137 = load ptr, ptr %2, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct.shell, ptr %137, i32 0, i32 1
  %139 = load i32, ptr %138, align 4, !tbaa !11
  %140 = icmp ne i32 %139, 49
  br i1 %140, label %141, label %148

141:                                              ; preds = %136
  %142 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_reset_autocomplete(ptr noundef %142)
  %143 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_reset_history_scrolling(ptr noundef %143)
  %144 = load ptr, ptr %2, align 8, !tbaa !5
  %145 = load i32, ptr %3, align 4, !tbaa !9
  %146 = trunc i32 %145 to i8
  call void @shell_insert_char(ptr noundef %144, i8 noundef signext %146)
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  call void @shell_refresh_line(ptr noundef %147)
  br label %148

148:                                              ; preds = %141, %136
  br label %149

149:                                              ; preds = %148, %133, %132, %121, %109, %102, %94, %87, %80, %73, %66, %59, %43, %42, %23, %21, %19, %17, %15, %13, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9, %9
  br label %8
}

; Function Attrs: nounwind uwtable
declare hidden void @shell_ctrl_a_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_left_arrow_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_ctrl_c_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_ctrl_e_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_right_arrow_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_autocomplete(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_reset_history_scrolling(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_reset_autocomplete(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_reset_line(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_push_new_history(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_ctrl_u_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_up_arrow_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_down_arrow_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_home_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_end_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_delete_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_backspace_handler(ptr noundef) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_insert_char(ptr noundef, i8 noundef signext) #0

; Function Attrs: nounwind uwtable
declare hidden void @shell_refresh_line(ptr noundef) #0

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 4}
!12 = !{!"shell", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !7, i64 62, !7, i64 112, !13, i64 162, !10, i64 164, !10, i64 168, !10, i64 172, !6, i64 176, !10, i64 184, !10, i64 188, !13, i64 192, !6, i64 200, !14, i64 208, !6, i64 224, !6, i64 232, !10, i64 240}
!13 = !{!"_Bool", !7, i64 0}
!14 = !{!"list_head", !6, i64 0, !6, i64 8}
!15 = !{!7, !7, i64 0}


; 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"

@.str.3 = external hidden unnamed_addr constant [3 x i8], align 1

; Function Attrs: nounwind uwtable
declare dso_local signext i8 @shell_getc() local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @shell_listen(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 62
  tail call void @shell_puts(ptr noundef nonnull %2)
  %3 = getelementptr inbounds i8, ptr %0, i64 4
  br label %4

4:                                                ; preds = %.backedge, %1
  %5 = tail call signext i8 @shell_getc()
  switch i8 %5, label %39 [
    i8 0, label %.backedge
    i8 1, label %6
    i8 2, label %7
    i8 3, label %8
    i8 4, label %.backedge
    i8 5, label %9
    i8 6, label %10
    i8 7, label %.backedge
    i8 8, label %.backedge
    i8 9, label %11
    i8 10, label %.backedge
    i8 13, label %12
    i8 11, label %.backedge
    i8 12, label %.backedge
    i8 14, label %.backedge
    i8 15, label %.backedge
    i8 16, label %.backedge
    i8 17, label %.backedge
    i8 18, label %.backedge
    i8 19, label %.backedge
    i8 20, label %.backedge
    i8 21, label %18
    i8 23, label %.backedge
    i8 24, label %.backedge
    i8 25, label %.backedge
    i8 26, label %.backedge
    i8 27, label %19
    i8 127, label %38
  ]

6:                                                ; preds = %4
  tail call void @shell_ctrl_a_handler(ptr noundef %0)
  br label %.backedge

7:                                                ; preds = %4
  tail call void @shell_left_arrow_handler(ptr noundef %0)
  br label %.backedge

8:                                                ; preds = %4
  tail call void @shell_ctrl_c_handler(ptr noundef %0)
  br label %.backedge

9:                                                ; preds = %4
  tail call void @shell_ctrl_e_handler(ptr noundef %0)
  br label %.backedge

10:                                               ; preds = %4
  tail call void @shell_right_arrow_handler(ptr noundef %0)
  br label %.backedge

11:                                               ; preds = %4
  tail call void @shell_autocomplete(ptr noundef %0)
  br label %.backedge

12:                                               ; preds = %4
  tail call void @shell_reset_history_scrolling(ptr noundef %0)
  tail call void @shell_reset_autocomplete(ptr noundef %0)
  %13 = load i32, ptr %3, align 4, !tbaa !5
  %14 = icmp sgt i32 %13, 0
  tail call void @shell_puts(ptr noundef nonnull @.str.3)
  br i1 %14, label %15, label %17

15:                                               ; preds = %12
  tail call void @shell_reset_line(ptr noundef nonnull %0)
  %16 = getelementptr inbounds i8, ptr %0, i64 12
  tail call void @shell_push_new_history(ptr noundef nonnull %0, ptr noundef nonnull %16)
  ret void

17:                                               ; preds = %12
  tail call void @shell_puts(ptr noundef nonnull %2)
  br label %.backedge

18:                                               ; preds = %4
  tail call void @shell_ctrl_u_handler(ptr noundef %0)
  br label %.backedge

19:                                               ; preds = %4
  %20 = tail call signext i8 @shell_getc()
  %21 = tail call signext i8 @shell_getc()
  %22 = icmp eq i8 %20, 91
  br i1 %22, label %23, label %.backedge

23:                                               ; preds = %19
  switch i8 %21, label %.backedge [
    i8 65, label %24
    i8 66, label %25
    i8 67, label %26
    i8 68, label %27
    i8 72, label %28
    i8 49, label %29
    i8 70, label %31
    i8 52, label %32
    i8 51, label %34
  ]

.backedge:                                        ; preds = %23, %39, %41, %19, %34, %38, %37, %32, %31, %29, %28, %27, %26, %25, %24, %18, %17, %11, %10, %9, %8, %7, %6, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4, %4
  br label %4

24:                                               ; preds = %23
  tail call void @shell_up_arrow_handler(ptr noundef %0)
  br label %.backedge

25:                                               ; preds = %23
  tail call void @shell_down_arrow_handler(ptr noundef %0)
  br label %.backedge

26:                                               ; preds = %23
  tail call void @shell_right_arrow_handler(ptr noundef %0)
  br label %.backedge

27:                                               ; preds = %23
  tail call void @shell_left_arrow_handler(ptr noundef %0)
  br label %.backedge

28:                                               ; preds = %23
  tail call void @shell_home_handler(ptr noundef %0)
  br label %.backedge

29:                                               ; preds = %23
  tail call void @shell_home_handler(ptr noundef %0)
  %30 = tail call signext i8 @shell_getc()
  br label %.backedge

31:                                               ; preds = %23
  tail call void @shell_end_handler(ptr noundef %0)
  br label %.backedge

32:                                               ; preds = %23
  tail call void @shell_end_handler(ptr noundef %0)
  %33 = tail call signext i8 @shell_getc()
  br label %.backedge

34:                                               ; preds = %23
  %35 = tail call signext i8 @shell_getc()
  %36 = icmp eq i8 %35, 126
  br i1 %36, label %37, label %.backedge

37:                                               ; preds = %34
  tail call void @shell_delete_handler(ptr noundef %0)
  br label %.backedge

38:                                               ; preds = %4
  tail call void @shell_backspace_handler(ptr noundef %0)
  br label %.backedge

39:                                               ; preds = %4
  %40 = load i32, ptr %3, align 4, !tbaa !5
  %.not = icmp eq i32 %40, 49
  br i1 %.not, label %.backedge, label %41

41:                                               ; preds = %39
  tail call void @shell_reset_autocomplete(ptr noundef nonnull %0)
  tail call void @shell_reset_history_scrolling(ptr noundef nonnull %0)
  tail call void @shell_insert_char(ptr noundef nonnull %0, i8 noundef signext %5)
  tail call void @shell_refresh_line(ptr noundef nonnull %0)
  br label %.backedge
}

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @shell_push_new_history(ptr noundef, ptr noundef) local_unnamed_addr #0

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
declare hidden void @shell_insert_char(ptr noundef, i8 noundef signext) local_unnamed_addr #0

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

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" }

!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, !7, i64 4}
!6 = !{!"shell", !7, i64 0, !7, i64 4, !7, i64 8, !8, i64 12, !8, i64 62, !8, i64 112, !10, i64 162, !7, i64 164, !7, i64 168, !7, i64 172, !11, i64 176, !7, i64 184, !7, i64 188, !10, i64 192, !11, i64 200, !12, i64 208, !11, i64 224, !11, i64 232, !7, i64 240}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_Bool", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"list_head", !11, i64 0, !11, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass