; LLVM IR from pmwkaa/monotone :: monotone/cloud/s3 (s3_request)

; 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.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }
%struct.S3Request = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, i64, ptr, [64 x i8], [256 x i8], [1024 x i8] }
%struct.S3Io = type { ptr, ptr, %struct.List }
%struct.List = type { ptr, ptr }
%struct.Cloud = type { i32, ptr, ptr, %struct.List }
%struct.CloudConfig = type { %struct.Str, %struct.Str, %struct.Str, %struct.Str, %struct.Str, i8 }
%struct.Str = type { ptr, ptr, i8 }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@mn_runtime = external thread_local global %struct.Runtime, align 8
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@__func__.s3_request_execute = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @s3_request_execute(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca [512 x i8], align 16
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #7
  %10 = load ptr, ptr %2, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.S3Request, ptr %10, i32 0, i32 0
  %12 = load ptr, ptr %11, align 8, !tbaa !9
  %13 = getelementptr inbounds %struct.S3Io, ptr %12, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !12
  %15 = getelementptr inbounds %struct.Cloud, ptr %14, i32 0, i32 2
  %16 = load ptr, ptr %15, align 8, !tbaa !15
  store ptr %16, ptr %3, align 8, !tbaa !5
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  call void @s3_request_prepare(ptr noundef %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #7
  store ptr null, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 512, ptr %5) #7
  %18 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %19 = load ptr, ptr %2, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.S3Request, ptr %19, i32 0, i32 10
  %21 = getelementptr inbounds [64 x i8], ptr %20, i64 0, i64 0
  %22 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %18, i64 noundef 512, ptr noundef @.str, ptr noundef %21) #7
  %23 = load ptr, ptr %4, align 8, !tbaa !5
  %24 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %25 = call ptr @curl_slist_append(ptr noundef %23, ptr noundef %24)
  store ptr %25, ptr %4, align 8, !tbaa !5
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.S3Request, ptr %26, i32 0, i32 7
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  %29 = icmp ne ptr %28, null
  br i1 %29, label %30, label %47

30:                                               ; preds = %1
  %31 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %32 = load ptr, ptr %2, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.S3Request, ptr %32, i32 0, i32 7
  %34 = load ptr, ptr %33, align 8, !tbaa !18
  %35 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %31, i64 noundef 512, ptr noundef @.str.1, ptr noundef %34) #7
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %38 = call ptr @curl_slist_append(ptr noundef %36, ptr noundef %37)
  store ptr %38, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %40 = load ptr, ptr %2, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.S3Request, ptr %40, i32 0, i32 8
  %42 = load i64, ptr %41, align 8, !tbaa !19
  %43 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %39, i64 noundef 512, ptr noundef @.str.2, i64 noundef %42) #7
  %44 = load ptr, ptr %4, align 8, !tbaa !5
  %45 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %46 = call ptr @curl_slist_append(ptr noundef %44, ptr noundef %45)
  store ptr %46, ptr %4, align 8, !tbaa !5
  br label %47

47:                                               ; preds = %30, %1
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.S3Request, ptr %48, i32 0, i32 9
  %50 = load ptr, ptr %49, align 8, !tbaa !20
  %51 = icmp ne ptr %50, null
  br i1 %51, label %52, label %61

52:                                               ; preds = %47
  %53 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %54 = load ptr, ptr %2, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.S3Request, ptr %54, i32 0, i32 9
  %56 = load ptr, ptr %55, align 8, !tbaa !20
  %57 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %53, i64 noundef 512, ptr noundef @.str.3, ptr noundef %56) #7
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %60 = call ptr @curl_slist_append(ptr noundef %58, ptr noundef %59)
  store ptr %60, ptr %4, align 8, !tbaa !5
  br label %61

