xunge/DecIR huggingface dataset:
int test_imm_82uint8_reg(unsigned char val) {
  return ((val) & (0x82 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_82uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x82,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_82uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 130
%6 = icmp ne i32 %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_82uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -126
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int *st;
  *st = 100;
  printf("%p\n", *st);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x64,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = load i32*, i32** %2
store i32 100, i32* %3
%4 = load i32*, i32** %2
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ alloc_failed();
void *calloc(size_t, size_t);
void *xcalloc(size_t nmemb, size_t size) {
  void *result = calloc(nmemb, size);
  if (result == NULL && nmemb > 0 && size > 0)
    alloc_failed();
  return result;
}


x86 assembly (clang, -O0):
<xcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1169 <xcalloc+0x49>
cmpq   $0x0,-0x8(%rbp)
jbe    1169 <xcalloc+0x49>
cmpq   $0x0,-0x10(%rbp)
jbe    1169 <xcalloc+0x49>
mov    $0x0,%al
call   1040 <alloc_failed@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcalloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r15
call   1030 <calloc@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     1149 <xcalloc+0x29>
test   %r15,%r15
je     1149 <xcalloc+0x29>
test   %r14,%r14
jne    1149 <xcalloc+0x29>
xor    %eax,%eax
call   1040 <alloc_failed@plt>
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define noalias i8* @xcalloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
%5 = icmp ne i64 %0, 0
%6 = and i1 %5, %4
%7 = icmp ne i64 %1, 0
%8 = and i1 %7, %6
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 (...) @alloc_failed()
br label %11
11: ; preds = %9, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
float division(int dividendo, int divisor) {
  if (divisor) {
    return dividendo / divisor;
  } else {
    printf("No se puede dividir por cero\n");
    return 0;
  }
}


x86 assembly (clang, -O0):
<division>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113d <division+0x2d>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1151 <division+0x41>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<division>:
test   %esi,%esi
je     111e <division+0xe>
mov    %edi,%eax
cltd
idiv   %esi
cvtsi2ss %eax,%xmm0
ret
push   %rax
lea    0xeda(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"No se puede dividir por cero\0A\00"
define float @division(i32 %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = sdiv i32 %9, %10
%12 = sitofp i32 %11 to float
store float %12, float* %3
br label %15
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
store float 0.000000e+00, float* %3
br label %15
15: ; preds = %13, %8
%16 = load float, float* %3
ret float %16
}

LLVM IR (-O2):
@str = [29 x i8] c"No se puede dividir por cero\00"
define float @division(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = sdiv i32 %0, %1
%6 = sitofp i32 %5 to float
br label %9
7: ; preds = %2
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
%10 = phi float [ %6, %4 ], [ 0.000000e+00, %7 ]
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int foo(int);
int main() {
  if (foo(0) != 2 || foo(1) != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <foo@plt>
cmp    $0x2,%eax
jne    1152 <main+0x32>
mov    $0x1,%edi
call   1040 <foo@plt>
cmp    $0x1,%eax
je     1159 <main+0x39>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <foo@plt>
cmp    $0x2,%eax
jne    1140 <main+0x20>
mov    $0x1,%edi
call   1040 <foo@plt>
cmp    $0x1,%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 0)
%2 = icmp eq i32 %1, 2
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @foo(i32 1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %3, %0
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %3
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ posix_spawnattr_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int posix_spawnattr_destroy(posix_spawnattr_t *attr) {
  ;
  errno = ENOSYS;
  return -1;
  ;
}


x86 assembly (clang, -O0):
<posix_spawnattr_destroy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<posix_spawnattr_destroy>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_destroy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @posix_spawnattr_destroy(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void error() {
  printf("ERROR\n");
  exit(1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"ERROR\0A\00"
define void @error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [6 x i8] c"ERROR\00"
define void @error() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(int argc, char *argv[]) {
  struct them_bits {
    signed a : 3;
    signed b : 3;
    signed c : 2;
  } example;
  example.a = 1 | 2 | 4 | 8;
  example.b = -14;
  example.c = 117;
  printf("(1 | 2 | 4 | 8): %d\n-14: %d\n117: %d\n", example.a, example.b,
         example.c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%al
and    $0xf8,%al
or     $0x7,%al
mov    %al,-0x18(%rbp)
mov    -0x18(%rbp),%al
and    $0xc7,%al
or     $0x10,%al
mov    %al,-0x18(%rbp)
mov    -0x18(%rbp),%al
and    $0x3f,%al
or     $0x40,%al
mov    %al,-0x18(%rbp)
mov    -0x18(%rbp),%al
shl    $0x5,%al
sar    $0x5,%al
movsbl %al,%esi
mov    -0x18(%rbp),%al
shl    $0x2,%al
sar    $0x5,%al
movsbl %al,%edx
mov    -0x18(%rbp),%al
sar    $0x6,%al
movsbl %al,%ecx
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.them_bits = type { i8, [3 x i8] }
@.str = [37 x i8] c"(1 | 2 | 4 | 8): %d\0A-14: %d\0A117: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca %struct.them_bits
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = bitcast %struct.them_bits* %5 to i8*
%7 = load i8, i8* %6
%8 = and i8 %7, -8
%9 = or i8 %8, 7
store i8 %9, i8* %6
%10 = bitcast %struct.them_bits* %5 to i8*
%11 = load i8, i8* %10
%12 = and i8 %11, -57
%13 = or i8 %12, 16
store i8 %13, i8* %10
%14 = bitcast %struct.them_bits* %5 to i8*
%15 = load i8, i8* %14
%16 = and i8 %15, 63
%17 = or i8 %16, 64
store i8 %17, i8* %14
%18 = bitcast %struct.them_bits* %5 to i8*
%19 = load i8, i8* %18
%20 = shl i8 %19, 5
%21 = ashr i8 %20, 5
%22 = sext i8 %21 to i32
%23 = bitcast %struct.them_bits* %5 to i8*
%24 = load i8, i8* %23
%25 = shl i8 %24, 2
%26 = ashr i8 %25, 5
%27 = sext i8 %26 to i32
%28 = bitcast %struct.them_bits* %5 to i8*
%29 = load i8, i8* %28
%30 = ashr i8 %29, 6
%31 = sext i8 %30 to i32
%32 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %27, i32 %31)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"(1 | 2 | 4 | 8): %d\0A-14: %d\0A117: %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 -1, i32 2, i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int askNumber() {
  int number = 0;
  while (number > 20 || number < 10) {
    printf("Please enter a value between 10 and 20: ");
    scanf("%d", &number);
  }
  return number;
}


x86 assembly (clang, -O0):
<askNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x14,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     1148 <askNumber+0x28>
cmpl   $0xa,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    1158 <askNumber+0x38>
jmp    1179 <askNumber+0x59>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
lea    0xebe(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
jmp    112f <askNumber+0xf>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<askNumber>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
lea    0xec8(%rip),%r14
lea    0xeea(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
lea    -0x15(%rax),%ecx
cmp    $0xfffffff5,%ecx
jb     1150 <askNumber+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [41 x i8] c"Please enter a value between 10 and 20: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @askNumber() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = add i32 %6, -21
%8 = icmp ult i32 %7, -11
br i1 %8, label %3, label %9
9: ; preds = %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ current_mode();
void mode_handle(void) { current_mode(); }


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

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

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

LLVM IR (-O2):
define void @mode_handle() {
%1 = tail call i32 (...) @current_mode()
ret void
}
int changeValue() {
  int intArray[10];
  int *intPtr1 = intArray;
  int *intPtr2;
  return intArray[5];
}


x86 assembly (clang, -O0):
<changeValue>:
push   %rbp
mov    %rsp,%rbp
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @changeValue() {
%1 = alloca [10 x i32]
%2 = alloca i32*
%3 = alloca i32*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @changeValue() {
ret i32 undef
}
float getMin(float a, float b, float c) {
  if ((a < b) && (a < c))
    return a;
  if ((b < a) && (b < c))
    return b;
  else
    return c;
}


x86 assembly (clang, -O0):
<getMin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1148 <getMin+0x48>
movss  -0x8(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1148 <getMin+0x48>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1187 <getMin+0x87>
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    117d <getMin+0x7d>
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    117d <getMin+0x7d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1187 <getMin+0x87>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMin>:
movaps %xmm1,%xmm3
minss  %xmm2,%xmm3
movaps %xmm0,%xmm4
cmpltss %xmm1,%xmm4
cmpltss %xmm0,%xmm1
andps  %xmm1,%xmm3
andnps %xmm2,%xmm1
orps   %xmm3,%xmm1
movaps %xmm0,%xmm3
cmpltss %xmm2,%xmm3
andps  %xmm3,%xmm0
andnps %xmm1,%xmm3
orps   %xmm3,%xmm0
andps  %xmm4,%xmm0
andnps %xmm1,%xmm4
orps   %xmm4,%xmm0
ret

LLVM IR (-O0):
define float @getMin(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp olt float %8, %9
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load float, float* %5
%13 = load float, float* %7
%14 = fcmp olt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load float, float* %5
store float %16, float* %4
br label %29
17: ; preds = %11, %3
%18 = load float, float* %6
%19 = load float, float* %5
%20 = fcmp olt float %18, %19
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = load float, float* %6
%23 = load float, float* %7
%24 = fcmp olt float %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load float, float* %6
store float %26, float* %4
br label %29
27: ; preds = %21, %17
%28 = load float, float* %7
store float %28, float* %4
br label %29
29: ; preds = %27, %25, %15
%30 = load float, float* %4
ret float %30
}

LLVM IR (-O2):
define float @getMin(float %0, float %1, float %2) {
%4 = fcmp olt float %0, %1
%5 = fcmp olt float %0, %2
%6 = and i1 %4, %5
%7 = fcmp olt float %1, %0
%8 = fcmp olt float %1, %2
%9 = and i1 %7, %8
%10 = select i1 %9, float %1, float %2
%11 = select i1 %6, float %0, float %10
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test_pre_solib(void) {
  printf("This is a \"pre_solib\" target.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"This is a \22pre_solib\22 target.\0A\00"
define i32 @test_pre_solib() {
%1 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [30 x i8] c"This is a \22pre_solib\22 target.\00"
define i32 @test_pre_solib() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int mkostemps(char *, int, int);
int no_resourceLeak_mkostemps_02(char *template, int suffixlen, int flags) {
  return mkostemps(template, suffixlen, flags);
}


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

x86 assembly (clang, -O2):
<no_resourceLeak_mkostemps_02>:
jmp    1030 <mkostemps@plt>

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

LLVM IR (-O2):
define i32 @no_resourceLeak_mkostemps_02(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @mkostemps(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
void RTS3DeleteKey(void) {}


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

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

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

LLVM IR (-O2):
define void @RTS3DeleteKey() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gauaw(size_t, double *, double *);
void gaussaw(double *restrict pa, double *restrict pw, size_t nlat) {
  gauaw(nlat, pa, pw);
}


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

x86 assembly (clang, -O2):
<gaussaw>:
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <gauaw@plt>

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

LLVM IR (-O2):
define void @gaussaw(double* noalias %0, double* noalias %1, i64 %2) {
%4 = tail call i32 @gauaw(i64 %2, double* %0, double* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_file;

/* Variables and functions */
int SQLITE_OK;
int /*<<< orphan*/ printfHelper(char *);
int scmClose(sqlite3_file *pFile) {
  printfHelper("scmClose\n");
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<scmClose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printfHelper@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scmClose>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printfHelper@plt>
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"scmClose\0A\00"
@SQLITE_OK = global i32 0
define i32 @scmClose(i32* nocapture readnone %0) {
%2 = tail call i32 @printfHelper(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @SQLITE_OK
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ w836xx_memw_enable(int);
int w836xx_memw_enable_4e(void) {
  w836xx_memw_enable(0x4E);
  return 0;
}


x86 assembly (clang, -O0):
<w836xx_memw_enable_4e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4e,%edi
call   1030 <w836xx_memw_enable@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<w836xx_memw_enable_4e>:
push   %rax
mov    $0x4e,%edi
call   1030 <w836xx_memw_enable@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @w836xx_memw_enable_4e() {
%1 = call i32 @w836xx_memw_enable(i32 78)
ret i32 0
}

LLVM IR (-O2):
define i32 @w836xx_memw_enable_4e() {
%1 = tail call i32 @w836xx_memw_enable(i32 78)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint16_t;

/* Variables and functions */
uint16_t pgm_read_word(const void *s) { return *(const uint16_t *)s; }


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

x86 assembly (clang, -O2):
<pgm_read_word>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @pgm_read_word(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @pgm_read_word(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
int string_has_ctrl_or_space(const char *string) {
  for (; *string; string++)
    if (!(*string & 0x80) && *string <= 0x20)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<string_has_ctrl_or_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115c <string_has_ctrl_or_space+0x5c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    1146 <string_has_ctrl_or_space+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jg     1146 <string_has_ctrl_or_space+0x46>
movl   $0x1,-0x4(%rbp)
jmp    1163 <string_has_ctrl_or_space+0x63>
jmp    114b <string_has_ctrl_or_space+0x4b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <string_has_ctrl_or_space+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_has_ctrl_or_space>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <string_has_ctrl_or_space+0x20>
add    $0x1,%rdi
nopl   0x0(%rax)
cmp    $0x20,%cl
jbe    1121 <string_has_ctrl_or_space+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <string_has_ctrl_or_space+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @string_has_ctrl_or_space(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %7
4: ; preds = %7
%5 = load i8, i8* %11
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %11, %4 ], [ %0, %1 ]
%10 = icmp ult i8 %8, 33
%11 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %10, label %12, label %4
12: ; preds = %7, %4, %1
%13 = phi i32 [ 0, %1 ], [ 0, %4 ], [ 1, %7 ]
ret i32 %13
}
/* Type definitions */
struct libavl_allocator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ free(void *);
void bst_free(struct libavl_allocator *allocator, void *block) {
  assert(allocator != NULL && block != NULL);
  free(block);
}


x86 assembly (clang, -O0):
<bst_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     114b <bst_free+0x2b>
cmpq   $0x0,-0x10(%rbp)
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bst_free>:
push   %rbx
mov    %rsi,%rbx
test   %rdi,%rdi
setne  %al
test   %rsi,%rsi
setne  %cl
and    %al,%cl
movzbl %cl,%edi
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.libavl_allocator = type { i32 }
define void @bst_free(%struct.libavl_allocator* %0, i8* %1) {
%3 = alloca %struct.libavl_allocator*
%4 = alloca i8*
store %struct.libavl_allocator* %0, %struct.libavl_allocator** %3
store i8* %1, i8** %4
%5 = load %struct.libavl_allocator*, %struct.libavl_allocator** %3
%6 = icmp ne %struct.libavl_allocator* %5, null
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i8*, i8** %4
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
%struct.libavl_allocator = type { i32 }
define void @bst_free(%struct.libavl_allocator* readnone %0, i8* %1) {
%3 = icmp ne %struct.libavl_allocator* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 @free(i8* %1)
ret void
}
void pfree(int *frame) {}


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

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

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

LLVM IR (-O2):
define void @pfree(i32* nocapture %0) {
ret void
}
int size_from_scanmode(int num_vals, int timestamp) {
  if (num_vals && timestamp)
    return 16;
  else if (timestamp)
    return 8;
  else
    return num_vals * 2;
}


x86 assembly (clang, -O0):
<size_from_scanmode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <size_from_scanmode+0x2a>
cmpl   $0x0,-0xc(%rbp)
je     112a <size_from_scanmode+0x2a>
movl   $0x10,-0x4(%rbp)
jmp    1149 <size_from_scanmode+0x49>
cmpl   $0x0,-0xc(%rbp)
je     1140 <size_from_scanmode+0x40>
movl   $0x8,-0x4(%rbp)
jmp    1149 <size_from_scanmode+0x49>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_from_scanmode>:
lea    (%rdi,%rdi,1),%eax
test   %esi,%esi
mov    $0x8,%ecx
cmove  %eax,%ecx
mov    $0x10,%eax
cmove  %ecx,%eax
test   %edi,%edi
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @size_from_scanmode(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
%6 = shl nsw i32 %0, 1
%7 = select i1 %4, i32 8, i32 %6
%8 = select i1 %5, i32 16, i32 %7
ret i32 %8
}
void ff_hevc_put_hevc_pel_pixels64_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_pel_pixels64_8_avx2() {
ret void
}
void dogechat_backtrace_addr2line(int number, void *address,
                                  const char *symbol) {
  (void)number;
  (void)address;
  (void)symbol;
}


x86 assembly (clang, -O0):
<dogechat_backtrace_addr2line>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @dogechat_backtrace_addr2line(i32 %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
void do_sys_nop() {}


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

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

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

LLVM IR (-O2):
define void @do_sys_nop() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long colormap;
};
typedef TYPE_1__ XStandardColormap;

/* Variables and functions */
void set_XStandardColormap_colormap(void *_p, unsigned long _v) {
  ((XStandardColormap *)_p)->colormap = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XStandardColormap_colormap(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_var(int, char *);
bool should_send_debug(int fd) { return !get_var(fd, "nodebug"); }


x86 assembly (clang, -O0):
<should_send_debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
call   1030 <get_var@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<should_send_debug>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <get_var@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"nodebug\00"
define i32 @should_send_debug(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @get_var(i32 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [8 x i8] c"nodebug\00"
define i32 @should_send_debug(i32 %0) {
%2 = tail call i32 @get_var(i32 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int cos(double);
int sin(double);
double func(double x, double y) { return sin(y) / (1. + cos(y) * cos(y)); }


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x20(%rbp),%xmm0
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
imul   %ecx,%eax
cvtsi2sd %eax,%xmm2
movsd  0xe8b(%rip),%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rbx
sub    $0x10,%rsp
movaps %xmm1,%xmm0
movsd  %xmm1,(%rsp)
call   1030 <sin@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1040 <cos@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1040 <cos@plt>
imul   %ebx,%eax
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
addsd  0xe99(%rip),%xmm1
movsd  0x8(%rsp),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @func(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = call i32 @sin(double %5)
%7 = sitofp i32 %6 to double
%8 = load double, double* %4
%9 = call i32 @cos(double %8)
%10 = load double, double* %4
%11 = call i32 @cos(double %10)
%12 = mul nsw i32 %9, %11
%13 = sitofp i32 %12 to double
%14 = fadd double 1.000000e+00, %13
%15 = fdiv double %7, %14
ret double %15
}

LLVM IR (-O2):
define double @func(double %0, double %1) {
%3 = tail call i32 @sin(double %1)
%4 = sitofp i32 %3 to double
%5 = tail call i32 @cos(double %1)
%6 = tail call i32 @cos(double %1)
%7 = mul nsw i32 %6, %5
%8 = sitofp i32 %7 to double
%9 = fadd double %8, 1.000000e+00
%10 = fdiv double %4, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M29_f(char *s) {
  debug("M29_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M29_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M29_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"M29_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M29_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"M29_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M29_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exec_child();
int /*<<< orphan*/ strcmp(char *, char *);
int test_main(int, char **);
int main(int argc, char *argv[]) {
  if (!strcmp(argv[0], "exec_child")) {
    exec_child();
    return 1;
  }
  return test_main(argc, argv);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xeac(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1175 <main+0x45>
mov    $0x0,%al
call   1050 <exec_child@plt>
movl   $0x1,-0x4(%rbp)
jmp    1184 <main+0x54>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <test_main@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
lea    0xebe(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     115b <main+0x2b>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <test_main@plt>
xor    %eax,%eax
call   1050 <exec_child@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"exec_child\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 (...) @exec_child()
br label %10
8: ; preds = %2
%9 = tail call i32 @test_main(i32 %0, i8** %1)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %9, %8 ], [ 1, %6 ]
ret i32 %11
}
INSTRUCTION(l_cust3) {}


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

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

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

LLVM IR (-O2):
define i32 @INSTRUCTION(i32 %0) {
ret i32 undef
}
int OPP_SIDE_TAG(int sd) { return 16 - (sd << 3); }


x86 assembly (clang, -O0):
<OPP_SIDE_TAG>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x3,%ecx
mov    $0x10,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OPP_SIDE_TAG>:
shl    $0x3,%edi
mov    $0x10,%eax
sub    %edi,%eax
ret

LLVM IR (-O0):
define i32 @OPP_SIDE_TAG(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 3
%5 = sub nsw i32 16, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @OPP_SIDE_TAG(i32 %0) {
%2 = mul i32 %0, -8
%3 = add i32 %2, 16
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main(int, char **, char **);
void _start(void) {
  int argc = 1;
  char *argv[10];
  char *envp[10];
  int res;
  res = main(argc, argv, envp);
  exit(res);
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x60(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
call   1030 <main@plt>
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_start>:
sub    $0xa8,%rsp
lea    0x50(%rsp),%rsi
mov    %rsp,%rdx
mov    $0x1,%edi
call   1030 <main@plt>
mov    %eax,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @_start() {
%1 = alloca i32
%2 = alloca [10 x i8*]
%3 = alloca [10 x i8*]
%4 = alloca i32
store i32 1, i32* %1
%5 = load i32, i32* %1
%6 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 0
%7 = getelementptr inbounds [10 x i8*], [10 x i8*]* %3, i64 0, i64 0
%8 = call i32 @main(i32 %5, i8** %6, i8** %7)
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = call i32 @exit(i32 %9)
unreachable
}

LLVM IR (-O2):
define void @_start() {
%1 = alloca [10 x i8*]
%2 = alloca [10 x i8*]
%3 = bitcast [10 x i8*]* %1 to i8*
%4 = bitcast [10 x i8*]* %2 to i8*
%5 = getelementptr inbounds [10 x i8*], [10 x i8*]* %1, i64 0, i64 0
%6 = getelementptr inbounds [10 x i8*], [10 x i8*]* %2, i64 0, i64 0
%7 = call i32 @main(i32 1, i8** %5, i8** %6)
%8 = call i32 @exit(i32 %7)
unreachable
}
int Round(double x) {
  if (x >= 0) {
    x += 0.5;
  } else {
    x -= 0.5;
  }
  return (int)x;
}


x86 assembly (clang, -O0):
<Round>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1132 <Round+0x32>
movsd  0xedd(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1148 <Round+0x48>
movsd  -0x8(%rbp),%xmm0
movsd  0xec1(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Round>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
setb   %al
lea    0xeec(%rip),%rcx
addsd  (%rcx,%rax,8),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @Round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp oge double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fadd double %6, 5.000000e-01
store double %7, double* %2
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = fsub double %9, 5.000000e-01
store double %10, double* %2
br label %11
11: ; preds = %8, %5
%12 = load double, double* %2
%13 = fptosi double %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @Round(double %0) {
%2 = fcmp ult double %0, 0.000000e+00
%3 = select i1 %2, double -5.000000e-01, double 5.000000e-01
%4 = fadd double %3, %0
%5 = fptosi double %4 to i32
ret i32 %5
}
void genceil_l_d() {}


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

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

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

LLVM IR (-O2):
define void @genceil_l_d() {
ret void
}
void xmm_add(float *x, float *y, float *z, int size) {
  int k;
  for (k = 0; k < size; k = k + 4) {
    asm volatile("movups (%0), %%xmm0\n\t"
                 "addps (%1), %%xmm0\n\t"
                 "movups %%xmm0, (%2)\n\t"
                 :
                 : "r"(z + k), "r"(y + k), "r"(x + k)
                 : "%xmm0");
  }
}


x86 assembly (clang, -O0):
<xmm_add>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    116a <xmm_add+0x6a>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
movslq -0x20(%rbp),%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
mov    -0x8(%rbp),%rdx
movslq -0x20(%rbp),%rsi
shl    $0x2,%rsi
add    %rsi,%rdx
movups (%rax),%xmm0
addps  (%rcx),%xmm0
movups %xmm0,(%rdx)
mov    -0x20(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x20(%rbp)
jmp    111a <xmm_add+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmm_add>:
test   %ecx,%ecx
jle    112c <xmm_add+0x2c>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movups (%rdx),%xmm0
addps  (%rsi),%xmm0
movups %xmm0,(%rdi)
add    $0x10,%rdi
add    $0x10,%rsi
add    $0x10,%rdx
add    $0x4,%eax
cmp    %ecx,%eax
jl     1110 <xmm_add+0x10>
ret

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

LLVM IR (-O2):
define void @xmm_add(float* %0, float* %1, float* %2, i32 %3) {
%5 = icmp sgt i32 %3, 0
br i1 %5, label %6, label %14
6: ; preds = %4, %6
%7 = phi i64 [ %11, %6 ], [ 0, %4 ]
%8 = getelementptr inbounds float, float* %2, i64 %7
%9 = getelementptr inbounds float, float* %1, i64 %7
%10 = getelementptr inbounds float, float* %0, i64 %7
tail call void asm sideeffect "movups ($0), %xmm0\0A\09addps ($1), %xmm0\0A\09movups %xmm0, ($2)\0A\09", "r,r,r,~{xmm0},~{dirflag},~{fpsr},~{flags}"(float* %8, float* %9, float* %10)
%11 = add nuw i64 %7, 4
%12 = trunc i64 %11 to i32
%13 = icmp slt i32 %12, %3
br i1 %13, label %6, label %14
14: ; preds = %6, %4
ret void
}