; LLVM IR from erwincoumans/tiny-differentiable-simulator :: third_party/zeromq/src/pipe.ll (ZN3zmq8pipepairEPPNS_8object_tEPPNS_6pipe_tEPiPb)

; 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.std::nothrow_t" = type { i8 }

@_ZSt7nothrow = external global %"struct.std::nothrow_t", align 1
@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3zmq8pipepairEPPNS_8object_tEPPNS_6pipe_tEPiPb(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %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 i1, align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca i1, align 1
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i1, align 1
  %19 = alloca ptr, align 8
  %20 = alloca i1, align 1
  %21 = alloca ptr, align 8
  %22 = alloca i1, align 1
  %23 = alloca ptr, align 8
  %24 = alloca i1, align 1
  store ptr %0, ptr %5, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #8
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds i8, ptr %25, i64 0
  %27 = load i8, ptr %26, align 1, !tbaa !9, !range !11, !noundef !12
  %28 = trunc i8 %27 to i1
  br i1 %28, label %29, label %44

29:                                               ; preds = %4
  %30 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 216, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %31 = icmp eq ptr %30, null
  store i1 false, ptr %11, align 1
  br i1 %31, label %34, label %32

32:                                               ; preds = %29
  store ptr %30, ptr %10, align 8
  store i1 true, ptr %11, align 1
  invoke void @_ZN3zmq16ypipe_conflate_tINS_5msg_tEEC2Ev(ptr noundef nonnull align 8 dereferenceable(209) %30)
          to label %33 unwind label %36

33:                                               ; preds = %32
  br label %34

34:                                               ; preds = %33, %29
  %35 = phi ptr [ %30, %33 ], [ null, %29 ]
  store ptr %35, ptr %9, align 8, !tbaa !5
  br label %59

36:                                               ; preds = %32
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %12, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %13, align 4
  %40 = load i1, ptr %11, align 1
  br i1 %40, label %41, label %43

41:                                               ; preds = %36
  %42 = load ptr, ptr %10, align 8
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef %42, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #10
  br label %43

43:                                               ; preds = %41, %36
  br label %234

44:                                               ; preds = %4
  %45 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 96, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %46 = icmp eq ptr %45, null
  store i1 false, ptr %15, align 1
  br i1 %46, label %49, label %47

47:                                               ; preds = %44
  store ptr %45, ptr %14, align 8
  store i1 true, ptr %15, align 1
  invoke void @_ZN3zmq7ypipe_tINS_5msg_tELi256EEC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %45)
          to label %48 unwind label %51

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48, %44
  %50 = phi ptr [ %45, %48 ], [ null, %44 ]
  store ptr %50, ptr %9, align 8, !tbaa !5
  br label %59

51:                                               ; preds = %47
  %52 = landingpad { ptr, i32 }
          cleanup
  %53 = extractvalue { ptr, i32 } %52, 0
  store ptr %53, ptr %12, align 8
  %54 = extractvalue { ptr, i32 } %52, 1
  store i32 %54, ptr %13, align 4
  %55 = load i1, ptr %15, align 1
  br i1 %55, label %56, label %58

56:                                               ; preds = %51
  %57 = load ptr, ptr %14, align 8
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef %57, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #10
  br label %58

58:                                               ; preds = %56, %51
  br label %234

59:                                               ; preds = %49, %34
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %9, align 8, !tbaa !5
  %62 = icmp ne ptr %61, null
  %63 = xor i1 %62, true
  %64 = zext i1 %63 to i64
  %65 = call i64 @llvm.expect.i64(i64 %64, i64 0)
  %66 = icmp ne i64 %65, 0
  br i1 %66, label %67, label %72

67:                                               ; preds = %60
  %68 = load ptr, ptr @stderr, align 8, !tbaa !5
  %69 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %68, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 57) #8
  %70 = load ptr, ptr @stderr, align 8, !tbaa !5
  %71 = call i32 @fflush(ptr noundef %70)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.2)
  br label %72

