xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int __u8;
typedef int __u16;

/* Variables and functions */
int hi8(int);
int lo8(int);
__u16 crc_ccitt_update(__u16 crc, __u8 data) {
  data ^= lo8(crc);
  data ^= data << 4;
  crc = ((((__u16)data << 8) | hi8(crc)) ^ (__u8)(data >> 4) ^
         ((__u16)data << 3));
  return crc;
}


x86 assembly (clang, -O0):
<crc_ccitt_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <lo8@plt>
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <hi8@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc_ccitt_update>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%r15d
call   1030 <lo8@plt>
mov    %eax,%ebx
xor    %r14d,%ebx
mov    %ebx,%eax
shl    $0x4,%eax
xor    %eax,%ebx
mov    %ebx,%ebp
shl    $0x8,%ebp
mov    %r15d,%edi
call   1040 <hi8@plt>
or     %ebp,%eax
mov    %ebx,%ecx
sar    $0x4,%ecx
shl    $0x3,%ebx
xor    %ecx,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @crc_ccitt_update(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 = call i32 @lo8(i32 %5)
%7 = load i32, i32* %4
%8 = xor i32 %7, %6
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = shl i32 %9, 4
%11 = load i32, i32* %4
%12 = xor i32 %11, %10
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = shl i32 %13, 8
%15 = load i32, i32* %3
%16 = call i32 @hi8(i32 %15)
%17 = or i32 %14, %16
%18 = load i32, i32* %4
%19 = ashr i32 %18, 4
%20 = xor i32 %17, %19
%21 = load i32, i32* %4
%22 = shl i32 %21, 3
%23 = xor i32 %20, %22
store i32 %23, i32* %3
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @crc_ccitt_update(i32 %0, i32 %1) {
%3 = tail call i32 @lo8(i32 %0)
%4 = xor i32 %3, %1
%5 = shl i32 %4, 4
%6 = xor i32 %5, %4
%7 = shl i32 %6, 8
%8 = tail call i32 @hi8(i32 %0)
%9 = or i32 %7, %8
%10 = ashr i32 %6, 4
%11 = shl i32 %6, 3
%12 = xor i32 %11, %10
%13 = xor i32 %12, %9
ret i32 %13
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float parcels_uniform(float low, float high) {
  return (float)rand() / (float)((float)(RAND_MAX) / (high - low)) + low;
}


x86 assembly (clang, -O0):
<parcels_uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb3(%rip),%rax
cvtsi2ssq (%rax),%xmm1
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
divss  %xmm2,%xmm1
divss  %xmm1,%xmm0
addss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parcels_uniform>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2eb6(%rip),%rax
xorps  %xmm1,%xmm1
cvtsi2ssq (%rax),%xmm1
movss  (%rsp),%xmm2
movss  0x4(%rsp),%xmm3
subss  %xmm2,%xmm3
divss  %xmm3,%xmm1
divss  %xmm1,%xmm0
addss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @parcels_uniform(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call i64 (...) @rand()
%6 = sitofp i64 %5 to float
%7 = load i64, i64* @RAND_MAX
%8 = sitofp i64 %7 to float
%9 = load float, float* %4
%10 = load float, float* %3
%11 = fsub float %9, %10
%12 = fdiv float %8, %11
%13 = fdiv float %6, %12
%14 = load float, float* %3
%15 = fadd float %13, %14
ret float %15
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @parcels_uniform(float %0, float %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load i64, i64* @RAND_MAX
%6 = sitofp i64 %5 to float
%7 = fsub float %1, %0
%8 = fdiv float %6, %7
%9 = fdiv float %4, %8
%10 = fadd float %9, %0
ret float %10
}
void test24_Blink5_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test24_Blink5_targetInit__I() {
ret void
}
int fun103() { return 103; }


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

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

LLVM IR (-O0):
define i32 @fun103() {
ret i32 103
}

LLVM IR (-O2):
define i32 @fun103() {
ret i32 103
}
/* Variables and functions */
int /*<<< orphan*/ Fortran2cstring(char *, char *, int, int);
int PAPI_add_named_event(int, char *);
void PAPIF_ADD_NAMED_EVENT(int *EventSet, char *EventName, int *check,
                           int Event_len) {
  char tmp[128];
  Fortran2cstring(tmp, EventName, 128, Event_len);
  *check = PAPI_add_named_event(*EventSet, tmp);
}


x86 assembly (clang, -O0):
<PAPIF_ADD_NAMED_EVENT>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    -0xa0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%ecx
mov    $0x80,%edx
call   1040 <Fortran2cstring@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    -0xa0(%rbp),%rsi
call   1030 <PAPI_add_named_event@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PAPIF_ADD_NAMED_EVENT>:
push   %r15
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x80,%edx
call   1040 <Fortran2cstring@plt>
mov    (%rbx),%edi
mov    %r15,%rsi
call   1030 <PAPI_add_named_event@plt>
mov    %eax,(%r14)
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @PAPIF_ADD_NAMED_EVENT(i32* %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca [128 x i8]
store i32* %0, i32** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
%11 = load i8*, i8** %6
%12 = load i32, i32* %8
%13 = call i32 @Fortran2cstring(i8* %10, i8* %11, i32 128, i32 %12)
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %9, i64 0, i64 0
%17 = call i32 @PAPI_add_named_event(i32 %15, i8* %16)
%18 = load i32*, i32** %7
store i32 %17, i32* %18
ret void
}

LLVM IR (-O2):
define void @PAPIF_ADD_NAMED_EVENT(i32* nocapture %0, i8* %1, i32* nocapture writeonly %2, i32 %3) {
%5 = alloca [128 x i8]
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%7 = call i32 @Fortran2cstring(i8* %6, i8* %1, i32 128, i32 %3)
%8 = load i32, i32* %0
%9 = call i32 @PAPI_add_named_event(i32 %8, i8* %6)
store i32 %9, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __fail();
int main(void) {
  int a, x;
  if (a > 0) {
    x = 2;
  } else {
    x = 3;
  }
  if (x == 2)
    __fail();
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1135 <main+0x25>
movl   $0x2,-0xc(%rbp)
jmp    113c <main+0x2c>
movl   $0x3,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    114d <main+0x3d>
mov    $0x0,%al
call   1030 <__fail@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ sflap_send(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
void serv_set_info(char *info) {
  char buf[2048];
  snprintf(buf, sizeof(buf), "toc_set_info \"%s\n\"", info);
  sflap_send(buf, -1, 2);
}


x86 assembly (clang, -O0):
<serv_set_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x810(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x800,%esi
lea    0xeba(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x810(%rbp),%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <sflap_send@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serv_set_info>:
push   %rbx
sub    $0x800,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x800,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
mov    $0x2,%edx
call   1040 <sflap_send@plt>
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"toc_set_info \22%s\0A\22\00"
define void @serv_set_info(i8* %0) {
%2 = alloca i8*
%3 = alloca [2048 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 2048, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%8 = call i32 @sflap_send(i8* %7, i32 -1, i32 2)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"toc_set_info \22%s\0A\22\00"
define void @serv_set_info(i8* %0) {
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 2048, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @sflap_send(i8* %3, i32 -1, i32 2)
ret void
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
double myrandom_() { return (double)rand() / RAND_MAX; }


x86 assembly (clang, -O0):
<myrandom_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec1(%rip),%rax
divsd  (%rax),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrandom_>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2ec4(%rip),%rax
divsd  (%rax),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @myrandom_() {
%1 = call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @myrandom_() {
%1 = tail call i64 (...) @rand()
%2 = sitofp i64 %1 to double
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ _fail(char const *const, int const);
int /*<<< orphan*/ print_error(char *, char const *const);
void _assert_true(const int result, const char *const expression,
                  const char *const file, const int line) {
  if (!result) {
    print_error("%s\n", expression);
    _fail(file, line);
  }
}


x86 assembly (clang, -O0):
<_assert_true>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115c <_assert_true+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <print_error@plt>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <_fail@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_assert_true>:
test   %edi,%edi
je     1125 <_assert_true+0x5>
ret
push   %rbp
push   %rbx
push   %rax
mov    %ecx,%ebp
mov    %rdx,%rbx
lea    0xecc(%rip),%rdi
call   1030 <print_error@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <_fail@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @_assert_true(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = tail call i32 @print_error(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @_fail(i8* %2, i32 %3)
br label %9
9: ; preds = %6, %4
ret void
}
/* Variables and functions */
void *malloc(unsigned int count) {
  if (count == 0)
    return 0;
  return 0;
}


x86 assembly (clang, -O0):
<malloc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    111e <malloc+0x1e>
movq   $0x0,-0x8(%rbp)
jmp    1126 <malloc+0x26>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i8* @malloc(i32 %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
int /*<<< orphan*/ free(void *);
void NFDi_Free(void *ptr) {
  assert(ptr);
  free(ptr);
}


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

x86 assembly (clang, -O2):
<NFDi_Free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @NFDi_Free(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_assert(int /*<<< orphan*/, char *);
int /*<<< orphan*/ __ESBMC_is_zero_string(char const *);
long atol_strabs(const char *nptr) {
__ESBMC_HIDE:;
  long res;
  __ESBMC_assert(__ESBMC_is_zero_string(nptr),
                 "zero-termination of argument of atol");
  return res;
}


x86 assembly (clang, -O0):
<atol_strabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__ESBMC_is_zero_string@plt>
mov    %eax,%edi
lea    0xec2(%rip),%rsi
call   1030 <__ESBMC_assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atol_strabs>:
push   %rax
call   1040 <__ESBMC_is_zero_string@plt>
lea    0xed3(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <__ESBMC_assert@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"zero-termination of argument of atol\00"
define i64 @atol_strabs(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
br label %4
4: ; preds = %1
%5 = load i8*, i8** %2
%6 = call i32 @__ESBMC_is_zero_string(i8* %5)
%7 = call i32 @__ESBMC_assert(i32 %6, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%8 = load i64, i64* %3
ret i64 %8
}

LLVM IR (-O2):
@.str = [37 x i8] c"zero-termination of argument of atol\00"
define i64 @atol_strabs(i8* %0) {
%2 = tail call i32 @__ESBMC_is_zero_string(i8* %0)
%3 = tail call i32 @__ESBMC_assert(i32 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i64 undef
}
/* Variables and functions */
bool nrf53_errata_30(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_30() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ merge(int, int, int);
void sort(int low, int high) {
  int mid;
  if (low < high) {
    mid = (low + high) / 2;
    sort(low, mid);
    sort(mid + 1, high);
    merge(low, mid, high);
  }
}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1172 <sort+0x52>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <sort@plt>
mov    -0xc(%rbp),%edi
add    $0x1,%edi
mov    -0x8(%rbp),%esi
call   1030 <sort@plt>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1040 <merge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort>:
cmp    %esi,%edi
jge    1160 <sort+0x40>
push   %r15
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%r15d
lea    (%r14,%r15,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%esi
call   1030 <sort@plt>
lea    0x1(%rbx),%edi
mov    %r14d,%esi
call   1030 <sort@plt>
mov    %r15d,%edi
mov    %ebx,%esi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

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

LLVM IR (-O2):
define void @sort(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %5, label %4
4: ; preds = %2, %5
ret void
5: ; preds = %2
%6 = add nsw i32 %1, %0
%7 = sdiv i32 %6, 2
tail call void @sort(i32 %0, i32 %7)
%8 = add nsw i32 %7, 1
tail call void @sort(i32 %8, i32 %1)
%9 = tail call i32 @merge(i32 %0, i32 %7, i32 %1)
br label %4
}
float linearInterpolate(float v0, float v1, float x) {
  return x * (v1 - v0) + v0;
}


x86 assembly (clang, -O0):
<linearInterpolate>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<linearInterpolate>:
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @linearInterpolate(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %5
%9 = load float, float* %4
%10 = fsub float %8, %9
%11 = load float, float* %4
%12 = call float @llvm.fmuladd.f32(float %7, float %10, float %11)
ret float %12
}

LLVM IR (-O2):
define float @linearInterpolate(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %2, float %4, float %0)
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void _exit(int i) {
  printf("Program exit with code %d", i);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
jmp    112a <_exit+0x1a>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
nop
jmp    1120 <_exit+0x10>

LLVM IR (-O0):
@.str = [26 x i8] c"Program exit with code %d\00"
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %5
5: ; preds = %1, %5
br label %5
}

LLVM IR (-O2):
@.str = [26 x i8] c"Program exit with code %d\00"
define void @_exit(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %3
3: ; preds = %1, %3
br label %3
}
int m_strlen(const char *str) {
  unsigned int i = 0;
  while (str[i]) {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<m_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
cmpb   $0x0,(%rax,%rcx,1)
je     112e <m_strlen+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <m_strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_strlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi,%rax,1)
jne    1110 <m_strlen+0x10>
ret

LLVM IR (-O0):
define i32 @m_strlen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %11, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = icmp ne i8 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load i32, i32* %3
%13 = add i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @m_strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %8, %2 ]
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}
int bitOrwith(int sourceWord, int destinationWord) {
  return sourceWord | destinationWord;
}


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

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

LLVM IR (-O0):
define i32 @bitOrwith(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 = or i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @bitOrwith(i32 %0, i32 %1) {
%3 = or i32 %1, %0
ret i32 %3
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Write(int, struct ship *, long, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
void send_points(struct ship *ship, long a) { Write(17, ship, a, 0, 0, 0); }


x86 assembly (clang, -O0):
<send_points>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x11,%edi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <Write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_points>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x11,%edi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <Write@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_points(%struct.ship* %0, i64 %1) {
%3 = alloca %struct.ship*
%4 = alloca i64
store %struct.ship* %0, %struct.ship** %3
store i64 %1, i64* %4
%5 = load %struct.ship*, %struct.ship** %3
%6 = load i64, i64* %4
%7 = call i32 @Write(i32 17, %struct.ship* %5, i64 %6, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_points(%struct.ship* %0, i64 %1) {
%3 = tail call i32 @Write(i32 17, %struct.ship* %0, i64 %1, i32 0, i32 0, i32 0)
ret void
}
int unhighlightRegion_BaseScreen(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @unhighlightRegion_BaseScreen() {
ret i32 0
}
/* Variables and functions */
int __getpriority(int, int);
int getpriority(int which, int who) {
  int result = __getpriority(which, who);
  return (result < 0) ? result : 20 - result;
}


x86 assembly (clang, -O0):
<getpriority>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <__getpriority@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1141 <getpriority+0x31>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114c <getpriority+0x3c>
mov    $0x14,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpriority>:
push   %rax
call   1030 <__getpriority@plt>
mov    $0x14,%ecx
sub    %eax,%ecx
test   %eax,%eax
cmovns %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getpriority(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @__getpriority(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* %5
br label %16
13: ; preds = %2
%14 = load i32, i32* %5
%15 = sub nsw i32 20, %14
br label %16
16: ; preds = %13, %11
%17 = phi i32 [ %12, %11 ], [ %15, %13 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @getpriority(i32 %0, i32 %1) {
%3 = tail call i32 @__getpriority(i32 %0, i32 %1)
%4 = icmp slt i32 %3, 0
%5 = sub nsw i32 20, %3
%6 = select i1 %4, i32 %3, i32 %5
ret i32 %6
}
unsigned char spi_xfer_byte(unsigned char data) {
  while (!(*(unsigned char *)0x5203 & (1 << 1)))
    ;
  *(unsigned char *)0x5204 = data;
  while (!(*(unsigned char *)0x5203 & (1 << 0)))
    ;
  return *(unsigned char *)0x5204;
}


x86 assembly (clang, -O0):
<spi_xfer_byte>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x5203,%eax
movzbl (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112a <spi_xfer_byte+0x2a>
jmp    112f <spi_xfer_byte+0x2f>
jmp    110a <spi_xfer_byte+0xa>
mov    -0x1(%rbp),%cl
mov    $0x5204,%eax
mov    %cl,(%rax)
mov    $0x5203,%eax
movzbl (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1159 <spi_xfer_byte+0x59>
jmp    115e <spi_xfer_byte+0x5e>
jmp    1139 <spi_xfer_byte+0x39>
mov    $0x5204,%eax
movzbl (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<spi_xfer_byte>:
testb  $0x2,0x5203
02
jne    1112 <spi_xfer_byte+0x12>
nopw   0x0(%rax,%rax,1)
jmp    1110 <spi_xfer_byte+0x10>
mov    %dil,0x5204
testb  $0x1,0x5203
01
jne    1132 <spi_xfer_byte+0x32>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1130 <spi_xfer_byte+0x30>
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @spi_xfer_byte(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %9, %1
%4 = load i8, i8* inttoptr (i64 20995 to i8*)
%5 = zext i8 %4 to i32
%6 = and i32 %5, 2
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %10
9: ; preds = %3
br label %3
10: ; preds = %3
%11 = load i8, i8* %2
store i8 %11, i8* inttoptr (i64 20996 to i8*)
br label %12
12: ; preds = %18, %10
%13 = load i8, i8* inttoptr (i64 20995 to i8*)
%14 = zext i8 %13 to i32
%15 = and i32 %14, 1
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
br i1 %17, label %18, label %19
18: ; preds = %12
br label %12
19: ; preds = %12
%20 = load i8, i8* inttoptr (i64 20996 to i8*)
ret i8 %20
}

LLVM IR (-O2):
define zeroext i8 @spi_xfer_byte(i8 zeroext %0) {
%2 = load i8, i8* inttoptr (i64 20995 to i8*)
%3 = and i8 %2, 2
%4 = icmp eq i8 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1, %5
br label %5
6: ; preds = %1
store i8 %0, i8* inttoptr (i64 20996 to i8*)
%7 = load i8, i8* inttoptr (i64 20995 to i8*)
%8 = and i8 %7, 1
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6, %10
br label %10
11: ; preds = %6
ret i8 %0
}
/* Variables and functions */
unsigned long CANIntNumberGet(unsigned long);
int /*<<< orphan*/ IntDisable(unsigned long);
int /*<<< orphan*/ IntUnregister(unsigned long);
void CANIntUnregister(unsigned long ulBase) {
  unsigned long ulIntNumber;
  ;
  ulIntNumber = CANIntNumberGet(ulBase);
  IntUnregister(ulIntNumber);
  IntDisable(ulIntNumber);
}


x86 assembly (clang, -O0):
<CANIntUnregister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <CANIntNumberGet@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <IntUnregister@plt>
mov    -0x10(%rbp),%rdi
call   1030 <IntDisable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CANIntUnregister>:
push   %rbx
call   1040 <CANIntNumberGet@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <IntUnregister@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <IntDisable@plt>

LLVM IR (-O0):
define void @CANIntUnregister(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i64 @CANIntNumberGet(i64 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @IntUnregister(i64 %6)
%8 = load i64, i64* %3
%9 = call i32 @IntDisable(i64 %8)
ret void
}

LLVM IR (-O2):
define void @CANIntUnregister(i64 %0) {
%2 = tail call i64 @CANIntNumberGet(i64 %0)
%3 = tail call i32 @IntUnregister(i64 %2)
%4 = tail call i32 @IntDisable(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f2(char *, int);
int /*<<< orphan*/ printf(char *, char *);
void f1(void) {
  char string[10] = "string1";
  int pointer = 0;
  printf("before f2 string = %s;\n", string);
  f2(string, pointer);
  printf("after f2 string = %s;\n", string);
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0xa(%rbp)
mov    0xece(%rip),%ax
mov    %ax,-0x2(%rbp)
movl   $0x0,-0x10(%rbp)
lea    -0xa(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
lea    -0xa(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <f2@plt>
lea    -0xa(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
push   %rbx
sub    $0x10,%rsp
movabs $0x31676e69727473,%rax
mov    %rax,(%rsp)
movw   $0x0,0x8(%rsp)
lea    0xec9(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <f2@plt>
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.f1.string = [10 x i8] c"string1\00\00\00"
@.str = [24 x i8] c"before f2 string = %s;\0A\00"
@.str.1 = [23 x i8] c"after f2 string = %s;\0A\00"
define void @f1() {
%1 = alloca [10 x i8]
%2 = alloca i32
%3 = bitcast [10 x i8]* %1 to i8*
store i32 0, i32* %2
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @f2(i8* %6, i32 %7)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret void
}

LLVM IR (-O2):
@__const.f1.string = [10 x i8] c"string1\00\00\00"
@.str = [24 x i8] c"before f2 string = %s;\0A\00"
@.str.1 = [23 x i8] c"after f2 string = %s;\0A\00"
define void @f1() {
%1 = alloca [10 x i8]
%2 = getelementptr inbounds [10 x i8], [10 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @f2(i8* %2, i32 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fdi_s25fl116k_wait_while_busy();
int /*<<< orphan*/ fdi_spi_tx1(int, int);
void fdi_s25fl116k_chip_erase(void) {
  fdi_s25fl116k_wait_while_busy();
  fdi_spi_tx1(23, 0xc7);
}


x86 assembly (clang, -O0):
<fdi_s25fl116k_chip_erase>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <fdi_s25fl116k_wait_while_busy@plt>
mov    $0x17,%edi
mov    $0xc7,%esi
call   1030 <fdi_spi_tx1@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdi_s25fl116k_chip_erase>:
push   %rax
xor    %eax,%eax
call   1040 <fdi_s25fl116k_wait_while_busy@plt>
mov    $0x17,%edi
mov    $0xc7,%esi
pop    %rax
jmp    1030 <fdi_spi_tx1@plt>

LLVM IR (-O0):
define void @fdi_s25fl116k_chip_erase() {
%1 = call i32 (...) @fdi_s25fl116k_wait_while_busy()
%2 = call i32 @fdi_spi_tx1(i32 23, i32 199)
ret void
}

LLVM IR (-O2):
define void @fdi_s25fl116k_chip_erase() {
%1 = tail call i32 (...) @fdi_s25fl116k_wait_while_busy()
%2 = tail call i32 @fdi_spi_tx1(i32 23, i32 199)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lib_default_search_paths();
int /*<<< orphan*/ push_path(char const *);
void lib_add_search_path(const char *path) {
  lib_default_search_paths();
  push_path(path);
}


x86 assembly (clang, -O0):
<lib_add_search_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <lib_default_search_paths@plt>
mov    -0x8(%rbp),%rdi
call   1040 <push_path@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lib_add_search_path>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <lib_default_search_paths@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <push_path@plt>

LLVM IR (-O0):
define void @lib_add_search_path(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @lib_default_search_paths()
%4 = load i8*, i8** %2
%5 = call i32 @push_path(i8* %4)
ret void
}

LLVM IR (-O2):
define void @lib_add_search_path(i8* %0) {
%2 = tail call i32 (...) @lib_default_search_paths()
%3 = tail call i32 @push_path(i8* %0)
ret void
}
/* Variables and functions */
int dialog_yesno(char const *, char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ numeric_arg(char **, int);
int call_yesno(const char *t, char *av[], int *offset_add) {
  *offset_add = 4;
  return dialog_yesno(t, av[1], numeric_arg(av, 2), numeric_arg(av, 3));
}


x86 assembly (clang, -O0):
<call_yesno>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x4,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1040 <numeric_arg@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1040 <numeric_arg@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    %eax,%ecx
call   1030 <dialog_yesno@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_yesno>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movl   $0x4,(%rdx)
mov    0x8(%rsi),%r15
mov    %rsi,%rdi
mov    $0x2,%esi
call   1040 <numeric_arg@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <numeric_arg@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebp,%edx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <dialog_yesno@plt>

LLVM IR (-O0):
define i32 @call_yesno(i8* %0, i8** %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
store i32 4, i32* %7
%8 = load i8*, i8** %4
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = load i8**, i8*** %5
%13 = call i32 @numeric_arg(i8** %12, i32 2)
%14 = load i8**, i8*** %5
%15 = call i32 @numeric_arg(i8** %14, i32 3)
%16 = call i32 @dialog_yesno(i8* %8, i8* %11, i32 %13, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @call_yesno(i8* %0, i8** %1, i32* nocapture writeonly %2) {
store i32 4, i32* %2
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @numeric_arg(i8** %1, i32 2)
%7 = tail call i32 @numeric_arg(i8** %1, i32 3)
%8 = tail call i32 @dialog_yesno(i8* %0, i8* %5, i32 %6, i32 %7)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_exception_1111();
void m68k_op_cptrapcc_32(void) {
  if (0) {

    ;
    return;
  }
  m68ki_exception_1111();
}


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

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

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

LLVM IR (-O2):
define void @m68k_op_cptrapcc_32() {
%1 = tail call i32 (...) @m68ki_exception_1111()
ret void
}
void foo_int(signed int x, unsigned int y) {
  int t = (((x) >= 0) ? (x) : -(x));
  if (t != y)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<foo_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1133 <foo_int+0x23>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113b <foo_int+0x2b>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1152 <foo_int+0x42>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo_int>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
cmp    %esi,%eax
jne    111c <foo_int+0xc>
ret
push   %rax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @foo_int(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = icmp eq i32 %3, %1
br i1 %4, label %6, label %5
5: ; preds = %2
tail call void @abort()
unreachable
6: ; preds = %2
ret void
}
void XFreeCursor() {}


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

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

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

LLVM IR (-O2):
define void @XFreeCursor() {
ret void
}
double SIM_power_transresswitch(width, nchannel, stack)
double width;
int nchannel;
int stack;
{
  double restrans;
  restrans = (nchannel) ? ((25800 * 0.0875)) : ((61200 * 0.0875));
  return ((1.0 + ((stack - 1.0) * 0.8)) * restrans / width);
}


x86 assembly (clang, -O0):
<SIM_power_transresswitch>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
movsd  0xef6(%rip),%xmm0
movsd  0xef6(%rip),%xmm1
movsd  %xmm1,-0x28(%rbp)
cmp    $0x0,%eax
movsd  %xmm0,-0x20(%rbp)
jne    113f <SIM_power_transresswitch+0x3f>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x10(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe9e(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9a(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIM_power_transresswitch>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
cvtsi2sd %esi,%xmm1
addsd  0xeed(%rip),%xmm1
mulsd  0xeed(%rip),%xmm1
addsd  0xeed(%rip),%xmm1
lea    0xeee(%rip),%rcx
mulsd  (%rcx,%rax,8),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @SIM_power_transresswitch(double %0, i32 %1, i32 %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store double %0, double* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, double 2.257500e+03, double 5.355000e+03
store double %11, double* %7
%12 = load i32, i32* %6
%13 = sitofp i32 %12 to double
%14 = fsub double %13, 1.000000e+00
%15 = call double @llvm.fmuladd.f64(double %14, double 8.000000e-01, double 1.000000e+00)
%16 = load double, double* %7
%17 = fmul double %15, %16
%18 = load double, double* %4
%19 = fdiv double %17, %18
ret double %19
}

LLVM IR (-O2):
define double @SIM_power_transresswitch(double %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, double 5.355000e+03, double 2.257500e+03
%6 = sitofp i32 %2 to double
%7 = fadd double %6, -1.000000e+00
%8 = tail call double @llvm.fmuladd.f64(double %7, double 8.000000e-01, double 1.000000e+00)
%9 = fmul double %5, %8
%10 = fdiv double %9, %0
ret double %10
}
int isFailed(char *input, int len) {
  if (len >= 2 && input[len - 1] == '4' && input[0] == '9')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isFailed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x2,-0x14(%rbp)
jl     114b <isFailed+0x4b>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x34,%eax
jne    114b <isFailed+0x4b>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jne    114b <isFailed+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <isFailed+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isFailed>:
cmp    $0x2,%esi
jl     1118 <isFailed+0x18>
add    $0xffffffff,%esi
cmpb   $0x34,(%rdi,%rsi,1)
jne    1118 <isFailed+0x18>
mov    $0x1,%eax
cmpb   $0x39,(%rdi)
je     111a <isFailed+0x1a>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @isFailed(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 52
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i8, i8* %0
%12 = icmp eq i8 %11, 57
br i1 %12, label %14, label %13
13: ; preds = %10, %4, %2
br label %14
14: ; preds = %10, %13
%15 = phi i32 [ 0, %13 ], [ 1, %10 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ log_fmt(char *, int);
void flush_all_f_buffers(int signo) {
  log_fmt("interrupted with signal %d\n", signo);
  fflush(NULL);
  exit(0);
}


x86 assembly (clang, -O0):
<flush_all_f_buffers>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1040 <log_fmt@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <fflush@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<flush_all_f_buffers>:
push   %rax
mov    %edi,%esi
lea    0xec6(%rip),%rdi
call   1040 <log_fmt@plt>
xor    %edi,%edi
call   1030 <fflush@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"interrupted with signal %d\0A\00"
define void @flush_all_f_buffers(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @log_fmt(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @fflush(i32* null)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [28 x i8] c"interrupted with signal %d\0A\00"
define void @flush_all_f_buffers(i32 %0) {
%2 = tail call i32 @log_fmt(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @fflush(i32* null)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ permute(char *, int /*<<< orphan*/, scalar_t__);
scalar_t__ strlen(char *);
int main() {
  char *s = "abcd";
  permute(s, 0, strlen(s) - 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %rax,%rdx
sub    $0x1,%rdx
xor    %esi,%esi
call   1030 <permute@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"abcd\00"
define i32 @main() {
%1 = alloca i8*
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = load i8*, i8** %1
%4 = call i64 @strlen(i8* %3)
%5 = sub nsw i64 %4, 1
%6 = call i32 @permute(i8* %2, i32 0, i64 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"abcd\00"
define i32 @main() {
%1 = tail call i32 @permute(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0, i64 3)
ret i32 0
}
void _Jv_LookupInterfaceMethodIdx(void) {}


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

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

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

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