; LLVM IR from nickmqb/muon :: bootstrap/mu.ll_CGenerator (genTernaryOperatorExpression__)

; 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.string__ = type { ptr, i32 }
%struct.tag_____IAllocator__ = type { ptr, ptr, ptr, ptr }
%struct.Node__ = type { i32, ptr }
%struct.tag_____Tag__ = type { ptr, ptr }
%struct.tag_____StringBuilder__ = type { ptr, i32, i32 }
%struct.tag_____GenerateContext__ = type { ptr, ptr, ptr, ptr, ptr, ptr, i32, i32, ptr, ptr, ptr, %struct.string__, i32, %struct.string__, i32, ptr, ptr, i8 }
%struct.tag_____TernaryOperatorExpression__ = type { %struct.Node__, ptr, %struct.Node__, ptr, %struct.Node__ }

@mu_____string446 = external dso_local global %struct.string__, align 8
@mu_____string308 = external dso_local global %struct.string__, align 8
@mu_____string447 = external dso_local global %struct.string__, align 8
@mu_____string465 = external dso_local global %struct.string__, align 8
@mu_____string324 = external dso_local global %struct.string__, align 8
@mu_____string421 = external dso_local global %struct.string__, align 8
@mu_____string422 = external dso_local global %struct.string__, align 8
@top_____currentAllocator__ = external dso_local thread_local global %struct.tag_____IAllocator__, align 8

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #1

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

; Function Attrs: nounwind uwtable
declare dso_local void @StringBuilder__write__(ptr noundef, ptr, i32) #4

; Function Attrs: nounwind uwtable
declare dso_local void @CodeBuilder__writeLine__(ptr noundef, ptr, i32) #4

