; LLVM IR from attractivechaos/klib :: kurl (s3_parse)

; 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.s3aux_t = type { ptr, ptr, ptr }
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr }
%struct.kstring_t = type { i32, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @s3_parse(ptr dead_on_unwind noalias writable sret(%struct.s3aux_t) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #2 {
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca [64 x i8], align 16
  %16 = alloca [29 x i8], align 16
  %17 = alloca i64, align 8
  %18 = alloca %struct.tm, align 8
  %19 = alloca %struct.kstring_t, align 8
  %20 = alloca i32, align 4
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  store ptr %4, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #6
  store ptr null, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 64, ptr %15) #6
  call void @llvm.lifetime.start.p0(i64 29, ptr %16) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr %18) #6
  call void @llvm.memset.p0.i64(ptr align 8 %0, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr %19) #6
  call void @llvm.memset.p0.i64(ptr align 8 %19, i8 0, i64 16, i1 false)
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = call ptr @strstr(ptr noundef %21, ptr noundef @.str.1) #7
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = icmp ne ptr %22, %23
  br i1 %24, label %25, label %26

25:                                               ; preds = %5
  store i32 1, ptr %20, align 4
  br label %146

26:                                               ; preds = %5
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds i8, ptr %27, i64 5
  store ptr %28, ptr %12, align 8, !tbaa !5
  %29 = load ptr, ptr %12, align 8, !tbaa !5
  store ptr %29, ptr %13, align 8, !tbaa !5
  br label %30

30:                                               ; preds = %43, %26
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = load i8, ptr %31, align 1, !tbaa !9
  %33 = sext i8 %32 to i32
  %34 = icmp ne i32 %33, 0
  br i1 %34, label %35, label %40

35:                                               ; preds = %30
  %36 = load ptr, ptr %13, align 8, !tbaa !5
  %37 = load i8, ptr %36, align 1, !tbaa !9
  %38 = sext i8 %37 to i32
  %39 = icmp ne i32 %38, 47
  br label %40

40:                                               ; preds = %35, %30
  %41 = phi i1 [ false, %30 ], [ %39, %35 ]
  br i1 %41, label %42, label %46

42:                                               ; preds = %40
  br label %43

43:                                               ; preds = %42
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = getelementptr inbounds i8, ptr %44, i32 1
  store ptr %45, ptr %13, align 8, !tbaa !5
  br label %30, !llvm.loop !10

46:                                               ; preds = %40
  %47 = load ptr, ptr %13, align 8, !tbaa !5
  %48 = load i8, ptr %47, align 1, !tbaa !9
  %49 = sext i8 %48 to i32
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %46
  store i32 1, ptr %20, align 4
  br label %146

52:                                               ; preds = %46
  %53 = load ptr, ptr %7, align 8, !tbaa !5
  %54 = icmp eq ptr %53, null
  br i1 %54, label %58, label %55

55:                                               ; preds = %52
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %71

58:                                               ; preds = %55, %52
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = call ptr @s3_read_awssecret(ptr noundef %59)
  store ptr %60, ptr %14, align 8, !tbaa !5
  %61 = load ptr, ptr %14, align 8, !tbaa !5
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %64

63:                                               ; preds = %58
  store i32 1, ptr %20, align 4
  br label %146

64:                                               ; preds = %58
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  store ptr %65, ptr %10, align 8, !tbaa !5
  %66 = load ptr, ptr %14, align 8, !tbaa !5
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  %68 = call i64 @strlen(ptr noundef %67) #7
  %69 = getelementptr inbounds i8, ptr %66, i64 %68
  %70 = getelementptr inbounds i8, ptr %69, i64 1
  store ptr %70, ptr %11, align 8, !tbaa !5
  br label %74

71:                                               ; preds = %55
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %72, ptr %10, align 8, !tbaa !5
  %73 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %73, ptr %11, align 8, !tbaa !5
  br label %74