61:                                               ; preds = %52, %47
  %62 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.S3Request, ptr %63, i32 0, i32 11
  %65 = getelementptr inbounds [256 x i8], ptr %64, i64 0, i64 0
  %66 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %62, i64 noundef 512, ptr noundef @.str.4, ptr noundef %65) #7
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds [512 x i8], ptr %5, i64 0, i64 0
  %69 = call ptr @curl_slist_append(ptr noundef %67, ptr noundef %68)
  store ptr %69, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #7
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.S3Request, ptr %70, i32 0, i32 0
  %72 = load ptr, ptr %71, align 8, !tbaa !9
  %73 = getelementptr inbounds %struct.S3Io, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !21
  store ptr %74, ptr %6, align 8, !tbaa !5
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  call void @curl_easy_reset(ptr noundef %75)
  %76 = load ptr, ptr %6, align 8, !tbaa !5
  %77 = load ptr, ptr %2, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.S3Request, ptr %77, i32 0, i32 6
  %79 = load ptr, ptr %78, align 8, !tbaa !22
  %80 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %76, i32 noundef 10036, ptr noundef %79)
  %81 = load ptr, ptr %6, align 8, !tbaa !5
  %82 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %81, i32 noundef 45, i32 noundef 1)
  %83 = load ptr, ptr %6, align 8, !tbaa !5
  %84 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %83, i32 noundef 52, i32 noundef 1)
  %85 = load ptr, ptr %6, align 8, !tbaa !5
  %86 = load ptr, ptr %4, align 8, !tbaa !5
  %87 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %85, i32 noundef 10023, ptr noundef %86)
  %88 = load ptr, ptr %2, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.S3Request, ptr %88, i32 0, i32 1
  %90 = load ptr, ptr %89, align 8, !tbaa !23
  %91 = icmp ne ptr %90, null
  br i1 %91, label %92, label %116

92:                                               ; preds = %61
  %93 = load ptr, ptr %2, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.S3Request, ptr %93, i32 0, i32 8
  %95 = load i64, ptr %94, align 8, !tbaa !19
  %96 = icmp ugt i64 %95, 0
  br i1 %96, label %97, label %105

97:                                               ; preds = %92
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %98, i32 noundef 46, i32 noundef 1)
  %100 = load ptr, ptr %6, align 8, !tbaa !5
  %101 = load ptr, ptr %2, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.S3Request, ptr %101, i32 0, i32 8
  %103 = load i64, ptr %102, align 8, !tbaa !19
  %104 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %100, i32 noundef 30115, i64 noundef %103)
  br label %105

105:                                              ; preds = %97, %92
  %106 = load ptr, ptr %6, align 8, !tbaa !5
  %107 = load ptr, ptr %2, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.S3Request, ptr %107, i32 0, i32 1
  %109 = load ptr, ptr %108, align 8, !tbaa !23
  %110 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %106, i32 noundef 20012, ptr noundef %109)
  %111 = load ptr, ptr %6, align 8, !tbaa !5
  %112 = load ptr, ptr %2, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.S3Request, ptr %112, i32 0, i32 3
  %114 = load ptr, ptr %113, align 8, !tbaa !24
  %115 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %111, i32 noundef 10009, ptr noundef %114)
  br label %116

116:                                              ; preds = %105, %61
  %117 = load ptr, ptr %2, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.S3Request, ptr %117, i32 0, i32 2
  %119 = load ptr, ptr %118, align 8, !tbaa !25
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %132

121:                                              ; preds = %116
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = load ptr, ptr %2, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.S3Request, ptr %123, i32 0, i32 2
  %125 = load ptr, ptr %124, align 8, !tbaa !25
  %126 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %122, i32 noundef 20011, ptr noundef %125)
  %127 = load ptr, ptr %6, align 8, !tbaa !5
  %128 = load ptr, ptr %2, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.S3Request, ptr %128, i32 0, i32 3
  %130 = load ptr, ptr %129, align 8, !tbaa !24
  %131 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %127, i32 noundef 10001, ptr noundef %130)
  br label %132

132:                                              ; preds = %121, %116
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.CloudConfig, ptr %133, i32 0, i32 5
  %135 = load i8, ptr %134, align 8, !tbaa !26, !range !30, !noundef !31
  %136 = trunc i8 %135 to i1
  br i1 %136, label %137, label %145

137:                                              ; preds = %132
  %138 = load ptr, ptr %6, align 8, !tbaa !5
  %139 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %138, i32 noundef 41, i32 noundef 1)
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %140, i32 noundef 20094, ptr noundef @s3_request_debug_cb)
  %142 = load ptr, ptr %6, align 8, !tbaa !5
  %143 = load ptr, ptr %3, align 8, !tbaa !5
  %144 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %142, i32 noundef 10095, ptr noundef %143)
  br label %145

