xunge/DecIR huggingface dataset:
void b(void) {
  __label__ l;
l:
m:
  dummy();
}


x86 assembly (clang, -O0):
<b>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <b+0x9>
jmp    111e <b+0xe>
mov    $0x0,%al
call   1030 <dummy@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @b() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
%3 = call i32 (...) @dummy()
ret void
}

LLVM IR (-O2):
define void @b() {
%1 = tail call i32 (...) @dummy()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void Focus(int focus) {
  focus = focus;
  fprintf(stderr, "NexStar does not support remote setting of focus.\n");
}


x86 assembly (clang, -O0):
<Focus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Focus>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"NexStar does not support remote setting of focus.\0A\00"
define void @Focus(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
store i32 %3, i32* %2
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"NexStar does not support remote setting of focus.\0A\00"
define void @Focus(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int sigemptyset(sigset_t *set __attribute__((unused))) {
  printf("sigemptyset\n");
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<sigemptyset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigemptyset>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
@str = [12 x i8] c"sigemptyset\00"
define i32 @sigemptyset(i32* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_pd(double, double);
__m128d test_mm_set_pd(double A, double B) { return _mm_set_pd(A, B); }


x86 assembly (clang, -O0):
<test_mm_set_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <_mm_set_pd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_set_pd>:
jmp    1030 <_mm_set_pd@plt>

LLVM IR (-O0):
define i32 @test_mm_set_pd(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i32 @_mm_set_pd(double %5, double %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_set_pd(double %0, double %1) {
%3 = tail call i32 @_mm_set_pd(double %0, double %1)
ret i32 %3
}
g(int a, int b, int c) { return b; }


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

x86 assembly (clang, -O2):
<g>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @g(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* %5
ret i32 %7
}

LLVM IR (-O2):
define i32 @g(i32 %0, i32 returned %1, i32 %2) {
ret i32 %1
}
reg0indreg1_set(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ r0 = (*p1); }


x86 assembly (clang, -O0):
<reg0indreg1_set>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @reg0indreg1_set(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = load float, float* %16
store float %17, float* %8
%18 = load i32, i32* %7
ret i32 %18
}

LLVM IR (-O2):
define i32 @reg0indreg1_set(double %0, double %1, i32 %2, i32 %3, float* nocapture readnone %4, float* nocapture readnone %5) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ MIPS_CLEAR_BIT(int, int /*<<< orphan*/);
void xburst_cgm_ungate_smb3() { MIPS_CLEAR_BIT((0xB0000000 + 0x28), 0); }


x86 assembly (clang, -O0):
<xburst_cgm_ungate_smb3>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb0000028,%edi
xor    %esi,%esi
call   1030 <MIPS_CLEAR_BIT@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xburst_cgm_ungate_smb3>:
mov    $0xb0000028,%edi
xor    %esi,%esi
jmp    1030 <MIPS_CLEAR_BIT@plt>

LLVM IR (-O0):
define void @xburst_cgm_ungate_smb3() {
%1 = call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 0)
ret void
}

LLVM IR (-O2):
define void @xburst_cgm_ungate_smb3() {
%1 = tail call i32 @MIPS_CLEAR_BIT(i32 -1342177240, i32 0)
ret void
}
short FIELD_NUM(int i) { return i >> 16; }


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

x86 assembly (clang, -O2):
<FIELD_NUM>:
mov    %edi,%eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define signext i16 @FIELD_NUM(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 16
%5 = trunc i32 %4 to i16
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @FIELD_NUM(i32 %0) {
%2 = lshr i32 %0, 16
%3 = trunc i32 %2 to i16
ret i16 %3
}
OP(fd, cf) { op_cf(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_cf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_cf()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_cf()
ret i32 undef
}
int ev_wait(int timeout) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @ev_wait(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ conv_a_binario(char *, int, char *);
int /*<<< orphan*/ printf(char *);
int main() {
  int i;
  char num_leido[80];
  char num_binario[80];
  int leido_base;
  conv_a_binario(num_leido, leido_base, num_binario);
  printf("Introduzca la base\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0xb4(%rbp),%esi
lea    -0xb0(%rbp),%rdx
call   1040 <conv_a_binario@plt>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xa8,%rsp
lea    0x50(%rsp),%rdi
mov    %rsp,%rdx
call   1040 <conv_a_binario@plt>
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xa8,%rsp
ret

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

LLVM IR (-O2):
@str = [19 x i8] c"Introduzca la base\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i32 @conv_a_binario(i8* %3, i32 undef, i8* %4)
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
char *stpcpy(char *, char *);
char *t13(char *x) { return stpcpy(x, "foo"); }


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

x86 assembly (clang, -O2):
<t13>:
movl   $0x6f6f66,(%rdi)
lea    0x3(%rdi),%rax
ret

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

LLVM IR (-O2):
define i8* @t13(i8* writeonly %0) {
%2 = getelementptr i8, i8* %0, i64 3
%3 = bitcast i8* %0 to i32*
store i32 7303014, i32* %3
ret i8* %2
}
int checkCPUendian() {
  union {
    unsigned long int i;
    unsigned char s[4];
  } c;
  c.i = 0x12345678;
  return (0x12 == c.s[0]);
}


x86 assembly (clang, -O0):
<checkCPUendian>:
push   %rbp
mov    %rsp,%rbp
movq   $0x12345678,-0x8(%rbp)
12
movzbl -0x8(%rbp),%ecx
mov    $0x12,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.anon = type { i64 }
define i32 @checkCPUendian() {
%1 = alloca %union.anon
%2 = bitcast %union.anon* %1 to i64*
store i64 305419896, i64* %2
%3 = bitcast %union.anon* %1 to [4 x i8]*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 18, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @checkCPUendian() {
ret i32 0
}
void close_realjoy(void) {}


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

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

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

LLVM IR (-O2):
define void @close_realjoy() {
ret void
}
/* Variables and functions */
size_t strlen(char const *);
int strncmp(char const *, char const *, size_t);
int strcmp(const char *s1, const char *s2) {
  size_t len1 = strlen(s1), len2 = strlen(s2),
         maxlen = len1 > len2 ? len1 : len2;
  return strncmp(s1, s2, maxlen);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1165 <strcmp+0x45>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    116d <strcmp+0x4d>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1030 <strncmp@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cmp    %rax,%rbx
cmovbe %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <strncmp@plt>

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp ugt i64 %3, %4
%6 = select i1 %5, i64 %3, i64 %4
%7 = tail call i32 @strncmp(i8* %0, i8* %1, i64 %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ medmeddev_int(int, int *);
int MAD_int(int n, int *data) {
  return (int)(1.483 * ((double)medmeddev_int(n, data)));
}


x86 assembly (clang, -O0):
<MAD_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <medmeddev_int@plt>
cvtsi2sd %rax,%xmm1
movsd  0xec8(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAD_int>:
push   %rax
call   1030 <medmeddev_int@plt>
cvtsi2sd %rax,%xmm0
mulsd  0xedd(%rip),%xmm0
cvttsd2si %xmm0,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @MAD_int(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = load i32*, i32** %4
%7 = call i64 @medmeddev_int(i32 %5, i32* %6)
%8 = sitofp i64 %7 to double
%9 = fmul double 1.483000e+00, %8
%10 = fptosi double %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @MAD_int(i32 %0, i32* %1) {
%3 = tail call i64 @medmeddev_int(i32 %0, i32* %1)
%4 = sitofp i64 %3 to double
%5 = fmul double %4, 1.483000e+00
%6 = fptosi double %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ nrfx_usbd_errata_type_52840_eng_b();
bool nrfx_usbd_errata_200(void) {
  return (1 && (!nrfx_usbd_errata_type_52840_eng_b()));
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <nrfx_usbd_errata_type_52840_eng_b@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
xor    %eax,%eax
call   1030 <nrfx_usbd_errata_type_52840_eng_b@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @nrfx_usbd_errata_200() {
%1 = call i32 (...) @nrfx_usbd_errata_type_52840_eng_b()
%2 = icmp ne i32 %1, 0
%3 = xor i1 %2, true
%4 = zext i1 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @nrfx_usbd_errata_200() {
%1 = tail call i32 (...) @nrfx_usbd_errata_type_52840_eng_b()
%2 = icmp eq i32 %1, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void write_be_u32(void *s, uint32_t x) {
  uint8_t *ptr = (uint8_t *)s;
  ptr[0] = (x >> 24);
  ptr[1] = (x >> 16);
  ptr[2] = (x >> 8);
  ptr[3] = x;
}


x86 assembly (clang, -O0):
<write_be_u32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_be_u32>:
mov    %esi,%eax
sar    $0x18,%eax
mov    %eax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
mov    %eax,0x4(%rdi)
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @write_be_u32(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = ashr i32 %1, 24
store i32 %4, i32* %3
%5 = ashr i32 %1, 16
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = bitcast i8* %6 to i32*
store i32 %5, i32* %7
%8 = ashr i32 %1, 8
%9 = getelementptr inbounds i8, i8* %0, i64 8
%10 = bitcast i8* %9 to i32*
store i32 %8, i32* %10
%11 = getelementptr inbounds i8, i8* %0, i64 12
%12 = bitcast i8* %11 to i32*
store i32 %1, i32* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRC4_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRC4_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRC4_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int Mini_LutWordNum(int LutSize) {
  return LutSize > 5 ? 1 << (LutSize - 5) : 1;
}


x86 assembly (clang, -O0):
<Mini_LutWordNum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jle    1126 <Mini_LutWordNum+0x26>
mov    -0x4(%rbp),%ecx
sub    $0x5,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <Mini_LutWordNum+0x33>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1133 <Mini_LutWordNum+0x33>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mini_LutWordNum>:
lea    -0x5(%rdi),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    $0x1,%ecx
cmp    $0x6,%edi
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @Mini_LutWordNum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 5
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sub nsw i32 %6, 5
%8 = shl i32 1, %7
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i32 [ %8, %5 ], [ 1, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @Mini_LutWordNum(i32 %0) {
%2 = icmp sgt i32 %0, 5
%3 = add nsw i32 %0, -5
%4 = shl nuw i32 1, %3
%5 = select i1 %2, i32 %4, i32 1
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char *malloc(scalar_t__);
scalar_t__ strlen(char *);
FILE *openFile(char path[], char filename[]) {
  char *filePath;
  if ((filePath = malloc(strlen(path) + strlen(filename) + 1)) == NULL) {
  }
}


x86 assembly (clang, -O0):
<openFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
add    %rax,%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1169 <openFile+0x49>
jmp    1169 <openFile+0x49>
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32* @openFile(i8* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = load i8*, i8** %5
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %8, %10
%12 = add nsw i64 %11, 1
%13 = call i8* @malloc(i64 %12)
store i8* %13, i8** %6
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %16
15: ; preds = %2
br label %16
16: ; preds = %15, %2
%17 = load i32*, i32** %3
ret i32* %17
}

LLVM IR (-O2):
define noalias i32* @openFile(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32* undef
}
void use(void *p) {}


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

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

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

LLVM IR (-O2):
define void @use(i8* nocapture %0) {
ret void
}
int compare_pints(void *first, void *second) {
  int *n1 = (int *)first;
  int *n2 = (int *)second;
  return *n1 - *n2;
}


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

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

LLVM IR (-O0):
define i32 @compare_pints(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compare_pints(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
ret i32 %7
}
int isWin(int a, int b, int c, int d) {
  if ((a < 0) || (b < 0) || (c < 0) || (d < 0))
    return 0;
  return (~((a ^ b) | (a ^ c) | (a ^ d)) & (0xF));
}


x86 assembly (clang, -O0):
<isWin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1138 <isWin+0x38>
cmpl   $0x0,-0xc(%rbp)
jl     1138 <isWin+0x38>
cmpl   $0x0,-0x10(%rbp)
jl     1138 <isWin+0x38>
cmpl   $0x0,-0x14(%rbp)
jge    1144 <isWin+0x44>
movl   $0x0,-0x4(%rbp)
jmp    1163 <isWin+0x63>
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
xor    -0x10(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
xor    -0x14(%rbp),%ecx
or     %ecx,%eax
xor    $0xffffffff,%eax
and    $0xf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWin>:
mov    %ecx,%eax
mov    %esi,%ecx
or     %edi,%ecx
or     %edx,%ecx
or     %eax,%ecx
js     111c <isWin+0x1c>
xor    %edi,%esi
xor    %edi,%edx
or     %esi,%edx
xor    %edi,%eax
or     %edx,%eax
not    %eax
and    $0xf,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @isWin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 0
br i1 %11, label %21, label %12
12: ; preds = %4
%13 = load i32, i32* %7
%14 = icmp slt i32 %13, 0
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = load i32, i32* %8
%17 = icmp slt i32 %16, 0
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %9
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %18, %15, %12, %4
store i32 0, i32* %5
br label %36
22: ; preds = %18
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = xor i32 %23, %24
%26 = load i32, i32* %6
%27 = load i32, i32* %8
%28 = xor i32 %26, %27
%29 = or i32 %25, %28
%30 = load i32, i32* %6
%31 = load i32, i32* %9
%32 = xor i32 %30, %31
%33 = or i32 %29, %32
%34 = xor i32 %33, -1
%35 = and i32 %34, 15
store i32 %35, i32* %5
br label %36
36: ; preds = %22, %21
%37 = load i32, i32* %5
ret i32 %37
}

LLVM IR (-O2):
define i32 @isWin(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = or i32 %1, %0
%6 = or i32 %5, %2
%7 = or i32 %6, %3
%8 = icmp sgt i32 %7, -1
br i1 %8, label %9, label %17
9: ; preds = %4
%10 = xor i32 %1, %0
%11 = xor i32 %2, %0
%12 = or i32 %11, %10
%13 = xor i32 %3, %0
%14 = or i32 %12, %13
%15 = and i32 %14, 15
%16 = xor i32 %15, 15
br label %17
17: ; preds = %4, %9
%18 = phi i32 [ %16, %9 ], [ 0, %4 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "usage: lpkg [-d device] [-f] package.pkg\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"usage: lpkg [-d device] [-f] package.pkg\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"usage: lpkg [-d device] [-f] package.pkg\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int doit(char *, char *);
int main(void) {
  int ret;
  ret = doit("www.example.com", NULL);
  ret = doit("www.example.com", "80");
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <doit@plt>
mov    %eax,-0x8(%rbp)
lea    0xec7(%rip),%rdi
lea    0xed0(%rip),%rsi
call   1030 <doit@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <doit@plt>
lea    0xee7(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <doit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"www.example.com\00"
@.str.1 = [3 x i8] c"80\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @doit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* null)
store i32 %3, i32* %2
%4 = call i32 @doit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [16 x i8] c"www.example.com\00"
@.str.1 = [3 x i8] c"80\00"
define i32 @main() {
%1 = tail call i32 @doit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* null)
%2 = tail call i32 @doit(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void dglTreePredistCancel(void *pvPredist, void *pvParam) { free(pvPredist); }


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

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

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

LLVM IR (-O2):
define void @dglTreePredistCancel(i8* nocapture %0, i8* nocapture readnone %1) {
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
struct mainwindow {
  int dummy;
};

/* Variables and functions */
int next_unread_item(struct mainwindow *);
int handle_next_unread(struct mainwindow *mw) { return next_unread_item(mw); }


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

x86 assembly (clang, -O2):
<handle_next_unread>:
jmp    1030 <next_unread_item@plt>

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

LLVM IR (-O2):
%struct.mainwindow = type { i32 }
define i32 @handle_next_unread(%struct.mainwindow* %0) {
%2 = tail call i32 @next_unread_item(%struct.mainwindow* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ csaF(char *);
void csaF2(signed char *x) { csaF(x); }


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

x86 assembly (clang, -O2):
<csaF2>:
jmp    1030 <csaF@plt>

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

LLVM IR (-O2):
define void @csaF2(i8* %0) {
%2 = tail call i32 @csaF(i8* %0)
ret void
}
void encodeDmaLoad(void) {}


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

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

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

LLVM IR (-O2):
define void @encodeDmaLoad() {
ret void
}
void dummy_propagate(struct rb_node *node, struct rb_node *stop) {}


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

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

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

LLVM IR (-O2):
%struct.rb_node = type opaque
define void @dummy_propagate(%struct.rb_node* nocapture %0, %struct.rb_node* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2CVMUserProgramHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void I2CVMUserProgramRequestUpdate() {
  UAVObjRequestUpdate(I2CVMUserProgramHandle());
}


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

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

LLVM IR (-O0):
define void @I2CVMUserProgramRequestUpdate() {
%1 = call i32 (...) @I2CVMUserProgramHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @I2CVMUserProgramRequestUpdate() {
%1 = tail call i32 (...) @I2CVMUserProgramHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void analyzer_free(const char *text) { free((char *)text); }


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

LLVM IR (-O0):
define void @analyzer_free(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 @analyzer_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ turn(int);
void left() { turn(-90); }


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

x86 assembly (clang, -O2):
<left>:
mov    $0xffffffa6,%edi
jmp    1030 <turn@plt>

LLVM IR (-O0):
define void @left() {
%1 = call i32 @turn(i32 -90)
ret void
}

LLVM IR (-O2):
define void @left() {
%1 = tail call i32 @turn(i32 -90)
ret void
}
void foo_1_1_1_2_2_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_2_2_1_2_1_1() {
ret void
}
/* Variables and functions */
scalar_t__ islower(int);
scalar_t__ isupper(int);
int tolower(int);
int toupper(int);
int reverse_case(int c) {
  return isupper(c) ? tolower(c) : (islower(c) ? toupper(c) : c);
}


x86 assembly (clang, -O0):
<reverse_case>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <isupper@plt>
cmp    $0x0,%rax
je     116d <reverse_case+0x2d>
mov    -0x4(%rbp),%edi
call   1050 <tolower@plt>
mov    %eax,-0x8(%rbp)
jmp    119b <reverse_case+0x5b>
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     118f <reverse_case+0x4f>
mov    -0x4(%rbp),%edi
call   1040 <toupper@plt>
mov    %eax,-0xc(%rbp)
jmp    1195 <reverse_case+0x55>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_case>:
push   %rbx
mov    %edi,%ebx
call   1060 <isupper@plt>
test   %rax,%rax
je     1155 <reverse_case+0x15>
mov    %ebx,%edi
pop    %rbx
jmp    1050 <tolower@plt>
mov    %ebx,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1169 <reverse_case+0x29>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <toupper@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @reverse_case(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isupper(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @tolower(i32 %7)
br label %20
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i64 @islower(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = load i32, i32* %2
%15 = call i32 @toupper(i32 %14)
br label %18
16: ; preds = %9
%17 = load i32, i32* %2
br label %18
18: ; preds = %16, %13
%19 = phi i32 [ %15, %13 ], [ %17, %16 ]
br label %20
20: ; preds = %18, %6
%21 = phi i32 [ %8, %6 ], [ %19, %18 ]
ret i32 %21
}

LLVM IR (-O2):
define i32 @reverse_case(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @tolower(i32 %0)
br label %11
6: ; preds = %1
%7 = tail call i64 @islower(i32 %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @toupper(i32 %0)
br label %11
11: ; preds = %6, %9, %4
%12 = phi i32 [ %5, %4 ], [ %10, %9 ], [ %0, %6 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printInt(int *ptr) { printf(" --> %d ", *ptr); }


x86 assembly (clang, -O0):
<printInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c" --> %d \00"
define void @printInt(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Type definitions */
struct sshbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sshbuf_len(struct sshbuf const *);
int /*<<< orphan*/ sshbuf_ptr(struct sshbuf const *);
int sshbuf_put_string8(struct sshbuf *, int /*<<< orphan*/, int /*<<< orphan*/);
int sshbuf_put_stringb8(struct sshbuf *buf, const struct sshbuf *v) {
  return sshbuf_put_string8(buf, sshbuf_ptr(v), sshbuf_len(v));
}


x86 assembly (clang, -O0):
<sshbuf_put_stringb8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <sshbuf_ptr@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sshbuf_len@plt>
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    %eax,%edx
call   1040 <sshbuf_put_string8@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sshbuf_put_stringb8>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1050 <sshbuf_ptr@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <sshbuf_len@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <sshbuf_put_string8@plt>

LLVM IR (-O0):
%struct.sshbuf = type { i32 }
define i32 @sshbuf_put_stringb8(%struct.sshbuf* %0, %struct.sshbuf* %1) {
%3 = alloca %struct.sshbuf*
%4 = alloca %struct.sshbuf*
store %struct.sshbuf* %0, %struct.sshbuf** %3
store %struct.sshbuf* %1, %struct.sshbuf** %4
%5 = load %struct.sshbuf*, %struct.sshbuf** %3
%6 = load %struct.sshbuf*, %struct.sshbuf** %4
%7 = call i32 @sshbuf_ptr(%struct.sshbuf* %6)
%8 = load %struct.sshbuf*, %struct.sshbuf** %4
%9 = call i32 @sshbuf_len(%struct.sshbuf* %8)
%10 = call i32 @sshbuf_put_string8(%struct.sshbuf* %5, i32 %7, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sshbuf = type { i32 }
define i32 @sshbuf_put_stringb8(%struct.sshbuf* %0, %struct.sshbuf* %1) {
%3 = tail call i32 @sshbuf_ptr(%struct.sshbuf* %1)
%4 = tail call i32 @sshbuf_len(%struct.sshbuf* %1)
%5 = tail call i32 @sshbuf_put_string8(%struct.sshbuf* %0, i32 %3, i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ move(int, int);
void ClearMove() {
  move(22, 49);
  clrtoeol();
}


x86 assembly (clang, -O0):
<ClearMove>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
mov    $0x31,%esi
call   1040 <move@plt>
mov    $0x0,%al
call   1030 <clrtoeol@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearMove>:
push   %rax
mov    $0x16,%edi
mov    $0x31,%esi
call   1040 <move@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <clrtoeol@plt>

LLVM IR (-O0):
define void @ClearMove() {
%1 = call i32 @move(i32 22, i32 49)
%2 = call i32 (...) @clrtoeol()
ret void
}

LLVM IR (-O2):
define void @ClearMove() {
%1 = tail call i32 @move(i32 22, i32 49)
%2 = tail call i32 (...) @clrtoeol()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(size_t);
void *talloc_init(int /*<<< orphan*/, void *);
void *talloc(size_t size, void *parent) {
  return talloc_init(malloc(size + (sizeof(void *) * 3)), parent);
}


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

x86 assembly (clang, -O2):
<talloc>:
push   %rbx
mov    %rsi,%rbx
add    $0x18,%rdi
call   1030 <malloc@plt>
mov    %eax,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1040 <talloc_init@plt>

LLVM IR (-O0):
define i8* @talloc(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = add i64 %5, 24
%7 = call i32 @malloc(i64 %6)
%8 = load i8*, i8** %4
%9 = call i8* @talloc_init(i32 %7, i8* %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @talloc(i64 %0, i8* %1) {
%3 = add i64 %0, 24
%4 = tail call i32 @malloc(i64 %3)
%5 = tail call i8* @talloc_init(i32 %4, i8* %1)
ret i8* %5
}
int external_sub(int a, int b) { return (a - b); }


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

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

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

LLVM IR (-O2):
define i32 @external_sub(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ foo(char *);
void my_memcpy(void *q, unsigned int n) {
  unsigned i;
  char p[1024];
  for (i = 0; i < n; ++i)
    ((char *)p)[i] = ((char *)q)[i];
  foo(p);
}


x86 assembly (clang, -O0):
<my_memcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1157 <my_memcpy+0x47>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%eax
mov    %cl,-0x410(%rbp,%rax,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1129 <my_memcpy+0x19>
lea    -0x410(%rbp),%rdi
call   1030 <foo@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_memcpy>:
sub    $0x408,%rsp
test   %esi,%esi
je     113b <my_memcpy+0x1b>
mov    %rdi,%rax
mov    %esi,%edx
mov    %rsp,%rdi
mov    %rax,%rsi
call   1030 <memcpy@plt>
mov    %rsp,%rdi
call   1040 <foo@plt>
add    $0x408,%rsp
ret

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

LLVM IR (-O2):
define void @my_memcpy(i8* nocapture %0, i32 %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %1, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = zext i32 %1 to i64
br label %9
9: ; preds = %6, %2
%10 = call i32 @foo(i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER_CTX;

/* Variables and functions */
int /*<<< orphan*/ EVP_CIPHER_CTX_cleanup(int /*<<< orphan*/ *);
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) {
  if (ctx) {
    EVP_CIPHER_CTX_cleanup(ctx);
    free(ctx);
  }
}


x86 assembly (clang, -O0):
<EVP_CIPHER_CTX_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <EVP_CIPHER_CTX_free+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <EVP_CIPHER_CTX_cleanup@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EVP_CIPHER_CTX_free>:
test   %rdi,%rdi
je     1137 <EVP_CIPHER_CTX_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <EVP_CIPHER_CTX_cleanup@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @EVP_CIPHER_CTX_free(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @EVP_CIPHER_CTX_cleanup(i32* %0)
%5 = tail call i32 @free(i32* %0)
br label %6
6: ; preds = %3, %1
ret void
}
void yyerror() {}


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

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

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

LLVM IR (-O2):
define void @yyerror() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void output_function_json_post() { printf("]\n"); }


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

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

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

LLVM IR (-O2):
@str = [2 x i8] c"]\00"
define void @output_function_json_post() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
int __libc_current_sigrtmin() { return 34; }


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

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

LLVM IR (-O0):
define i32 @__libc_current_sigrtmin() {
ret i32 34
}

LLVM IR (-O2):
define i32 @__libc_current_sigrtmin() {
ret i32 34
}