#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct sock_extended_err {
  scalar_t__ ee_errno;
  scalar_t__ ee_origin;
  int /*<<< orphan*/ ee_data;
  int /*<<< orphan*/ ee_info;
};
struct scm_timestamping {
  int dummy;
};
struct msghdr {
  int dummy;
};
struct cmsghdr {
  scalar_t__ cmsg_level;
  scalar_t__ cmsg_type;
  scalar_t__ cmsg_len;
};

/* Variables and functions */
scalar_t__ CMSG_DATA(struct cmsghdr *);
struct cmsghdr *CMSG_FIRSTHDR(struct msghdr *);
struct cmsghdr *CMSG_NXTHDR(struct msghdr *, struct cmsghdr *);
scalar_t__ ENOMSG;
scalar_t__ IPV6_RECVERR;
scalar_t__ IP_RECVERR;
scalar_t__ SCM_TIMESTAMPING;
scalar_t__ SOL_IP;
scalar_t__ SOL_IPV6;
scalar_t__ SOL_SOCKET;
scalar_t__ SO_EE_ORIGIN_TIMESTAMPING;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, scalar_t__, scalar_t__);
int /*<<< orphan*/ print_timestamp(struct scm_timestamping *,
                                   int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ stderr;
void __recv_errmsg_cmsg(struct msghdr *msg, int payload_len) {
  struct sock_extended_err *serr = NULL;
  struct scm_timestamping *tss = NULL;
  struct cmsghdr *cm;
  for (cm = CMSG_FIRSTHDR(msg); cm && cm->cmsg_len; cm = CMSG_NXTHDR(msg, cm)) {
    if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_TIMESTAMPING) {
      tss = (void *)CMSG_DATA(cm);
    } else if ((cm->cmsg_level == SOL_IP && cm->cmsg_type == IP_RECVERR) ||
               (cm->cmsg_level == SOL_IPV6 && cm->cmsg_type == IPV6_RECVERR)) {
      serr = (void *)CMSG_DATA(cm);
      if (serr->ee_errno != ENOMSG ||
          serr->ee_origin != SO_EE_ORIGIN_TIMESTAMPING) {
        fprintf(stderr, "unknown ip error %d %d\n", serr->ee_errno,
                serr->ee_origin);
        serr = NULL;
      }
    } else
      fprintf(stderr, "unknown cmsg %d,%d\n", cm->cmsg_level, cm->cmsg_type);
  }
  if (serr && tss)
    print_timestamp(tss, serr->ee_info, serr->ee_data, payload_len);
}