145:                                              ; preds = %137, %132
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #7
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = load ptr, ptr %2, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.S3Request, ptr %147, i32 0, i32 12
  %149 = getelementptr inbounds [1024 x i8], ptr %148, i64 0, i64 0
  %150 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %146, i32 noundef 10002, ptr noundef %149)
  store i32 %150, ptr %7, align 4, !tbaa !32
  %151 = load i32, ptr %7, align 4, !tbaa !32
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %154

153:                                              ; preds = %145
  br label %162

154:                                              ; preds = %145
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = call i32 @curl_easy_perform(ptr noundef %155)
  store i32 %156, ptr %7, align 4, !tbaa !32
  %157 = load i32, ptr %7, align 4, !tbaa !32
  %158 = icmp ne i32 %157, 0
  br i1 %158, label %159, label %160

159:                                              ; preds = %154
  br label %162

160:                                              ; preds = %154
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  call void @curl_slist_free_all(ptr noundef %161)
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr %5) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #7
  ret void

162:                                              ; preds = %159, %153
  %163 = load ptr, ptr %4, align 8, !tbaa !5
  call void @curl_slist_free_all(ptr noundef %163)
  %164 = load i32, ptr %7, align 4, !tbaa !32
  %165 = call ptr @curl_easy_strerror(i32 noundef %164)
  store ptr %165, ptr %8, align 8, !tbaa !5
  %166 = load i32, ptr %7, align 4, !tbaa !32
  %167 = icmp eq i32 %166, 22
  br i1 %167, label %168, label %184

168:                                              ; preds = %162
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #7
  store i64 0, ptr %9, align 8, !tbaa !33
  %169 = load ptr, ptr %6, align 8, !tbaa !5
  %170 = call i32 (ptr, i32, ...) @curl_easy_getinfo(ptr noundef %169, i32 noundef 2097154, ptr noundef %9)
  %171 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %172 = getelementptr inbounds %struct.Runtime, ptr %171, i32 0, i32 1
  %173 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %174 = getelementptr inbounds %struct.Runtime, ptr %173, i32 0, i32 0
  %175 = load ptr, ptr %3, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct.CloudConfig, ptr %175, i32 0, i32 0
  %177 = call i32 @str_size(ptr noundef %176)
  %178 = load ptr, ptr %3, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.CloudConfig, ptr %178, i32 0, i32 0
  %180 = call ptr @str_of(ptr noundef %179)
  %181 = load i64, ptr %9, align 8, !tbaa !33
  %182 = trunc i64 %181 to i32
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ptr, i32, ptr, ...) @error_throw_as(ptr noundef %172, ptr noundef %174, ptr noundef @.str.5, ptr noundef @__func__.s3_request_execute, i32 noundef 260, ptr noundef @.str.6, i32 noundef %177, ptr noundef %180, i32 noundef %182, ptr noundef %183) #8
  unreachable

184:                                              ; preds = %162
  %185 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %186 = getelementptr inbounds %struct.Runtime, ptr %185, i32 0, i32 1
  %187 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %188 = getelementptr inbounds %struct.Runtime, ptr %187, i32 0, i32 0
  %189 = load ptr, ptr %3, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.CloudConfig, ptr %189, i32 0, i32 0
  %191 = call i32 @str_size(ptr noundef %190)
  %192 = load ptr, ptr %3, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.CloudConfig, ptr %192, i32 0, i32 0
  %194 = call ptr @str_of(ptr noundef %193)
  %195 = load ptr, ptr %8, align 8, !tbaa !5
  call void (ptr, ptr, ptr, ptr, i32, ptr, ...) @error_throw_as(ptr noundef %186, ptr noundef %188, ptr noundef @.str.5, ptr noundef @__func__.s3_request_execute, i32 noundef 266, ptr noundef @.str.7, i32 noundef %191, ptr noundef %194, ptr noundef %195) #8
  unreachable
}

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

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

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #2

declare ptr @curl_slist_append(ptr noundef, ptr noundef) #3

declare void @curl_easy_reset(ptr noundef) #3

declare i32 @curl_easy_setopt(ptr noundef, i32 noundef, ...) #3

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

declare i32 @curl_easy_perform(ptr noundef) #3

declare void @curl_slist_free_all(ptr noundef) #3

declare ptr @curl_easy_strerror(i32 noundef) #3

declare i32 @curl_easy_getinfo(ptr noundef, i32 noundef, ...) #3