72:                                               ; preds = %67, %60
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = getelementptr inbounds i8, ptr %75, i64 1
  %77 = load i8, ptr %76, align 1, !tbaa !9, !range !11, !noundef !12
  %78 = trunc i8 %77 to i1
  br i1 %78, label %79, label %94

79:                                               ; preds = %74
  %80 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 216, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %81 = icmp eq ptr %80, null
  store i1 false, ptr %18, align 1
  br i1 %81, label %84, label %82

82:                                               ; preds = %79
  store ptr %80, ptr %17, align 8
  store i1 true, ptr %18, align 1
  invoke void @_ZN3zmq16ypipe_conflate_tINS_5msg_tEEC2Ev(ptr noundef nonnull align 8 dereferenceable(209) %80)
          to label %83 unwind label %86

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83, %79
  %85 = phi ptr [ %80, %83 ], [ null, %79 ]
  store ptr %85, ptr %16, align 8, !tbaa !5
  br label %109

86:                                               ; preds = %82
  %87 = landingpad { ptr, i32 }
          cleanup
  %88 = extractvalue { ptr, i32 } %87, 0
  store ptr %88, ptr %12, align 8
  %89 = extractvalue { ptr, i32 } %87, 1
  store i32 %89, ptr %13, align 4
  %90 = load i1, ptr %18, align 1
  br i1 %90, label %91, label %93

91:                                               ; preds = %86
  %92 = load ptr, ptr %17, align 8
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef %92, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #10
  br label %93

93:                                               ; preds = %91, %86
  br label %233

94:                                               ; preds = %74
  %95 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 96, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %96 = icmp eq ptr %95, null
  store i1 false, ptr %20, align 1
  br i1 %96, label %99, label %97

97:                                               ; preds = %94
  store ptr %95, ptr %19, align 8
  store i1 true, ptr %20, align 1
  invoke void @_ZN3zmq7ypipe_tINS_5msg_tELi256EEC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %95)
          to label %98 unwind label %101

98:                                               ; preds = %97
  br label %99

99:                                               ; preds = %98, %94
  %100 = phi ptr [ %95, %98 ], [ null, %94 ]
  store ptr %100, ptr %16, align 8, !tbaa !5
  br label %109

101:                                              ; preds = %97
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %12, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %13, align 4
  %105 = load i1, ptr %20, align 1
  br i1 %105, label %106, label %108

106:                                              ; preds = %101
  %107 = load ptr, ptr %19, align 8
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef %107, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #10
  br label %108

108:                                              ; preds = %106, %101
  br label %233

109:                                              ; preds = %99, %84
  br label %110

110:                                              ; preds = %109
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  %112 = icmp ne ptr %111, null
  %113 = xor i1 %112, true
  %114 = zext i1 %113 to i64
  %115 = call i64 @llvm.expect.i64(i64 %114, i64 0)
  %116 = icmp ne i64 %115, 0
  br i1 %116, label %117, label %122

117:                                              ; preds = %110
  %118 = load ptr, ptr @stderr, align 8, !tbaa !5
  %119 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %118, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 64) #8
  %120 = load ptr, ptr @stderr, align 8, !tbaa !5
  %121 = call i32 @fflush(ptr noundef %120)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.2)
  br label %122

122:                                              ; preds = %117, %110
  br label %123

123:                                              ; preds = %122
  br label %124

124:                                              ; preds = %123
  %125 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 264, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %126 = icmp eq ptr %125, null
  store i1 false, ptr %22, align 1
  br i1 %126, label %144, label %127

