xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ isPrime007(int);
int /*<<< orphan*/ printf(char *, int);
int problem007() {
  int i = 0;
  int count = 0;
  while (count <= 10001) {
    i++;
    if (isPrime007(i)) {
      count++;
    }
  }
  printf("%d\n", i);
  return 0;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2711,-0x8(%rbp)
jg     116c <problem007+0x4c>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <isPrime007@plt>
cmp    $0x0,%rax
je     1167 <problem007+0x47>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <problem007+0x16>
mov    -0x4(%rbp),%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    %ebx,%edi
call   1040 <isPrime007@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
cmp    $0x2712,%ebp
jb     1130 <problem007+0x10>
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @problem007() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %8, %1 ]
%3 = phi i32 [ 0, %0 ], [ %4, %1 ]
%4 = add nuw nsw i32 %3, 1
%5 = tail call i64 @isPrime007(i32 %4)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = add nuw nsw i32 %2, %7
%9 = icmp ult i32 %8, 10002
br i1 %9, label %1, label %10
10: ; preds = %1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
void Host_UnLockAudioBuffer(void) {}


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

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

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

LLVM IR (-O2):
define void @Host_UnLockAudioBuffer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FOURCC(float, char, char, char);
int /*<<< orphan*/ NodeUnRegisterClass(int /*<<< orphan*/);
void FLAC_Done() { NodeUnRegisterClass(FOURCC('F', 'L', 'A', 'C')); }


x86 assembly (clang, -O0):
<FLAC_Done>:
push   %rbp
mov    %rsp,%rbp
movss  0xed4(%rip),%xmm0
mov    $0x4c,%edi
mov    $0x41,%esi
mov    $0x43,%edx
call   1030 <FOURCC@plt>
mov    %eax,%edi
call   1040 <NodeUnRegisterClass@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FLAC_Done>:
push   %rax
movss  0xed7(%rip),%xmm0
mov    $0x4c,%edi
mov    $0x41,%esi
mov    $0x43,%edx
call   1030 <FOURCC@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <NodeUnRegisterClass@plt>

