; LLVM IR from xxks-kkk/algo :: stack/postfix (postfix2)

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

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @infixTopostfix(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  store i32 20, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  %7 = load i32, ptr %3, align 4, !tbaa !9
  %8 = call ptr @createStack(i32 noundef %7)
  store ptr %8, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #7
  %9 = load ptr, ptr %2, align 8, !tbaa !5
  %10 = call noalias ptr @fopen(ptr noundef %9, ptr noundef @.str)
  store ptr %10, ptr %5, align 8, !tbaa !5
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %13, label %17

13:                                               ; preds = %1
  %14 = load ptr, ptr @stderr, align 8, !tbaa !5
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %14, ptr noundef @.str.1, ptr noundef %15) #7
  call void @exit(i32 noundef 1) #8
  unreachable

17:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #7
  br label %18

18:                                               ; preds = %136, %17
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call i32 @getc(ptr noundef %19)
  store i32 %20, ptr %6, align 4, !tbaa !9
  %21 = icmp ne i32 %20, -1
  br i1 %21, label %22, label %137

22:                                               ; preds = %18
  %23 = call ptr @__ctype_b_loc() #9
  %24 = load ptr, ptr %23, align 8, !tbaa !5
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds i16, ptr %24, i64 %26
  %28 = load i16, ptr %27, align 2, !tbaa !11
  %29 = zext i16 %28 to i32
  %30 = and i32 %29, 1024
  %31 = icmp ne i32 %30, 0
  br i1 %31, label %42, label %32

32:                                               ; preds = %22
  %33 = call ptr @__ctype_b_loc() #9
  %34 = load ptr, ptr %33, align 8, !tbaa !5
  %35 = load i32, ptr %6, align 4, !tbaa !9
  %36 = sext i32 %35 to i64
  %37 = getelementptr inbounds i16, ptr %34, i64 %36
  %38 = load i16, ptr %37, align 2, !tbaa !11
  %39 = zext i16 %38 to i32
  %40 = and i32 %39, 2048
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %45

42:                                               ; preds = %32, %22
  %43 = load i32, ptr %6, align 4, !tbaa !9
  %44 = call i32 @putchar(i32 noundef %43)
  br label %136

45:                                               ; preds = %32
  %46 = load i32, ptr %6, align 4, !tbaa !9
  switch i32 %46, label %131 [
    i32 32, label %135
    i32 45, label %47
    i32 43, label %47
    i32 47, label %68
    i32 42, label %68
    i32 40, label %114
    i32 41, label %116
    i32 94, label %129
  ]

47:                                               ; preds = %45, %45
  br label %48

48:                                               ; preds = %59, %47
  %49 = load ptr, ptr %4, align 8, !tbaa !5
  %50 = call i32 @isEmpty(ptr noundef %49)
  %51 = icmp ne i32 %50, 0
  br i1 %51, label %57, label %52

52:                                               ; preds = %48
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call signext i8 @top(ptr noundef %53)
  %55 = sext i8 %54 to i32
  %56 = icmp ne i32 %55, 40
  br label %57

57:                                               ; preds = %52, %48
  %58 = phi i1 [ false, %48 ], [ %56, %52 ]
  br i1 %58, label %59, label %64

59:                                               ; preds = %57
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = call signext i8 @topAndPop(ptr noundef %60)
  %62 = sext i8 %61 to i32
  %63 = call i32 @putchar(i32 noundef %62)
  br label %48, !llvm.loop !13

64:                                               ; preds = %57
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = trunc i32 %65 to i8
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  call void @push(i8 noundef signext %66, ptr noundef %67)
  br label %135

68:                                               ; preds = %45, %45
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = call signext i8 @top(ptr noundef %69)
  %71 = sext i8 %70 to i32
  %72 = icmp eq i32 %71, 43
  br i1 %72, label %87, label %73

73:                                               ; preds = %68
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = call signext i8 @top(ptr noundef %74)
  %76 = sext i8 %75 to i32
  %77 = icmp eq i32 %76, 45
  br i1 %77, label %87, label %78

78:                                               ; preds = %73
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = call signext i8 @top(ptr noundef %79)
  %81 = sext i8 %80 to i32
  %82 = icmp eq i32 %81, 40
  br i1 %82, label %87, label %83

83:                                               ; preds = %78
  %84 = load ptr, ptr %4, align 8, !tbaa !5
  %85 = call i32 @isEmpty(ptr noundef %84)
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %91

87:                                               ; preds = %83, %78, %73, %68
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = trunc i32 %88 to i8
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  call void @push(i8 noundef signext %89, ptr noundef %90)
  br label %113

