#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 TS_resp_ctx {
  int dummy;
};
typedef int /*<<< orphan*/ X509_EXTENSION;

/* Variables and functions */
int /*<<< orphan*/ TS_INFO_UNACCEPTED_EXTENSION;
int /*<<< orphan*/ TS_RESP_CTX_add_failure_info(struct TS_resp_ctx *,
                                                int /*<<< orphan*/);
int /*<<< orphan*/ TS_RESP_CTX_set_status_info(struct TS_resp_ctx *,
                                               int /*<<< orphan*/, char *);
int /*<<< orphan*/ TS_STATUS_REJECTION;
int def_extension_cb(struct TS_resp_ctx *ctx, X509_EXTENSION *ext, void *data) {
  TS_RESP_CTX_set_status_info(ctx, TS_STATUS_REJECTION,
                              "Unsupported extension.");
  TS_RESP_CTX_add_failure_info(ctx, TS_INFO_UNACCEPTED_EXTENSION);
  return 0;
}


x86 assembly (clang, -O0):
<def_extension_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdx
call   1030 <TS_RESP_CTX_set_status_info@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%esi
call   1040 <TS_RESP_CTX_add_failure_info@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_extension_cb>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ead(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdx
call   1030 <TS_RESP_CTX_set_status_info@plt>
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <TS_RESP_CTX_add_failure_info@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TS_resp_ctx = type { i32 }
@TS_STATUS_REJECTION = global i32 0
@.str = [23 x i8] c"Unsupported extension.\00"
@TS_INFO_UNACCEPTED_EXTENSION = global i32 0
define i32 @def_extension_cb(%struct.TS_resp_ctx* %0, i32* %1, i8* %2) {
%4 = alloca %struct.TS_resp_ctx*
%5 = alloca i32*
%6 = alloca i8*
store %struct.TS_resp_ctx* %0, %struct.TS_resp_ctx** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load %struct.TS_resp_ctx*, %struct.TS_resp_ctx** %4
%8 = load i32, i32* @TS_STATUS_REJECTION
%9 = call i32 @TS_RESP_CTX_set_status_info(%struct.TS_resp_ctx* %7, i32 %8, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%10 = load %struct.TS_resp_ctx*, %struct.TS_resp_ctx** %4
%11 = load i32, i32* @TS_INFO_UNACCEPTED_EXTENSION
%12 = call i32 @TS_RESP_CTX_add_failure_info(%struct.TS_resp_ctx* %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
%struct.TS_resp_ctx = type { i32 }
@TS_STATUS_REJECTION = global i32 0
@.str = [23 x i8] c"Unsupported extension.\00"
@TS_INFO_UNACCEPTED_EXTENSION = global i32 0
define i32 @def_extension_cb(%struct.TS_resp_ctx* %0, i32* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @TS_STATUS_REJECTION
%5 = tail call i32 @TS_RESP_CTX_set_status_info(%struct.TS_resp_ctx* %0, i32 %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @TS_INFO_UNACCEPTED_EXTENSION
%7 = tail call i32 @TS_RESP_CTX_add_failure_info(%struct.TS_resp_ctx* %0, i32 %6)
ret i32 0
}