#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_fprog {
  int dummy;
};
struct sock_filter {
  int dummy;
};

/* Variables and functions */
scalar_t__ BPF_ABS;
scalar_t__ BPF_B;
scalar_t__ BPF_H;
scalar_t__ BPF_LD;
scalar_t__ BPF_MISC;
struct sock_filter BPF_STMT(scalar_t__, int);
scalar_t__ BPF_TAX;
scalar_t__ BPF_W;
int SKF_AD_ALU_XOR_X;
int SKF_AD_OFF;
int __add_inst(struct sock_fprog *, struct sock_filter *);
int bpf_eth_hash(struct sock_fprog *fprog) {
  int err;
  {
    struct sock_filter inst = BPF_STMT(BPF_LD + BPF_W + BPF_ABS, 2);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst =
        BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_ALU_XOR_X);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst = BPF_STMT(BPF_MISC + BPF_TAX, 0);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  ;
  {
    struct sock_filter inst = BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 0);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst =
        BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_ALU_XOR_X);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst = BPF_STMT(BPF_MISC + BPF_TAX, 0);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  ;
  {
    struct sock_filter inst = BPF_STMT(BPF_LD + BPF_W + BPF_ABS, 8);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst =
        BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_ALU_XOR_X);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst = BPF_STMT(BPF_MISC + BPF_TAX, 0);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  ;
  {
    struct sock_filter inst = BPF_STMT(BPF_LD + BPF_H + BPF_ABS, 6);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst =
        BPF_STMT(BPF_LD + BPF_B + BPF_ABS, SKF_AD_OFF + SKF_AD_ALU_XOR_X);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  {
    struct sock_filter inst = BPF_STMT(BPF_MISC + BPF_TAX, 0);
    err = __add_inst(fprog, &inst);
    if (err)
      goto err_add_inst;
  };
  ;
  return 0;
err_add_inst:
  return err;
}