91:                                               ; preds = %83
  br label %92

92:                                               ; preds = %104, %91
  %93 = load ptr, ptr %4, align 8, !tbaa !5
  %94 = call signext i8 @top(ptr noundef %93)
  %95 = sext i8 %94 to i32
  %96 = icmp ne i32 %95, 40
  br i1 %96, label %97, label %102

97:                                               ; preds = %92
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = call i32 @isEmpty(ptr noundef %98)
  %100 = icmp ne i32 %99, 0
  %101 = xor i1 %100, true
  br label %102

102:                                              ; preds = %97, %92
  %103 = phi i1 [ false, %92 ], [ %101, %97 ]
  br i1 %103, label %104, label %109

104:                                              ; preds = %102
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = call signext i8 @topAndPop(ptr noundef %105)
  %107 = sext i8 %106 to i32
  %108 = call i32 @putchar(i32 noundef %107)
  br label %92, !llvm.loop !15

109:                                              ; preds = %102
  %110 = load i32, ptr %6, align 4, !tbaa !9
  %111 = trunc i32 %110 to i8
  %112 = load ptr, ptr %4, align 8, !tbaa !5
  call void @push(i8 noundef signext %111, ptr noundef %112)
  br label %113

113:                                              ; preds = %109, %87
  br label %135

114:                                              ; preds = %45
  %115 = load ptr, ptr %4, align 8, !tbaa !5
  call void @push(i8 noundef signext 40, ptr noundef %115)
  br label %135

116:                                              ; preds = %45
  br label %117

117:                                              ; preds = %122, %116
  %118 = load ptr, ptr %4, align 8, !tbaa !5
  %119 = call signext i8 @top(ptr noundef %118)
  %120 = sext i8 %119 to i32
  %121 = icmp ne i32 %120, 40
  br i1 %121, label %122, label %127

122:                                              ; preds = %117
  %123 = load ptr, ptr %4, align 8, !tbaa !5
  %124 = call signext i8 @topAndPop(ptr noundef %123)
  %125 = sext i8 %124 to i32
  %126 = call i32 @putchar(i32 noundef %125)
  br label %117, !llvm.loop !16

127:                                              ; preds = %117
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  call void @pop(ptr noundef %128)
  br label %135

129:                                              ; preds = %45
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  call void @push(i8 noundef signext 94, ptr noundef %130)
  br label %135

131:                                              ; preds = %45
  %132 = load ptr, ptr @stderr, align 8, !tbaa !5
  %133 = load i32, ptr %6, align 4, !tbaa !9
  %134 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %132, ptr noundef @.str.2, i32 noundef %133) #7
  call void @exit(i32 noundef 1) #8
  unreachable

135:                                              ; preds = %129, %127, %114, %113, %64, %45
  br label %136

136:                                              ; preds = %135, %42
  br label %18, !llvm.loop !17

137:                                              ; preds = %18
  br label %138

138:                                              ; preds = %143, %137
  %139 = load ptr, ptr %4, align 8, !tbaa !5
  %140 = call i32 @isEmpty(ptr noundef %139)
  %141 = icmp ne i32 %140, 0
  %142 = xor i1 %141, true
  br i1 %142, label %143, label %148

143:                                              ; preds = %138
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = call signext i8 @topAndPop(ptr noundef %144)
  %146 = sext i8 %145 to i32
  %147 = call i32 @putchar(i32 noundef %146)
  br label %138, !llvm.loop !18

148:                                              ; preds = %138
  %149 = load ptr, ptr %4, align 8, !tbaa !5
  call void @disposeStack(ptr noundef %149)
  %150 = call i32 (ptr, ...) @printf(ptr noundef @.str.3)
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  ret void
}

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

declare ptr @createStack(i32 noundef) #2

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

