#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_tabortwc(int, long, long);
long __builtin_tabortwci(int, long, int);
long __builtin_tbegin(int /*<<< orphan*/);
long __builtin_tcheck();
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[7] = __builtin_tabortwc(0xf, a[7], b[7]);
  p[8] = __builtin_tabortwci(0xf, a[8], 13);
  p[9] = __builtin_tcheck();
  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   10b0 <__builtin_tbegin@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
xor    %edi,%edi
call   10f0 <__builtin_tend@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    $0x0,%al
call   10a0 <__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    0x38(%rax),%rsi
mov    -0x20(%rbp),%rax
mov    0x38(%rax),%rdx
mov    $0xf,%edi
call   1070 <__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   1120 <__builtin_tabortwci@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x40(%rax)
mov    $0x0,%al
call   1130 <__builtin_tcheck@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x48(%rax)
mov    $0x0,%al
call   1090 <__builtin_trechkpt@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x50(%rax)
xor    %edi,%edi
call   1110 <__builtin_treclaim@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x58(%rax)
mov    $0x0,%al
call   1080 <__builtin_tresume@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x60(%rax)
mov    $0x0,%al
call   1170 <__builtin_tsuspend@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x68(%rax)
xor    %edi,%edi
call   1160 <__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   1140 <__builtin_get_texasr@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x80(%rax)
mov    $0x0,%al
call   1060 <__builtin_get_texasru@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x88(%rax)
mov    $0x0,%al
call   1100 <__builtin_get_tfhar@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x90(%rax)
mov    $0x0,%al
call   10d0 <__builtin_get_tfiar@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x98(%rax)
mov    -0x18(%rbp),%rax
mov    0xa0(%rax),%rdi
call   10c0 <__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   10e0 <__builtin_set_tfhar@plt>
mov    -0x18(%rbp),%rax
mov    0xb8(%rax),%rdi
call   1150 <__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   10b0 <__builtin_tbegin@plt>
mov    %rax,(%rbx)
xor    %edi,%edi
call   10f0 <__builtin_tend@plt>
mov    %rax,0x8(%rbx)
xor    %eax,%eax
call   10a0 <__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    0x38(%r14),%rsi
mov    0x38(%r15),%rdx
mov    $0xf,%edi
call   1070 <__builtin_tabortwc@plt>
mov    %rax,0x38(%rbx)
mov    0x40(%r14),%rsi
mov    $0xf,%edi
mov    $0xd,%edx
call   1120 <__builtin_tabortwci@plt>
mov    %rax,0x40(%rbx)
xor    %eax,%eax
call   1130 <__builtin_tcheck@plt>
mov    %rax,0x48(%rbx)
xor    %eax,%eax
call   1090 <__builtin_trechkpt@plt>
mov    %rax,0x50(%rbx)
xor    %edi,%edi
call   1110 <__builtin_treclaim@plt>
mov    %rax,0x58(%rbx)
xor    %eax,%eax
call   1080 <__builtin_tresume@plt>
mov    %rax,0x60(%rbx)
xor    %eax,%eax
call   1170 <__builtin_tsuspend@plt>
mov    %rax,0x68(%rbx)
xor    %edi,%edi
call   1160 <__builtin_tsr@plt>
mov    %rax,0x70(%rbx)
xor    %eax,%eax
call   1050 <__builtin_ttest@plt>
mov    %rax,0x78(%rbx)
xor    %eax,%eax
call   1140 <__builtin_get_texasr@plt>
mov    %rax,0x80(%rbx)
xor    %eax,%eax
call   1060 <__builtin_get_texasru@plt>
mov    %rax,0x88(%rbx)
xor    %eax,%eax
call   1100 <__builtin_get_tfhar@plt>
mov    %rax,0x90(%rbx)
xor    %eax,%eax
call   10d0 <__builtin_get_tfiar@plt>
mov    %rax,0x98(%rbx)
mov    0xa0(%r14),%rdi
call   10c0 <__builtin_set_texasr@plt>
mov    0xa8(%r14),%rdi
call   1040 <__builtin_set_texasru@plt>
mov    0xb0(%r14),%rdi
call   10e0 <__builtin_set_tfhar@plt>
mov    0xb8(%r14),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1150 <__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 7
%27 = load i64, i64* %26
%28 = load i64*, i64** %8
%29 = getelementptr inbounds i64, i64* %28, i64 7
%30 = load i64, i64* %29
%31 = call i64 @__builtin_tabortwc(i32 15, i64 %27, i64 %30)
%32 = load i64*, i64** %5
%33 = getelementptr inbounds i64, i64* %32, i64 7
store i64 %31, i64* %33
%34 = load i64*, i64** %7
%35 = getelementptr inbounds i64, i64* %34, i64 8
%36 = load i64, i64* %35
%37 = call i64 @__builtin_tabortwci(i32 15, i64 %36, i32 13)
%38 = load i64*, i64** %5
%39 = getelementptr inbounds i64, i64* %38, i64 8
store i64 %37, i64* %39
%40 = call i64 (...) @__builtin_tcheck()
%41 = load i64*, i64** %5
%42 = getelementptr inbounds i64, i64* %41, i64 9
store i64 %40, i64* %42
%43 = call i64 (...) @__builtin_trechkpt()
%44 = load i64*, i64** %5
%45 = getelementptr inbounds i64, i64* %44, i64 10
store i64 %43, i64* %45
%46 = call i64 @__builtin_treclaim(i32 0)
%47 = load i64*, i64** %5
%48 = getelementptr inbounds i64, i64* %47, i64 11
store i64 %46, i64* %48
%49 = call i64 (...) @__builtin_tresume()
%50 = load i64*, i64** %5
%51 = getelementptr inbounds i64, i64* %50, i64 12
store i64 %49, i64* %51
%52 = call i64 (...) @__builtin_tsuspend()
%53 = load i64*, i64** %5
%54 = getelementptr inbounds i64, i64* %53, i64 13
store i64 %52, i64* %54
%55 = call i64 @__builtin_tsr(i32 0)
%56 = load i64*, i64** %5
%57 = getelementptr inbounds i64, i64* %56, i64 14
store i64 %55, i64* %57
%58 = call i64 (...) @__builtin_ttest()
%59 = load i64*, i64** %5
%60 = getelementptr inbounds i64, i64* %59, i64 15
store i64 %58, i64* %60
%61 = call i64 (...) @__builtin_get_texasr()
%62 = load i64*, i64** %5
%63 = getelementptr inbounds i64, i64* %62, i64 16
store i64 %61, i64* %63
%64 = call i64 (...) @__builtin_get_texasru()
%65 = load i64*, i64** %5
%66 = getelementptr inbounds i64, i64* %65, i64 17
store i64 %64, i64* %66
%67 = call i64 (...) @__builtin_get_tfhar()
%68 = load i64*, i64** %5
%69 = getelementptr inbounds i64, i64* %68, i64 18
store i64 %67, i64* %69
%70 = call i64 (...) @__builtin_get_tfiar()
%71 = load i64*, i64** %5
%72 = getelementptr inbounds i64, i64* %71, i64 19
store i64 %70, i64* %72
%73 = load i64*, i64** %7
%74 = getelementptr inbounds i64, i64* %73, i64 20
%75 = load i64, i64* %74
%76 = call i32 @__builtin_set_texasr(i64 %75)
%77 = load i64*, i64** %7
%78 = getelementptr inbounds i64, i64* %77, i64 21
%79 = load i64, i64* %78
%80 = call i32 @__builtin_set_texasru(i64 %79)
%81 = load i64*, i64** %7
%82 = getelementptr inbounds i64, i64* %81, i64 22
%83 = load i64, i64* %82
%84 = call i32 @__builtin_set_tfhar(i64 %83)
%85 = load i64*, i64** %7
%86 = getelementptr inbounds i64, i64* %85, i64 23
%87 = load i64, i64* %86
%88 = call i32 @__builtin_set_tfiar(i64 %87)
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 7
%15 = load i64, i64* %14
%16 = getelementptr inbounds i64, i64* %3, i64 7
%17 = load i64, i64* %16
%18 = tail call i64 @__builtin_tabortwc(i32 15, i64 %15, i64 %17)
%19 = getelementptr inbounds i64, i64* %0, i64 7
store i64 %18, i64* %19
%20 = getelementptr inbounds i64, i64* %2, i64 8
%21 = load i64, i64* %20
%22 = tail call i64 @__builtin_tabortwci(i32 15, i64 %21, i32 13)
%23 = getelementptr inbounds i64, i64* %0, i64 8
store i64 %22, i64* %23
%24 = tail call i64 (...) @__builtin_tcheck()
%25 = getelementptr inbounds i64, i64* %0, i64 9
store i64 %24, i64* %25
%26 = tail call i64 (...) @__builtin_trechkpt()
%27 = getelementptr inbounds i64, i64* %0, i64 10
store i64 %26, i64* %27
%28 = tail call i64 @__builtin_treclaim(i32 0)
%29 = getelementptr inbounds i64, i64* %0, i64 11
store i64 %28, i64* %29
%30 = tail call i64 (...) @__builtin_tresume()
%31 = getelementptr inbounds i64, i64* %0, i64 12
store i64 %30, i64* %31
%32 = tail call i64 (...) @__builtin_tsuspend()
%33 = getelementptr inbounds i64, i64* %0, i64 13
store i64 %32, i64* %33
%34 = tail call i64 @__builtin_tsr(i32 0)
%35 = getelementptr inbounds i64, i64* %0, i64 14
store i64 %34, i64* %35
%36 = tail call i64 (...) @__builtin_ttest()
%37 = getelementptr inbounds i64, i64* %0, i64 15
store i64 %36, i64* %37
%38 = tail call i64 (...) @__builtin_get_texasr()
%39 = getelementptr inbounds i64, i64* %0, i64 16
store i64 %38, i64* %39
%40 = tail call i64 (...) @__builtin_get_texasru()
%41 = getelementptr inbounds i64, i64* %0, i64 17
store i64 %40, i64* %41
%42 = tail call i64 (...) @__builtin_get_tfhar()
%43 = getelementptr inbounds i64, i64* %0, i64 18
store i64 %42, i64* %43
%44 = tail call i64 (...) @__builtin_get_tfiar()
%45 = getelementptr inbounds i64, i64* %0, i64 19
store i64 %44, i64* %45
%46 = getelementptr inbounds i64, i64* %2, i64 20
%47 = load i64, i64* %46
%48 = tail call i32 @__builtin_set_texasr(i64 %47)
%49 = getelementptr inbounds i64, i64* %2, i64 21
%50 = load i64, i64* %49
%51 = tail call i32 @__builtin_set_texasru(i64 %50)
%52 = getelementptr inbounds i64, i64* %2, i64 22
%53 = load i64, i64* %52
%54 = tail call i32 @__builtin_set_tfhar(i64 %53)
%55 = getelementptr inbounds i64, i64* %2, i64 23
%56 = load i64, i64* %55
%57 = tail call i32 @__builtin_set_tfiar(i64 %56)
ret void
}