; Function Attrs: nounwind uwtable
declare dso_local void @CGenerator__genConverted__(ptr noundef, i32, ptr, ptr noundef, ptr, ptr) #4

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @StringBuilder__toString__(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @StringBuilder__clear__(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @CodeBuilder__indent__(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local void @CodeBuilder__unIndent__(ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local { ptr, ptr } @CGenerator__nodeTag__(ptr noundef, i32, ptr) #4

; Function Attrs: nounwind uwtable
declare dso_local void @CGenerator__writeTag__(ptr noundef, ptr, ptr) #4

; Function Attrs: nounwind uwtable
declare dso_local void @CGenerator__genExpression__(ptr noundef, i32, ptr, ptr noundef) #4

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @CGenerator__newLocal__(ptr noundef) #4

; Function Attrs: nounwind uwtable
define dso_local void @CGenerator__genTernaryOperatorExpression__(ptr noundef %0, ptr noundef %1, ptr noundef %2) #4 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.Node__, align 8
  %8 = alloca %struct.tag_____Tag__, align 8
  %9 = alloca %struct.string__, align 8
  %10 = alloca ptr, align 8
  %11 = alloca %struct.tag_____StringBuilder__, align 8
  %12 = alloca ptr, align 8
  %13 = alloca %struct.string__, align 8
  %14 = alloca %struct.string__, align 8
  %15 = alloca %struct.string__, align 8
  %16 = alloca %struct.string__, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %7) #5
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.Node__, ptr %7, i32 0, i32 1
  store ptr %17, ptr %18, align 8, !tbaa !9
  %19 = getelementptr inbounds %struct.Node__, ptr %7, i32 0, i32 1
  %20 = load ptr, ptr %19, align 8, !tbaa !9
  %21 = icmp ne ptr %20, null
  %22 = zext i1 %21 to i64
  %23 = select i1 %21, i32 13, i32 0
  %24 = getelementptr inbounds %struct.Node__, ptr %7, i32 0, i32 0
  store i32 %23, ptr %24, align 8, !tbaa !12
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #5
  %25 = load ptr, ptr %4, align 8, !tbaa !5
  %26 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 0
  %27 = load i32, ptr %26, align 8
  %28 = getelementptr inbounds { i32, ptr }, ptr %7, i32 0, i32 1
  %29 = load ptr, ptr %28, align 8
  %30 = call { ptr, ptr } @CGenerator__nodeTag__(ptr noundef %25, i32 %27, ptr %29)
  %31 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %32 = extractvalue { ptr, ptr } %30, 0
  store ptr %32, ptr %31, align 8
  %33 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %34 = extractvalue { ptr, ptr } %30, 1
  store ptr %34, ptr %33, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %35 = load ptr, ptr %4, align 8, !tbaa !5
  %36 = call { ptr, i32 } @CGenerator__newLocal__(ptr noundef %35)
  %37 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %38 = extractvalue { ptr, i32 } %36, 0
  store ptr %38, ptr %37, align 8
  %39 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %40 = extractvalue { ptr, i32 } %36, 1
  store i32 %40, ptr %39, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  %41 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %42 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  %44 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %45 = getelementptr inbounds %struct.tag_____IAllocator__, ptr %44, i32 0, i32 0
  %46 = load ptr, ptr %45, align 8, !tbaa !15
  %47 = call ptr %43(ptr noundef %46, i64 noundef 16)
  store ptr %47, ptr %10, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  call void @llvm.memset.p0.i64(ptr align 8 %11, i8 0, i64 16, i1 false)
  %48 = load ptr, ptr %10, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %48, ptr align 8 %11, i64 16, i1 false), !tbaa.struct !16
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #5
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %49, ptr %12, align 8, !tbaa !5
  %50 = load ptr, ptr %12, align 8, !tbaa !5
  %51 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %52 = load ptr, ptr %51, align 8
  %53 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %54 = load ptr, ptr %53, align 8
  call void @CGenerator__writeTag__(ptr noundef %50, ptr %52, ptr %54)
  %55 = load ptr, ptr %12, align 8, !tbaa !5
  %56 = load ptr, ptr @mu_____string421, align 8
  %57 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string421, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %55, ptr %56, i32 %57)
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %60 = load ptr, ptr %59, align 8
  %61 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %62 = load i32, ptr %61, align 8
  call void @StringBuilder__write__(ptr noundef %58, ptr %60, i32 %62)
  %63 = load ptr, ptr %12, align 8, !tbaa !5
  %64 = load ptr, ptr @mu_____string324, align 8
  %65 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string324, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %63, ptr %64, i32 %65)
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %66, i32 0, i32 5
  %68 = load ptr, ptr %67, align 8, !tbaa !18
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  %70 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef %69)
  %71 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %72 = extractvalue { ptr, i32 } %70, 0
  store ptr %72, ptr %71, align 8
  %73 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %74 = extractvalue { ptr, i32 } %70, 1
  store i32 %74, ptr %73, align 8
  %75 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 0
  %76 = load ptr, ptr %75, align 8
  %77 = getelementptr inbounds { ptr, i32 }, ptr %13, i32 0, i32 1
  %78 = load i32, ptr %77, align 8
  call void @CodeBuilder__writeLine__(ptr noundef %68, ptr %76, i32 %78)
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  call void @StringBuilder__clear__(ptr noundef %79)
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = load ptr, ptr @mu_____string446, align 8
  %82 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string446, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %80, ptr %81, i32 %82)
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.tag_____TernaryOperatorExpression__, ptr %84, i32 0, i32 0
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = getelementptr inbounds { i32, ptr }, ptr %85, i32 0, i32 0
  %88 = load i32, ptr %87, align 8
  %89 = getelementptr inbounds { i32, ptr }, ptr %85, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8
  call void @CGenerator__genExpression__(ptr noundef %83, i32 %88, ptr %90, ptr noundef %86)
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = load ptr, ptr @mu_____string447, align 8
  %93 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string447, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %91, ptr %92, i32 %93)
  %94 = load ptr, ptr %4, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %94, i32 0, i32 5
  %96 = load ptr, ptr %95, align 8, !tbaa !18
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef %97)
  %99 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 0
  %100 = extractvalue { ptr, i32 } %98, 0
  store ptr %100, ptr %99, align 8
  %101 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 1
  %102 = extractvalue { ptr, i32 } %98, 1
  store i32 %102, ptr %101, align 8
  %103 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8
  %105 = getelementptr inbounds { ptr, i32 }, ptr %14, i32 0, i32 1
  %106 = load i32, ptr %105, align 8
  call void @CodeBuilder__writeLine__(ptr noundef %96, ptr %104, i32 %106)
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  call void @StringBuilder__clear__(ptr noundef %107)
  %108 = load ptr, ptr %4, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %108, i32 0, i32 5
  %110 = load ptr, ptr %109, align 8, !tbaa !18
  call void @CodeBuilder__indent__(ptr noundef %110)
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8
  %114 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %115 = load i32, ptr %114, align 8
  call void @StringBuilder__write__(ptr noundef %111, ptr %113, i32 %115)
  %116 = load ptr, ptr %12, align 8, !tbaa !5
  %117 = load ptr, ptr @mu_____string422, align 8
  %118 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string422, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %116, ptr %117, i32 %118)
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.tag_____TernaryOperatorExpression__, ptr %120, i32 0, i32 2
  %122 = load ptr, ptr %12, align 8, !tbaa !5
  %123 = getelementptr inbounds { i32, ptr }, ptr %121, i32 0, i32 0
  %124 = load i32, ptr %123, align 8
  %125 = getelementptr inbounds { i32, ptr }, ptr %121, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8
  %127 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8
  %129 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %130 = load ptr, ptr %129, align 8
  call void @CGenerator__genConverted__(ptr noundef %119, i32 %124, ptr %126, ptr noundef %122, ptr %128, ptr %130)
  %131 = load ptr, ptr %12, align 8, !tbaa !5
  %132 = load ptr, ptr @mu_____string324, align 8
  %133 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string324, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %131, ptr %132, i32 %133)
  %134 = load ptr, ptr %4, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %134, i32 0, i32 5
  %136 = load ptr, ptr %135, align 8, !tbaa !18
  %137 = load ptr, ptr %12, align 8, !tbaa !5
  %138 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef %137)
  %139 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %140 = extractvalue { ptr, i32 } %138, 0
  store ptr %140, ptr %139, align 8
  %141 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %142 = extractvalue { ptr, i32 } %138, 1
  store i32 %142, ptr %141, align 8
  %143 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 0
  %144 = load ptr, ptr %143, align 8
  %145 = getelementptr inbounds { ptr, i32 }, ptr %15, i32 0, i32 1
  %146 = load i32, ptr %145, align 8
  call void @CodeBuilder__writeLine__(ptr noundef %136, ptr %144, i32 %146)
  %147 = load ptr, ptr %12, align 8, !tbaa !5
  call void @StringBuilder__clear__(ptr noundef %147)
  %148 = load ptr, ptr %4, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %148, i32 0, i32 5
  %150 = load ptr, ptr %149, align 8, !tbaa !18
  call void @CodeBuilder__unIndent__(ptr noundef %150)
  %151 = load ptr, ptr %4, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %151, i32 0, i32 5
  %153 = load ptr, ptr %152, align 8, !tbaa !18
  %154 = load ptr, ptr @mu_____string465, align 8
  %155 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string465, i32 0, i32 1), align 8
  call void @CodeBuilder__writeLine__(ptr noundef %153, ptr %154, i32 %155)
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %156, i32 0, i32 5
  %158 = load ptr, ptr %157, align 8, !tbaa !18
  call void @CodeBuilder__indent__(ptr noundef %158)
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %161 = load ptr, ptr %160, align 8
  %162 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %163 = load i32, ptr %162, align 8
  call void @StringBuilder__write__(ptr noundef %159, ptr %161, i32 %163)
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  %165 = load ptr, ptr @mu_____string422, align 8
  %166 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string422, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %164, ptr %165, i32 %166)
  %167 = load ptr, ptr %4, align 8, !tbaa !5
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.tag_____TernaryOperatorExpression__, ptr %168, i32 0, i32 4
  %170 = load ptr, ptr %12, align 8, !tbaa !5
  %171 = getelementptr inbounds { i32, ptr }, ptr %169, i32 0, i32 0
  %172 = load i32, ptr %171, align 8
  %173 = getelementptr inbounds { i32, ptr }, ptr %169, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8
  %175 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 0
  %176 = load ptr, ptr %175, align 8
  %177 = getelementptr inbounds { ptr, ptr }, ptr %8, i32 0, i32 1
  %178 = load ptr, ptr %177, align 8
  call void @CGenerator__genConverted__(ptr noundef %167, i32 %172, ptr %174, ptr noundef %170, ptr %176, ptr %178)
  %179 = load ptr, ptr %12, align 8, !tbaa !5
  %180 = load ptr, ptr @mu_____string324, align 8
  %181 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string324, i32 0, i32 1), align 8
  call void @StringBuilder__write__(ptr noundef %179, ptr %180, i32 %181)
  %182 = load ptr, ptr %4, align 8, !tbaa !5
  %183 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %182, i32 0, i32 5
  %184 = load ptr, ptr %183, align 8, !tbaa !18
  %185 = load ptr, ptr %12, align 8, !tbaa !5
  %186 = call { ptr, i32 } @StringBuilder__toString__(ptr noundef %185)
  %187 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %188 = extractvalue { ptr, i32 } %186, 0
  store ptr %188, ptr %187, align 8
  %189 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %190 = extractvalue { ptr, i32 } %186, 1
  store i32 %190, ptr %189, align 8
  %191 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 0
  %192 = load ptr, ptr %191, align 8
  %193 = getelementptr inbounds { ptr, i32 }, ptr %16, i32 0, i32 1
  %194 = load i32, ptr %193, align 8
  call void @CodeBuilder__writeLine__(ptr noundef %184, ptr %192, i32 %194)
  %195 = load ptr, ptr %12, align 8, !tbaa !5
  call void @StringBuilder__clear__(ptr noundef %195)
  %196 = load ptr, ptr %4, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %196, i32 0, i32 5
  %198 = load ptr, ptr %197, align 8, !tbaa !18
  call void @CodeBuilder__unIndent__(ptr noundef %198)
  %199 = load ptr, ptr %4, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.tag_____GenerateContext__, ptr %199, i32 0, i32 5
  %201 = load ptr, ptr %200, align 8, !tbaa !18
  %202 = load ptr, ptr @mu_____string308, align 8
  %203 = load i32, ptr getelementptr inbounds ({ ptr, i32 }, ptr @mu_____string308, i32 0, i32 1), align 8
  call void @CodeBuilder__writeLine__(ptr noundef %201, ptr %202, i32 %203)
  %204 = load ptr, ptr %6, align 8, !tbaa !5
  %205 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 0
  %206 = load ptr, ptr %205, align 8
  %207 = getelementptr inbounds { ptr, i32 }, ptr %9, i32 0, i32 1
  %208 = load i32, ptr %207, align 8
  call void @StringBuilder__write__(ptr noundef %204, ptr %206, i32 %208)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %7) #5
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 #5 = { 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, !6, i64 8}
!10 = !{!"", !11, i64 0, !6, i64 8}
!11 = !{!"int", !7, i64 0}
!12 = !{!10, !11, i64 0}
!13 = !{!14, !6, i64 8}
!14 = !{!"tag_____IAllocator__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!15 = !{!14, !6, i64 0}
!16 = !{i64 0, i64 8, !5, i64 8, i64 4, !17, i64 12, i64 4, !17}
!17 = !{!11, !11, i64 0}
!18 = !{!19, !6, i64 40}
!19 = !{!"tag_____GenerateContext__", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !11, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !20, i64 80, !11, i64 96, !20, i64 104, !11, i64 120, !6, i64 128, !6, i64 136, !7, i64 144}
!20 = !{!"", !6, i64 0, !11, i64 8}


; 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.string__ = type { ptr, i32 }
%struct.tag_____IAllocator__ = type { ptr, ptr, ptr, ptr }

@mu_____string446 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string308 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string447 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string465 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string324 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string421 = external dso_local local_unnamed_addr global %struct.string__, align 8
@mu_____string422 = external dso_local local_unnamed_addr global %struct.string__, align 8
@top_____currentAllocator__ = external dso_local thread_local local_unnamed_addr global %struct.tag_____IAllocator__, align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull) #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @StringBuilder__write__(ptr noundef, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @CodeBuilder__writeLine__(ptr noundef, ptr, i32) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @CGenerator__genConverted__(ptr noundef, i32, ptr, ptr noundef, ptr, ptr) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @StringBuilder__toString__(ptr noundef) local_unnamed_addr #2

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

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

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