declare i32 @getc(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() #5

; Function Attrs: inlinehint nounwind uwtable
declare i32 @putchar(i32 noundef) #6

declare i32 @isEmpty(ptr noundef) #2

declare signext i8 @top(ptr noundef) #2

declare signext i8 @topAndPop(ptr noundef) #2

declare void @push(i8 noundef signext, ptr noundef) #2

declare void @pop(ptr noundef) #2

declare void @disposeStack(ptr noundef) #2

declare i32 @printf(ptr noundef, ...) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = { 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 #4 = { noreturn 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 #5 = { nounwind willreturn memory(none) "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 = { inlinehint 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 #7 = { nounwind }
attributes #8 = { noreturn nounwind }
attributes #9 = { nounwind willreturn memory(none) }

!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, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}
!17 = distinct !{!17, !14}
!18 = distinct !{!18, !14}


; 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 = external hidden unnamed_addr constant [2 x i8], align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str.1 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @infixTopostfix(ptr noundef %0) local_unnamed_addr #0 {
  %2 = tail call ptr @createStack(i32 noundef 20) #6
  %3 = tail call noalias ptr @fopen(ptr noundef %0, ptr noundef nonnull @.str)
  %4 = icmp eq ptr %3, null
  br i1 %4, label %7, label %.preheader47

.preheader47:                                     ; preds = %1
  %5 = tail call i32 @getc(ptr noundef nonnull %3)
  %.not57 = icmp eq i32 %5, -1
  br i1 %.not57, label %.preheader, label %.lr.ph58

.lr.ph58:                                         ; preds = %.preheader47
  %6 = tail call ptr @__ctype_b_loc() #7
  br label %11

7:                                                ; preds = %1
  %8 = load ptr, ptr @stderr, align 8, !tbaa !5
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str.1, ptr noundef %0) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

.preheader:                                       ; preds = %61, %.preheader47
  %10 = tail call i32 @isEmpty(ptr noundef %2) #6
  %.not3659 = icmp eq i32 %10, 0
  br i1 %.not3659, label %.lr.ph60, label %._crit_edge61

11:                                               ; preds = %.lr.ph58, %61
  %12 = phi i32 [ %5, %.lr.ph58 ], [ %62, %61 ]
  %13 = load ptr, ptr %6, align 8, !tbaa !5
  %14 = sext i32 %12 to i64
  %15 = getelementptr inbounds i16, ptr %13, i64 %14
  %16 = load i16, ptr %15, align 2, !tbaa !9
  %17 = and i16 %16, 3072
  %or.cond = icmp eq i16 %17, 0
  br i1 %or.cond, label %20, label %18

18:                                               ; preds = %11
  %19 = tail call i32 @putchar(i32 noundef %12)
  br label %61

20:                                               ; preds = %11
  switch i32 %12, label %58 [
    i32 32, label %61
    i32 45, label %22
    i32 43, label %22
    i32 47, label %31
    i32 42, label %31
    i32 40, label %52
    i32 41, label %.preheader46
    i32 94, label %57
  ]

.preheader46:                                     ; preds = %20
  %21 = tail call signext i8 @top(ptr noundef %2) #6
  %.not3949 = icmp eq i8 %21, 40
  br i1 %.not3949, label %._crit_edge, label %.lr.ph

22:                                               ; preds = %20, %20
  %23 = tail call i32 @isEmpty(ptr noundef %2) #6
  %.not4353 = icmp eq i32 %23, 0
  br i1 %.not4353, label %.lr.ph55, label %.critedge

.lr.ph55:                                         ; preds = %22, %25
  %24 = tail call signext i8 @top(ptr noundef %2) #6
  %.not44 = icmp eq i8 %24, 40
  br i1 %.not44, label %.critedge, label %25

25:                                               ; preds = %.lr.ph55
  %26 = tail call signext i8 @topAndPop(ptr noundef %2) #6
  %27 = sext i8 %26 to i32
  %28 = tail call i32 @putchar(i32 noundef %27)
  %29 = tail call i32 @isEmpty(ptr noundef %2) #6
  %.not43 = icmp eq i32 %29, 0
  br i1 %.not43, label %.lr.ph55, label %.critedge, !llvm.loop !11

.critedge:                                        ; preds = %.lr.ph55, %25, %22
  %30 = trunc i32 %12 to i8
  tail call void @push(i8 noundef signext %30, ptr noundef %2) #6
  br label %61

31:                                               ; preds = %20, %20
  %32 = tail call signext i8 @top(ptr noundef %2) #6
  %33 = icmp eq i8 %32, 43
  br i1 %33, label %43, label %34

34:                                               ; preds = %31
  %35 = tail call signext i8 @top(ptr noundef %2) #6
  %36 = icmp eq i8 %35, 45
  br i1 %36, label %43, label %37

37:                                               ; preds = %34
  %38 = tail call signext i8 @top(ptr noundef %2) #6
  %39 = icmp eq i8 %38, 40
  br i1 %39, label %43, label %40

40:                                               ; preds = %37
  %41 = tail call i32 @isEmpty(ptr noundef %2) #6
  %.not40 = icmp eq i32 %41, 0
  br i1 %.not40, label %.preheader45, label %43