x86 assembly (clang, -O0):
<bpf_eth_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2e8d(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb3(%rip),%rax
add    (%rax),%rdi
mov    0x2e99(%rip),%rax
add    (%rax),%rdi
mov    $0x2,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1176 <bpf_eth_hash+0x56>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2e43(%rip),%rax
mov    (%rax),%rdi
mov    0x2e29(%rip),%rax
add    (%rax),%rdi
mov    0x2e4f(%rip),%rax
add    (%rax),%rdi
mov    0x2e35(%rip),%rax
mov    (%rax),%esi
mov    0x2df4(%rip),%rax
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     11cd <bpf_eth_hash+0xad>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2e04(%rip),%rax
mov    (%rax),%rdi
mov    0x2dc2(%rip),%rax
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     120a <bpf_eth_hash+0xea>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2daf(%rip),%rax
mov    (%rax),%rdi
mov    0x2d9d(%rip),%rax
add    (%rax),%rdi
mov    0x2dbb(%rip),%rax
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1251 <bpf_eth_hash+0x131>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2d68(%rip),%rax
mov    (%rax),%rdi
mov    0x2d4e(%rip),%rax
add    (%rax),%rdi
mov    0x2d74(%rip),%rax
add    (%rax),%rdi
mov    0x2d5a(%rip),%rax
mov    (%rax),%esi
mov    0x2d19(%rip),%rax
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     12a8 <bpf_eth_hash+0x188>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2d29(%rip),%rax
mov    (%rax),%rdi
mov    0x2ce7(%rip),%rax
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     12e5 <bpf_eth_hash+0x1c5>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2cd4(%rip),%rax
mov    (%rax),%rdi
mov    0x2cfa(%rip),%rax
add    (%rax),%rdi
mov    0x2ce0(%rip),%rax
add    (%rax),%rdi
mov    $0x8,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x48(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     132f <bpf_eth_hash+0x20f>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2c8a(%rip),%rax
mov    (%rax),%rdi
mov    0x2c70(%rip),%rax
add    (%rax),%rdi
mov    0x2c96(%rip),%rax
add    (%rax),%rdi
mov    0x2c7c(%rip),%rax
mov    (%rax),%esi
mov    0x2c3b(%rip),%rax
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1386 <bpf_eth_hash+0x266>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2c4b(%rip),%rax
mov    (%rax),%rdi
mov    0x2c09(%rip),%rax
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x58(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     13c3 <bpf_eth_hash+0x2a3>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2bf6(%rip),%rax
mov    (%rax),%rdi
mov    0x2be4(%rip),%rax
add    (%rax),%rdi
mov    0x2c02(%rip),%rax
add    (%rax),%rdi
mov    $0x6,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x60(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     140d <bpf_eth_hash+0x2ed>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2bac(%rip),%rax
mov    (%rax),%rdi
mov    0x2b92(%rip),%rax
add    (%rax),%rdi
mov    0x2bb8(%rip),%rax
add    (%rax),%rdi
mov    0x2b9e(%rip),%rax
mov    (%rax),%esi
mov    0x2b5d(%rip),%rax
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x68(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x68(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1464 <bpf_eth_hash+0x344>
jmp    14ad <bpf_eth_hash+0x38d>
mov    0x2b6d(%rip),%rax
mov    (%rax),%rdi
mov    0x2b2b(%rip),%rax
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,-0x70(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x70(%rbp),%rsi
call   1040 <__add_inst@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     14a1 <bpf_eth_hash+0x381>
jmp    14ad <bpf_eth_hash+0x38d>
movl   $0x0,-0x4(%rbp)
jmp    14b3 <bpf_eth_hash+0x393>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_eth_hash>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e8e(%rip),%r14
mov    0x2eb7(%rip),%r15
mov    (%r15),%rax
add    (%r14),%rax
mov    %rdi,%rbx
mov    0x2e97(%rip),%rbp
add    0x0(%rbp),%rax
mov    %rax,%rdi
mov    $0x2,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    0x2e39(%rip),%r12
mov    (%r12),%rdi
add    (%r14),%rdi
add    0x0(%rbp),%rdi
mov    0x2e47(%rip),%rax
mov    0x2e08(%rip),%r13
mov    0x0(%r13),%esi
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    0x2e20(%rip),%rax
mov    0x2de1(%rip),%rcx
mov    (%rcx),%rdi
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    0x2dcf(%rip),%rax
mov    (%rax),%rdi
add    (%r14),%rdi
add    0x0(%rbp),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    (%r12),%rdi
add    (%r14),%rdi
add    0x0(%rbp),%rdi
mov    0x0(%r13),%esi
mov    0x2daa(%rip),%rax
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    0x2d56(%rip),%rax
mov    (%rax),%rdi
mov    0x2d84(%rip),%rax
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    (%r15),%rdi
add    (%r14),%rdi
add    0x0(%rbp),%rdi
mov    $0x8,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    (%r12),%rdi
add    (%r14),%rdi
add    0x0(%rbp),%rdi
mov    0x0(%r13),%esi
mov    0x2d1c(%rip),%rax
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    0x2cc8(%rip),%rax
mov    (%rax),%rdi
mov    0x2cf6(%rip),%rax
add    (%rax),%rdi
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    0x2caf(%rip),%rax
mov    (%rax),%rdi
add    (%r14),%rdi
add    0x0(%rbp),%rdi
mov    $0x6,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    (%r12),%rdi
add    (%r14),%rdi
add    0x0(%rbp),%rdi
mov    0x0(%r13),%esi
mov    0x2c8b(%rip),%rax
add    (%rax),%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
jne    138d <bpf_eth_hash+0x26d>
mov    0x2c3b(%rip),%rax
mov    (%rax),%rdi
mov    0x2c69(%rip),%rax
add    (%rax),%rdi
xor    %ebp,%ebp
xor    %esi,%esi
call   1030 <BPF_STMT@plt>
mov    %eax,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <__add_inst@plt>
test   %eax,%eax
je     138f <bpf_eth_hash+0x26f>
mov    %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sock_fprog = type { i32 }
%struct.sock_filter = type { i32 }
@BPF_LD = global i64 0
@BPF_W = global i64 0
@BPF_ABS = global i64 0
@BPF_B = global i64 0
@SKF_AD_OFF = global i32 0
@SKF_AD_ALU_XOR_X = global i32 0
@BPF_MISC = global i64 0
@BPF_TAX = global i64 0
@BPF_H = global i64 0
define i32 @bpf_eth_hash(%struct.sock_fprog* %0) {
%2 = alloca i32
%3 = alloca %struct.sock_fprog*
%4 = alloca i32
%5 = alloca %struct.sock_filter
%6 = alloca %struct.sock_filter
%7 = alloca %struct.sock_filter
%8 = alloca %struct.sock_filter
%9 = alloca %struct.sock_filter
%10 = alloca %struct.sock_filter
%11 = alloca %struct.sock_filter
%12 = alloca %struct.sock_filter
%13 = alloca %struct.sock_filter
%14 = alloca %struct.sock_filter
%15 = alloca %struct.sock_filter
%16 = alloca %struct.sock_filter
store %struct.sock_fprog* %0, %struct.sock_fprog** %3
%17 = load i64, i64* @BPF_LD
%18 = load i64, i64* @BPF_W
%19 = add nsw i64 %17, %18
%20 = load i64, i64* @BPF_ABS
%21 = add nsw i64 %19, %20
%22 = call i32 @BPF_STMT(i64 %21, i32 2)
%23 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %5, i32 0, i32 0
store i32 %22, i32* %23
%24 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%25 = call i32 @__add_inst(%struct.sock_fprog* %24, %struct.sock_filter* %5)
store i32 %25, i32* %4
%26 = load i32, i32* %4
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %1
br label %177
29: ; preds = %1
%30 = load i64, i64* @BPF_LD
%31 = load i64, i64* @BPF_B
%32 = add nsw i64 %30, %31
%33 = load i64, i64* @BPF_ABS
%34 = add nsw i64 %32, %33
%35 = load i32, i32* @SKF_AD_OFF
%36 = load i32, i32* @SKF_AD_ALU_XOR_X
%37 = add nsw i32 %35, %36
%38 = call i32 @BPF_STMT(i64 %34, i32 %37)
%39 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %6, i32 0, i32 0
store i32 %38, i32* %39
%40 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%41 = call i32 @__add_inst(%struct.sock_fprog* %40, %struct.sock_filter* %6)
store i32 %41, i32* %4
%42 = load i32, i32* %4
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %45
44: ; preds = %29
br label %177
45: ; preds = %29
%46 = load i64, i64* @BPF_MISC
%47 = load i64, i64* @BPF_TAX
%48 = add nsw i64 %46, %47
%49 = call i32 @BPF_STMT(i64 %48, i32 0)
%50 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %7, i32 0, i32 0
store i32 %49, i32* %50
%51 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%52 = call i32 @__add_inst(%struct.sock_fprog* %51, %struct.sock_filter* %7)
store i32 %52, i32* %4
%53 = load i32, i32* %4
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %56
55: ; preds = %45
br label %177
56: ; preds = %45
%57 = load i64, i64* @BPF_LD
%58 = load i64, i64* @BPF_H
%59 = add nsw i64 %57, %58
%60 = load i64, i64* @BPF_ABS
%61 = add nsw i64 %59, %60
%62 = call i32 @BPF_STMT(i64 %61, i32 0)
%63 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %8, i32 0, i32 0
store i32 %62, i32* %63
%64 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%65 = call i32 @__add_inst(%struct.sock_fprog* %64, %struct.sock_filter* %8)
store i32 %65, i32* %4
%66 = load i32, i32* %4
%67 = icmp ne i32 %66, 0
br i1 %67, label %68, label %69
68: ; preds = %56
br label %177
69: ; preds = %56
%70 = load i64, i64* @BPF_LD
%71 = load i64, i64* @BPF_B
%72 = add nsw i64 %70, %71
%73 = load i64, i64* @BPF_ABS
%74 = add nsw i64 %72, %73
%75 = load i32, i32* @SKF_AD_OFF
%76 = load i32, i32* @SKF_AD_ALU_XOR_X
%77 = add nsw i32 %75, %76
%78 = call i32 @BPF_STMT(i64 %74, i32 %77)
%79 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %9, i32 0, i32 0
store i32 %78, i32* %79
%80 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%81 = call i32 @__add_inst(%struct.sock_fprog* %80, %struct.sock_filter* %9)
store i32 %81, i32* %4
%82 = load i32, i32* %4
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %85
84: ; preds = %69
br label %177
85: ; preds = %69
%86 = load i64, i64* @BPF_MISC
%87 = load i64, i64* @BPF_TAX
%88 = add nsw i64 %86, %87
%89 = call i32 @BPF_STMT(i64 %88, i32 0)
%90 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %10, i32 0, i32 0
store i32 %89, i32* %90
%91 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%92 = call i32 @__add_inst(%struct.sock_fprog* %91, %struct.sock_filter* %10)
store i32 %92, i32* %4
%93 = load i32, i32* %4
%94 = icmp ne i32 %93, 0
br i1 %94, label %95, label %96
95: ; preds = %85
br label %177
96: ; preds = %85
%97 = load i64, i64* @BPF_LD
%98 = load i64, i64* @BPF_W
%99 = add nsw i64 %97, %98
%100 = load i64, i64* @BPF_ABS
%101 = add nsw i64 %99, %100
%102 = call i32 @BPF_STMT(i64 %101, i32 8)
%103 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %11, i32 0, i32 0
store i32 %102, i32* %103
%104 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%105 = call i32 @__add_inst(%struct.sock_fprog* %104, %struct.sock_filter* %11)
store i32 %105, i32* %4
%106 = load i32, i32* %4
%107 = icmp ne i32 %106, 0
br i1 %107, label %108, label %109
108: ; preds = %96
br label %177
109: ; preds = %96
%110 = load i64, i64* @BPF_LD
%111 = load i64, i64* @BPF_B
%112 = add nsw i64 %110, %111
%113 = load i64, i64* @BPF_ABS
%114 = add nsw i64 %112, %113
%115 = load i32, i32* @SKF_AD_OFF
%116 = load i32, i32* @SKF_AD_ALU_XOR_X
%117 = add nsw i32 %115, %116
%118 = call i32 @BPF_STMT(i64 %114, i32 %117)
%119 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %12, i32 0, i32 0
store i32 %118, i32* %119
%120 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%121 = call i32 @__add_inst(%struct.sock_fprog* %120, %struct.sock_filter* %12)
store i32 %121, i32* %4
%122 = load i32, i32* %4
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %125
124: ; preds = %109
br label %177
125: ; preds = %109
%126 = load i64, i64* @BPF_MISC
%127 = load i64, i64* @BPF_TAX
%128 = add nsw i64 %126, %127
%129 = call i32 @BPF_STMT(i64 %128, i32 0)
%130 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %13, i32 0, i32 0
store i32 %129, i32* %130
%131 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%132 = call i32 @__add_inst(%struct.sock_fprog* %131, %struct.sock_filter* %13)
store i32 %132, i32* %4
%133 = load i32, i32* %4
%134 = icmp ne i32 %133, 0
br i1 %134, label %135, label %136
135: ; preds = %125
br label %177
136: ; preds = %125
%137 = load i64, i64* @BPF_LD
%138 = load i64, i64* @BPF_H
%139 = add nsw i64 %137, %138
%140 = load i64, i64* @BPF_ABS
%141 = add nsw i64 %139, %140
%142 = call i32 @BPF_STMT(i64 %141, i32 6)
%143 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %14, i32 0, i32 0
store i32 %142, i32* %143
%144 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%145 = call i32 @__add_inst(%struct.sock_fprog* %144, %struct.sock_filter* %14)
store i32 %145, i32* %4
%146 = load i32, i32* %4
%147 = icmp ne i32 %146, 0
br i1 %147, label %148, label %149
148: ; preds = %136
br label %177
149: ; preds = %136
%150 = load i64, i64* @BPF_LD
%151 = load i64, i64* @BPF_B
%152 = add nsw i64 %150, %151
%153 = load i64, i64* @BPF_ABS
%154 = add nsw i64 %152, %153
%155 = load i32, i32* @SKF_AD_OFF
%156 = load i32, i32* @SKF_AD_ALU_XOR_X
%157 = add nsw i32 %155, %156
%158 = call i32 @BPF_STMT(i64 %154, i32 %157)
%159 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %15, i32 0, i32 0
store i32 %158, i32* %159
%160 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%161 = call i32 @__add_inst(%struct.sock_fprog* %160, %struct.sock_filter* %15)
store i32 %161, i32* %4
%162 = load i32, i32* %4
%163 = icmp ne i32 %162, 0
br i1 %163, label %164, label %165
164: ; preds = %149
br label %177
165: ; preds = %149
%166 = load i64, i64* @BPF_MISC
%167 = load i64, i64* @BPF_TAX
%168 = add nsw i64 %166, %167
%169 = call i32 @BPF_STMT(i64 %168, i32 0)
%170 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %16, i32 0, i32 0
store i32 %169, i32* %170
%171 = load %struct.sock_fprog*, %struct.sock_fprog** %3
%172 = call i32 @__add_inst(%struct.sock_fprog* %171, %struct.sock_filter* %16)
store i32 %172, i32* %4
%173 = load i32, i32* %4
%174 = icmp ne i32 %173, 0
br i1 %174, label %175, label %176
175: ; preds = %165
br label %177
176: ; preds = %165
store i32 0, i32* %2
br label %179
177: ; preds = %175, %164, %148, %135, %124, %108, %95, %84, %68, %55, %44, %28
%178 = load i32, i32* %4
store i32 %178, i32* %2
br label %179
179: ; preds = %177, %176
%180 = load i32, i32* %2
ret i32 %180
}

LLVM IR (-O2):
%struct.sock_fprog = type { i32 }
%struct.sock_filter = type { i32 }
@BPF_LD = global i64 0
@BPF_W = global i64 0
@BPF_ABS = global i64 0
@BPF_B = global i64 0
@SKF_AD_OFF = global i32 0
@SKF_AD_ALU_XOR_X = global i32 0
@BPF_MISC = global i64 0
@BPF_TAX = global i64 0
@BPF_H = global i64 0
define i32 @bpf_eth_hash(%struct.sock_fprog* %0) {
%2 = alloca %struct.sock_filter
%3 = alloca %struct.sock_filter
%4 = alloca %struct.sock_filter
%5 = alloca %struct.sock_filter
%6 = alloca %struct.sock_filter
%7 = alloca %struct.sock_filter
%8 = alloca %struct.sock_filter
%9 = alloca %struct.sock_filter
%10 = alloca %struct.sock_filter
%11 = alloca %struct.sock_filter
%12 = alloca %struct.sock_filter
%13 = alloca %struct.sock_filter
%14 = bitcast %struct.sock_filter* %2 to i8*
%15 = load i64, i64* @BPF_LD
%16 = load i64, i64* @BPF_W
%17 = add nsw i64 %16, %15
%18 = load i64, i64* @BPF_ABS
%19 = add nsw i64 %17, %18
%20 = tail call i32 @BPF_STMT(i64 %19, i32 2)
%21 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %2, i64 0, i32 0
store i32 %20, i32* %21
%22 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %2)
%23 = icmp eq i32 %22, 0
br i1 %23, label %24, label %149
24: ; preds = %1
%25 = bitcast %struct.sock_filter* %3 to i8*
%26 = load i64, i64* @BPF_LD
%27 = load i64, i64* @BPF_B
%28 = add nsw i64 %27, %26
%29 = load i64, i64* @BPF_ABS
%30 = add nsw i64 %28, %29
%31 = load i32, i32* @SKF_AD_OFF
%32 = load i32, i32* @SKF_AD_ALU_XOR_X
%33 = add nsw i32 %32, %31
%34 = call i32 @BPF_STMT(i64 %30, i32 %33)
%35 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %3, i64 0, i32 0
store i32 %34, i32* %35
%36 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %3)
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %149
38: ; preds = %24
%39 = bitcast %struct.sock_filter* %4 to i8*
%40 = load i64, i64* @BPF_MISC
%41 = load i64, i64* @BPF_TAX
%42 = add nsw i64 %41, %40
%43 = call i32 @BPF_STMT(i64 %42, i32 0)
%44 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %4, i64 0, i32 0
store i32 %43, i32* %44
%45 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %4)
%46 = icmp eq i32 %45, 0
br i1 %46, label %47, label %149
47: ; preds = %38
%48 = bitcast %struct.sock_filter* %5 to i8*
%49 = load i64, i64* @BPF_LD
%50 = load i64, i64* @BPF_H
%51 = add nsw i64 %50, %49
%52 = load i64, i64* @BPF_ABS
%53 = add nsw i64 %51, %52
%54 = call i32 @BPF_STMT(i64 %53, i32 0)
%55 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %5, i64 0, i32 0
store i32 %54, i32* %55
%56 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %5)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %149
58: ; preds = %47
%59 = bitcast %struct.sock_filter* %6 to i8*
%60 = load i64, i64* @BPF_LD
%61 = load i64, i64* @BPF_B
%62 = add nsw i64 %61, %60
%63 = load i64, i64* @BPF_ABS
%64 = add nsw i64 %62, %63
%65 = load i32, i32* @SKF_AD_OFF
%66 = load i32, i32* @SKF_AD_ALU_XOR_X
%67 = add nsw i32 %66, %65
%68 = call i32 @BPF_STMT(i64 %64, i32 %67)
%69 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %6, i64 0, i32 0
store i32 %68, i32* %69
%70 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %6)
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %149
72: ; preds = %58
%73 = bitcast %struct.sock_filter* %7 to i8*
%74 = load i64, i64* @BPF_MISC
%75 = load i64, i64* @BPF_TAX
%76 = add nsw i64 %75, %74
%77 = call i32 @BPF_STMT(i64 %76, i32 0)
%78 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %7, i64 0, i32 0
store i32 %77, i32* %78
%79 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %7)
%80 = icmp eq i32 %79, 0
br i1 %80, label %81, label %149
81: ; preds = %72
%82 = bitcast %struct.sock_filter* %8 to i8*
%83 = load i64, i64* @BPF_LD
%84 = load i64, i64* @BPF_W
%85 = add nsw i64 %84, %83
%86 = load i64, i64* @BPF_ABS
%87 = add nsw i64 %85, %86
%88 = call i32 @BPF_STMT(i64 %87, i32 8)
%89 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %8, i64 0, i32 0
store i32 %88, i32* %89
%90 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %8)
%91 = icmp eq i32 %90, 0
br i1 %91, label %92, label %149
92: ; preds = %81
%93 = bitcast %struct.sock_filter* %9 to i8*
%94 = load i64, i64* @BPF_LD
%95 = load i64, i64* @BPF_B
%96 = add nsw i64 %95, %94
%97 = load i64, i64* @BPF_ABS
%98 = add nsw i64 %96, %97
%99 = load i32, i32* @SKF_AD_OFF
%100 = load i32, i32* @SKF_AD_ALU_XOR_X
%101 = add nsw i32 %100, %99
%102 = call i32 @BPF_STMT(i64 %98, i32 %101)
%103 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %9, i64 0, i32 0
store i32 %102, i32* %103
%104 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %9)
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %149
106: ; preds = %92
%107 = bitcast %struct.sock_filter* %10 to i8*
%108 = load i64, i64* @BPF_MISC
%109 = load i64, i64* @BPF_TAX
%110 = add nsw i64 %109, %108
%111 = call i32 @BPF_STMT(i64 %110, i32 0)
%112 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %10, i64 0, i32 0
store i32 %111, i32* %112
%113 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %10)
%114 = icmp eq i32 %113, 0
br i1 %114, label %115, label %149
115: ; preds = %106
%116 = bitcast %struct.sock_filter* %11 to i8*
%117 = load i64, i64* @BPF_LD
%118 = load i64, i64* @BPF_H
%119 = add nsw i64 %118, %117
%120 = load i64, i64* @BPF_ABS
%121 = add nsw i64 %119, %120
%122 = call i32 @BPF_STMT(i64 %121, i32 6)
%123 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %11, i64 0, i32 0
store i32 %122, i32* %123
%124 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %11)
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %149
126: ; preds = %115
%127 = bitcast %struct.sock_filter* %12 to i8*
%128 = load i64, i64* @BPF_LD
%129 = load i64, i64* @BPF_B
%130 = add nsw i64 %129, %128
%131 = load i64, i64* @BPF_ABS
%132 = add nsw i64 %130, %131
%133 = load i32, i32* @SKF_AD_OFF
%134 = load i32, i32* @SKF_AD_ALU_XOR_X
%135 = add nsw i32 %134, %133
%136 = call i32 @BPF_STMT(i64 %132, i32 %135)
%137 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %12, i64 0, i32 0
store i32 %136, i32* %137
%138 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %12)
%139 = icmp eq i32 %138, 0
br i1 %139, label %140, label %149
140: ; preds = %126
%141 = bitcast %struct.sock_filter* %13 to i8*
%142 = load i64, i64* @BPF_MISC
%143 = load i64, i64* @BPF_TAX
%144 = add nsw i64 %143, %142
%145 = call i32 @BPF_STMT(i64 %144, i32 0)
%146 = getelementptr inbounds %struct.sock_filter, %struct.sock_filter* %13, i64 0, i32 0
store i32 %145, i32* %146
%147 = call i32 @__add_inst(%struct.sock_fprog* %0, %struct.sock_filter* %13)
%148 = icmp eq i32 %147, 0
br i1 %148, label %151, label %149
149: ; preds = %140, %126, %115, %106, %92, %81, %72, %58, %47, %38, %24, %1
%150 = phi i32 [ %22, %1 ], [ %36, %24 ], [ %45, %38 ], [ %56, %47 ], [ %70, %58 ], [ %79, %72 ], [ %90, %81 ], [ %104, %92 ], [ %113, %106 ], [ %124, %115 ], [ %138, %126 ], [ %147, %140 ]
br label %151
151: ; preds = %140, %149
%152 = phi i32 [ %150, %149 ], [ 0, %140 ]
ret i32 %152
}