xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isspace(char);
char *sskip(char *p) {
  while (*p && isspace(*p))
    p++;
  return p;
}


x86 assembly (clang, -O0):
<sskip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <sskip+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <sskip+0x47>
jmp    1168 <sskip+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <sskip+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sskip>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <sskip+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <sskip+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <sskip+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @sskip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isspace(i8 signext %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @sskip(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 signext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ curve25519(unsigned char *, unsigned char *,
                              unsigned char *);
void ecc_curve(unsigned char *Z, unsigned char *k, unsigned char *P) {
  curve25519(Z, k, P);
}


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

x86 assembly (clang, -O2):
<ecc_curve>:
jmp    1030 <curve25519@plt>

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

LLVM IR (-O2):
define void @ecc_curve(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @curve25519(i8* %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OAL_OBTAIN_SEMAPHORE();
int /*<<< orphan*/ OAL_RELEASE_SEMAPHORE();
int i2c_bulkread(void *, unsigned char, unsigned short, unsigned char *, int);
int fc8300_i2c_byteread(void *handle, unsigned short devid, unsigned short addr,
                        unsigned char *data) {
  int res;
  OAL_OBTAIN_SEMAPHORE();
  res = i2c_bulkread(handle, (unsigned char)(devid >> 8) & 0xff, addr, data, 1);
  OAL_RELEASE_SEMAPHORE();
  return res;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
mov    -0x8(%rbp),%rdi
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
movzbl %al,%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0xc(%rbp),%ax
mov    -0x18(%rbp),%rcx
mov    $0x1,%r8d
movzbl %dl,%esi
movzwl %ax,%edx
call   1030 <i2c_bulkread@plt>
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <OAL_RELEASE_SEMAPHORE@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%rbp
xor    %eax,%eax
call   1050 <OAL_OBTAIN_SEMAPHORE@plt>
shr    $0x8,%ebx
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14,%rcx
mov    $0x1,%r8d
call   1030 <i2c_bulkread@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <OAL_RELEASE_SEMAPHORE@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8300_i2c_byteread(i8* %0, i16 zeroext %1, i16 zeroext %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i16
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i16 %1, i16* %6
store i16 %2, i16* %7
store i8* %3, i8** %8
%10 = call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%11 = load i8*, i8** %5
%12 = load i16, i16* %6
%13 = zext i16 %12 to i32
%14 = ashr i32 %13, 8
%15 = trunc i32 %14 to i8
%16 = zext i8 %15 to i32
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = load i16, i16* %7
%20 = load i8*, i8** %8
%21 = call i32 @i2c_bulkread(i8* %11, i8 zeroext %18, i16 zeroext %19, i8* %20, i32 1)
store i32 %21, i32* %9
%22 = call i32 (...) @OAL_RELEASE_SEMAPHORE()
%23 = load i32, i32* %9
ret i32 %23
}

LLVM IR (-O2):
define i32 @fc8300_i2c_byteread(i8* %0, i16 zeroext %1, i16 zeroext %2, i8* %3) {
%5 = tail call i32 (...) @OAL_OBTAIN_SEMAPHORE()
%6 = lshr i16 %1, 8
%7 = trunc i16 %6 to i8
%8 = tail call i32 @i2c_bulkread(i8* %0, i8 zeroext %7, i16 zeroext %2, i8* %3, i32 1)
%9 = tail call i32 (...) @OAL_RELEASE_SEMAPHORE()
ret i32 %8
}
unsigned xfs_sb_version_tonew(unsigned v) {
  if (v == 1)
    return 4;
  if (v == 2)
    return 4 | 0x0010;
  return 4 | 0x0010 | 0x0020;
}


x86 assembly (clang, -O0):
<xfs_sb_version_tonew>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <xfs_sb_version_tonew+0x1d>
movl   $0x4,-0x4(%rbp)
jmp    113a <xfs_sb_version_tonew+0x3a>
cmpl   $0x2,-0x8(%rbp)
jne    1133 <xfs_sb_version_tonew+0x33>
movl   $0x14,-0x4(%rbp)
jmp    113a <xfs_sb_version_tonew+0x3a>
movl   $0x34,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfs_sb_version_tonew>:
xor    %ecx,%ecx
cmp    $0x2,%edi
setne  %cl
shl    $0x5,%ecx
or     $0x14,%ecx
cmp    $0x1,%edi
mov    $0x4,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xfs_sb_version_tonew(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 4, i32* %2
br label %12
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 2
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 20, i32* %2
br label %12
11: ; preds = %7
store i32 52, i32* %2
br label %12
12: ; preds = %11, %10, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @xfs_sb_version_tonew(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i32 20, i32 52
%4 = icmp eq i32 %0, 1
%5 = select i1 %4, i32 4, i32 %3
ret i32 %5
}
void foo_1_2_2_1_2_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_1_2_1_1_1_2() {
ret void
}
/* Type definitions */
struct __test_metadata {
  int dummy;
};
struct __fixture_variant_metadata {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ disable_dispatch(struct __test_metadata *);
void wrapper_disable_dispatch(struct __test_metadata *_metadata,
                              struct __fixture_variant_metadata *variant) {
  disable_dispatch(_metadata);
}


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

x86 assembly (clang, -O2):
<wrapper_disable_dispatch>:
jmp    1030 <disable_dispatch@plt>

LLVM IR (-O0):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_disable_dispatch(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* %1) {
%3 = alloca %struct.__test_metadata*
%4 = alloca %struct.__fixture_variant_metadata*
store %struct.__test_metadata* %0, %struct.__test_metadata** %3
store %struct.__fixture_variant_metadata* %1, %struct.__fixture_variant_metadata** %4
%5 = load %struct.__test_metadata*, %struct.__test_metadata** %3
%6 = call i32 @disable_dispatch(%struct.__test_metadata* %5)
ret void
}

LLVM IR (-O2):
%struct.__test_metadata = type { i32 }
%struct.__fixture_variant_metadata = type { i32 }
define void @wrapper_disable_dispatch(%struct.__test_metadata* %0, %struct.__fixture_variant_metadata* nocapture readnone %1) {
%3 = tail call i32 @disable_dispatch(%struct.__test_metadata* %0)
ret void
}
void chop_extension(char *a) {
  while (*a != '.' && *a)
    a++;
  *a = 0;
}


x86 assembly (clang, -O0):
<chop_extension>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2e,%ecx
mov    %al,-0x9(%rbp)
je     112d <chop_extension+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <chop_extension+0x3d>
jmp    114e <chop_extension+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <chop_extension+0x8>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<chop_extension>:
movzbl (%rdi),%eax
test   %al,%al
je     1111 <chop_extension+0x11>
cmp    $0x2e,%al
je     1111 <chop_extension+0x11>
add    $0x1,%rdi
jmp    1100 <chop_extension>
movb   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @chop_extension(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 46
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
store i8 0, i8* %19
ret void
}

LLVM IR (-O2):
define void @chop_extension(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 46, label %7
i8 0, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
store i8 0, i8* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
extern wchar_t *wchar_star_to_wchar_star(wchar_t *s) {
  return s == (wchar_t *)0 ? (wchar_t *)0 : s + 1;
}


x86 assembly (clang, -O0):
<wchar_star_to_wchar_star>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    111e <wchar_star_to_wchar_star+0x1e>
xor    %eax,%eax
mov    %rax,-0x10(%rbp)
jmp    112a <wchar_star_to_wchar_star+0x2a>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wchar_star_to_wchar_star>:
lea    0x4(%rdi),%rax
test   %rdi,%rdi
cmove  %rdi,%rax
ret

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

LLVM IR (-O2):
define i32* @wchar_star_to_wchar_star(i32* readnone %0) {
%2 = icmp eq i32* %0, null
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = select i1 %2, i32* null, i32* %3
ret i32* %4
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDevLPMRemoteWake(uint32_t ui32Base) {
  ASSERT(ui32Base == 0x40050000);
  (*((volatile uint8_t *)(ui32Base + 0x00000362))) |= 0x00000002;
}


x86 assembly (clang, -O0):
<USBDevLPMRemoteWake>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x362,%eax
cltq
mov    (%rax),%ecx
or     $0x2,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDevLPMRemoteWake>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x40050000,%ebx
sete   %dil
call   1030 <ASSERT@plt>
movslq %ebx,%rax
orl    $0x2,0x362(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @USBDevLPMRemoteWake(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1074069504
%5 = zext i1 %4 to i32
%6 = call i32 @ASSERT(i32 %5)
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 866
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i32*
%11 = load volatile i32, i32* %10
%12 = or i32 %11, 2
store volatile i32 %12, i32* %10
ret void
}

LLVM IR (-O2):
define void @USBDevLPMRemoteWake(i32 %0) {
%2 = icmp eq i32 %0, 1074069504
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = add nsw i32 %0, 866
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = or i32 %8, 2
store volatile i32 %9, i32* %7
ret void
}
/* Variables and functions */
float ceilf(float);
float test3f(float x) { return ceilf(x); }


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

x86 assembly (clang, -O2):
<test3f>:
jmp    1030 <ceilf@plt>

LLVM IR (-O0):
define float @test3f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.ceil.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @test3f(float %0) {
%2 = tail call float @llvm.ceil.f32(float %0)
ret float %2
}
/* Type definitions */
struct coro {
  int dummy;
};
struct aqueue {
  int dummy;
};

/* Variables and functions */
scalar_t__ aqueue_full(struct aqueue *);
int /*<<< orphan*/ aqueue_push(struct aqueue *, void const *);
int /*<<< orphan*/ coro_yield(struct coro *);
void aqueue_await_push(struct aqueue *aqueue, struct coro *coro,
                       const void *item) {
  while (aqueue_full(aqueue))
    coro_yield(coro);
  aqueue_push(aqueue, item);
}


x86 assembly (clang, -O0):
<aqueue_await_push>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <aqueue_full@plt>
cmp    $0x0,%rax
je     1165 <aqueue_await_push+0x35>
mov    -0x10(%rbp),%rdi
call   1040 <coro_yield@plt>
jmp    1144 <aqueue_await_push+0x14>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <aqueue_push@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aqueue_await_push>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xchg   %ax,%ax
call   1050 <aqueue_full@plt>
test   %rax,%rax
je     1157 <aqueue_await_push+0x27>
mov    %r15,%rdi
call   1040 <coro_yield@plt>
mov    %rbx,%rdi
jmp    1140 <aqueue_await_push+0x10>
mov    %rbx,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <aqueue_push@plt>

LLVM IR (-O0):
%struct.aqueue = type { i32 }
%struct.coro = type { i32 }
define void @aqueue_await_push(%struct.aqueue* %0, %struct.coro* %1, i8* %2) {
%4 = alloca %struct.aqueue*
%5 = alloca %struct.coro*
%6 = alloca i8*
store %struct.aqueue* %0, %struct.aqueue** %4
store %struct.coro* %1, %struct.coro** %5
store i8* %2, i8** %6
br label %7
7: ; preds = %11, %3
%8 = load %struct.aqueue*, %struct.aqueue** %4
%9 = call i64 @aqueue_full(%struct.aqueue* %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load %struct.coro*, %struct.coro** %5
%13 = call i32 @coro_yield(%struct.coro* %12)
br label %7
14: ; preds = %7
%15 = load %struct.aqueue*, %struct.aqueue** %4
%16 = load i8*, i8** %6
%17 = call i32 @aqueue_push(%struct.aqueue* %15, i8* %16)
ret void
}

LLVM IR (-O2):
%struct.aqueue = type { i32 }
%struct.coro = type { i32 }
define void @aqueue_await_push(%struct.aqueue* %0, %struct.coro* %1, i8* %2) {
%4 = tail call i64 @aqueue_full(%struct.aqueue* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3, %6
%7 = tail call i32 @coro_yield(%struct.coro* %1)
%8 = tail call i64 @aqueue_full(%struct.aqueue* %0)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %6
10: ; preds = %6, %3
%11 = tail call i32 @aqueue_push(%struct.aqueue* %0, i8* %2)
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_set_trusted(void *bus,
                                                              int b) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_set_trusted>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_set_trusted>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_set_trusted(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_set_trusted(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_wsr(char *, unsigned int);
void wsr_1(unsigned v) { __builtin_arm_wsr("sysreg", v); }


x86 assembly (clang, -O0):
<wsr_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <__builtin_arm_wsr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wsr_1>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <__builtin_arm_wsr@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"sysreg\00"
define void @wsr_1(i32 %0) {
%2 = tail call i32 @__builtin_arm_wsr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  if (argc != 2)
    return -1;
  printf("%s", argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     113c <main+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <main+0x47>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%eax
cmp    $0x2,%edi
jne    1131 <main+0x21>
push   %rax
mov    0x8(%rsi),%rsi
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\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 i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 -1, i32* %3
br label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 0, i32* %3
br label %14
14: ; preds = %9, %8
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 0, %4 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
void termina_engine() { endwin(); }


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

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

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

LLVM IR (-O2):
define void @termina_engine() {
%1 = tail call i32 (...) @endwin()
ret void
}
int mm_match_cgroup(struct mm_struct *mm, struct mem_cgroup *mem) { return 1; }


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

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

LLVM IR (-O0):
%struct.mm_struct = type opaque
%struct.mem_cgroup = type opaque
define i32 @mm_match_cgroup(%struct.mm_struct* %0, %struct.mem_cgroup* %1) {
%3 = alloca %struct.mm_struct*
%4 = alloca %struct.mem_cgroup*
store %struct.mm_struct* %0, %struct.mm_struct** %3
store %struct.mem_cgroup* %1, %struct.mem_cgroup** %4
ret i32 1
}

LLVM IR (-O2):
%struct.mm_struct = type opaque
%struct.mem_cgroup = type opaque
define i32 @mm_match_cgroup(%struct.mm_struct* nocapture readnone %0, %struct.mem_cgroup* nocapture readnone %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fflush(int /*<<< orphan*/ *const);
__attribute__((__unused__)) int(cheat_unwrapped_fflush)(FILE *const stream) {
  return fflush(stream);
}


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

x86 assembly (clang, -O2):
<cheat_unwrapped_fflush>:
jmp    1030 <fflush@plt>

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

LLVM IR (-O2):
define i32 @cheat_unwrapped_fflush(i32* nocapture %0) {
%2 = tail call i32 @fflush(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/);
int CED_GetDriverRevision(int fh) { return ioctl(fh, _IO(0xce, 16)); }


x86 assembly (clang, -O0):
<CED_GetDriverRevision>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xce,%edi
mov    $0x10,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CED_GetDriverRevision>:
push   %rbx
mov    %edi,%ebx
mov    $0xce,%edi
mov    $0x10,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @CED_GetDriverRevision(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 206, i32 16)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @CED_GetDriverRevision(i32 %0) {
%2 = tail call i32 @_IO(i32 206, i32 16)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
unsigned char tolower(unsigned char c) {
  if (c >= 'A' && c <= 'Z')
    c = c - 'A' + 'a';
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1131 <tolower+0x31>
movzbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
jg     1131 <tolower+0x31>
movzbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @tolower(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %16
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = sub nsw i32 %12, 65
%14 = add nsw i32 %13, 97
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %16
16: ; preds = %10, %6, %1
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
define zeroext i8 @tolower(i8 zeroext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int rand();
int main() {
  while (1) {
    if ((rand() % 1 + 0) > 0.5)
      printf("1");
    else
      printf("0");
    printf(" ");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x1,%ecx
cltd
idiv   %ecx
add    $0x0,%edx
cvtsi2sd %edx,%xmm0
movsd  0xeb3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1168 <main+0x48>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
jmp    1174 <main+0x54>
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"0\00"
@.str.2 = [2 x i8] c" \00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %12
%3 = call i32 (...) @rand()
%4 = srem i32 %3, 1
%5 = add nsw i32 %4, 0
%6 = sitofp i32 %5 to double
%7 = fcmp ogt double %6, 5.000000e-01
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %12
10: ; preds = %2
%11 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @rand()
%3 = tail call i32 @putchar(i32 48)
%4 = tail call i32 @putchar(i32 32)
br label %1
}
/* Variables and functions */
int LZ4_compress64kCtx(int /*<<< orphan*/ *, char const *, char *, int);
int LZ4_compressCtx(int /*<<< orphan*/ *, char const *, char *, int);
int LZ4_compress(const char *source, char *dest, int isize) {
  if (isize < (int)((1 << 16) + ((8 + 4) - 1)))
    return LZ4_compress64kCtx(NULL, source, dest, isize);
  return LZ4_compressCtx(NULL, source, dest, isize);
}


x86 assembly (clang, -O0):
<LZ4_compress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x1000b,-0x1c(%rbp)
jge    115c <LZ4_compress+0x3c>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edi
call   1030 <LZ4_compress64kCtx@plt>
mov    %eax,-0x4(%rbp)
jmp    1173 <LZ4_compress+0x53>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
xor    %eax,%eax
mov    %eax,%edi
call   1040 <LZ4_compressCtx@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_compress>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
xor    %edi,%edi
cmp    $0x1000a,%ecx
jg     1137 <LZ4_compress+0x17>
jmp    1030 <LZ4_compress64kCtx@plt>
jmp    1040 <LZ4_compressCtx@plt>

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

LLVM IR (-O2):
define i32 @LZ4_compress(i8* %0, i8* %1, i32 %2) {
%4 = icmp slt i32 %2, 65547
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @LZ4_compress64kCtx(i32* null, i8* %0, i8* %1, i32 %2)
br label %9
7: ; preds = %3
%8 = tail call i32 @LZ4_compressCtx(i32* null, i8* %0, i8* %1, i32 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
int /*<<< orphan*/ scanf(char *, char *, char *);
int main(void) {
  char lname[10], fname[10];
  scanf("%s%s", fname, lname);
  printf("%s, %s\n", fname, lname);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x18(%rbp),%rsi
lea    -0xe(%rbp),%rdx
lea    0xec2(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x18(%rbp),%rsi
lea    -0xe(%rbp),%rdx
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rbx
lea    0xe(%rsp),%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <scanf@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [8 x i8] c"%s, %s\0A\00"
define i32 @main() {
%1 = alloca [10 x i8]
%2 = alloca [10 x i8]
%3 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %3)
ret i32 0
}
/* Variables and functions */
scalar_t__ getpgid(int /*<<< orphan*/);
int /*<<< orphan*/ getpid();
int getuniqueid() { return (int)getpgid(getpid()); }


x86 assembly (clang, -O0):
<getuniqueid>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
call   1040 <getpgid@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getuniqueid>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <getpgid@plt>

LLVM IR (-O0):
define i32 @getuniqueid() {
%1 = call i32 (...) @getpid()
%2 = call i64 @getpgid(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @getuniqueid() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i64 @getpgid(i32 %1)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int fun975() { return 975; }


x86 assembly (clang, -O0):
<fun975>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3cf,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun975() {
ret i32 975
}

LLVM IR (-O2):
define i32 @fun975() {
ret i32 975
}
/* Variables and functions */
int /*<<< orphan*/ CC2420ControlP__InterruptCCA__fired();
void Msp430InterruptC__0__Interrupt__fired(void) {
  CC2420ControlP__InterruptCCA__fired();
}


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

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

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

LLVM IR (-O2):
define void @Msp430InterruptC__0__Interrupt__fired() {
%1 = tail call i32 (...) @CC2420ControlP__InterruptCCA__fired()
ret void
}
/* Type definitions */
struct stack_st_OPENSSL_STRING {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int /*<<< orphan*/ OPENSSL_sk_zero(int /*<<< orphan*/ *);
void sk_OPENSSL_STRING_zero(struct stack_st_OPENSSL_STRING *sk) {
  OPENSSL_sk_zero((OPENSSL_STACK *)sk);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_STRING_zero>:
jmp    1030 <OPENSSL_sk_zero@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define void @sk_OPENSSL_STRING_zero(%struct.stack_st_OPENSSL_STRING* %0) {
%2 = alloca %struct.stack_st_OPENSSL_STRING*
store %struct.stack_st_OPENSSL_STRING* %0, %struct.stack_st_OPENSSL_STRING** %2
%3 = load %struct.stack_st_OPENSSL_STRING*, %struct.stack_st_OPENSSL_STRING** %2
%4 = bitcast %struct.stack_st_OPENSSL_STRING* %3 to i32*
%5 = call i32 @OPENSSL_sk_zero(i32* %4)
ret void
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_STRING = type { i32 }
define void @sk_OPENSSL_STRING_zero(%struct.stack_st_OPENSSL_STRING* %0) {
%2 = getelementptr %struct.stack_st_OPENSSL_STRING, %struct.stack_st_OPENSSL_STRING* %0, i64 0, i32 0
%3 = tail call i32 @OPENSSL_sk_zero(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_command(short);
int /*<<< orphan*/ LCD_data(short);
void LCD_command_1D(short command, short data) {
  LCD_data(data);
  LCD_command(command);
}


x86 assembly (clang, -O0):
<LCD_command_1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x4(%rbp),%edi
call   1030 <LCD_data@plt>
movswl -0x2(%rbp),%edi
call   1040 <LCD_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LCD_command_1D>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <LCD_data@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <LCD_command@plt>

LLVM IR (-O0):
define void @LCD_command_1D(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = call i32 @LCD_data(i16 signext %5)
%7 = load i16, i16* %3
%8 = call i32 @LCD_command(i16 signext %7)
ret void
}

LLVM IR (-O2):
define void @LCD_command_1D(i16 signext %0, i16 signext %1) {
%3 = tail call i32 @LCD_data(i16 signext %1)
%4 = tail call i32 @LCD_command(i16 signext %0)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float stdlib_strided_sdsnanmean(int, float *, int);
int main() {
  float x[] = {1.0, 2.0, 0.0 / 0.0, 3.0, 0.0 / 0.0, 4.0,
               5.0, 6.0, 0.0 / 0.0, 7.0, 8.0,       0.0 / 0.0};
  int64_t N = 6;
  int64_t stride = 2;
  float v = stdlib_strided_sdsnanmean(N, x, stride);
  printf("mean: %f\n", v);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
lea    0xebd(%rip),%rsi
mov    $0x30,%edx
call   1050 <memcpy@plt>
movl   $0x6,-0x34(%rbp)
movl   $0x2,-0x38(%rbp)
mov    -0x34(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    -0x38(%rbp),%edx
call   1040 <stdlib_strided_sdsnanmean@plt>
movss  %xmm0,-0x3c(%rbp)
movss  -0x3c(%rbp),%xmm0
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x6,%edi
mov    $0x2,%edx
call   1040 <stdlib_strided_sdsnanmean@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@__const.main.x = [12 x float] [float 1.000000e+00, float 2.000000e+00, float 0x7FF8000000000000, float 3.000000e+00, float 0x7FF8000000000000, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 0x7FF8000000000000, float 7.000000e+00, float 8.000000e+00, float 0x7FF8000000000000]
@.str = [10 x i8] c"mean: %f\0A\00"
define i32 @main() {
%1 = alloca [12 x float]
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = bitcast [12 x float]* %1 to i8*
store i32 6, i32* %2
store i32 2, i32* %3
%6 = load i32, i32* %2
%7 = getelementptr inbounds [12 x float], [12 x float]* %1, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call float @stdlib_strided_sdsnanmean(i32 %6, float* %7, i32 %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [12 x float] [float 1.000000e+00, float 2.000000e+00, float 0x7FF8000000000000, float 3.000000e+00, float 0x7FF8000000000000, float 4.000000e+00, float 5.000000e+00, float 6.000000e+00, float 0x7FF8000000000000, float 7.000000e+00, float 8.000000e+00, float 0x7FF8000000000000]
@.str = [10 x i8] c"mean: %f\0A\00"
define i32 @main() {
%1 = alloca [12 x float]
%2 = bitcast [12 x float]* %1 to i8*
%3 = getelementptr inbounds [12 x float], [12 x float]* %1, i64 0, i64 0
%4 = call float @stdlib_strided_sdsnanmean(i32 6, float* %3, i32 2)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
void swap(void *arr[], int i, int j) {
  void *temp = arr[i];
  arr[i] = arr[j];
  arr[j] = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,8),%rcx
movslq %edx,%rdx
mov    (%rdi,%rdx,8),%rsi
mov    %rsi,(%rdi,%rax,8)
mov    %rcx,(%rdi,%rdx,8)
ret

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

LLVM IR (-O2):
define void @swap(i8** nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8*, i8** %0, i64 %4
%6 = load i8*, i8** %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
store i8* %9, i8** %5
store i8* %6, i8** %8
ret void
}
double docust(char *s) {
  double f = 1.0;
  return f;
}


x86 assembly (clang, -O0):
<docust>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @docust(i8* %0) {
%2 = alloca i8*
%3 = alloca double
store i8* %0, i8** %2
store double 1.000000e+00, double* %3
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @docust(i8* nocapture readnone %0) {
ret double 1.000000e+00
}
void skeleton_unload(void) {}


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

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

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

LLVM IR (-O2):
define void @skeleton_unload() {
ret void
}
unsigned int nm_readl(unsigned int *ptr) { return *ptr; }


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

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

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

LLVM IR (-O2):
define i32 @nm_readl(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
float clampf(float const, int /*<<< orphan*/, int);
float smoothstepf(const float in_EDGE_0, const float in_EDGE_1,
                  const float in_X) {
  float t = clampf((in_X - in_EDGE_0) / (in_EDGE_1 - in_EDGE_0), 0, 1);
  return t * t * (3.0f - 2.0f * t);
}


x86 assembly (clang, -O0):
<smoothstepf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
divss  %xmm1,%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <clampf@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  -0x10(%rbp),%xmm2
addss  %xmm2,%xmm2
movss  0xe95(%rip),%xmm1
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smoothstepf>:
push   %rax
subss  %xmm0,%xmm2
subss  %xmm0,%xmm1
divss  %xmm1,%xmm2
movaps %xmm2,%xmm0
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <clampf@plt>
movaps %xmm0,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm0,%xmm0
movss  0xec1(%rip),%xmm1
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @smoothstepf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %6
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %5
%12 = load float, float* %4
%13 = fsub float %11, %12
%14 = fdiv float %10, %13
%15 = call float @clampf(float %14, i32 0, i32 1)
store float %15, float* %7
%16 = load float, float* %7
%17 = load float, float* %7
%18 = fmul float %16, %17
%19 = load float, float* %7
%20 = call float @llvm.fmuladd.f32(float -2.000000e+00, float %19, float 3.000000e+00)
%21 = fmul float %18, %20
ret float %21
}

LLVM IR (-O2):
define float @smoothstepf(float %0, float %1, float %2) {
%4 = fsub float %2, %0
%5 = fsub float %1, %0
%6 = fdiv float %4, %5
%7 = tail call float @clampf(float %6, i32 0, i32 1)
%8 = fmul float %7, %7
%9 = tail call float @llvm.fmuladd.f32(float %7, float -2.000000e+00, float 3.000000e+00)
%10 = fmul float %8, %9
ret float %10
}
/* Variables and functions */
float Maths_Sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ Vector_Dot(void const *const, void const *const,
                              size_t const);
float Vector_Length(const void *const vector, const size_t length) {
  return Maths_Sqrt(Vector_Dot(vector, vector, length));
}


x86 assembly (clang, -O0):
<Vector_Length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <Vector_Dot@plt>
mov    %eax,%edi
call   1040 <Maths_Sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Vector_Length>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
call   1030 <Vector_Dot@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <Maths_Sqrt@plt>

LLVM IR (-O0):
define float @Vector_Length(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @Vector_Dot(i8* %5, i8* %6, i64 %7)
%9 = call float @Maths_Sqrt(i32 %8)
ret float %9
}

LLVM IR (-O2):
define float @Vector_Length(i8* %0, i64 %1) {
%3 = tail call i32 @Vector_Dot(i8* %0, i8* %0, i64 %1)
%4 = tail call float @Maths_Sqrt(i32 %3)
ret float %4
}
char *allones_var(unsigned long offset) {
  static char *const base = (char *)-1;
  return base + offset;
}


x86 assembly (clang, -O0):
<allones_var>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0xffffffffffffffff,%rax
add    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<allones_var>:
lea    -0x1(%rdi),%rax
ret

LLVM IR (-O0):
@allones_var.base = internal constant i8* inttoptr (i64 -1 to i8*)
define i8* @allones_var(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = getelementptr inbounds i8, i8* inttoptr (i64 -1 to i8*), i64 %3
ret i8* %4
}

LLVM IR (-O2):
define i8* @allones_var(i64 %0) {
%2 = getelementptr inbounds i8, i8* inttoptr (i64 -1 to i8*), i64 %0
ret i8* %2
}
/* Type definitions */
struct jelio_buf {
  int dummy;
};

/* Variables and functions */
struct jelio_buf *jelio_buffer(int);
int jelio_buffer_peekc(struct jelio_buf *);
int bupeekc(int fd) {
  struct jelio_buf *jb;
  jb = jelio_buffer(fd);
  if (!jb)
    return -2;
  return jelio_buffer_peekc(jb);
}


x86 assembly (clang, -O0):
<bupeekc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <jelio_buffer@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <bupeekc+0x2e>
movl   $0xfffffffe,-0x4(%rbp)
jmp    115a <bupeekc+0x3a>
mov    -0x10(%rbp),%rdi
call   1040 <jelio_buffer_peekc@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bupeekc>:
push   %rax
call   1030 <jelio_buffer@plt>
test   %rax,%rax
je     1134 <bupeekc+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1040 <jelio_buffer_peekc@plt>
mov    $0xfffffffe,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.jelio_buf = type { i32 }
define i32 @bupeekc(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.jelio_buf*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call %struct.jelio_buf* @jelio_buffer(i32 %5)
store %struct.jelio_buf* %6, %struct.jelio_buf** %4
%7 = load %struct.jelio_buf*, %struct.jelio_buf** %4
%8 = icmp ne %struct.jelio_buf* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i32 -2, i32* %2
br label %13
10: ; preds = %1
%11 = load %struct.jelio_buf*, %struct.jelio_buf** %4
%12 = call i32 @jelio_buffer_peekc(%struct.jelio_buf* %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.jelio_buf = type { i32 }
define i32 @bupeekc(i32 %0) {
%2 = tail call %struct.jelio_buf* @jelio_buffer(i32 %0)
%3 = icmp eq %struct.jelio_buf* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @jelio_buffer_peekc(%struct.jelio_buf* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ -2, %1 ]
ret i32 %7
}