.preheader45:                                     ; preds = %40
  %42 = tail call signext i8 @top(ptr noundef %2) #6
  %.not4150 = icmp eq i8 %42, 40
  br i1 %.not4150, label %.critedge2, label %.lr.ph51

43:                                               ; preds = %40, %37, %34, %31
  %44 = trunc i32 %12 to i8
  tail call void @push(i8 noundef signext %44, ptr noundef %2) #6
  br label %61

.lr.ph51:                                         ; preds = %.preheader45, %46
  %45 = tail call i32 @isEmpty(ptr noundef %2) #6
  %.not42 = icmp eq i32 %45, 0
  br i1 %.not42, label %46, label %.critedge2

46:                                               ; preds = %.lr.ph51
  %47 = tail call signext i8 @topAndPop(ptr noundef %2) #6
  %48 = sext i8 %47 to i32
  %49 = tail call i32 @putchar(i32 noundef %48)
  %50 = tail call signext i8 @top(ptr noundef %2) #6
  %.not41 = icmp eq i8 %50, 40
  br i1 %.not41, label %.critedge2, label %.lr.ph51, !llvm.loop !13

.critedge2:                                       ; preds = %.lr.ph51, %46, %.preheader45
  %51 = trunc i32 %12 to i8
  tail call void @push(i8 noundef signext %51, ptr noundef %2) #6
  br label %61

52:                                               ; preds = %20
  tail call void @push(i8 noundef signext 40, ptr noundef %2) #6
  br label %61

.lr.ph:                                           ; preds = %.preheader46, %.lr.ph
  %53 = tail call signext i8 @topAndPop(ptr noundef %2) #6
  %54 = sext i8 %53 to i32
  %55 = tail call i32 @putchar(i32 noundef %54)
  %56 = tail call signext i8 @top(ptr noundef %2) #6
  %.not39 = icmp eq i8 %56, 40
  br i1 %.not39, label %._crit_edge, label %.lr.ph, !llvm.loop !14

._crit_edge:                                      ; preds = %.lr.ph, %.preheader46
  tail call void @pop(ptr noundef %2) #6
  br label %61

57:                                               ; preds = %20
  tail call void @push(i8 noundef signext 94, ptr noundef %2) #6
  br label %61

58:                                               ; preds = %20
  %59 = load ptr, ptr @stderr, align 8, !tbaa !5
  %60 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %59, ptr noundef nonnull @.str.2, i32 noundef %12) #8
  tail call void @exit(i32 noundef 1) #9
  unreachable

61:                                               ; preds = %20, %.critedge, %52, %._crit_edge, %57, %.critedge2, %43, %18
  %62 = tail call i32 @getc(ptr noundef nonnull %3)
  %.not = icmp eq i32 %62, -1
  br i1 %.not, label %.preheader, label %11, !llvm.loop !15

.lr.ph60:                                         ; preds = %.preheader, %.lr.ph60
  %63 = tail call signext i8 @topAndPop(ptr noundef %2) #6
  %64 = sext i8 %63 to i32
  %65 = tail call i32 @putchar(i32 noundef %64)
  %66 = tail call i32 @isEmpty(ptr noundef %2) #6
  %.not36 = icmp eq i32 %66, 0
  br i1 %.not36, label %.lr.ph60, label %._crit_edge61, !llvm.loop !16

._crit_edge61:                                    ; preds = %.lr.ph60, %.preheader
  tail call void @disposeStack(ptr noundef %2) #6
  %67 = tail call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.3)
  ret void
}

declare ptr @createStack(i32 noundef) local_unnamed_addr #1

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

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare ptr @__ctype_b_loc() local_unnamed_addr #4

; Function Attrs: inlinehint nofree nounwind uwtable
declare noundef i32 @putchar(i32 noundef) local_unnamed_addr #5

declare i32 @isEmpty(ptr noundef) local_unnamed_addr #1

declare signext i8 @top(ptr noundef) local_unnamed_addr #1

declare signext i8 @topAndPop(ptr noundef) local_unnamed_addr #1

declare void @push(i8 noundef signext, ptr noundef) local_unnamed_addr #1

declare void @pop(ptr noundef) local_unnamed_addr #1

declare void @disposeStack(ptr noundef) local_unnamed_addr #1

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #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 = { "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 = { 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 #3 = { noreturn 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 #4 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 = { inlinehint nofree 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(none) }
attributes #8 = { cold nounwind }
attributes #9 = { noreturn 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 = !{!"short", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}
!14 = distinct !{!14, !12}
!15 = distinct !{!15, !12}
!16 = distinct !{!16, !12}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass