xunge/DecIR huggingface dataset:
/* Variables and functions */
int strcoll(char *, char *);
int __collate_range_cmp(int c1, int c2) {
  static char s1[2], s2[2];
  s1[0] = c1;
  s2[0] = c2;
  return (strcoll(s1, s2));
}


x86 assembly (clang, -O0):
<__collate_range_cmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,0x2f02(%rip)
mov    -0x8(%rbp),%eax
mov    %al,0x2efb(%rip)
lea    0x2ef2(%rip),%rdi
lea    0x2eed(%rip),%rsi
call   1030 <strcoll@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__collate_range_cmp>:
mov    %dil,0x2f12(%rip)
lea    0x2f0b(%rip),%rdi
mov    %sil,0x2f06(%rip)
lea    0x2eff(%rip),%rsi
jmp    1030 <strcoll@plt>

LLVM IR (-O0):
@__collate_range_cmp.s1 = internal global [2 x i8] zeroinitializer
@__collate_range_cmp.s2 = internal global [2 x i8] zeroinitializer
define i32 @__collate_range_cmp(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 = trunc i32 %5 to i8
store i8 %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s1, i64 0, i64 0)
%7 = load i32, i32* %4
%8 = trunc i32 %7 to i8
store i8 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s2, i64 0, i64 0)
%9 = call i32 @strcoll(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s2, i64 0, i64 0))
ret i32 %9
}

LLVM IR (-O2):
@__collate_range_cmp.s1 = internal global [2 x i8] zeroinitializer
@__collate_range_cmp.s2 = internal global [2 x i8] zeroinitializer
define i32 @__collate_range_cmp(i32 %0, i32 %1) {
%3 = trunc i32 %0 to i8
store i8 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s1, i64 0, i64 0)
%4 = trunc i32 %1 to i8
store i8 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s2, i64 0, i64 0)
%5 = tail call i32 @strcoll(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__collate_range_cmp.s2, i64 0, i64 0))
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void write32_be(uint32_t v, uint8_t buf[4]) {
  *buf++ = (v >> 24) & 0xff;
  *buf++ = (v >> 16) & 0xff;
  *buf++ = (v >> 8) & 0xff;
  *buf = v & 0xff;
}


x86 assembly (clang, -O0):
<write32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x10(%rbp)
mov    %ecx,(%rax)
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write32_be>:
mov    %edi,%eax
mov    %edi,%ecx
movzbl %ah,%edx
movzbl %al,%edi
shr    $0x18,%eax
mov    %eax,(%rsi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rsi)
mov    %edx,0x8(%rsi)
mov    %edi,0xc(%rsi)
ret

LLVM IR (-O0):
define void @write32_be(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 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %4
store i32 %7, i32* %8
%10 = load i32, i32* %3
%11 = ashr i32 %10, 16
%12 = and i32 %11, 255
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i32 1
store i32* %14, i32** %4
store i32 %12, i32* %13
%15 = load i32, i32* %3
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i32 1
store i32* %19, i32** %4
store i32 %17, i32* %18
%20 = load i32, i32* %3
%21 = and i32 %20, 255
%22 = load i32*, i32** %4
store i32 %21, i32* %22
ret void
}

LLVM IR (-O2):
define void @write32_be(i32 %0, i32* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
%4 = getelementptr inbounds i32, i32* %1, i64 1
store i32 %3, i32* %1
%5 = lshr i32 %0, 16
%6 = and i32 %5, 255
%7 = getelementptr inbounds i32, i32* %1, i64 2
store i32 %6, i32* %4
%8 = lshr i32 %0, 8
%9 = and i32 %8, 255
%10 = getelementptr inbounds i32, i32* %1, i64 3
store i32 %9, i32* %7
%11 = and i32 %0, 255
store i32 %11, i32* %10
ret void
}
double poly1(x) {
  int i;
  double res = 1;
  for (i = 1; i <= 100; i++)
    res += pow(x, i) / i;
  return res;
}


