xunge/DecIR huggingface dataset:
void free_argv(int argc, char **argv) {
  while (--argc > 0) {
    free(argv[argc]);
  }
  free(argv);
}


x86 assembly (clang, -O0):
<free_argv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jle    1147 <free_argv+0x37>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    111f <free_argv+0xf>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_argv>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
cmp    $0x2,%edi
jl     1146 <free_argv+0x36>
mov    %edi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x2(%rbx),%eax
mov    (%r14,%rax,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x2,%rbx
ja     1130 <free_argv+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_argv(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
br label %5
5: ; preds = %9, %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, -1
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i8**, i8*** %4
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i8*, i8** %10, i64 %12
%14 = load i8*, i8** %13
br label %5
15: ; preds = %5
%16 = load i8**, i8*** %4
%17 = bitcast i8** %16 to i8*
ret void
}

LLVM IR (-O2):
define void @free_argv(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8*, i8** %1, i64 %9
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = icmp ugt i64 %7, 2
br i1 %12, label %6, label %13
13: ; preds = %6, %2
%14 = bitcast i8** %1 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
scalar_t__ jump();
int main(void) {
start:
  foo();
  if (1) {
    if (jump())
      goto start;
    foo();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <foo@plt>
mov    $0x0,%al
call   1040 <jump@plt>
cmp    $0x0,%rax
je     114c <main+0x2c>
jmp    112f <main+0xf>
mov    $0x0,%al
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
call   1040 <jump@plt>
test   %rax,%rax
jne    1130 <main+0x10>
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = call i32 (...) @foo()
%4 = call i64 (...) @jump()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %2
br label %2
7: ; preds = %2
%8 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @foo()
%3 = tail call i64 (...) @jump()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %1
5: ; preds = %1
%6 = tail call i32 (...) @foo()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ stack_test_4();
int stack_test_5() {
  stack_test_4();
  return 0;
}


x86 assembly (clang, -O0):
<stack_test_5>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <stack_test_4@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_test_5>:
push   %rax
xor    %eax,%eax
call   1030 <stack_test_4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @stack_test_5() {
%1 = call i32 (...) @stack_test_4()
ret i32 0
}

LLVM IR (-O2):
define i32 @stack_test_5() {
%1 = tail call i32 (...) @stack_test_4()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__37__IO__toggle();
void Msp430GpioC__8__HplGeneralIO__toggle(void) {
  HplMsp430GeneralIOP__37__IO__toggle();
}


x86 assembly (clang, -O0):
<Msp430GpioC__8__HplGeneralIO__toggle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMsp430GeneralIOP__37__IO__toggle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430GpioC__8__HplGeneralIO__toggle>:
xor    %eax,%eax
jmp    1030 <HplMsp430GeneralIOP__37__IO__toggle@plt>

LLVM IR (-O0):
define void @Msp430GpioC__8__HplGeneralIO__toggle() {
%1 = call i32 (...) @HplMsp430GeneralIOP__37__IO__toggle()
ret void
}

LLVM IR (-O2):
define void @Msp430GpioC__8__HplGeneralIO__toggle() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__37__IO__toggle()
ret void
}
/* Variables and functions */
int syscall(int, int *, int /*<<< orphan*/);
int mutex_unlock(int *m) { return syscall(17, m, 0); }


x86 assembly (clang, -O0):
<mutex_unlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x11,%edi
xor    %edx,%edx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mutex_unlock>:
mov    %rdi,%rsi
mov    $0x11,%edi
xor    %edx,%edx
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @mutex_unlock(i32* %0) {
%2 = tail call i32 @syscall(i32 17, i32* %0, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int do_printf(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/, int);
int vfprintf(FILE *stream, const char *format, va_list ap) {
  return do_printf(stream, format, ap, 1);
}


x86 assembly (clang, -O0):
<vfprintf>:
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),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <do_printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfprintf>:
mov    $0x1,%ecx
jmp    1030 <do_printf@plt>

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

LLVM IR (-O2):
define i32 @vfprintf(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @do_printf(i32* %0, i8* %1, i32 %2, i32 1)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int _spi_transfer(int, int, int /*<<< orphan*/, int /*<<< orphan*/ *, int);
int spi_write_reg(int fd, uint8_t addr, uint8_t data) {
  return _spi_transfer(fd, true, addr, &data, 1);
}


x86 assembly (clang, -O0):
<spi_write_reg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x1,%r8d
lea    -0xc(%rbp),%rcx
mov    %r8d,%esi
call   1030 <_spi_transfer@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_write_reg>:
push   %rax
mov    %esi,%eax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rcx
mov    $0x1,%esi
mov    %eax,%edx
mov    $0x1,%r8d
call   1030 <_spi_transfer@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @spi_write_reg(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i32 @_spi_transfer(i32 %0, i32 1, i32 %1, i32* %4, i32 1)
ret i32 %5
}
AX0I1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{ (((short *)10000000)[x0]) = 33; }


x86 assembly (clang, -O0):
<AX0I1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movw   $0x21,(%rax,%rcx,2)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AX0I1>:
movslq %edx,%rax
movw   $0x21,0x989680(%rax,%rax,1)
ret

LLVM IR (-O0):
define i32 @AX0I1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %17
store i16 33, i16* %18
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
define i32 @AX0I1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %7
store i16 33, i16* %8
ret i32 undef
}
int bad1(int(TYP)) { return TYP; }


x86 assembly (clang, -O0):
<bad1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad1>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @bad1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @bad1(i32 returned %0) {
ret i32 %0
}
void RTStrToInt64Full(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrToInt64Full() {
ret void
}
/* Variables and functions */
int owTouchByte(int, int);
int owWriteByte(int portnum, int sendbyte) {
  return (owTouchByte(portnum, sendbyte) == sendbyte) ? 1 : 0;
}


x86 assembly (clang, -O0):
<owWriteByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <owTouchByte@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<owWriteByte>:
push   %rbx
mov    %esi,%ebx
call   1030 <owTouchByte@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @owWriteByte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @owTouchByte(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @owWriteByte(i32 %0, i32 %1) {
%3 = tail call i32 @owTouchByte(i32 %0, i32 %1)
%4 = icmp eq i32 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ camc(int const, int const, int const, int const);
void camc_sa(const int c, const int n, const int a, const int f, const int r) {
  int i;
  for (i = 0; i < r; i++)
    camc(c, n, a + i, f);
}


x86 assembly (clang, -O0):
<camc_sa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115d <camc_sa+0x4d>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
add    -0x18(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <camc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112f <camc_sa+0x1f>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<camc_sa>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %r8d,%r8d
jle    1148 <camc_sa+0x38>
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%r15d
mov    %edi,%r12d
nopl   0x0(%rax,%rax,1)
mov    %r12d,%edi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <camc@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
jne    1130 <camc_sa+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @camc_sa(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 0, i32* %11
br label %12
12: ; preds = %24, %5
%13 = load i32, i32* %11
%14 = load i32, i32* %10
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %27
16: ; preds = %12
%17 = load i32, i32* %6
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = load i32, i32* %11
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %9
%23 = call i32 @camc(i32 %17, i32 %18, i32 %21, i32 %22)
br label %24
24: ; preds = %16
%25 = load i32, i32* %11
%26 = add nsw i32 %25, 1
store i32 %26, i32* %11
br label %12
27: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @camc_sa(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %13
7: ; preds = %5, %7
%8 = phi i32 [ %11, %7 ], [ 0, %5 ]
%9 = add nsw i32 %8, %2
%10 = tail call i32 @camc(i32 %0, i32 %1, i32 %9, i32 %3)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, %4
br i1 %12, label %13, label %7
13: ; preds = %7, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t l2cap_event_connection_parameter_update_request_get_interval_max(
    const uint8_t *event) {
  return little_endian_read_16(event, 6);
}


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

x86 assembly (clang, -O2):
<l2cap_event_connection_parameter_update_request_get_interval_max>:
mov    $0x6,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @l2cap_event_connection_parameter_update_request_get_interval_max(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 6)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ mktime(struct tm *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(void) {
  time_t now, new_time;
  struct tm *tm_now;
  time(&now);
  printf("now time is %ld\n", now);
  tm_now = localtime(&now);
  new_time = mktime(tm_now);
  printf("new time is %ld\n", new_time);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <time@plt>
mov    -0x8(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
lea    -0x8(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <mktime@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe87(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    0xc(%rsp),%esi
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,%rdi
call   1060 <mktime@plt>
lea    0xe98(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [17 x i8] c"now time is %ld\0A\00"
@.str.1 = [17 x i8] c"new time is %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.tm*
store i32 0, i32* %1
%5 = call i32 @time(i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call %struct.tm* @localtime(i32* %2)
store %struct.tm* %8, %struct.tm** %4
%9 = load %struct.tm*, %struct.tm** %4
%10 = call i32 @mktime(%struct.tm* %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [17 x i8] c"now time is %ld\0A\00"
@.str.1 = [17 x i8] c"new time is %ld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call %struct.tm* @localtime(i32* %1)
%7 = call i32 @mktime(%struct.tm* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ strlen(char *);
char *strrchr(char *, char);
void temp_as_string(char *t, char *buff) {
  char *s = strrchr(buff, '=') + 1;
  memset(t, 0x00, 1024);
  memcpy(t, s, strlen(s));
}


x86 assembly (clang, -O0):
<temp_as_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3d,%esi
call   1040 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1060 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<temp_as_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
mov    $0x3d,%esi
call   1040 <strrchr@plt>
lea    0x1(%rax),%rbx
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1060 <memcpy@plt>

LLVM IR (-O0):
define void @temp_as_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i8* @strrchr(i8* %6, i8 signext 61)
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %5
%9 = load i8*, i8** %3
%10 = call i32 @memset(i8* %9, i32 0, i32 1024)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %5
%13 = load i8*, i8** %5
%14 = call i32 @strlen(i8* %13)
%15 = call i32 @memcpy(i8* %11, i8* %12, i32 %14)
ret void
}

LLVM IR (-O2):
define void @temp_as_string(i8* %0, i8* %1) {
%3 = tail call i8* @strrchr(i8* dereferenceable(1) %1, i8 signext 61)
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = tail call i32 @memset(i8* %0, i32 0, i32 1024)
%6 = tail call i32 @strlen(i8* %4)
%7 = tail call i32 @memcpy(i8* %0, i8* %4, i32 %6)
ret void
}
void VecSet3fv(float v[3], float x, float y, float z) {
  v[0] = x;
  v[1] = y;
  v[2] = z;
}


x86 assembly (clang, -O0):
<VecSet3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecSet3fv>:
movss  %xmm0,(%rdi)
movss  %xmm1,0x4(%rdi)
movss  %xmm2,0x8(%rdi)
ret

LLVM IR (-O0):
define void @VecSet3fv(float* %0, float %1, float %2, float %3) {
%5 = alloca float*
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float* %0, float** %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %6
%10 = load float*, float** %5
%11 = getelementptr inbounds float, float* %10, i64 0
store float %9, float* %11
%12 = load float, float* %7
%13 = load float*, float** %5
%14 = getelementptr inbounds float, float* %13, i64 1
store float %12, float* %14
%15 = load float, float* %8
%16 = load float*, float** %5
%17 = getelementptr inbounds float, float* %16, i64 2
store float %15, float* %17
ret void
}

LLVM IR (-O2):
define void @VecSet3fv(float* nocapture writeonly %0, float %1, float %2, float %3) {
store float %1, float* %0
%5 = getelementptr inbounds float, float* %0, i64 1
store float %2, float* %5
%6 = getelementptr inbounds float, float* %0, i64 2
store float %3, float* %6
ret void
}
int f6(int a) { return a == 6 || a == 0; }


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x6,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <f6+0x20>
cmpl   $0x0,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
cmp    $0x6,%edi
sete   %al
test   %edi,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @f6(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 6
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 0
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @f6(i32 %0) {
%2 = icmp eq i32 %0, 6
%3 = icmp eq i32 %0, 0
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int extract32(int, int, int);
scalar_t__ parse_bits(int);
uint32_t iclass_bits(uint32_t encoding) {
  uint32_t iclass = extract32(encoding, 28, 4);
  if (parse_bits(encoding) == 0) {
    iclass += 16;
  }
  return iclass;
}


x86 assembly (clang, -O0):
<iclass_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1c,%esi
mov    $0x4,%edx
call   1040 <extract32@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <parse_bits@plt>
cmp    $0x0,%rax
jne    115b <iclass_bits+0x3b>
mov    -0x8(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iclass_bits>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x1c,%esi
mov    $0x4,%edx
call   1040 <extract32@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <parse_bits@plt>
lea    0x10(%rbx),%ecx
test   %rax,%rax
cmovne %ebx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @iclass_bits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @extract32(i32 %4, i32 28, i32 4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i64 @parse_bits(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 16
store i32 %11, i32* %3
br label %12
12: ; preds = %9, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @iclass_bits(i32 %0) {
%2 = tail call i32 @extract32(i32 %0, i32 28, i32 4)
%3 = tail call i64 @parse_bits(i32 %0)
%4 = icmp eq i64 %3, 0
%5 = add nsw i32 %2, 16
%6 = select i1 %4, i32 %5, i32 %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ps2_common_init();
int /*<<< orphan*/ ps2_mca_board_model_55sx_init();
void ps2_model_55sx_init() {
  ps2_common_init();
  ps2_mca_board_model_55sx_init();
}


x86 assembly (clang, -O0):
<ps2_model_55sx_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ps2_common_init@plt>
mov    $0x0,%al
call   1040 <ps2_mca_board_model_55sx_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ps2_model_55sx_init>:
push   %rax
xor    %eax,%eax
call   1030 <ps2_common_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ps2_mca_board_model_55sx_init@plt>

LLVM IR (-O0):
define void @ps2_model_55sx_init() {
%1 = call i32 (...) @ps2_common_init()
%2 = call i32 (...) @ps2_mca_board_model_55sx_init()
ret void
}

LLVM IR (-O2):
define void @ps2_model_55sx_init() {
%1 = tail call i32 (...) @ps2_common_init()
%2 = tail call i32 (...) @ps2_mca_board_model_55sx_init()
ret void
}
void XListExtensions() {}


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

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

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

LLVM IR (-O2):
define void @XListExtensions() {
ret void
}
/* Variables and functions */
long double fabs(long double x) {
  if (x < 0)
    return (x - x) - (x);
  else
    return x;
}


x86 assembly (clang, -O0):
<fabs>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    112f <fabs+0x2f>
jmp    111e <fabs+0x1e>
fldt   -0x20(%rbp)
fld    %st(0)
fsub   %st(1),%st
fsubp  %st,%st(1)
fstpt  -0x10(%rbp)
jmp    1135 <fabs+0x35>
fldt   -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fabs>:
fldt   0x8(%rsp)
fldz
fucomip %st(1),%st
fld    %st(0)
fsub   %st(1),%st
fsub   %st(1),%st
fxch   %st(1)
fcmovnbe %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @fabs(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %3
%5 = fcmp olt x86_fp80 %4, 0xK00000000000000000000
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load x86_fp80, x86_fp80* %3
%8 = load x86_fp80, x86_fp80* %3
%9 = fsub x86_fp80 %7, %8
%10 = load x86_fp80, x86_fp80* %3
%11 = fsub x86_fp80 %9, %10
store x86_fp80 %11, x86_fp80* %2
br label %14
12: ; preds = %1
%13 = load x86_fp80, x86_fp80* %3
store x86_fp80 %13, x86_fp80* %2
br label %14
14: ; preds = %12, %6
%15 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %15
}

LLVM IR (-O2):
define x86_fp80 @fabs(x86_fp80 %0) {
%2 = fcmp olt x86_fp80 %0, 0xK00000000000000000000
%3 = fsub x86_fp80 %0, %0
%4 = fsub x86_fp80 %3, %0
%5 = select i1 %2, x86_fp80 %4, x86_fp80 %0
ret x86_fp80 %5
}
void exit_data_3(int *p) {
#pragma omp target exit data map(from : p[:0])
}


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

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

LLVM IR (-O0):
define void @exit_data_3(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
ret void
}

LLVM IR (-O2):
define void @exit_data_3(i32* nocapture %0) {
ret void
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ swap(int *, int *);
void table_randomize(int *table) {
  int i, o;
  for (i = 15; i > 0; i--) {
    o = rand() % (i + 1);
    swap(&table[i], &table[o]);
  }
}


x86 assembly (clang, -O0):
<table_randomize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xf,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1181 <table_randomize+0x61>
mov    $0x0,%al
call   1040 <rand@plt>
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
movslq -0x10(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
call   1030 <swap@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <table_randomize+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<table_randomize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
lea    0x3c(%rdi),%r15
mov    $0x10,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
cltd
idiv   %ebx
movslq %edx,%rax
lea    (%r14,%rax,4),%rsi
mov    %r15,%rdi
call   1030 <swap@plt>
add    $0xffffffffffffffff,%rbx
add    $0xfffffffffffffffc,%r15
cmp    $0x1,%rbx
ja     1140 <table_randomize+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @table_randomize(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 15, i32* %3
br label %5
5: ; preds = %22, %1
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %5
%9 = call i32 (...) @rand()
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
%12 = srem i32 %9, %11
store i32 %12, i32* %4
%13 = load i32*, i32** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32*, i32** %2
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = call i32 @swap(i32* %16, i32* %20)
br label %22
22: ; preds = %8
%23 = load i32, i32* %3
%24 = add nsw i32 %23, -1
store i32 %24, i32* %3
br label %5
25: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @table_randomize(i32* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 15, %1 ], [ %12, %2 ]
%4 = tail call i32 (...) @rand()
%5 = trunc i64 %3 to i32
%6 = add i32 %5, 1
%7 = srem i32 %4, %6
%8 = getelementptr inbounds i32, i32* %0, i64 %3
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = tail call i32 @swap(i32* %8, i32* %10)
%12 = add nsw i64 %3, -1
%13 = icmp ugt i64 %3, 1
br i1 %13, label %2, label %14
14: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_version(void) {
  printf("spi-hdlc-adapter "
         "0.07"
         " ("
         "03:35:43"
         " "
         "Mar 19 2022"
         ")\n");
  printf("Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\n");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf07(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf09(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"spi-hdlc-adapter 0.07 (03:35:43 Mar 19 2022)\0A\00"
@.str.1 = [64 x i8] c"Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\0A\00"
define void @print_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [45 x i8] c"spi-hdlc-adapter 0.07 (03:35:43 Mar 19 2022)\00"
@str.2 = [63 x i8] c"Copyright (c) 2017 The OpenThread Authors, All Rights Reserved\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef char *u_int64_t;

/* Variables and functions */
u_int64_t ByteSwap64(u_int64_t x) {
  __asm("bswap	%0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ByteSwap64>:
mov    %rdi,%rax
bswap  %rax
ret

LLVM IR (-O0):
define i8* @ByteSwap64(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "bswap\09$0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ByteSwap64(i8* readnone %0) {
%2 = tail call i8* asm "bswap\09$0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ recursive_function(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/);
int main(int argc, char **argv) {
  recursive_function(NULL, 0, 0);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <recursive_function@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <recursive_function@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @recursive_function(i32* null, i32 0, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @recursive_function(i32* null, i32 0, i32 0)
ret i32 0
}
/* Variables and functions */
char *substring(char const *, int const, int);
char *restrict substr(const char *restrict string, const int from,
                      const int to) {
  int length = to - from;
  char *restrict new_string = substring(string, from, length);
  return new_string;
}


x86 assembly (clang, -O0):
<substr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <substring@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<substr>:
sub    %esi,%edx
jmp    1030 <substring@plt>

LLVM IR (-O0):
define i8* @substr(i8* noalias %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = sub nsw i32 %9, %10
store i32 %11, i32* %7
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %7
%15 = call i8* @substring(i8* %12, i32 %13, i32 %14)
store i8* %15, i8** %8
%16 = load i8*, i8** %8
ret i8* %16
}

LLVM IR (-O2):
define i8* @substr(i8* noalias %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %2, %1
%5 = tail call i8* @substring(i8* %0, i32 %1, i32 %4)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ckfree(void *p) {
  if (p)
    free(p);
}


x86 assembly (clang, -O0):
<ckfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <ckfree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckfree>:
test   %rdi,%rdi
je     111a <ckfree+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @ckfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @ckfree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_set_card_profile_by_index() {
  printf("NOT IMPLEMENTED:"
         "pa_context_set_card_profile_by_index"
         "\n");
}


x86 assembly (clang, -O0):
<pa_context_set_card_profile_by_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pa_context_set_card_profile_by_index>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"NOT IMPLEMENTED:pa_context_set_card_profile_by_index\0A\00"
define i32 @pa_context_set_card_profile_by_index() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [53 x i8] c"NOT IMPLEMENTED:pa_context_set_card_profile_by_index\00"
define i32 @pa_context_set_card_profile_by_index() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void fa16(int n) {
a:
  goto a;
  {
    int b[n];
    {
      int c[n];
      0;
    }
    {
      int d[n];
      0;
    };
    int e[n];
    0;
  };
  {
    int f[n];
    {
      int g[n];
      0;
    };
    {
      int h[n];
      0;
    };
    ;
    int i[n];
    0;
  };
  ;
  int j[n];
  0;
}


x86 assembly (clang, -O0):
<fa16>:
push   %rbp
mov    %rsp,%rbp
push   %rax
mov    %edi,-0x4(%rbp)
jmp    1108 <fa16+0x8>

x86 assembly (clang, -O2):
<fa16>:
jmp    1100 <fa16>

LLVM IR (-O0):
define void @fa16(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i8*
%13 = alloca i64
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i64
store i32 %0, i32* %2
br label %19
19: ; preds = %19, %1
br label %19
20: ; No predecessors!
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
%23 = call i8* @llvm.stacksave()
store i8* %23, i8** %3
%24 = alloca i32, i64 %22
store i64 %22, i64* %4
%25 = load i32, i32* %2
%26 = zext i32 %25 to i64
%27 = call i8* @llvm.stacksave()
store i8* %27, i8** %5
%28 = alloca i32, i64 %26
store i64 %26, i64* %6
%29 = load i8*, i8** %5
%30 = load i32, i32* %2
%31 = zext i32 %30 to i64
%32 = call i8* @llvm.stacksave()
store i8* %32, i8** %7
%33 = alloca i32, i64 %31
store i64 %31, i64* %8
%34 = load i8*, i8** %7
%35 = load i32, i32* %2
%36 = zext i32 %35 to i64
%37 = alloca i32, i64 %36
store i64 %36, i64* %9
%38 = load i8*, i8** %3
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
%41 = call i8* @llvm.stacksave()
store i8* %41, i8** %10
%42 = alloca i32, i64 %40
store i64 %40, i64* %11
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
%45 = call i8* @llvm.stacksave()
store i8* %45, i8** %12
%46 = alloca i32, i64 %44
store i64 %44, i64* %13
%47 = load i8*, i8** %12
%48 = load i32, i32* %2
%49 = zext i32 %48 to i64
%50 = call i8* @llvm.stacksave()
store i8* %50, i8** %14
%51 = alloca i32, i64 %49
store i64 %49, i64* %15
%52 = load i8*, i8** %14
%53 = load i32, i32* %2
%54 = zext i32 %53 to i64
%55 = alloca i32, i64 %54
store i64 %54, i64* %16
%56 = load i8*, i8** %10
%57 = load i32, i32* %2
%58 = zext i32 %57 to i64
%59 = call i8* @llvm.stacksave()
store i8* %59, i8** %17
%60 = alloca i32, i64 %58
store i64 %58, i64* %18
%61 = load i8*, i8** %17
ret void
}

LLVM IR (-O2):
define void @fa16(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ escape(char *, char *);
int /*<<< orphan*/ mgetline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char s[1000], t[1000];
  mgetline(t, 1000);
  escape(s, t);
  printf("%s", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x7e0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <mgetline@plt>
lea    -0x3f0(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
call   1050 <escape@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x7d8,%rsp
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x3e8,%esi
call   1040 <mgetline@plt>
lea    0x3f0(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <escape@plt>
lea    0xe9c(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7d8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca [1000 x i8]
store i32 0, i32* %1
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = call i32 @mgetline(i8* %4, i32 1000)
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%8 = call i32 @escape(i8* %6, i8* %7)
%9 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%5 = call i32 @mgetline(i8* %4, i32 1000)
%6 = call i32 @escape(i8* %3, i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
int test_imm_4Auint32_reg(unsigned int val) {
  return ((val) & (0x4A << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Auint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x4a,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Auint32_reg>:
test   $0x4a,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Auint32_reg(i32 %0) {
%2 = and i32 %0, 74
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ setkernvar(char *, char *);
scalar_t__ valid_tracer(char *);
int settracer(char *tracer) {
  if (valid_tracer(tracer)) {
    setkernvar("current_tracer", tracer);
    return 0;
  }
  return -1;
}


x86 assembly (clang, -O0):
<settracer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <valid_tracer@plt>
cmp    $0x0,%rax
je     115b <settracer+0x3b>
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <setkernvar@plt>
movl   $0x0,-0x4(%rbp)
jmp    1162 <settracer+0x42>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<settracer>:
push   %rbx
mov    %rdi,%rbx
call   1040 <valid_tracer@plt>
test   %rax,%rax
je     1141 <settracer+0x21>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <setkernvar@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [15 x i8] c"current_tracer\00"
define i32 @settracer(i8* %0) {
%2 = tail call i64 @valid_tracer(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @setkernvar(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %7
}
void vtAttributes(void *pointer, short bold, short blink, short inverse,
                  short underline, short foreground, short background,
                  short charset) {}


x86 assembly (clang, -O0):
<vtAttributes>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,-0x24(%rbp)
mov    %ecx,%eax
mov    -0x24(%rbp),%ecx
mov    %eax,-0x20(%rbp)
mov    %edx,%eax
mov    -0x20(%rbp),%edx
mov    %eax,-0x1c(%rbp)
mov    %esi,%eax
mov    -0x1c(%rbp),%esi
mov    %eax,-0x18(%rbp)
mov    %rdi,%r8
mov    -0x18(%rbp),%edi
mov    %r9w,%ax
mov    0x18(%rbp),%r9w
mov    0x10(%rbp),%r9w
mov    %r8,-0x8(%rbp)
mov    %di,-0xa(%rbp)
mov    %si,-0xc(%rbp)
mov    %dx,-0xe(%rbp)
mov    %cx,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @vtAttributes(i8* %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i16 signext %5, i16 signext %6, i16 signext %7) {
%9 = alloca i8*
%10 = alloca i16
%11 = alloca i16
%12 = alloca i16
%13 = alloca i16
%14 = alloca i16
%15 = alloca i16
%16 = alloca i16
store i8* %0, i8** %9
store i16 %1, i16* %10
store i16 %2, i16* %11
store i16 %3, i16* %12
store i16 %4, i16* %13
store i16 %5, i16* %14
store i16 %6, i16* %15
store i16 %7, i16* %16
ret void
}

LLVM IR (-O2):
define void @vtAttributes(i8* nocapture %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i16 signext %5, i16 signext %6, i16 signext %7) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ irc_setnick(char *);
char *strtok(char *, char *);
void child_nick(char *p) {
  char *nick;
  nick = strtok(p, " ");
  irc_setnick(nick);
}


x86 assembly (clang, -O0):
<child_nick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <irc_setnick@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_nick>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <strtok@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <irc_setnick@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define void @child_nick(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strtok(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @irc_setnick(i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define void @child_nick(i8* %0) {
%2 = tail call i8* @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @irc_setnick(i8* %2)
ret void
}
double dot2(const int *g, double x, double y) { return g[0] * x + g[1] * y; }


x86 assembly (clang, -O0):
<dot2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2sdl (%rax),%xmm0
movsd  -0x10(%rbp),%xmm2
mov    -0x8(%rbp),%rax
cvtsi2sdl 0x4(%rax),%xmm1
mulsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot2>:
cvtsi2sdl (%rdi),%xmm2
cvtsi2sdl 0x4(%rdi),%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm2,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @dot2(i32* %0, double %1, double %2) {
%4 = alloca i32*
%5 = alloca double
%6 = alloca double
store i32* %0, i32** %4
store double %1, double* %5
store double %2, double* %6
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to double
%11 = load double, double* %5
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = sitofp i32 %14 to double
%16 = load double, double* %6
%17 = fmul double %15, %16
%18 = call double @llvm.fmuladd.f64(double %10, double %11, double %17)
ret double %18
}

LLVM IR (-O2):
define double @dot2(i32* nocapture %0, double %1, double %2) {
%4 = load i32, i32* %0
%5 = sitofp i32 %4 to double
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = fmul double %8, %2
%10 = tail call double @llvm.fmuladd.f64(double %5, double %1, double %9)
ret double %10
}
void g_value_get_uint() {}


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

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

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

LLVM IR (-O2):
define void @g_value_get_uint() {
ret void
}