; Function Attrs: nounwind uwtable
declare dso_local { ptr, ptr } @CGenerator__nodeTag__(ptr noundef, i32, ptr) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @CGenerator__writeTag__(ptr noundef, ptr, ptr) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local void @CGenerator__genExpression__(ptr noundef, i32, ptr, ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
declare dso_local { ptr, i32 } @CGenerator__newLocal__(ptr noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local void @CGenerator__genTernaryOperatorExpression__(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #2 {
  %.not = icmp eq ptr %1, null
  %4 = select i1 %.not, i32 0, i32 13
  %5 = tail call { ptr, ptr } @CGenerator__nodeTag__(ptr noundef %0, i32 %4, ptr %1)
  %6 = extractvalue { ptr, ptr } %5, 0
  %7 = extractvalue { ptr, ptr } %5, 1
  %8 = tail call { ptr, i32 } @CGenerator__newLocal__(ptr noundef %0)
  %9 = extractvalue { ptr, i32 } %8, 0
  %10 = extractvalue { ptr, i32 } %8, 1
  %11 = tail call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @top_____currentAllocator__)
  %12 = getelementptr inbounds i8, ptr %11, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  %14 = load ptr, ptr %11, align 8, !tbaa !10
  %15 = tail call ptr %13(ptr noundef %14, i64 noundef 16) #3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %15, i8 0, i64 16, i1 false)
  tail call void @CGenerator__writeTag__(ptr noundef %15, ptr %6, ptr %7)
  %16 = load ptr, ptr @mu_____string421, align 8
  %17 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string421, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %16, i32 %17)
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %9, i32 %10)
  %18 = load ptr, ptr @mu_____string324, align 8
  %19 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string324, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %18, i32 %19)
  %20 = getelementptr inbounds i8, ptr %0, i64 40
  %21 = load ptr, ptr %20, align 8, !tbaa !11
  %22 = tail call { ptr, i32 } @StringBuilder__toString__(ptr noundef %15)
  %23 = extractvalue { ptr, i32 } %22, 0
  %24 = extractvalue { ptr, i32 } %22, 1
  tail call void @CodeBuilder__writeLine__(ptr noundef %21, ptr %23, i32 %24)
  tail call void @StringBuilder__clear__(ptr noundef %15)
  %25 = load ptr, ptr @mu_____string446, align 8
  %26 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string446, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %25, i32 %26)
  %27 = load i32, ptr %1, align 8
  %28 = getelementptr inbounds i8, ptr %1, i64 8
  %29 = load ptr, ptr %28, align 8
  tail call void @CGenerator__genExpression__(ptr noundef %0, i32 %27, ptr %29, ptr noundef %15)
  %30 = load ptr, ptr @mu_____string447, align 8
  %31 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string447, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %30, i32 %31)
  %32 = load ptr, ptr %20, align 8, !tbaa !11
  %33 = tail call { ptr, i32 } @StringBuilder__toString__(ptr noundef %15)
  %34 = extractvalue { ptr, i32 } %33, 0
  %35 = extractvalue { ptr, i32 } %33, 1
  tail call void @CodeBuilder__writeLine__(ptr noundef %32, ptr %34, i32 %35)
  tail call void @StringBuilder__clear__(ptr noundef %15)
  %36 = load ptr, ptr %20, align 8, !tbaa !11
  tail call void @CodeBuilder__indent__(ptr noundef %36)
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %9, i32 %10)
  %37 = load ptr, ptr @mu_____string422, align 8
  %38 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string422, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %37, i32 %38)
  %39 = getelementptr inbounds i8, ptr %1, i64 24
  %40 = load i32, ptr %39, align 8
  %41 = getelementptr inbounds i8, ptr %1, i64 32
  %42 = load ptr, ptr %41, align 8
  tail call void @CGenerator__genConverted__(ptr noundef %0, i32 %40, ptr %42, ptr noundef %15, ptr %6, ptr %7)
  %43 = load ptr, ptr @mu_____string324, align 8
  %44 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string324, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %43, i32 %44)
  %45 = load ptr, ptr %20, align 8, !tbaa !11
  %46 = tail call { ptr, i32 } @StringBuilder__toString__(ptr noundef %15)
  %47 = extractvalue { ptr, i32 } %46, 0
  %48 = extractvalue { ptr, i32 } %46, 1
  tail call void @CodeBuilder__writeLine__(ptr noundef %45, ptr %47, i32 %48)
  tail call void @StringBuilder__clear__(ptr noundef %15)
  %49 = load ptr, ptr %20, align 8, !tbaa !11
  tail call void @CodeBuilder__unIndent__(ptr noundef %49)
  %50 = load ptr, ptr %20, align 8, !tbaa !11
  %51 = load ptr, ptr @mu_____string465, align 8
  %52 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string465, i64 8), align 8
  tail call void @CodeBuilder__writeLine__(ptr noundef %50, ptr %51, i32 %52)
  %53 = load ptr, ptr %20, align 8, !tbaa !11
  tail call void @CodeBuilder__indent__(ptr noundef %53)
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %9, i32 %10)
  %54 = load ptr, ptr @mu_____string422, align 8
  %55 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string422, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %54, i32 %55)
  %56 = getelementptr inbounds i8, ptr %1, i64 48
  %57 = load i32, ptr %56, align 8
  %58 = getelementptr inbounds i8, ptr %1, i64 56
  %59 = load ptr, ptr %58, align 8
  tail call void @CGenerator__genConverted__(ptr noundef %0, i32 %57, ptr %59, ptr noundef %15, ptr %6, ptr %7)
  %60 = load ptr, ptr @mu_____string324, align 8
  %61 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string324, i64 8), align 8
  tail call void @StringBuilder__write__(ptr noundef %15, ptr %60, i32 %61)
  %62 = load ptr, ptr %20, align 8, !tbaa !11
  %63 = tail call { ptr, i32 } @StringBuilder__toString__(ptr noundef %15)
  %64 = extractvalue { ptr, i32 } %63, 0
  %65 = extractvalue { ptr, i32 } %63, 1
  tail call void @CodeBuilder__writeLine__(ptr noundef %62, ptr %64, i32 %65)
  tail call void @StringBuilder__clear__(ptr noundef %15)
  %66 = load ptr, ptr %20, align 8, !tbaa !11
  tail call void @CodeBuilder__unIndent__(ptr noundef %66)
  %67 = load ptr, ptr %20, align 8, !tbaa !11
  %68 = load ptr, ptr @mu_____string308, align 8
  %69 = load i32, ptr getelementptr inbounds (i8, ptr @mu_____string308, i64 8), align 8
  tail call void @CodeBuilder__writeLine__(ptr noundef %67, ptr %68, i32 %69)
  tail call void @StringBuilder__write__(ptr noundef %2, ptr %9, i32 %10)
  ret void
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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 #3 = { 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, !7, i64 8}
!6 = !{!"tag_____IAllocator__", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!6, !7, i64 0}
!11 = !{!12, !7, i64 40}
!12 = !{!"tag_____GenerateContext__", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !13, i64 48, !13, i64 52, !7, i64 56, !7, i64 64, !7, i64 72, !14, i64 80, !13, i64 96, !14, i64 104, !13, i64 120, !7, i64 128, !7, i64 136, !8, i64 144}
!13 = !{!"int", !8, i64 0}
!14 = !{!"", !7, i64 0, !13, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SROAPass,TailCallElimPass