#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*/ TS_TST_INFO;
typedef int /*<<< orphan*/ TS_RESP;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_printf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ TS_RESP_get_status_info(int /*<<< orphan*/ *);
int /*<<< orphan*/ *TS_RESP_get_tst_info(int /*<<< orphan*/ *);
int /*<<< orphan*/ TS_STATUS_INFO_print_bio(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/);
int /*<<< orphan*/ TS_TST_INFO_print_bio(int /*<<< orphan*/ *,
                                         int /*<<< orphan*/ *);
int TS_RESP_print_bio(BIO *bio, TS_RESP *a) {
  TS_TST_INFO *tst_info;
  BIO_printf(bio, "Status info:\n");
  TS_STATUS_INFO_print_bio(bio, TS_RESP_get_status_info(a));
  BIO_printf(bio, "\nTST info:\n");
  tst_info = TS_RESP_get_tst_info(a);
  if (tst_info != NULL)
    TS_TST_INFO_print_bio(bio, TS_RESP_get_tst_info(a));
  else
    BIO_printf(bio, "Not included.\n");
  return 1;
}


x86 assembly (clang, -O0):
<TS_RESP_print_bio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1040 <BIO_printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <TS_RESP_get_status_info@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1050 <TS_STATUS_INFO_print_bio@plt>
mov    -0x8(%rbp),%rdi
lea    0xe77(%rip),%rsi
call   1040 <BIO_printf@plt>
mov    -0x10(%rbp),%rdi
call   1070 <TS_RESP_get_tst_info@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     11d6 <TS_RESP_print_bio+0x86>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <TS_RESP_get_tst_info@plt>
mov    -0x28(%rbp),%rdi
mov    %rax,%rsi
call   1060 <TS_TST_INFO_print_bio@plt>
jmp    11e6 <TS_RESP_print_bio+0x96>
mov    -0x8(%rbp),%rdi
lea    0xe39(%rip),%rsi
call   1040 <BIO_printf@plt>
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TS_RESP_print_bio>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xe9f(%rip),%rsi
call   1040 <BIO_printf@plt>
mov    %r14,%rdi
call   1030 <TS_RESP_get_status_info@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <TS_STATUS_INFO_print_bio@plt>
lea    0xe8f(%rip),%rsi
mov    %rbx,%rdi
call   1040 <BIO_printf@plt>
mov    %r14,%rdi
call   1070 <TS_RESP_get_tst_info@plt>
test   %rax,%rax
je     11a9 <TS_RESP_print_bio+0x59>
mov    %r14,%rdi
call   1070 <TS_RESP_get_tst_info@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1060 <TS_TST_INFO_print_bio@plt>
jmp    11b8 <TS_RESP_print_bio+0x68>
lea    0xe6a(%rip),%rsi
mov    %rbx,%rdi
call   1040 <BIO_printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Status info:\0A\00"
@.str.1 = [12 x i8] c"\0ATST info:\0A\00"
@.str.2 = [15 x i8] c"Not included.\0A\00"
define i32 @TS_RESP_print_bio(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = call i32 @BIO_printf(i32* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @TS_RESP_get_status_info(i32* %9)
%11 = call i32 @TS_STATUS_INFO_print_bio(i32* %8, i32 %10)
%12 = load i32*, i32** %3
%13 = call i32 @BIO_printf(i32* %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32*, i32** %4
%15 = call i32* @TS_RESP_get_tst_info(i32* %14)
store i32* %15, i32** %5
%16 = load i32*, i32** %5
%17 = icmp ne i32* %16, null
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = load i32*, i32** %3
%20 = load i32*, i32** %4
%21 = call i32* @TS_RESP_get_tst_info(i32* %20)
%22 = call i32 @TS_TST_INFO_print_bio(i32* %19, i32* %21)
br label %26
23: ; preds = %2
%24 = load i32*, i32** %3
%25 = call i32 @BIO_printf(i32* %24, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %26
26: ; preds = %23, %18
ret i32 1
}

LLVM IR (-O2):
@.str = [14 x i8] c"Status info:\0A\00"
@.str.1 = [12 x i8] c"\0ATST info:\0A\00"
@.str.2 = [15 x i8] c"Not included.\0A\00"
define i32 @TS_RESP_print_bio(i32* %0, i32* %1) {
%3 = tail call i32 @BIO_printf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @TS_RESP_get_status_info(i32* %1)
%5 = tail call i32 @TS_STATUS_INFO_print_bio(i32* %0, i32 %4)
%6 = tail call i32 @BIO_printf(i32* %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32* @TS_RESP_get_tst_info(i32* %1)
%8 = icmp eq i32* %7, null
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = tail call i32* @TS_RESP_get_tst_info(i32* %1)
%11 = tail call i32 @TS_TST_INFO_print_bio(i32* %0, i32* %10)
br label %14
12: ; preds = %2
%13 = tail call i32 @BIO_printf(i32* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %9
ret i32 1
}