xunge/DecIR huggingface dataset:
/* Type definitions */
struct sigevent {
  int dummy;
};
struct aiocb {
  int aio_fildes;
  int aio_offset;
  int aio_reqprio;
  struct sigevent aio_sigevent;
  scalar_t__ aio_nbytes;
  int /*<<< orphan*/ *aio_buf;
};
typedef int /*<<< orphan*/ sigevent;

/* Variables and functions */
int /*<<< orphan*/ memset(struct sigevent *, int /*<<< orphan*/, int);
int main(void) {
  struct aiocb aiocb;
  struct sigevent sigevent;
  memset(&sigevent, 0, sizeof(sigevent));
  aiocb.aio_fildes = -1;
  aiocb.aio_offset = -1;
  aiocb.aio_buf = NULL;
  aiocb.aio_nbytes = 0;
  aiocb.aio_sigevent = sigevent;
  aiocb.aio_reqprio = -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x28(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movl   $0xffffffff,-0x20(%rbp)
movl   $0xffffffff,-0x1c(%rbp)
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x14(%rbp)
movl   $0xffffffff,-0x18(%rbp)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.aiocb = type { i32, i32, i32, %struct.sigevent, i64, i32* }
%struct.sigevent = type { i32 }
define i32 @main() {
%1 = alloca %struct.aiocb
%2 = alloca %struct.sigevent
%3 = call i32 @memset(%struct.sigevent* %2, i32 0, i32 4)
%4 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i32 0, i32 0
store i32 -1, i32* %4
%5 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i32 0, i32 1
store i32 -1, i32* %5
%6 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i32 0, i32 5
store i32* null, i32** %6
%7 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i32 0, i32 4
store i64 0, i64* %7
%8 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i32 0, i32 3
%9 = bitcast %struct.sigevent* %8 to i8*
%10 = bitcast %struct.sigevent* %2 to i8*
%11 = getelementptr inbounds %struct.aiocb, %struct.aiocb* %1, i32 0, i32 2
store i32 -1, i32* %11
ret i32 0
}

LLVM IR (-O2):
%struct.sigevent = type { i32 }
define i32 @main() {
%1 = alloca %struct.sigevent
%2 = bitcast %struct.sigevent* %1 to i8*
%3 = call i32 @memset(%struct.sigevent* %1, i32 0, i32 4)
ret i32 0
}
/* Type definitions */
typedef unsigned long long uint64_t;
struct timespec {
  unsigned long long tv_nsec;
  unsigned long long tv_sec;
};

/* Variables and functions */
struct timespec ns_to_timespec(uint64_t ns) {
  struct timespec ts;
  ts.tv_nsec = ns % 1000000000ULL;
  ts.tv_sec = ns / 1000000000ULL;
  return ts;
}


x86 assembly (clang, -O0):
<ns_to_timespec>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
shr    $0x9,%rax
movabs $0x44b82fa09b5a53,%rcx
mul    %rcx
mov    -0x20(%rbp),%rax
shr    $0xb,%rdx
imul   $0x3b9aca00,%rdx,%rdx
sub    %rdx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
shr    $0x9,%rax
mul    %rcx
shr    $0xb,%rdx
mov    %rdx,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_to_timespec>:
mov    %rdi,%rax
shr    $0x9,%rax
movabs $0x44b82fa09b5a53,%rcx
mul    %rcx
shr    $0xb,%rdx
imul   $0x3b9aca00,%rdx,%rax
sub    %rax,%rdi
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.timespec = type { i64, i64 }
define { i64, i64 } @ns_to_timespec(i64 %0) {
%2 = alloca %struct.timespec
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = urem i64 %4, 1000000000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
store i64 %5, i64* %6
%7 = load i64, i64* %3
%8 = udiv i64 %7, 1000000000
%9 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 1
store i64 %8, i64* %9
%10 = bitcast %struct.timespec* %2 to { i64, i64 }*
%11 = load { i64, i64 }, { i64, i64 }* %10
ret { i64, i64 } %11
}

LLVM IR (-O2):
define { i64, i64 } @ns_to_timespec(i64 %0) {
%2 = urem i64 %0, 1000000000
%3 = udiv i64 %0, 1000000000
%4 = insertvalue { i64, i64 } poison, i64 %2, 0
%5 = insertvalue { i64, i64 } %4, i64 %3, 1
ret { i64, i64 } %5
}
void __attribute__((used)) ambiguous_fun(void) {}


x86 assembly (clang, -O0):
<ambiguous_fun>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ambiguous_fun>:
ret

LLVM IR (-O0):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @ambiguous_fun to i8*)], section "llvm.metadata"
define void @ambiguous_fun() {
ret void
}

