xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int wchar_t;
struct _Locale_monetary {
  int dummy;
};

/* Variables and functions */
wchar_t _WLocale_mon_thousands_sep(struct _Locale_monetary *lmon) {
  return L',';
}


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

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

LLVM IR (-O0):
%struct._Locale_monetary = type { i32 }
define i32 @_WLocale_mon_thousands_sep(%struct._Locale_monetary* %0) {
%2 = alloca %struct._Locale_monetary*
store %struct._Locale_monetary* %0, %struct._Locale_monetary** %2
ret i32 44
}

LLVM IR (-O2):
%struct._Locale_monetary = type { i32 }
define i32 @_WLocale_mon_thousands_sep(%struct._Locale_monetary* nocapture readnone %0) {
ret i32 44
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void say_hello() { printf("Hello Dude!\n"); }


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello Dude!\00"
define void @say_hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
int energymon_is_exclusive_odroid_ioctl(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @energymon_is_exclusive_odroid_ioctl() {
ret i32 0
}
cbuf38(f, n) int f, n;
{ cbuf(f, n, 38); }


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

x86 assembly (clang, -O2):
<cbuf38>:
mov    $0x26,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf38(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %6, i32 %7, i32 38)
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @cbuf38(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 38)
ret i32 undef
}
void CG_CheckOrderPending() {}


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

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

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

LLVM IR (-O2):
define void @CG_CheckOrderPending() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;

/* Variables and functions */
unsigned short byteSwap16(unsigned short);
int /*<<< orphan*/ memcpy(unsigned short *, char *, int);
unsigned short memReadBits16(char **pPt, int isSwapped) {
  unsigned short val;
  memcpy(&val, *pPt, sizeof(val));
  if (isSwapped)
    val = byteSwap16(val);
  *pPt += sizeof(val);
  return val;
}


x86 assembly (clang, -O0):
<memReadBits16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    -0xe(%rbp),%rdi
mov    $0x2,%edx
call   1040 <memcpy@plt>
cmpl   $0x0,-0xc(%rbp)
je     115b <memReadBits16+0x3b>
movzwl -0xe(%rbp),%edi
call   1030 <byteSwap16@plt>
mov    %ax,-0xe(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
movzwl -0xe(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memReadBits16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
mov    (%rdi),%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1040 <memcpy@plt>
movzwl 0x6(%rsp),%eax
test   %ebp,%ebp
je     114b <memReadBits16+0x2b>
movzwl %ax,%edi
call   1030 <byteSwap16@plt>
addq   $0x2,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define zeroext i16 @memReadBits16(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i16
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @memcpy(i16* %5, i8* %7, i32 2)
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i16, i16* %5
%13 = call zeroext i16 @byteSwap16(i16 zeroext %12)
store i16 %13, i16* %5
br label %14
14: ; preds = %11, %2
%15 = load i8**, i8*** %3
%16 = load i8*, i8** %15
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8* %17, i8** %15
%18 = load i16, i16* %5
ret i16 %18
}

LLVM IR (-O2):
define zeroext i16 @memReadBits16(i8** nocapture %0, i32 %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = load i8*, i8** %0
%6 = call i32 @memcpy(i16* %3, i8* %5, i32 2)
%7 = icmp eq i32 %1, 0
%8 = load i16, i16* %3
br i1 %7, label %11, label %9
9: ; preds = %2
%10 = call zeroext i16 @byteSwap16(i16 zeroext %8)
br label %11
11: ; preds = %2, %9
%12 = phi i16 [ %10, %9 ], [ %8, %2 ]
%13 = load i8*, i8** %0
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8* %14, i8** %0
ret i16 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t FlashUserGet(uint32_t *pui32User0, uint32_t *pui32User1) {
  ;
  ;
  *pui32User0 = (*((volatile uint32_t *)(0x400FE1E0)));
  *pui32User1 = (*((volatile uint32_t *)(0x400FE1E4)));
  return (0);
}


x86 assembly (clang, -O0):
<FlashUserGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x400fe1e0,%eax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x400fe1e4,%eax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlashUserGet>:
mov    0x400fe1e0,%eax
mov    %eax,(%rdi)
mov    0x400fe1e4,%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @FlashUserGet(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load volatile i32, i32* inttoptr (i64 1074782688 to i32*)
%6 = load i32*, i32** %3
store i32 %5, i32* %6
%7 = load volatile i32, i32* inttoptr (i64 1074782692 to i32*)
%8 = load i32*, i32** %4
store i32 %7, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @FlashUserGet(i32* nocapture writeonly %0, i32* nocapture writeonly %1) {
%3 = load volatile i32, i32* inttoptr (i64 1074782688 to i32*)
store i32 %3, i32* %0
%4 = load volatile i32, i32* inttoptr (i64 1074782692 to i32*)
store i32 %4, i32* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ calculate_the_maximum(int, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  calculate_the_maximum(n, k);
  return 0;
  ;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @calculate_the_maximum(i32 %6, i32 %7)
ret i32 0
}
void FloppyProcessQueuedRequests(int DisketteExtension) {
  { return; }
}


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

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

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

LLVM IR (-O2):
define void @FloppyProcessQueuedRequests(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void fatal_error(const char *msg) {
  fprintf(stderr, "%s", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<fatal_error>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_FAILURE = global i32 0
define void @fatal_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@EXIT_FAILURE = global i32 0
define void @fatal_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
void SteamAPI_ISteamGameServer_ClearAllKeyValues(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamGameServer_ClearAllKeyValues>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamGameServer_ClearAllKeyValues = [44 x i8] c"SteamAPI_ISteamGameServer_ClearAllKeyValues\00"
define void @SteamAPI_ISteamGameServer_ClearAllKeyValues(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamGameServer_ClearAllKeyValues, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamGameServer_ClearAllKeyValues = [44 x i8] c"SteamAPI_ISteamGameServer_ClearAllKeyValues\00"
define void @SteamAPI_ISteamGameServer_ClearAllKeyValues(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([44 x i8], [44 x i8]* @__func__.SteamAPI_ISteamGameServer_ClearAllKeyValues, i64 0, i64 0), i8* %0)
ret void
}
void prefix() {}


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

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

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

LLVM IR (-O2):
define void @prefix() {
ret void
}
/* Variables and functions */
scalar_t__ INT_MIN;
unsigned int test5u(unsigned int x) {
  unsigned int y = (unsigned int)INT_MIN;
  return ~(x + y);
}


x86 assembly (clang, -O0):
<test5u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5u>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
add    (%rcx),%eax
not    %eax
ret

LLVM IR (-O0):
@INT_MIN = global i64 0
define i32 @test5u(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i64, i64* @INT_MIN
%5 = trunc i64 %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = add i32 %6, %7
%9 = xor i32 %8, -1
ret i32 %9
}

LLVM IR (-O2):
@INT_MIN = global i64 0
define i32 @test5u(i32 %0) {
%2 = load i64, i64* @INT_MIN
%3 = trunc i64 %2 to i32
%4 = add i32 %3, %0
%5 = xor i32 %4, -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ checkValues();
int draw();
int /*<<< orphan*/ initmenu();
int main(void) {
  initmenu();
  checkValues();
  return draw();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <initmenu@plt>
xor    %eax,%eax
call   1050 <checkValues@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <draw@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initmenu()
%2 = tail call i32 (...) @checkValues()
%3 = tail call i32 (...) @draw()
ret i32 %3
}
void gdk_gc_set_subwindow() {}


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

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

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

LLVM IR (-O2):
define void @gdk_gc_set_subwindow() {
ret void
}
/* Variables and functions */
float babl_pow_24f(float);
float babl_gamma_2_2_to_linearf(float value) {
  if (value > 0.04045f)
    return babl_pow_24f((value + 0.055f) / 1.055f);
  return value / 12.92f;
}


x86 assembly (clang, -O0):
<babl_gamma_2_2_to_linearf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    115b <babl_gamma_2_2_to_linearf+0x4b>
movss  0xed1(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  0xec0(%rip),%xmm1
divss  %xmm1,%xmm0
call   1030 <babl_pow_24f@plt>
movss  %xmm0,-0x4(%rbp)
jmp    1171 <babl_gamma_2_2_to_linearf+0x61>
movss  -0x8(%rbp),%xmm0
movss  0xe9c(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<babl_gamma_2_2_to_linearf>:
ucomiss 0xee9(%rip),%xmm0
jbe    112e <babl_gamma_2_2_to_linearf+0x1e>
addss  0xee7(%rip),%xmm0
divss  0xee3(%rip),%xmm0
jmp    1030 <babl_pow_24f@plt>
divss  0xece(%rip),%xmm0
ret

LLVM IR (-O0):
define float @babl_gamma_2_2_to_linearf(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ogt float %4, 0x3FA4B5DCC0000000
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load float, float* %3
%8 = fadd float %7, 0x3FAC28F5C0000000
%9 = fdiv float %8, 0x3FF0E147A0000000
%10 = call float @babl_pow_24f(float %9)
store float %10, float* %2
br label %14
11: ; preds = %1
%12 = load float, float* %3
%13 = fdiv float %12, 0x4029D70A40000000
store float %13, float* %2
br label %14
14: ; preds = %11, %6
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @babl_gamma_2_2_to_linearf(float %0) {
%2 = fcmp ogt float %0, 0x3FA4B5DCC0000000
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fadd float %0, 0x3FAC28F5C0000000
%5 = fdiv float %4, 0x3FF0E147A0000000
%6 = tail call float @babl_pow_24f(float %5)
br label %9
7: ; preds = %1
%8 = fdiv float %0, 0x4029D70A40000000
br label %9
9: ; preds = %7, %3
%10 = phi float [ %6, %3 ], [ %8, %7 ]
ret float %10
}
int test_imm_37int8_mem(signed char *val) {
  return ((*val) & (-0x37 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_37int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffffc9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_37int8_mem>:
testb  $0xc9,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_37int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -55
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_37int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -55
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int random();
int my_random(int maximum) {
  int res;
  res = random();
  res = res % maximum;
  return res;
}


x86 assembly (clang, -O0):
<my_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0x4(%rbp)
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_random>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <random@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @my_random(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @random()
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = srem i32 %5, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @my_random(i32 %0) {
%2 = tail call i32 (...) @random()
%3 = srem i32 %2, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glCopyTexImage2D(int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/,
                                    int /*<<< orphan*/, int /*<<< orphan*/);
void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x,
                    GLint y, GLsizei width, GLsizei height, GLint border) {
  glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
}


x86 assembly (clang, -O0):
<CopyTexImage2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%r10d
mov    0x18(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <glCopyTexImage2D@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CopyTexImage2D>:
jmp    1030 <glCopyTexImage2D@plt>

LLVM IR (-O0):
define void @CopyTexImage2D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %11
%20 = load i32, i32* %12
%21 = load i32, i32* %13
%22 = load i32, i32* %14
%23 = load i32, i32* %15
%24 = load i32, i32* %16
%25 = call i32 @glCopyTexImage2D(i32 %17, i32 %18, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
define void @CopyTexImage2D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = tail call i32 @glCopyTexImage2D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7)
ret void
}
/* Type definitions */
struct aiocb {
  int dummy;
};
typedef int /*<<< orphan*/ aio;

/* Variables and functions */
int aio_cancel(int, struct aiocb *);
int /*<<< orphan*/ memset(struct aiocb *, int /*<<< orphan*/, int);
int main(void) {
  int fd = 0;
  struct aiocb aio;
  (void)memset(&aio, 0, sizeof(aio));
  return aio_cancel(fd, &aio);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1040 <aio_cancel@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.aiocb = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca %struct.aiocb
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i32 @memset(%struct.aiocb* %3, i32 0, i32 4)
%5 = load i32, i32* %2
%6 = call i32 @aio_cancel(i32 %5, %struct.aiocb* %3)
ret i32 %6
}

LLVM IR (-O2):
%struct.aiocb = type { i32 }
define i32 @main() {
%1 = alloca %struct.aiocb
%2 = bitcast %struct.aiocb* %1 to i8*
%3 = call i32 @memset(%struct.aiocb* %1, i32 0, i32 4)
%4 = call i32 @aio_cancel(i32 0, %struct.aiocb* %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ print_str(char *);
void usertask(void) {
  print_str("User Task #1\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<usertask>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <print_str@plt>
jmp    1120 <usertask+0x10>

x86 assembly (clang, -O2):
<usertask>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <print_str@plt>
nopl   (%rax)
jmp    1120 <usertask+0x10>

LLVM IR (-O0):
@.str = [14 x i8] c"User Task\0A\00"
define void @usertask() {
%1 = call i32 @print_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [14 x i8] c"User Task\0A\00"
define void @usertask() {
%1 = tail call i32 @print_str(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
void RandomFunc(unsigned short input[1], unsigned short output[1]) {
  unsigned short state[1];
  unsigned short local1;
  {
    state[0UL] = (input[0UL] | 51238316UL) >> (unsigned short)3;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] <<=
          ((state[0UL] >> (unsigned short)3) & (unsigned short)7) | 1UL;
      local1 += 2UL;
    }
    output[0UL] = (state[0UL] | 28054104UL) | (unsigned short)7365;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
or     $0x30dd5ac,%rax
shr    $0x3,%rax
mov    %ax,-0x12(%rbp)
movw   $0x0,-0x14(%rbp)
movzwl -0x14(%rbp),%eax
cmp    $0x1,%rax
jae    1161 <RandomFunc+0x61>
movzwl -0x12(%rbp),%eax
sar    $0x3,%eax
and    $0x7,%eax
movslq %eax,%rcx
or     $0x1,%rcx
movzwl -0x12(%rbp),%eax
shl    %cl,%eax
mov    %ax,-0x12(%rbp)
movzwl -0x14(%rbp),%eax
add    $0x2,%rax
mov    %ax,-0x14(%rbp)
jmp    1127 <RandomFunc+0x27>
movzwl -0x12(%rbp),%eax
or     $0x1ac1258,%rax
or     $0x1cc5,%rax
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movzwl (%rdi),%eax
shl    $0x4,%eax
and    $0xffffa100,%eax
or     $0x5edd,%eax
mov    %ax,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
%5 = alloca [1 x i16]
%6 = alloca i16
store i16* %0, i16** %3
store i16* %1, i16** %4
%7 = load i16*, i16** %3
%8 = getelementptr inbounds i16, i16* %7, i64 0
%9 = load i16, i16* %8
%10 = zext i16 %9 to i64
%11 = or i64 %10, 51238316
%12 = lshr i64 %11, 3
%13 = trunc i64 %12 to i16
%14 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
store i16 %13, i16* %14
store i16 0, i16* %6
br label %15
15: ; preds = %19, %2
%16 = load i16, i16* %6
%17 = zext i16 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %37
19: ; preds = %15
%20 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%21 = load i16, i16* %20
%22 = zext i16 %21 to i32
%23 = ashr i32 %22, 3
%24 = and i32 %23, 7
%25 = sext i32 %24 to i64
%26 = or i64 %25, 1
%27 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%28 = load i16, i16* %27
%29 = zext i16 %28 to i32
%30 = trunc i64 %26 to i32
%31 = shl i32 %29, %30
%32 = trunc i32 %31 to i16
store i16 %32, i16* %27
%33 = load i16, i16* %6
%34 = zext i16 %33 to i64
%35 = add i64 %34, 2
%36 = trunc i64 %35 to i16
store i16 %36, i16* %6
br label %15
37: ; preds = %15
%38 = getelementptr inbounds [1 x i16], [1 x i16]* %5, i64 0, i64 0
%39 = load i16, i16* %38
%40 = zext i16 %39 to i64
%41 = or i64 %40, 28054104
%42 = or i64 %41, 7365
%43 = trunc i64 %42 to i16
%44 = load i16*, i16** %4
%45 = getelementptr inbounds i16, i16* %44, i64 0
store i16 %43, i16* %45
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i16* nocapture %0, i16* nocapture writeonly %1) {
%3 = load i16, i16* %0
%4 = shl i16 %3, 4
%5 = and i16 %4, -24320
%6 = or i16 %5, 24285
store i16 %6, i16* %1
ret void
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ putchar(char);
int main() {
  int c = getchar();
  if (c < 'A')
    putchar('X');
  else
    putchar('Y');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jge    1152 <main+0x32>
mov    $0x58,%edi
call   1030 <putchar@plt>
jmp    115c <main+0x3c>
mov    $0x59,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %edi,%edi
cmp    $0x41,%eax
setl   %dil
xor    $0x59,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 65
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 @putchar(i8 signext 88)
br label %10
8: ; preds = %0
%9 = call i32 @putchar(i8 signext 89)
br label %10
10: ; preds = %8, %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = icmp slt i32 %1, 65
%3 = select i1 %2, i8 88, i8 89
%4 = tail call i32 @putchar(i8 signext %3)
ret i32 0
}
double power(int b, int e) {
  double r = 1;
  int i;
  for (i = 0; i < e; i++)
    r *= b;
  return r;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  0xeee(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1147 <power+0x47>
cvtsi2sdl -0x4(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111e <power+0x1e>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %esi,%esi
jle    111f <power+0x1f>
cvtsi2sd %edi,%xmm1
lea    -0x1(%rsi),%ecx
mov    %esi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    1128 <power+0x28>
movsd  0xee3(%rip),%xmm0
jmp    1165 <power+0x65>
movsd  0xed9(%rip),%xmm0
ret
and    $0xfffffff8,%esi
movsd  0xecd(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
add    $0xfffffff8,%esi
jne    1140 <power+0x40>
test   %eax,%eax
je     1179 <power+0x79>
nopl   0x0(%rax)
mulsd  %xmm1,%xmm0
add    $0xffffffff,%eax
jne    1170 <power+0x70>
ret

LLVM IR (-O0):
define double @power(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store double 1.000000e+00, double* %5
store i32 0, i32* %6
br label %7
7: ; preds = %16, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sitofp i32 %12 to double
%14 = load double, double* %5
%15 = fmul double %14, %13
store double %15, double* %5
br label %16
16: ; preds = %11
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %7
19: ; preds = %7
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
define double @power(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %34
4: ; preds = %2
%5 = sitofp i32 %0 to double
%6 = add i32 %1, -1
%7 = and i32 %1, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %24, label %9
9: ; preds = %4
%10 = and i32 %1, -8
br label %11
11: ; preds = %11, %9
%12 = phi double [ 1.000000e+00, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = fmul double %12, %5
%15 = fmul double %14, %5
%16 = fmul double %15, %5
%17 = fmul double %16, %5
%18 = fmul double %17, %5
%19 = fmul double %18, %5
%20 = fmul double %19, %5
%21 = fmul double %20, %5
%22 = add i32 %13, 8
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %4
%25 = phi double [ undef, %4 ], [ %21, %11 ]
%26 = phi double [ 1.000000e+00, %4 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %34, label %28
28: ; preds = %24, %28
%29 = phi double [ %31, %28 ], [ %26, %24 ]
%30 = phi i32 [ %32, %28 ], [ 0, %24 ]
%31 = fmul double %29, %5
%32 = add i32 %30, 1
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %28
34: ; preds = %24, %28, %2
%35 = phi double [ 1.000000e+00, %2 ], [ %25, %24 ], [ %31, %28 ]
ret double %35
}
int doAsynchronousOpen(int flags) {
  return (flags & 0x00000004) &&
         ((flags & 0x00000800) || (flags & 0x00001000) || (flags & 0x00000008));
}


x86 assembly (clang, -O0):
<doAsynchronousOpen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x4,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
je     115e <doAsynchronousOpen+0x5e>
mov    -0x4(%rbp),%ecx
and    $0x800,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x6(%rbp)
jne    1158 <doAsynchronousOpen+0x58>
mov    -0x4(%rbp),%ecx
and    $0x1000,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x6(%rbp)
jne    1158 <doAsynchronousOpen+0x58>
mov    -0x4(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doAsynchronousOpen>:
xor    %eax,%eax
test   $0x4,%dil
je     1115 <doAsynchronousOpen+0x15>
mov    $0x1,%eax
test   $0x1800,%edi
je     1116 <doAsynchronousOpen+0x16>
ret
shr    $0x3,%edi
and    $0x1,%edi
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @doAsynchronousOpen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 4
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %20
6: ; preds = %1
%7 = load i32, i32* %2
%8 = and i32 %7, 2048
%9 = icmp ne i32 %8, 0
br i1 %9, label %18, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = and i32 %11, 4096
%13 = icmp ne i32 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = and i32 %15, 8
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %14, %10, %6
%19 = phi i1 [ true, %10 ], [ true, %6 ], [ %17, %14 ]
br label %20
20: ; preds = %18, %1
%21 = phi i1 [ false, %1 ], [ %19, %18 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @doAsynchronousOpen(i32 %0) {
%2 = and i32 %0, 4
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = and i32 %0, 6144
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = lshr i32 %0, 3
%9 = and i32 %8, 1
br label %10
10: ; preds = %4, %7, %1
%11 = phi i32 [ 0, %1 ], [ 1, %4 ], [ %9, %7 ]
ret i32 %11
}
void ARGBToJ422() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToJ422() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
char *strstr(char *, char *);
char is_sensor(char *SERVERRETURN) {
  char *str, value[9];
  str = strstr(SERVERRETURN, "value\":");
  strncpy(value, str, 8);
  return value[7];
}


x86 assembly (clang, -O0):
<is_sensor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,-0x10(%rbp)
lea    -0x19(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movsbl -0x12(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sensor>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rsi
call   1040 <strstr@plt>
lea    0xf(%rsp),%rdi
mov    %rax,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
mov    0x16(%rsp),%al
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"value\22:\00"
define signext i8 @is_sensor(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [9 x i8]
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strstr(i8* %5, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i8* %6, i8** %3
%7 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = call i32 @strncpy(i8* %7, i8* %8, i32 8)
%10 = getelementptr inbounds [9 x i8], [9 x i8]* %4, i64 0, i64 7
%11 = load i8, i8* %10
ret i8 %11
}

LLVM IR (-O2):
@.str = [8 x i8] c"value\22:\00"
define signext i8 @is_sensor(i8* %0) {
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%4 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @strncpy(i8* %3, i8* %4, i32 8)
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 7
%7 = load i8, i8* %6
ret i8 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OCTET_STRING;

/* Variables and functions */
int /*<<< orphan*/ ASN1_OCTET_STRING_it;
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
ASN1_OCTET_STRING *ASN1_OCTET_STRING_new(void) {
  return (ASN1_OCTET_STRING *)ASN1_item_new(&ASN1_OCTET_STRING_it);
}


x86 assembly (clang, -O0):
<ASN1_OCTET_STRING_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASN1_OCTET_STRING_new>:
mov    0x2ec9(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@ASN1_OCTET_STRING_it = global i32 0
define i32* @ASN1_OCTET_STRING_new() {
%1 = call i64 @ASN1_item_new(i32* @ASN1_OCTET_STRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@ASN1_OCTET_STRING_it = global i32 0
define i32* @ASN1_OCTET_STRING_new() {
%1 = tail call i64 @ASN1_item_new(i32* @ASN1_OCTET_STRING_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
void RAND_set_rand_method(void) {}


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

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

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

LLVM IR (-O2):
define void @RAND_set_rand_method() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int /*<<< orphan*/ system(char *);
void compile(char *name) {
  char *cmd = (char *)malloc(sizeof(char) * 1024);
  sprintf(cmd, "gcc .temp.c -o %s", name);
  system(cmd);
  system("rm .temp.c");
  free(cmd);
}


x86 assembly (clang, -O0):
<compile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe97(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <system@plt>
lea    0xe94(%rip),%rdi
call   1040 <system@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compile>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x400,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea5(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <system@plt>
lea    0xe9d(%rip),%rdi
call   1040 <system@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"gcc .temp.c -o %s\00"
@.str.1 = [11 x i8] c"rm .temp.c\00"
define void @compile(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i64 @malloc(i32 1024)
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %3
%10 = call i32 @system(i8* %9)
%11 = call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8*, i8** %3
%13 = call i32 @free(i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"gcc .temp.c -o %s\00"
@.str.1 = [11 x i8] c"rm .temp.c\00"
define void @compile(i8* %0) {
%2 = tail call i64 @malloc(i32 1024)
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = tail call i32 @system(i8* %3)
%6 = tail call i32 @system(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @free(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ initr250(char *);
void StartPattern(char *InitString) {
  if (InitString)
    initr250(InitString);
  else
    initr250("This is a simple init string");
}


x86 assembly (clang, -O0):
<StartPattern>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1135 <StartPattern+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <initr250@plt>
jmp    1141 <StartPattern+0x31>
lea    0xec4(%rip),%rdi
call   1030 <initr250@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StartPattern>:
test   %rdi,%rdi
je     111a <StartPattern+0xa>
jmp    1030 <initr250@plt>
lea    0xedf(%rip),%rdi
jmp    1030 <initr250@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"This is a simple init string\00"
define void @StartPattern(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @initr250(i8* %6)
br label %10
8: ; preds = %1
%9 = call i32 @initr250(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"This is a simple init string\00"
define void @StartPattern(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @initr250(i8* %0)
br label %7
5: ; preds = %1
%6 = tail call i32 @initr250(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret void
}
void x86_begarg(int i, unsigned tar, unsigned arg1, unsigned arg2) {}


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

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

LLVM IR (-O0):
define void @x86_begarg(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
ret void
}

LLVM IR (-O2):
define void @x86_begarg(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int test();
int main(int argc, char *argv[]) {
  int i;
  int result;
  for (i = 0; i < 100; i++)
    result = test();
  if (result != 5)
    printf("*** wrong result ***\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    115f <main+0x3f>
mov    $0x0,%al
call   1040 <test@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
cmpl   $0x5,-0x18(%rbp)
je     1175 <main+0x55>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <test@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
cmp    $0x5,%eax
je     114d <main+0x2d>
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"*** wrong result ***\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %8
8: ; preds = %13, %2
%9 = load i32, i32* %6
%10 = icmp slt i32 %9, 100
br i1 %10, label %11, label %16
11: ; preds = %8
%12 = call i32 (...) @test()
store i32 %12, i32* %7
br label %13
13: ; preds = %11
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
store i32 %15, i32* %6
br label %8
16: ; preds = %8
%17 = load i32, i32* %7
%18 = icmp ne i32 %17, 5
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"*** wrong result ***\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 0, %2 ], [ %6, %3 ]
%5 = tail call i32 (...) @test()
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 100
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = icmp eq i32 %5, 5
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}
/* Variables and functions */
int my_strlen(char *str) {
  int i;
  if (str == NULL)
    return (-1);
  i = -1;
  while (str[++i])
    ;
  return (i);
}


x86 assembly (clang, -O0):
<my_strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <my_strlen+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    114b <my_strlen+0x4b>
movl   $0xffffffff,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x14(%rbp)
movslq %ecx,%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1145 <my_strlen+0x45>
jmp    1126 <my_strlen+0x26>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strlen>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     111c <my_strlen+0x1c>
nopw   0x0(%rax,%rax,1)
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <my_strlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @my_strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %5, %3 ], [ -1, %1 ]
%5 = add nsw i64 %4, 1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %5 to i32
br label %11
11: ; preds = %9, %1
%12 = phi i32 [ -1, %1 ], [ %10, %9 ]
ret i32 %12
}
void I400ToARGBRow_Any_AVX2() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @I400ToARGBRow_Any_AVX2() {
ret void
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
int32_t isign(int32_t a) { return a > 0 ? 1 : a < 0 ? -1 : 0; }


x86 assembly (clang, -O0):
<isign>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1120 <isign+0x20>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1135 <isign+0x35>
mov    -0x8(%rbp),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<isign>:
xor    %ecx,%ecx
test   %rdi,%rdi
setne  %cl
neg    %rcx
test   %rdi,%rdi
mov    $0x1,%eax
cmovle %rcx,%rax
ret

LLVM IR (-O0):
define i64 @isign(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load i64, i64* %2
%8 = icmp slt i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 -1, i32 0
br label %11
11: ; preds = %6, %5
%12 = phi i32 [ 1, %5 ], [ %10, %6 ]
%13 = sext i32 %12 to i64
ret i64 %13
}

LLVM IR (-O2):
define i64 @isign(i64 %0) {
%2 = icmp ne i64 %0, 0
%3 = sext i1 %2 to i64
%4 = icmp slt i64 %0, 1
%5 = select i1 %4, i64 %3, i64 1
ret i64 %5
}
/* Variables and functions */
int safe_div_func_uint8_t_u_u(int, int);
int int81(int x) { return safe_div_func_uint8_t_u_u(1, 8 & x); }


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

x86 assembly (clang, -O2):
<int81>:
mov    %edi,%esi
and    $0x8,%esi
mov    $0x1,%edi
jmp    1030 <safe_div_func_uint8_t_u_u@plt>

LLVM IR (-O0):
define i32 @int81(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 8, %3
%5 = call i32 @safe_div_func_uint8_t_u_u(i32 1, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @int81(i32 %0) {
%2 = and i32 %0, 8
%3 = tail call i32 @safe_div_func_uint8_t_u_u(i32 1, i32 %2)
ret i32 %3
}
/* Variables and functions */
void print_dlink();
void print_dlink_stack() { return print_dlink(); }


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

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

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

LLVM IR (-O2):
define void @print_dlink_stack() {
tail call void (...) @print_dlink()
ret void
}