; LLVM IR from golems/ach :: src/achd (transport)

; 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.achd_cx = type { %struct.achd_headers, i32, i32, i32, i32, ptr, i32, %struct.ach_channel, ptr }
%struct.achd_headers = type { ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr, ptr, i32, i32, ptr }
%struct.ach_channel = type { %union.anon }
%union.anon = type { [16 x i64] }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }
%struct.achd_conn = type { i32, %struct.timespec, %struct.timespec, %struct.achd_headers, %struct.achd_headers, i32, i32, i32, i64, ptr, ptr, ptr }
%struct.timespec = type { i64, i64 }
%struct.udp_cx = type { %struct.sockaddr_in }

@cx = external global %struct.achd_cx, align 8
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@ach_verbosity = external global i32, align 4
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @achd_udp_sock(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca %struct.sockaddr_in, align 4
  %5 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #8
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct.achd_conn, ptr %6, i32 0, i32 11
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %14

10:                                               ; preds = %1
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.achd_conn, ptr %11, i32 0, i32 11
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  store ptr %13, ptr %3, align 8, !tbaa !5
  br label %18

14:                                               ; preds = %1
  %15 = call noalias ptr @calloc(i64 noundef 1, i64 noundef 16) #9
  store ptr %15, ptr %3, align 8, !tbaa !5
  %16 = load ptr, ptr %2, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.achd_conn, ptr %16, i32 0, i32 11
  store ptr %15, ptr %17, align 8, !tbaa !9
  br label %18

18:                                               ; preds = %14, %10
  %19 = call i32 @socket(i32 noundef 2, i32 noundef 2, i32 noundef 17) #8
  %20 = load ptr, ptr %2, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.achd_conn, ptr %20, i32 0, i32 7
  store i32 %19, ptr %21, align 8, !tbaa !15
  %22 = load ptr, ptr %2, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.achd_conn, ptr %22, i32 0, i32 7
  %24 = load i32, ptr %23, align 8, !tbaa !15
  %25 = icmp slt i32 %24, 0
  br i1 %25, label %26, label %31

26:                                               ; preds = %18
  %27 = load ptr, ptr getelementptr inbounds (%struct.achd_cx, ptr @cx, i32 0, i32 8), align 8, !tbaa !16
  %28 = call ptr @__errno_location() #10
  %29 = load i32, ptr %28, align 4, !tbaa !19
  %30 = call ptr @strerror(i32 noundef %29) #8
  call void (i32, ptr, ...) %27(i32 noundef 4, ptr noundef @.str, ptr noundef %30)
  br label %31

31:                                               ; preds = %26, %18
  call void @llvm.lifetime.start.p0(i64 16, ptr %4) #8
  call void @llvm.memset.p0.i64(ptr align 4 %4, i8 0, i64 16, i1 false)
  %32 = getelementptr inbounds %struct.sockaddr_in, ptr %4, i32 0, i32 0
  store i16 2, ptr %32, align 4, !tbaa !20
  %33 = getelementptr inbounds %struct.sockaddr_in, ptr %4, i32 0, i32 1
  store i16 0, ptr %33, align 2, !tbaa !24
  %34 = call i32 @__bswap_32(i32 noundef 0)
  %35 = getelementptr inbounds %struct.sockaddr_in, ptr %4, i32 0, i32 2
  %36 = getelementptr inbounds %struct.in_addr, ptr %35, i32 0, i32 0
  store i32 %34, ptr %36, align 4, !tbaa !25
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.achd_conn, ptr %37, i32 0, i32 7
  %39 = load i32, ptr %38, align 8, !tbaa !15
  %40 = call i32 @bind(i32 noundef %39, ptr noundef %4, i32 noundef 16) #8
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %31
  %43 = load ptr, ptr getelementptr inbounds (%struct.achd_cx, ptr @cx, i32 0, i32 8), align 8, !tbaa !16
  %44 = call ptr @__errno_location() #10
  %45 = load i32, ptr %44, align 4, !tbaa !19
  %46 = call ptr @strerror(i32 noundef %45) #8
  call void (i32, ptr, ...) %43(i32 noundef 4, ptr noundef @.str.1, ptr noundef %46)
  br label %47

47:                                               ; preds = %42, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #8
  store i32 16, ptr %5, align 4, !tbaa !19
  %48 = load ptr, ptr %2, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.achd_conn, ptr %48, i32 0, i32 7
  %50 = load i32, ptr %49, align 8, !tbaa !15
  %51 = load ptr, ptr %3, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.udp_cx, ptr %51, i32 0, i32 0
  %53 = call i32 @getsockname(i32 noundef %50, ptr noundef %52, ptr noundef %5) #8
  %54 = icmp ne i32 %53, 0
  br i1 %54, label %55, label %60

55:                                               ; preds = %47
  %56 = load ptr, ptr getelementptr inbounds (%struct.achd_cx, ptr @cx, i32 0, i32 8), align 8, !tbaa !16
  %57 = call ptr @__errno_location() #10
  %58 = load i32, ptr %57, align 4, !tbaa !19
  %59 = call ptr @strerror(i32 noundef %58) #8
  call void (i32, ptr, ...) %56(i32 noundef 4, ptr noundef @.str.2, ptr noundef %59)
  br label %78

60:                                               ; preds = %47
  %61 = load i32, ptr @ach_verbosity, align 4, !tbaa !19
  %62 = add nsw i32 5, %61
  %63 = icmp sle i32 7, %62
  br i1 %63, label %64, label %77

64:                                               ; preds = %60
  %65 = load ptr, ptr %3, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.udp_cx, ptr %65, i32 0, i32 0
  %67 = getelementptr inbounds %struct.sockaddr_in, ptr %66, i32 0, i32 2
  %68 = getelementptr inbounds %struct.in_addr, ptr %67, i32 0, i32 0
  %69 = load i32, ptr %68, align 4
  %70 = call ptr @inet_ntoa(i32 %69) #8
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.udp_cx, ptr %71, i32 0, i32 0
  %73 = getelementptr inbounds %struct.sockaddr_in, ptr %72, i32 0, i32 1
  %74 = load i16, ptr %73, align 2, !tbaa !26
  %75 = call zeroext i16 @__bswap_16(i16 noundef zeroext %74)
  %76 = zext i16 %75 to i32
  call void (i32, ptr, ...) @ach_log(i32 noundef 7, ptr noundef @.str.3, ptr noundef %70, i32 noundef %76)
  br label %77

77:                                               ; preds = %64, %60
  br label %78

78:                                               ; preds = %77, %55
  %79 = load ptr, ptr %2, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.achd_conn, ptr %79, i32 0, i32 6
  %81 = load i32, ptr %80, align 4, !tbaa !28
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.udp_cx, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds %struct.sockaddr_in, ptr %83, i32 0, i32 1
  %85 = load i16, ptr %84, align 2, !tbaa !26
  %86 = call zeroext i16 @__bswap_16(i16 noundef zeroext %85)
  %87 = zext i16 %86 to i32
  %88 = call i32 (i32, ptr, ...) @achd_printf(i32 noundef %81, ptr noundef @.str.4, i32 noundef %87)
  %89 = icmp ne i32 0, %88
  br i1 %89, label %90, label %95

90:                                               ; preds = %78
  %91 = load ptr, ptr getelementptr inbounds (%struct.achd_cx, ptr @cx, i32 0, i32 8), align 8, !tbaa !16
  %92 = call ptr @__errno_location() #10
  %93 = load i32, ptr %92, align 4, !tbaa !19
  %94 = call ptr @strerror(i32 noundef %93) #8
  call void (i32, ptr, ...) %91(i32 noundef 4, ptr noundef @.str.5, ptr noundef %94)
  br label %95

95:                                               ; preds = %90, %78
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr %4) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #8
  ret i32 0
}

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

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #2

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) #3

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) #3

