xunge/DecIR huggingface dataset:
int ft_sqrt(int nb) {
  int root;
  root = 0;
  if (nb < 0) {
    return (0);
  }
  while (root < 46341) {
    if (nb == root * root) {
      return (root);
    }
    root++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<ft_sqrt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1124 <ft_sqrt+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1168 <ft_sqrt+0x68>
jmp    1129 <ft_sqrt+0x29>
cmpl   $0xb505,-0xc(%rbp)
jge    1161 <ft_sqrt+0x61>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
imul   -0xc(%rbp),%ecx
cmp    %ecx,%eax
jne    1153 <ft_sqrt+0x53>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <ft_sqrt+0x68>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <ft_sqrt+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sqrt>:
test   %edi,%edi
js     113c <ft_sqrt+0x3c>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
mov    %ecx,%eax
imul   %ecx,%eax
cmp    %edi,%eax
je     113f <ft_sqrt+0x3f>
lea    0x1(%rcx),%eax
mov    %eax,%edx
imul   %eax,%edx
cmp    %edi,%edx
je     113e <ft_sqrt+0x3e>
lea    0x2(%rcx),%eax
mov    %eax,%edx
imul   %eax,%edx
cmp    %edi,%edx
je     113e <ft_sqrt+0x3e>
add    $0x3,%ecx
cmp    $0xb505,%ecx
jne    1110 <ft_sqrt+0x10>
xor    %eax,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_sqrt(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %18, label %3
3: ; preds = %1, %15
%4 = phi i32 [ %16, %15 ], [ 0, %1 ]
%5 = mul nuw nsw i32 %4, %4
%6 = icmp eq i32 %5, %0
br i1 %6, label %18, label %7
7: ; preds = %3
%8 = add nuw nsw i32 %4, 1
%9 = mul nuw nsw i32 %8, %8
%10 = icmp eq i32 %9, %0
br i1 %10, label %18, label %11
11: ; preds = %7
%12 = add nuw nsw i32 %4, 2
%13 = mul nuw nsw i32 %12, %12
%14 = icmp eq i32 %13, %0
br i1 %14, label %18, label %15
15: ; preds = %11
%16 = add nuw nsw i32 %4, 3
%17 = icmp eq i32 %16, 46341
br i1 %17, label %18, label %3
18: ; preds = %3, %7, %11, %15, %1
%19 = phi i32 [ 0, %1 ], [ %4, %3 ], [ %8, %7 ], [ %12, %11 ], [ 0, %15 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
double test(double, double);
int main() {
  double retval;
  retval = test(1.0, 2.0);
  if (retval < 0.24 || retval > 0.26)
    _exit(-1);
  _exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed1(%rip),%xmm0
movsd  0xed1(%rip),%xmm1
call   1040 <test@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xeaf(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
ja     1173 <main+0x53>
movsd  -0x10(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    117d <main+0x5d>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>
xor    %edi,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1040 <test@plt>
movsd  0xed2(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     1155 <main+0x35>
ucomisd 0xecc(%rip),%xmm0
ja     1155 <main+0x35>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double @test(double 1.000000e+00, double 2.000000e+00)
store double %3, double* %2
%4 = load double, double* %2
%5 = fcmp olt double %4, 2.400000e-01
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load double, double* %2
%8 = fcmp ogt double %7, 2.600000e-01
br i1 %8, label %9, label %11
9: ; preds = %6, %0
%10 = call i32 @_exit(i32 -1)
unreachable
11: ; preds = %6
%12 = call i32 @_exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call double @test(double 1.000000e+00, double 2.000000e+00)
%2 = fcmp olt double %1, 2.400000e-01
%3 = fcmp ogt double %1, 2.600000e-01
%4 = or i1 %2, %3
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @_exit(i32 -1)
unreachable
7: ; preds = %0
%8 = tail call i32 @_exit(i32 0)
unreachable
}
int bar(int x, int y, int z) { return x >> z; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
mov    %edx,%ecx
mov    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @bar(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* %6
%9 = ashr i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1, i32 %2) {
%4 = ashr i32 %0, %2
ret i32 %4
}
void ReleaseSharedLibrary(void *handle) {}


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

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

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

LLVM IR (-O2):
define void @ReleaseSharedLibrary(i8* nocapture %0) {
ret void
}
int main() {
  int var1;
  char var2[10];
  printf("Endereco de memoria var1: %x\n", &var1);
  printf("Endereco de memoria var2: %x\n", &var2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
lea    -0x12(%rbp),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xee5(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
lea    0xe(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Endereco de memoria var1: %x\0A\00"
@.str.1 = [30 x i8] c"Endereco de memoria var2: %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i8]
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), [10 x i8]* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Endereco de memoria var1: %x\0A\00"
@.str.1 = [30 x i8] c"Endereco de memoria var2: %x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), [10 x i8]* %2)
ret i32 0
}
void device_pm_wait_for_dev(struct device *a, struct device *b) {}


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

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

LLVM IR (-O0):
%struct.device = type opaque
define void @device_pm_wait_for_dev(%struct.device* %0, %struct.device* %1) {
%3 = alloca %struct.device*
%4 = alloca %struct.device*
store %struct.device* %0, %struct.device** %3
store %struct.device* %1, %struct.device** %4
ret void
}

LLVM IR (-O2):
%struct.device = type opaque
define void @device_pm_wait_for_dev(%struct.device* nocapture %0, %struct.device* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int S_ISBLK(int /*<<< orphan*/);
int s_isblk(mode_t mode) { return S_ISBLK(mode); }


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

x86 assembly (clang, -O2):
<s_isblk>:
jmp    1030 <S_ISBLK@plt>

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

LLVM IR (-O2):
define i32 @s_isblk(i32 %0) {
%2 = tail call i32 @S_ISBLK(i32 %0)
ret i32 %2
}
int enclave_kill() { return 0; }


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

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

LLVM IR (-O0):
define i32 @enclave_kill() {
ret i32 0
}

LLVM IR (-O2):
define i32 @enclave_kill() {
ret i32 0
}
void genandi() {}


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

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

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

LLVM IR (-O2):
define void @genandi() {
ret void
}
unsigned char sp_cb_port_eq(void *_p1, void *_p2) { return (0); }


x86 assembly (clang, -O0):
<sp_cb_port_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @sp_cb_port_eq(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i8 0
}

LLVM IR (-O2):
define zeroext i8 @sp_cb_port_eq(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8 0
}
int main() { return 100 << 2; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x190,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 400
}
int avl_max(int lhs, int rhs) { return lhs > rhs ? lhs : rhs; }


x86 assembly (clang, -O0):
<avl_max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <avl_max+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <avl_max+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<avl_max>:
mov    %esi,%eax
cmp    %esi,%edi
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define i32 @avl_max(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 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %3
br label %12
10: ; preds = %2
%11 = load i32, i32* %4
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @avl_max(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void insw(unsigned short port, void *addr, unsigned long count) {
  asm volatile("rep ; ins"
               "w"
               : "=D"(addr), "=c"(count)
               : "d"(port), "0"(addr), "1"(count));
}


x86 assembly (clang, -O0):
<insw>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
rep insw (%dx),%es:(%rdi)
mov    %rdi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insw>:
mov    %rdx,%rcx
mov    %edi,%edx
mov    %rsi,%rdi
rep insw (%dx),%es:(%rdi)
ret

LLVM IR (-O0):
define void @insw(i16 zeroext %0, i8* %1, i64 %2) {
%4 = alloca i16
%5 = alloca i8*
%6 = alloca i64
store i16 %0, i16* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i16, i16* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call { i8*, i64 } asm sideeffect "rep ; insw", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %7, i8* %8, i64 %9)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @insw(i16 zeroext %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep ; insw", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
void freeLinD(double *line) { free(line); }


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

x86 assembly (clang, -O2):
<freeLinD>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @freeLinD(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @free(double* %3)
ret void
}

LLVM IR (-O2):
define void @freeLinD(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret void
}
/* Variables and functions */
int isValid(char *);
int /*<<< orphan*/ printf(char *, int);
void isValidMain(void) {
  char s[] = "{(){[(){}]}[()]}";
  printf("%d\n", isValid(s));
}


x86 assembly (clang, -O0):
<isValidMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%al
mov    %al,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <isValid@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidMain>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x10(%rsp)
mov    %rsp,%rdi
call   1040 <isValid@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.isValidMain.s = [17 x i8] c"{(){[(){}]}[()]}\00"
@.str = [4 x i8] c"%d\0A\00"
define void @isValidMain() {
%1 = alloca [17 x i8]
%2 = bitcast [17 x i8]* %1 to i8*
%3 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%4 = call i32 @isValid(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
@__const.isValidMain.s = [17 x i8] c"{(){[(){}]}[()]}\00"
@.str = [4 x i8] c"%d\0A\00"
define void @isValidMain() {
%1 = alloca [17 x i8]
%2 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%3 = call i32 @isValid(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
int _test_note_off_on(void *buffer) {
  return (((unsigned char *)buffer)[0] & 0xf0) == (0x8 << 4) ||
         (((unsigned char *)buffer)[0] & 0xf0) == (0x9 << 4);
}


x86 assembly (clang, -O0):
<_test_note_off_on>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
and    $0xf0,%ecx
mov    $0x1,%al
cmp    $0x80,%ecx
mov    %al,-0x9(%rbp)
je     113d <_test_note_off_on+0x3d>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0xf0,%eax
cmp    $0x90,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_note_off_on>:
mov    (%rdi),%cl
and    $0xe0,%cl
xor    %eax,%eax
cmp    $0x80,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @_test_note_off_on(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 240
%8 = icmp eq i32 %7, 128
br i1 %8, label %16, label %9
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = and i32 %13, 240
%15 = icmp eq i32 %14, 144
br label %16
16: ; preds = %9, %1
%17 = phi i1 [ true, %1 ], [ %15, %9 ]
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @_test_note_off_on(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -32
%4 = icmp eq i8 %3, -128
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct udcFile {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ udcSeekCur(struct udcFile *, unsigned long long);
void udcSeekCurWrap(void *file, unsigned long long offset) {
  udcSeekCur((struct udcFile *)file, offset);
}


x86 assembly (clang, -O0):
<udcSeekCurWrap>:
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 <udcSeekCur@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udcSeekCurWrap>:
jmp    1030 <udcSeekCur@plt>

LLVM IR (-O0):
%struct.udcFile = type { i32 }
define void @udcSeekCurWrap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.udcFile*
%7 = load i64, i64* %4
%8 = call i32 @udcSeekCur(%struct.udcFile* %6, i64 %7)
ret void
}

LLVM IR (-O2):
%struct.udcFile = type { i32 }
define void @udcSeekCurWrap(i8* %0, i64 %1) {
%3 = bitcast i8* %0 to %struct.udcFile*
%4 = tail call i32 @udcSeekCur(%struct.udcFile* %3, i64 %1)
ret void
}
/* Variables and functions */
char rot13(char);
int strlen(char *);
char *srot13(char *str) {
  int length = strlen(str);
  for (int i = 0; i < length; i++) {
    str[i] = rot13(str[i]);
  }
  return str;
}


x86 assembly (clang, -O0):
<srot13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <srot13+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <rot13@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113f <srot13+0x1f>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<srot13>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1040 <strlen@plt>
test   %eax,%eax
jle    1157 <srot13+0x37>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <rot13@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <srot13+0x20>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @srot13(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %7
6: ; preds = %7, %1
ret i8* %0
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call signext i8 @rot13(i8 signext %10)
store i8 %11, i8* %9
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t q15_mul(const int32_t j, const int32_t k) {
  const int32_t intermediate = j * k;
  return (intermediate + ((intermediate & 0x7FFF) == 0x4000 ? 0 : 0x4000)) >>
         15;
}


x86 assembly (clang, -O0):
<q15_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0xc(%rbp),%esi
and    $0x7fff,%esi
mov    $0x4000,%ecx
xor    %edx,%edx
cmp    $0x4000,%esi
cmove  %edx,%ecx
add    %ecx,%eax
sar    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<q15_mul>:
imul   %esi,%edi
mov    %edi,%ecx
and    $0x7fff,%ecx
xor    %eax,%eax
cmp    $0x4000,%ecx
setne  %al
shl    $0xe,%eax
add    %edi,%eax
sar    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @q15_mul(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = mul nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %5
%11 = and i32 %10, 32767
%12 = icmp eq i32 %11, 16384
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 16384
%15 = add nsw i32 %9, %14
%16 = ashr i32 %15, 15
ret i32 %16
}

LLVM IR (-O2):
define i32 @q15_mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
%4 = and i32 %3, 32767
%5 = icmp eq i32 %4, 16384
%6 = select i1 %5, i32 0, i32 16384
%7 = add nsw i32 %6, %3
%8 = ashr i32 %7, 15
ret i32 %8
}
float MMtoDBFineMode(float mm) {
  float maxVal = 30;
  float minVal = -90;
  float db;
  db = minVal + (maxVal - minVal) * mm / 100.;
  return db;
}


x86 assembly (clang, -O0):
<MMtoDBFineMode>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xefb(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xeea(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0xc(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xeb9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMtoDBFineMode>:
mulss  0xef8(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @MMtoDBFineMode(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %2
store float 3.000000e+01, float* %3
store float -9.000000e+01, float* %4
%6 = load float, float* %4
%7 = fpext float %6 to double
%8 = load float, float* %3
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %2
%12 = fmul float %10, %11
%13 = fpext float %12 to double
%14 = fdiv double %13, 1.000000e+02
%15 = fadd double %7, %14
%16 = fptrunc double %15 to float
store float %16, float* %5
%17 = load float, float* %5
ret float %17
}

LLVM IR (-O2):
define float @MMtoDBFineMode(float %0) {
%2 = fmul float %0, 1.200000e+02
%3 = fpext float %2 to double
%4 = fdiv double %3, 1.000000e+02
%5 = fadd double %4, -9.000000e+01
%6 = fptrunc double %5 to float
ret float %6
}
void test_bsp_bad_block_mangement(char *partition_name,
                                  unsigned int partition_offset) {}


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

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

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

LLVM IR (-O2):
define void @test_bsp_bad_block_mangement(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int create_cascade_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(164, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<create_cascade_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xa4,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_cascade_homotopy>:
mov    $0xa4,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @create_cascade_homotopy() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 164, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int test_imm_83uint16_mem(unsigned short *val) {
  return ((*val) & (0x83 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_83uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 131
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct value {
  int dummy;
};

/* Variables and functions */
struct value *pop();
int /*<<< orphan*/ stack_free_value(struct value *);
void drop(void) {
  struct value *v = pop();
  if (v != NULL)
    stack_free_value(v);
}


x86 assembly (clang, -O0):
<drop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <pop@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1147 <drop+0x27>
mov    -0x8(%rbp),%rdi
call   1040 <stack_free_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop>:
push   %rax
xor    %eax,%eax
call   1030 <pop@plt>
test   %rax,%rax
je     1136 <drop+0x16>
mov    %rax,%rdi
pop    %rax
jmp    1040 <stack_free_value@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.value = type { i32 }
define void @drop() {
%1 = alloca %struct.value*
%2 = call %struct.value* (...) @pop()
store %struct.value* %2, %struct.value** %1
%3 = load %struct.value*, %struct.value** %1
%4 = icmp ne %struct.value* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load %struct.value*, %struct.value** %1
%7 = call i32 @stack_free_value(%struct.value* %6)
br label %8
8: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
%struct.value = type { i32 }
define void @drop() {
%1 = tail call %struct.value* (...) @pop()
%2 = icmp eq %struct.value* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @stack_free_value(%struct.value* %1)
br label %5
5: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BSP_SD_IRQHandler();
void SDIO_IRQHandler(void) { BSP_SD_IRQHandler(); }


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

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

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

LLVM IR (-O2):
define void @SDIO_IRQHandler() {
%1 = tail call i32 (...) @BSP_SD_IRQHandler()
ret void
}
int add(int a, int b) {
  int temp;
  asm("movl $1, %eax");
  asm("movl $2, %ebx");
  asm("addl %ebx, %eax");
  asm("movl %%eax, %0" : "=r"(temp));
  printf("temp: %d\n", temp);
  return a + b;
}


x86 assembly (clang, -O0):
<add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%eax
mov    $0x2,%ebx
add    %ebx,%eax
mov    %eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x1,%eax
mov    $0x2,%ebx
add    %ebx,%eax
mov    %eax,%esi
lea    0xed4(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"temp: %d\0A\00"
define i32 @add(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 asm "movl %eax, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
store i32 %6, i32* %5
%7 = load i32, i32* %5
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
@.str = [10 x i8] c"temp: %d\0A\00"
define i32 @add(i32 %0, i32 %1) {
tail call void asm sideeffect "movl $$1, %eax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "movl $$2, %ebx", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "addl %ebx, %eax", "~{dirflag},~{fpsr},~{flags}"()
%3 = tail call i32 asm "movl %eax, $0", "=r,~{dirflag},~{fpsr},~{flags}"()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = add nsw i32 %1, %0
ret i32 %5
}
/* Variables and functions */
unsigned int pow(int, unsigned int);
unsigned eval(unsigned long numberSquared, unsigned len) {
  unsigned div, rem;
  div = numberSquared / pow(10, len);
  rem = numberSquared - (div * pow(10, len));
  return div + rem;
}


x86 assembly (clang, -O0):
<eval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,%ecx
xor    %edx,%edx
div    %rcx
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0xc(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
mov    -0x24(%rbp),%ecx
mov    %eax,%edx
mov    -0x20(%rbp),%rax
imul   %edx,%ecx
mov    %ecx,%ecx
sub    %rcx,%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eval>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    %rbx,%rax
shr    $0x20,%rax
je     113c <eval+0x2c>
mov    %rbx,%rax
xor    %edx,%edx
div    %rcx
mov    %rax,%rbp
jmp    1144 <eval+0x34>
mov    %ebx,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%ebp
mov    $0xa,%edi
mov    %r14d,%esi
call   1030 <pow@plt>
imul   %ebp,%eax
add    %ebp,%ebx
sub    %eax,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @eval(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%7 = load i64, i64* %3
%8 = load i32, i32* %4
%9 = call i32 @pow(i32 10, i32 %8)
%10 = zext i32 %9 to i64
%11 = udiv i64 %7, %10
%12 = trunc i64 %11 to i32
store i32 %12, i32* %5
%13 = load i64, i64* %3
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @pow(i32 10, i32 %15)
%17 = mul i32 %14, %16
%18 = zext i32 %17 to i64
%19 = sub i64 %13, %18
%20 = trunc i64 %19 to i32
store i32 %20, i32* %6
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = add i32 %21, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @eval(i64 %0, i32 %1) {
%3 = tail call i32 @pow(i32 10, i32 %1)
%4 = zext i32 %3 to i64
%5 = udiv i64 %0, %4
%6 = trunc i64 %5 to i32
%7 = tail call i32 @pow(i32 10, i32 %1)
%8 = mul i32 %7, %6
%9 = trunc i64 %0 to i32
%10 = add i32 %6, %9
%11 = sub i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ _MLPrintLog(int, int /*<<< orphan*/ *, char *, char const *,
                               char const *, int, int);
void __print_result_location(int result, const char *file, const char *func,
                             int line) {
  _MLPrintLog((6), NULL, "%s|%s|%d returning %d\n", file, func, line, result);
}


x86 assembly (clang, -O0):
<__print_result_location>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    -0x4(%rbp),%eax
mov    $0x6,%edi
xor    %edx,%edx
mov    %edx,%esi
lea    0xebb(%rip),%rdx
mov    %eax,(%rsp)
call   1030 <_MLPrintLog@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__print_result_location>:
push   %rax
mov    %ecx,%r9d
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %edi,(%rsp)
lea    0xedc(%rip),%rdx
mov    $0x6,%edi
xor    %esi,%esi
call   1030 <_MLPrintLog@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"%s|%s|%d returning %d\0A\00"
define void @__print_result_location(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = load i32, i32* %5
%13 = call i32 @_MLPrintLog(i32 6, i32* null, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s|%s|%d returning %d\0A\00"
define void @__print_result_location(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @_MLPrintLog(i32 6, i32* null, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i32 %3, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rl_end_of_line();
int /*<<< orphan*/ rl_vi_append_mode();
rl_vi_append_eol() {
  rl_end_of_line();
  rl_vi_append_mode();
  return 0;
}


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

x86 assembly (clang, -O2):
<rl_vi_append_eol>:
push   %rax
xor    %eax,%eax
call   1040 <rl_end_of_line@plt>
xor    %eax,%eax
call   1030 <rl_vi_append_mode@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rl_vi_append_eol() {
%1 = call i32 (...) @rl_end_of_line()
%2 = call i32 (...) @rl_vi_append_mode()
ret i32 0
}

LLVM IR (-O2):
define i32 @rl_vi_append_eol() {
%1 = tail call i32 (...) @rl_end_of_line()
%2 = tail call i32 (...) @rl_vi_append_mode()
ret i32 0
}
void I420ToNV21() {}


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

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

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

LLVM IR (-O2):
define void @I420ToNV21() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, c;
  double average;
  scanf("%d %d %d", &a, &b, &c);
  average = (a + b + c) / 3.0;
  printf("%.1lf점", average);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  0xea4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xedd(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x10(%rsp),%eax
add    0x14(%rsp),%eax
add    0xc(%rsp),%eax
cvtsi2sd %eax,%xmm0
divsd  0xea9(%rip),%xmm0
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [9 x i8] c"%.1lf\EC\A0\90\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 0, i32* %1
%6 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
%12 = sitofp i32 %11 to double
%13 = fdiv double %12, 3.000000e+00
store double %13, double* %5
%14 = load double, double* %5
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%d %d %d\00"
@.str.1 = [9 x i8] c"%.1lf\EC\A0\90\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, %8
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
%13 = sitofp i32 %12 to double
%14 = fdiv double %13, 3.000000e+00
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), double %14)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getchar();
void exitCallback(int fd, short int revents, short int *gotEvents,
                  void *dummy) {
  while (getchar() != 10)
    ;
  exit(0);
}


x86 assembly (clang, -O0):
<exitCallback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
cmp    $0xa,%eax
je     114f <exitCallback+0x2f>
jmp    113a <exitCallback+0x1a>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitCallback>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0xa,%eax
jne    1130 <exitCallback+0x10>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @exitCallback(i32 %0, i16 signext %1, i16* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i16
%7 = alloca i16*
%8 = alloca i8*
store i32 %0, i32* %5
store i16 %1, i16* %6
store i16* %2, i16** %7
store i8* %3, i8** %8
br label %9
9: ; preds = %12, %4
%10 = call i32 (...) @getchar()
%11 = icmp ne i32 %10, 10
br i1 %11, label %12, label %13
12: ; preds = %9
br label %9
13: ; preds = %9
%14 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @exitCallback(i32 %0, i16 signext %1, i16* nocapture readnone %2, i8* nocapture readnone %3) {
br label %5
5: ; preds = %5, %4
%6 = tail call i32 (...) @getchar()
%7 = icmp eq i32 %6, 10
br i1 %7, label %8, label %5
8: ; preds = %5
%9 = tail call i32 @exit(i32 0)
unreachable
}
void gdk_window_freeze_updates() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_freeze_updates() {
ret void
}
/* Variables and functions */
float quatinvsqmagnitude(float const *);
int /*<<< orphan*/ quatscale(float *, float const *, float);
void quatnormalize(float *qout, const float *qin) {
  float imag = quatinvsqmagnitude(qin);
  quatscale(qout, qin, imag);
}


x86 assembly (clang, -O0):
<quatnormalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <quatinvsqmagnitude@plt>
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movss  -0x14(%rbp),%xmm0
call   1030 <quatscale@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quatnormalize>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <quatinvsqmagnitude@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <quatscale@plt>

LLVM IR (-O0):
define void @quatnormalize(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca float
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %4
%7 = call float @quatinvsqmagnitude(float* %6)
store float %7, float* %5
%8 = load float*, float** %3
%9 = load float*, float** %4
%10 = load float, float* %5
%11 = call i32 @quatscale(float* %8, float* %9, float %10)
ret void
}

LLVM IR (-O2):
define void @quatnormalize(float* %0, float* %1) {
%3 = tail call float @quatinvsqmagnitude(float* %1)
%4 = tail call i32 @quatscale(float* %0, float* %1, float %3)
ret void
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
scalar_t__ get_tics();
void delay_to(int64_t until) {
  while (get_tics() < until)
    ;
}


x86 assembly (clang, -O0):
<delay_to>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_tics@plt>
cmp    -0x8(%rbp),%rax
jge    1132 <delay_to+0x22>
jmp    111c <delay_to+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_to>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <get_tics@plt>
cmp    %rbx,%rax
jl     1120 <delay_to+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @delay_to(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
br label %3
3: ; preds = %7, %1
%4 = call i64 (...) @get_tics()
%5 = load i64, i64* %2
%6 = icmp slt i64 %4, %5
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay_to(i64 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 (...) @get_tics()
%4 = icmp slt i64 %3, %0
br i1 %4, label %2, label %5
5: ; preds = %2
ret void
}
char *sprintf(buf, fmt, data)
char *fmt, *buf;
int data;
{ return (do_printf(buf, fmt, &data)); }


x86 assembly (clang, -O0):
<sprintf>:
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
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1030 <do_printf@plt>
cltq
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprintf>:
push   %rax
mov    %edx,0x4(%rsp)
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1030 <do_printf@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @sprintf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = call i32 (i8*, i8*, i32*, ...) bitcast (i32 (...)* @do_printf to i32 (i8*, i8*, i32*, ...)*)(i8* %7, i8* %8, i32* %6)
%10 = sext i32 %9 to i64
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @sprintf(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
store i32 %2, i32* %4
%5 = call i32 (i8*, i8*, i32*, ...) bitcast (i32 (...)* @do_printf to i32 (i8*, i8*, i32*, ...)*)(i8* %0, i8* %1, i32* %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
void nxtd_usb_close(struct nxtd_nxt_usb *nxt) {}


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

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

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

LLVM IR (-O2):
%struct.nxtd_nxt_usb = type opaque
define void @nxtd_usb_close(%struct.nxtd_nxt_usb* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void putLDCharUM(void) { printf("\x01B(0\x076\x01B(B"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1B(0v\1B(B\00"
define void @putLDCharUM() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B(0v\1B(B\00"
define void @putLDCharUM() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rotl(const uint32_t x, int k) { return (x << k) | (x >> (32 - k)); }


x86 assembly (clang, -O0):
<rotl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotl(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotl(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int i;
  while (i < 25) {
    printf("%d\n", i);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x19,-0x14(%rbp)
jge    114d <main+0x3d>
mov    -0x14(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int func(void) {
  int n = 3;
  int m = 5;
  n / m;
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
void ARGB1555ToI420() {}


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

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

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

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