127:                                              ; preds = %124
  store ptr %125, ptr %21, align 8
  store i1 true, ptr %22, align 1
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds ptr, ptr %128, i64 0
  %130 = load ptr, ptr %129, align 8, !tbaa !5
  %131 = load ptr, ptr %9, align 8, !tbaa !5
  %132 = load ptr, ptr %16, align 8, !tbaa !5
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds i32, ptr %133, i64 1
  %135 = load i32, ptr %134, align 4, !tbaa !13
  %136 = load ptr, ptr %7, align 8, !tbaa !5
  %137 = getelementptr inbounds i32, ptr %136, i64 0
  %138 = load i32, ptr %137, align 4, !tbaa !13
  %139 = load ptr, ptr %8, align 8, !tbaa !5
  %140 = getelementptr inbounds i8, ptr %139, i64 0
  %141 = load i8, ptr %140, align 1, !tbaa !9, !range !11, !noundef !12
  %142 = trunc i8 %141 to i1
  invoke void @_ZN3zmq6pipe_tC1EPNS_8object_tEPNS_12ypipe_base_tINS_5msg_tEEES6_iib(ptr noundef nonnull align 8 dereferenceable(264) %125, ptr noundef %130, ptr noundef %131, ptr noundef %132, i32 noundef %135, i32 noundef %138, i1 noundef zeroext %142)
          to label %143 unwind label %162

143:                                              ; preds = %127
  br label %144

144:                                              ; preds = %143, %124
  %145 = phi ptr [ %125, %143 ], [ null, %124 ]
  %146 = load ptr, ptr %6, align 8, !tbaa !5
  %147 = getelementptr inbounds ptr, ptr %146, i64 0
  store ptr %145, ptr %147, align 8, !tbaa !5
  br label %148

148:                                              ; preds = %144
  %149 = load ptr, ptr %6, align 8, !tbaa !5
  %150 = getelementptr inbounds ptr, ptr %149, i64 0
  %151 = load ptr, ptr %150, align 8, !tbaa !5
  %152 = icmp ne ptr %151, null
  %153 = xor i1 %152, true
  %154 = zext i1 %153 to i64
  %155 = call i64 @llvm.expect.i64(i64 %154, i64 0)
  %156 = icmp ne i64 %155, 0
  br i1 %156, label %157, label %170

157:                                              ; preds = %148
  %158 = load ptr, ptr @stderr, align 8, !tbaa !5
  %159 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %158, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 68) #8
  %160 = load ptr, ptr @stderr, align 8, !tbaa !5
  %161 = call i32 @fflush(ptr noundef %160)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.2)
  br label %170

162:                                              ; preds = %127
  %163 = landingpad { ptr, i32 }
          cleanup
  %164 = extractvalue { ptr, i32 } %163, 0
  store ptr %164, ptr %12, align 8
  %165 = extractvalue { ptr, i32 } %163, 1
  store i32 %165, ptr %13, align 4
  %166 = load i1, ptr %22, align 1
  br i1 %166, label %167, label %169

167:                                              ; preds = %162
  %168 = load ptr, ptr %21, align 8
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef %168, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #10
  br label %169

169:                                              ; preds = %167, %162
  br label %233

170:                                              ; preds = %157, %148
  br label %171

171:                                              ; preds = %170
  br label %172

172:                                              ; preds = %171
  %173 = call noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef 264, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #9
  %174 = icmp eq ptr %173, null
  store i1 false, ptr %24, align 1
  br i1 %174, label %192, label %175

175:                                              ; preds = %172
  store ptr %173, ptr %23, align 8
  store i1 true, ptr %24, align 1
  %176 = load ptr, ptr %5, align 8, !tbaa !5
  %177 = getelementptr inbounds ptr, ptr %176, i64 1
  %178 = load ptr, ptr %177, align 8, !tbaa !5
  %179 = load ptr, ptr %16, align 8, !tbaa !5
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = load ptr, ptr %7, align 8, !tbaa !5
  %182 = getelementptr inbounds i32, ptr %181, i64 0
  %183 = load i32, ptr %182, align 4, !tbaa !13
  %184 = load ptr, ptr %7, align 8, !tbaa !5
  %185 = getelementptr inbounds i32, ptr %184, i64 1
  %186 = load i32, ptr %185, align 4, !tbaa !13
  %187 = load ptr, ptr %8, align 8, !tbaa !5
  %188 = getelementptr inbounds i8, ptr %187, i64 1
  %189 = load i8, ptr %188, align 1, !tbaa !9, !range !11, !noundef !12
  %190 = trunc i8 %189 to i1
  invoke void @_ZN3zmq6pipe_tC1EPNS_8object_tEPNS_12ypipe_base_tINS_5msg_tEEES6_iib(ptr noundef nonnull align 8 dereferenceable(264) %173, ptr noundef %178, ptr noundef %179, ptr noundef %180, i32 noundef %183, i32 noundef %186, i1 noundef zeroext %190)
          to label %191 unwind label %210

