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

/* Variables and functions */
int /*<<< orphan*/ tls1_check_chain(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                    int);
void tls1_set_cert_validity(SSL *s) {
  tls1_check_chain(s, NULL, NULL, NULL, 0);
  tls1_check_chain(s, NULL, NULL, NULL, 1);
  tls1_check_chain(s, NULL, NULL, NULL, 2);
  tls1_check_chain(s, NULL, NULL, NULL, 3);
  tls1_check_chain(s, NULL, NULL, NULL, 4);
  tls1_check_chain(s, NULL, NULL, NULL, 5);
}


x86 assembly (clang, -O0):
<tls1_set_cert_validity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <tls1_check_chain@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%r8d
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <tls1_check_chain@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x2,%r8d
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <tls1_check_chain@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x3,%r8d
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <tls1_check_chain@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x4,%r8d
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <tls1_check_chain@plt>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
mov    $0x5,%r8d
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1030 <tls1_check_chain@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tls1_set_cert_validity>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <tls1_check_chain@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1030 <tls1_check_chain@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x2,%r8d
call   1030 <tls1_check_chain@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x3,%r8d
call   1030 <tls1_check_chain@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x4,%r8d
call   1030 <tls1_check_chain@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x5,%r8d
pop    %rbx
jmp    1030 <tls1_check_chain@plt>

LLVM IR (-O0):
define void @tls1_set_cert_validity(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @tls1_check_chain(i32* %3, i32* null, i32* null, i32* null, i32 0)
%5 = load i32*, i32** %2
%6 = call i32 @tls1_check_chain(i32* %5, i32* null, i32* null, i32* null, i32 1)
%7 = load i32*, i32** %2
%8 = call i32 @tls1_check_chain(i32* %7, i32* null, i32* null, i32* null, i32 2)
%9 = load i32*, i32** %2
%10 = call i32 @tls1_check_chain(i32* %9, i32* null, i32* null, i32* null, i32 3)
%11 = load i32*, i32** %2
%12 = call i32 @tls1_check_chain(i32* %11, i32* null, i32* null, i32* null, i32 4)
%13 = load i32*, i32** %2
%14 = call i32 @tls1_check_chain(i32* %13, i32* null, i32* null, i32* null, i32 5)
ret void
}

LLVM IR (-O2):
define void @tls1_set_cert_validity(i32* %0) {
%2 = tail call i32 @tls1_check_chain(i32* %0, i32* null, i32* null, i32* null, i32 0)
%3 = tail call i32 @tls1_check_chain(i32* %0, i32* null, i32* null, i32* null, i32 1)
%4 = tail call i32 @tls1_check_chain(i32* %0, i32* null, i32* null, i32* null, i32 2)
%5 = tail call i32 @tls1_check_chain(i32* %0, i32* null, i32* null, i32* null, i32 3)
%6 = tail call i32 @tls1_check_chain(i32* %0, i32* null, i32* null, i32* null, i32 4)
%7 = tail call i32 @tls1_check_chain(i32* %0, i32* null, i32* null, i32* null, i32 5)
ret void
}