xunge/DecIR huggingface dataset:
/* Type definitions */
typedef union Object {
  int dummy;
} Object;

/* Variables and functions */
int /*<<< orphan*/ free(union Object *);
void hilbert_kind_free(union Object *kind) { free(kind); }


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

LLVM IR (-O0):
%union.Object = type { i32 }
define void @hilbert_kind_free(%union.Object* %0) {
%2 = alloca %union.Object*
store %union.Object* %0, %union.Object** %2
%3 = load %union.Object*, %union.Object** %2
%4 = call i32 @free(%union.Object* %3)
ret void
}

LLVM IR (-O2):
%union.Object = type { i32 }
define void @hilbert_kind_free(%union.Object* nocapture %0) {
%2 = tail call i32 @free(%union.Object* %0)
ret void
}
void retro_reset() {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTManifestEntryAddPassthruIoStream() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_bpl();
int /*<<< orphan*/ e_branch();
void e_bpl_branch() {
  e_branch();
  e_bpl();
}


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

x86 assembly (clang, -O2):
<e_bpl_branch>:
push   %rax
xor    %eax,%eax
call   1030 <e_branch@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <e_bpl@plt>

LLVM IR (-O0):
define void @e_bpl_branch() {
%1 = call i32 (...) @e_branch()
%2 = call i32 (...) @e_bpl()
ret void
}

LLVM IR (-O2):
define void @e_bpl_branch() {
%1 = tail call i32 (...) @e_branch()
%2 = tail call i32 (...) @e_bpl()
ret void
}
int get_parent(int child_id) { return child_id / 2; }


x86 assembly (clang, -O0):
<get_parent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_parent>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @get_parent(i32 %0) {
%2 = sdiv i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isupper(int);
void t_isupper_0x51() {
  Assert_real((isupper(81)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              410, ("isupper should be 1 for Q"));
}


x86 assembly (clang, -O0):
<t_isupper_0x51>:
push   %rbp
mov    %rsp,%rbp
mov    $0x51,%edi
call   1030 <isupper@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x19a,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x51>:
push   %rax
mov    $0x51,%edi
call   1030 <isupper@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x19a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for Q\00"
define void @t_isupper_0x51() {
%1 = call i32 @isupper(i32 81)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 1 for Q\00"
define void @t_isupper_0x51() {
%1 = tail call i32 @isupper(i32 81)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 410, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
unsigned char getChar(void *stream, unsigned long offset) {
  char *lstream = stream;
  char c = lstream[offset];
  return c;
}


x86 assembly (clang, -O0):
<getChar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i8 @getChar(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = load i64, i64* %4
%10 = getelementptr inbounds i8, i8* %8, i64 %9
%11 = load i8, i8* %10
store i8 %11, i8* %6
%12 = load i8, i8* %6
ret i8 %12
}

LLVM IR (-O2):
define zeroext i8 @getChar(i8* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = load i8, i8* %3
ret i8 %4
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long bitmap;
};
struct TYPE_4__ {
  TYPE_1__ data;
};
typedef TYPE_2__ XIMStatusDrawCallbackStruct;

/* Variables and functions */
void set_XIMStatusDrawCallbackStruct_data_bitmap(void *_p, unsigned long _v) {
  ((XIMStatusDrawCallbackStruct *)_p)->data.bitmap = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XIMStatusDrawCallbackStruct_data_bitmap(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnlt_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmpnlt_ps(__m128 __a, __m128 __b) {
  return _mm_cmpnlt_ps(__a, __b);
}


x86 assembly (clang, -O0):
<test_mm_cmpnlt_ps>:
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 <_mm_cmpnlt_ps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_cmpnlt_ps>:
jmp    1030 <_mm_cmpnlt_ps@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpnlt_ps(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnlt_ps(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void testmyAtoD() {
  printf("Testing myAtoD\n");
  printf("Testing myAtoD Passed\n");
}


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

x86 assembly (clang, -O2):
<testmyAtoD>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [15 x i8] c"Testing myAtoD\00"
@str.2 = [22 x i8] c"Testing myAtoD Passed\00"
define void @testmyAtoD() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.2, i64 0, i64 0))
ret void
}
signed long long int
signedlonglongint_ignoring_unsignedshortint(signed long long int x,
                                            unsigned short int y) {
  return x;
}


x86 assembly (clang, -O0):
<signedlonglongint_ignoring_unsignedshortint>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedlonglongint_ignoring_unsignedshortint>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlonglongint_ignoring_unsignedshortint(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlonglongint_ignoring_unsignedshortint(i64 returned %0, i16 zeroext %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("yo\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"yo\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
__attribute__((hotpatch(0, 0))) __attribute__((always_)) void hp3(void) {
  printf("hello, world!\n");
}


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

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

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

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define void @hp3() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct crypto_backend {
  int dummy;
};

/* Variables and functions */
struct crypto_backend *crypto_nettle_init(void) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.crypto_backend = type { i32 }
define %struct.crypto_backend* @crypto_nettle_init() {
ret %struct.crypto_backend* null
}

LLVM IR (-O2):
%struct.crypto_backend = type { i32 }
define noalias %struct.crypto_backend* @crypto_nettle_init() {
ret %struct.crypto_backend* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Usage: test_simul [options] [binfile]\n");
  printf("where options are:\n"
         "\t-d\tDebug mode (interactive execution)\n"
         "\t-b\tA binary file is provided\n"
         "\t-l\tDo not execute; just display the listing\n"
         "\t-h\tprint this help message\n"
         "If -b is given, the next argument must be a file name containing\n"
         "a valid program in binary format. Otherwise an internally defined\n"
         "example program is used; the program is also dumped in binary into\n"
         "the file dump.bin\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Usage: test_simul [options] [binfile]\0A\00"
@.str.1 = [378 x i8] c"where options are:\0A\09-d\09Debug mode (interactive execution)\0A\09-b\09A binary file is provided\0A\09-l\09Do not execute; just display the listing\0A\09-h\09print this help message\0AIf -b is given, the next argument must be a file name containing\0Aa valid program in binary format. Otherwise an internally defined\0Aexample program is used; the program is also dumped in binary into\0Athe file dump.bin\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([378 x i8], [378 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c"Usage: test_simul [options] [binfile]\00"
@str.2 = [377 x i8] c"where options are:\0A\09-d\09Debug mode (interactive execution)\0A\09-b\09A binary file is provided\0A\09-l\09Do not execute; just display the listing\0A\09-h\09print this help message\0AIf -b is given, the next argument must be a file name containing\0Aa valid program in binary format. Otherwise an internally defined\0Aexample program is used; the program is also dumped in binary into\0Athe file dump.bin\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([377 x i8], [377 x i8]* @str.2, i64 0, i64 0))
ret void
}
void filter_update_folder_list(void) {}


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

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

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

LLVM IR (-O2):
define void @filter_update_folder_list() {
ret void
}
/* Variables and functions */
double hypot2_sqr(double, double);
double dist2_sqr(const double u[2], const double v[2]) {
  double dx = u[0] - v[0];
  double dy = u[1] - v[1];
  return hypot2_sqr(dx, dy);
}


x86 assembly (clang, -O0):
<dist2_sqr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
call   1030 <hypot2_sqr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dist2_sqr>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
subsd  (%rsi),%xmm0
subsd  0x8(%rsi),%xmm1
jmp    1030 <hypot2_sqr@plt>

LLVM IR (-O0):
define double @dist2_sqr(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double*, double** %4
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
%13 = fsub double %9, %12
store double %13, double* %5
%14 = load double*, double** %3
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fsub double %16, %19
store double %20, double* %6
%21 = load double, double* %5
%22 = load double, double* %6
%23 = call double @hypot2_sqr(double %21, double %22)
ret double %23
}

LLVM IR (-O2):
define double @dist2_sqr(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fsub double %3, %4
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fsub double %7, %9
%11 = tail call double @hypot2_sqr(double %5, double %10)
ret double %11
}
/* Variables and functions */
void *mxml_find_child(void *, char *);
void *cfg_io_get_gpio_first_pin(void *port) {
  void *pin = ((void *)0);
  if (((void *)0) != port) {
    pin = mxml_find_child(port, "pin");
  }
  return pin;
}


x86 assembly (clang, -O0):
<cfg_io_get_gpio_first_pin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
je     1144 <cfg_io_get_gpio_first_pin+0x34>
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
call   1030 <mxml_find_child@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_io_get_gpio_first_pin>:
test   %rdi,%rdi
je     1121 <cfg_io_get_gpio_first_pin+0x11>
lea    0xee4(%rip),%rsi
jmp    1030 <mxml_find_child@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"pin\00"
define i8* @cfg_io_get_gpio_first_pin(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
store i8* null, i8** %3
%4 = load i8*, i8** %2
%5 = icmp ne i8* null, %4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i8* @mxml_find_child(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i8* %8, i8** %3
br label %9
9: ; preds = %6, %1
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
@.str = [4 x i8] c"pin\00"
define i8* @cfg_io_get_gpio_first_pin(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @mxml_find_child(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ucs_atomic_swap64(volatile uint64_t *ptr, uint64_t value) {
  asm volatile("lock xchg"
               "q"
               " %0, %1"
               : "+r"(value), "+m"(*ptr)
               :
               : "memory", "cc");
  return value;
}


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

x86 assembly (clang, -O2):
<ucs_atomic_swap64>:
mov    %rsi,%rax
lock xchg %rax,(%rdi)
ret

LLVM IR (-O0):
define i8* @ucs_atomic_swap64(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %3
%7 = call i8* asm sideeffect "lock xchgq $0, $1", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %6, i8* %5, i8** elementtype(i8*) %6)
store i8* %7, i8** %4
%8 = load i8*, i8** %4
ret i8* %8
}

LLVM IR (-O2):
define i8* @ucs_atomic_swap64(i8** %0, i8* %1) {
%3 = tail call i8* asm sideeffect "lock xchgq $0, $1", "=r,=*m,0,*m,~{memory},~{cc},~{dirflag},~{fpsr},~{flags}"(i8** elementtype(i8*) %0, i8* %1, i8** elementtype(i8*) %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ pthread_yield();
int main(int argc, char **argv) {
  pthread_yield();
  return (0);
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @pthread_yield()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @pthread_yield()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
wrerr() { fatal("write error"); }


x86 assembly (clang, -O0):
<wrerr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <fatal@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"write error\00"
define i32 @wrerr() {
%1 = alloca i32
%2 = call i32 @fatal(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [12 x i8] c"write error\00"
define i32 @wrerr() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
int arch_init(char *envp[]) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @arch_init(i8** nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ get_next_input_from_fuzzer();
char map2check_non_det_char() { return (char)get_next_input_from_fuzzer(); }


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

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

LLVM IR (-O0):
define signext i8 @map2check_non_det_char() {
%1 = call i64 (...) @get_next_input_from_fuzzer()
%2 = trunc i64 %1 to i8
ret i8 %2
}

LLVM IR (-O2):
define signext i8 @map2check_non_det_char() {
%1 = tail call i64 (...) @get_next_input_from_fuzzer()
%2 = trunc i64 %1 to i8
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ findPal(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  findPal(num);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <findPal@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <findPal@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @findPal(i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int read16(FILE *in) {
  unsigned char q[2];
  fread(q, 1, 2, in);
  return q[0] << 8 | q[1] << 0;
}


x86 assembly (clang, -O0):
<read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
movzbl -0xa(%rbp),%eax
shl    $0x8,%eax
movzbl -0x9(%rbp),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16>:
push   %rax
mov    %rdi,%rcx
lea    0x6(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
movzwl 0x6(%rsp),%eax
shl    $0x10,%eax
bswap  %eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @read16(i32* %0) {
%2 = alloca i32*
%3 = alloca [2 x i8]
store i32* %0, i32** %2
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = load i32*, i32** %2
%6 = call i32 @fread(i8* %4, i32 1, i32 2, i32* %5)
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 0
%15 = or i32 %10, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @read16(i32* nocapture %0) {
%2 = alloca [2 x i8]
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 1, i32 2, i32* %0)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = or i32 %7, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int remove(const char *file) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @remove(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
%4 = call i32 @__set_errno(i32 %3)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @remove(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = tail call i32 @__set_errno(i32 %2)
ret i32 -1
}
/* Variables and functions */
scalar_t__ pow(int, int);
int isPythaNum(int x, int y, int z) {
  if (pow(x, 2) + pow(y, 2) == pow(z, 2)) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<isPythaNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jne    1176 <isPythaNum+0x66>
movl   $0x1,-0x4(%rbp)
jmp    117d <isPythaNum+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPythaNum>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %rax,%rbp
add    %rbx,%rbp
mov    %r14d,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
xor    %ecx,%ecx
cmp    %rax,%rbp
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isPythaNum(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @pow(i32 %0, i32 2)
%5 = tail call i64 @pow(i32 %1, i32 2)
%6 = add nsw i64 %5, %4
%7 = tail call i64 @pow(i32 %2, i32 2)
%8 = icmp eq i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
long round_argp(double value) {
  long intpart;
  intpart = value;
  value = value - intpart;
  if (value >= 0.5)
    intpart++;
  return intpart;
}


x86 assembly (clang, -O0):
<round_argp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     114a <round_argp+0x4a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_argp>:
cvttsd2si %xmm0,%rax
cvtsi2sd %rax,%xmm1
subsd  %xmm1,%xmm0
ucomisd 0xeea(%rip),%xmm0
sbb    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i64 @round_argp(double %0) {
%2 = alloca double
%3 = alloca i64
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i64
store i64 %5, i64* %3
%6 = load double, double* %2
%7 = load i64, i64* %3
%8 = sitofp i64 %7 to double
%9 = fsub double %6, %8
store double %9, double* %2
%10 = load double, double* %2
%11 = fcmp oge double %10, 5.000000e-01
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i64, i64* %3
%14 = add nsw i64 %13, 1
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %1
%16 = load i64, i64* %3
ret i64 %16
}

LLVM IR (-O2):
define i64 @round_argp(double %0) {
%2 = fptosi double %0 to i64
%3 = sitofp i64 %2 to double
%4 = fsub double %0, %3
%5 = fcmp oge double %4, 5.000000e-01
%6 = zext i1 %5 to i64
%7 = add nsw i64 %6, %2
ret i64 %7
}
int contains(const char *str, int c) {
  if (*str == 0) {
    return 0;
  } else if (*str == c) {
    return 1;
  } else {
    return contains(str + 1, c);
  }
}


x86 assembly (clang, -O0):
<contains>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113b <contains+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    116a <contains+0x5a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x14(%rbp),%eax
jne    1157 <contains+0x47>
movl   $0x1,-0x4(%rbp)
jmp    116a <contains+0x5a>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x14(%rbp),%esi
call   1030 <contains@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1122 <contains+0x22>
add    $0x1,%rdi
nopl   0x0(%rax)
movsbl %cl,%ecx
cmp    %esi,%ecx
je     1123 <contains+0x23>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <contains+0x10>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @contains(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 i8*, i8** %4
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %23
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = load i32, i32* %5
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %11
store i32 1, i32* %3
br label %23
18: ; preds = %11
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 1
%21 = load i32, i32* %5
%22 = call i32 @contains(i8* %20, i32 %21)
store i32 %22, i32* %3
br label %23
23: ; preds = %18, %17, %10
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @contains(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %8
5: ; preds = %8
%6 = load i8, i8* %13
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2, %5
%9 = phi i8 [ %6, %5 ], [ %3, %2 ]
%10 = phi i8* [ %13, %5 ], [ %0, %2 ]
%11 = sext i8 %9 to i32
%12 = icmp eq i32 %11, %1
%13 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %12, label %14, label %5
14: ; preds = %5, %8, %2
%15 = phi i32 [ 0, %2 ], [ 1, %8 ], [ 0, %5 ]
ret i32 %15
}
void GP_break50(void) {}


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

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

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

LLVM IR (-O2):
define void @GP_break50() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TimerETRConfigure(unsigned long, unsigned long,
                                     unsigned long, unsigned long);
void TimerETRClockMode2Configure(unsigned long ulBase,
                                 unsigned long ulExtTRGPrescaler,
                                 unsigned long ulExtTRGPloarity,
                                 unsigned long ulExtTRGFilter) {

  ;

  ;

  ;
  ;
  TimerETRConfigure(ulBase, ulExtTRGPrescaler, ulExtTRGPloarity,
                    ulExtTRGFilter);
  (*((volatile unsigned long *)(ulBase + 0x00000008))) |= 0x00004000;
}


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

x86 assembly (clang, -O2):
<TimerETRClockMode2Configure>:
push   %rbx
mov    %rdi,%rbx
call   1030 <TimerETRConfigure@plt>
orq    $0x4000,0x8(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @TimerETRClockMode2Configure(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @TimerETRConfigure(i64 %9, i64 %10, i64 %11, i64 %12)
%14 = load i64, i64* %5
%15 = add i64 %14, 8
%16 = inttoptr i64 %15 to i64*
%17 = load volatile i64, i64* %16
%18 = or i64 %17, 16384
store volatile i64 %18, i64* %16
ret void
}

LLVM IR (-O2):
define void @TimerETRClockMode2Configure(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @TimerETRConfigure(i64 %0, i64 %1, i64 %2, i64 %3)
%6 = add i64 %0, 8
%7 = inttoptr i64 %6 to i64*
%8 = load volatile i64, i64* %7
%9 = or i64 %8, 16384
store volatile i64 %9, i64* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printValuesAround(int *array) {
  int index = -500;
  while (index < 10 + 500) {
    printf("testArray[%d]=%d\n", index, array[index]);
    index++;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printValuesAround>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0xfffffe0c,-0xc(%rbp)
cmpl   $0x1fe,-0xc(%rbp)
jge    115a <printValuesAround+0x4a>
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <printValuesAround+0x13>
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printValuesAround>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
mov    $0xfffffffffffffe0c,%rbx
lea    0xeca(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    $0x1fe,%rbx
jne    1140 <printValuesAround+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"testArray[%d]=%d\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printValuesAround(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 -500, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 510
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %13)
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"testArray[%d]=%d\0A\00"
define void @printValuesAround(i32* nocapture %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ -500, %1 ], [ %8, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = trunc i64 %3 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %5)
%8 = add nsw i64 %3, 1
%9 = icmp eq i64 %8, 510
br i1 %9, label %10, label %2
10: ; preds = %2
%11 = tail call i32 @putchar(i32 10)
ret void
}
void atomic_set_bit(unsigned long nr, volatile unsigned long *addr) {}


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

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

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

LLVM IR (-O2):
define void @atomic_set_bit(i64 %0, i64* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ sscanf(char *, char *, int *);
void adjust_horizontal_seq(char *seq, int offset) {
  int number;
  sscanf(seq, "\x1b[%iG", &number);
  sprintf(seq, "\x1b[%iG", number + offset);
}


x86 assembly (clang, -O0):
<adjust_horizontal_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
add    -0xc(%rbp),%edx
lea    0xeac(%rip),%rsi
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adjust_horizontal_seq>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
lea    0xecb(%rip),%r15
lea    0xc(%rsp),%rdx
mov    %r15,%rsi
call   1030 <sscanf@plt>
add    0xc(%rsp),%ebx
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1040 <sprintf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%iG\00"
define void @adjust_horizontal_seq(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 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %5)
%8 = load i8*, i8** %3
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
%12 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%iG\00"
define void @adjust_horizontal_seq(i8* nocapture %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = add nsw i32 %6, %1
%8 = call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}
/* Variables and functions */
void *calloc(int, size_t);
int /*<<< orphan*/ fatal(int, char *);
void *alloc(size_t size) {
  void *p;
  p = calloc(1, size);
  if (!p)
    fatal(2, "Memory allocation failed\n");
  return (p);
}


x86 assembly (clang, -O0):
<alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115a <alloc+0x3a>
mov    $0x2,%edi
lea    0xeab(%rip),%rsi
call   1040 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc>:
push   %rbx
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <alloc+0x27>
lea    0xec3(%rip),%rsi
mov    $0x2,%edi
call   1040 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Memory allocation failed\0A\00"
define i8* @alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @calloc(i32 1, i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @fatal(i32 2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [26 x i8] c"Memory allocation failed\0A\00"
define i8* @alloc(i64 %0) {
%2 = tail call i8* @calloc(i32 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @fatal(i32 2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
int exe$remove(struct _fab *fab, void *err, void *suc) {
  printk("not implemented\n");
}


x86 assembly (clang, -O0):
<exe$remove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exe$remove>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printk@plt>

LLVM IR (-O0):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$remove"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct._fab*
%6 = alloca i8*
%7 = alloca i8*
store %struct._fab* %0, %struct._fab** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$remove"(%struct._fab* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_add(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_del(struct list_head *);
void list_move(struct list_head *head, struct list_head *root) {
  list_del(head);
  list_add(head, root);
}


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

x86 assembly (clang, -O2):
<list_move>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <list_del@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <list_add@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_del(%struct.list_head* %5)
%7 = load %struct.list_head*, %struct.list_head** %3
%8 = load %struct.list_head*, %struct.list_head** %4
%9 = call i32 @list_add(%struct.list_head* %7, %struct.list_head* %8)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_move(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_del(%struct.list_head* %0)
%4 = tail call i32 @list_add(%struct.list_head* %0, %struct.list_head* %1)
ret void
}
int wordLeToInt(unsigned char *buffer) {
  int result = 0;
  result = buffer[1];
  result <<= 8;
  result += buffer[0];
  return result;
}


x86 assembly (clang, -O0):
<wordLeToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @wordLeToInt(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i32
%8 = or i32 %5, %7
ret i32 %8
}
void USB_OTG_BSP_TimeInit(void) {}


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

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

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

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