74:                                               ; preds = %71, %64
  %75 = call i32 @kputsn(ptr noundef @.str.2, i32 noundef 8, ptr noundef %19)
  %76 = load ptr, ptr %12, align 8, !tbaa !5
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = load ptr, ptr %12, align 8, !tbaa !5
  %79 = ptrtoint ptr %77 to i64
  %80 = ptrtoint ptr %78 to i64
  %81 = sub i64 %79, %80
  %82 = trunc i64 %81 to i32
  %83 = call i32 @kputsn(ptr noundef %76, i32 noundef %82, ptr noundef %19)
  %84 = call i32 @kputsn(ptr noundef @.str.3, i32 noundef 17, ptr noundef %19)
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load ptr, ptr %13, align 8, !tbaa !5
  %87 = call i64 @strlen(ptr noundef %86) #7
  %88 = trunc i64 %87 to i32
  %89 = call i32 @kputsn(ptr noundef %85, i32 noundef %88, ptr noundef %19)
  %90 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 2
  %91 = load ptr, ptr %90, align 8, !tbaa !12
  %92 = getelementptr inbounds %struct.s3aux_t, ptr %0, i32 0, i32 0
  store ptr %91, ptr %92, align 8, !tbaa !15
  %93 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 1
  store i32 0, ptr %93, align 4, !tbaa !17
  %94 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 0
  store i32 0, ptr %94, align 8, !tbaa !18
  %95 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 2
  store ptr null, ptr %95, align 8, !tbaa !12
  %96 = call i64 @time(ptr noundef null) #6
  store i64 %96, ptr %17, align 8, !tbaa !19
  %97 = getelementptr inbounds [64 x i8], ptr %15, i64 0, i64 0
  %98 = call ptr @gmtime_r(ptr noundef %17, ptr noundef %18) #6
  %99 = call i64 @strftime(ptr noundef %97, i64 noundef 64, ptr noundef @.str.4, ptr noundef %98) #6
  %100 = call i32 @kputsn(ptr noundef @.str.5, i32 noundef 6, ptr noundef %19)
  %101 = getelementptr inbounds [64 x i8], ptr %15, i64 0, i64 0
  %102 = getelementptr inbounds [64 x i8], ptr %15, i64 0, i64 0
  %103 = call i64 @strlen(ptr noundef %102) #7
  %104 = trunc i64 %103 to i32
  %105 = call i32 @kputsn(ptr noundef %101, i32 noundef %104, ptr noundef %19)
  %106 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 2
  %107 = load ptr, ptr %106, align 8, !tbaa !12
  %108 = getelementptr inbounds %struct.s3aux_t, ptr %0, i32 0, i32 1
  store ptr %107, ptr %108, align 8, !tbaa !21
  %109 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 1
  store i32 0, ptr %109, align 4, !tbaa !17
  %110 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 0
  store i32 0, ptr %110, align 8, !tbaa !18
  %111 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 2
  store ptr null, ptr %111, align 8, !tbaa !12
  %112 = call i32 @kputsn(ptr noundef @.str.6, i32 noundef 6, ptr noundef %19)
  %113 = getelementptr inbounds [64 x i8], ptr %15, i64 0, i64 0
  %114 = getelementptr inbounds [64 x i8], ptr %15, i64 0, i64 0
  %115 = call i64 @strlen(ptr noundef %114) #7
  %116 = trunc i64 %115 to i32
  %117 = call i32 @kputsn(ptr noundef %113, i32 noundef %116, ptr noundef %19)
  %118 = call i32 @kputsn(ptr noundef @.str.7, i32 noundef 1, ptr noundef %19)
  %119 = load ptr, ptr %12, align 8, !tbaa !5
  %120 = getelementptr inbounds i8, ptr %119, i64 -1
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = getelementptr inbounds i8, ptr %121, i64 -1
  %123 = call i64 @strlen(ptr noundef %122) #7
  %124 = trunc i64 %123 to i32
  %125 = call i32 @kputsn(ptr noundef %120, i32 noundef %124, ptr noundef %19)
  %126 = load ptr, ptr %11, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 2
  %128 = load ptr, ptr %127, align 8, !tbaa !12
  %129 = getelementptr inbounds [29 x i8], ptr %16, i64 0, i64 0
  call void @s3_sign(ptr noundef %126, ptr noundef %128, ptr noundef %129)
  %130 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 0
  store i32 0, ptr %130, align 8, !tbaa !18
  %131 = call i32 @kputsn(ptr noundef @.str.8, i32 noundef 19, ptr noundef %19)
  %132 = load ptr, ptr %10, align 8, !tbaa !5
  %133 = load ptr, ptr %10, align 8, !tbaa !5
  %134 = call i64 @strlen(ptr noundef %133) #7
  %135 = trunc i64 %134 to i32
  %136 = call i32 @kputsn(ptr noundef %132, i32 noundef %135, ptr noundef %19)
  %137 = call i32 @kputsn(ptr noundef @.str.9, i32 noundef 1, ptr noundef %19)
  %138 = getelementptr inbounds [29 x i8], ptr %16, i64 0, i64 0
  %139 = getelementptr inbounds [29 x i8], ptr %16, i64 0, i64 0
  %140 = call i64 @strlen(ptr noundef %139) #7
  %141 = trunc i64 %140 to i32
  %142 = call i32 @kputsn(ptr noundef %138, i32 noundef %141, ptr noundef %19)
  %143 = getelementptr inbounds %struct.kstring_t, ptr %19, i32 0, i32 2
  %144 = load ptr, ptr %143, align 8, !tbaa !12
  %145 = getelementptr inbounds %struct.s3aux_t, ptr %0, i32 0, i32 2
  store ptr %144, ptr %145, align 8, !tbaa !22
  store i32 1, ptr %20, align 4
  br label %146

