xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *, char const *, char const *);
void on_method(void *p, const char *method, const char *uri) {
  printf("%p:method=\"%s\" uri=\"%s\"\n", p, method, uri);
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"%p:method=\22%s\22 uri=\22%s\22\0A\00"
define void @on_method(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"%p:method=\22%s\22 uri=\22%s\22\0A\00"
define void @on_method(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(int argc, char *argv[]) {
  printf("Usage: %s [-h <help>] [-i <heap id>] [-s <size in bytes>]\n",
         argv[0]);
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"Usage: %s [-h <help>] [-i <heap id>] [-s <size in bytes>]\0A\00"
define void @print_usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 0
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Usage: %s [-h <help>] [-i <heap id>] [-s <size in bytes>]\0A\00"
define void @print_usage(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  printf("Please enter an integer: ");
  scanf("%d", &num);
  int isOdd = (num % 2 != 0);
  printf("Is the number %d odd? -> %d\n", num, isOdd);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    %esi,%edx
and    $0x1,%edx
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Please enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"Is the number %d odd? -> %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = srem i32 %6, 2
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"Please enter an integer: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"Is the number %d odd? -> %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = and i32 %5, 1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegReadByte(int /*<<< orphan*/, int);
uint8_t wiznetGetSocketMaximumSegmentSize(uint8_t socket) {
  return wiznetRegReadByte(socket, (0x0000 + 0x0012));
}


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

x86 assembly (clang, -O2):
<wiznetGetSocketMaximumSegmentSize>:
mov    $0x12,%esi
jmp    1030 <wiznetRegReadByte@plt>

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

LLVM IR (-O2):
define i32 @wiznetGetSocketMaximumSegmentSize(i32 %0) {
%2 = tail call i32 @wiznetRegReadByte(i32 %0, i32 18)
ret i32 %2
}
void RTTestIFailureDetails(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @XkbAllocGeomOverlayRows() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool is_idle(const uint32_t *const rx_data) {
  if (*rx_data == 0x7a89c197)
    return true;
  return false;
}


x86 assembly (clang, -O0):
<is_idle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x7a89c197,(%rax)
jne    1124 <is_idle+0x24>
movl   $0x1,-0x4(%rbp)
jmp    112b <is_idle+0x2b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_idle>:
xor    %eax,%eax
cmpl   $0x7a89c197,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_idle(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 2055848343
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):
define i32 @is_idle(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 2055848343
%4 = zext i1 %3 to i32
ret i32 %4
}
double MT_rand() { return (double)(randInt()) * (1.0 / 4294967296.0); }


x86 assembly (clang, -O0):
<MT_rand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <randInt@plt>
cvtsi2sd %eax,%xmm0
movsd  0xed9(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MT_rand>:
push   %rax
xor    %eax,%eax
call   1030 <randInt@plt>
cvtsi2sd %eax,%xmm0
mulsd  0xedc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @MT_rand() {
%1 = call i32 (...) @randInt()
%2 = sitofp i32 %1 to double
%3 = fmul double %2, 0x3DF0000000000000
ret double %3
}

LLVM IR (-O2):
define double @MT_rand() {
%1 = tail call i32 (...) @randInt()
%2 = sitofp i32 %1 to double
%3 = fmul double %2, 0x3DF0000000000000
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ test_actionscript_comment_entities();
int /*<<< orphan*/ test_actionscript_comments();
void all_actionscript_tests() {
  test_actionscript_comments();
  test_actionscript_comment_entities();
}


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

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

LLVM IR (-O0):
define void @all_actionscript_tests() {
%1 = call i32 (...) @test_actionscript_comments()
%2 = call i32 (...) @test_actionscript_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_actionscript_tests() {
%1 = tail call i32 (...) @test_actionscript_comments()
%2 = tail call i32 (...) @test_actionscript_comment_entities()
ret void
}
int osal_snd_sync_msg(int type, void *addr) { return -1; }


x86 assembly (clang, -O0):
<osal_snd_sync_msg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @osal_snd_sync_msg(i32 %0, i8* nocapture readnone %1) {
ret i32 -1
}
_Complex long double test_conjl(_Complex long double x) {
  return __builtin_conjl(x);
}


x86 assembly (clang, -O0):
<test_conjl>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   (%rax)
fldt   0x10(%rax)
fchs
fxch   %st(1)
fstpt  -0x20(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_conjl>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fchs
fxch   %st(1)
ret

LLVM IR (-O0):
define { x86_fp80, x86_fp80 } @test_conjl({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = alloca { x86_fp80, x86_fp80 }
%3 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%4 = load x86_fp80, x86_fp80* %3
%5 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 1
%6 = load x86_fp80, x86_fp80* %5
%7 = fneg x86_fp80 %6
%8 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 0
%9 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2, i32 0, i32 1
store x86_fp80 %4, x86_fp80* %8
store x86_fp80 %7, x86_fp80* %9
%10 = load { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %2
ret { x86_fp80, x86_fp80 } %10
}

LLVM IR (-O2):
define { x86_fp80, x86_fp80 } @test_conjl({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
%4 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 1
%5 = load x86_fp80, x86_fp80* %4
%6 = fneg x86_fp80 %5
%7 = insertvalue { x86_fp80, x86_fp80 } poison, x86_fp80 %3, 0
%8 = insertvalue { x86_fp80, x86_fp80 } %7, x86_fp80 %6, 1
ret { x86_fp80, x86_fp80 } %8
}
void ff_hevc_put_hevc_bi_qpel_v24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_v24_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *);
void test3() {
  int x[100] = {0};
  foo(x);
}


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x190,%rsp
lea    -0x190(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1030 <memset@plt>
lea    -0x190(%rbp),%rdi
call   1040 <foo@plt>
add    $0x190,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
push   %rbx
sub    $0x190,%rsp
mov    %rsp,%rbx
mov    $0x190,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rdi
call   1040 <foo@plt>
add    $0x190,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @test3() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%4 = call i32 @foo(i32* %3)
ret void
}

LLVM IR (-O2):
define void @test3() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
%3 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%4 = call i32 @foo(i32* %3)
ret void
}
/* Variables and functions */
int strlen(char const *);
int cluster_job_id_valid_(const char *str) {
  if (strlen(str) < 2 || strlen(str) > 32) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<cluster_job_id_valid_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     1140 <cluster_job_id_valid_+0x30>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x20,%eax
jle    114c <cluster_job_id_valid_+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    1153 <cluster_job_id_valid_+0x43>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cluster_job_id_valid_>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
jl     1134 <cluster_job_id_valid_+0x24>
mov    %rbx,%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x21,%ecx
setl   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @cluster_job_id_valid_(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp slt i32 %2, 2
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = icmp slt i32 %5, 33
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
__attribute__((no, noclone)) int foo(int i) {
  if (i < 4)
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
jge    112a <foo+0x1a>
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x3,%edi
jle    1118 <foo+0x8>
xor    %eax,%eax
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 4
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
ret i32 0
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @abort()
unreachable
4: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ iothub_client_sample_amqp_websockets_run();
int main(void) { iothub_client_sample_amqp_websockets_run(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @iothub_client_sample_amqp_websockets_run()
ret i32 0
}
unsigned int i1hash(void *key) { return ((unsigned int *)key)[0]; }


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

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

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

LLVM IR (-O2):
define i32 @i1hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  double tv_usec;
  scalar_t__ tv_sec;
};
struct rusage {
  TYPE_1__ ru_utime;
};

/* Variables and functions */
int /*<<< orphan*/ getrusage(int /*<<< orphan*/, struct rusage *);
double timer(void) {
  struct rusage r;
  getrusage(0, &r);
  return (double)(r.ru_utime.tv_sec + r.ru_utime.tv_usec / (double)1000000);
}


x86 assembly (clang, -O0):
<timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
lea    -0x10(%rbp),%rsi
call   1030 <getrusage@plt>
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xeca(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
xor    %edi,%edi
call   1030 <getrusage@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm0
divsd  0xecb(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { double, i64 }
define double @timer() {
%1 = alloca %struct.rusage
%2 = call i32 @getrusage(i32 0, %struct.rusage* %1)
%3 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i32 0, i32 0
%4 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %3, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i32 0, i32 0
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
%9 = load double, double* %8
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %6, %10
ret double %11
}

LLVM IR (-O2):
%struct.rusage = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { double, i64 }
define double @timer() {
%1 = alloca %struct.rusage
%2 = bitcast %struct.rusage* %1 to i8*
%3 = call i32 @getrusage(i32 0, %struct.rusage* %1)
%4 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0, i32 0
%8 = load double, double* %7
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %9, %6
ret double %10
}
void __attribute__((always_)) final_before__(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ tl880_write_regbits(struct tl880_dev *, int, int, int, int);
void tl880_enable_aux(struct tl880_dev *tl880dev) {
  tl880_write_regbits(tl880dev, 0x10000, 4, 4, 1);
}


x86 assembly (clang, -O0):
<tl880_enable_aux>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x10000,%esi
mov    $0x4,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1030 <tl880_write_regbits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tl880_enable_aux>:
mov    $0x10000,%esi
mov    $0x4,%edx
mov    $0x4,%ecx
mov    $0x1,%r8d
jmp    1030 <tl880_write_regbits@plt>

LLVM IR (-O0):
%struct.tl880_dev = type { i32 }
define void @tl880_enable_aux(%struct.tl880_dev* %0) {
%2 = alloca %struct.tl880_dev*
store %struct.tl880_dev* %0, %struct.tl880_dev** %2
%3 = load %struct.tl880_dev*, %struct.tl880_dev** %2
%4 = call i32 @tl880_write_regbits(%struct.tl880_dev* %3, i32 65536, i32 4, i32 4, i32 1)
ret void
}

LLVM IR (-O2):
%struct.tl880_dev = type { i32 }
define void @tl880_enable_aux(%struct.tl880_dev* %0) {
%2 = tail call i32 @tl880_write_regbits(%struct.tl880_dev* %0, i32 65536, i32 4, i32 4, i32 1)
ret void
}
int string_numeric_p(str)
char *str;
{
  while (*str) {
    if (*str < '0' || *str > '9')
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<string_numeric_p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <string_numeric_p+0x46>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1135 <string_numeric_p+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1141 <string_numeric_p+0x41>
movl   $0x0,-0x4(%rbp)
jmp    114d <string_numeric_p+0x4d>
jmp    1108 <string_numeric_p+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_numeric_p>:
mov    (%rdi),%cl
lea    -0x3a(%rcx),%eax
cmp    $0xf6,%al
jae    1120 <string_numeric_p+0x20>
xor    %eax,%eax
test   %cl,%cl
sete   %al
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
jmp    1120 <string_numeric_p+0x20>

LLVM IR (-O0):
define i32 @string_numeric_p(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
br label %4
4: ; preds = %19, %1
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %4
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp slt i32 %11, 48
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp sgt i32 %16, 57
br i1 %17, label %18, label %19
18: ; preds = %13, %8
store i32 0, i32* %2
br label %21
19: ; preds = %13
br label %4
20: ; preds = %4
store i32 1, i32* %2
br label %21
21: ; preds = %20, %18
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @string_numeric_p(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -58
%4 = icmp ult i8 %3, -10
br i1 %4, label %6, label %5
5: ; preds = %1, %5
br label %5
6: ; preds = %1
%7 = icmp eq i8 %2, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ local_mcu_Pin0_set__E();
void pollen_parts_Led0_on__E() {
  { local_mcu_Pin0_set__E(); }
}


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

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

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

LLVM IR (-O2):
define void @pollen_parts_Led0_on__E() {
%1 = tail call i32 (...) @local_mcu_Pin0_set__E()
ret void
}
/* Variables and functions */
int foo(int);
int main(int argc, char *argv[]) { return foo(10); }


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    $0xa,%edi
call   1030 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @foo(i32 10)
ret i32 %3
}
/* Variables and functions */
int end_tag(int, int);
int drv_end_tag_recover(int p) { return end_tag(p, 1); }


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

x86 assembly (clang, -O2):
<drv_end_tag_recover>:
mov    $0x1,%esi
jmp    1030 <end_tag@plt>

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

LLVM IR (-O2):
define i32 @drv_end_tag_recover(i32 %0) {
%2 = tail call i32 @end_tag(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ putchar(char);
void cat2() {
  for (;;) {
    char c1 = getchar();
    char c2 = getchar();
    putchar(c1);
    putchar(c2);
  }
}


x86 assembly (clang, -O0):
<cat2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
movsbl -0x2(%rbp),%edi
call   1030 <putchar@plt>
jmp    1128 <cat2+0x8>

x86 assembly (clang, -O2):
<cat2>:
push   %rbp
push   %rbx
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebp
movsbl %bl,%edi
call   1030 <putchar@plt>
movsbl %bpl,%edi
call   1030 <putchar@plt>
jmp    1130 <cat2+0x10>

LLVM IR (-O0):
define void @cat2() {
%1 = alloca i8
%2 = alloca i8
br label %3
3: ; preds = %3, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %1
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
%6 = load i8, i8* %1
%7 = call i32 @putchar(i8 signext %6)
%8 = load i8, i8* %2
%9 = call i32 @putchar(i8 signext %8)
br label %3
}

LLVM IR (-O2):
define void @cat2() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = tail call signext i8 (...) @getchar()
%4 = tail call i32 @putchar(i8 signext %2)
%5 = tail call i32 @putchar(i8 signext %3)
br label %1
}
/* Variables and functions */
void *mem_malloc(size_t);
void *vis5d_mem_malloc(size_t size) { return mem_malloc(size); }


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

x86 assembly (clang, -O2):
<vis5d_mem_malloc>:
jmp    1030 <mem_malloc@plt>

LLVM IR (-O0):
define i8* @vis5d_mem_malloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @mem_malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define i8* @vis5d_mem_malloc(i64 %0) {
%2 = tail call i8* @mem_malloc(i64 %0)
ret i8* %2
}
char *my_strcpy_a(char dest[], char src[]) {
  int i = 0;
  while (src[i] != '\0') {
    dest[i] = src[i];
    i++;
  }
  dest[i] = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<my_strcpy_a>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <my_strcpy_a+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <my_strcpy_a+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strcpy_a>:
mov    %rdi,%rax
mov    (%rsi),%cl
test   %cl,%cl
je     1127 <my_strcpy_a+0x27>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
mov    %cl,(%rax,%rdx,1)
movzbl 0x1(%rsi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <my_strcpy_a+0x10>
mov    %edx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret
xor    %ecx,%ecx
movb   $0x0,(%rax,%rcx,1)
ret

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

LLVM IR (-O2):
define i8* @my_strcpy_a(i8* returned writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5
%14 = and i64 %9, 4294967295
br label %15
15: ; preds = %13, %2
%16 = phi i64 [ 0, %2 ], [ %14, %13 ]
%17 = getelementptr inbounds i8, i8* %0, i64 %16
store i8 0, i8* %17
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ bench_madd();
void start() { bench_madd(); }


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

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

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

LLVM IR (-O2):
define void @start() {
%1 = tail call i32 (...) @bench_madd()
ret void
}
/* Type definitions */
struct sigstate {
  int dummy;
};
typedef int /*<<< orphan*/ siginfo_t;

/* Variables and functions */
int sigstate_receive(struct sigstate *data, siginfo_t *info) {
  (void)data;
  (void)info;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sigstate = type { i32 }
define i32 @sigstate_receive(%struct.sigstate* %0, i32* %1) {
%3 = alloca %struct.sigstate*
%4 = alloca i32*
store %struct.sigstate* %0, %struct.sigstate** %3
store i32* %1, i32** %4
%5 = load %struct.sigstate*, %struct.sigstate** %3
%6 = load i32*, i32** %4
ret i32 0
}

LLVM IR (-O2):
%struct.sigstate = type { i32 }
define i32 @sigstate_receive(%struct.sigstate* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
unsigned reverse(unsigned int v) {
  v = ((v >> 1) & 0x55555555) | ((v & 0x55555555) << 1);
  v = ((v >> 2) & 0x33333333) | ((v & 0x33333333) << 2);
  v = ((v >> 4) & 0x0F0F0F0F) | ((v & 0x0F0F0F0F) << 4);
  v = ((v >> 8) & 0x00FF00FF) | ((v & 0x00FF00FF) << 8);
  v = (v >> 16) | (v << 16);
  return (v);
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
and    $0x55555555,%eax
mov    -0x4(%rbp),%ecx
and    $0x55555555,%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
and    $0x33333333,%ecx
shl    $0x2,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
and    $0xf0f0f0f,%eax
mov    -0x4(%rbp),%ecx
and    $0xf0f0f0f,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff00ff,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00ff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
mov    -0x4(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
bswap  %edi
mov    %edi,%eax
and    $0xf0f0f0f,%eax
shl    $0x4,%eax
shr    $0x4,%edi
and    $0xf0f0f0f,%edi
or     %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
lea    (%rdi,%rax,4),%eax
mov    %eax,%ecx
and    $0x55555555,%ecx
shr    %eax
and    $0x55555555,%eax
lea    (%rax,%rcx,2),%eax
ret

LLVM IR (-O0):
define i32 @reverse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = and i32 %4, 1431655765
%6 = load i32, i32* %2
%7 = and i32 %6, 1431655765
%8 = shl i32 %7, 1
%9 = or i32 %5, %8
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = lshr i32 %10, 2
%12 = and i32 %11, 858993459
%13 = load i32, i32* %2
%14 = and i32 %13, 858993459
%15 = shl i32 %14, 2
%16 = or i32 %12, %15
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 4
%19 = and i32 %18, 252645135
%20 = load i32, i32* %2
%21 = and i32 %20, 252645135
%22 = shl i32 %21, 4
%23 = or i32 %19, %22
store i32 %23, i32* %2
%24 = load i32, i32* %2
%25 = lshr i32 %24, 8
%26 = and i32 %25, 16711935
%27 = load i32, i32* %2
%28 = and i32 %27, 16711935
%29 = shl i32 %28, 8
%30 = or i32 %26, %29
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = lshr i32 %31, 16
%33 = load i32, i32* %2
%34 = shl i32 %33, 16
%35 = or i32 %32, %34
store i32 %35, i32* %2
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @reverse(i32 %0) {
%2 = tail call i32 @llvm.bitreverse.i32(i32 %0)
ret i32 %2
}
void _infix_operator_div_u16_u16(unsigned short lhs, unsigned short rhs,
                                 unsigned short *__rval_1) {
  *__rval_1 = lhs / rhs;
}


x86 assembly (clang, -O0):
<_infix_operator_div_u16_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
mov    %rdx,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_infix_operator_div_u16_u16>:
mov    %rdx,%rcx
mov    %edi,%eax
xor    %edx,%edx
div    %si
mov    %ax,(%rcx)
ret

LLVM IR (-O0):
define void @_infix_operator_div_u16_u16(i16 zeroext %0, i16 zeroext %1, i16* %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16*
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16* %2, i16** %6
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = load i16, i16* %5
%10 = zext i16 %9 to i32
%11 = sdiv i32 %8, %10
%12 = trunc i32 %11 to i16
%13 = load i16*, i16** %6
store i16 %12, i16* %13
ret void
}

LLVM IR (-O2):
define void @_infix_operator_div_u16_u16(i16 zeroext %0, i16 zeroext %1, i16* nocapture writeonly %2) {
%4 = udiv i16 %0, %1
store i16 %4, i16* %2
ret void
}
int f3(unsigned char c) {
  if (c == 0x22)
    return 1;
  if (c == 0x20)
    return 1;
  if (c < 0x20)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x22,%eax
jne    1123 <f3+0x23>
movl   $0x1,-0x4(%rbp)
jmp    115c <f3+0x5c>
movzbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    113c <f3+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115c <f3+0x5c>
movzbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jge    1155 <f3+0x55>
movl   $0x1,-0x4(%rbp)
jmp    115c <f3+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    $0x1,%eax
mov    %edi,%ecx
or     $0x2,%cl
cmp    $0x22,%cl
jne    1110 <f3+0x10>
ret
xor    %eax,%eax
cmp    $0x20,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @f3(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp eq i32 %5, 34
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %19
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 32
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %19
13: ; preds = %8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = icmp slt i32 %15, 32
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 1, i32* %2
br label %19
18: ; preds = %13
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @f3(i8 zeroext %0) {
switch i8 %0, label %2 [
i8 34, label %5
i8 32, label %5
]
2: ; preds = %1
%3 = icmp ult i8 %0, 32
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %2, %1, %1
%6 = phi i32 [ 1, %1 ], [ 1, %1 ], [ %4, %2 ]
ret i32 %6
}
signed long long f6(signed long long v_a, signed long long v_b) {
  signed long long v_anda = v_a & 1023;
  signed long long v_shlb = v_b << 10;
  signed long long v_or = v_anda | v_shlb;
  return v_or;
}


x86 assembly (clang, -O0):
<f6>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
and    $0x3ff,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
shl    $0xa,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f6>:
and    $0x3ff,%edi
shl    $0xa,%rsi
lea    (%rsi,%rdi,1),%rax
ret

LLVM IR (-O0):
define i64 @f6(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%8 = load i64, i64* %3
%9 = and i64 %8, 1023
store i64 %9, i64* %5
%10 = load i64, i64* %4
%11 = shl i64 %10, 10
store i64 %11, i64* %6
%12 = load i64, i64* %5
%13 = load i64, i64* %6
%14 = or i64 %12, %13
store i64 %14, i64* %7
%15 = load i64, i64* %7
ret i64 %15
}

LLVM IR (-O2):
define i64 @f6(i64 %0, i64 %1) {
%3 = and i64 %0, 1023
%4 = shl i64 %1, 10
%5 = or i64 %4, %3
ret i64 %5
}
void of_i2c_register_devices(struct i2c_adapter *adap) { return; }


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

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

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

LLVM IR (-O2):
%struct.i2c_adapter = type opaque
define void @of_i2c_register_devices(%struct.i2c_adapter* nocapture %0) {
ret void
}
/* Variables and functions */
int test_xcrypt_ctr(char *);
int test_encrypt_ctr(void) { return test_xcrypt_ctr("encrypt"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"encrypt\00"
define i32 @test_encrypt_ctr() {
%1 = tail call i32 @test_xcrypt_ctr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ picosat_init();
int /*<<< orphan*/ picosat_set_global_default_phase(int /*<<< orphan*/);
void btor_picosat_init(void) {
  picosat_init();
  picosat_set_global_default_phase(0);
}


x86 assembly (clang, -O0):
<btor_picosat_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <picosat_init@plt>
xor    %edi,%edi
call   1040 <picosat_set_global_default_phase@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<btor_picosat_init>:
push   %rax
xor    %eax,%eax
call   1030 <picosat_init@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <picosat_set_global_default_phase@plt>

LLVM IR (-O0):
define void @btor_picosat_init() {
%1 = call i32 (...) @picosat_init()
%2 = call i32 @picosat_set_global_default_phase(i32 0)
ret void
}

LLVM IR (-O2):
define void @btor_picosat_init() {
%1 = tail call i32 (...) @picosat_init()
%2 = tail call i32 @picosat_set_global_default_phase(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int puts(const char *str) {
  while (*str) {
    putchar(*str++);
  }
  return 0;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111c <puts+0xc>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[]) {
  int x;
  printf("\nEnter an integer value: ");
  scanf("%d", &x);
  assert(x != 0);
  printf("You entered %d.\n", x);
  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)
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x14(%rbp),%esi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
xor    %edi,%edi
cmpl   $0x0,0x4(%rsp)
setne  %dil
call   1040 <assert@plt>
mov    0x4(%rsp),%esi
lea    0xeb2(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"\0AEnter an integer value: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"You entered %d.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %6)
%9 = load i32, i32* %6
%10 = icmp ne i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i32, i32* %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"\0AEnter an integer value: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [17 x i8] c"You entered %d.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ swap(int *, int *);
int main() {
  int i = 1, j = 2;
  swap(&i, &j);
  printf("%d %d\n", i, j);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x2,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1040 <swap@plt>
mov    0x4(%rsp),%esi
mov    (%rsp),%edx
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 2, i32* %2
%5 = call i32 @swap(i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
char *mystrcat(char *s1, char *s2) {
  strcat(s1, s2);
  return s1;
}


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

x86 assembly (clang, -O2):
<mystrcat>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @mystrcat(i8* returned %0, i8* %1) {
%3 = tail call i32 @strcat(i8* %0, i8* %1)
ret i8* %0
}