191:                                              ; preds = %175
  br label %192

192:                                              ; preds = %191, %172
  %193 = phi ptr [ %173, %191 ], [ null, %172 ]
  %194 = load ptr, ptr %6, align 8, !tbaa !5
  %195 = getelementptr inbounds ptr, ptr %194, i64 1
  store ptr %193, ptr %195, align 8, !tbaa !5
  br label %196

196:                                              ; preds = %192
  %197 = load ptr, ptr %6, align 8, !tbaa !5
  %198 = getelementptr inbounds ptr, ptr %197, i64 1
  %199 = load ptr, ptr %198, align 8, !tbaa !5
  %200 = icmp ne ptr %199, null
  %201 = xor i1 %200, true
  %202 = zext i1 %201 to i64
  %203 = call i64 @llvm.expect.i64(i64 %202, i64 0)
  %204 = icmp ne i64 %203, 0
  br i1 %204, label %205, label %218

205:                                              ; preds = %196
  %206 = load ptr, ptr @stderr, align 8, !tbaa !5
  %207 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %206, ptr noundef @.str, ptr noundef @.str.1, i32 noundef 71) #8
  %208 = load ptr, ptr @stderr, align 8, !tbaa !5
  %209 = call i32 @fflush(ptr noundef %208)
  call void @_ZN3zmq9zmq_abortEPKc(ptr noundef @.str.2)
  br label %218

210:                                              ; preds = %175
  %211 = landingpad { ptr, i32 }
          cleanup
  %212 = extractvalue { ptr, i32 } %211, 0
  store ptr %212, ptr %12, align 8
  %213 = extractvalue { ptr, i32 } %211, 1
  store i32 %213, ptr %13, align 4
  %214 = load i1, ptr %24, align 1
  br i1 %214, label %215, label %217

215:                                              ; preds = %210
  %216 = load ptr, ptr %23, align 8
  call void @_ZdlPvRKSt9nothrow_t(ptr noundef %216, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #10
  br label %217

217:                                              ; preds = %215, %210
  br label %233

218:                                              ; preds = %205, %196
  br label %219

219:                                              ; preds = %218
  br label %220

220:                                              ; preds = %219
  %221 = load ptr, ptr %6, align 8, !tbaa !5
  %222 = getelementptr inbounds ptr, ptr %221, i64 0
  %223 = load ptr, ptr %222, align 8, !tbaa !5
  %224 = load ptr, ptr %6, align 8, !tbaa !5
  %225 = getelementptr inbounds ptr, ptr %224, i64 1
  %226 = load ptr, ptr %225, align 8, !tbaa !5
  call void @_ZN3zmq6pipe_t8set_peerEPS0_(ptr noundef nonnull align 8 dereferenceable(264) %223, ptr noundef %226)
  %227 = load ptr, ptr %6, align 8, !tbaa !5
  %228 = getelementptr inbounds ptr, ptr %227, i64 1
  %229 = load ptr, ptr %228, align 8, !tbaa !5
  %230 = load ptr, ptr %6, align 8, !tbaa !5
  %231 = getelementptr inbounds ptr, ptr %230, i64 0
  %232 = load ptr, ptr %231, align 8, !tbaa !5
  call void @_ZN3zmq6pipe_t8set_peerEPS0_(ptr noundef nonnull align 8 dereferenceable(264) %229, ptr noundef %232)
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  ret i32 0

233:                                              ; preds = %217, %169, %108, %93
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  br label %234

234:                                              ; preds = %233, %58, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #8
  br label %235

235:                                              ; preds = %234
  %236 = load ptr, ptr %12, align 8
  %237 = load i32, ptr %13, align 4
  %238 = insertvalue { ptr, i32 } poison, ptr %236, 0
  %239 = insertvalue { ptr, i32 } %238, i32 %237, 1
  resume { ptr, i32 } %239
}

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