; Function Attrs: nounwind willreturn memory(none)
declare ptr @__errno_location() #4

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

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

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

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

declare void @ach_log(i32 noundef, ptr noundef, ...) #7

; Function Attrs: nounwind
declare ptr @inet_ntoa(i32) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) #6

declare i32 @achd_printf(i32 noundef, ptr noundef, ...) #7

; 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 allocsize(0,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 #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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { "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 #8 = { nounwind }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { 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, !6, i64 256}
!10 = !{!"achd_conn", !11, i64 0, !12, i64 8, !12, i64 24, !14, i64 40, !14, i64 128, !11, i64 216, !11, i64 220, !11, i64 224, !13, i64 232, !6, i64 240, !6, i64 248, !6, i64 256}
!11 = !{!"int", !7, i64 0}
!12 = !{!"timespec", !13, i64 0, !13, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!"achd_headers", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !11, i64 40, !11, i64 44, !13, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !11, i64 76, !6, i64 80}
!15 = !{!10, !11, i64 224}
!16 = !{!17, !6, i64 248}
!17 = !{!"achd_cx", !14, i64 0, !11, i64 88, !11, i64 92, !11, i64 96, !11, i64 100, !6, i64 104, !11, i64 112, !18, i64 120, !6, i64 248}
!18 = !{!"ach_channel", !7, i64 0}
!19 = !{!11, !11, i64 0}
!20 = !{!21, !22, i64 0}
!21 = !{!"sockaddr_in", !22, i64 0, !22, i64 2, !23, i64 4, !7, i64 8}
!22 = !{!"short", !7, i64 0}
!23 = !{!"in_addr", !11, i64 0}
!24 = !{!21, !22, i64 2}
!25 = !{!21, !11, i64 4}
!26 = !{!27, !22, i64 2}
!27 = !{!"udp_cx", !21, i64 0}
!28 = !{!10, !11, i64 220}


; 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.achd_cx = type { %struct.achd_headers, i32, i32, i32, i32, ptr, i32, %struct.ach_channel, ptr }
%struct.achd_headers = type { ptr, ptr, i32, i32, i32, i32, i32, i32, i32, i32, i64, ptr, ptr, i32, i32, ptr }
%struct.ach_channel = type { %union.anon }
%union.anon = type { [16 x i64] }
%struct.sockaddr_in = type { i16, i16, %struct.in_addr, [8 x i8] }
%struct.in_addr = type { i32 }

@cx = external local_unnamed_addr global %struct.achd_cx, align 8
@.str = external hidden unnamed_addr constant [32 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [45 x i8], align 1
@ach_verbosity = external local_unnamed_addr global i32, align 4
@.str.3 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [32 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @achd_udp_sock(ptr nocapture noundef %0) local_unnamed_addr #0 {
  %2 = alloca %struct.sockaddr_in, align 4
  %3 = alloca i32, align 4
  %4 = getelementptr inbounds i8, ptr %0, i64 256
  %5 = load ptr, ptr %4, align 8, !tbaa !5
  %.not = icmp eq ptr %5, null
  br i1 %.not, label %6, label %8

6:                                                ; preds = %1
  %7 = tail call noalias dereferenceable_or_null(16) ptr @calloc(i64 noundef 1, i64 noundef 16) #7
  store ptr %7, ptr %4, align 8, !tbaa !5
  br label %8

8:                                                ; preds = %1, %6
  %.0 = phi ptr [ %7, %6 ], [ %5, %1 ]
  %9 = tail call i32 @socket(i32 noundef 2, i32 noundef 2, i32 noundef 17) #8
  %10 = getelementptr inbounds i8, ptr %0, i64 224
  store i32 %9, ptr %10, align 8, !tbaa !14
  %11 = icmp slt i32 %9, 0
  br i1 %11, label %12, label %17

12:                                               ; preds = %8
  %13 = load ptr, ptr getelementptr inbounds (i8, ptr @cx, i64 248), align 8, !tbaa !15
  %14 = tail call ptr @__errno_location() #9
  %15 = load i32, ptr %14, align 4, !tbaa !18
  %16 = tail call ptr @strerror(i32 noundef %15) #8
  tail call void (i32, ptr, ...) %13(i32 noundef 4, ptr noundef nonnull @.str, ptr noundef %16) #8
  br label %17

17:                                               ; preds = %12, %8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #8
  %18 = getelementptr inbounds i8, ptr %2, i64 8
  store i64 0, ptr %18, align 4
  store i16 2, ptr %2, align 4, !tbaa !19
  %19 = getelementptr inbounds i8, ptr %2, i64 2
  store i16 0, ptr %19, align 2, !tbaa !23
  %20 = tail call i32 @__bswap_32(i32 noundef 0)
  %21 = getelementptr inbounds i8, ptr %2, i64 4
  store i32 %20, ptr %21, align 4, !tbaa !24
  %22 = load i32, ptr %10, align 8, !tbaa !14
  %23 = call i32 @bind(i32 noundef %22, ptr noundef nonnull %2, i32 noundef 16) #8
  %.not13 = icmp eq i32 %23, 0
  br i1 %.not13, label %29, label %24

24:                                               ; preds = %17
  %25 = load ptr, ptr getelementptr inbounds (i8, ptr @cx, i64 248), align 8, !tbaa !15
  %26 = tail call ptr @__errno_location() #9
  %27 = load i32, ptr %26, align 4, !tbaa !18
  %28 = call ptr @strerror(i32 noundef %27) #8
  call void (i32, ptr, ...) %25(i32 noundef 4, ptr noundef nonnull @.str.1, ptr noundef %28) #8
  br label %29

29:                                               ; preds = %24, %17
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %3) #8
  store i32 16, ptr %3, align 4, !tbaa !18
  %30 = load i32, ptr %10, align 8, !tbaa !14
  %31 = call i32 @getsockname(i32 noundef %30, ptr noundef %.0, ptr noundef nonnull %3) #8
  %.not14 = icmp eq i32 %31, 0
  br i1 %.not14, label %37, label %32

32:                                               ; preds = %29
  %33 = load ptr, ptr getelementptr inbounds (i8, ptr @cx, i64 248), align 8, !tbaa !15
  %34 = tail call ptr @__errno_location() #9
  %35 = load i32, ptr %34, align 4, !tbaa !18
  %36 = call ptr @strerror(i32 noundef %35) #8
  call void (i32, ptr, ...) %33(i32 noundef 4, ptr noundef nonnull @.str.2, ptr noundef %36) #8
  br label %48

37:                                               ; preds = %29
  %38 = load i32, ptr @ach_verbosity, align 4, !tbaa !18
  %39 = icmp sgt i32 %38, 1
  br i1 %39, label %40, label %48

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %.0, i64 4
  %42 = load i32, ptr %41, align 4
  %43 = call ptr @inet_ntoa(i32 %42) #8
  %44 = getelementptr inbounds i8, ptr %.0, i64 2
  %45 = load i16, ptr %44, align 2, !tbaa !25
  %46 = call zeroext i16 @__bswap_16(i16 noundef zeroext %45)
  %47 = zext i16 %46 to i32
  call void (i32, ptr, ...) @ach_log(i32 noundef 7, ptr noundef nonnull @.str.3, ptr noundef %43, i32 noundef %47) #8
  br label %48

48:                                               ; preds = %37, %40, %32
  %49 = getelementptr inbounds i8, ptr %0, i64 220
  %50 = load i32, ptr %49, align 4, !tbaa !27
  %51 = getelementptr inbounds i8, ptr %.0, i64 2
  %52 = load i16, ptr %51, align 2, !tbaa !25
  %53 = call zeroext i16 @__bswap_16(i16 noundef zeroext %52)
  %54 = zext i16 %53 to i32
  %55 = call i32 (i32, ptr, ...) @achd_printf(i32 noundef %50, ptr noundef nonnull @.str.4, i32 noundef %54) #8
  %.not15 = icmp eq i32 %55, 0
  br i1 %.not15, label %61, label %56

56:                                               ; preds = %48
  %57 = load ptr, ptr getelementptr inbounds (i8, ptr @cx, i64 248), align 8, !tbaa !15
  %58 = tail call ptr @__errno_location() #9
  %59 = load i32, ptr %58, align 4, !tbaa !18
  %60 = call ptr @strerror(i32 noundef %59) #8
  call void (i32, ptr, ...) %57(i32 noundef 4, ptr noundef nonnull @.str.5, ptr noundef %60) #8
  br label %61

61:                                               ; preds = %56, %48
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %3) #8
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #8
  ret i32 0
}

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

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: nounwind
declare i32 @socket(i32 noundef, i32 noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare ptr @strerror(i32 noundef) local_unnamed_addr #3

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

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

; Function Attrs: nounwind
declare i32 @bind(i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare i32 @getsockname(i32 noundef, ptr noundef, ptr noundef) local_unnamed_addr #3

declare void @ach_log(i32 noundef, ptr noundef, ...) local_unnamed_addr #6

; Function Attrs: nounwind
declare ptr @inet_ntoa(i32) local_unnamed_addr #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden zeroext i16 @__bswap_16(i16 noundef zeroext) local_unnamed_addr #5

declare i32 @achd_printf(i32 noundef, 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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 = { 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 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 = { "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 allocsize(0,1) }
attributes #8 = { 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, !13, i64 256}
!6 = !{!"achd_conn", !7, i64 0, !10, i64 8, !10, i64 24, !12, i64 40, !12, i64 128, !7, i64 216, !7, i64 220, !7, i64 224, !11, i64 232, !13, i64 240, !13, i64 248, !13, i64 256}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"timespec", !11, i64 0, !11, i64 8}
!11 = !{!"long", !8, i64 0}
!12 = !{!"achd_headers", !13, i64 0, !13, i64 8, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !7, i64 40, !7, i64 44, !11, i64 48, !13, i64 56, !13, i64 64, !7, i64 72, !7, i64 76, !13, i64 80}
!13 = !{!"any pointer", !8, i64 0}
!14 = !{!6, !7, i64 224}
!15 = !{!16, !13, i64 248}
!16 = !{!"achd_cx", !12, i64 0, !7, i64 88, !7, i64 92, !7, i64 96, !7, i64 100, !13, i64 104, !7, i64 112, !17, i64 120, !13, i64 248}
!17 = !{!"ach_channel", !8, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!20, !21, i64 0}
!20 = !{!"sockaddr_in", !21, i64 0, !21, i64 2, !22, i64 4, !8, i64 8}
!21 = !{!"short", !8, i64 0}
!22 = !{!"in_addr", !7, i64 0}
!23 = !{!20, !21, i64 2}
!24 = !{!20, !7, i64 4}
!25 = !{!26, !21, i64 2}
!26 = !{!"udp_cx", !20, i64 0}
!27 = !{!6, !7, i64 220}


; Effective O3 passes: DSEPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass