#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 */
long __builtin_get_texasr();
long __builtin_get_texasru();
long __builtin_get_tfhar();
long __builtin_get_tfiar();
int /*<<< orphan*/ __builtin_set_texasr(long);
int /*<<< orphan*/ __builtin_set_texasru(long);
int /*<<< orphan*/ __builtin_set_tfhar(long);
int /*<<< orphan*/ __builtin_set_tfiar(long);
long __builtin_tabort(char);
long __builtin_tabortdc(int, long, long);
long __builtin_tabortdci(int, long, int);
long __builtin_tabortwc(int, long, long);
long __builtin_tabortwci(int, long, int);
long __builtin_tbegin(int /*<<< orphan*/);
long __builtin_tcheck(int);
long __builtin_tend(int /*<<< orphan*/);
long __builtin_tendall();
long __builtin_trechkpt();
long __builtin_treclaim(int /*<<< orphan*/);
long __builtin_tresume();
long __builtin_tsr(int /*<<< orphan*/);
long __builtin_tsuspend();
long __builtin_ttest();
void use_builtins(long *p, char code, long *a, long *b) {
  p[0] = __builtin_tbegin(0);
  p[1] = __builtin_tend(0);
  p[2] = __builtin_tendall();
  p[3] = __builtin_tabort(0);
  p[4] = __builtin_tabort(code);
  p[5] = __builtin_tabortdc(0xf, a[5], b[5]);
  p[6] = __builtin_tabortdci(0xf, a[6], 13);
  p[7] = __builtin_tabortwc(0xf, a[7], b[7]);
  p[8] = __builtin_tabortwci(0xf, a[8], 13);
  p[9] = __builtin_tcheck(5);
  p[10] = __builtin_trechkpt();
  p[11] = __builtin_treclaim(0);
  p[12] = __builtin_tresume();
  p[13] = __builtin_tsuspend();
  p[14] = __builtin_tsr(0);
  p[15] = __builtin_ttest();
  p[16] = __builtin_get_texasr();
  p[17] = __builtin_get_texasru();
  p[18] = __builtin_get_tfhar();
  p[19] = __builtin_get_tfiar();
  __builtin_set_texasr(a[20]);
  __builtin_set_texasru(a[21]);
  __builtin_set_tfhar(a[22]);
  __builtin_set_tfiar(a[23]);
}


x86 assembly (clang, -O0):
<use_builtins>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %edi,%edi
call   10c0 <__builtin_tbegin@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
xor    %edi,%edi
call   1100 <__builtin_tend@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    $0x0,%al
call   10b0 <__builtin_tendall@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
xor    %edi,%edi
call   1030 <__builtin_tabort@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
movsbl -0x9(%rbp),%edi
call   1030 <__builtin_tabort@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x20(%rax)
mov    -0x18(%rbp),%rax
mov    0x28(%rax),%rsi
mov    -0x20(%rbp),%rax
mov    0x28(%rax),%rdx
mov    $0xf,%edi
call   1060 <__builtin_tabortdc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x28(%rax)
mov    -0x18(%rbp),%rax
mov    0x30(%rax),%rsi
mov    $0xf,%edi
mov    $0xd,%edx
call   1160 <__builtin_tabortdci@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x30(%rax)
mov    -0x18(%rbp),%rax
mov    0x38(%rax),%rsi
mov    -0x20(%rbp),%rax
mov    0x38(%rax),%rdx
mov    $0xf,%edi
call   1080 <__builtin_tabortwc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x38(%rax)
mov    -0x18(%rbp),%rax
mov    0x40(%rax),%rsi
mov    $0xf,%edi
mov    $0xd,%edx
call   1130 <__builtin_tabortwci@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x40(%rax)
mov    $0x5,%edi
call   1140 <__builtin_tcheck@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x48(%rax)
mov    $0x0,%al
call   10a0 <__builtin_trechkpt@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x50(%rax)
xor    %edi,%edi
call   1120 <__builtin_treclaim@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x58(%rax)
mov    $0x0,%al
call   1090 <__builtin_tresume@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x60(%rax)
mov    $0x0,%al
call   1190 <__builtin_tsuspend@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x68(%rax)
xor    %edi,%edi
call   1180 <__builtin_tsr@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x70(%rax)
mov    $0x0,%al
call   1050 <__builtin_ttest@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x78(%rax)
mov    $0x0,%al
call   1150 <__builtin_get_texasr@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x80(%rax)
mov    $0x0,%al
call   1070 <__builtin_get_texasru@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x88(%rax)
mov    $0x0,%al
call   1110 <__builtin_get_tfhar@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x90(%rax)
mov    $0x0,%al
call   10e0 <__builtin_get_tfiar@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x98(%rax)
mov    -0x18(%rbp),%rax
mov    0xa0(%rax),%rdi
call   10d0 <__builtin_set_texasr@plt>
mov    -0x18(%rbp),%rax
mov    0xa8(%rax),%rdi
call   1040 <__builtin_set_texasru@plt>
mov    -0x18(%rbp),%rax
mov    0xb0(%rax),%rdi
call   10f0 <__builtin_set_tfhar@plt>
mov    -0x18(%rbp),%rax
mov    0xb8(%rax),%rdi
call   1170 <__builtin_set_tfiar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_builtins>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r15
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   10c0 <__builtin_tbegin@plt>
mov    %rax,(%rbx)
xor    %edi,%edi
call   1100 <__builtin_tend@plt>
mov    %rax,0x8(%rbx)
xor    %eax,%eax
call   10b0 <__builtin_tendall@plt>
mov    %rax,0x10(%rbx)
xor    %edi,%edi
call   1030 <__builtin_tabort@plt>
mov    %rax,0x18(%rbx)
mov    %ebp,%edi
call   1030 <__builtin_tabort@plt>
mov    %rax,0x20(%rbx)
mov    0x28(%r14),%rsi
mov    0x28(%r15),%rdx
mov    $0xf,%edi
call   1060 <__builtin_tabortdc@plt>
mov    %rax,0x28(%rbx)
mov    0x30(%r14),%rsi
mov    $0xf,%edi
mov    $0xd,%edx
call   1160 <__builtin_tabortdci@plt>
mov    %rax,0x30(%rbx)
mov    0x38(%r14),%rsi
mov    0x38(%r15),%rdx
mov    $0xf,%edi
call   1080 <__builtin_tabortwc@plt>
mov    %rax,0x38(%rbx)
mov    0x40(%r14),%rsi
mov    $0xf,%edi
mov    $0xd,%edx
call   1130 <__builtin_tabortwci@plt>
mov    %rax,0x40(%rbx)
mov    $0x5,%edi
call   1140 <__builtin_tcheck@plt>
mov    %rax,0x48(%rbx)
xor    %eax,%eax
call   10a0 <__builtin_trechkpt@plt>
mov    %rax,0x50(%rbx)
xor    %edi,%edi
call   1120 <__builtin_treclaim@plt>
mov    %rax,0x58(%rbx)
xor    %eax,%eax
call   1090 <__builtin_tresume@plt>
mov    %rax,0x60(%rbx)
xor    %eax,%eax
call   1190 <__builtin_tsuspend@plt>
mov    %rax,0x68(%rbx)
xor    %edi,%edi
call   1180 <__builtin_tsr@plt>
mov    %rax,0x70(%rbx)
xor    %eax,%eax
call   1050 <__builtin_ttest@plt>
mov    %rax,0x78(%rbx)
xor    %eax,%eax
call   1150 <__builtin_get_texasr@plt>
mov    %rax,0x80(%rbx)
xor    %eax,%eax
call   1070 <__builtin_get_texasru@plt>
mov    %rax,0x88(%rbx)
xor    %eax,%eax
call   1110 <__builtin_get_tfhar@plt>
mov    %rax,0x90(%rbx)
xor    %eax,%eax
call   10e0 <__builtin_get_tfiar@plt>
mov    %rax,0x98(%rbx)
mov    0xa0(%r14),%rdi
call   10d0 <__builtin_set_texasr@plt>
mov    0xa8(%r14),%rdi
call   1040 <__builtin_set_texasru@plt>
mov    0xb0(%r14),%rdi
call   10f0 <__builtin_set_tfhar@plt>
mov    0xb8(%r14),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1170 <__builtin_set_tfiar@plt>