; Function Attrs: nobuiltin nounwind allocsize(0)
declare noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3zmq16ypipe_conflate_tINS_5msg_tEEC2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #3 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvRKSt9nothrow_t(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3zmq7ypipe_tINS_5msg_tELi256EEC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #3 align 2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(none)
declare i64 @llvm.expect.i64(i64, i64) #5

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

declare i32 @fflush(ptr noundef) #7

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) #7

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3zmq6pipe_t8set_peerEPS0_(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) #0 align 2

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

declare void @_ZN3zmq6pipe_tC1EPNS_8object_tEPNS_12ypipe_base_tINS_5msg_tEEES6_iib(ptr, ptr, ptr, ptr, i32, i32, i1)

attributes #0 = { mustprogress 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 = { nobuiltin nounwind allocsize(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 = { inlinehint mustprogress 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 #4 = { nobuiltin nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind willreturn memory(none) }
attributes #6 = { 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 #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 = { builtin nounwind allocsize(0) }
attributes #10 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"bool", !7, i64 0}
!11 = !{i8 0, i8 2}
!12 = !{}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, 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.std::nothrow_t" = type { i8 }

@_ZSt7nothrow = external global %"struct.std::nothrow_t", align 1
@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [36 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [108 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [27 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_ZN3zmq8pipepairEPPNS_8object_tEPPNS_6pipe_tEPiPb(ptr nocapture noundef readonly %0, ptr nocapture noundef %1, ptr nocapture noundef readonly %2, ptr nocapture noundef readonly %3) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %5 = load i8, ptr %3, align 1, !tbaa !5, !range !9, !noundef !10
  %6 = trunc nuw i8 %5 to i1
  br i1 %6, label %7, label %13

7:                                                ; preds = %4
  %8 = tail call noalias noundef dereferenceable_or_null(216) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 216, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #6
  %9 = icmp eq ptr %8, null
  br i1 %9, label %19, label %10

10:                                               ; preds = %7
  invoke void @_ZN3zmq16ypipe_conflate_tINS_5msg_tEEC2Ev(ptr noundef nonnull align 8 dereferenceable(209) %8)
          to label %24 unwind label %11

11:                                               ; preds = %10
  %12 = landingpad { ptr, i32 }
          cleanup
  br label %90

13:                                               ; preds = %4
  %14 = tail call noalias noundef dereferenceable_or_null(96) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 96, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #6
  %15 = icmp eq ptr %14, null
  br i1 %15, label %19, label %16

16:                                               ; preds = %13
  invoke void @_ZN3zmq7ypipe_tINS_5msg_tELi256EEC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %14)
          to label %24 unwind label %17

17:                                               ; preds = %16
  %18 = landingpad { ptr, i32 }
          cleanup
  br label %90

19:                                               ; preds = %7, %13
  %20 = load ptr, ptr @stderr, align 8, !tbaa !11
  %21 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %20, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 57) #7
  %22 = load ptr, ptr @stderr, align 8, !tbaa !11
  %23 = tail call i32 @fflush(ptr noundef %22)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.2)
  br label %24

24:                                               ; preds = %10, %16, %19
  %.054 = phi ptr [ null, %19 ], [ %8, %10 ], [ %14, %16 ]
  %25 = getelementptr inbounds i8, ptr %3, i64 1
  %26 = load i8, ptr %25, align 1, !tbaa !5, !range !9, !noundef !10
  %27 = trunc nuw i8 %26 to i1
  br i1 %27, label %28, label %34

28:                                               ; preds = %24
  %29 = tail call noalias noundef dereferenceable_or_null(216) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 216, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #6
  %30 = icmp eq ptr %29, null
  br i1 %30, label %40, label %31