; Function Attrs: inlinehint noreturn nounwind uwtable
declare hidden void @error_throw_as(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) #4

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @str_size(ptr noundef) #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @str_of(ptr noundef) #6

; 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 = { 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 = { "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 noreturn 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 }

!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 0}
!10 = !{!"S3Request", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !11, i64 64, !6, i64 72, !7, i64 80, !7, i64 144, !7, i64 400}
!11 = !{!"long", !7, i64 0}
!12 = !{!13, !6, i64 8}
!13 = !{!"S3Io", !6, i64 0, !6, i64 8, !14, i64 16}
!14 = !{!"List", !6, i64 0, !6, i64 8}
!15 = !{!16, !6, i64 16}
!16 = !{!"Cloud", !17, i64 0, !6, i64 8, !6, i64 16, !14, i64 24}
!17 = !{!"int", !7, i64 0}
!18 = !{!10, !6, i64 56}
!19 = !{!10, !11, i64 64}
!20 = !{!10, !6, i64 72}
!21 = !{!13, !6, i64 0}
!22 = !{!10, !6, i64 48}
!23 = !{!10, !6, i64 8}
!24 = !{!10, !6, i64 24}
!25 = !{!10, !6, i64 16}
!26 = !{!27, !29, i64 120}
!27 = !{!"CloudConfig", !28, i64 0, !28, i64 24, !28, i64 48, !28, i64 72, !28, i64 96, !29, i64 120}
!28 = !{!"Str", !6, i64 0, !6, i64 8, !29, i64 16}
!29 = !{!"_Bool", !7, i64 0}
!30 = !{i8 0, i8 2}
!31 = !{}
!32 = !{!17, !17, i64 0}
!33 = !{!11, !11, 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"

%struct.Runtime = type { %struct.ExceptionMgr, %struct.Error, ptr }
%struct.ExceptionMgr = type { ptr }
%struct.Error = type { [256 x i8], i32, ptr, ptr, i32, ptr, ptr }

@.str = external hidden unnamed_addr constant [9 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 x i8], align 1
@mn_runtime = external thread_local global %struct.Runtime, align 8
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@__func__.s3_request_execute = external hidden unnamed_addr constant [19 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @s3_request_execute(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca [512 x i8], align 16
  %3 = alloca i64, align 8
  %4 = load ptr, ptr %0, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %4, i64 8
  %6 = load ptr, ptr %5, align 8, !tbaa !11
  %7 = getelementptr inbounds i8, ptr %6, i64 16
  %8 = load ptr, ptr %7, align 8, !tbaa !14
  tail call void @s3_request_prepare(ptr noundef nonnull %0)
  call void @llvm.lifetime.start.p0(i64 512, ptr nonnull %2) #7
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  %10 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 512, ptr noundef nonnull @.str, ptr noundef nonnull %9) #7
  %11 = call ptr @curl_slist_append(ptr noundef null, ptr noundef nonnull %2) #7
  %12 = getelementptr inbounds i8, ptr %0, i64 56
  %13 = load ptr, ptr %12, align 8, !tbaa !17
  %.not = icmp eq ptr %13, null
  br i1 %.not, label %21, label %14

14:                                               ; preds = %1
  %15 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 512, ptr noundef nonnull @.str.1, ptr noundef nonnull %13) #7
  %16 = call ptr @curl_slist_append(ptr noundef %11, ptr noundef nonnull %2) #7
  %17 = getelementptr inbounds i8, ptr %0, i64 64
  %18 = load i64, ptr %17, align 8, !tbaa !18
  %19 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 512, ptr noundef nonnull @.str.2, i64 noundef %18) #7
  %20 = call ptr @curl_slist_append(ptr noundef %16, ptr noundef nonnull %2) #7
  br label %21

21:                                               ; preds = %14, %1
  %.0 = phi ptr [ %20, %14 ], [ %11, %1 ]
  %22 = getelementptr inbounds i8, ptr %0, i64 72
  %23 = load ptr, ptr %22, align 8, !tbaa !19
  %.not62 = icmp eq ptr %23, null
  br i1 %.not62, label %27, label %24

24:                                               ; preds = %21
  %25 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 512, ptr noundef nonnull @.str.3, ptr noundef nonnull %23) #7
  %26 = call ptr @curl_slist_append(ptr noundef %.0, ptr noundef nonnull %2) #7
  br label %27