LLVM IR (-O0):
define void @use_builtins(i64* %0, i8 signext %1, i64* %2, i64* %3) {
%5 = alloca i64*
%6 = alloca i8
%7 = alloca i64*
%8 = alloca i64*
store i64* %0, i64** %5
store i8 %1, i8* %6
store i64* %2, i64** %7
store i64* %3, i64** %8
%9 = call i64 @__builtin_tbegin(i32 0)
%10 = load i64*, i64** %5
%11 = getelementptr inbounds i64, i64* %10, i64 0
store i64 %9, i64* %11
%12 = call i64 @__builtin_tend(i32 0)
%13 = load i64*, i64** %5
%14 = getelementptr inbounds i64, i64* %13, i64 1
store i64 %12, i64* %14
%15 = call i64 (...) @__builtin_tendall()
%16 = load i64*, i64** %5
%17 = getelementptr inbounds i64, i64* %16, i64 2
store i64 %15, i64* %17
%18 = call i64 @__builtin_tabort(i8 signext 0)
%19 = load i64*, i64** %5
%20 = getelementptr inbounds i64, i64* %19, i64 3
store i64 %18, i64* %20
%21 = load i8, i8* %6
%22 = call i64 @__builtin_tabort(i8 signext %21)
%23 = load i64*, i64** %5
%24 = getelementptr inbounds i64, i64* %23, i64 4
store i64 %22, i64* %24
%25 = load i64*, i64** %7
%26 = getelementptr inbounds i64, i64* %25, i64 5
%27 = load i64, i64* %26
%28 = load i64*, i64** %8
%29 = getelementptr inbounds i64, i64* %28, i64 5
%30 = load i64, i64* %29
%31 = call i64 @__builtin_tabortdc(i32 15, i64 %27, i64 %30)
%32 = load i64*, i64** %5
%33 = getelementptr inbounds i64, i64* %32, i64 5
store i64 %31, i64* %33
%34 = load i64*, i64** %7
%35 = getelementptr inbounds i64, i64* %34, i64 6
%36 = load i64, i64* %35
%37 = call i64 @__builtin_tabortdci(i32 15, i64 %36, i32 13)
%38 = load i64*, i64** %5
%39 = getelementptr inbounds i64, i64* %38, i64 6
store i64 %37, i64* %39
%40 = load i64*, i64** %7
%41 = getelementptr inbounds i64, i64* %40, i64 7
%42 = load i64, i64* %41
%43 = load i64*, i64** %8
%44 = getelementptr inbounds i64, i64* %43, i64 7
%45 = load i64, i64* %44
%46 = call i64 @__builtin_tabortwc(i32 15, i64 %42, i64 %45)
%47 = load i64*, i64** %5
%48 = getelementptr inbounds i64, i64* %47, i64 7
store i64 %46, i64* %48
%49 = load i64*, i64** %7
%50 = getelementptr inbounds i64, i64* %49, i64 8
%51 = load i64, i64* %50
%52 = call i64 @__builtin_tabortwci(i32 15, i64 %51, i32 13)
%53 = load i64*, i64** %5
%54 = getelementptr inbounds i64, i64* %53, i64 8
store i64 %52, i64* %54
%55 = call i64 @__builtin_tcheck(i32 5)
%56 = load i64*, i64** %5
%57 = getelementptr inbounds i64, i64* %56, i64 9
store i64 %55, i64* %57
%58 = call i64 (...) @__builtin_trechkpt()
%59 = load i64*, i64** %5
%60 = getelementptr inbounds i64, i64* %59, i64 10
store i64 %58, i64* %60
%61 = call i64 @__builtin_treclaim(i32 0)
%62 = load i64*, i64** %5
%63 = getelementptr inbounds i64, i64* %62, i64 11
store i64 %61, i64* %63
%64 = call i64 (...) @__builtin_tresume()
%65 = load i64*, i64** %5
%66 = getelementptr inbounds i64, i64* %65, i64 12
store i64 %64, i64* %66
%67 = call i64 (...) @__builtin_tsuspend()
%68 = load i64*, i64** %5
%69 = getelementptr inbounds i64, i64* %68, i64 13
store i64 %67, i64* %69
%70 = call i64 @__builtin_tsr(i32 0)
%71 = load i64*, i64** %5
%72 = getelementptr inbounds i64, i64* %71, i64 14
store i64 %70, i64* %72
%73 = call i64 (...) @__builtin_ttest()
%74 = load i64*, i64** %5
%75 = getelementptr inbounds i64, i64* %74, i64 15
store i64 %73, i64* %75
%76 = call i64 (...) @__builtin_get_texasr()
%77 = load i64*, i64** %5
%78 = getelementptr inbounds i64, i64* %77, i64 16
store i64 %76, i64* %78
%79 = call i64 (...) @__builtin_get_texasru()
%80 = load i64*, i64** %5
%81 = getelementptr inbounds i64, i64* %80, i64 17
store i64 %79, i64* %81
%82 = call i64 (...) @__builtin_get_tfhar()
%83 = load i64*, i64** %5
%84 = getelementptr inbounds i64, i64* %83, i64 18
store i64 %82, i64* %84
%85 = call i64 (...) @__builtin_get_tfiar()
%86 = load i64*, i64** %5
%87 = getelementptr inbounds i64, i64* %86, i64 19
store i64 %85, i64* %87
%88 = load i64*, i64** %7
%89 = getelementptr inbounds i64, i64* %88, i64 20
%90 = load i64, i64* %89
%91 = call i32 @__builtin_set_texasr(i64 %90)
%92 = load i64*, i64** %7
%93 = getelementptr inbounds i64, i64* %92, i64 21
%94 = load i64, i64* %93
%95 = call i32 @__builtin_set_texasru(i64 %94)
%96 = load i64*, i64** %7
%97 = getelementptr inbounds i64, i64* %96, i64 22
%98 = load i64, i64* %97
%99 = call i32 @__builtin_set_tfhar(i64 %98)
%100 = load i64*, i64** %7
%101 = getelementptr inbounds i64, i64* %100, i64 23
%102 = load i64, i64* %101
%103 = call i32 @__builtin_set_tfiar(i64 %102)
ret void
}