31:                                               ; preds = %28
  invoke void @_ZN3zmq16ypipe_conflate_tINS_5msg_tEEC2Ev(ptr noundef nonnull align 8 dereferenceable(209) %29)
          to label %45 unwind label %32

32:                                               ; preds = %31
  %33 = landingpad { ptr, i32 }
          cleanup
  br label %90

34:                                               ; preds = %24
  %35 = tail call noalias noundef dereferenceable_or_null(96) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 96, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #6
  %36 = icmp eq ptr %35, null
  br i1 %36, label %40, label %37

37:                                               ; preds = %34
  invoke void @_ZN3zmq7ypipe_tINS_5msg_tELi256EEC2Ev(ptr noundef nonnull align 8 dereferenceable(96) %35)
          to label %45 unwind label %38

38:                                               ; preds = %37
  %39 = landingpad { ptr, i32 }
          cleanup
  br label %90

40:                                               ; preds = %28, %34
  %41 = load ptr, ptr @stderr, align 8, !tbaa !11
  %42 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %41, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 64) #7
  %43 = load ptr, ptr @stderr, align 8, !tbaa !11
  %44 = tail call i32 @fflush(ptr noundef %43)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.2)
  br label %45

45:                                               ; preds = %31, %37, %40
  %.04060 = phi ptr [ null, %40 ], [ %29, %31 ], [ %35, %37 ]
  %46 = tail call noalias noundef dereferenceable_or_null(264) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 264, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #6
  %47 = icmp eq ptr %46, null
  br i1 %47, label %56, label %48

48:                                               ; preds = %45
  %49 = load ptr, ptr %0, align 8, !tbaa !11
  %50 = getelementptr inbounds i8, ptr %2, i64 4
  %51 = load i32, ptr %50, align 4, !tbaa !13
  %52 = load i32, ptr %2, align 4, !tbaa !13
  %53 = load i8, ptr %3, align 1, !tbaa !5, !range !9, !noundef !10
  %54 = trunc nuw i8 %53 to i1
  invoke void @_ZN3zmq6pipe_tC1EPNS_8object_tEPNS_12ypipe_base_tINS_5msg_tEEES6_iib(ptr noundef nonnull align 8 dereferenceable(264) %46, ptr noundef %49, ptr noundef %.054, ptr noundef %.04060, i32 noundef %51, i32 noundef %52, i1 noundef zeroext %54)
          to label %55 unwind label %61

55:                                               ; preds = %48
  store ptr %46, ptr %1, align 8, !tbaa !11
  br label %63

56:                                               ; preds = %45
  store ptr null, ptr %1, align 8, !tbaa !11
  %57 = load ptr, ptr @stderr, align 8, !tbaa !11
  %58 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %57, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 68) #7
  %59 = load ptr, ptr @stderr, align 8, !tbaa !11
  %60 = tail call i32 @fflush(ptr noundef %59)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.2)
  br label %63

61:                                               ; preds = %48
  %62 = landingpad { ptr, i32 }
          cleanup
  br label %90

63:                                               ; preds = %55, %56
  %64 = tail call noalias noundef dereferenceable_or_null(264) ptr @_ZnwmRKSt9nothrow_t(i64 noundef 264, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #6
  %65 = icmp eq ptr %64, null
  br i1 %65, label %76, label %66

66:                                               ; preds = %63
  %67 = getelementptr inbounds i8, ptr %0, i64 8
  %68 = load ptr, ptr %67, align 8, !tbaa !11
  %69 = load i32, ptr %2, align 4, !tbaa !13
  %70 = getelementptr inbounds i8, ptr %2, i64 4
  %71 = load i32, ptr %70, align 4, !tbaa !13
  %72 = load i8, ptr %25, align 1, !tbaa !5, !range !9, !noundef !10
  %73 = trunc nuw i8 %72 to i1
  invoke void @_ZN3zmq6pipe_tC1EPNS_8object_tEPNS_12ypipe_base_tINS_5msg_tEEES6_iib(ptr noundef nonnull align 8 dereferenceable(264) %64, ptr noundef %68, ptr noundef %.04060, ptr noundef %.054, i32 noundef %69, i32 noundef %71, i1 noundef zeroext %73)
          to label %74 unwind label %82

74:                                               ; preds = %66
  %75 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr %64, ptr %75, align 8, !tbaa !11
  br label %84

76:                                               ; preds = %63
  %77 = getelementptr inbounds i8, ptr %1, i64 8
  store ptr null, ptr %77, align 8, !tbaa !11
  %78 = load ptr, ptr @stderr, align 8, !tbaa !11
  %79 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %78, ptr noundef nonnull @.str, ptr noundef nonnull @.str.1, i32 noundef 71) #7
  %80 = load ptr, ptr @stderr, align 8, !tbaa !11
  %81 = tail call i32 @fflush(ptr noundef %80)
  tail call void @_ZN3zmq9zmq_abortEPKc(ptr noundef nonnull @.str.2)
  %.pre = load ptr, ptr %77, align 8, !tbaa !11
  br label %84

