#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 bpf_tcp_sock {
  int /*<<< orphan*/ bytes_acked;
  int /*<<< orphan*/ bytes_received;
  int /*<<< orphan*/ sacked_out;
  int /*<<< orphan*/ lost_out;
  int /*<<< orphan*/ data_segs_out;
  int /*<<< orphan*/ segs_out;
  int /*<<< orphan*/ data_segs_in;
  int /*<<< orphan*/ segs_in;
  int /*<<< orphan*/ total_retrans;
  int /*<<< orphan*/ retrans_out;
  int /*<<< orphan*/ packets_out;
  int /*<<< orphan*/ rate_interval_us;
  int /*<<< orphan*/ rate_delivered;
  int /*<<< orphan*/ ecn_flags;
  int /*<<< orphan*/ mss_cache;
  int /*<<< orphan*/ snd_una;
  int /*<<< orphan*/ snd_nxt;
  int /*<<< orphan*/ rcv_nxt;
  int /*<<< orphan*/ snd_ssthresh;
  int /*<<< orphan*/ rtt_min;
  int /*<<< orphan*/ srtt_us;
  int /*<<< orphan*/ snd_cwnd;
};

/* Variables and functions */
void tpcpy(struct bpf_tcp_sock *dst, const struct bpf_tcp_sock *src) {
  dst->snd_cwnd = src->snd_cwnd;
  dst->srtt_us = src->srtt_us;
  dst->rtt_min = src->rtt_min;
  dst->snd_ssthresh = src->snd_ssthresh;
  dst->rcv_nxt = src->rcv_nxt;
  dst->snd_nxt = src->snd_nxt;
  dst->snd_una = src->snd_una;
  dst->mss_cache = src->mss_cache;
  dst->ecn_flags = src->ecn_flags;
  dst->rate_delivered = src->rate_delivered;
  dst->rate_interval_us = src->rate_interval_us;
  dst->packets_out = src->packets_out;
  dst->retrans_out = src->retrans_out;
  dst->total_retrans = src->total_retrans;
  dst->segs_in = src->segs_in;
  dst->data_segs_in = src->data_segs_in;
  dst->segs_out = src->segs_out;
  dst->data_segs_out = src->data_segs_out;
  dst->lost_out = src->lost_out;
  dst->sacked_out = src->sacked_out;
  dst->bytes_received = src->bytes_received;
  dst->bytes_acked = src->bytes_acked;
}


