#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 */
typedef int /*<<< orphan*/ types;
typedef int /*<<< orphan*/ strs;
typedef int __u32;

/* Variables and functions */
int BTF_INT_SIGNED;
int BTF_KIND_INT;
int BTF_KIND_STRUCT;
int BTF_MAX_VLEN;
int libbpf__load_raw_btf(char *, int, char const *, int);
int load_sk_storage_btf(void) {
  const char strs[] = "\0bpf_spin_lock\0val\0cnt\0l";
  __u32 types[] = {
      (0),
      (((!!(0) << 31) | ((BTF_KIND_INT) << 24) | ((0) & BTF_MAX_VLEN))),
      (4),
      ((BTF_INT_SIGNED) << 24 | (0) << 16 | (32)),
      (1),
      (((!!(0) << 31) | ((BTF_KIND_STRUCT) << 24) | ((1) & BTF_MAX_VLEN))),
      (4),
      (15),
      (1),
      (0),
      (15),
      (((!!(0) << 31) | ((BTF_KIND_STRUCT) << 24) | ((2) & BTF_MAX_VLEN))),
      (8),
      (19),
      (1),
      (0),
      (23),
      (2),
      (32),
  };
  return libbpf__load_raw_btf((char *)types, sizeof(types), strs, sizeof(strs));
}