82:                                               ; preds = %66
  %83 = landingpad { ptr, i32 }
          cleanup
  br label %90

84:                                               ; preds = %74, %76
  %85 = phi ptr [ %.pre, %76 ], [ %64, %74 ]
  %86 = phi ptr [ %77, %76 ], [ %75, %74 ]
  %87 = load ptr, ptr %1, align 8, !tbaa !11
  tail call void @_ZN3zmq6pipe_t8set_peerEPS0_(ptr noundef nonnull align 8 dereferenceable(264) %87, ptr noundef %85)
  %88 = load ptr, ptr %86, align 8, !tbaa !11
  %89 = load ptr, ptr %1, align 8, !tbaa !11
  tail call void @_ZN3zmq6pipe_t8set_peerEPS0_(ptr noundef nonnull align 8 dereferenceable(264) %88, ptr noundef %89)
  ret i32 0

90:                                               ; preds = %32, %38, %61, %82, %17, %11
  %.sink = phi ptr [ %29, %32 ], [ %35, %38 ], [ %46, %61 ], [ %64, %82 ], [ %14, %17 ], [ %8, %11 ]
  %.pn.pn = phi { ptr, i32 } [ %33, %32 ], [ %39, %38 ], [ %62, %61 ], [ %83, %82 ], [ %18, %17 ], [ %12, %11 ]
  tail call void @_ZdlPvRKSt9nothrow_t(ptr noundef nonnull %.sink, ptr noundef nonnull align 1 dereferenceable(1) @_ZSt7nothrow) #8
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: nobuiltin nounwind allocsize(0)
declare noalias noundef ptr @_ZnwmRKSt9nothrow_t(i64 noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3zmq16ypipe_conflate_tINS_5msg_tEEC2Ev(ptr noundef nonnull align 8 dereferenceable(209)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvRKSt9nothrow_t(ptr noundef, ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN3zmq7ypipe_tINS_5msg_tELi256EEC2Ev(ptr noundef nonnull align 8 dereferenceable(96)) unnamed_addr #2 align 2

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

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

declare void @_ZN3zmq9zmq_abortEPKc(ptr noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN3zmq6pipe_t8set_peerEPS0_(ptr noundef nonnull align 8 dereferenceable(264), ptr noundef) local_unnamed_addr #0 align 2

declare void @_ZN3zmq6pipe_tC1EPNS_8object_tEPNS_12ypipe_base_tINS_5msg_tEEES6_iib(ptr, ptr, ptr, ptr, i32, i32, i1) local_unnamed_addr

attributes #0 = { mustprogress 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 = { nobuiltin nounwind allocsize(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 = { inlinehint mustprogress 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 = { nobuiltin 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 = { 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 #5 = { "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 = { builtin nounwind allocsize(0) }
attributes #7 = { cold nounwind }
attributes #8 = { builtin 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 = !{!"bool", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i8 0, i8 2}
!10 = !{}
!11 = !{!12, !12, i64 0}
!12 = !{!"any pointer", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"int", !7, i64 0}


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