LLVM IR (-O0):
define void @FLAC_Done() {
%1 = call i32 @FOURCC(float 7.000000e+01, i8 signext 76, i8 signext 65, i8 signext 67)
%2 = call i32 @NodeUnRegisterClass(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FLAC_Done() {
%1 = tail call i32 @FOURCC(float 7.000000e+01, i8 signext 76, i8 signext 65, i8 signext 67)
%2 = tail call i32 @NodeUnRegisterClass(i32 %1)
ret void
}
int mkdir(__attribute__((unused)) const char *path) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @mkdir(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ Pop();
int /*<<< orphan*/ Push(int);
int CmdEQ(void) {
  Push(Pop() == Pop());
  return 0;
}


x86 assembly (clang, -O0):
<CmdEQ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <Pop@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <Push@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CmdEQ>:
push   %rbx
xor    %eax,%eax
call   1030 <Pop@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <Pop@plt>
xor    %edi,%edi
cmp    %rax,%rbx
sete   %dil
call   1040 <Push@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @CmdEQ() {
%1 = call i64 (...) @Pop()
%2 = call i64 (...) @Pop()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
%5 = call i32 @Push(i32 %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @CmdEQ() {
%1 = tail call i64 (...) @Pop()
%2 = tail call i64 (...) @Pop()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
%5 = tail call i32 @Push(i32 %4)
ret i32 0
}
int conn_execute() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @conn_execute() {
ret i32 0
}
unsigned int preComputedHashBitset(const void *data) {
  const unsigned int *bitset = data;
  return bitset[1];
}


x86 assembly (clang, -O0):
<preComputedHashBitset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<preComputedHashBitset>:
mov    0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @preComputedHashBitset(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @preComputedHashBitset(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void saluda() { printf("Hola\n"); }


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"Hola\00"
define void @saluda() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long rand();
long int random() { return rand(); }


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

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

LLVM IR (-O0):
define i64 @random() {
%1 = call i64 (...) @rand()
ret i64 %1
}

LLVM IR (-O2):
define i64 @random() {
%1 = tail call i64 (...) @rand()
ret i64 %1
}
/* Variables and functions */
int ENOSYS;
int errno;
int unlinkat(const int dirfd, const char *const pathname, const int flags) {
  (void)dirfd, (void)pathname, (void)flags;
  return errno = ENOSYS, -1;
}


x86 assembly (clang, -O0):
<unlinkat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlinkat>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @unlinkat(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = load i32, i32* @ENOSYS
store i32 %10, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @unlinkat(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  fprintf(stdout, "Pirolf is \n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [12 x i8] c"Pirolf is \0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [12 x i8] c"Pirolf is \0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _ptrc_glClearColor(float, float, float, float);
__attribute__((visibility("default"))) void
emu_glClearColor(float red, float green, float blue, float alpha) {
  _ptrc_glClearColor(red, green, blue, alpha);
}


x86 assembly (clang, -O0):
<emu_glClearColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1030 <_ptrc_glClearColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emu_glClearColor>:
jmp    1030 <_ptrc_glClearColor@plt>

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

LLVM IR (-O2):
define void @emu_glClearColor(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @_ptrc_glClearColor(float %0, float %1, float %2, float %3)
ret void
}
int AMCTiming_DebugStdout(const struct AMCTimingTool *tmTool) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.AMCTimingTool = type opaque
define i32 @AMCTiming_DebugStdout(%struct.AMCTimingTool* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ gf_add(int /*<<< orphan*/, int /*<<< orphan*/);
uint8_t gf_sub(uint8_t a, uint8_t b) { return gf_add(a, b); }


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

x86 assembly (clang, -O2):
<gf_sub>:
jmp    1030 <gf_add@plt>

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

LLVM IR (-O2):
define i32 @gf_sub(i32 %0, i32 %1) {
%3 = tail call i32 @gf_add(i32 %0, i32 %1)
ret i32 %3
}
void gp_init_console() {}


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

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

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

LLVM IR (-O2):
define void @gp_init_console() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ logs_close_sigsafe();
int /*<<< orphan*/ tor_raw_abort_();
void tor_abort_(void) {
  logs_close_sigsafe();
  tor_raw_abort_();
}


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

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

LLVM IR (-O0):
define void @tor_abort_() {
%1 = call i32 (...) @logs_close_sigsafe()
%2 = call i32 (...) @tor_raw_abort_()
ret void
}

LLVM IR (-O2):
define void @tor_abort_() {
%1 = tail call i32 (...) @logs_close_sigsafe()
%2 = tail call i32 (...) @tor_raw_abort_()
ret void
}
/* Variables and functions */
float **parseFloats(char *);
int main() {
  float **baiguise = parseFloats("myfile.txt");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"myfile.txt\00"
define i32 @main() {
%1 = tail call float** @parseFloats(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ int_equal(int *, int *);
void test_int_equal(void) {
  int a = 4;
  int b = 8;
  int c = 4;
  assert(int_equal(&a, &c) != 0);
  assert(int_equal(&a, &b) == 0);
}


x86 assembly (clang, -O0):
<test_int_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x4,-0x4(%rbp)
movl   $0x8,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
lea    -0x4(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <int_equal@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <int_equal@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_int_equal>:
push   %rbx
sub    $0x10,%rsp
movl   $0x4,0xc(%rsp)
movl   $0x8,0x8(%rsp)
movl   $0x4,0x4(%rsp)
lea    0xc(%rsp),%rbx
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <int_equal@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1030 <assert@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <int_equal@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1030 <assert@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @test_int_equal() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 4, i32* %1
store i32 8, i32* %2
store i32 4, i32* %3
%4 = call i64 @int_equal(i32* %1, i32* %3)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i64 @int_equal(i32* %1, i32* %2)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
ret void
}

LLVM IR (-O2):
define void @test_int_equal() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
store i32 4, i32* %1
%5 = bitcast i32* %2 to i8*
store i32 8, i32* %2
%6 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%7 = call i64 @int_equal(i32* %1, i32* %3)
%8 = icmp ne i64 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i64 @int_equal(i32* %1, i32* %2)
%12 = icmp eq i64 %11, 0
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret void
}
int slen(char *str) {
  int i = 0;
  while (str[i])
    i++;
  return i;
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @RTAssertMsg2AddV() {
ret void
}
/* Variables and functions */
bool nrf52_errata_73(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_73() {
ret i32 0
}
/* Variables and functions */
unsigned int __gnu_h2f_internal(unsigned short, int /*<<< orphan*/);
unsigned int __gnu_h2f_alternative(unsigned short a) {
  return __gnu_h2f_internal(a, 0);
}


x86 assembly (clang, -O0):
<__gnu_h2f_alternative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
xor    %esi,%esi
movzwl -0x2(%rbp),%edi
call   1030 <__gnu_h2f_internal@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__gnu_h2f_alternative(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @__gnu_h2f_internal(i16 zeroext %3, i32 0)
ret i32 %4
}

LLVM IR (-O2):
define i32 @__gnu_h2f_alternative(i16 zeroext %0) {
%2 = tail call i32 @__gnu_h2f_internal(i16 zeroext %0, i32 0)
ret i32 %2
}
void *key_dup(void *privdata, const void *key) {
  int len = strlen(key);
  char *copy = malloc(len + 1);
  memcpy(copy, key, len);
  copy[len] = '\0';
  return copy;
}


x86 assembly (clang, -O0):
<key_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_dup>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %rax,%r15
add    $0x1,%eax
movslq %eax,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
movslq %r15d,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @key_dup(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = call i64 @strlen(i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = add nsw i32 %10, 1
%12 = sext i32 %11 to i64
%13 = call i8* @malloc(i64 %12)
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = load i8*, i8** %4
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = load i8*, i8** %6
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
store i8 0, i8* %21
%22 = load i8*, i8** %6
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @key_dup(i8* nocapture readnone %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = shl i64 %3, 32
%5 = add i64 %4, 4294967296
%6 = ashr exact i64 %5, 32
%7 = tail call i8* @malloc(i64 %6)
%8 = ashr exact i64 %4, 32
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %7, i8* align 1 %1, i64 %8, i1 false)
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8 0, i8* %9
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ normal_syntax(char *);
void blockquote(char *p) { normal_syntax(p); }


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

x86 assembly (clang, -O2):
<blockquote>:
jmp    1030 <normal_syntax@plt>

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

LLVM IR (-O2):
define void @blockquote(i8* %0) {
%2 = tail call i32 @normal_syntax(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double);
int main(int argc, char **argv) {
  printf("Int for float: %f, Float for float: %f\n", 1.0, 1.0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xedb(%rip),%rdi
movsd  0xecb(%rip),%xmm1
movaps %xmm1,%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"Int for float: %f, Float for float: %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 1.000000e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"Int for float: %f, Float for float: %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 1.000000e+00)
ret i32 0
}
double deg2rad(double degrees) {
  double radval;
  radval = degrees * 3.1415927 / 180.0;
  return (radval);
}


x86 assembly (clang, -O0):
<deg2rad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xef7(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xee2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg2rad>:
mulsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @deg2rad(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 0x400921FB5A7ED197
%6 = fdiv double %5, 1.800000e+02
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @deg2rad(double %0) {
%2 = fmul double %0, 0x400921FB5A7ED197
%3 = fdiv double %2, 1.800000e+02
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ system(char *);
int main() {
  puts("Calling the system:");
  system("ls");
  puts("All done!");
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [20 x i8] c"Calling the system:\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [10 x i8] c"All done!\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Calling the system:\00"
@.str.1 = [3 x i8] c"ls\00"
@.str.2 = [10 x i8] c"All done!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int factorial(int);
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int n = 10;
  printf("%d! = %d\n", n, factorial(n));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1030 <factorial@plt>
lea    0xece(%rip),%rdi
mov    $0xa,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d! = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @factorial(i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 10, i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ log_fatal(char const *, char *);
void check_and_log_file_error(FILE *file, const char *name) {
  if (ferror(file)) {
    log_fatal(name, "unable to write to file");
  }
}


x86 assembly (clang, -O0):
<check_and_log_file_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     1153 <check_and_log_file_error+0x33>
mov    -0x10(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <log_fatal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_and_log_file_error>:
push   %rbx
mov    %rsi,%rbx
call   1030 <ferror@plt>
test   %rax,%rax
je     113e <check_and_log_file_error+0x1e>
lea    0xecb(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <log_fatal@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"unable to write to file\00"
define void @check_and_log_file_error(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i64 @ferror(i32* %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i32 @log_fatal(i8* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"unable to write to file\00"
define void @check_and_log_file_error(i32* nocapture %0, i8* %1) {
%3 = tail call i64 @ferror(i32* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @log_fatal(i8* %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret void
}
void foo() { int bar = 0; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Variables and functions */
int dr_get_max_workers_by_env(char *);
int dr_nanox_max_workers() { return dr_get_max_workers_by_env("NX_PES"); }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"NX_PES\00"
define i32 @dr_nanox_max_workers() {
%1 = tail call i32 @dr_get_max_workers_by_env(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
scalar_t__ apparentsun(double, int /*<<< orphan*/);
double npitopi(scalar_t__);
double f_solarangle(double jd, double angle) {
  return npitopi(apparentsun(jd, 0) - angle);
}


x86 assembly (clang, -O0):
<f_solarangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %edi,%edi
call   1030 <apparentsun@plt>
cvtsi2sd %rax,%xmm0
subsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <npitopi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_solarangle>:
push   %rax
movsd  %xmm1,(%rsp)
xor    %edi,%edi
call   1030 <apparentsun@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
subsd  (%rsp),%xmm0
cvttsd2si %xmm0,%rdi
pop    %rax
jmp    1040 <npitopi@plt>

LLVM IR (-O0):
define double @f_solarangle(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call i64 @apparentsun(double %5, i32 0)
%7 = sitofp i64 %6 to double
%8 = load double, double* %4
%9 = fsub double %7, %8
%10 = fptosi double %9 to i64
%11 = call double @npitopi(i64 %10)
ret double %11
}

LLVM IR (-O2):
define double @f_solarangle(double %0, double %1) {
%3 = tail call i64 @apparentsun(double %0, i32 0)
%4 = sitofp i64 %3 to double
%5 = fsub double %4, %1
%6 = fptosi double %5 to i64
%7 = tail call double @npitopi(i64 %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int isWikiUrl(char url[]) {
  if (strstr(url, "/wiki/") != NULL) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<isWikiUrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <isWikiUrl+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <isWikiUrl+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isWikiUrl>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"/wiki/\00"
define i32 @isWikiUrl(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct rtas_event {
  int dummy;
};
struct rtas_dump_scn {
  int dummy;
};

/* Variables and functions */
scalar_t__ get_re_scn(struct rtas_event *, int);
struct rtas_dump_scn *rtas_get_dump_scn(struct rtas_event *re) {
  return (struct rtas_dump_scn *)get_re_scn(re, 13);
}


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

x86 assembly (clang, -O2):
<rtas_get_dump_scn>:
mov    $0xd,%esi
jmp    1030 <get_re_scn@plt>

LLVM IR (-O0):
%struct.rtas_dump_scn = type { i32 }
%struct.rtas_event = type { i32 }
define %struct.rtas_dump_scn* @rtas_get_dump_scn(%struct.rtas_event* %0) {
%2 = alloca %struct.rtas_event*
store %struct.rtas_event* %0, %struct.rtas_event** %2
%3 = load %struct.rtas_event*, %struct.rtas_event** %2
%4 = call i64 @get_re_scn(%struct.rtas_event* %3, i32 13)
%5 = inttoptr i64 %4 to %struct.rtas_dump_scn*
ret %struct.rtas_dump_scn* %5
}

LLVM IR (-O2):
%struct.rtas_dump_scn = type { i32 }
%struct.rtas_event = type { i32 }
define %struct.rtas_dump_scn* @rtas_get_dump_scn(%struct.rtas_event* %0) {
%2 = tail call i64 @get_re_scn(%struct.rtas_event* %0, i32 13)
%3 = inttoptr i64 %2 to %struct.rtas_dump_scn*
ret %struct.rtas_dump_scn* %3
}
/* Variables and functions */
int /*<<< orphan*/ interact_with_port(char *, char, int /*<<< orphan*/);
int tare_balance(char *balance_address) {
  interact_with_port(balance_address, 'T', 0);
  return 0;
}


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

x86 assembly (clang, -O2):
<tare_balance>:
push   %rax
mov    $0x54,%esi
xor    %edx,%edx
call   1030 <interact_with_port@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @tare_balance(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @interact_with_port(i8* %3, i8 signext 84, i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @tare_balance(i8* %0) {
%2 = tail call i32 @interact_with_port(i8* %0, i8 signext 84, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr,
          "usage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1"
          " file2\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [74 x i8] c"usage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [74 x i8] c"usage: sdiff [-abdilstW] [-I regexp] [-o outfile] [-w width] file1 file2\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void mumps_usleep(int *time) { usleep((unsigned int)*time); }


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

x86 assembly (clang, -O2):
<mumps_usleep>:
mov    (%rdi),%edi
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @mumps_usleep(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SetupMemoryPaging(int, int, unsigned char *);
void Setup64kRamExpansion(unsigned char *pExpansionMemoryAddress) {
  int i;
  for (i = 0; i < 64; i++) {
    SetupMemoryPaging(i, (i & 0x07), pExpansionMemoryAddress);
  }
}


x86 assembly (clang, -O0):
<Setup64kRamExpansion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jge    114d <Setup64kRamExpansion+0x3d>
mov    -0xc(%rbp),%edi
mov    -0xc(%rbp),%esi
and    $0x7,%esi
mov    -0x8(%rbp),%rdx
call   1030 <SetupMemoryPaging@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <Setup64kRamExpansion+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Setup64kRamExpansion>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,%esi
and    $0x7,%esi
mov    %ebp,%edi
mov    %rbx,%rdx
call   1030 <SetupMemoryPaging@plt>
add    $0x1,%ebp
cmp    $0x40,%ebp
jne    1120 <Setup64kRamExpansion+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @Setup64kRamExpansion(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 64
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %3
%10 = and i32 %9, 7
%11 = load i8*, i8** %2
%12 = call i32 @SetupMemoryPaging(i32 %8, i32 %10, i8* %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @Setup64kRamExpansion(i8* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ 0, %1 ], [ %6, %2 ]
%4 = and i32 %3, 7
%5 = tail call i32 @SetupMemoryPaging(i32 %3, i32 %4, i8* %0)
%6 = add nuw nsw i32 %3, 1
%7 = icmp eq i32 %6, 64
br i1 %7, label %8, label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
scalar_t__ memcmp(unsigned char const *, void *, size_t);
void vcmp(const unsigned char *compare, void *ptr, size_t s, bool *is_valid) {
  if (is_valid && memcmp(compare, ptr, s) != 0)
    is_valid = false;
}


x86 assembly (clang, -O0):
<vcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1156 <vcmp+0x46>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
je     1156 <vcmp+0x46>
movq   $0x0,-0x20(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vcmp>:
test   %rcx,%rcx
je     111a <vcmp+0xa>
jmp    1030 <memcmp@plt>
ret

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

LLVM IR (-O2):
define void @vcmp(i8* %0, i8* %1, i64 %2, i32* readnone %3) {
%5 = icmp eq i32* %3, null
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = tail call i64 @memcmp(i8* %0, i8* %1, i64 %2)
br label %8
8: ; preds = %6, %4
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 "
         "REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Σαβ 07 "
         "Σεπ 2013 04:39:52 μμ EEST BUILD=DEBUG CPU= USING_UMP=1 "
         "USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c "
         "platform/meson_platform/mali_fix.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [474 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\CE\A3\CE\B1\CE\B2 07 \CE\A3\CE\B5\CF\80 2013 04:39:52 \CE\BC\CE\BC EEST BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([474 x i8], [474 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [474 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=\CE\A3\CE\B1\CE\B2 07 \CE\A3\CE\B5\CF\80 2013 04:39:52 \CE\BC\CE\BC EEST BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=4 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([474 x i8], [474 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__35__IO__selectIOFunc();
void HplMsp430Usart1P__UCLK__selectIOFunc(void) {
  HplMsp430GeneralIOP__35__IO__selectIOFunc();
}


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

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

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

LLVM IR (-O2):
define void @HplMsp430Usart1P__UCLK__selectIOFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__35__IO__selectIOFunc()
ret void
}
int main() {
  volatile int i;
  for (i = 0; i < 1000000; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0xf4240,%eax
jge    1133 <main+0x33>
jmp    1125 <main+0x25>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0xf423f,%eax
jg     1130 <main+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0xf4240,%eax
jl     1120 <main+0x20>
mov    -0x4(%rsp),%eax
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = load volatile i32, i32* %1
%4 = icmp slt i32 %3, 1000000
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = load volatile i32, i32* %1
%7 = add nsw i32 %6, 1
store volatile i32 %7, i32* %1
%8 = load volatile i32, i32* %1
%9 = icmp slt i32 %8, 1000000
br i1 %9, label %5, label %10
10: ; preds = %5, %0
%11 = load volatile i32, i32* %1
ret i32 %11
}