xunge/DecIR huggingface dataset:
/* Type definitions */
struct dumbtts_conf {
  int dummy;
};

/* Variables and functions */
struct dumbtts_conf *dumbtts_TTSInitWithFlags(char *, int /*<<< orphan*/);
struct dumbtts_conf *dumbtts_TTSInit(char *lang) {
  return dumbtts_TTSInitWithFlags(lang, 0);
}


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

x86 assembly (clang, -O2):
<dumbtts_TTSInit>:
xor    %esi,%esi
jmp    1030 <dumbtts_TTSInitWithFlags@plt>

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

LLVM IR (-O2):
%struct.dumbtts_conf = type { i32 }
define %struct.dumbtts_conf* @dumbtts_TTSInit(i8* %0) {
%2 = tail call %struct.dumbtts_conf* @dumbtts_TTSInitWithFlags(i8* %0, i32 0)
ret %struct.dumbtts_conf* %2
}
/* Variables and functions */
int /*<<< orphan*/ hello(char *);
int main() {
  hello("World");
  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 <hello@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"World\00"
define i32 @main() {
%1 = tail call i32 @hello(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
void print_socket_error_message(char *api) { perror(api); }


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

x86 assembly (clang, -O2):
<print_socket_error_message>:
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
define void @print_socket_error_message(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
ret void
}
void FF_PendSemaphore(void *pSemaphore) { pSemaphore = 0; }


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

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

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

LLVM IR (-O2):
define void @FF_PendSemaphore(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct option {
  int dummy;
};

/* Variables and functions */
int _getopt_internal(int, char *const *, char const *, struct option const *,
                     int *, int, int /*<<< orphan*/);
int getopt_long_only(int argc, char *const *argv, const char *options,
                     const struct option *long_options, int *opt_index) {
  return _getopt_internal(argc, argv, options, long_options, opt_index, 1, 0);
}


x86 assembly (clang, -O0):
<getopt_long_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x1,%r9d
xor    %eax,%eax
movl   $0x0,(%rsp)
call   1030 <_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_long_only>:
push   %rax
movl   $0x0,(%rsp)
mov    $0x1,%r9d
call   1030 <_getopt_internal@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.option = type { i32 }
define i32 @getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.option* %3, %struct.option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.option*, %struct.option** %9
%15 = load i32*, i32** %10
%16 = call i32 @_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.option* %14, i32* %15, i32 1, i32 0)
ret i32 %16
}

LLVM IR (-O2):
%struct.option = type { i32 }
define i32 @getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4) {
%6 = tail call i32 @_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.option* %3, i32* %4, i32 1, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("* Usage: hex2bin [options] <filename>\n"
         "* Available options are:\n"
         "*  -out    - output file [stdout]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [98 x i8] c"* Usage: hex2bin [options] <filename>\0A* Available options are:\0A* -out - output file [stdout]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([98 x i8], [98 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [97 x i8] c"* Usage: hex2bin [options] <filename>\0A* Available options are:\0A* -out - output file [stdout]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int lengthOfLongestSubstring(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char str[] = "pwwkewefaecb";
  printf("%d\n", lengthOfLongestSubstring(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x11(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xec3(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x11(%rbp),%rdi
call   1040 <lengthOfLongestSubstring@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x62636561666577,%rax
mov    %rax,0xd(%rsp)
movabs $0x666577656b777770,%rax
77 65 66
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
call   1040 <lengthOfLongestSubstring@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [13 x i8] c"pwwkewefaecb\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [13 x i8]
store i32 0, i32* %1
%3 = bitcast [13 x i8]* %2 to i8*
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %2, i64 0, i64 0
%5 = call i32 @lengthOfLongestSubstring(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [13 x i8] c"pwwkewefaecb\00"
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [13 x i8]
%2 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%3 = call i32 @lengthOfLongestSubstring(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_export();
int /*<<< orphan*/ test_foreach();
int /*<<< orphan*/ test_has();
int /*<<< orphan*/ test_indexof();
int /*<<< orphan*/ test_insert();
int /*<<< orphan*/ test_isempty();
int /*<<< orphan*/ test_lookup();
int /*<<< orphan*/ test_remove();
int /*<<< orphan*/ test_size();
int main() {
  test_insert();
  test_remove();
  test_isempty();
  test_size();
  test_indexof();
  test_foreach();
  test_has();
  test_lookup();
  test_export();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   10b0 <test_insert@plt>
mov    $0x0,%al
call   10a0 <test_remove@plt>
mov    $0x0,%al
call   1050 <test_isempty@plt>
mov    $0x0,%al
call   1030 <test_size@plt>
mov    $0x0,%al
call   1060 <test_indexof@plt>
mov    $0x0,%al
call   1090 <test_foreach@plt>
mov    $0x0,%al
call   1040 <test_has@plt>
mov    $0x0,%al
call   1080 <test_lookup@plt>
mov    $0x0,%al
call   1070 <test_export@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   10b0 <test_insert@plt>
xor    %eax,%eax
call   10a0 <test_remove@plt>
xor    %eax,%eax
call   1050 <test_isempty@plt>
xor    %eax,%eax
call   1030 <test_size@plt>
xor    %eax,%eax
call   1060 <test_indexof@plt>
xor    %eax,%eax
call   1090 <test_foreach@plt>
xor    %eax,%eax
call   1040 <test_has@plt>
xor    %eax,%eax
call   1080 <test_lookup@plt>
xor    %eax,%eax
call   1070 <test_export@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_insert()
%3 = call i32 (...) @test_remove()
%4 = call i32 (...) @test_isempty()
%5 = call i32 (...) @test_size()
%6 = call i32 (...) @test_indexof()
%7 = call i32 (...) @test_foreach()
%8 = call i32 (...) @test_has()
%9 = call i32 (...) @test_lookup()
%10 = call i32 (...) @test_export()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_insert()
%2 = tail call i32 (...) @test_remove()
%3 = tail call i32 (...) @test_isempty()
%4 = tail call i32 (...) @test_size()
%5 = tail call i32 (...) @test_indexof()
%6 = tail call i32 (...) @test_foreach()
%7 = tail call i32 (...) @test_has()
%8 = tail call i32 (...) @test_lookup()
%9 = tail call i32 (...) @test_export()
ret i32 0
}
unsigned int bit_group_no_ends_uint(unsigned int val) {
  return ((val) ^ (((((val))) & ((((val))) ^ ((((val))) << 1)))));
}


x86 assembly (clang, -O0):
<bit_group_no_ends_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%edx
mov    -0x4(%rbp),%esi
shl    $0x1,%esi
xor    %esi,%edx
and    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_group_no_ends_uint>:
lea    (%rdi,%rdi,1),%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @bit_group_no_ends_uint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = shl i32 %6, 1
%8 = xor i32 %5, %7
%9 = and i32 %4, %8
%10 = xor i32 %3, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @bit_group_no_ends_uint(i32 %0) {
%2 = shl i32 %0, 1
%3 = and i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t __bson_uint64_swap_slow(uint64_t v) {
  return ((v & 0x00000000000000FFULL) << 56) |
         ((v & 0x000000000000FF00ULL) << 40) |
         ((v & 0x0000000000FF0000ULL) << 24) |
         ((v & 0x00000000FF000000ULL) << 8) |
         ((v & 0x000000FF00000000ULL) >> 8) |
         ((v & 0x0000FF0000000000ULL) >> 24) |
         ((v & 0x00FF000000000000ULL) >> 40) |
         ((v & 0xFF00000000000000ULL) >> 56);
}


x86 assembly (clang, -O0):
<__bson_uint64_swap_slow>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
and    $0xff,%rax
shl    $0x38,%rax
movslq -0x4(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
and    $0xff0000,%rcx
shl    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000,%rdx
and    %rdx,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000,%rdx
and    %rdx,%rcx
shr    $0x8,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff0000000000,%rdx
and    %rdx,%rcx
shr    $0x18,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff000000000000,%rdx
and    %rdx,%rcx
shr    $0x28,%rcx
or     %rcx,%rax
movslq -0x4(%rbp),%rcx
movabs $0xff00000000000000,%rdx
and    %rdx,%rcx
shr    $0x38,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__bson_uint64_swap_slow>:
movslq %edi,%rax
bswap  %rax
ret

LLVM IR (-O0):
define i32 @__bson_uint64_swap_slow(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, 255
%6 = shl i64 %5, 56
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = and i64 %8, 65280
%10 = shl i64 %9, 40
%11 = or i64 %6, %10
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = and i64 %13, 16711680
%15 = shl i64 %14, 24
%16 = or i64 %11, %15
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = and i64 %18, 4278190080
%20 = shl i64 %19, 8
%21 = or i64 %16, %20
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = and i64 %23, 1095216660480
%25 = lshr i64 %24, 8
%26 = or i64 %21, %25
%27 = load i32, i32* %2
%28 = sext i32 %27 to i64
%29 = and i64 %28, 280375465082880
%30 = lshr i64 %29, 24
%31 = or i64 %26, %30
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = and i64 %33, 71776119061217280
%35 = lshr i64 %34, 40
%36 = or i64 %31, %35
%37 = load i32, i32* %2
%38 = sext i32 %37 to i64
%39 = and i64 %38, -72057594037927936
%40 = lshr i64 %39, 56
%41 = or i64 %36, %40
%42 = trunc i64 %41 to i32
ret i32 %42
}

LLVM IR (-O2):
define i32 @__bson_uint64_swap_slow(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i64 @llvm.bswap.i64(i64 %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
double Sqrt(double);
int /*<<< orphan*/ printf(char *, double, double, double, double);
double sqrt(double);
void TestSqrt(double x) {
  printf("Sqrt(%g) = %g  sqrt(%g) = %g\n", x, Sqrt(x), x, sqrt(x));
}


x86 assembly (clang, -O0):
<TestSqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <Sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x10(%rbp),%xmm0
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestSqrt>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <Sqrt@plt>
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1159 <TestSqrt+0x29>
sqrtsd %xmm2,%xmm3
jmp    1178 <TestSqrt+0x48>
movapd %xmm2,%xmm0
movsd  %xmm1,0x10(%rsp)
call   1050 <sqrt@plt>
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm3
lea    0xe81(%rip),%rdi
movapd %xmm2,%xmm0
add    $0x18,%rsp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [30 x i8] c"Sqrt(%g) = %g sqrt(%g) = %g\0A\00"
define void @TestSqrt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = call double @Sqrt(double %4)
%6 = load double, double* %2
%7 = load double, double* %2
%8 = call double @sqrt(double %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double %3, double %5, double %6, double %8)
ret void
}

LLVM IR (-O2):
@.str = [30 x i8] c"Sqrt(%g) = %g sqrt(%g) = %g\0A\00"
define void @TestSqrt(double %0) {
%2 = tail call double @Sqrt(double %0)
%3 = tail call double @sqrt(double %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double %0, double %2, double %0, double %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ configuration_get_rotor_create_erc5a_interpolation_table();
int interpolate_2d(int /*<<< orphan*/, double);
int read_adc(int);
int create_erc5a_get_position() {
  int adc_value = read_adc((3));
  double adc_voltage = adc_value / 2.275555556;
  double sensor_voltage = adc_voltage * 3.6;
  return interpolate_2d(
      configuration_get_rotor_create_erc5a_interpolation_table(),
      sensor_voltage);
}


x86 assembly (clang, -O0):
<create_erc5a_get_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x3,%edi
call   1030 <read_adc@plt>
mov    %eax,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeb6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9d(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <configuration_get_rotor_create_erc5a_interpolation_table@plt>
mov    %eax,%edi
movsd  -0x18(%rbp),%xmm0
call   1050 <interpolate_2d@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_erc5a_get_position>:
push   %rax
mov    $0x3,%edi
call   1030 <read_adc@plt>
cvtsi2sd %eax,%xmm0
divsd  0xeb9(%rip),%xmm0
mulsd  0xeb9(%rip),%xmm0
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <configuration_get_rotor_create_erc5a_interpolation_table@plt>
mov    %eax,%edi
movsd  (%rsp),%xmm0
pop    %rax
jmp    1050 <interpolate_2d@plt>

LLVM IR (-O0):
define i32 @create_erc5a_get_position() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = call i32 @read_adc(i32 3)
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 0x4002345678AA023F
store double %7, double* %2
%8 = load double, double* %2
%9 = fmul double %8, 3.600000e+00
store double %9, double* %3
%10 = call i32 (...) @configuration_get_rotor_create_erc5a_interpolation_table()
%11 = load double, double* %3
%12 = call i32 @interpolate_2d(i32 %10, double %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @create_erc5a_get_position() {
%1 = tail call i32 @read_adc(i32 3)
%2 = sitofp i32 %1 to double
%3 = fdiv double %2, 0x4002345678AA023F
%4 = fmul double %3, 3.600000e+00
%5 = tail call i32 (...) @configuration_get_rotor_create_erc5a_interpolation_table()
%6 = tail call i32 @interpolate_2d(i32 %5, double %4)
ret i32 %6
}
void __current_set_polling(void) {}


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

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

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

LLVM IR (-O2):
define void @__current_set_polling() {
ret void
}
/* Variables and functions */
size_t int_strlen(int integer) {
  if (integer < 10) {
    return 1;
  }
  return 1 + int_strlen(integer / 10);
}


x86 assembly (clang, -O0):
<int_strlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1132 <int_strlen+0x22>
movq   $0x1,-0x8(%rbp)
jmp    114c <int_strlen+0x3c>
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <int_strlen@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_strlen>:
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1135 <int_strlen+0x35>
mov    $0x1,%eax
mov    $0xcccccccd,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%edx
imul   %rcx,%rdx
shr    $0x23,%rdx
add    $0x1,%rax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <int_strlen+0x20>
ret

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

LLVM IR (-O2):
define i64 @int_strlen(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i64 [ %7, %3 ], [ 0, %1 ]
%6 = udiv i32 %4, 10
%7 = add i64 %5, 1
%8 = icmp ult i32 %4, 100
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = add i64 %5, 2
br label %11
11: ; preds = %9, %1
%12 = phi i64 [ 1, %1 ], [ %10, %9 ]
ret i64 %12
}
/* Variables and functions */
scalar_t__ isspace(char);
char *skipWhite(char *inScan) {
  char *retval = inScan;
  while (isspace(*retval)) {
    retval++;
  }
  return retval;
}


x86 assembly (clang, -O0):
<skipWhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114b <skipWhite+0x3b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <skipWhite+0x14>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipWhite>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skipWhite+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skipWhite(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ command_EXECUTE(int, char *);
void othello_ARGS(char *arg) { command_EXECUTE(3, arg); }


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

x86 assembly (clang, -O2):
<othello_ARGS>:
mov    %rdi,%rsi
mov    $0x3,%edi
jmp    1030 <command_EXECUTE@plt>

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

LLVM IR (-O2):
define void @othello_ARGS(i8* %0) {
%2 = tail call i32 @command_EXECUTE(i32 3, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fail();
int /*<<< orphan*/ gauss_seidel();
int /*<<< orphan*/ gram_schmidt();
int /*<<< orphan*/ jacobi();
int main() {
  jacobi();
  gauss_seidel();
  fail();
  gram_schmidt();
  return -1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <jacobi@plt>
mov    $0x0,%al
call   1060 <gauss_seidel@plt>
mov    $0x0,%al
call   1050 <fail@plt>
mov    $0x0,%al
call   1030 <gram_schmidt@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <jacobi@plt>
xor    %eax,%eax
call   1060 <gauss_seidel@plt>
xor    %eax,%eax
call   1050 <fail@plt>
xor    %eax,%eax
call   1030 <gram_schmidt@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @jacobi()
%3 = call i32 (...) @gauss_seidel()
%4 = call i32 (...) @fail()
%5 = call i32 (...) @gram_schmidt()
ret i32 -1
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @jacobi()
%2 = tail call i32 (...) @gauss_seidel()
%3 = tail call i32 (...) @fail()
%4 = tail call i32 (...) @gram_schmidt()
ret i32 -1
}
/* Variables and functions */
int read_lsr();
int /*<<< orphan*/ write_thr(char);
void uart_putc(char c) {
  while (!(read_lsr() & (1 << 5)))
    ;
  write_thr(c);
}


x86 assembly (clang, -O0):
<uart_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1040 <read_lsr@plt>
and    $0x20,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114d <uart_putc+0x2d>
jmp    1152 <uart_putc+0x32>
jmp    112e <uart_putc+0xe>
movsbl -0x1(%rbp),%edi
call   1030 <write_thr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_putc>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1040 <read_lsr@plt>
test   $0x20,%al
je     1130 <uart_putc+0x10>
movsbl %bl,%edi
pop    %rbx
jmp    1030 <write_thr@plt>

LLVM IR (-O0):
define void @uart_putc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %8, %1
%4 = call i32 (...) @read_lsr()
%5 = and i32 %4, 32
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i8, i8* %2
%11 = call i32 @write_thr(i8 signext %10)
ret void
}

LLVM IR (-O2):
define void @uart_putc(i8 signext %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 (...) @read_lsr()
%4 = and i32 %3, 32
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 @write_thr(i8 signext %0)
ret void
}
void _str_tolower(char *src, char *dst) {
  while (*src) {
    *dst++ = *src++;
    if (dst[-1] >= 'A' && dst[-1] <= 'Z')
      dst[-1] ^= 0x20;
  }
}


x86 assembly (clang, -O0):
<_str_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1170 <_str_tolower+0x70>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x41,%eax
jl     116b <_str_tolower+0x6b>
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x5a,%eax
jg     116b <_str_tolower+0x6b>
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%ecx
xor    $0x20,%ecx
mov    %cl,-0x1(%rax)
jmp    110c <_str_tolower+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_str_tolower>:
mov    (%rdi),%cl
test   %cl,%cl
je     1134 <_str_tolower+0x34>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
lea    -0x41(%rcx),%edx
movzbl %cl,%r8d
xor    $0x20,%cl
cmp    $0x1a,%dl
movzbl %cl,%ecx
cmovae %r8d,%ecx
mov    %cl,(%rsi,%rax,1)
movzbl 0x1(%rdi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <_str_tolower+0x10>
ret

LLVM IR (-O0):
define void @_str_tolower(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %33, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %34
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i32 1
store i8* %11, i8** %3
%12 = load i8, i8* %10
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %4
store i8 %12, i8* %13
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 -1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp sge i32 %18, 65
br i1 %19, label %20, label %33
20: ; preds = %9
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 -1
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 90
br i1 %25, label %26, label %33
26: ; preds = %20
%27 = load i8*, i8** %4
%28 = getelementptr inbounds i8, i8* %27, i64 -1
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = xor i32 %30, 32
%32 = trunc i32 %31 to i8
store i8 %32, i8* %28
br label %33
33: ; preds = %26, %20, %9
br label %5
34: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @_str_tolower(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %17, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %15, %5 ], [ %3, %2 ]
%7 = phi i8* [ %10, %5 ], [ %1, %2 ]
%8 = phi i8* [ %9, %5 ], [ %0, %2 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = getelementptr inbounds i8, i8* %7, i64 1
%11 = add i8 %6, -65
%12 = icmp ult i8 %11, 26
%13 = xor i8 %6, 32
%14 = select i1 %12, i8 %13, i8 %6
store i8 %14, i8* %7
%15 = load i8, i8* %9
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %5
17: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GetLock();
int main(void) {
  GetLock();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @GetLock()
ret i32 0
}
int test3() {
  goto a;
a:;
}


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

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

LLVM IR (-O0):
define i32 @test3() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @test3() {
ret i32 undef
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int n;
  int i;
  int j;
  int t;
  n = __VERIFIER_nondet_int();
  i = 0;
  j = 1;
  t = 0;
  while (j != n) {
    t = j + i;
    i = j;
    j = t;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1164 <main+0x54>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113e <main+0x2e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ hash(int);
void test(int M) {
  int i, j;
  if (M >= 0) {
    for (i = 0; i <= M; i++) {
      if (i % 2 == 0) {
        {
          hash(1);
          hash(i);
          hash((i / 2));
        };
      }
    }
  }
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1188 <test+0x78>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1183 <test+0x73>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1170 <test+0x60>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%edi
call   1030 <hash@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <hash@plt>
jmp    1175 <test+0x65>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112c <test+0x1c>
jmp    1188 <test+0x78>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
js     1149 <test+0x39>
mov    %edi,%ebx
add    $0x1,%ebx
xor    %ebp,%ebp
jmp    1127 <test+0x17>
add    $0x1,%ebp
cmp    %ebp,%ebx
je     1149 <test+0x39>
test   $0x1,%bpl
jne    1120 <test+0x10>
mov    $0x1,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
call   1030 <hash@plt>
mov    %ebp,%edi
shr    %edi
call   1030 <hash@plt>
jmp    1120 <test+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @test(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %28
7: ; preds = %1
store i32 0, i32* %3
br label %8
8: ; preds = %24, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %2
%11 = icmp sle i32 %9, %10
br i1 %11, label %12, label %27
12: ; preds = %8
%13 = load i32, i32* %3
%14 = srem i32 %13, 2
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %23
16: ; preds = %12
%17 = call i32 @hash(i32 1)
%18 = load i32, i32* %3
%19 = call i32 @hash(i32 %18)
%20 = load i32, i32* %3
%21 = sdiv i32 %20, 2
%22 = call i32 @hash(i32 %21)
br label %23
23: ; preds = %16, %12
br label %24
24: ; preds = %23
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %8
27: ; preds = %8
br label %28
28: ; preds = %27, %1
ret void
}

LLVM IR (-O2):
define void @test(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %15, label %3
3: ; preds = %1, %12
%4 = phi i32 [ %13, %12 ], [ 0, %1 ]
%5 = and i32 %4, 1
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = tail call i32 @hash(i32 1)
%9 = tail call i32 @hash(i32 %4)
%10 = lshr i32 %4, 1
%11 = tail call i32 @hash(i32 %10)
br label %12
12: ; preds = %3, %7
%13 = add nuw i32 %4, 1
%14 = icmp eq i32 %4, %0
br i1 %14, label %15, label %3
15: ; preds = %12, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char message[10] = "123456789";
  char *message_ptr;
  message_ptr = message;
  printf("%s\n", message_ptr);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x3837363534333231,%rax
36 37 38
mov    %rax,0x8(%rsp)
movw   $0x39,0x10(%rsp)
lea    0xed9(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.message = [10 x i8] c"123456789\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int ldif_fetch_url(const char *line, char **value, size_t *vlen) { return 1; }


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

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

LLVM IR (-O0):
define i32 @ldif_fetch_url(i8* %0, i8** %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i64*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i64* %2, i64** %6
ret i32 1
}

LLVM IR (-O2):
define i32 @ldif_fetch_url(i8* nocapture readnone %0, i8** nocapture readnone %1, i64* nocapture readnone %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xe3() {
  Assert_real((isspace(227) == 0),
              "/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_isspace.c",
              1140, ("isspace should be 0 for 0xe3"));
}


x86 assembly (clang, -O0):
<t_isspace_0xe3>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe3,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x474,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0xe3>:
push   %rax
mov    $0xe3,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x474,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xe3\00"
define void @t_isspace_0xe3() {
%1 = call i64 @isspace(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([29 x i8], [29 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xe3\00"
define void @t_isspace_0xe3() {
%1 = tail call i64 @isspace(i32 227)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1140, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int in(int, int, int);
int u8isdigiti(int n) { return in(n, 0x30, 0x39); }


x86 assembly (clang, -O0):
<u8isdigiti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x30,%esi
mov    $0x39,%edx
call   1030 <in@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isdigiti>:
mov    $0x30,%esi
mov    $0x39,%edx
jmp    1030 <in@plt>

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

LLVM IR (-O2):
define i32 @u8isdigiti(i32 %0) {
%2 = tail call i32 @in(i32 %0, i32 48, i32 57)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_int(int signo) { printf("caught SIGINT\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"caught SIGINT\0A\00"
define void @sig_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = 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"caught SIGINT\00"
define void @sig_int(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void xpsocket_cleanup() {}


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

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

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

LLVM IR (-O2):
define void @xpsocket_cleanup() {
ret void
}
int int_fetch_add_relaxed(int *ptr, int value) {
  return __atomic_fetch_add(ptr, value, 0);
}


x86 assembly (clang, -O0):
<int_fetch_add_relaxed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
lock xadd %eax,(%rcx)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_fetch_add_relaxed>:
mov    %esi,%eax
lock xadd %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @int_fetch_add_relaxed(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = atomicrmw add i32* %7, i32 %9 monotonic
store i32 %10, i32* %6
%11 = load i32, i32* %6
ret i32 %11
}

LLVM IR (-O2):
define i32 @int_fetch_add_relaxed(i32* nocapture %0, i32 %1) {
%3 = atomicrmw add i32* %0, i32 %1 monotonic
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ funct(char *);
main() { funct('-' - '-' + "DEShaw"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"DEShaw\00"
define i32 @main() {
%1 = call i32 @funct(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"DEShaw\00"
define i32 @main() {
%1 = tail call i32 @funct(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
int usage(char *me) {
  fprintf(stderr, "%s: filename args\n", me);
  fprintf(stderr, "Run program, and print VmPeak, VmSize, VmRSS and VmHWM (in "
                  "KiB) to stderr\n");
  return 0;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %rdi,%rdx
mov    0x2ec5(%rip),%rbx
mov    (%rbx),%edi
lea    0xedc(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"%s: filename args\0A\00"
@.str.1 = [75 x i8] c"Run program, and print VmPeak, VmSize, VmRSS and VmHWM (in KiB) to stderr\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"%s: filename args\0A\00"
@.str.1 = [75 x i8] c"Run program, and print VmPeak, VmSize, VmRSS and VmHWM (in KiB) to stderr\0A\00"
define i32 @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 (i32, i8*, ...) @fprintf(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func2() { printf("This is the function\n"); }


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

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

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

LLVM IR (-O2):
@str = [21 x i8] c"This is the function\00"
define void @func2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret void
}
int msm_hsusb_rpc_connect(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @msm_hsusb_rpc_connect() {
ret i32 0
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
int wait(int /*<<< orphan*/ *);
void handle(int s) {
  signal(SIGCHLD, handle);
  pid_t pid = wait(NULL);
  printf("---%d--wait-child----\n", pid);
}


x86 assembly (clang, -O0):
<handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    0x2e8d(%rip),%rsi
call   1040 <signal@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1050 <wait@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
mov    0x2e97(%rip),%rsi
call   1040 <signal@plt>
xor    %edi,%edi
call   1050 <wait@plt>
lea    0xeac(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@SIGCHLD = global i32 0
@.str = [23 x i8] c"---%d--wait-child----\0A\00"
define void @handle(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @SIGCHLD
%5 = call i32 @signal(i32 %4, void (i32)* @handle)
%6 = call i32 @wait(i32* null)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@.str = [23 x i8] c"---%d--wait-child----\0A\00"
define void @handle(i32 %0) {
%2 = load i32, i32* @SIGCHLD
%3 = tail call i32 @signal(i32 %2, void (i32)* @handle)
%4 = tail call i32 @wait(i32* null)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ __NR_renameat;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, char const *,
            int /*<<< orphan*/, char const *);
__attribute__((always_)) int _syscall_rename(const char *oldpath,
                                             const char *newpath) {
  return syscall(__NR_renameat, AT_FDCWD, oldpath, AT_FDCWD, newpath);
}


x86 assembly (clang, -O0):
<_syscall_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    0x2e93(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%r8
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_rename>:
mov    %rsi,%r8
mov    %rdi,%rdx
mov    0x2ecb(%rip),%rax
mov    (%rax),%edi
mov    0x2eaa(%rip),%rax
mov    (%rax),%ecx
mov    %ecx,%esi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_renameat = global i32 0
@AT_FDCWD = global i32 0
define i32 @_syscall_rename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i32, i32* @__NR_renameat
%6 = load i32, i32* @AT_FDCWD
%7 = load i8*, i8** %3
%8 = load i32, i32* @AT_FDCWD
%9 = load i8*, i8** %4
%10 = call i32 @syscall(i32 %5, i32 %6, i8* %7, i32 %8, i8* %9)
ret i32 %10
}

LLVM IR (-O2):
@__NR_renameat = global i32 0
@AT_FDCWD = global i32 0
define i32 @_syscall_rename(i8* %0, i8* %1) {
%3 = load i32, i32* @__NR_renameat
%4 = load i32, i32* @AT_FDCWD
%5 = tail call i32 @syscall(i32 %3, i32 %4, i8* %0, i32 %4, i8* %1)
ret i32 %5
}