x86 assembly (clang, -O0):
<poly1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movsd  0xedd(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     1169 <poly1+0x59>
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
call   1030 <pow@plt>
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <poly1+0x1f>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<poly1>:
push   %rbx
sub    $0x20,%rsp
cvtsi2sd %edi,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xed9(%rip),%xmm0
mov    $0x2,%ebx
movapd %xmm0,%xmm1
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
call   1030 <pow@plt>
divsd  0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm1,%xmm1
cvtsi2sd %ebx,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <pow@plt>
movsd  0x8(%rsp),%xmm1
divsd  0x18(%rsp),%xmm0
addsd  (%rsp),%xmm0
addsd  0xe7b(%rip),%xmm1
add    $0x2,%ebx
cmp    $0x66,%ebx
jne    1130 <poly1+0x20>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @poly1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca double
store i32 %0, i32* %2
store double 1.000000e+00, double* %4
store i32 1, i32* %3
br label %5
5: ; preds = %19, %1
%6 = load i32, i32* %3
%7 = icmp sle i32 %6, 100
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sitofp i32 %9 to double
%11 = load i32, i32* %3
%12 = sitofp i32 %11 to double
%13 = call double @pow(double %10, double %12)
%14 = load i32, i32* %3
%15 = sitofp i32 %14 to double
%16 = fdiv double %13, %15
%17 = load double, double* %4
%18 = fadd double %17, %16
store double %18, double* %4
br label %19
19: ; preds = %8
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %5
22: ; preds = %5
%23 = load double, double* %4
ret double %23
}

LLVM IR (-O2):
define double @poly1(i32 %0) {
%2 = sitofp i32 %0 to double
br label %3
3: ; preds = %3, %1
%4 = phi double [ 1.000000e+00, %1 ], [ %14, %3 ]
%5 = phi i32 [ 1, %1 ], [ %15, %3 ]
%6 = sitofp i32 %5 to double
%7 = tail call double @pow(double %2, double %6)
%8 = fdiv double %7, %6
%9 = fadd double %4, %8
%10 = add nuw nsw i32 %5, 1
%11 = sitofp i32 %10 to double
%12 = tail call double @pow(double %2, double %11)
%13 = fdiv double %12, %11
%14 = fadd double %9, %13
%15 = add nuw nsw i32 %5, 2
%16 = icmp eq i32 %15, 101
br i1 %16, label %17, label %3
17: ; preds = %3
ret double %14
}
/* Variables and functions */
int quickSort_Partition(int *, int, int);
void quickSort_Internal(int *array, int low, int high) {
  if (low < high) {
    int pivot = quickSort_Partition(array, low, high);
    quickSort_Internal(array, low, pivot - 1);
    quickSort_Internal(array, pivot + 1, high);
  }
}