x86 assembly (clang, -O0):
<tpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x54(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x54(%rax)
mov    -0x10(%rbp),%rax
mov    0x50(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x50(%rax)
mov    -0x10(%rbp),%rax
mov    0x4c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4c(%rax)
mov    -0x10(%rbp),%rax
mov    0x48(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x48(%rax)
mov    -0x10(%rbp),%rax
mov    0x44(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x44(%rax)
mov    -0x10(%rbp),%rax
mov    0x40(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x40(%rax)
mov    -0x10(%rbp),%rax
mov    0x3c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x3c(%rax)
mov    -0x10(%rbp),%rax
mov    0x38(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x38(%rax)
mov    -0x10(%rbp),%rax
mov    0x34(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x34(%rax)
mov    -0x10(%rbp),%rax
mov    0x30(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x30(%rax)
mov    -0x10(%rbp),%rax
mov    0x2c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x2c(%rax)
mov    -0x10(%rbp),%rax
mov    0x28(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x28(%rax)
mov    -0x10(%rbp),%rax
mov    0x24(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x24(%rax)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x20(%rax)
mov    -0x10(%rbp),%rax
mov    0x1c(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<tpcpy>:
mov    0x54(%rsi),%eax
mov    %eax,0x54(%rdi)
mov    0x50(%rsi),%eax
mov    %eax,0x50(%rdi)
movups 0x40(%rsi),%xmm0
movups %xmm0,0x40(%rdi)
movups 0x30(%rsi),%xmm0
movups %xmm0,0x30(%rdi)
movups 0x20(%rsi),%xmm0
movups %xmm0,0x20(%rdi)
movups 0x10(%rsi),%xmm0
movups %xmm0,0x10(%rdi)
movups (%rsi),%xmm0
movups %xmm0,(%rdi)
ret

LLVM IR (-O0):
%struct.bpf_tcp_sock = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @tpcpy(%struct.bpf_tcp_sock* %0, %struct.bpf_tcp_sock* %1) {
%3 = alloca %struct.bpf_tcp_sock*
%4 = alloca %struct.bpf_tcp_sock*
store %struct.bpf_tcp_sock* %0, %struct.bpf_tcp_sock** %3
store %struct.bpf_tcp_sock* %1, %struct.bpf_tcp_sock** %4
%5 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%6 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %5, i32 0, i32 21
%7 = load i32, i32* %6
%8 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%9 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %8, i32 0, i32 21
store i32 %7, i32* %9
%10 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%11 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %10, i32 0, i32 20
%12 = load i32, i32* %11
%13 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%14 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %13, i32 0, i32 20
store i32 %12, i32* %14
%15 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%16 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %15, i32 0, i32 19
%17 = load i32, i32* %16
%18 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%19 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %18, i32 0, i32 19
store i32 %17, i32* %19
%20 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%21 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %20, i32 0, i32 18
%22 = load i32, i32* %21
%23 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%24 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %23, i32 0, i32 18
store i32 %22, i32* %24
%25 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%26 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %25, i32 0, i32 17
%27 = load i32, i32* %26
%28 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%29 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %28, i32 0, i32 17
store i32 %27, i32* %29
%30 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%31 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %30, i32 0, i32 16
%32 = load i32, i32* %31
%33 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%34 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %33, i32 0, i32 16
store i32 %32, i32* %34
%35 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%36 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %35, i32 0, i32 15
%37 = load i32, i32* %36
%38 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%39 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %38, i32 0, i32 15
store i32 %37, i32* %39
%40 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%41 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %40, i32 0, i32 14
%42 = load i32, i32* %41
%43 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%44 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %43, i32 0, i32 14
store i32 %42, i32* %44
%45 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%46 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %45, i32 0, i32 13
%47 = load i32, i32* %46
%48 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%49 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %48, i32 0, i32 13
store i32 %47, i32* %49
%50 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%51 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %50, i32 0, i32 12
%52 = load i32, i32* %51
%53 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%54 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %53, i32 0, i32 12
store i32 %52, i32* %54
%55 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%56 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %55, i32 0, i32 11
%57 = load i32, i32* %56
%58 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%59 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %58, i32 0, i32 11
store i32 %57, i32* %59
%60 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%61 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %60, i32 0, i32 10
%62 = load i32, i32* %61
%63 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%64 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %63, i32 0, i32 10
store i32 %62, i32* %64
%65 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%66 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %65, i32 0, i32 9
%67 = load i32, i32* %66
%68 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%69 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %68, i32 0, i32 9
store i32 %67, i32* %69
%70 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%71 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %70, i32 0, i32 8
%72 = load i32, i32* %71
%73 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%74 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %73, i32 0, i32 8
store i32 %72, i32* %74
%75 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%76 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %75, i32 0, i32 7
%77 = load i32, i32* %76
%78 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%79 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %78, i32 0, i32 7
store i32 %77, i32* %79
%80 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%81 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %80, i32 0, i32 6
%82 = load i32, i32* %81
%83 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%84 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %83, i32 0, i32 6
store i32 %82, i32* %84
%85 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%86 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %85, i32 0, i32 5
%87 = load i32, i32* %86
%88 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%89 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %88, i32 0, i32 5
store i32 %87, i32* %89
%90 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%91 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %90, i32 0, i32 4
%92 = load i32, i32* %91
%93 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%94 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %93, i32 0, i32 4
store i32 %92, i32* %94
%95 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%96 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %95, i32 0, i32 3
%97 = load i32, i32* %96
%98 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%99 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %98, i32 0, i32 3
store i32 %97, i32* %99
%100 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%101 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %100, i32 0, i32 2
%102 = load i32, i32* %101
%103 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%104 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %103, i32 0, i32 2
store i32 %102, i32* %104
%105 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%106 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %105, i32 0, i32 1
%107 = load i32, i32* %106
%108 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%109 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %108, i32 0, i32 1
store i32 %107, i32* %109
%110 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %4
%111 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %110, i32 0, i32 0
%112 = load i32, i32* %111
%113 = load %struct.bpf_tcp_sock*, %struct.bpf_tcp_sock** %3
%114 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %113, i32 0, i32 0
store i32 %112, i32* %114
ret void
}

LLVM IR (-O2):
%struct.bpf_tcp_sock = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
define void @tpcpy(%struct.bpf_tcp_sock* writeonly %0, %struct.bpf_tcp_sock* %1) {
%3 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %1, i64 0, i32 21
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %0, i64 0, i32 21
store i32 %4, i32* %5
%6 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %1, i64 0, i32 20
%7 = load i32, i32* %6
%8 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %0, i64 0, i32 20
store i32 %7, i32* %8
%9 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %1, i64 0, i32 16
%10 = bitcast i32* %9 to <4 x i32>*
%11 = load <4 x i32>, <4 x i32>* %10
%12 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %0, i64 0, i32 16
%13 = bitcast i32* %12 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %13
%14 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %1, i64 0, i32 12
%15 = bitcast i32* %14 to <4 x i32>*
%16 = load <4 x i32>, <4 x i32>* %15
%17 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %0, i64 0, i32 12
%18 = bitcast i32* %17 to <4 x i32>*
store <4 x i32> %16, <4 x i32>* %18
%19 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %1, i64 0, i32 8
%20 = bitcast i32* %19 to <4 x i32>*
%21 = load <4 x i32>, <4 x i32>* %20
%22 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %0, i64 0, i32 8
%23 = bitcast i32* %22 to <4 x i32>*
store <4 x i32> %21, <4 x i32>* %23
%24 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %1, i64 0, i32 4
%25 = bitcast i32* %24 to <4 x i32>*
%26 = load <4 x i32>, <4 x i32>* %25
%27 = getelementptr inbounds %struct.bpf_tcp_sock, %struct.bpf_tcp_sock* %0, i64 0, i32 4
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> %26, <4 x i32>* %28
%29 = bitcast %struct.bpf_tcp_sock* %1 to <4 x i32>*
%30 = load <4 x i32>, <4 x i32>* %29
%31 = bitcast %struct.bpf_tcp_sock* %0 to <4 x i32>*
store <4 x i32> %30, <4 x i32>* %31
ret void
}