x86 assembly (clang, -O0):
<load_sk_storage_btf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed9(%rip),%al
mov    %al,-0x8(%rbp)
movl   $0x0,-0x70(%rbp)
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
shl    $0x18,%eax
or     $0x0,%eax
mov    0x2e61(%rip),%rcx
mov    (%rcx),%ecx
and    $0x0,%ecx
or     %ecx,%eax
mov    %eax,-0x6c(%rbp)
movl   $0x4,-0x68(%rbp)
mov    0x2e81(%rip),%rax
mov    (%rax),%eax
shl    $0x18,%eax
or     $0x0,%eax
or     $0x20,%eax
mov    %eax,-0x64(%rbp)
movl   $0x1,-0x60(%rbp)
mov    0x2e3d(%rip),%rax
mov    (%rax),%eax
shl    $0x18,%eax
or     $0x0,%eax
mov    0x2e1e(%rip),%rcx
mov    (%rcx),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x5c(%rbp)
movl   $0x4,-0x58(%rbp)
movl   $0xf,-0x54(%rbp)
movl   $0x1,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0xf,-0x48(%rbp)
mov    0x2dfa(%rip),%rax
mov    (%rax),%eax
shl    $0x18,%eax
or     $0x0,%eax
mov    0x2ddb(%rip),%rcx
mov    (%rcx),%ecx
and    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x44(%rbp)
movl   $0x8,-0x40(%rbp)
movl   $0x13,-0x3c(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x17,-0x30(%rbp)
movl   $0x2,-0x2c(%rbp)
movl   $0x20,-0x28(%rbp)
lea    -0x70(%rbp),%rdi
lea    -0x20(%rbp),%rdx
mov    $0x4c,%esi
mov    $0x19,%ecx
call   1030 <libbpf__load_raw_btf@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_sk_storage_btf>:
sub    $0x78,%rsp
movups 0xf0e(%rip),%xmm0
movups %xmm0,0x59(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movl   $0x0,(%rsp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    %eax,0x4(%rsp)
movl   $0x4,0x8(%rsp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
shl    $0x18,%eax
or     $0x20,%eax
mov    %eax,0xc(%rsp)
movl   $0x1,0x10(%rsp)
mov    0x2e63(%rip),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    0x2e47(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,%edx
and    $0x1,%edx
or     %eax,%edx
mov    %edx,0x14(%rsp)
movaps 0xe73(%rip),%xmm0
movups %xmm0,0x18(%rsp)
movl   $0xf,0x28(%rsp)
and    $0x2,%ecx
or     %eax,%ecx
mov    %ecx,0x2c(%rsp)
movaps 0xe66(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movabs $0x200000017,%rax
mov    %rax,0x40(%rsp)
movl   $0x20,0x48(%rsp)
mov    %rsp,%rdi
lea    0x50(%rsp),%rdx
mov    $0x4c,%esi
mov    $0x19,%ecx
call   1030 <libbpf__load_raw_btf@plt>
add    $0x78,%rsp
ret

LLVM IR (-O0):
@__const.load_sk_storage_btf.strs = [25 x i8] c"\00bpf_spin_lock\00val\00cnt\00l\00"
@BTF_KIND_INT = global i32 0
@BTF_MAX_VLEN = global i32 0
@BTF_INT_SIGNED = global i32 0
@BTF_KIND_STRUCT = global i32 0
define i32 @load_sk_storage_btf() {
%1 = alloca [25 x i8]
%2 = alloca [19 x i32]
%3 = bitcast [25 x i8]* %1 to i8*
%4 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 0
store i32 0, i32* %4
%5 = getelementptr inbounds i32, i32* %4, i64 1
%6 = load i32, i32* @BTF_KIND_INT
%7 = shl i32 %6, 24
%8 = or i32 0, %7
%9 = load i32, i32* @BTF_MAX_VLEN
%10 = and i32 0, %9
%11 = or i32 %8, %10
store i32 %11, i32* %5
%12 = getelementptr inbounds i32, i32* %5, i64 1
store i32 4, i32* %12
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* @BTF_INT_SIGNED
%15 = shl i32 %14, 24
%16 = or i32 %15, 0
%17 = or i32 %16, 32
store i32 %17, i32* %13
%18 = getelementptr inbounds i32, i32* %13, i64 1
store i32 1, i32* %18
%19 = getelementptr inbounds i32, i32* %18, i64 1
%20 = load i32, i32* @BTF_KIND_STRUCT
%21 = shl i32 %20, 24
%22 = or i32 0, %21
%23 = load i32, i32* @BTF_MAX_VLEN
%24 = and i32 1, %23
%25 = or i32 %22, %24
store i32 %25, i32* %19
%26 = getelementptr inbounds i32, i32* %19, i64 1
store i32 4, i32* %26
%27 = getelementptr inbounds i32, i32* %26, i64 1
store i32 15, i32* %27
%28 = getelementptr inbounds i32, i32* %27, i64 1
store i32 1, i32* %28
%29 = getelementptr inbounds i32, i32* %28, i64 1
store i32 0, i32* %29
%30 = getelementptr inbounds i32, i32* %29, i64 1
store i32 15, i32* %30
%31 = getelementptr inbounds i32, i32* %30, i64 1
%32 = load i32, i32* @BTF_KIND_STRUCT
%33 = shl i32 %32, 24
%34 = or i32 0, %33
%35 = load i32, i32* @BTF_MAX_VLEN
%36 = and i32 2, %35
%37 = or i32 %34, %36
store i32 %37, i32* %31
%38 = getelementptr inbounds i32, i32* %31, i64 1
store i32 8, i32* %38
%39 = getelementptr inbounds i32, i32* %38, i64 1
store i32 19, i32* %39
%40 = getelementptr inbounds i32, i32* %39, i64 1
store i32 1, i32* %40
%41 = getelementptr inbounds i32, i32* %40, i64 1
store i32 0, i32* %41
%42 = getelementptr inbounds i32, i32* %41, i64 1
store i32 23, i32* %42
%43 = getelementptr inbounds i32, i32* %42, i64 1
store i32 2, i32* %43
%44 = getelementptr inbounds i32, i32* %43, i64 1
store i32 32, i32* %44
%45 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 0
%46 = bitcast i32* %45 to i8*
%47 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%48 = call i32 @libbpf__load_raw_btf(i8* %46, i32 76, i8* %47, i32 25)
ret i32 %48
}

LLVM IR (-O2):
@__const.load_sk_storage_btf.strs = [25 x i8] c"\00bpf_spin_lock\00val\00cnt\00l\00"
@BTF_KIND_INT = global i32 0
@BTF_MAX_VLEN = global i32 0
@BTF_INT_SIGNED = global i32 0
@BTF_KIND_STRUCT = global i32 0
define i32 @load_sk_storage_btf() {
%1 = alloca [25 x i8]
%2 = alloca [19 x i32]
%3 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%4 = bitcast [19 x i32]* %2 to i8*
%5 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 0
store i32 0, i32* %5
%6 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 1
%7 = load i32, i32* @BTF_KIND_INT
%8 = shl i32 %7, 24
store i32 %8, i32* %6
%9 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 2
store i32 4, i32* %9
%10 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 3
%11 = load i32, i32* @BTF_INT_SIGNED
%12 = shl i32 %11, 24
%13 = or i32 %12, 32
store i32 %13, i32* %10
%14 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 4
store i32 1, i32* %14
%15 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 5
%16 = load i32, i32* @BTF_KIND_STRUCT
%17 = shl i32 %16, 24
%18 = load i32, i32* @BTF_MAX_VLEN
%19 = and i32 %18, 1
%20 = or i32 %19, %17
store i32 %20, i32* %15
%21 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 6
%22 = bitcast i32* %21 to <4 x i32>*
store <4 x i32> <i32 4, i32 15, i32 1, i32 0>, <4 x i32>* %22
%23 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 10
store i32 15, i32* %23
%24 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 11
%25 = and i32 %18, 2
%26 = or i32 %25, %17
store i32 %26, i32* %24
%27 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 12
%28 = bitcast i32* %27 to <4 x i32>*
store <4 x i32> <i32 8, i32 19, i32 1, i32 0>, <4 x i32>* %28
%29 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 16
store i32 23, i32* %29
%30 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 17
store i32 2, i32* %30
%31 = getelementptr inbounds [19 x i32], [19 x i32]* %2, i64 0, i64 18
store i32 32, i32* %31
%32 = call i32 @libbpf__load_raw_btf(i8* %4, i32 76, i8* %3, i32 25)
ret i32 %32
}