xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ SIGINT;
int /*<<< orphan*/ exit(scalar_t__);
int /*<<< orphan*/ tty_restore();
void handle_sigint(int sig __attribute__((unused))) {
  tty_restore();
  exit((128 + SIGINT));
}


x86 assembly (clang, -O0):
<handle_sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <tty_restore@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%rdi
add    $0x80,%rdi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<handle_sigint>:
push   %rax
xor    %eax,%eax
call   1030 <tty_restore@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdi
sub    $0xffffffffffffff80,%rdi
call   1040 <exit@plt>

LLVM IR (-O0):
@SIGINT = global i64 0
define void @handle_sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @tty_restore()
%4 = load i64, i64* @SIGINT
%5 = add nsw i64 128, %4
%6 = call i32 @exit(i64 %5)
unreachable
}

LLVM IR (-O2):
@SIGINT = global i64 0
define void @handle_sigint(i32 %0) {
%2 = tail call i32 (...) @tty_restore()
%3 = load i64, i64* @SIGINT
%4 = add nsw i64 %3, 128
%5 = tail call i32 @exit(i64 %4)
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int place;
};
typedef TYPE_1__ XCirculateRequestEvent;

/* Variables and functions */
void set_XCirculateRequestEvent_place(void *_p, int _v) {
  ((XCirculateRequestEvent *)_p)->place = (int)_v;
}


