#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 */

/* Variables and functions */
int /*<<< orphan*/ __softboundcets_store_base_shadow_stack(void *,
                                                           int /*<<< orphan*/);
int /*<<< orphan*/ __softboundcets_store_bound_shadow_stack(void *,
                                                            int /*<<< orphan*/);
int /*<<< orphan*/ __softboundcets_store_key_shadow_stack(size_t,
                                                          int /*<<< orphan*/);
int /*<<< orphan*/ __softboundcets_store_lock_shadow_stack(void *,
                                                           int /*<<< orphan*/);
__attribute__((__weak__, __always___)) void
__softboundcets_store_return_metadata(void *base, void *bound, size_t key,
                                      void *lock) {
  __softboundcets_store_base_shadow_stack(base, 0);
  __softboundcets_store_bound_shadow_stack(bound, 0);
  __softboundcets_store_key_shadow_stack(key, 0);
  __softboundcets_store_lock_shadow_stack(lock, 0);
}


x86 assembly (clang, -O0):
<__softboundcets_store_return_metadata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1050 <__softboundcets_store_base_shadow_stack@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <__softboundcets_store_bound_shadow_stack@plt>
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1040 <__softboundcets_store_key_shadow_stack@plt>
mov    -0x20(%rbp),%rdi
xor    %esi,%esi
call   1060 <__softboundcets_store_lock_shadow_stack@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__softboundcets_store_return_metadata>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
xor    %esi,%esi
call   1050 <__softboundcets_store_base_shadow_stack@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <__softboundcets_store_bound_shadow_stack@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <__softboundcets_store_key_shadow_stack@plt>
mov    %r14,%rdi
xor    %esi,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1060 <__softboundcets_store_lock_shadow_stack@plt>

LLVM IR (-O0):
define weak void @__softboundcets_store_return_metadata(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = call i32 @__softboundcets_store_base_shadow_stack(i8* %9, i32 0)
%11 = load i8*, i8** %6
%12 = call i32 @__softboundcets_store_bound_shadow_stack(i8* %11, i32 0)
%13 = load i64, i64* %7
%14 = call i32 @__softboundcets_store_key_shadow_stack(i64 %13, i32 0)
%15 = load i8*, i8** %8
%16 = call i32 @__softboundcets_store_lock_shadow_stack(i8* %15, i32 0)
ret void
}

LLVM IR (-O2):
define weak void @__softboundcets_store_return_metadata(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = tail call i32 @__softboundcets_store_base_shadow_stack(i8* %0, i32 0)
%6 = tail call i32 @__softboundcets_store_bound_shadow_stack(i8* %1, i32 0)
%7 = tail call i32 @__softboundcets_store_key_shadow_stack(i64 %2, i32 0)
%8 = tail call i32 @__softboundcets_store_lock_shadow_stack(i8* %3, i32 0)
ret void
}