27:                                               ; preds = %24, %21
  %.1 = phi ptr [ %26, %24 ], [ %.0, %21 ]
  %28 = getelementptr inbounds i8, ptr %0, i64 144
  %29 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %2, i64 noundef 512, ptr noundef nonnull @.str.4, ptr noundef nonnull %28) #7
  %30 = call ptr @curl_slist_append(ptr noundef %.1, ptr noundef nonnull %2) #7
  %31 = load ptr, ptr %0, align 8, !tbaa !5
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  call void @curl_easy_reset(ptr noundef %32) #7
  %33 = getelementptr inbounds i8, ptr %0, i64 48
  %34 = load ptr, ptr %33, align 8, !tbaa !21
  %35 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 10036, ptr noundef %34) #7
  %36 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 45, i32 noundef 1) #7
  %37 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 52, i32 noundef 1) #7
  %38 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 10023, ptr noundef %30) #7
  %39 = getelementptr inbounds i8, ptr %0, i64 8
  %40 = load ptr, ptr %39, align 8, !tbaa !22
  %.not63 = icmp eq ptr %40, null
  br i1 %.not63, label %54, label %41

41:                                               ; preds = %27
  %42 = getelementptr inbounds i8, ptr %0, i64 64
  %43 = load i64, ptr %42, align 8, !tbaa !18
  %.not64 = icmp eq i64 %43, 0
  br i1 %.not64, label %48, label %44

44:                                               ; preds = %41
  %45 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 46, i32 noundef 1) #7
  %46 = load i64, ptr %42, align 8, !tbaa !18
  %47 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 30115, i64 noundef %46) #7
  %.pre = load ptr, ptr %39, align 8, !tbaa !22
  br label %48

48:                                               ; preds = %44, %41
  %49 = phi ptr [ %.pre, %44 ], [ %40, %41 ]
  %50 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 20012, ptr noundef %49) #7
  %51 = getelementptr inbounds i8, ptr %0, i64 24
  %52 = load ptr, ptr %51, align 8, !tbaa !23
  %53 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 10009, ptr noundef %52) #7
  br label %54

54:                                               ; preds = %48, %27
  %55 = getelementptr inbounds i8, ptr %0, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !24
  %.not65 = icmp eq ptr %56, null
  br i1 %.not65, label %62, label %57

57:                                               ; preds = %54
  %58 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 20011, ptr noundef nonnull %56) #7
  %59 = getelementptr inbounds i8, ptr %0, i64 24
  %60 = load ptr, ptr %59, align 8, !tbaa !23
  %61 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 10001, ptr noundef %60) #7
  br label %62

62:                                               ; preds = %57, %54
  %63 = getelementptr inbounds i8, ptr %8, i64 120
  %64 = load i8, ptr %63, align 8, !tbaa !25, !range !29, !noundef !30
  %65 = trunc nuw i8 %64 to i1
  br i1 %65, label %66, label %70

66:                                               ; preds = %62
  %67 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 41, i32 noundef 1) #7
  %68 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 20094, ptr noundef nonnull @s3_request_debug_cb) #7
  %69 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 10095, ptr noundef nonnull %8) #7
  br label %70

70:                                               ; preds = %66, %62
  %71 = getelementptr inbounds i8, ptr %0, i64 400
  %72 = call i32 (ptr, i32, ...) @curl_easy_setopt(ptr noundef %32, i32 noundef 10002, ptr noundef nonnull %71) #7
  %.not66 = icmp eq i32 %72, 0
  br i1 %.not66, label %73, label %76

73:                                               ; preds = %70
  %74 = call i32 @curl_easy_perform(ptr noundef %32) #7
  %.not67 = icmp eq i32 %74, 0
  br i1 %.not67, label %75, label %76

75:                                               ; preds = %73
  call void @curl_slist_free_all(ptr noundef %30) #7
  call void @llvm.lifetime.end.p0(i64 512, ptr nonnull %2) #7
  ret void

76:                                               ; preds = %73, %70
  %.056 = phi i32 [ %72, %70 ], [ %74, %73 ]
  call void @curl_slist_free_all(ptr noundef %30) #7
  %77 = call ptr @curl_easy_strerror(i32 noundef %.056) #7
  %78 = icmp eq i32 %.056, 22
  br i1 %78, label %79, label %87