LLVM IR (-O2):
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (void ()* @ambiguous_fun to i8*)], section "llvm.metadata"
define void @ambiguous_fun() {
ret void
}
void printPartition(int *arr, int length) {}


x86 assembly (clang, -O0):
<printPartition>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<printPartition>:
ret

LLVM IR (-O0):
define void @printPartition(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @printPartition(i32* nocapture %0, i32 %1) {
ret void
}
unsigned phosphor2x_generic_input_fmts() { return (1 << 0) | (1 << 1); }


x86 assembly (clang, -O0):
<phosphor2x_generic_input_fmts>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<phosphor2x_generic_input_fmts>:
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @phosphor2x_generic_input_fmts() {
ret i32 3
}

LLVM IR (-O2):
define i32 @phosphor2x_generic_input_fmts() {
ret i32 3
}
void swap_ptr(unsigned int **p1, unsigned int **p2) {
  if (!p1 && !*p1)
    return;
  if (!p2 && !*p2)
    return;
  unsigned int *tmp = *p2;
  *p2 = *p1;
  *p1 = tmp;
}


x86 assembly (clang, -O0):
<swap_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112a <swap_ptr+0x2a>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    112a <swap_ptr+0x2a>
jmp    116c <swap_ptr+0x6c>
cmpq   $0x0,-0x10(%rbp)
jne    1148 <swap_ptr+0x48>
mov    -0x10(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1148 <swap_ptr+0x48>
jmp    116c <swap_ptr+0x6c>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_ptr>:
mov    (%rsi),%rax
mov    (%rdi),%rcx
mov    %rcx,(%rsi)
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @swap_ptr(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 = icmp ne i32** %6, null
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load i32**, i32*** %3
%10 = load i32*, i32** %9
%11 = icmp ne i32* %10, null
br i1 %11, label %13, label %12
12: ; preds = %8
br label %29
13: ; preds = %8, %2
%14 = load i32**, i32*** %4
%15 = icmp ne i32** %14, null
br i1 %15, label %21, label %16
16: ; preds = %13
%17 = load i32**, i32*** %4
%18 = load i32*, i32** %17
%19 = icmp ne i32* %18, null
br i1 %19, label %21, label %20
20: ; preds = %16
br label %29
21: ; preds = %16, %13
%22 = load i32**, i32*** %4
%23 = load i32*, i32** %22
store i32* %23, i32** %5
%24 = load i32**, i32*** %3
%25 = load i32*, i32** %24
%26 = load i32**, i32*** %4
store i32* %25, i32** %26
%27 = load i32*, i32** %5
%28 = load i32**, i32*** %3
store i32* %27, i32** %28
br label %29
29: ; preds = %21, %20, %12
ret void
}

LLVM IR (-O2):
define void @swap_ptr(i32** %0, i32** %1) {
%3 = load i32*, i32** %1
%4 = load i32*, i32** %0
store i32* %4, i32** %1
store i32* %3, i32** %0
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
void I2SIntEnable(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile unsigned long *)(0x40021000 + 0x00000070))) |= ui32IntFlags;
}


x86 assembly (clang, -O0):
<I2SIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x40021070,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x40021070,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2SIntEnable>:
mov    %rdi,-0x8(%rsp)
mov    %rsi,-0x10(%rsp)
mov    -0x10(%rsp),%rax
or     %rax,0x40021070
40
ret

LLVM IR (-O0):
define void @I2SIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* inttoptr (i64 1073877104 to i64*)
%7 = or i64 %6, %5
store volatile i64 %7, i64* inttoptr (i64 1073877104 to i64*)
ret void
}

