xunge/DecIR huggingface dataset:
/* Variables and functions */
int VP8ClipUV(int const, int);
int VP8RGBToV(int r, int g, int b, int rounding) {
  const int v = +28800 * r - 24116 * g - 4684 * b;
  return VP8ClipUV(v, rounding);
}


x86 assembly (clang, -O0):
<VP8RGBToV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
imul   $0x7080,-0x4(%rbp),%eax
imul   $0x5e34,-0x8(%rbp),%ecx
sub    %ecx,%eax
imul   $0x124c,-0xc(%rbp),%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <VP8ClipUV@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VP8RGBToV>:
imul   $0x7080,%edi,%eax
imul   $0xffffa1cc,%esi,%esi
add    %eax,%esi
imul   $0xffffedb4,%edx,%edi
add    %esi,%edi
mov    %ecx,%esi
jmp    1030 <VP8ClipUV@plt>

LLVM IR (-O0):
define i32 @VP8RGBToV(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %5
%11 = mul nsw i32 28800, %10
%12 = load i32, i32* %6
%13 = mul nsw i32 24116, %12
%14 = sub nsw i32 %11, %13
%15 = load i32, i32* %7
%16 = mul nsw i32 4684, %15
%17 = sub nsw i32 %14, %16
store i32 %17, i32* %9
%18 = load i32, i32* %9
%19 = load i32, i32* %8
%20 = call i32 @VP8ClipUV(i32 %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
define i32 @VP8RGBToV(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %0, 28800
%6 = mul i32 %1, -24116
%7 = add i32 %6, %5
%8 = mul i32 %2, -4684
%9 = add i32 %7, %8
%10 = tail call i32 @VP8ClipUV(i32 %9, i32 %3)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ init_video();
int /*<<< orphan*/ puts(unsigned char *);
void cmain(unsigned long magic, unsigned long addr) {
  init_video();
  puts((unsigned char *)"hello world!");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<cmain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init_video@plt>
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
jmp    1143 <cmain+0x23>

x86 assembly (clang, -O2):
<cmain>:
push   %rax
xor    %eax,%eax
call   1030 <init_video@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1140 <cmain+0x20>

LLVM IR (-O0):
@.str = [13 x i8] c"hello world!\00"
define void @cmain(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i32 (...) @init_video()
%6 = call i32 @puts(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %7, %2
br label %7
}

LLVM IR (-O2):
@.str = [13 x i8] c"hello world!\00"
define void @cmain(i64 %0, i64 %1) {
%3 = tail call i32 (...) @init_video()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %5, %2
br label %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int set_trail_0s(int);
uint64_t clr_low_1s(uint64_t u) { return u & (set_trail_0s(u) + 1); }


x86 assembly (clang, -O0):
<clr_low_1s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <set_trail_0s@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    $0x1,%ecx
and    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clr_low_1s>:
push   %rbx
mov    %edi,%ebx
call   1030 <set_trail_0s@plt>
add    $0x1,%eax
and    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @clr_low_1s(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @set_trail_0s(i32 %4)
%6 = add nsw i32 %5, 1
%7 = and i32 %3, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @clr_low_1s(i32 %0) {
%2 = tail call i32 @set_trail_0s(i32 %0)
%3 = add nsw i32 %2, 1
%4 = and i32 %3, %0
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t crc8_start(void) { return 0x00; }


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

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

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

LLVM IR (-O2):
define i32 @crc8_start() {
ret i32 0
}
/* Variables and functions */
_Bool get_bool_from_srv();
int /*<<< orphan*/ wait_for_data();
_Bool get_data_bool() {
  wait_for_data();
  return get_bool_from_srv();
}


x86 assembly (clang, -O0):
<get_data_bool>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <wait_for_data@plt>
mov    $0x0,%al
call   1030 <get_bool_from_srv@plt>
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @get_data_bool() {
%1 = call i32 (...) @wait_for_data()
%2 = call zeroext i1 (...) @get_bool_from_srv()
ret i1 %2
}

LLVM IR (-O2):
define zeroext i1 @get_data_bool() {
%1 = tail call i32 (...) @wait_for_data()
%2 = tail call zeroext i1 (...) @get_bool_from_srv()
ret i1 %2
}
int musbgm_isplaying(int no) {
  printf("%s not implemented\n", __func__);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.musbgm_isplaying = [17 x i8] c"musbgm_isplaying\00"
define i32 @musbgm_isplaying(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.musbgm_isplaying, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"%s not implemented\0A\00"
@__func__.musbgm_isplaying = [17 x i8] c"musbgm_isplaying\00"
define i32 @musbgm_isplaying(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__func__.musbgm_isplaying, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cbmarch_unlock(int);
void cbm_unlock(int HandleDevice) {
  ;
  cbmarch_unlock(HandleDevice);
  return;
}


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

x86 assembly (clang, -O2):
<cbm_unlock>:
jmp    1030 <cbmarch_unlock@plt>

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

LLVM IR (-O2):
define void @cbm_unlock(i32 %0) {
%2 = tail call i32 @cbmarch_unlock(i32 %0)
ret void
}
__attribute__((__no__)) void
do_nothing_trailing_hole_runtime_all(struct test_trailing_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_trailing_hole_runtime_all>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_trailing_hole_runtime_all+0x1b>
jmp    1120 <do_nothing_trailing_hole_runtime_all+0x20>
jmp    1120 <do_nothing_trailing_hole_runtime_all+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_trailing_hole = type opaque
define void @do_nothing_trailing_hole_runtime_all(%struct.test_trailing_hole* %0) {
%2 = alloca %struct.test_trailing_hole*
store %struct.test_trailing_hole* %0, %struct.test_trailing_hole** %2
%3 = load %struct.test_trailing_hole*, %struct.test_trailing_hole** %2
%4 = ptrtoint %struct.test_trailing_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_trailing_hole = type opaque
define void @do_nothing_trailing_hole_runtime_all(%struct.test_trailing_hole* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lox_free_provider(void *);
void free(void *ptr) { lox_free_provider(ptr); }


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

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

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

LLVM IR (-O2):
define void @free(i8* %0) {
%2 = tail call i32 @lox_free_provider(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_tagstruct_put_arbitrary() {
  printf("NOT IMPLEMENTED:"
         "pa_tagstruct_put_arbitrary"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_tagstruct_put_arbitrary\00"
define i32 @pa_tagstruct_put_arbitrary() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
int hash(int hashtype, const unsigned char *src, unsigned int srclen,
         unsigned char *dest, unsigned int *destlen) {
  return 0;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @hash(i32 %0, i8* %1, i32 %2, i8* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32*
store i32 %0, i32* %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32* %4, i32** %10
ret i32 0
}

LLVM IR (-O2):
define i32 @hash(i32 %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32* nocapture readnone %4) {
ret i32 0
}
void XActivateScreenSaver() {}


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

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

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

LLVM IR (-O2):
define void @XActivateScreenSaver() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_int(int, int);
void t16_bkpt() { arm_int(0x0c, 0b10111); }


x86 assembly (clang, -O0):
<t16_bkpt>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
mov    $0x17,%esi
call   1030 <arm_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t16_bkpt>:
mov    $0xc,%edi
mov    $0x17,%esi
jmp    1030 <arm_int@plt>

LLVM IR (-O0):
define void @t16_bkpt() {
%1 = call i32 @arm_int(i32 12, i32 23)
ret void
}

LLVM IR (-O2):
define void @t16_bkpt() {
%1 = tail call i32 @arm_int(i32 12, i32 23)
ret void
}
int rnn2d_lstm_parameters_nelem(const int K, const int D) {
  return 4 * (1 + (K) + (D) + (D)) * 5 * (D);
}


x86 assembly (clang, -O0):
<rnn2d_lstm_parameters_nelem>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
add    -0x8(%rbp),%eax
add    -0x8(%rbp),%eax
shl    $0x2,%eax
imul   $0x5,%eax,%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnn2d_lstm_parameters_nelem>:
lea    (%rdi,%rsi,2),%eax
add    $0x1,%eax
imul   %esi,%eax
shl    $0x2,%eax
lea    (%rax,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @rnn2d_lstm_parameters_nelem(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 = add nsw i32 1, %5
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
%9 = load i32, i32* %4
%10 = add nsw i32 %8, %9
%11 = mul nsw i32 4, %10
%12 = mul nsw i32 %11, 5
%13 = load i32, i32* %4
%14 = mul nsw i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @rnn2d_lstm_parameters_nelem(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = shl i32 %1, 1
%5 = add i32 %3, %4
%6 = mul i32 %1, 20
%7 = mul i32 %6, %5
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ BNCIO(int);
long int BNCDigitRight() {
  long int stat = 99;
  BNCIO(45);
  return (stat);
}


x86 assembly (clang, -O0):
<BNCDigitRight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x63,-0x8(%rbp)
mov    $0x2d,%edi
call   1030 <BNCIO@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BNCDigitRight>:
push   %rax
mov    $0x2d,%edi
call   1030 <BNCIO@plt>
mov    $0x63,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @BNCDigitRight() {
%1 = alloca i64
store i64 99, i64* %1
%2 = call i32 @BNCIO(i32 45)
%3 = load i64, i64* %1
ret i64 %3
}

LLVM IR (-O2):
define i64 @BNCDigitRight() {
%1 = tail call i32 @BNCIO(i32 45)
ret i64 99
}
unsigned int bitmix32(unsigned int a) {
  a -= (a << 6);
  a ^= (a >> 17);
  a -= (a << 9);
  a ^= (a << 4);
  a -= (a << 3);
  a ^= (a << 10);
  a ^= (a >> 15);
  return a;
}


x86 assembly (clang, -O0):
<bitmix32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x6,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x11,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x9,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x4,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0x3,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xa,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0xf,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitmix32>:
mov    %edi,%eax
shl    $0x6,%eax
sub    %eax,%edi
mov    %edi,%ecx
shr    $0x11,%ecx
xor    %edi,%ecx
mov    %ecx,%eax
shl    $0x9,%eax
imul   $0xffffe010,%ecx,%edx
sub    %eax,%ecx
xor    %edx,%ecx
lea    0x0(,%rcx,8),%eax
imul   $0xffffe400,%ecx,%edx
sub    %eax,%ecx
xor    %edx,%ecx
mov    %ecx,%eax
shr    $0xf,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bitmix32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 6
%5 = load i32, i32* %2
%6 = sub i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = lshr i32 %7, 17
%9 = load i32, i32* %2
%10 = xor i32 %9, %8
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = shl i32 %11, 9
%13 = load i32, i32* %2
%14 = sub i32 %13, %12
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = shl i32 %15, 4
%17 = load i32, i32* %2
%18 = xor i32 %17, %16
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = shl i32 %19, 3
%21 = load i32, i32* %2
%22 = sub i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = shl i32 %23, 10
%25 = load i32, i32* %2
%26 = xor i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = lshr i32 %27, 15
%29 = load i32, i32* %2
%30 = xor i32 %29, %28
store i32 %30, i32* %2
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @bitmix32(i32 %0) {
%2 = mul i32 %0, -63
%3 = lshr i32 %2, 17
%4 = xor i32 %3, %2
%5 = mul i32 %4, -511
%6 = mul i32 %4, -8176
%7 = xor i32 %5, %6
%8 = mul i32 %7, -7
%9 = mul i32 %7, -7168
%10 = xor i32 %8, %9
%11 = lshr i32 %10, 15
%12 = xor i32 %11, %10
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XGetKeyboardControl() {
  printf("XGetKeyboardControl called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [27 x i8] c"XGetKeyboardControl called\00"
define i32 @XGetKeyboardControl() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ stderr;
void usage(char *pnam, int ern) {
  fprintf(stderr, "Usage(%d): %s [-l] [-a addr] filename\n", ern, pnam);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rcx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [39 x i8] c"Usage(%d): %s [-l] [-a addr] filename\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"Usage(%d): %s [-l] [-a addr] filename\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %0)
%5 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *);
char *alloc_tracebuffer(int size) {
  char *bp = (char *)malloc(size * sizeof(char));
  if (bp == NULL) {
    printf("Failed to malloc buffer in ttrace\r\n");
  }
  return bp;
}


x86 assembly (clang, -O0):
<alloc_tracebuffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1155 <alloc_tracebuffer+0x35>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_tracebuffer>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <alloc_tracebuffer+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Failed to malloc buffer in ttrace\0D\0A\00"
define i8* @alloc_tracebuffer(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 1
%7 = trunc i64 %6 to i32
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %3
%10 = load i8*, i8** %3
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %12, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@str = [35 x i8] c"Failed to malloc buffer in ttrace\0D\00"
define i8* @alloc_tracebuffer(i32 %0) {
%2 = tail call i64 @malloc(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
%7 = inttoptr i64 %2 to i8*
ret i8* %7
}
void I2C5_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<I2C5_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <I2C5_Handler+0x9>
jmp    1109 <I2C5_Handler+0x9>

x86 assembly (clang, -O2):
<I2C5_Handler>:
jmp    1100 <I2C5_Handler>

LLVM IR (-O0):
define void @I2C5_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @I2C5_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
scalar_t__ how_many_free(int *);
int is_there_free(int helper[1024]) { return how_many_free(helper) ? 1 : 0; }


x86 assembly (clang, -O0):
<is_there_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <how_many_free@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_there_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @how_many_free(i32* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 1, i32 0
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_there_free(i32* %0) {
%2 = tail call i64 @how_many_free(i32* %0)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void printstr(char *name, char *x) { printf("%20s: %s\n", name, x); }


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

x86 assembly (clang, -O2):
<printstr>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"%20s: %s\0A\00"
define void @printstr(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ CARD16;

/* Variables and functions */
void GetProtocolVersion(CARD16 client_major, CARD16 client_minor,
                        CARD16 *server_major, CARD16 *server_minor) {
  *server_major = client_major;
  *server_minor = client_minor;
}


x86 assembly (clang, -O0):
<GetProtocolVersion>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetProtocolVersion>:
mov    %edi,(%rdx)
mov    %esi,(%rcx)
ret

LLVM IR (-O0):
define void @GetProtocolVersion(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32*, i32** %7
store i32 %9, i32* %10
%11 = load i32, i32* %6
%12 = load i32*, i32** %8
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @GetProtocolVersion(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
store i32 %0, i32* %2
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
char *triml(char *s) {
  while (isspace(*s))
    s++;
  return s;
}


x86 assembly (clang, -O0):
<triml>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1143 <triml+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <triml+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<triml>:
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 <triml+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @triml(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*/ printf(char *);
int /*<<< orphan*/ test_basic();
int /*<<< orphan*/ test_picking();
int /*<<< orphan*/ test_removing();
int /*<<< orphan*/ test_set_operations();
int main() {
  test_basic();
  test_set_operations();
  test_picking();
  test_removing();
  printf("success\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <test_basic@plt>
mov    $0x0,%al
call   1030 <test_set_operations@plt>
mov    $0x0,%al
call   1050 <test_picking@plt>
mov    $0x0,%al
call   1070 <test_removing@plt>
lea    0xe7e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <test_basic@plt>
xor    %eax,%eax
call   1030 <test_set_operations@plt>
xor    %eax,%eax
call   1050 <test_picking@plt>
xor    %eax,%eax
call   1070 <test_removing@plt>
lea    0xe8c(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [8 x i8] c"success\00"
define i32 @main() {
%1 = tail call i32 (...) @test_basic()
%2 = tail call i32 (...) @test_set_operations()
%3 = tail call i32 (...) @test_picking()
%4 = tail call i32 (...) @test_removing()
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
double rosenbrockFunctionUpperRangeBound(int);
double installedProblemUpperRangeBound(int index, int dimension) {
  return (rosenbrockFunctionUpperRangeBound(dimension));
}


x86 assembly (clang, -O0):
<installedProblemUpperRangeBound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <rosenbrockFunctionUpperRangeBound@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<installedProblemUpperRangeBound>:
mov    %esi,%edi
jmp    1030 <rosenbrockFunctionUpperRangeBound@plt>

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

LLVM IR (-O2):
define double @installedProblemUpperRangeBound(i32 %0, i32 %1) {
%3 = tail call double @rosenbrockFunctionUpperRangeBound(i32 %1)
ret double %3
}
int chk_brace(char *pos) {
  switch (*pos) {
  case '(':
    return 1;
  case ')':
    return -1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<chk_brace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
sub    $0x28,%eax
je     1131 <chk_brace+0x31>
jmp    1120 <chk_brace+0x20>
mov    -0x14(%rbp),%eax
sub    $0x29,%eax
je     113d <chk_brace+0x3d>
jmp    1149 <chk_brace+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1150 <chk_brace+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1150 <chk_brace+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_brace>:
mov    (%rdi),%al
xor    %ecx,%ecx
cmp    $0x29,%al
sete   %cl
neg    %ecx
cmp    $0x28,%al
mov    $0x1,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @chk_brace(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
switch i32 %6, label %9 [
i32 40, label %7
i32 41, label %8
]
7: ; preds = %1
store i32 1, i32* %2
br label %10
8: ; preds = %1
store i32 -1, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @chk_brace(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 41
%4 = sext i1 %3 to i32
%5 = icmp eq i8 %2, 40
%6 = select i1 %5, i32 1, i32 %4
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;
typedef long *sigjmp_buf;
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int setjmp(void *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
int sigsetjmp(sigjmp_buf buf, int save) {
  long *flag = buf + sizeof(jmp_buf) / sizeof(long);
  sigset_t *mask = (void *)(flag + 1);
  if ((*flag = save))
    sigprocmask(SIG_SETMASK, NULL, mask);
  return setjmp((void *)buf);
}


x86 assembly (clang, -O0):
<sigsetjmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
movslq -0xc(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rax,(%rcx)
cmp    $0x0,%rax
je     116e <sigsetjmp+0x4e>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%esi
call   1030 <sigprocmask@plt>
mov    -0x8(%rbp),%rdi
call   1040 <setjmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigsetjmp>:
push   %rbx
mov    %rdi,%rbx
movslq %esi,%rax
mov    %rax,(%rdi)
test   %eax,%eax
je     1142 <sigsetjmp+0x22>
lea    0x8(%rbx),%rdx
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <sigprocmask@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <setjmp@plt>

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
define i32 @sigsetjmp(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
%5 = alloca i64*
%6 = alloca i32*
store i64* %0, i64** %3
store i32 %1, i32* %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
store i64* %8, i64** %5
%9 = load i64*, i64** %5
%10 = getelementptr inbounds i64, i64* %9, i64 1
%11 = bitcast i64* %10 to i8*
%12 = bitcast i8* %11 to i32*
store i32* %12, i32** %6
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = load i64*, i64** %5
store i64 %14, i64* %15
%16 = icmp ne i64 %14, 0
br i1 %16, label %17, label %21
17: ; preds = %2
%18 = load i32, i32* @SIG_SETMASK
%19 = load i32*, i32** %6
%20 = call i32 @sigprocmask(i32 %18, i32* null, i32* %19)
br label %21
21: ; preds = %17, %2
%22 = load i64*, i64** %3
%23 = bitcast i64* %22 to i8*
%24 = call i32 @setjmp(i8* %23)
ret i32 %24
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
define i32 @sigsetjmp(i64* %0, i32 %1) {
%3 = sext i32 %1 to i64
store i64 %3, i64* %0
%4 = icmp eq i32 %1, 0
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = getelementptr inbounds i64, i64* %0, i64 1
%7 = bitcast i64* %6 to i32*
%8 = load i32, i32* @SIG_SETMASK
%9 = tail call i32 @sigprocmask(i32 %8, i32* null, i32* %7)
br label %10
10: ; preds = %5, %2
%11 = bitcast i64* %0 to i8*
%12 = tail call i32 @setjmp(i8* %11)
ret i32 %12
}
/* Variables and functions */
int strcmp(char const *, char const *);
size_t strlen(char const *);
int strend(const char *s1, const char *s2) {
  size_t l1 = strlen(s1);
  size_t l2 = strlen(s2);
  return strcmp(s1 + l1 - l2, s2);
}


x86 assembly (clang, -O0):
<strend>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
add    -0x18(%rbp),%rdi
xor    %eax,%eax
sub    -0x20(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @strend(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = sub i64 0, %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %7, i8* dereferenceable(1) %1)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ RegReadA_Ofilm(int, unsigned char *);
unsigned char TriSts_OFILM(void) {
  unsigned char UcRsltSts_OFILM = 0;
  unsigned char UcVal_OFILM;
  RegReadA_Ofilm(0x0129, &UcVal_OFILM);
  if (UcVal_OFILM & 0x03) {
    RegReadA_Ofilm(0x01F4, &UcVal_OFILM);
    UcRsltSts_OFILM = UcVal_OFILM & 0x11;
    UcRsltSts_OFILM |= 0x80;
  }
  return (UcRsltSts_OFILM);
}


x86 assembly (clang, -O0):
<TriSts_OFILM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
mov    $0x129,%edi
lea    -0x2(%rbp),%rsi
call   1030 <RegReadA_Ofilm@plt>
movzbl -0x2(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
je     115e <TriSts_OFILM+0x4e>
mov    $0x1f4,%edi
lea    -0x2(%rbp),%rsi
call   1030 <RegReadA_Ofilm@plt>
movzbl -0x2(%rbp),%eax
and    $0x11,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
or     $0x80,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TriSts_OFILM>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x129,%edi
call   1030 <RegReadA_Ofilm@plt>
testb  $0x3,0x7(%rsp)
je     1140 <TriSts_OFILM+0x30>
lea    0x7(%rsp),%rsi
mov    $0x1f4,%edi
call   1030 <RegReadA_Ofilm@plt>
mov    0x7(%rsp),%al
and    $0x11,%al
or     $0x80,%al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i8 @TriSts_OFILM() {
%1 = alloca i8
%2 = alloca i8
store i8 0, i8* %1
%3 = call i32 @RegReadA_Ofilm(i32 297, i8* %2)
%4 = load i8, i8* %2
%5 = zext i8 %4 to i32
%6 = and i32 %5, 3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %18
8: ; preds = %0
%9 = call i32 @RegReadA_Ofilm(i32 500, i8* %2)
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = and i32 %11, 17
%13 = trunc i32 %12 to i8
store i8 %13, i8* %1
%14 = load i8, i8* %1
%15 = zext i8 %14 to i32
%16 = or i32 %15, 128
%17 = trunc i32 %16 to i8
store i8 %17, i8* %1
br label %18
18: ; preds = %8, %0
%19 = load i8, i8* %1
ret i8 %19
}

LLVM IR (-O2):
define zeroext i8 @TriSts_OFILM() {
%1 = alloca i8
%2 = call i32 @RegReadA_Ofilm(i32 297, i8* %1)
%3 = load i8, i8* %1
%4 = and i8 %3, 3
%5 = icmp eq i8 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %0
%7 = call i32 @RegReadA_Ofilm(i32 500, i8* %1)
%8 = load i8, i8* %1
%9 = and i8 %8, 17
%10 = or i8 %9, -128
br label %11
11: ; preds = %6, %0
%12 = phi i8 [ %10, %6 ], [ 0, %0 ]
ret i8 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *arg) {
  printf("usage: %s (Key PKCS#11 URL) [opt: PKCS#11 module path]\n", arg);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"usage: %s (Key PKCS URL) [opt: PKCS module path]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"usage: %s (Key PKCS URL) [opt: PKCS module path]\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void BASIC_CONSTRAINTS_new(void) {}


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

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

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

LLVM IR (-O2):
define void @BASIC_CONSTRAINTS_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
main() { foo(-30); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffe2,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffe2,%edi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @foo(i32 -30)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 -30)
ret i32 0
}
void glBeginQuery(void) { return; }


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

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

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

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

/* Variables and functions */
int ldpaa_dq_flags(struct ldpaa_dq const *);
int ldpaa_dq_is_pull_complete(const struct ldpaa_dq *dq) {
  return (int)(ldpaa_dq_flags(dq) & 0x01);
}


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

x86 assembly (clang, -O2):
<ldpaa_dq_is_pull_complete>:
push   %rax
call   1030 <ldpaa_dq_flags@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ldpaa_dq = type { i32 }
define i32 @ldpaa_dq_is_pull_complete(%struct.ldpaa_dq* %0) {
%2 = alloca %struct.ldpaa_dq*
store %struct.ldpaa_dq* %0, %struct.ldpaa_dq** %2
%3 = load %struct.ldpaa_dq*, %struct.ldpaa_dq** %2
%4 = call i32 @ldpaa_dq_flags(%struct.ldpaa_dq* %3)
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
%struct.ldpaa_dq = type { i32 }
define i32 @ldpaa_dq_is_pull_complete(%struct.ldpaa_dq* %0) {
%2 = tail call i32 @ldpaa_dq_flags(%struct.ldpaa_dq* %0)
%3 = and i32 %2, 1
ret i32 %3
}
int do_822() { return 822; }


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

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

LLVM IR (-O0):
define i32 @do_822() {
ret i32 822
}

LLVM IR (-O2):
define i32 @do_822() {
ret i32 822
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x7b() {
  Assert_real((isxdigit(123) == 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_isxdigit.c",
              620, ("isxdigit should be 0 for {"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x7b>:
push   %rax
mov    $0x7b,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x26c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for {\00"
define void @t_isxdigit_0x7b() {
%1 = call i64 @isxdigit(i32 123)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 620, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [27 x i8] c"isxdigit should be 0 for {\00"
define void @t_isxdigit_0x7b() {
%1 = tail call i64 @isxdigit(i32 123)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 620, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int is_at_sign(char c) { return c == '@'; }


x86 assembly (clang, -O0):
<is_at_sign>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x40,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_at_sign>:
xor    %eax,%eax
cmp    $0x40,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_at_sign(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 64
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_at_sign(i8 signext %0) {
%2 = icmp eq i8 %0, 64
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int rand();
int rd_jitter(int low, int high) { return (low + (rand() % (high + 1))); }


x86 assembly (clang, -O0):
<rd_jitter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_jitter>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rd_jitter(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = call i32 (...) @rand()
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = srem i32 %6, %8
%10 = add nsw i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @rd_jitter(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = add nsw i32 %1, 1
%5 = srem i32 %3, %4
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ pcjoy_assign(int, int);
int /*<<< orphan*/ pcjoy_reset();
void pcjoy_init(void) {
  pcjoy_reset();
  pcjoy_assign(0, 0);
  pcjoy_assign(1, 1);
  pcjoy_assign(2, 4);
  pcjoy_assign(3, 5);
}


x86 assembly (clang, -O0):
<pcjoy_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <pcjoy_reset@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <pcjoy_assign@plt>
mov    $0x1,%esi
mov    %esi,%edi
call   1030 <pcjoy_assign@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1030 <pcjoy_assign@plt>
mov    $0x3,%edi
mov    $0x5,%esi
call   1030 <pcjoy_assign@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcjoy_init>:
push   %rax
xor    %eax,%eax
call   1040 <pcjoy_reset@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <pcjoy_assign@plt>
mov    $0x1,%edi
mov    $0x1,%esi
call   1030 <pcjoy_assign@plt>
mov    $0x2,%edi
mov    $0x4,%esi
call   1030 <pcjoy_assign@plt>
mov    $0x3,%edi
mov    $0x5,%esi
pop    %rax
jmp    1030 <pcjoy_assign@plt>

LLVM IR (-O0):
define void @pcjoy_init() {
%1 = call i32 (...) @pcjoy_reset()
%2 = call i32 @pcjoy_assign(i32 0, i32 0)
%3 = call i32 @pcjoy_assign(i32 1, i32 1)
%4 = call i32 @pcjoy_assign(i32 2, i32 4)
%5 = call i32 @pcjoy_assign(i32 3, i32 5)
ret void
}

LLVM IR (-O2):
define void @pcjoy_init() {
%1 = tail call i32 (...) @pcjoy_reset()
%2 = tail call i32 @pcjoy_assign(i32 0, i32 0)
%3 = tail call i32 @pcjoy_assign(i32 1, i32 1)
%4 = tail call i32 @pcjoy_assign(i32 2, i32 4)
%5 = tail call i32 @pcjoy_assign(i32 3, i32 5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RAND_bytes(unsigned char *, int);
void util_random(int length, char *result) {
  RAND_bytes((unsigned char *)result, length);
}


x86 assembly (clang, -O0):
<util_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <RAND_bytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_random>:
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
jmp    1030 <RAND_bytes@plt>

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

LLVM IR (-O2):
define void @util_random(i32 %0, i8* %1) {
%3 = tail call i32 @RAND_bytes(i8* %1, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __getpagesize(void) {
  __set_errno(ENOSYS);
  return 0;
}


x86 assembly (clang, -O0):
<__getpagesize>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getpagesize() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 0
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getpagesize() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 0
}