146:                                              ; preds = %74, %63, %51, %25
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 29, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 64, ptr %15) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #6
  ret void
}

; 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) #3

; Function Attrs: nounwind uwtable
declare hidden ptr @s3_read_awssecret(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #1

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @kputsn(ptr noundef, i32 noundef, ptr noundef) #4

; Function Attrs: nounwind
declare i64 @time(ptr noundef) #5

; Function Attrs: nounwind
declare i64 @strftime(ptr noundef, i64 noundef, ptr noundef, ptr noundef) #5

; Function Attrs: nounwind
declare ptr @gmtime_r(ptr noundef, ptr noundef) #5

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind willreturn memory(read) "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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 #5 = { 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 #6 = { nounwind }
attributes #7 = { nounwind willreturn memory(read) }

!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 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = !{!13, !6, i64 8}
!13 = !{!"", !14, i64 0, !14, i64 4, !6, i64 8}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 0}
!16 = !{!"", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!13, !14, i64 4}
!18 = !{!13, !14, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = !{!16, !6, i64 8}
!22 = !{!16, !6, i64 16}


; 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.s3aux_t = type { ptr, ptr, ptr }
%struct.tm = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr }
%struct.kstring_t = type { i32, i32, ptr }

@.str.1 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [28 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

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

; Function Attrs: nounwind uwtable
define dso_local void @s3_parse(ptr dead_on_unwind noalias nocapture writable writeonly sret(%struct.s3aux_t) align 8 %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) local_unnamed_addr #1 {
  %6 = alloca [64 x i8], align 16
  %7 = alloca [29 x i8], align 16
  %8 = alloca i64, align 8
  %9 = alloca %struct.tm, align 8
  %10 = alloca %struct.kstring_t, align 8
  call void @llvm.lifetime.start.p0(i64 64, ptr nonnull %6) #7
  call void @llvm.lifetime.start.p0(i64 29, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %9) #7
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, i8 0, i64 24, i1 false)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false)
  %strlen = tail call i64 @strlen(ptr nonnull dereferenceable(1) @.str.1)
  %strncmp = tail call i32 @strncmp(ptr %1, ptr nonnull @.str.1, i64 %strlen)
  %cmp.not = icmp eq i32 %strncmp, 0
  br i1 %cmp.not, label %11, label %.loopexit

11:                                               ; preds = %5
  %12 = getelementptr inbounds i8, ptr %1, i64 5
  br label %13

13:                                               ; preds = %15, %11
  %.0 = phi ptr [ %12, %11 ], [ %16, %15 ]
  %14 = load i8, ptr %.0, align 1, !tbaa !5
  switch i8 %14, label %15 [
    i8 0, label %.loopexit
    i8 47, label %17
  ]

15:                                               ; preds = %13
  %16 = getelementptr inbounds i8, ptr %.0, i64 1
  br label %13, !llvm.loop !8

17:                                               ; preds = %13
  %18 = icmp eq ptr %2, null
  %19 = icmp eq ptr %3, null
  %or.cond = or i1 %18, %19
  br i1 %or.cond, label %20, label %27

20:                                               ; preds = %17
  %21 = tail call ptr @s3_read_awssecret(ptr noundef %4)
  %22 = icmp eq ptr %21, null
  br i1 %22, label %.loopexit, label %23

23:                                               ; preds = %20
  %24 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %21) #8
  %25 = getelementptr inbounds i8, ptr %21, i64 %24
  %26 = getelementptr inbounds i8, ptr %25, i64 1
  br label %27