LLVM IR (-O2):
define void @I2SIntEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
store volatile i64 %1, i64* %4
%5 = load volatile i64, i64* %4
%6 = load volatile i64, i64* inttoptr (i64 1073877104 to i64*)
%7 = or i64 %6, %5
store volatile i64 %7, i64* inttoptr (i64 1073877104 to i64*)
ret void
}
int main() {
  int i = 0;
  int a = 0;
  while (i <= 5 + 4 + 3 + 2 + 1) {
    i++;
    a++;
  }
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xf,-0x8(%rbp)
jg     113a <main+0x3a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1119 <main+0x19>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 15
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
ret i32 16
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int);
void die(int v, const char *s) {
  write(2, s, strlen(s));
  write(2, "\n", 1);
  exit(v);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
mov    $0x2,%edi
call   1030 <write@plt>
mov    $0x2,%edi
lea    0xe94(%rip),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    -0x4(%rbp),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
lea    0xeaa(%rip),%rsi
mov    $0x2,%edi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %ebp,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @die(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @strlen(i8* %6)
%8 = call i32 @write(i32 2, i8* %5, i32 %7)
%9 = call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%10 = load i32, i32* %3
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @die(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 2, i8* %1, i32 %3)
%5 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%6 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int gen_socket4(int const);
int gen_socket6(int const);
void create_server(int *sockets, const int port) {
  sockets[0] = gen_socket4(port);
  sockets[1] = gen_socket6(port);
}


x86 assembly (clang, -O0):
<create_server>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <gen_socket4@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%edi
call   1030 <gen_socket6@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_server>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <gen_socket4@plt>
mov    %eax,(%r14)
mov    %ebx,%edi
call   1030 <gen_socket6@plt>
mov    %eax,0x4(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @create_server(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @gen_socket4(i32 %5)
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = call i32 @gen_socket6(i32 %9)
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
define void @create_server(i32* nocapture writeonly %0, i32 %1) {
%3 = tail call i32 @gen_socket4(i32 %1)
store i32 %3, i32* %0
%4 = tail call i32 @gen_socket6(i32 %1)
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %5
ret void
}
/* Type definitions */
struct volperm_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ volperm_cmdline_parser_release(struct volperm_args_info *);
void volperm_cmdline_parser_free(struct volperm_args_info *args_info) {
  volperm_cmdline_parser_release(args_info);
}


x86 assembly (clang, -O0):
<volperm_cmdline_parser_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <volperm_cmdline_parser_release@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<volperm_cmdline_parser_free>:
jmp    1030 <volperm_cmdline_parser_release@plt>

LLVM IR (-O0):
%struct.volperm_args_info = type { i32 }
define void @volperm_cmdline_parser_free(%struct.volperm_args_info* %0) {
%2 = alloca %struct.volperm_args_info*
store %struct.volperm_args_info* %0, %struct.volperm_args_info** %2
%3 = load %struct.volperm_args_info*, %struct.volperm_args_info** %2
%4 = call i32 @volperm_cmdline_parser_release(%struct.volperm_args_info* %3)
ret void
}

LLVM IR (-O2):
%struct.volperm_args_info = type { i32 }
define void @volperm_cmdline_parser_free(%struct.volperm_args_info* %0) {
%2 = tail call i32 @volperm_cmdline_parser_release(%struct.volperm_args_info* %0)
ret void
}
/* Variables and functions */
unsigned int _uiTlvGetTagLen(unsigned char *);
int iTlvTagLen(unsigned char *psTlvObj) {
  unsigned int uiRet;
  uiRet = _uiTlvGetTagLen(psTlvObj);
  if (uiRet == 0)
    return (-10005);
  return (uiRet);
}


x86 assembly (clang, -O0):
<iTlvTagLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <_uiTlvGetTagLen@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    113e <iTlvTagLen+0x2e>
movl   $0xffffd8eb,-0x4(%rbp)
jmp    1144 <iTlvTagLen+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iTlvTagLen>:
push   %rax
call   1030 <_uiTlvGetTagLen@plt>
test   %eax,%eax
mov    $0xffffd8eb,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @iTlvTagLen(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @_uiTlvGetTagLen(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 -10005, i32* %2
br label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %12
12: ; preds = %10, %9
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @iTlvTagLen(i8* %0) {
%2 = tail call i32 @_uiTlvGetTagLen(i8* %0)
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -10005, i32 %2
ret i32 %4
}
/* Variables and functions */
void *v(size_t);
void *y(size_t n) { return v(n); }


x86 assembly (clang, -O0):
<y>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <v@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<y>:
jmp    1030 <v@plt>

LLVM IR (-O0):
define i8* @y(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @v(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @y(i64 %0) {
%2 = tail call i8* @v(i64 %0)
ret i8* %2
}
/* Variables and functions */
int start_tag_close(int, int);
int drv_start_tag_close_recover(int p) { return start_tag_close(p, 1); }


x86 assembly (clang, -O0):
<drv_start_tag_close_recover>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <start_tag_close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_start_tag_close_recover>:
mov    $0x1,%esi
jmp    1030 <start_tag_close@plt>

LLVM IR (-O0):
define i32 @drv_start_tag_close_recover(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @start_tag_close(i32 %3, i32 1)
ret i32 %4
}

LLVM IR (-O2):
define i32 @drv_start_tag_close_recover(i32 %0) {
%2 = tail call i32 @start_tag_close(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
scalar_t__ mkdir(char *, int);
int /*<<< orphan*/ perror(char *);
int jnb_io_mkdir(char *filename) {
  if (mkdir(filename, 0755)) {
    perror("mkdir()");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<jnb_io_mkdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
je     115c <jnb_io_mkdir+0x3c>
lea    0xeb5(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <jnb_io_mkdir+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jnb_io_mkdir>:
push   %rax
mov    $0x1ed,%esi
call   1030 <mkdir@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1137 <jnb_io_mkdir+0x17>
pop    %rcx
ret
lea    0xec2(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"mkdir()\00"
define i32 @jnb_io_mkdir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @mkdir(i8* %4, i32 493)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"mkdir()\00"
define i32 @jnb_io_mkdir(i8* nocapture %0) {
%2 = tail call i64 @mkdir(i8* %0, i32 493)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ 0, %1 ]
ret i32 %7
}
int si(const char *ligne) {
  if (ligne[0] == 'S' && ligne[1] == 'i' && ligne[2] == ' ')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<si>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x53,%eax
jne    1146 <si+0x46>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x69,%eax
jne    1146 <si+0x46>
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x20,%eax
jne    1146 <si+0x46>
movl   $0x1,-0x4(%rbp)
jmp    114d <si+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<si>:
cmpb   $0x53,(%rdi)
jne    1116 <si+0x16>
cmpb   $0x69,0x1(%rdi)
jne    1116 <si+0x16>
mov    $0x1,%eax
cmpb   $0x20,0x2(%rdi)
je     1118 <si+0x18>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @si(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 83
br i1 %8, label %9, label %22
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 105
br i1 %14, label %15, label %22
15: ; preds = %9
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 32
br i1 %20, label %21, label %22
21: ; preds = %15
store i32 1, i32* %2
br label %23
22: ; preds = %15, %9, %1
store i32 0, i32* %2
br label %23
23: ; preds = %22, %21
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @si(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 83
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 105
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %0, i64 2
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 32
br i1 %11, label %13, label %12
12: ; preds = %8, %4, %1
br label %13
13: ; preds = %8, %12
%14 = phi i32 [ 0, %12 ], [ 1, %8 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
char fgetc_inverce(FILE *p) {
  char ch;
  ch = fgetc(p);
  fseek(p, -2L, SEEK_CUR);
  return ch;
}


x86 assembly (clang, -O0):
<fgetc_inverce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
mov    $0xfffffffffffffffe,%rsi
call   1040 <fseek@plt>
movsbl -0x9(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetc_inverce>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    0x2eb4(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0xfffffffffffffffe,%rsi
call   1040 <fseek@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define signext i8 @fgetc_inverce(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call signext i8 @fgetc(i32* %4)
store i8 %5, i8* %3
%6 = load i32*, i32** %2
%7 = load i32, i32* @SEEK_CUR
%8 = call i32 @fseek(i32* %6, i64 -2, i32 %7)
%9 = load i8, i8* %3
ret i8 %9
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define signext i8 @fgetc_inverce(i32* nocapture %0) {
%2 = tail call signext i8 @fgetc(i32* %0)
%3 = load i32, i32* @SEEK_CUR
%4 = tail call i32 @fseek(i32* %0, i64 -2, i32 %3)
ret i8 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ dst;

/* Variables and functions */
int /*<<< orphan*/ strncpy(int *, int *, int);
void strncpy_good4() {
  int src[3];
  int dst[3];
  strncpy(dst, src, sizeof(dst));
}


x86 assembly (clang, -O0):
<strncpy_good4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x18(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0xc,%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_good4>:
sub    $0x18,%rsp
mov    %rsp,%rdi
lea    0xc(%rsp),%rsi
mov    $0xc,%edx
call   1030 <strncpy@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @strncpy_good4() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%5 = call i32 @strncpy(i32* %3, i32* %4, i32 12)
ret void
}

LLVM IR (-O2):
define void @strncpy_good4() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = bitcast [3 x i32]* %1 to i8*
%4 = bitcast [3 x i32]* %2 to i8*
%5 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%7 = call i32 @strncpy(i32* %5, i32* %6, i32 12)
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
void ref_add_int8_t(int8_t arg1, int8_t arg2, int8_t *result) {
  *result = arg1 + arg2;
}


x86 assembly (clang, -O0):
<ref_add_int8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rcx
add    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ref_add_int8_t>:
add    %rsi,%rdi
mov    %rdi,(%rdx)
ret

LLVM IR (-O0):
define void @ref_add_int8_t(i64 %0, i64 %1, i64* %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64*
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64* %2, i64** %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = add nsw i64 %7, %8
%10 = load i64*, i64** %6
store i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @ref_add_int8_t(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = add nsw i64 %1, %0
store i64 %4, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int a;
  int b;
  scanf("%d%d", &a, &b);
  if (a < b) {
    printf("%d\n", b);
  } else {
    printf("%d\n", a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1163 <main+0x43>
mov    -0xc(%rbp),%esi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
jmp    1172 <main+0x52>
mov    -0x8(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%eax
cmp    %eax,%esi
cmovl  %eax,%esi
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %11
8: ; preds = %0
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
br label %14
11: ; preds = %0
%12 = load i32, i32* %2
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %12)
br label %14
14: ; preds = %11, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
%9 = select i1 %8, i32 %7, i32 %6
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int const, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
void fgetsSample() {
  const int SIZE = 20;
  char worlds[SIZE];
  fgets(worlds, SIZE, stdin);
  printf("worlds = %s", worlds);
  fputs(worlds, stdout);
}


x86 assembly (clang, -O0):
<fgetsSample>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x14,-0x4(%rbp)
mov    %rsp,%rax
mov    %rax,-0x10(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
lea    -0x30(%rbp),%rdi
mov    $0x14,%esi
call   1050 <fgets@plt>
lea    0xe9c(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <printf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgetsSample>:
push   %rbx
sub    $0x20,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x14,%esi
call   1050 <fgets@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <fputs@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [12 x i8] c"worlds = %s\00"
@stdout = global i32 0
define void @fgetsSample() {
%1 = alloca i32
%2 = alloca i8*
store i32 20, i32* %1
%3 = call i8* @llvm.stacksave()
store i8* %3, i8** %2
%4 = alloca i8, i64 20
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 20, i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%8 = load i32, i32* @stdout
%9 = call i32 @fputs(i8* %4, i32 %8)
%10 = load i8*, i8** %2
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [12 x i8] c"worlds = %s\00"
@stdout = global i32 0
define void @fgetsSample() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 20, i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = load i32, i32* @stdout
%7 = call i32 @fputs(i8* %2, i32 %6)
ret void
}
int test_imm_CFint8_mem(signed char *val) {
  return ((*val) & (0xCF << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CFint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xcf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CFint8_mem>:
testb  $0xcf,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CFint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 207
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_CFint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -49
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void RTRandS32Ex(void) {}


x86 assembly (clang, -O0):
<RTRandS32Ex>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTRandS32Ex>:
ret

LLVM IR (-O0):
define void @RTRandS32Ex() {
ret void
}

LLVM IR (-O2):
define void @RTRandS32Ex() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cp_vect(double **, double **, unsigned long);
int /*<<< orphan*/ do_vect(double **, unsigned long);
int /*<<< orphan*/ free(double *);
void cp_vect_destroy(double **vect1, double **vect2, unsigned long len) {
  free(*vect1);
  do_vect(vect1, len);
  cp_vect(vect1, vect2, len);
  free(*vect2);
}


x86 assembly (clang, -O0):
<cp_vect_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <do_vect@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <cp_vect@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cp_vect_destroy>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <do_vect@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <cp_vect@plt>
mov    (%r14),%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @cp_vect_destroy(double** %0, double** %1, i64 %2) {
%4 = alloca double**
%5 = alloca double**
%6 = alloca i64
store double** %0, double*** %4
store double** %1, double*** %5
store i64 %2, i64* %6
%7 = load double**, double*** %4
%8 = load double*, double** %7
%9 = call i32 @free(double* %8)
%10 = load double**, double*** %4
%11 = load i64, i64* %6
%12 = call i32 @do_vect(double** %10, i64 %11)
%13 = load double**, double*** %4
%14 = load double**, double*** %5
%15 = load i64, i64* %6
%16 = call i32 @cp_vect(double** %13, double** %14, i64 %15)
%17 = load double**, double*** %5
%18 = load double*, double** %17
%19 = call i32 @free(double* %18)
ret void
}

LLVM IR (-O2):
define void @cp_vect_destroy(double** %0, double** %1, i64 %2) {
%4 = load double*, double** %0
%5 = tail call i32 @free(double* %4)
%6 = tail call i32 @do_vect(double** %0, i64 %2)
%7 = tail call i32 @cp_vect(double** %0, double** %1, i64 %2)
%8 = load double*, double** %1
%9 = tail call i32 @free(double* %8)
ret void
}
__attribute__((no, noclone)) unsigned __int128 t143_5sub(signed __int128 x) {
  unsigned __int128 r;
  if (__builtin_sub_overflow(x, (unsigned __int128)(0), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t143_5sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
test   %rax,%rax
setne  %al
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    115a <t143_5sub+0x4a>
jmp    1161 <t143_5sub+0x51>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t143_5sub>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rax
sar    $0x3f,%rax
je     112a <t143_5sub+0x1a>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t143_5sub(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.ssub.with.overflow.i129(i129 %12, i129 0)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t143_5sub(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = sext i128 %6 to i129
%8 = zext i128 %6 to i129
%9 = icmp eq i129 %7, %8
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = insertvalue { i64, i64 } poison, i64 %0, 0
%14 = insertvalue { i64, i64 } %13, i64 %1, 1
ret { i64, i64 } %14
}
/* Variables and functions */
int /*<<< orphan*/ _Mem_Free(void *, int, int /*<<< orphan*/, char const *,
                             int);
void PF_MemFree(void *data, const char *filename, int fileline) {
  _Mem_Free(data, 2, 0, filename, fileline);
}


x86 assembly (clang, -O0):
<PF_MemFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    -0x14(%rbp),%r8d
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <_Mem_Free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PF_MemFree>:
mov    %edx,%r8d
mov    %rsi,%rcx
mov    $0x2,%esi
xor    %edx,%edx
jmp    1030 <_Mem_Free@plt>

LLVM IR (-O0):
define void @PF_MemFree(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @_Mem_Free(i8* %7, i32 2, i32 0, i8* %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @PF_MemFree(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_Mem_Free(i8* %0, i32 2, i32 0, i8* %1, i32 %2)
ret void
}
__attribute__((always_)) void destroy_hrtimer_on_stack(struct hrtimer *timer) {}


x86 assembly (clang, -O0):
<destroy_hrtimer_on_stack>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_hrtimer_on_stack>:
ret

LLVM IR (-O0):
%struct.hrtimer = type opaque
define void @destroy_hrtimer_on_stack(%struct.hrtimer* %0) {
%2 = alloca %struct.hrtimer*
store %struct.hrtimer* %0, %struct.hrtimer** %2
ret void
}

LLVM IR (-O2):
%struct.hrtimer = type opaque
define void @destroy_hrtimer_on_stack(%struct.hrtimer* nocapture %0) {
ret void
}
int init() { return 42; }


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
mov    $0x2a,%eax
ret

LLVM IR (-O0):
define i32 @init() {
ret i32 42
}

LLVM IR (-O2):
define i32 @init() {
ret i32 42
}
/* Variables and functions */
double __builtin_readflm();
double __builtin_setflm(double volatile);
void test_builtin_ppc_flm() {
  volatile double res;
  res = __builtin_readflm();
  res = __builtin_setflm(res);
}


x86 assembly (clang, -O0):
<test_builtin_ppc_flm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__builtin_readflm@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <__builtin_setflm@plt>
movsd  %xmm0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_builtin_ppc_flm>:
push   %rax
xor    %eax,%eax
call   1040 <__builtin_readflm@plt>
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
call   1030 <__builtin_setflm@plt>
movsd  %xmm0,(%rsp)
pop    %rax
ret

LLVM IR (-O0):
define void @test_builtin_ppc_flm() {
%1 = alloca double
%2 = call double (...) @__builtin_readflm()
store volatile double %2, double* %1
%3 = load volatile double, double* %1
%4 = call double @__builtin_setflm(double %3)
store volatile double %4, double* %1
ret void
}

LLVM IR (-O2):
define void @test_builtin_ppc_flm() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = tail call double (...) @__builtin_readflm()
store volatile double %3, double* %1
%4 = load volatile double, double* %1
%5 = tail call double @__builtin_setflm(double %4)
store volatile double %5, double* %1
ret void
}
/* Type definitions */
struct stat {
  size_t st_blksize;
};

/* Variables and functions */
scalar_t__ fstat(int, struct stat *);
size_t blksize(int fd) {
  struct stat sbuf;
  if (fstat(fd, &sbuf) != 0)
    return 0;
  return sbuf.st_blksize;
}


x86 assembly (clang, -O0):
<blksize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <fstat@plt>
cmp    $0x0,%rax
je     113e <blksize+0x2e>
movq   $0x0,-0x8(%rbp)
jmp    1146 <blksize+0x36>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blksize>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
test   %rax,%rax
jne    1124 <blksize+0x14>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i64 @blksize(i32 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca %struct.stat
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i64 @fstat(i32 %5, %struct.stat* %4)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i64 0, i64* %2
br label %12
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i64, i64* %10
store i64 %11, i64* %2
br label %12
12: ; preds = %9, %8
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @blksize(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @fstat(i32 %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = select i1 %5, i64 %7, i64 0
ret i64 %8
}
/* Type definitions */
struct mount {
  int dummy;
};

/* Variables and functions */
bool mount_gdi_has_hd_region(struct mount *mount) { return true; }


x86 assembly (clang, -O0):
<mount_gdi_has_hd_region>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mount_gdi_has_hd_region>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
%struct.mount = type { i32 }
define i32 @mount_gdi_has_hd_region(%struct.mount* %0) {
%2 = alloca %struct.mount*
store %struct.mount* %0, %struct.mount** %2
ret i32 1
}

LLVM IR (-O2):
%struct.mount = type { i32 }
define i32 @mount_gdi_has_hd_region(%struct.mount* nocapture readnone %0) {
ret i32 1
}
float sqrModule2f(float vx, float vy) { return (vx * vx) + (vy * vy); }


x86 assembly (clang, -O0):
<sqrModule2f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrModule2f>:
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @sqrModule2f(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %3
%7 = load float, float* %4
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = call float @llvm.fmuladd.f32(float %5, float %6, float %9)
ret float %10
}

LLVM IR (-O2):
define float @sqrModule2f(float %0, float %1) {
%3 = fmul float %1, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %0, float %3)
ret float %4
}
double B2(u)
double u;
{
  double tmp = 1.0 - u;
  return (3 * u * u * tmp);
}


x86 assembly (clang, -O0):
<B2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xedd(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<B2>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  0xef4(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @B2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double 1.000000e+00, %4
store double %5, double* %3
%6 = load double, double* %2
%7 = fmul double 3.000000e+00, %6
%8 = load double, double* %2
%9 = fmul double %7, %8
%10 = load double, double* %3
%11 = fmul double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @B2(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fmul double %0, 3.000000e+00
%4 = fmul double %3, %0
%5 = fmul double %2, %4
ret double %5
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t I2SIntStatus(uint32_t ui32Base, bool bMasked) {
  uint32_t ui32Mask;
  ;
  if (bMasked) {
    ui32Mask = (*((volatile unsigned long *)(0x40021000 + 0x00000074)));
    return (ui32Mask &
            (*((volatile unsigned long *)(0x40021000 + 0x00000070))));
  } else {
    return ((*((volatile unsigned long *)(0x40021000 + 0x00000074))));
  }
}


x86 assembly (clang, -O0):
<I2SIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1139 <I2SIntStatus+0x39>
mov    $0x40021074,%eax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    $0x40021070,%ecx
mov    (%rcx),%rcx
and    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1145 <I2SIntStatus+0x45>
mov    $0x40021074,%eax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2SIntStatus>:
mov    %rdi,-0x8(%rsp)
mov    0x40021074,%rax
40
test   %esi,%esi
je     1123 <I2SIntStatus+0x23>
mov    %rax,-0x10(%rsp)
mov    -0x10(%rsp),%rax
and    0x40021070,%rax
40
ret

LLVM IR (-O0):
define i64 @I2SIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca i64
store volatile i64 %0, i64* %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load volatile i64, i64* inttoptr (i64 1073877108 to i64*)
store volatile i64 %10, i64* %6
%11 = load volatile i64, i64* %6
%12 = load volatile i64, i64* inttoptr (i64 1073877104 to i64*)
%13 = and i64 %11, %12
store i64 %13, i64* %3
br label %16
14: ; preds = %2
%15 = load volatile i64, i64* inttoptr (i64 1073877108 to i64*)
store i64 %15, i64* %3
br label %16
16: ; preds = %14, %9
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @I2SIntStatus(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64
store volatile i64 %0, i64* %3
%5 = bitcast i64* %4 to i8*
%6 = icmp eq i32 %1, 0
%7 = load volatile i64, i64* inttoptr (i64 1073877108 to i64*)
br i1 %6, label %12, label %8
8: ; preds = %2
store volatile i64 %7, i64* %4
%9 = load volatile i64, i64* %4
%10 = load volatile i64, i64* inttoptr (i64 1073877104 to i64*)
%11 = and i64 %10, %9
br label %12
12: ; preds = %2, %8
%13 = phi i64 [ %11, %8 ], [ %7, %2 ]
ret i64 %13
}
int test_imm_74uint16_mem(unsigned short *val) {
  return ((*val) & (-0x74 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_74uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffff8c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_74uint16_mem>:
movzwl (%rdi),%eax
test   $0xff8c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_74uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -116
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_74uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -116
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
double ldexp(double, int);
__attribute__((__weak__, __always___)) double softboundcets_ldexp(double x,
                                                                  int exp) {
  return ldexp(x, exp);
}


x86 assembly (clang, -O0):
<softboundcets_ldexp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
call   1030 <ldexp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_ldexp>:
jmp    1030 <ldexp@plt>

LLVM IR (-O0):
define weak double @softboundcets_ldexp(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
store i32 %1, i32* %4
%5 = load double, double* %3
%6 = load i32, i32* %4
%7 = call double @ldexp(double %5, i32 %6)
ret double %7
}

LLVM IR (-O2):
define weak double @softboundcets_ldexp(double %0, i32 %1) {
%3 = tail call double @ldexp(double %0, i32 %1)
ret double %3
}