79:                                               ; preds = %76
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #7
  store i64 0, ptr %3, align 8, !tbaa !31
  %80 = call i32 (ptr, i32, ...) @curl_easy_getinfo(ptr noundef %32, i32 noundef 2097154, ptr noundef nonnull %3) #7
  %81 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %82 = getelementptr inbounds i8, ptr %81, i64 8
  %83 = call i32 @str_size(ptr noundef nonnull %8)
  %84 = call ptr @str_of(ptr noundef nonnull %8)
  %85 = load i64, ptr %3, align 8, !tbaa !31
  %86 = trunc i64 %85 to i32
  call void (ptr, ptr, ptr, ptr, i32, ptr, ...) @error_throw_as(ptr noundef nonnull %82, ptr noundef nonnull %81, ptr noundef nonnull @.str.5, ptr noundef nonnull @__func__.s3_request_execute, i32 noundef 260, ptr noundef nonnull @.str.6, i32 noundef %83, ptr noundef %84, i32 noundef %86, ptr noundef %77) #8
  unreachable

87:                                               ; preds = %76
  %88 = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @mn_runtime)
  %89 = getelementptr inbounds i8, ptr %88, i64 8
  %90 = call i32 @str_size(ptr noundef nonnull %8)
  %91 = call ptr @str_of(ptr noundef nonnull %8)
  call void (ptr, ptr, ptr, ptr, i32, ptr, ...) @error_throw_as(ptr noundef nonnull %89, ptr noundef nonnull %88, ptr noundef nonnull @.str.5, ptr noundef nonnull @__func__.s3_request_execute, i32 noundef 266, ptr noundef nonnull @.str.7, i32 noundef %90, ptr noundef %91, ptr noundef %77) #8
  unreachable
}

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

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

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

declare ptr @curl_slist_append(ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @curl_easy_reset(ptr noundef) local_unnamed_addr #3

declare i32 @curl_easy_setopt(ptr noundef, i32 noundef, ...) local_unnamed_addr #3

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

declare i32 @curl_easy_perform(ptr noundef) local_unnamed_addr #3

declare void @curl_slist_free_all(ptr noundef) local_unnamed_addr #3

declare ptr @curl_easy_strerror(i32 noundef) local_unnamed_addr #3

declare i32 @curl_easy_getinfo(ptr noundef, i32 noundef, ...) local_unnamed_addr #3

; Function Attrs: inlinehint noreturn nounwind uwtable
declare hidden void @error_throw_as(ptr noundef, ptr noundef, ptr noundef, ptr noundef, i32 noundef, ptr noundef, ...) local_unnamed_addr #4

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden i32 @str_size(ptr noundef) local_unnamed_addr #6

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @str_of(ptr noundef) local_unnamed_addr #6

; Function Attrs: mustprogress 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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "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 noreturn 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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 }

!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 0}
!6 = !{!"S3Request", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !10, i64 64, !7, i64 72, !8, i64 80, !8, i64 144, !8, i64 400}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long", !8, i64 0}
!11 = !{!12, !7, i64 8}
!12 = !{!"S3Io", !7, i64 0, !7, i64 8, !13, i64 16}
!13 = !{!"List", !7, i64 0, !7, i64 8}
!14 = !{!15, !7, i64 16}
!15 = !{!"Cloud", !16, i64 0, !7, i64 8, !7, i64 16, !13, i64 24}
!16 = !{!"int", !8, i64 0}
!17 = !{!6, !7, i64 56}
!18 = !{!6, !10, i64 64}
!19 = !{!6, !7, i64 72}
!20 = !{!12, !7, i64 0}
!21 = !{!6, !7, i64 48}
!22 = !{!6, !7, i64 8}
!23 = !{!6, !7, i64 24}
!24 = !{!6, !7, i64 16}
!25 = !{!26, !28, i64 120}
!26 = !{!"CloudConfig", !27, i64 0, !27, i64 24, !27, i64 48, !27, i64 72, !27, i64 96, !28, i64 120}
!27 = !{!"Str", !7, i64 0, !7, i64 8, !28, i64 16}
!28 = !{!"_Bool", !8, i64 0}
!29 = !{i8 0, i8 2}
!30 = !{}
!31 = !{!10, !10, i64 0}


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