LLVM IR (-O2):
define void @use_builtins(i64* nocapture writeonly %0, i8 signext %1, i64* nocapture %2, i64* nocapture %3) {
%5 = tail call i64 @__builtin_tbegin(i32 0)
store i64 %5, i64* %0
%6 = tail call i64 @__builtin_tend(i32 0)
%7 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %6, i64* %7
%8 = tail call i64 (...) @__builtin_tendall()
%9 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %8, i64* %9
%10 = tail call i64 @__builtin_tabort(i8 signext 0)
%11 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %10, i64* %11
%12 = tail call i64 @__builtin_tabort(i8 signext %1)
%13 = getelementptr inbounds i64, i64* %0, i64 4
store i64 %12, i64* %13
%14 = getelementptr inbounds i64, i64* %2, i64 5
%15 = load i64, i64* %14
%16 = getelementptr inbounds i64, i64* %3, i64 5
%17 = load i64, i64* %16
%18 = tail call i64 @__builtin_tabortdc(i32 15, i64 %15, i64 %17)
%19 = getelementptr inbounds i64, i64* %0, i64 5
store i64 %18, i64* %19
%20 = getelementptr inbounds i64, i64* %2, i64 6
%21 = load i64, i64* %20
%22 = tail call i64 @__builtin_tabortdci(i32 15, i64 %21, i32 13)
%23 = getelementptr inbounds i64, i64* %0, i64 6
store i64 %22, i64* %23
%24 = getelementptr inbounds i64, i64* %2, i64 7
%25 = load i64, i64* %24
%26 = getelementptr inbounds i64, i64* %3, i64 7
%27 = load i64, i64* %26
%28 = tail call i64 @__builtin_tabortwc(i32 15, i64 %25, i64 %27)
%29 = getelementptr inbounds i64, i64* %0, i64 7
store i64 %28, i64* %29
%30 = getelementptr inbounds i64, i64* %2, i64 8
%31 = load i64, i64* %30
%32 = tail call i64 @__builtin_tabortwci(i32 15, i64 %31, i32 13)
%33 = getelementptr inbounds i64, i64* %0, i64 8
store i64 %32, i64* %33
%34 = tail call i64 @__builtin_tcheck(i32 5)
%35 = getelementptr inbounds i64, i64* %0, i64 9
store i64 %34, i64* %35
%36 = tail call i64 (...) @__builtin_trechkpt()
%37 = getelementptr inbounds i64, i64* %0, i64 10
store i64 %36, i64* %37
%38 = tail call i64 @__builtin_treclaim(i32 0)
%39 = getelementptr inbounds i64, i64* %0, i64 11
store i64 %38, i64* %39
%40 = tail call i64 (...) @__builtin_tresume()
%41 = getelementptr inbounds i64, i64* %0, i64 12
store i64 %40, i64* %41
%42 = tail call i64 (...) @__builtin_tsuspend()
%43 = getelementptr inbounds i64, i64* %0, i64 13
store i64 %42, i64* %43
%44 = tail call i64 @__builtin_tsr(i32 0)
%45 = getelementptr inbounds i64, i64* %0, i64 14
store i64 %44, i64* %45
%46 = tail call i64 (...) @__builtin_ttest()
%47 = getelementptr inbounds i64, i64* %0, i64 15
store i64 %46, i64* %47
%48 = tail call i64 (...) @__builtin_get_texasr()
%49 = getelementptr inbounds i64, i64* %0, i64 16
store i64 %48, i64* %49
%50 = tail call i64 (...) @__builtin_get_texasru()
%51 = getelementptr inbounds i64, i64* %0, i64 17
store i64 %50, i64* %51
%52 = tail call i64 (...) @__builtin_get_tfhar()
%53 = getelementptr inbounds i64, i64* %0, i64 18
store i64 %52, i64* %53
%54 = tail call i64 (...) @__builtin_get_tfiar()
%55 = getelementptr inbounds i64, i64* %0, i64 19
store i64 %54, i64* %55
%56 = getelementptr inbounds i64, i64* %2, i64 20
%57 = load i64, i64* %56
%58 = tail call i32 @__builtin_set_texasr(i64 %57)
%59 = getelementptr inbounds i64, i64* %2, i64 21
%60 = load i64, i64* %59
%61 = tail call i32 @__builtin_set_texasru(i64 %60)
%62 = getelementptr inbounds i64, i64* %2, i64 22
%63 = load i64, i64* %62
%64 = tail call i32 @__builtin_set_tfhar(i64 %63)
%65 = getelementptr inbounds i64, i64* %2, i64 23
%66 = load i64, i64* %65
%67 = tail call i32 @__builtin_set_tfiar(i64 %66)
ret void
}