27:                                               ; preds = %17, %23
  %.029 = phi ptr [ %26, %23 ], [ %3, %17 ]
  %.028 = phi ptr [ %21, %23 ], [ %2, %17 ]
  %28 = call i32 @kputsn(ptr noundef nonnull @.str.2, i32 noundef 8, ptr noundef nonnull %10)
  %29 = ptrtoint ptr %.0 to i64
  %30 = ptrtoint ptr %12 to i64
  %31 = sub i64 %29, %30
  %32 = trunc i64 %31 to i32
  %33 = call i32 @kputsn(ptr noundef nonnull %12, i32 noundef %32, ptr noundef nonnull %10)
  %34 = call i32 @kputsn(ptr noundef nonnull @.str.3, i32 noundef 17, ptr noundef nonnull %10)
  %35 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.0) #8
  %36 = trunc i64 %35 to i32
  %37 = call i32 @kputsn(ptr noundef nonnull %.0, i32 noundef %36, ptr noundef nonnull %10)
  %38 = getelementptr inbounds i8, ptr %10, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !10
  store ptr %39, ptr %0, align 8, !tbaa !14
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false)
  %40 = call i64 @time(ptr noundef null) #7
  store i64 %40, ptr %8, align 8, !tbaa !16
  %41 = call ptr @gmtime_r(ptr noundef nonnull %8, ptr noundef nonnull %9) #7
  %42 = call i64 @strftime(ptr noundef nonnull %6, i64 noundef 64, ptr noundef nonnull @.str.4, ptr noundef %41) #7
  %43 = call i32 @kputsn(ptr noundef nonnull @.str.5, i32 noundef 6, ptr noundef nonnull %10)
  %44 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #8
  %45 = trunc i64 %44 to i32
  %46 = call i32 @kputsn(ptr noundef nonnull %6, i32 noundef %45, ptr noundef nonnull %10)
  %47 = load ptr, ptr %38, align 8, !tbaa !10
  %48 = getelementptr inbounds i8, ptr %0, i64 8
  store ptr %47, ptr %48, align 8, !tbaa !18
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false)
  %49 = call i32 @kputsn(ptr noundef nonnull @.str.6, i32 noundef 6, ptr noundef nonnull %10)
  %50 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %6) #8
  %51 = trunc i64 %50 to i32
  %52 = call i32 @kputsn(ptr noundef nonnull %6, i32 noundef %51, ptr noundef nonnull %10)
  %53 = call i32 @kputsn(ptr noundef nonnull @.str.7, i32 noundef 1, ptr noundef nonnull %10)
  %54 = getelementptr inbounds i8, ptr %1, i64 4
  %55 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %54) #8
  %56 = trunc i64 %55 to i32
  %57 = call i32 @kputsn(ptr noundef nonnull %54, i32 noundef %56, ptr noundef nonnull %10)
  %58 = load ptr, ptr %38, align 8, !tbaa !10
  call void @s3_sign(ptr noundef nonnull %.029, ptr noundef %58, ptr noundef nonnull %7)
  store i32 0, ptr %10, align 8, !tbaa !19
  %59 = call i32 @kputsn(ptr noundef nonnull @.str.8, i32 noundef 19, ptr noundef nonnull %10)
  %60 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %.028) #8
  %61 = trunc i64 %60 to i32
  %62 = call i32 @kputsn(ptr noundef nonnull %.028, i32 noundef %61, ptr noundef nonnull %10)
  %63 = call i32 @kputsn(ptr noundef nonnull @.str.9, i32 noundef 1, ptr noundef nonnull %10)
  %64 = call i64 @strlen(ptr noundef nonnull dereferenceable(1) %7) #8
  %65 = trunc i64 %64 to i32
  %66 = call i32 @kputsn(ptr noundef nonnull %7, i32 noundef %65, ptr noundef nonnull %10)
  %67 = load ptr, ptr %38, align 8, !tbaa !10
  %68 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %67, ptr %68, align 8, !tbaa !20
  br label %.loopexit

.loopexit:                                        ; preds = %13, %20, %5, %27
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %10) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %9) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 29, ptr nonnull %7) #7
  call void @llvm.lifetime.end.p0(i64 64, ptr nonnull %6) #7
  ret void
}

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

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

; Function Attrs: nounwind uwtable
declare hidden ptr @s3_read_awssecret(ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @kputsn(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #4

; Function Attrs: nounwind
declare i64 @time(ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare i64 @strftime(ptr noundef, i64 noundef, ptr noundef, ptr noundef) local_unnamed_addr #5

; Function Attrs: nounwind
declare ptr @gmtime_r(ptr noundef, ptr noundef) local_unnamed_addr #5

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

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @strncmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #6

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { 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 #5 = { 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 #6 = { nofree nounwind willreturn memory(argmem: read) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = !{!11, !13, i64 8}
!11 = !{!"", !12, i64 0, !12, i64 4, !13, i64 8}
!12 = !{!"int", !6, i64 0}
!13 = !{!"any pointer", !6, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"", !13, i64 0, !13, i64 8, !13, i64 16}
!16 = !{!17, !17, i64 0}
!17 = !{!"long", !6, i64 0}
!18 = !{!15, !13, i64 8}
!19 = !{!11, !12, i64 0}
!20 = !{!15, !13, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass