xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
int /*<<< orphan*/ writeInt(char *, int);
int enablePWM(unsigned char n) {
  char f[40];
  sprintf(f, "/sys/class/pwm/pwmchip0/pwm%d/enable", n);
  writeInt(f, 1);
}


x86 assembly (clang, -O0):
<enablePWM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec7(%rip),%rsi
movzbl -0x5(%rbp),%edx
call   1040 <sprintf@plt>
lea    -0x30(%rbp),%rdi
mov    $0x1,%esi
call   1030 <writeInt@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enablePWM>:
push   %rbx
sub    $0x30,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <writeInt@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"/sys/class/pwm/pwmchip0/pwm%d/enable\00"
define i32 @enablePWM(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca [40 x i8]
store i8 %0, i8* %3
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%6 = load i8, i8* %3
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
%8 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%9 = call i32 @writeInt(i8* %8, i32 1)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [37 x i8] c"/sys/class/pwm/pwmchip0/pwm%d/enable\00"
define i32 @enablePWM(i8 zeroext %0) {
%2 = alloca [40 x i8]
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
%5 = call i32 @writeInt(i8* %3, i32 1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ strnsend(int, char *, int /*<<< orphan*/);
void strsend(int fd, char *string) { strnsend(fd, string, strlen(string)); }


x86 assembly (clang, -O0):
<strsend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strnsend@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsend>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <strnsend@plt>

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

LLVM IR (-O2):
define void @strsend(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @strnsend(i32 %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
void *alloc(unsigned int);
int /*<<< orphan*/ alloc_free(void *);
int /*<<< orphan*/ memcpy(void *, void *, unsigned int);
int alloc_re(void **x, unsigned int m, unsigned int n) {
  void *y;
  y = alloc(n);
  if (!y)
    return 0;
  memcpy((y), (*x), (m));
  alloc_free(*x);
  *x = y;
  return 1;
}


x86 assembly (clang, -O0):
<alloc_re>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x18(%rbp),%edi
call   1050 <alloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1165 <alloc_re+0x35>
movl   $0x0,-0x4(%rbp)
jmp    1196 <alloc_re+0x66>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x14(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <alloc_free@plt>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_re>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %edx,%edi
call   1050 <alloc@plt>
test   %rax,%rax
je     1167 <alloc_re+0x37>
mov    %rax,%rbx
mov    (%r14),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    (%r14),%rdi
call   1040 <alloc_free@plt>
mov    %rbx,(%r14)
mov    $0x1,%eax
jmp    1169 <alloc_re+0x39>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @alloc_re(i8** nocapture %0, i32 %1, i32 %2) {
%4 = tail call i8* @alloc(i32 %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = load i8*, i8** %0
%8 = tail call i32 @memcpy(i8* %4, i8* %7, i32 %1)
%9 = load i8*, i8** %0
%10 = tail call i32 @alloc_free(i8* %9)
store i8* %4, i8** %0
br label %11
11: ; preds = %3, %6
%12 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %12
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int i;
  i = __VERIFIER_nondet_int();
  while (i < 0) {
    i = i - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1141 <main+0x31>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <main+0x19>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %2
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 1
store i32 %9, i32* %2
br label %4
10: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
char __ocl_convert_char_int(int src) { return (char)src; }


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

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

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

LLVM IR (-O2):
define signext i8 @__ocl_convert_char_int(i32 %0) {
%2 = trunc i32 %0 to i8
ret i8 %2
}
/* Type definitions */
struct drm_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mach64_do_cleanup_dma(struct drm_device *);
void mach64_driver_lastclose(struct drm_device *dev) {
  mach64_do_cleanup_dma(dev);
}


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

x86 assembly (clang, -O2):
<mach64_driver_lastclose>:
jmp    1030 <mach64_do_cleanup_dma@plt>

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

LLVM IR (-O2):
%struct.drm_device = type { i32 }
define void @mach64_driver_lastclose(%struct.drm_device* %0) {
%2 = tail call i32 @mach64_do_cleanup_dma(%struct.drm_device* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int integer = 10;
  char character = 'c';
  int sum = integer + character;
  printf("%d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movb   $0x63,-0x9(%rbp)
mov    -0x8(%rbp),%eax
movsbl -0x9(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 109)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int const);
void util_sleep(const int sleeptime_msec) { sleep(sleeptime_msec / 1000); }


x86 assembly (clang, -O0):
<util_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_sleep>:
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x26,%rdi
add    %eax,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @util_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, 1000
%5 = call i32 @sleep(i32 %4)
ret void
}

LLVM IR (-O2):
define void @util_sleep(i32 %0) {
%2 = sdiv i32 %0, 1000
%3 = tail call i32 @sleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_int(void) {
  int *_p = (int *)malloc(sizeof(int));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_int+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_int>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_int+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_int() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_int() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
void pinDebugInit(void) {}


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

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

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

LLVM IR (-O2):
define void @pinDebugInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int *, int *, int);
void f(int z, int y, int *x) {
  if (z > 0) {
    f(z - 2, y, x);
    g(&y, x, z);
  } else
    *x = y + 1;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1163 <f+0x43>
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <f@plt>
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
lea    -0x8(%rbp),%rdi
call   1040 <g@plt>
jmp    116f <f+0x4f>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,0x4(%rsp)
test   %edi,%edi
jle    114d <f+0x2d>
mov    %edi,%ebx
lea    -0x2(%rbx),%edi
mov    %r14,%rdx
call   1030 <f@plt>
lea    0x4(%rsp),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <g@plt>
jmp    1153 <f+0x33>
add    $0x1,%esi
mov    %esi,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @f(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 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %10, 2
%12 = load i32, i32* %5
%13 = load i32*, i32** %6
%14 = load i32*, i32** %6
%15 = load i32, i32* %4
%16 = call i32 @g(i32* %5, i32* %14, i32 %15)
br label %21
17: ; preds = %3
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
%20 = load i32*, i32** %6
store i32 %19, i32* %20
br label %21
21: ; preds = %17, %9
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
store i32 %1, i32* %4
%5 = icmp sgt i32 %0, 0
br i1 %5, label %7, label %10
6: ; preds = %10, %7
ret void
7: ; preds = %3
%8 = add nsw i32 %0, -2
tail call void @f(i32 %8, i32 %1, i32* %2)
%9 = call i32 @g(i32* %4, i32* %2, i32 %0)
br label %6
10: ; preds = %3
%11 = add nsw i32 %1, 1
store i32 %11, i32* %2
br label %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ width;
};
typedef TYPE_1__ XArc;

/* Variables and functions */
unsigned short get_XArc_width(void *_p) {
  return (unsigned short)((XArc *)_p)->width;
}


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

x86 assembly (clang, -O2):
<get_XArc_width>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define zeroext i16 @get_XArc_width(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
int cmp_float(const void *s1, const void *s2) {
  const float *f1, *f2;
  f1 = s1;
  f2 = s2;
  if (*f1 < *f2)
    return -1;
  if (*f1 > *f2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<cmp_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
ucomiss %xmm1,%xmm0
jbe    1141 <cmp_float+0x41>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <cmp_float+0x69>
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x28(%rbp),%rax
ucomiss (%rax),%xmm0
jbe    1162 <cmp_float+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <cmp_float+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_float>:
movss  (%rdi),%xmm0
movss  (%rsi),%xmm1
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
ucomiss %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_float(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = bitcast i8* %1 to float*
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
%8 = fcmp ogt float %5, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ glColor3f(double, double, double);
int /*<<< orphan*/ glPopMatrix();
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ glScalef(double, double, double);
int /*<<< orphan*/ glutSolidTetrahedron();
void drawSTetra(void) {
  glColor3f(0.3, 0.8, 0.5);
  glPushMatrix();
  glScalef(6.0, 6.0, 6.0);
  glutSolidTetrahedron();
  glPopMatrix();
}


x86 assembly (clang, -O0):
<drawSTetra>:
push   %rbp
mov    %rsp,%rbp
movsd  0xeac(%rip),%xmm0
movsd  0xeac(%rip),%xmm1
movsd  0xeac(%rip),%xmm2
call   1050 <glColor3f@plt>
mov    $0x0,%al
call   1070 <glPushMatrix@plt>
movsd  0xe80(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1060 <glScalef@plt>
mov    $0x0,%al
call   1030 <glutSolidTetrahedron@plt>
mov    $0x0,%al
call   1040 <glPopMatrix@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawSTetra>:
push   %rax
movsd  0xea7(%rip),%xmm0
movsd  0xea7(%rip),%xmm1
movsd  0xea7(%rip),%xmm2
call   1050 <glColor3f@plt>
xor    %eax,%eax
call   1070 <glPushMatrix@plt>
movsd  0xe9b(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1060 <glScalef@plt>
xor    %eax,%eax
call   1030 <glutSolidTetrahedron@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <glPopMatrix@plt>

LLVM IR (-O0):
define void @drawSTetra() {
%1 = call i32 @glColor3f(double 3.000000e-01, double 8.000000e-01, double 5.000000e-01)
%2 = call i32 (...) @glPushMatrix()
%3 = call i32 @glScalef(double 6.000000e+00, double 6.000000e+00, double 6.000000e+00)
%4 = call i32 (...) @glutSolidTetrahedron()
%5 = call i32 (...) @glPopMatrix()
ret void
}

LLVM IR (-O2):
define void @drawSTetra() {
%1 = tail call i32 @glColor3f(double 3.000000e-01, double 8.000000e-01, double 5.000000e-01)
%2 = tail call i32 (...) @glPushMatrix()
%3 = tail call i32 @glScalef(double 6.000000e+00, double 6.000000e+00, double 6.000000e+00)
%4 = tail call i32 (...) @glutSolidTetrahedron()
%5 = tail call i32 (...) @glPopMatrix()
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  while ((c = getchar()) != EOF) {
    if (c == ' ') {
      putchar('\n');
    } else {
      putchar(c);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     116e <main+0x4e>
cmpl   $0x20,-0x8(%rbp)
jne    1161 <main+0x41>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1169 <main+0x49>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb7(%rip),%rbx
cmp    (%rbx),%eax
je     1158 <main+0x38>
mov    $0xa,%ebp
nopw   0x0(%rax,%rax,1)
cmp    $0x20,%eax
cmove  %ebp,%eax
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %15, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %16
7: ; preds = %3
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 32
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @putchar(i32 10)
br label %15
12: ; preds = %7
%13 = load i32, i32* %2
%14 = call i32 @putchar(i32 %13)
br label %15
15: ; preds = %12, %10
br label %3
16: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %12, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %9, %4 ], [ %1, %0 ]
%6 = icmp eq i32 %5, 32
%7 = select i1 %6, i32 10, i32 %5
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %4
12: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ verify();
int main() { verify(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @verify()
ret i32 0
}
double kernel__Float___43d(double self, double p0) {
  double var;
  double var1;
  var1 = self + p0;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Float___43d>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel__Float___43d>:
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @kernel__Float___43d(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fadd double %7, %8
store double %9, double* %6
%10 = load double, double* %6
store double %10, double* %5
br label %11
11: ; preds = %2
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @kernel__Float___43d(double %0, double %1) {
%3 = fadd double %0, %1
ret double %3
}
/* Type definitions */
typedef scalar_t__ uint64_t;
struct timespec {
  unsigned long long tv_sec;
  scalar_t__ tv_nsec;
};

/* Variables and functions */
uint64_t __pfcq_timespec_to_ns(struct timespec _timestamp) {
  return _timestamp.tv_sec * 1000000000ULL + _timestamp.tv_nsec;
}


x86 assembly (clang, -O0):
<__pfcq_timespec_to_ns>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
imul   $0x3b9aca00,-0x10(%rbp),%rax
3b
add    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pfcq_timespec_to_ns>:
imul   $0x3b9aca00,%rdi,%rax
add    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @__pfcq_timespec_to_ns(i64 %0, i64 %1) {
%3 = mul i64 %0, 1000000000
%4 = add i64 %3, %1
ret i64 %4
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRC4_set(void) { return U_WMRCORENONE_set("U_WMRC4"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRC4\00"
define i8* @U_WMRC4_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRC4\00"
define i8* @U_WMRC4_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int binary_search_ints_helper(int, int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
int binary_search_ints(int v, int a[], int n) {
  fprintf(stderr, "v is %d, n is %d\n", v, n);
  return binary_search_ints_helper(v, a, 0, n);
}


x86 assembly (clang, -O0):
<binary_search_ints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x14(%rbp),%ecx
lea    0xeb8(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
xor    %edx,%edx
call   1030 <binary_search_ints_helper@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary_search_ints>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %edi,%ebp
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1040 <fprintf@plt>
mov    %ebp,%edi
mov    %r14,%rsi
xor    %edx,%edx
mov    %ebx,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <binary_search_ints_helper@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"v is %d, n is %d\0A\00"
define i32 @binary_search_ints(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* @stderr
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = load i32*, i32** %5
%13 = load i32, i32* %6
%14 = call i32 @binary_search_ints_helper(i32 %11, i32* %12, i32 0, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"v is %d, n is %d\0A\00"
define i32 @binary_search_ints(i32 %0, i32* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2)
%6 = tail call i32 @binary_search_ints_helper(i32 %0, i32* %1, i32 0, i32 %2)
ret i32 %6
}
void eeprom_update_float(float *__p, float __value) {}


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

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

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

LLVM IR (-O2):
define void @eeprom_update_float(float* nocapture %0, float %1) {
ret void
}
/* Variables and functions */
char *strrchr(char *, char);
void nuke_suffix(char *str) {
  char *idx;
  idx = strrchr(str, '.');
  if (idx)
    *idx = '\0';
}


x86 assembly (clang, -O0):
<nuke_suffix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <nuke_suffix+0x30>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nuke_suffix>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1123 <nuke_suffix+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

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

LLVM IR (-O2):
define void @nuke_suffix(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
int main() {
  int x = 2;
  char a = 'a';
  char *str = "array";
  int y = printf("hello world%d%c%s\n", x, a, str);
  printf("PRINTF VALUE:%d\n", y);
  printf("%d\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movb   $0x61,-0x9(%rbp)
lea    0xecf(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%esi
movsbl -0x9(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeee(%rip),%rdi
lea    0xee1(%rip),%rcx
mov    $0x2,%esi
mov    $0x61,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xedf(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"array\00"
@.str.1 = [19 x i8] c"hello world%d%c%s\0A\00"
@.str.2 = [17 x i8] c"PRINTF VALUE:%d\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
store i8 97, i8* %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4
%6 = load i32, i32* %2
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = load i8*, i8** %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %8, i8* %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"array\00"
@.str.1 = [19 x i8] c"hello world%d%c%s\0A\00"
@.str.2 = [17 x i8] c"PRINTF VALUE:%d\0A\00"
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 97, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 2)
ret i32 0
}
main(argc, argv, envp) int argc;
char **argv;
char **envp;
{
  extern void dummy();
  dummy();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <dummy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(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
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
tail call void (...) @dummy()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void ke_destroy(unsigned char *key) { free(key); }


x86 assembly (clang, -O0):
<ke_destroy>:
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):
<ke_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @ke_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int rand();
void cs_make_random(int size, char *buffer) {
  int i;
  for (i = 0; i < size; i++)
    buffer[i] = 'A' + (rand() % 26);
}


x86 assembly (clang, -O0):
<cs_make_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115d <cs_make_random+0x4d>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x41,%edx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <cs_make_random+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cs_make_random>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1166 <cs_make_random+0x56>
mov    %rsi,%r14
mov    %edi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x4ec4ec4f,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rdx,%rdx,4),%edx
add    %ecx,%edx
sub    %edx,%eax
add    $0x41,%al
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <cs_make_random+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @cs_make_random(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %13, %6 ]
%8 = tail call i32 (...) @rand()
%9 = srem i32 %8, 26
%10 = trunc i32 %9 to i8
%11 = add nsw i8 %10, 65
%12 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 %11, i8* %12
%13 = add nuw nsw i64 %7, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_finish_msg();
void show_ending(void) {
  display_finish_msg();
  return;
}


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

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

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

LLVM IR (-O2):
define void @show_ending() {
%1 = tail call i32 (...) @display_finish_msg()
ret void
}
int hashvalue(char *word, int hashsize) {
  int val = 0;
  char *p = word;
  while (*p) {
    val = ((val << 4) ^ ((val >> 12) & 0xF) ^ ((*p++) & 0xFF));
  }
  val &= hashsize;
  return val;
}


x86 assembly (clang, -O0):
<hashvalue>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     115a <hashvalue+0x5a>
mov    -0x10(%rbp),%eax
shl    $0x4,%eax
mov    -0x10(%rbp),%ecx
sar    $0xc,%ecx
and    $0xf,%ecx
xor    %ecx,%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
movsbl (%rcx),%ecx
and    $0xff,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <hashvalue+0x1a>
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashvalue>:
mov    (%rdi),%cl
test   %cl,%cl
je     1130 <hashvalue+0x30>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x4,%edx
shr    $0xc,%eax
and    $0xf,%eax
or     %edx,%eax
movzbl %cl,%ecx
xor    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hashvalue+0x10>
and    %esi,%eax
ret
xor    %eax,%eax
and    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @hashvalue(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %16, %5 ], [ %3, %2 ]
%7 = phi i8* [ %13, %5 ], [ %0, %2 ]
%8 = phi i32 [ %15, %5 ], [ 0, %2 ]
%9 = shl i32 %8, 4
%10 = lshr i32 %8, 12
%11 = and i32 %10, 15
%12 = or i32 %11, %9
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = zext i8 %6 to i32
%15 = xor i32 %12, %14
%16 = load i8, i8* %13
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %5
18: ; preds = %5, %2
%19 = phi i32 [ 0, %2 ], [ %15, %5 ]
%20 = and i32 %19, %1
ret i32 %20
}
void tegra_latency_allowance_update_tick_length(unsigned int new_ns_per_tick) {
  return;
}


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

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

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

LLVM IR (-O2):
define void @tegra_latency_allowance_update_tick_length(i32 %0) {
ret void
}
int main(void) {
  int i = 1;
  int j = 1;
  if (i != 1 || j != 1)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1141 <main+0x31>
cmpl   $0x1,-0xc(%rbp)
je     1146 <main+0x36>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
long long atoll(char const *);
char *config_get(char const *);
long long config_get_long(const char *key) {
  long long result = 0;
  assert(key);
  const char *value = config_get(key);
  if (value) {
    result = atoll(value);
  }
  return (result);
}


x86 assembly (clang, -O0):
<config_get_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1030 <config_get@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1172 <config_get_long+0x42>
mov    -0x18(%rbp),%rdi
call   1040 <atoll@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_get_long>:
push   %rbx
mov    %rdi,%rbx
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1030 <config_get@plt>
test   %rax,%rax
je     114f <config_get_long+0x1f>
mov    %rax,%rdi
pop    %rbx
jmp    1040 <atoll@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @config_get_long(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i8*
store i8* %0, i8** %2
store i64 0, i64* %3
%5 = load i8*, i8** %2
%6 = call i32 @assert(i8* %5)
%7 = load i8*, i8** %2
%8 = call i8* @config_get(i8* %7)
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i8*, i8** %4
%13 = call i64 @atoll(i8* %12)
store i64 %13, i64* %3
br label %14
14: ; preds = %11, %1
%15 = load i64, i64* %3
ret i64 %15
}

LLVM IR (-O2):
define i64 @config_get_long(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i8* @config_get(i8* %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i64 @atoll(i8* %3)
br label %7
7: ; preds = %5, %1
%8 = phi i64 [ %6, %5 ], [ 0, %1 ]
ret i64 %8
}
/* Type definitions */
struct FindjoB {
  int dummy;
};

/* Variables and functions */
int Findjob_set_prop_filter(struct FindjoB *, int, int, int /*<<< orphan*/);
int Findjob_set_aaip_filter(struct FindjoB *o, int value, int flag) {
  int ret;
  ret = Findjob_set_prop_filter(o, 7, value, 0);
  return (ret);
}


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

x86 assembly (clang, -O2):
<Findjob_set_aaip_filter>:
mov    %esi,%edx
mov    $0x7,%esi
xor    %ecx,%ecx
jmp    1030 <Findjob_set_prop_filter@plt>

LLVM IR (-O0):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_aaip_filter(%struct.FindjoB* %0, i32 %1, i32 %2) {
%4 = alloca %struct.FindjoB*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.FindjoB* %0, %struct.FindjoB** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load %struct.FindjoB*, %struct.FindjoB** %4
%9 = load i32, i32* %5
%10 = call i32 @Findjob_set_prop_filter(%struct.FindjoB* %8, i32 7, i32 %9, i32 0)
store i32 %10, i32* %7
%11 = load i32, i32* %7
ret i32 %11
}

LLVM IR (-O2):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_aaip_filter(%struct.FindjoB* %0, i32 %1, i32 %2) {
%4 = tail call i32 @Findjob_set_prop_filter(%struct.FindjoB* %0, i32 7, i32 %1, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ new_op(int);
void parse_ENDFUNC() { new_op(6); }


x86 assembly (clang, -O0):
<parse_ENDFUNC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <new_op@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_ENDFUNC>:
mov    $0x6,%edi
jmp    1030 <new_op@plt>

LLVM IR (-O0):
define void @parse_ENDFUNC() {
%1 = call i32 @new_op(i32 6)
ret void
}

LLVM IR (-O2):
define void @parse_ENDFUNC() {
%1 = tail call i32 @new_op(i32 6)
ret void
}
/* Variables and functions */
int cos(int);
int internal_cos_i(int value) { return cos(value); }


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

x86 assembly (clang, -O2):
<internal_cos_i>:
jmp    1030 <cos@plt>

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

LLVM IR (-O2):
define i32 @internal_cos_i(i32 %0) {
%2 = tail call i32 @cos(i32 %0)
ret i32 %2
}
int is_modifier(int tok) { return 0x25 <= tok && tok <= 0x28; }


x86 assembly (clang, -O0):
<is_modifier>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x25,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <is_modifier+0x24>
cmpl   $0x28,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_modifier>:
add    $0xffffffdb,%edi
xor    %eax,%eax
cmp    $0x4,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @is_modifier(i32 %0) {
%2 = add i32 %0, -37
%3 = icmp ult i32 %2, 4
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_UNBLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void sig_unblock(int sig) {
  sigset_t ss;
  sigemptyset(&ss);
  sigaddset(&ss, sig);
  sigprocmask(SIG_UNBLOCK, &ss, (sigset_t *)0);
}


x86 assembly (clang, -O0):
<sig_unblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    -0x4(%rbp),%esi
lea    -0x8(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_unblock>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <sigemptyset@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <sigaddset@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@SIG_UNBLOCK = global i32 0
define void @sig_unblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @sigaddset(i32* %3, i32 %5)
%7 = load i32, i32* @SIG_UNBLOCK
%8 = call i32 @sigprocmask(i32 %7, i32* %3, i32* null)
ret void
}

LLVM IR (-O2):
@SIG_UNBLOCK = global i32 0
define void @sig_unblock(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = call i32 @sigaddset(i32* %2, i32 %0)
%6 = load i32, i32* @SIG_UNBLOCK
%7 = call i32 @sigprocmask(i32 %6, i32* %2, i32* null)
ret void
}