x86 assembly (clang, -O0):
<set_XCirculateRequestEvent_place>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XCirculateRequestEvent_place>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XCirculateRequestEvent_place(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XCirculateRequestEvent_place(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int main(void) {
  ;
  ;
  ;
  ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
unsigned int f17(unsigned int x, int y) {
  return (x >> (8 * 4 - y)) ^ (x << y);
}


x86 assembly (clang, -O0):
<f17>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f17>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
shr    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f17(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 = sub nsw i32 32, %6
%8 = lshr i32 %5, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = shl i32 %9, %10
%12 = xor i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @f17(i32 %0, i32 %1) {
%3 = sub nsw i32 32, %1
%4 = lshr i32 %0, %3
%5 = shl i32 %0, %1
%6 = xor i32 %4, %5
ret i32 %6
}
/* Type definitions */
struct buffer_head {
  int dummy;
};
struct btree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ IS_ERR(struct buffer_head *);
int /*<<< orphan*/ bnode_buffer_init(struct buffer_head *);
int /*<<< orphan*/ mark_buffer_unify_atomic(struct buffer_head *);
struct buffer_head *new_block(struct btree *);
struct buffer_head *new_node(struct btree *btree) {
  struct buffer_head *buffer = new_block(btree);
  if (!IS_ERR(buffer)) {
    bnode_buffer_init(buffer);
    mark_buffer_unify_atomic(buffer);
  }
  return buffer;
}


x86 assembly (clang, -O0):
<new_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <new_block@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <IS_ERR@plt>
cmp    $0x0,%eax
jne    117d <new_node+0x3d>
mov    -0x10(%rbp),%rdi
call   1050 <bnode_buffer_init@plt>
mov    -0x10(%rbp),%rdi
call   1040 <mark_buffer_unify_atomic@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_node>:
push   %rbx
call   1030 <new_block@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <IS_ERR@plt>
test   %eax,%eax
jne    1165 <new_node+0x25>
mov    %rbx,%rdi
call   1050 <bnode_buffer_init@plt>
mov    %rbx,%rdi
call   1040 <mark_buffer_unify_atomic@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.buffer_head = type { i32 }
%struct.btree = type { i32 }
define %struct.buffer_head* @new_node(%struct.btree* %0) {
%2 = alloca %struct.btree*
%3 = alloca %struct.buffer_head*
store %struct.btree* %0, %struct.btree** %2
%4 = load %struct.btree*, %struct.btree** %2
%5 = call %struct.buffer_head* @new_block(%struct.btree* %4)
store %struct.buffer_head* %5, %struct.buffer_head** %3
%6 = load %struct.buffer_head*, %struct.buffer_head** %3
%7 = call i32 @IS_ERR(%struct.buffer_head* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %1
%10 = load %struct.buffer_head*, %struct.buffer_head** %3
%11 = call i32 @bnode_buffer_init(%struct.buffer_head* %10)
%12 = load %struct.buffer_head*, %struct.buffer_head** %3
%13 = call i32 @mark_buffer_unify_atomic(%struct.buffer_head* %12)
br label %14
14: ; preds = %9, %1
%15 = load %struct.buffer_head*, %struct.buffer_head** %3
ret %struct.buffer_head* %15
}

LLVM IR (-O2):
%struct.buffer_head = type { i32 }
%struct.btree = type { i32 }
define %struct.buffer_head* @new_node(%struct.btree* %0) {
%2 = tail call %struct.buffer_head* @new_block(%struct.btree* %0)
%3 = tail call i32 @IS_ERR(%struct.buffer_head* %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = tail call i32 @bnode_buffer_init(%struct.buffer_head* %2)
%7 = tail call i32 @mark_buffer_unify_atomic(%struct.buffer_head* %2)
br label %8
8: ; preds = %5, %1
ret %struct.buffer_head* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test3_internal() { printf("test2: target called - failure\n"); }


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

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

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

LLVM IR (-O2):
@str = [31 x i8] c"test2: target called - failure\00"
define void @test3_internal() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main(void) {
  int area_code, first_half, second_half;
  printf("Enter phone number [(xxx) xxx-xxxx]: ");
  scanf("(%d) %d-%d", &area_code, &first_half, &second_half);
  printf("You entered %d.%d.%d\n", area_code, first_half, second_half);
  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    0xee2(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
mov    0x14(%rsp),%esi
mov    0x10(%rsp),%edx
mov    0xc(%rsp),%ecx
lea    0xed1(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Enter phone number [(xxx) xxx-xxxx]: \00"
@.str.1 = [11 x i8] c"(%d) %d-%d\00"
@.str.2 = [22 x i8] c"You entered %d.%d.%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %3, i32* %4)
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Enter phone number [(xxx) xxx-xxxx]: \00"
@.str.1 = [11 x i8] c"(%d) %d-%d\00"
@.str.2 = [22 x i8] c"You entered %d.%d.%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32* %1, i32* %2, i32* %3)
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %10, i32 %11)
ret i32 0
}
void s3c_gpiolib_track(struct samsung_gpio_chip *chip) {}


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

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

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

LLVM IR (-O2):
%struct.samsung_gpio_chip = type opaque
define void @s3c_gpiolib_track(%struct.samsung_gpio_chip* nocapture %0) {
ret void
}
void _cgo_wait_runtime_init_done() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ dlock_lock(int /*<<< orphan*/ *, int /*<<< orphan*/);
int o_pthread_spin_lock(int /*<<< orphan*/ *);
int /*<<< orphan*/ pthread_self();
int pthread_spin_lock(pthread_spinlock_t *spin) {
  dlock_lock(spin, pthread_self());
  return o_pthread_spin_lock(spin);
}


x86 assembly (clang, -O0):
<pthread_spin_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <dlock_lock@plt>
mov    -0x8(%rbp),%rdi
call   1030 <o_pthread_spin_lock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_spin_lock>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <dlock_lock@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <o_pthread_spin_lock@plt>

LLVM IR (-O0):
define i32 @pthread_spin_lock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (...) @pthread_self()
%5 = call i32 @dlock_lock(i32* %3, i32 %4)
%6 = load i32*, i32** %2
%7 = call i32 @o_pthread_spin_lock(i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @pthread_spin_lock(i32* %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @dlock_lock(i32* %0, i32 %2)
%4 = tail call i32 @o_pthread_spin_lock(i32* %0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void terminate_standalone_mode() {
  printf("\n");
  exit(EXIT_SUCCESS);
}


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

x86 assembly (clang, -O2):
<terminate_standalone_mode>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
define void @terminate_standalone_mode() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @EXIT_SUCCESS
%3 = call i32 @exit(i32 %2)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @terminate_standalone_mode() {
%1 = tail call i32 @putchar(i32 10)
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @exit(i32 %2)
unreachable
}
/* Variables and functions */
int execute(int, char **);
int main(int argc, char **argv) { return execute(argc, argv); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <execute@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <execute@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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @execute(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @execute(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *getByInPostOrder(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ preOrder(void *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strlen(char *);
int main() {
  char *inorder = "DEBAC";
  char *postorder = "DABEC";
  void *root = getByInPostOrder(inorder, postorder, strlen(inorder));
  preOrder(root);
  printf("\n");
  free(root);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xe95(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
call   1060 <getByInPostOrder@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1070 <preOrder@plt>
lea    0xe5b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea8(%rip),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    0xe9f(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1060 <getByInPostOrder@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1070 <preOrder@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"DEBAC\00"
@.str.1 = [6 x i8] c"DABEC\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @getByInPostOrder(i8* %5, i8* %6, i32 %8)
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i32 @preOrder(i8* %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%13 = load i8*, i8** %4
%14 = call i32 @free(i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"DEBAC\00"
@.str.1 = [6 x i8] c"DABEC\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @getByInPostOrder(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %1)
%3 = tail call i32 @preOrder(i8* %2)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @free(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
test_sprint() {
  char s[64] = {0};
  sprintf(s, "%s", "ni shi sha bi ye bao cuo a ");
  printf("%s\n", s);
}


x86 assembly (clang, -O0):
<test_sprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
lea    -0x50(%rbp),%rdi
lea    0xead(%rip),%rsi
lea    0xea9(%rip),%rdx
call   1050 <sprintf@plt>
lea    -0x50(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_sprint>:
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movups %xmm0,0x2c(%rsp)
movups %xmm0,0x1c(%rsp)
movl   $0x0,0x3c(%rsp)
movups 0xed0(%rip),%xmm0
movaps %xmm0,(%rsp)
movups 0xed1(%rip),%xmm0
movups %xmm0,0xc(%rsp)
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [28 x i8] c"ni shi sha bi ye bao cuo a \00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @test_sprint() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = bitcast [64 x i8]* %2 to i8*
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str.1 = [28 x i8] c"ni shi sha bi ye bao cuo a \00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @test_sprint() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 28
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 undef
}
/* Variables and functions */
double ranpoiss(double);
double ranpoiss1(double);
double ranpoissx(double xm) {
  double x, t, tc, s, y;
  int k;
  if (xm > 1.0) {
    for (;;) {
      x = ranpoiss(xm);
      if (x > 0.5)
        return x;
    }
  }
  return ranpoiss1(xm);
}


x86 assembly (clang, -O0):
<ranpoissx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1183 <ranpoissx+0x63>
jmp    1149 <ranpoissx+0x29>
movsd  -0x10(%rbp),%xmm0
call   1030 <ranpoiss@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xea3(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    117e <ranpoissx+0x5e>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1192 <ranpoissx+0x72>
jmp    1149 <ranpoissx+0x29>
movsd  -0x10(%rbp),%xmm0
call   1040 <ranpoiss1@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ranpoissx>:
push   %rax
movapd %xmm0,%xmm1
ucomisd 0xed3(%rip),%xmm0
jbe    115a <ranpoissx+0x3a>
movsd  %xmm1,(%rsp)
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movapd %xmm1,%xmm0
call   1030 <ranpoiss@plt>
movsd  (%rsp),%xmm1
ucomisd 0xeb2(%rip),%xmm0
jbe    1140 <ranpoissx+0x20>
pop    %rax
ret
movapd %xmm1,%xmm0
pop    %rax
jmp    1040 <ranpoiss1@plt>

LLVM IR (-O0):
define double @ranpoissx(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca i32
store double %0, double* %3
%10 = load double, double* %3
%11 = fcmp ogt double %10, 1.000000e+00
br i1 %11, label %12, label %21
12: ; preds = %1
br label %13
13: ; preds = %20, %12
%14 = load double, double* %3
%15 = call double @ranpoiss(double %14)
store double %15, double* %4
%16 = load double, double* %4
%17 = fcmp ogt double %16, 5.000000e-01
br i1 %17, label %18, label %20
18: ; preds = %13
%19 = load double, double* %4
store double %19, double* %2
br label %24
20: ; preds = %13
br label %13
21: ; preds = %1
%22 = load double, double* %3
%23 = call double @ranpoiss1(double %22)
store double %23, double* %2
br label %24
24: ; preds = %21, %18
%25 = load double, double* %2
ret double %25
}

LLVM IR (-O2):
define double @ranpoissx(double %0) {
%2 = fcmp ogt double %0, 1.000000e+00
br i1 %2, label %3, label %6
3: ; preds = %1, %3
%4 = tail call double @ranpoiss(double %0)
%5 = fcmp ogt double %4, 5.000000e-01
br i1 %5, label %8, label %3
6: ; preds = %1
%7 = tail call double @ranpoiss1(double %0)
br label %8
8: ; preds = %3, %6
%9 = phi double [ %7, %6 ], [ %4, %3 ]
ret double %9
}
/* Variables and functions */
scalar_t__ ft_strcmp(char const *, char const *);
int ft_strequ(char const *s1, char const *s2) {
  return (ft_strcmp(s1, s2) == 0);
}


x86 assembly (clang, -O0):
<ft_strequ>:
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 <ft_strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ft_strequ(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 i64 @ft_strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @ft_strequ(i8* %0, i8* %1) {
%3 = tail call i64 @ft_strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int main(int argc, const char *argv[]) {
  double a[10];
  a[0] = 0;
  a[1] = 0.1;
  a[2] = 0.2;
  a[3] = 0.3;
  a[4] = 0.4;
  a[5] = 5.0;
  a[6] = 5.1;
  a[7] = 5.2;
  a[8] = 8;
  a[9] = 9;
  double b = a[0];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xf1e(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xf09(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xedf(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xeca(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeb5(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xea0(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe76(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [10 x double]
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 0
store double 0.000000e+00, double* %8
%9 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 1
store double 1.000000e-01, double* %9
%10 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 2
store double 2.000000e-01, double* %10
%11 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 3
store double 3.000000e-01, double* %11
%12 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 4
store double 4.000000e-01, double* %12
%13 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 5
store double 5.000000e+00, double* %13
%14 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 6
store double 5.100000e+00, double* %14
%15 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 7
store double 5.200000e+00, double* %15
%16 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 8
store double 8.000000e+00, double* %16
%17 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 9
store double 9.000000e+00, double* %17
%18 = getelementptr inbounds [10 x double], [10 x double]* %6, i64 0, i64 0
%19 = load double, double* %18
store double %19, double* %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
int __VERIFIER_nondet_int();
int main() {
  int x = __VERIFIER_nondet_int();
  if (x > 0 && x < 3 && x < 2)
    __VERIFIER_assert(x == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1168 <main+0x48>
cmpl   $0x3,-0x8(%rbp)
jge    1168 <main+0x48>
cmpl   $0x2,-0x8(%rbp)
jge    1168 <main+0x48>
cmpl   $0x1,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
cmp    $0x1,%eax
jne    1137 <main+0x17>
mov    $0x1,%edi
call   1040 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__VERIFIER_assert(i32 1)
br label %5
5: ; preds = %3, %0
ret i32 0
}
int test_anyEvenBit(int x) {
  int i;
  for (i = 0; i < 32; i += 2)
    if (x & (1 << i))
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<test_anyEvenBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1151 <test_anyEvenBit+0x51>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     113e <test_anyEvenBit+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1158 <test_anyEvenBit+0x58>
jmp    1143 <test_anyEvenBit+0x43>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <test_anyEvenBit+0xe>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anyEvenBit>:
xor    %eax,%eax
test   $0x55555555,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @test_anyEvenBit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %16, %1
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 32
br i1 %7, label %8, label %19
8: ; preds = %5
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = and i32 %9, %11
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %8
store i32 1, i32* %2
br label %20
15: ; preds = %8
br label %16
16: ; preds = %15
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 2
store i32 %18, i32* %4
br label %5
19: ; preds = %5
store i32 0, i32* %2
br label %20
20: ; preds = %19, %14
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @test_anyEvenBit(i32 %0) {
%2 = and i32 %0, 1431655765
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *not_null_or_die(int /*<<< orphan*/);
int /*<<< orphan*/ strdup(char const *);
char *strdup_or_die(char const *string) {
  return not_null_or_die(strdup(string));
}


x86 assembly (clang, -O0):
<strdup_or_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %eax,%edi
call   1030 <not_null_or_die@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup_or_die>:
push   %rax
call   1040 <strdup@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <not_null_or_die@plt>

LLVM IR (-O0):
define i8* @strdup_or_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strdup(i8* %3)
%5 = call i8* @not_null_or_die(i32 %4)
ret i8* %5
}

LLVM IR (-O2):
define i8* @strdup_or_die(i8* %0) {
%2 = tail call i32 @strdup(i8* %0)
%3 = tail call i8* @not_null_or_die(i32 %2)
ret i8* %3
}
void ISRBusFault(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @ISRBusFault() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
double RAND_MAX;
double rand();
double next_rand(double min, double max) {
  return (min + (rand() / (RAND_MAX / (max - min))));
}


x86 assembly (clang, -O0):
<next_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mov    0x2ea6(%rip),%rax
movsd  (%rax),%xmm2
movsd  -0x10(%rbp),%xmm3
subsd  -0x8(%rbp),%xmm3
divsd  %xmm3,%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_rand>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2eba(%rip),%rax
movsd  (%rax),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
subsd  %xmm2,%xmm3
divsd  %xmm3,%xmm1
divsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @next_rand(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 double (...) @rand()
%7 = load double, double* @RAND_MAX
%8 = load double, double* %4
%9 = load double, double* %3
%10 = fsub double %8, %9
%11 = fdiv double %7, %10
%12 = fdiv double %6, %11
%13 = fadd double %5, %12
ret double %13
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @next_rand(double %0, double %1) {
%3 = tail call double (...) @rand()
%4 = load double, double* @RAND_MAX
%5 = fsub double %1, %0
%6 = fdiv double %4, %5
%7 = fdiv double %3, %6
%8 = fadd double %7, %0
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *curl_easy_init() {
  printf("Fake init\n");
  return 1;
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Fake init\0A\00"
define i8* @curl_easy_init() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
@str = [10 x i8] c"Fake init\00"
define i8* @curl_easy_init() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret i8* inttoptr (i64 1 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  if (4 > 3 && 4 < 5) {
    printf("4 eh maior do que 3 e menor do que 5");
  }
  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 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [37 x i8] c"4 eh maior do que 3 e menor do que 5\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"4 eh maior do que 3 e menor do que 5\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned int _packh4(unsigned int src1, unsigned int src2) {
  unsigned v3 = (src1 >> 24) & 0xff;
  unsigned v2 = (src1 >> 8) & 0xff;
  unsigned v1 = (src2 >> 24) & 0xff;
  unsigned v0 = (src2 >> 8) & 0xff;
  unsigned v = (v3 << 24) | (v2 << 16) | (v1 << 8) | v0;
  return v;
}


x86 assembly (clang, -O0):
<_packh4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x18,%eax
mov    -0x10(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x14(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_packh4>:
mov    %esi,%ecx
mov    %edi,%eax
and    $0xff000000,%eax
movzbl %ch,%edx
shl    $0x8,%edi
and    $0xff0000,%edi
or     %edi,%eax
shr    $0x10,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
or     %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @_packh4(i32 %0, i32 %1) {
%3 = and i32 %0, -16777216
%4 = lshr i32 %1, 8
%5 = and i32 %4, 255
%6 = shl i32 %0, 8
%7 = and i32 %6, 16711680
%8 = or i32 %7, %3
%9 = lshr i32 %1, 16
%10 = and i32 %9, 65280
%11 = or i32 %8, %10
%12 = or i32 %11, %5
ret i32 %12
}
/* Variables and functions */
size_t str_hash(const char *str) {
  size_t hash = 5381;
  while (*str)
    hash = ((hash << 5) + hash) + *str++;
  return hash;
}


x86 assembly (clang, -O0):
<str_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1148 <str_hash+0x48>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbq (%rcx),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <str_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <str_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <str_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @str_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul i64 %6, 33
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i64
%11 = add i64 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
void DH_get_ex_new_index(void) {}


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

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

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

LLVM IR (-O2):
define void @DH_get_ex_new_index() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fpTest(double, double);
main() {
  fpTest(35.7, 45.0);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  0xec9(%rip),%xmm1
call   1030 <fpTest@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1030 <fpTest@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @fpTest(double 3.570000e+01, double 4.500000e+01)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fpTest(double 3.570000e+01, double 4.500000e+01)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xed() {
  Assert_real((isgraph(237) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isgraph.c",
              1190, ("isgraph should be 0 for 0xed"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0xed>:
push   %rax
mov    $0xed,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4a6,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xed\00"
define void @t_isgraph_0xed() {
%1 = call i64 @isgraph(i32 237)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1190, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xed\00"
define void @t_isgraph_0xed() {
%1 = tail call i64 @isgraph(i32 237)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1190, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ read_8u(int /*<<< orphan*/ const *);
int8_t read_8s(const uint8_t *src) { return (int8_t)read_8u(src); }


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

x86 assembly (clang, -O2):
<read_8s>:
jmp    1030 <read_8u@plt>

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

LLVM IR (-O2):
define i32 @read_8s(i32* %0) {
%2 = tail call i32 @read_8u(i32* %0)
ret i32 %2
}
/* Variables and functions */
int slk_restore();
int wrap_slk_restore(void) { return slk_restore(); }


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

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

LLVM IR (-O0):
define i32 @wrap_slk_restore() {
%1 = call i32 (...) @slk_restore()
ret i32 %1
}

LLVM IR (-O2):
define i32 @wrap_slk_restore() {
%1 = tail call i32 (...) @slk_restore()
ret i32 %1
}
int debugger(struct pt_regs *regs) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define i32 @debugger(%struct.pt_regs* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct ac_buffer {
  int dummy;
};

/* Variables and functions */
int _buffer_write_array(struct ac_buffer *, char *, int, int);
int buffer_write_char_array(struct ac_buffer *buffer, char *value, int size) {
  return _buffer_write_array(buffer, value, size, sizeof(char));
}


x86 assembly (clang, -O0):
<buffer_write_char_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%ecx
call   1030 <_buffer_write_array@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_write_char_array>:
mov    $0x1,%ecx
jmp    1030 <_buffer_write_array@plt>

LLVM IR (-O0):
%struct.ac_buffer = type { i32 }
define i32 @buffer_write_char_array(%struct.ac_buffer* %0, i8* %1, i32 %2) {
%4 = alloca %struct.ac_buffer*
%5 = alloca i8*
%6 = alloca i32
store %struct.ac_buffer* %0, %struct.ac_buffer** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load %struct.ac_buffer*, %struct.ac_buffer** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @_buffer_write_array(%struct.ac_buffer* %7, i8* %8, i32 %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
%struct.ac_buffer = type { i32 }
define i32 @buffer_write_char_array(%struct.ac_buffer* %0, i8* %1, i32 %2) {
%4 = tail call i32 @_buffer_write_array(%struct.ac_buffer* %0, i8* %1, i32 %2, i32 1)
ret i32 %4
}
int rotateleft(int i, int pos) {
  int NO_BITS = sizeof(int) * 8;
  int temp = 0;
  temp = i;
  temp = temp >> (NO_BITS - pos);
  i = i << pos;
  i = i | temp;
  return i;
}


x86 assembly (clang, -O0):
<rotateleft>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
or     -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateleft>:
mov    %esi,%ecx
neg    %cl
mov    %edi,%eax
sar    %cl,%eax
mov    %esi,%ecx
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotateleft(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 32, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %3
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = ashr i32 %8, %11
store i32 %12, i32* %6
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = shl i32 %13, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = load i32, i32* %6
%18 = or i32 %16, %17
store i32 %18, i32* %3
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @rotateleft(i32 %0, i32 %1) {
%3 = sub nsw i32 32, %1
%4 = ashr i32 %0, %3
%5 = shl i32 %0, %1
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int lace_builtin_elastic_pthread_main(unsigned int, char **,
                                      int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *);
int lace_main_elastic_pthread(unsigned argc, char **argv) {
  return lace_builtin_elastic_pthread_main(argc, argv, NULL, NULL);
}


x86 assembly (clang, -O0):
<lace_main_elastic_pthread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <lace_builtin_elastic_pthread_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lace_main_elastic_pthread>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <lace_builtin_elastic_pthread_main@plt>

LLVM IR (-O0):
define i32 @lace_main_elastic_pthread(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 = load i8**, i8*** %4
%7 = call i32 @lace_builtin_elastic_pthread_main(i32 %5, i8** %6, i32* null, i32* null)
ret i32 %7
}

LLVM IR (-O2):
define i32 @lace_main_elastic_pthread(i32 %0, i8** %1) {
%3 = tail call i32 @lace_builtin_elastic_pthread_main(i32 %0, i8** %1, i32* null, i32* null)
ret i32 %3
}
void irq_disable(void) { asm volatile("cli" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @irq_disable() {
tail call void asm sideeffect "cli", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void MultiMon_Construct() {}


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

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

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

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