x86 assembly (clang, -O0):
<__recv_errmsg_cmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <CMSG_FIRSTHDR@plt>
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x28(%rbp)
mov    %al,-0x29(%rbp)
je     119b <__recv_errmsg_cmsg+0x4b>
mov    -0x28(%rbp),%rax
cmpq   $0x0,0x10(%rax)
setne  %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
test   $0x1,%al
jne    11ab <__recv_errmsg_cmsg+0x5b>
jmp    12fb <__recv_errmsg_cmsg+0x1ab>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    0x2e0f(%rip),%rcx
cmp    (%rcx),%rax
jne    11ec <__recv_errmsg_cmsg+0x9c>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x2de7(%rip),%rcx
cmp    (%rcx),%rax
jne    11ec <__recv_errmsg_cmsg+0x9c>
mov    -0x28(%rbp),%rdi
call   1030 <CMSG_DATA@plt>
mov    %rax,-0x20(%rbp)
jmp    12e0 <__recv_errmsg_cmsg+0x190>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    0x2dfe(%rip),%rcx
cmp    (%rcx),%rax
jne    121b <__recv_errmsg_cmsg+0xcb>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x2dae(%rip),%rcx
cmp    (%rcx),%rax
je     124a <__recv_errmsg_cmsg+0xfa>
mov    -0x28(%rbp),%rax
mov    (%rax),%rax
mov    0x2db7(%rip),%rcx
cmp    (%rcx),%rax
jne    12b7 <__recv_errmsg_cmsg+0x167>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x2d97(%rip),%rcx
cmp    (%rcx),%rax
jne    12b7 <__recv_errmsg_cmsg+0x167>
mov    -0x28(%rbp),%rdi
call   1030 <CMSG_DATA@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    0x2d3b(%rip),%rcx
cmp    (%rcx),%rax
jne    1286 <__recv_errmsg_cmsg+0x136>
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x2d73(%rip),%rcx
cmp    (%rcx),%rax
je     12b2 <__recv_errmsg_cmsg+0x162>
mov    0x2d1b(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xd5b(%rip),%rsi
call   1050 <fprintf@plt>
movq   $0x0,-0x18(%rbp)
jmp    12db <__recv_errmsg_cmsg+0x18b>
mov    0x2cea(%rip),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
mov    (%rax),%rdx
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%rcx
lea    0xd42(%rip),%rsi
call   1050 <fprintf@plt>
jmp    12e0 <__recv_errmsg_cmsg+0x190>
jmp    12e5 <__recv_errmsg_cmsg+0x195>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1060 <CMSG_NXTHDR@plt>
mov    %rax,-0x28(%rbp)
jmp    117c <__recv_errmsg_cmsg+0x2c>
cmpq   $0x0,-0x18(%rbp)
je     132b <__recv_errmsg_cmsg+0x1db>
cmpq   $0x0,-0x20(%rbp)
je     132b <__recv_errmsg_cmsg+0x1db>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    0x14(%rax),%esi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%edx
mov    -0xc(%rbp),%ecx
call   1040 <print_timestamp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__recv_errmsg_cmsg>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,0x4(%rsp)
mov    %rdi,%rbp
call   1070 <CMSG_FIRSTHDR@plt>
test   %rax,%rax
je     12a1 <__recv_errmsg_cmsg+0x151>
mov    %rax,%rbx
xor    %r15d,%r15d
mov    0x2e4b(%rip),%r12
mov    0x2e74(%rip),%r13
xor    %r14d,%r14d
jmp    11bc <__recv_errmsg_cmsg+0x6c>
nopl   0x0(%rax)
mov    0x2e11(%rip),%rax
mov    (%rax),%edi
lea    0xe78(%rip),%rsi
call   1050 <fprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   1060 <CMSG_NXTHDR@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1275 <__recv_errmsg_cmsg+0x125>
cmpq   $0x0,0x10(%rbx)
je     1275 <__recv_errmsg_cmsg+0x125>
mov    (%rbx),%rdx
cmp    (%r12),%rdx
jne    11f0 <__recv_errmsg_cmsg+0xa0>
mov    0x8(%rbx),%rax
mov    0x2ddd(%rip),%rcx
cmp    (%rcx),%rax
jne    11f0 <__recv_errmsg_cmsg+0xa0>
mov    %rbx,%rdi
call   1030 <CMSG_DATA@plt>
mov    %rax,%r15
jmp    11a5 <__recv_errmsg_cmsg+0x55>
nopl   (%rax)
cmp    0x0(%r13),%rdx
jne    1206 <__recv_errmsg_cmsg+0xb6>
mov    0x8(%rbx),%rax
mov    0x2dbf(%rip),%rcx
cmp    (%rcx),%rax
je     122a <__recv_errmsg_cmsg+0xda>
mov    0x8(%rbx),%rcx
mov    0x2dcf(%rip),%rax
cmp    (%rax),%rdx
jne    1190 <__recv_errmsg_cmsg+0x40>
mov    0x2db7(%rip),%rax
cmp    (%rax),%rcx
jne    1190 <__recv_errmsg_cmsg+0x40>
mov    %rbx,%rdi
call   1030 <CMSG_DATA@plt>
mov    %rax,%r14
mov    (%rax),%rdx
mov    0x8(%rax),%rcx
mov    0x2d5d(%rip),%rax
cmp    (%rax),%rdx
jne    1258 <__recv_errmsg_cmsg+0x108>
mov    0x2da1(%rip),%rax
cmp    (%rax),%rcx
je     11a5 <__recv_errmsg_cmsg+0x55>
mov    0x2d49(%rip),%rax
mov    (%rax),%edi
lea    0xd98(%rip),%rsi
call   1050 <fprintf@plt>
xor    %r14d,%r14d
jmp    11a5 <__recv_errmsg_cmsg+0x55>
test   %r14,%r14
je     12a1 <__recv_errmsg_cmsg+0x151>
test   %r15,%r15
je     12a1 <__recv_errmsg_cmsg+0x151>
mov    0x10(%r14),%edx
mov    0x14(%r14),%esi
mov    %r15,%rdi
mov    0x4(%rsp),%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <print_timestamp@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.msghdr = type { i32 }
%struct.sock_extended_err = type { i64, i64, i32, i32 }
%struct.scm_timestamping = type { i32 }
%struct.cmsghdr = type { i64, i64, i64 }
@SOL_SOCKET = global i64 0
@SCM_TIMESTAMPING = global i64 0
@SOL_IP = global i64 0
@IP_RECVERR = global i64 0
@SOL_IPV6 = global i64 0
@IPV6_RECVERR = global i64 0
@ENOMSG = global i64 0
@SO_EE_ORIGIN_TIMESTAMPING = global i64 0
@stderr = global i32 0
@.str = [24 x i8] c"unknown ip error %d %d\0A\00"
@.str.1 = [20 x i8] c"unknown cmsg %d,%d\0A\00"
define void @__recv_errmsg_cmsg(%struct.msghdr* %0, i32 %1) {
%3 = alloca %struct.msghdr*
%4 = alloca i32
%5 = alloca %struct.sock_extended_err*
%6 = alloca %struct.scm_timestamping*
%7 = alloca %struct.cmsghdr*
store %struct.msghdr* %0, %struct.msghdr** %3
store i32 %1, i32* %4
store %struct.sock_extended_err* null, %struct.sock_extended_err** %5
store %struct.scm_timestamping* null, %struct.scm_timestamping** %6
%8 = load %struct.msghdr*, %struct.msghdr** %3
%9 = call %struct.cmsghdr* @CMSG_FIRSTHDR(%struct.msghdr* %8)
store %struct.cmsghdr* %9, %struct.cmsghdr** %7
br label %10
10: ; preds = %98, %2
%11 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%12 = icmp ne %struct.cmsghdr* %11, null
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%15 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %14, i32 0, i32 2
%16 = load i64, i64* %15
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %13, %10
%19 = phi i1 [ false, %10 ], [ %17, %13 ]
br i1 %19, label %20, label %102
20: ; preds = %18
%21 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%22 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %21, i32 0, i32 0
%23 = load i64, i64* %22
%24 = load i64, i64* @SOL_SOCKET
%25 = icmp eq i64 %23, %24
br i1 %25, label %26, label %37
26: ; preds = %20
%27 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%28 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %27, i32 0, i32 1
%29 = load i64, i64* %28
%30 = load i64, i64* @SCM_TIMESTAMPING
%31 = icmp eq i64 %29, %30
br i1 %31, label %32, label %37
32: ; preds = %26
%33 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%34 = call i64 @CMSG_DATA(%struct.cmsghdr* %33)
%35 = inttoptr i64 %34 to i8*
%36 = bitcast i8* %35 to %struct.scm_timestamping*
store %struct.scm_timestamping* %36, %struct.scm_timestamping** %6
br label %97
37: ; preds = %26, %20
%38 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%39 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %38, i32 0, i32 0
%40 = load i64, i64* %39
%41 = load i64, i64* @SOL_IP
%42 = icmp eq i64 %40, %41
br i1 %42, label %43, label %49
43: ; preds = %37
%44 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%45 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %44, i32 0, i32 1
%46 = load i64, i64* %45
%47 = load i64, i64* @IP_RECVERR
%48 = icmp eq i64 %46, %47
br i1 %48, label %61, label %49
49: ; preds = %43, %37
%50 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%51 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %50, i32 0, i32 0
%52 = load i64, i64* %51
%53 = load i64, i64* @SOL_IPV6
%54 = icmp eq i64 %52, %53
br i1 %54, label %55, label %87
55: ; preds = %49
%56 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%57 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %56, i32 0, i32 1
%58 = load i64, i64* %57
%59 = load i64, i64* @IPV6_RECVERR
%60 = icmp eq i64 %58, %59
br i1 %60, label %61, label %87
61: ; preds = %55, %43
%62 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%63 = call i64 @CMSG_DATA(%struct.cmsghdr* %62)
%64 = inttoptr i64 %63 to i8*
%65 = bitcast i8* %64 to %struct.sock_extended_err*
store %struct.sock_extended_err* %65, %struct.sock_extended_err** %5
%66 = load %struct.sock_extended_err*, %struct.sock_extended_err** %5
%67 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %66, i32 0, i32 0
%68 = load i64, i64* %67
%69 = load i64, i64* @ENOMSG
%70 = icmp ne i64 %68, %69
br i1 %70, label %77, label %71
71: ; preds = %61
%72 = load %struct.sock_extended_err*, %struct.sock_extended_err** %5
%73 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %72, i32 0, i32 1
%74 = load i64, i64* %73
%75 = load i64, i64* @SO_EE_ORIGIN_TIMESTAMPING
%76 = icmp ne i64 %74, %75
br i1 %76, label %77, label %86
77: ; preds = %71, %61
%78 = load i32, i32* @stderr
%79 = load %struct.sock_extended_err*, %struct.sock_extended_err** %5
%80 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %79, i32 0, i32 0
%81 = load i64, i64* %80
%82 = load %struct.sock_extended_err*, %struct.sock_extended_err** %5
%83 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %82, i32 0, i32 1
%84 = load i64, i64* %83
%85 = call i32 @fprintf(i32 %78, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %81, i64 %84)
store %struct.sock_extended_err* null, %struct.sock_extended_err** %5
br label %86
86: ; preds = %77, %71
br label %96
87: ; preds = %55, %49
%88 = load i32, i32* @stderr
%89 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%90 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %89, i32 0, i32 0
%91 = load i64, i64* %90
%92 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%93 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %92, i32 0, i32 1
%94 = load i64, i64* %93
%95 = call i32 @fprintf(i32 %88, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 %91, i64 %94)
br label %96
96: ; preds = %87, %86
br label %97
97: ; preds = %96, %32
br label %98
98: ; preds = %97
%99 = load %struct.msghdr*, %struct.msghdr** %3
%100 = load %struct.cmsghdr*, %struct.cmsghdr** %7
%101 = call %struct.cmsghdr* @CMSG_NXTHDR(%struct.msghdr* %99, %struct.cmsghdr* %100)
store %struct.cmsghdr* %101, %struct.cmsghdr** %7
br label %10
102: ; preds = %18
%103 = load %struct.sock_extended_err*, %struct.sock_extended_err** %5
%104 = icmp ne %struct.sock_extended_err* %103, null
br i1 %104, label %105, label %118
105: ; preds = %102
%106 = load %struct.scm_timestamping*, %struct.scm_timestamping** %6
%107 = icmp ne %struct.scm_timestamping* %106, null
br i1 %107, label %108, label %118
108: ; preds = %105
%109 = load %struct.scm_timestamping*, %struct.scm_timestamping** %6
%110 = load %struct.sock_extended_err*, %struct.sock_extended_err** %5
%111 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %110, i32 0, i32 3
%112 = load i32, i32* %111
%113 = load %struct.sock_extended_err*, %struct.sock_extended_err** %5
%114 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %113, i32 0, i32 2
%115 = load i32, i32* %114
%116 = load i32, i32* %4
%117 = call i32 @print_timestamp(%struct.scm_timestamping* %109, i32 %112, i32 %115, i32 %116)
br label %118
118: ; preds = %108, %105, %102
ret void
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
%struct.sock_extended_err = type { i64, i64, i32, i32 }
%struct.scm_timestamping = type { i32 }
%struct.cmsghdr = type { i64, i64, i64 }
@SOL_SOCKET = global i64 0
@SCM_TIMESTAMPING = global i64 0
@SOL_IP = global i64 0
@IP_RECVERR = global i64 0
@SOL_IPV6 = global i64 0
@IPV6_RECVERR = global i64 0
@ENOMSG = global i64 0
@SO_EE_ORIGIN_TIMESTAMPING = global i64 0
@stderr = global i32 0
@.str = [24 x i8] c"unknown ip error %d %d\0A\00"
@.str.1 = [20 x i8] c"unknown cmsg %d,%d\0A\00"
define void @__recv_errmsg_cmsg(%struct.msghdr* %0, i32 %1) {
%3 = tail call %struct.cmsghdr* @CMSG_FIRSTHDR(%struct.msghdr* %0)
%4 = icmp eq %struct.cmsghdr* %3, null
br i1 %4, label %76, label %5
5: ; preds = %2, %59
%6 = phi %struct.cmsghdr* [ %62, %59 ], [ %3, %2 ]
%7 = phi %struct.scm_timestamping* [ %61, %59 ], [ null, %2 ]
%8 = phi %struct.sock_extended_err* [ %60, %59 ], [ null, %2 ]
%9 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %6, i64 0, i32 2
%10 = load i64, i64* %9
%11 = icmp eq i64 %10, 0
br i1 %11, label %64, label %12
12: ; preds = %5
%13 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %6, i64 0, i32 0
%14 = load i64, i64* %13
%15 = load i64, i64* @SOL_SOCKET
%16 = icmp eq i64 %14, %15
br i1 %16, label %17, label %25
17: ; preds = %12
%18 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %6, i64 0, i32 1
%19 = load i64, i64* %18
%20 = load i64, i64* @SCM_TIMESTAMPING
%21 = icmp eq i64 %19, %20
br i1 %21, label %22, label %25
22: ; preds = %17
%23 = tail call i64 @CMSG_DATA(%struct.cmsghdr* %6)
%24 = inttoptr i64 %23 to %struct.scm_timestamping*
br label %59
25: ; preds = %17, %12
%26 = load i64, i64* @SOL_IP
%27 = icmp eq i64 %14, %26
br i1 %27, label %28, label %33
28: ; preds = %25
%29 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %6, i64 0, i32 1
%30 = load i64, i64* %29
%31 = load i64, i64* @IP_RECVERR
%32 = icmp eq i64 %30, %31
br i1 %32, label %41, label %33
33: ; preds = %28, %25
%34 = load i64, i64* @SOL_IPV6
%35 = icmp eq i64 %14, %34
%36 = getelementptr inbounds %struct.cmsghdr, %struct.cmsghdr* %6, i64 0, i32 1
%37 = load i64, i64* %36
%38 = load i64, i64* @IPV6_RECVERR
%39 = icmp eq i64 %37, %38
%40 = select i1 %35, i1 %39, i1 false
br i1 %40, label %41, label %56
41: ; preds = %33, %28
%42 = tail call i64 @CMSG_DATA(%struct.cmsghdr* %6)
%43 = inttoptr i64 %42 to %struct.sock_extended_err*
%44 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %43, i64 0, i32 0
%45 = load i64, i64* %44
%46 = load i64, i64* @ENOMSG
%47 = icmp eq i64 %45, %46
%48 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %43, i64 0, i32 1
%49 = load i64, i64* %48
%50 = load i64, i64* @SO_EE_ORIGIN_TIMESTAMPING
%51 = icmp eq i64 %49, %50
%52 = select i1 %47, i1 %51, i1 false
br i1 %52, label %59, label %53
53: ; preds = %41
%54 = load i32, i32* @stderr
%55 = tail call i32 @fprintf(i32 %54, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 %45, i64 %49)
br label %59
56: ; preds = %33
%57 = load i32, i32* @stderr
%58 = tail call i32 @fprintf(i32 %57, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i64 %14, i64 %37)
br label %59
59: ; preds = %41, %22, %53, %56
%60 = phi %struct.sock_extended_err* [ %8, %22 ], [ null, %53 ], [ %8, %56 ], [ %43, %41 ]
%61 = phi %struct.scm_timestamping* [ %24, %22 ], [ %7, %53 ], [ %7, %56 ], [ %7, %41 ]
%62 = tail call %struct.cmsghdr* @CMSG_NXTHDR(%struct.msghdr* %0, %struct.cmsghdr* %6)
%63 = icmp eq %struct.cmsghdr* %62, null
br i1 %63, label %64, label %5
64: ; preds = %5, %59
%65 = phi %struct.sock_extended_err* [ %8, %5 ], [ %60, %59 ]
%66 = phi %struct.scm_timestamping* [ %7, %5 ], [ %61, %59 ]
%67 = icmp ne %struct.sock_extended_err* %65, null
%68 = icmp ne %struct.scm_timestamping* %66, null
%69 = select i1 %67, i1 %68, i1 false
br i1 %69, label %70, label %76
70: ; preds = %64
%71 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %65, i64 0, i32 3
%72 = load i32, i32* %71
%73 = getelementptr inbounds %struct.sock_extended_err, %struct.sock_extended_err* %65, i64 0, i32 2
%74 = load i32, i32* %73
%75 = tail call i32 @print_timestamp(%struct.scm_timestamping* %66, i32 %72, i32 %74, i32 %1)
br label %76
76: ; preds = %2, %70, %64
ret void
}