x86 assembly (clang, -O0):
<quickSort_Internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1174 <quickSort_Internal+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <quickSort_Partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quickSort_Internal@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quickSort_Internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort_Internal>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quickSort_Internal+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <quickSort_Partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quickSort_Internal@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quickSort_Internal+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quickSort_Internal(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @quickSort_Partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quickSort_Internal(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ handle_63(int /*<<< orphan*/);
int gen_63() { handle_63(0); }


x86 assembly (clang, -O0):
<gen_63>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <handle_63@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_63>:
xor    %edi,%edi
jmp    1030 <handle_63@plt>

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

LLVM IR (-O2):
define i32 @gen_63() {
%1 = tail call i32 @handle_63(i32 0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ast_unregister_file_version(char *);
void __attribute__((destructor)) __unregister_file_version(void) {
  ast_unregister_file_version(
      "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
      "2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/"
      "master/io.c");
}


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

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

LLVM IR (-O0):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/io.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__unregister_file_version, i8* null }]
define void @__unregister_file_version() {
%1 = call i32 @ast_unregister_file_version(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [143 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/tpenguin/solarisvoip-asterisk/refs/heads/master/io.c\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__unregister_file_version, i8* null }]
define void @__unregister_file_version() {
%1 = tail call i32 @ast_unregister_file_version(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0))
ret void
}
void mus_set_big_endian_int(unsigned char *j, int x) {
  unsigned char *ox;
  ox = (unsigned char *)&x;
  j[0] = ox[0];
  j[1] = ox[1];
  j[2] = ox[2];
  j[3] = ox[3];
}


x86 assembly (clang, -O0):
<mus_set_big_endian_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_set_big_endian_int>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @mus_set_big_endian_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = bitcast i32* %4 to i8*
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 %9, i8* %11
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 2
%19 = load i8, i8* %18
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 2
store i8 %19, i8* %21
%22 = load i8*, i8** %5
%23 = getelementptr inbounds i8, i8* %22, i64 3
%24 = load i8, i8* %23
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 3
store i8 %24, i8* %26
ret void
}

LLVM IR (-O2):
define void @mus_set_big_endian_int(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = lshr i32 %1, 16
%7 = trunc i32 %6 to i8
%8 = lshr i32 %1, 24
%9 = trunc i32 %8 to i8
store i8 %3, i8* %0
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %10
%11 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %11
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %9, i8* %12
ret void
}
int my_strlen(char *str) {
  int i;
  i = 0;
  while (str[i]) {
    ++i;
  }
  return (i);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <my_strlen+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <my_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int pstr(void *self) {
  printf("%s\n", (char *)self);
  return 0;
}


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

x86 assembly (clang, -O2):
<pstr>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @pstr(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
char *build_sw_path(char const *, char const *, int, char *, char const *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ req_sw(char const *, char const *, char *);
char *response_str(int /*<<< orphan*/);
char *req_swa_chars(const char *command, const char *hostname,
                    const char *session_id, const char *ain) {
  char *path = build_sw_path(command, session_id, 2, "ain", ain);
  char *res = response_str(req_sw(hostname, command, path));
  free(path);
  return res;
}


x86 assembly (clang, -O0):
<req_swa_chars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%r8
mov    $0x2,%edx
lea    0xe90(%rip),%rcx
call   1060 <build_sw_path@plt>
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <req_sw@plt>
mov    %eax,%edi
call   1050 <response_str@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_swa_chars>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r8
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeab(%rip),%rcx
mov    %rdx,%rsi
mov    $0x2,%edx
call   1060 <build_sw_path@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <req_sw@plt>
mov    %eax,%edi
call   1050 <response_str@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"ain\00"
define i8* @req_swa_chars(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = call i8* @build_sw_path(i8* %11, i8* %12, i32 2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %13)
store i8* %14, i8** %9
%15 = load i8*, i8** %6
%16 = load i8*, i8** %5
%17 = load i8*, i8** %9
%18 = call i32 @req_sw(i8* %15, i8* %16, i8* %17)
%19 = call i8* @response_str(i32 %18)
store i8* %19, i8** %10
%20 = load i8*, i8** %9
%21 = call i32 @free(i8* %20)
%22 = load i8*, i8** %10
ret i8* %22
}

LLVM IR (-O2):
@.str = [4 x i8] c"ain\00"
define i8* @req_swa_chars(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i8* @build_sw_path(i8* %0, i8* %2, i32 2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = tail call i32 @req_sw(i8* %1, i8* %0, i8* %5)
%7 = tail call i8* @response_str(i32 %6)
%8 = tail call i32 @free(i8* %5)
ret i8* %7
}
TAG_CALLBACK(spp_endpipe) { return 0; }


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

x86 assembly (clang, -O2):
<TAG_CALLBACK>:
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @TAG_CALLBACK(i32 %0) {
ret i32 0
}
/* Variables and functions */
float __nv_j0f(float);
float j0f(float __a) { return __nv_j0f(__a); }


x86 assembly (clang, -O0):
<j0f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__nv_j0f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j0f>:
jmp    1030 <__nv_j0f@plt>

LLVM IR (-O0):
define float @j0f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @__nv_j0f(float %3)
ret float %4
}

LLVM IR (-O2):
define float @j0f(float %0) {
%2 = tail call float @__nv_j0f(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Welcome to DFYM\n"); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Welcome to DFYM\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"Welcome to DFYM\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
float sin(float);
float Sine__easeOut(float t, float b, float c, float d, float p0, float p1) {
  return c * sin(t / d * (3.1415926535897932384626433832795 / 2)) + b;
}


x86 assembly (clang, -O0):
<Sine__easeOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeaa(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm2
movss  -0x1c(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sine__easeOut>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  0xed4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <sin@plt>
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @Sine__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %9
%14 = load float, float* %7
%15 = load float, float* %10
%16 = fdiv float %14, %15
%17 = fpext float %16 to double
%18 = fmul double %17, 0x3FF921FB54442D18
%19 = fptrunc double %18 to float
%20 = call float @sin(float %19)
%21 = load float, float* %8
%22 = call float @llvm.fmuladd.f32(float %13, float %20, float %21)
ret float %22
}

LLVM IR (-O2):
define float @Sine__easeOut(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fdiv float %0, %3
%8 = fpext float %7 to double
%9 = fmul double %8, 0x3FF921FB54442D18
%10 = fptrunc double %9 to float
%11 = tail call float @sin(float %10)
%12 = tail call float @llvm.fmuladd.f32(float %2, float %11, float %1)
ret float %12
}
void osalSysDisable(void) {}


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

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

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

LLVM IR (-O2):
define void @osalSysDisable() {
ret void
}
int test_imm_6Eint64_midword_reg(long long val) {
  return ((val >> 16) & (0x6E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Eint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x6e,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Eint64_midword_reg>:
test   $0x6e0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Eint64_midword_reg(i64 %0) {
%2 = and i64 %0, 7208960
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
float am_getconfig_float_def(const char *path, float defvalue) { return -1; }


x86 assembly (clang, -O0):
<am_getconfig_float_def>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  0xeeb(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<am_getconfig_float_def>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @am_getconfig_float_def(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
ret float -1.000000e+00
}

LLVM IR (-O2):
define float @am_getconfig_float_def(i8* nocapture readnone %0, float %1) {
ret float -1.000000e+00
}
/* Type definitions */
struct genlist {
  int dummy;
};
struct fileinfo_list {
  int dummy;
};
struct fileinfo {
  int dummy;
};

/* Variables and functions */
int genlist_remove_all(struct genlist *, struct fileinfo const *);
int fileinfo_list_remove_all(struct fileinfo_list *tthis,
                             const struct fileinfo *pfoo) {
  return genlist_remove_all((struct genlist *)tthis, pfoo);
}


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

x86 assembly (clang, -O2):
<fileinfo_list_remove_all>:
jmp    1030 <genlist_remove_all@plt>

LLVM IR (-O0):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.genlist = type { i32 }
define i32 @fileinfo_list_remove_all(%struct.fileinfo_list* %0, %struct.fileinfo* %1) {
%3 = alloca %struct.fileinfo_list*
%4 = alloca %struct.fileinfo*
store %struct.fileinfo_list* %0, %struct.fileinfo_list** %3
store %struct.fileinfo* %1, %struct.fileinfo** %4
%5 = load %struct.fileinfo_list*, %struct.fileinfo_list** %3
%6 = bitcast %struct.fileinfo_list* %5 to %struct.genlist*
%7 = load %struct.fileinfo*, %struct.fileinfo** %4
%8 = call i32 @genlist_remove_all(%struct.genlist* %6, %struct.fileinfo* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.fileinfo_list = type { i32 }
%struct.fileinfo = type { i32 }
%struct.genlist = type { i32 }
define i32 @fileinfo_list_remove_all(%struct.fileinfo_list* %0, %struct.fileinfo* %1) {
%3 = bitcast %struct.fileinfo_list* %0 to %struct.genlist*
%4 = tail call i32 @genlist_remove_all(%struct.genlist* %3, %struct.fileinfo* %1)
ret i32 %4
}
/* Variables and functions */
int sscanf(char const *, char *, double *, char *);
int /*<<< orphan*/ suicidef(char *, char const *);
double string_to_double(const char *s) {
  double v;
  char extra;
  if (sscanf(s, "%lf%c", &v, &extra) != 1)
    suicidef("\"%s\" is not a number", s);
  return v;
}


x86 assembly (clang, -O0):
<string_to_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
lea    -0x10(%rbp),%rdx
lea    -0x11(%rbp),%rcx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
je     115d <string_to_double+0x3d>
mov    -0x8(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <suicidef@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_to_double>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xed1(%rip),%rsi
lea    0x8(%rsp),%rdx
lea    0x7(%rsp),%rcx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
je     1152 <string_to_double+0x32>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <suicidef@plt>
movsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%lf%c\00"
@.str.1 = [21 x i8] c"\22%s\22 is not a number\00"
define double @string_to_double(i8* %0) {
%2 = alloca i8*
%3 = alloca double
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %3, i8* %4)
%7 = icmp ne i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @suicidef(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %8, %1
%12 = load double, double* %3
ret double %12
}

LLVM IR (-O2):
@.str = [6 x i8] c"%lf%c\00"
@.str.1 = [21 x i8] c"\22%s\22 is not a number\00"
define double @string_to_double(i8* %0) {
%2 = alloca double
%3 = alloca i8
%4 = bitcast double* %2 to i8*
%5 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double* %2, i8* %3)
%6 = icmp eq i32 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @suicidef(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %7, %1
%10 = load double, double* %2
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello C!\n"); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"Hello C!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"Hello C!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ max_sum(int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ max_sum_brute(int /*<<< orphan*/, int /*<<< orphan*/);
int test_empty() { return 0 == max_sum_brute(0, 0) && 0 == max_sum(0, 0); }


x86 assembly (clang, -O0):
<test_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %esi,%esi
mov    %esi,%edi
call   1040 <max_sum_brute@plt>
mov    %rax,%rdx
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %rdx,%rcx
mov    %al,-0x1(%rbp)
jne    115b <test_empty+0x3b>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <max_sum@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_empty>:
push   %rbx
xor    %ebx,%ebx
xor    %edi,%edi
xor    %esi,%esi
call   1040 <max_sum_brute@plt>
test   %rax,%rax
jne    1142 <test_empty+0x22>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <max_sum@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_empty() {
%1 = call i64 @max_sum_brute(i32 0, i32 0)
%2 = icmp eq i64 0, %1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i64 @max_sum(i32 0, i32 0)
%5 = icmp eq i64 0, %4
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_empty() {
%1 = tail call i64 @max_sum_brute(i32 0, i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 @max_sum(i32 0, i32 0)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
void foo_2_2_1_2_1_1_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_1_1_1_2_2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  printf("%d", num & 0x7);
  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
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
and    $0x7,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
and    $0x7,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 7
%6 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
char sqchat_rfc1459_toupper(char);
void sqchat_trie_rfc1459_strtoupper(char *s) {
  for (int i = 0; s[i] != '\0'; i++)
    s[i] = sqchat_rfc1459_toupper(s[i]);
}


x86 assembly (clang, -O0):
<sqchat_trie_rfc1459_strtoupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1164 <sqchat_trie_rfc1459_strtoupper+0x54>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <sqchat_rfc1459_toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <sqchat_trie_rfc1459_strtoupper+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqchat_trie_rfc1459_strtoupper>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1136 <sqchat_trie_rfc1459_strtoupper+0x26>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <sqchat_rfc1459_toupper@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <sqchat_trie_rfc1459_strtoupper+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @sqchat_trie_rfc1459_strtoupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %5, %1
ret void
5: ; preds = %1, %5
%6 = phi i64 [ %10, %5 ], [ 0, %1 ]
%7 = phi i8 [ %12, %5 ], [ %2, %1 ]
%8 = phi i8* [ %11, %5 ], [ %0, %1 ]
%9 = tail call signext i8 @sqchat_rfc1459_toupper(i8 signext %7)
store i8 %9, i8* %8
%10 = add nuw i64 %6, 1
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %4, label %5
}
int test_imm_4Dint64_midword_reg(long long val) {
  return ((val >> 16) & (0x4D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_4Dint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x10,%rdx
and    $0x4d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_4Dint64_midword_reg>:
test   $0x4d0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_4Dint64_midword_reg(i64 %0) {
%2 = and i64 %0, 5046272
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int check_execveat_invoked_rc(int, char const *, int, int);
int check_execveat(int fd, const char *path, int flags) {
  return check_execveat_invoked_rc(fd, path, flags, 99);
}


x86 assembly (clang, -O0):
<check_execveat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x63,%ecx
call   1030 <check_execveat_invoked_rc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_execveat>:
mov    $0x63,%ecx
jmp    1030 <check_execveat_invoked_rc@plt>

LLVM IR (-O0):
define i32 @check_execveat(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 @check_execveat_invoked_rc(i32 %7, i8* %8, i32 %9, i32 99)
ret i32 %10
}

LLVM IR (-O2):
define i32 @check_execveat(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @check_execveat_invoked_rc(i32 %0, i8* %1, i32 %2, i32 99)
ret i32 %4
}
/* Type definitions */
struct eqn_node {
  int dummy;
};

/* Variables and functions */
char const *eqn_next(struct eqn_node *, char, size_t *, int);
const char *eqn_nexttok(struct eqn_node *ep, size_t *sz) {
  return eqn_next(ep, '"', sz, 1);
}


x86 assembly (clang, -O0):
<eqn_nexttok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x22,%esi
mov    $0x1,%ecx
call   1030 <eqn_next@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eqn_nexttok>:
mov    %rsi,%rdx
mov    $0x22,%esi
mov    $0x1,%ecx
jmp    1030 <eqn_next@plt>

LLVM IR (-O0):
%struct.eqn_node = type { i32 }
define i8* @eqn_nexttok(%struct.eqn_node* %0, i64* %1) {
%3 = alloca %struct.eqn_node*
%4 = alloca i64*
store %struct.eqn_node* %0, %struct.eqn_node** %3
store i64* %1, i64** %4
%5 = load %struct.eqn_node*, %struct.eqn_node** %3
%6 = load i64*, i64** %4
%7 = call i8* @eqn_next(%struct.eqn_node* %5, i8 signext 34, i64* %6, i32 1)
ret i8* %7
}

LLVM IR (-O2):
%struct.eqn_node = type { i32 }
define i8* @eqn_nexttok(%struct.eqn_node* %0, i64* %1) {
%3 = tail call i8* @eqn_next(%struct.eqn_node* %0, i8 signext 34, i64* %1, i32 1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void linux_pl(void) { printf("Witaj w LINUX-ie!\n"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"Witaj w LINUX-ie!\0A\00"
define void @linux_pl() {
%1 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [18 x i8] c"Witaj w LINUX-ie!\00"
define void @linux_pl() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
void gtk_tree_store_move_before() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_store_move_before() {
ret void
}
void test4(int *i) {}


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

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

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

LLVM IR (-O2):
define void @test4(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t HIHALF(uint8_t byte) { return (byte >> 4) & 0x0F; }


x86 assembly (clang, -O0):
<HIHALF>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<HIHALF>:
mov    %edi,%eax
shr    $0x4,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @HIHALF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 4
%5 = and i32 %4, 15
ret i32 %5
}

LLVM IR (-O2):
define i32 @HIHALF(i32 %0) {
%2 = lshr i32 %0, 4
%3 = and i32 %2, 15
ret i32 %3
}
/* Variables and functions */
int strcmp(char const *, char const *);
int xstrcmp(const char *s1, const char *s2) {
  if (s1 == s2)
    return 0;
  if (s1 == 0 || s2 == 0)
    return 1;
  return strcmp(s1, s2);
}


x86 assembly (clang, -O0):
<xstrcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113a <xstrcmp+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    116c <xstrcmp+0x5c>
cmpq   $0x0,-0x10(%rbp)
je     1150 <xstrcmp+0x40>
cmpq   $0x0,-0x18(%rbp)
jne    115c <xstrcmp+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    116c <xstrcmp+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrcmp>:
cmp    %rsi,%rdi
je     1129 <xstrcmp+0x19>
mov    $0x1,%eax
test   %rdi,%rdi
je     112b <xstrcmp+0x1b>
test   %rsi,%rsi
je     112b <xstrcmp+0x1b>
jmp    1030 <strcmp@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @xstrcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, i32* %3
br label %21
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %13, %10
store i32 1, i32* %3
br label %21
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = call i32 @strcmp(i8* %18, i8* %19)
store i32 %20, i32* %3
br label %21
21: ; preds = %17, %16, %9
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @xstrcmp(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %10
10: ; preds = %4, %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ], [ 1, %4 ]
ret i32 %11
}
long extract_tbr(unsigned long insn, int dialect __attribute__((unused)),
                 int *invalid __attribute__((unused))) {
  long ret;
  ret = ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
  if (ret == (268))
    ret = 0;
  return ret;
}


x86 assembly (clang, -O0):
<extract_tbr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
and    $0x1f,%rax
mov    -0x8(%rbp),%rcx
shr    $0x6,%rcx
and    $0x3e0,%rcx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x10c,-0x20(%rbp)
jne    1147 <extract_tbr+0x47>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<extract_tbr>:
mov    %edi,%ecx
shr    $0x10,%ecx
and    $0x1f,%ecx
shr    $0x6,%rdi
and    $0x3e0,%edi
or     %rdi,%rcx
xor    %eax,%eax
cmp    $0x10c,%rcx
cmovne %rcx,%rax
ret

LLVM IR (-O0):
define i64 @extract_tbr(i64 %0, i32 %1, i32* %2) {
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i64
store i64 %0, i64* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i64, i64* %4
%9 = lshr i64 %8, 16
%10 = and i64 %9, 31
%11 = load i64, i64* %4
%12 = lshr i64 %11, 6
%13 = and i64 %12, 992
%14 = or i64 %10, %13
store i64 %14, i64* %7
%15 = load i64, i64* %7
%16 = icmp eq i64 %15, 268
br i1 %16, label %17, label %18
17: ; preds = %3
store i64 0, i64* %7
br label %18
18: ; preds = %17, %3
%19 = load i64, i64* %7
ret i64 %19
}

LLVM IR (-O2):
define i64 @extract_tbr(i64 %0, i32 %1, i32* nocapture readnone %2) {
%4 = lshr i64 %0, 16
%5 = and i64 %4, 31
%6 = lshr i64 %0, 6
%7 = and i64 %6, 992
%8 = or i64 %5, %7
%9 = icmp eq i64 %8, 268
%10 = select i1 %9, i64 0, i64 %8
ret i64 %10
}
/* Type definitions */
struct target {
  int dummy;
};

/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ snprintf(char *, int, char *);
char *dump_sys_getgid(int depth, struct target *target) {
  char *param_str = malloc(5);
  snprintf(param_str, 5, "void");
  return param_str;
}


x86 assembly (clang, -O0):
<dump_sys_getgid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x5,%esi
lea    0xeb3(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_sys_getgid>:
push   %rbx
mov    $0x5,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rdx
mov    %rax,%rdi
mov    $0x5,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.target = type { i32 }
@.str = [5 x i8] c"void\00"
define i8* @dump_sys_getgid(i32 %0, %struct.target* %1) {
%3 = alloca i32
%4 = alloca %struct.target*
%5 = alloca i8*
store i32 %0, i32* %3
store %struct.target* %1, %struct.target** %4
%6 = call i8* @malloc(i32 5)
store i8* %6, i8** %5
%7 = load i8*, i8** %5
%8 = call i32 @snprintf(i8* %7, i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
%struct.target = type { i32 }
@.str = [5 x i8] c"void\00"
define i8* @dump_sys_getgid(i32 %0, %struct.target* nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(5) i8* @malloc(i32 5)
%4 = tail call i32 @snprintf(i8* %3, i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, float *, int);
uint32_t toRep32(float x) {
  uint32_t ret;
  memcpy(&ret, &x, 4);
  return ret;
}


x86 assembly (clang, -O0):
<toRep32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toRep32>:
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @toRep32(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = call i32 @memcpy(i32* %3, float* %2, i32 4)
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
define i32 @toRep32(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = bitcast i32* %3 to i8*
%5 = call i32 @memcpy(i32* %3, float* %2, i32 4)
%6 = load i32, i32* %3
ret i32 %6
}