xunge/DecIR huggingface dataset:
/* Type definitions */
struct graph {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct graph *);
void release_graph(struct graph *p_graph) {
  if (!p_graph) {
    return;
  }
  free(p_graph);
}


x86 assembly (clang, -O0):
<release_graph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <release_graph+0x1c>
jmp    1135 <release_graph+0x25>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.graph = type { i32 }
define void @release_graph(%struct.graph* %0) {
%2 = alloca %struct.graph*
store %struct.graph* %0, %struct.graph** %2
%3 = load %struct.graph*, %struct.graph** %2
%4 = icmp ne %struct.graph* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %9
6: ; preds = %1
%7 = load %struct.graph*, %struct.graph** %2
%8 = call i32 @free(%struct.graph* %7)
br label %9
9: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.graph = type { i32 }
define void @release_graph(%struct.graph* %0) {
%2 = icmp eq %struct.graph* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.graph* %0)
br label %5
5: ; preds = %1, %3
ret void
}
void rop3_125_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T ^ S;
  stk2 = ~stk2;
  stk1 = *D & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_125_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_125_1_0>:
xor    %esi,%edx
mov    (%rdi),%al
mov    %eax,%ecx
not    %cl
or     %dl,%cl
xor    %cl,%al
and    %sil,%al
xor    %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_125_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8, i8* %8
%16 = zext i8 %15 to i32
%17 = xor i32 %16, -1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %8
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = load i8, i8* %8
%23 = zext i8 %22 to i32
%24 = and i32 %21, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %7
%26 = load i8, i8* %7
%27 = zext i8 %26 to i32
%28 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
store i8 %43, i8* %44
ret void
}

LLVM IR (-O2):
define void @rop3_125_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %5, -1
%7 = or i8 %4, %6
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %5, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
void gtk_tree_model_get_value() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_get_value() {
ret void
}
unsigned short check_ushort() { return 0; }


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

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

LLVM IR (-O0):
define zeroext i16 @check_ushort() {
ret i16 0
}

LLVM IR (-O2):
define zeroext i16 @check_ushort() {
ret i16 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Good luck with the Economics! \nLove you Victoria <3\n\n\n");
  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 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [55 x i8] c"Good luck with the Economics! \0ALove you Victoria <3\0A\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [54 x i8] c"Good luck with the Economics! \0ALove you Victoria <3\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int get16(unsigned char *w) { return (*w << 8) | *(w + 1); }


x86 assembly (clang, -O0):
<get16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get16>:
movzwl (%rdi),%eax
shl    $0x10,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @get16(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = shl i32 %5, 8
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = or i32 %6, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @get16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
void genhash_default_free_func(void *ptr) {}


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

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

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

LLVM IR (-O2):
define void @genhash_default_free_func(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct lexer {
  int dummy;
};
struct lemon {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ lemon_allocator_free(struct lemon *, struct lexer *);
void lexer_destroy(struct lemon *lemon, struct lexer *lexer) {
  lemon_allocator_free(lemon, lexer);
}


x86 assembly (clang, -O0):
<lexer_destroy>:
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 <lemon_allocator_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lexer_destroy>:
jmp    1030 <lemon_allocator_free@plt>

LLVM IR (-O0):
%struct.lemon = type { i32 }
%struct.lexer = type { i32 }
define void @lexer_destroy(%struct.lemon* %0, %struct.lexer* %1) {
%3 = alloca %struct.lemon*
%4 = alloca %struct.lexer*
store %struct.lemon* %0, %struct.lemon** %3
store %struct.lexer* %1, %struct.lexer** %4
%5 = load %struct.lemon*, %struct.lemon** %3
%6 = load %struct.lexer*, %struct.lexer** %4
%7 = call i32 @lemon_allocator_free(%struct.lemon* %5, %struct.lexer* %6)
ret void
}

LLVM IR (-O2):
%struct.lemon = type { i32 }
%struct.lexer = type { i32 }
define void @lexer_destroy(%struct.lemon* %0, %struct.lexer* %1) {
%3 = tail call i32 @lemon_allocator_free(%struct.lemon* %0, %struct.lexer* %1)
ret void
}
/* Variables and functions */
char *strncpy(char *, char const *, size_t);
char *htx_strncpy(char *dest, const char *src, size_t n) {
  return strncpy(dest, src, n);
}


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

x86 assembly (clang, -O2):
<htx_strncpy>:
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @htx_strncpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i8* @strncpy(i8* %7, i8* %8, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @htx_strncpy(i8* returned %0, i8* nocapture %1, i64 %2) {
%4 = tail call i8* @strncpy(i8* dereferenceable(1) %0, i8* %1, i64 %2)
ret i8* %0
}
char *printf_add_padding(char *digit, int width, char fill) {
  while (width > 0) {
    digit--;
    width--;
    *digit = fill;
  }
  return digit;
}


x86 assembly (clang, -O0):
<printf_add_padding>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    113d <printf_add_padding+0x3d>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xd(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    1110 <printf_add_padding+0x10>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_add_padding>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
jle    1131 <printf_add_padding+0x21>
lea    -0x1(%rsi),%eax
not    %rax
add    %rax,%rbx
mov    %esi,%eax
movzbl %dl,%esi
mov    %rbx,%rdi
mov    %rax,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @printf_add_padding(i8* writeonly %0, i32 %1, i8 signext %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = add nsw i32 %1, -1
%7 = zext i32 %6 to i64
%8 = xor i64 %7, -1
%9 = getelementptr i8, i8* %0, i64 %8
%10 = zext i32 %1 to i64
br label %11
11: ; preds = %5, %3
%12 = phi i8* [ %0, %3 ], [ %9, %5 ]
ret i8* %12
}
/* Variables and functions */
int /*<<< orphan*/ abort();
long long test_and_branch(int, int);
int main(int argc, char **argv) {
  long long ret = test_and_branch(64, 1);
  if (ret != 64)
    abort();
  ret = test_and_branch(7, 1);
  if (ret != -1)
    abort();
  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)
mov    $0x40,%edi
mov    $0x1,%esi
call   1030 <test_and_branch@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x40,-0x18(%rbp)
je     115b <main+0x3b>
mov    $0x0,%al
call   1040 <abort@plt>
mov    $0x7,%edi
mov    $0x1,%esi
call   1030 <test_and_branch@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0xffffffffffffffff,-0x18(%rbp)
je     1180 <main+0x60>
mov    $0x0,%al
call   1040 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x40,%edi
mov    $0x1,%esi
call   1030 <test_and_branch@plt>
cmp    $0x40,%rax
jne    114f <main+0x2f>
mov    $0x7,%edi
mov    $0x1,%esi
call   1030 <test_and_branch@plt>
cmp    $0xffffffffffffffff,%rax
jne    114f <main+0x2f>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1040 <abort@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @test_and_branch(i32 64, i32 1)
%4 = icmp eq i64 %3, 64
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
%8 = tail call i64 @test_and_branch(i32 7, i32 1)
%9 = icmp eq i64 %8, -1
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 (...) @abort()
unreachable
12: ; preds = %7
ret i32 0
}
/* Type definitions */
struct passwd {
  int dummy;
};

/* Variables and functions */
struct passwd *__real_getpwent();
int /*<<< orphan*/ taint_data(char *, struct passwd *);
struct passwd *__wrap_getpwent() {
  struct passwd *ret = __real_getpwent();
  taint_data("testcase", ret);
  return ret;
}


x86 assembly (clang, -O0):
<__wrap_getpwent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__real_getpwent@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <taint_data@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__wrap_getpwent>:
push   %rbx
xor    %eax,%eax
call   1040 <__real_getpwent@plt>
mov    %rax,%rbx
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <taint_data@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.passwd = type { i32 }
@.str = [9 x i8] c"testcase\00"
define %struct.passwd* @__wrap_getpwent() {
%1 = alloca %struct.passwd*
%2 = call %struct.passwd* (...) @__real_getpwent()
store %struct.passwd* %2, %struct.passwd** %1
%3 = load %struct.passwd*, %struct.passwd** %1
%4 = call i32 @taint_data(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.passwd* %3)
%5 = load %struct.passwd*, %struct.passwd** %1
ret %struct.passwd* %5
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@.str = [9 x i8] c"testcase\00"
define %struct.passwd* @__wrap_getpwent() {
%1 = tail call %struct.passwd* (...) @__real_getpwent()
%2 = tail call i32 @taint_data(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.passwd* %1)
ret %struct.passwd* %1
}
int errortype_worse(short a, short b) {
  if (a == 0)
    a = 255;
  if (b == 0)
    b = 255;
  return a < b;
}


x86 assembly (clang, -O0):
<errortype_worse>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    1125 <errortype_worse+0x25>
movw   $0xff,-0x2(%rbp)
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
jne    1138 <errortype_worse+0x38>
movw   $0xff,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<errortype_worse>:
test   %di,%di
mov    $0xff,%eax
cmove  %eax,%edi
test   %si,%si
cmove  %eax,%esi
xor    %eax,%eax
cmp    %si,%di
setl   %al
ret

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

LLVM IR (-O2):
define i32 @errortype_worse(i16 signext %0, i16 signext %1) {
%3 = icmp eq i16 %0, 0
%4 = select i1 %3, i16 255, i16 %0
%5 = icmp eq i16 %1, 0
%6 = select i1 %5, i16 255, i16 %1
%7 = icmp slt i16 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEareturn(int /*<<< orphan*/ *);
void code_areturn() { appendCODE(makeCODEareturn(NULL)); }


x86 assembly (clang, -O0):
<code_areturn>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <makeCODEareturn@plt>
mov    %eax,%edi
call   1040 <appendCODE@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_areturn>:
push   %rax
xor    %edi,%edi
call   1030 <makeCODEareturn@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <appendCODE@plt>

LLVM IR (-O0):
define void @code_areturn() {
%1 = call i32 @makeCODEareturn(i32* null)
%2 = call i32 @appendCODE(i32 %1)
ret void
}

LLVM IR (-O2):
define void @code_areturn() {
%1 = tail call i32 @makeCODEareturn(i32* null)
%2 = tail call i32 @appendCODE(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num, num2;
  printf("Lutfen okul numaranizi giriniz...\n");
  scanf("%d", &num);
  num2 = num % 100;
  printf("Sinifa giris siraniz: %d\n", num2);
  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    0xedf(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec1(%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    0xee5(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x51eb851f,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%esi
lea    0xe90(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Lutfen okul numaranizi giriniz...\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Sinifa giris siraniz: %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 ([35 x i8], [35 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, 100
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [26 x i8] c"Sinifa giris siraniz: %d\0A\00"
@str = [34 x i8] c"Lutfen okul numaranizi giriniz...\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 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 = srem i32 %5, 100
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scrputs(char *);
void csrshow(void) { scrputs("\033[?25h"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[?25h\00"
define void @csrshow() {
%1 = call i32 @scrputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[?25h\00"
define void @csrshow() {
%1 = tail call i32 @scrputs(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ failure(char *, int);
void putd(char *uri, int socketfd) {
  failure("405 PUT not implemented", socketfd);
}


x86 assembly (clang, -O0):
<putd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed7(%rip),%rdi
call   1030 <failure@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"405 PUT not implemented\00"
define void @putd(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 = call i32 @failure(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"405 PUT not implemented\00"
define void @putd(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @failure(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
double rand_norm();
int sample_uniform(bool occupied[4]) {
  int idx;
  do {
    idx = (int)(rand_norm() * 4.0);
  } while (occupied[idx]);
  return idx;
}


x86 assembly (clang, -O0):
<sample_uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand_norm@plt>
movsd  0xed5(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jne    111c <sample_uniform+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sample_uniform>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <rand_norm@plt>
mulsd  0xed1(%rip),%xmm0
cvttsd2si %xmm0,%eax
movslq %eax,%rcx
cmpl   $0x0,(%rbx,%rcx,4)
jne    1120 <sample_uniform+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sample_uniform(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
br label %4
4: ; preds = %8, %1
%5 = call double (...) @rand_norm()
%6 = fmul double %5, 4.000000e+00
%7 = fptosi double %6 to i32
store i32 %7, i32* %3
br label %8
8: ; preds = %4
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = icmp ne i32 %13, 0
br i1 %14, label %4, label %15
15: ; preds = %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
define i32 @sample_uniform(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call double (...) @rand_norm()
%4 = fmul double %3, 4.000000e+00
%5 = fptosi double %4 to i32
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %2
10: ; preds = %2
ret i32 %5
}
/* Variables and functions */
bool nrf53_errata_23(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_23() {
ret i32 0
}
/* Variables and functions */
int rbcfg_update(int /*<<< orphan*/);
int rbcfg_cmd_apply(int argc, const char *argv[]) { return rbcfg_update(0); }


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

x86 assembly (clang, -O2):
<rbcfg_cmd_apply>:
xor    %edi,%edi
jmp    1030 <rbcfg_update@plt>

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

LLVM IR (-O2):
define i32 @rbcfg_cmd_apply(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @rbcfg_update(i32 0)
ret i32 %3
}
int is_ftrace_nop(struct ftrace_insn *insn) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.ftrace_insn = type opaque
define i32 @is_ftrace_nop(%struct.ftrace_insn* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ printf(char *);
void cleanEnd(int soc) {
  close(soc);
  printf("Client down\n");
}


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

x86 assembly (clang, -O2):
<cleanEnd>:
push   %rax
call   1040 <close@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Client down\0A\00"
define void @cleanEnd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @close(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Client down\00"
define void @cleanEnd(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ register_con_hdr_function_list();
void con_hdr_init() { register_con_hdr_function_list(); }


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

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

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

LLVM IR (-O2):
define void @con_hdr_init() {
%1 = tail call i32 (...) @register_con_hdr_function_list()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int /*<<< orphan*/ snprintf(char *, int, char *, unsigned char const,
                            unsigned char const, unsigned char const,
                            unsigned char const);
void human_readable_IPv4(const unsigned char *orig_ip, char *ip) {
  bzero(ip, 24);
  snprintf(ip, 24, "%d.%d.%d.%d", orig_ip[0], orig_ip[1], orig_ip[2],
           orig_ip[3]);
}


x86 assembly (clang, -O0):
<human_readable_IPv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x18,%esi
call   1040 <bzero@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%r8b
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%r9b
mov    -0x8(%rbp),%rax
mov    $0x18,%esi
lea    0xe98(%rip),%rdx
movzbl %cl,%ecx
movzbl %r8b,%r8d
movzbl %r9b,%r9d
movzbl 0x3(%rax),%eax
mov    %eax,(%rsp)
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<human_readable_IPv4>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    $0x18,%esi
call   1040 <bzero@plt>
movzbl (%rbx),%ecx
movzbl 0x1(%rbx),%r8d
movzbl 0x2(%rbx),%r9d
movzbl 0x3(%rbx),%eax
mov    %eax,(%rsp)
lea    0xeae(%rip),%rdx
mov    %r14,%rdi
mov    $0x18,%esi
call   1030 <snprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @human_readable_IPv4(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @bzero(i8* %5, i32 24)
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = load i8, i8* %12
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 3
%19 = load i8, i8* %18
%20 = call i32 @snprintf(i8* %7, i32 24, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 zeroext %10, i8 zeroext %13, i8 zeroext %16, i8 zeroext %19)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d.%d.%d.%d\00"
define void @human_readable_IPv4(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @bzero(i8* %1, i32 24)
%4 = load i8, i8* %0
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %0, i64 3
%10 = load i8, i8* %9
%11 = tail call i32 @snprintf(i8* %1, i32 24, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8 zeroext %4, i8 zeroext %6, i8 zeroext %8, i8 zeroext %10)
ret void
}
int compare1(const void *p0, const void *p1) {
  unsigned u0 = *(const unsigned *)p0;
  unsigned u1 = *(const unsigned *)p1;
  int ret = 0;
  if (u0 < u1)
    ret = 1;
  if (u0 > u1)
    ret = -1;
  static unsigned comparisons;
  comparisons++;
  return ret;
}


x86 assembly (clang, -O0):
<compare1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    1138 <compare1+0x38>
movl   $0x1,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jbe    114b <compare1+0x4b>
movl   $0xffffffff,-0x1c(%rbp)
mov    0x2ed3(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2eca(%rip)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare1>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setb   %cl
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
addl   $0x1,0x2f0c(%rip)
ret

LLVM IR (-O0):
@compare1.comparisons = internal global i32 0
define i32 @compare1(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
store i32 %10, i32* %5
%11 = load i8*, i8** %4
%12 = bitcast i8* %11 to i32*
%13 = load i32, i32* %12
store i32 %13, i32* %6
store i32 0, i32* %7
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = icmp ult i32 %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 1, i32* %7
br label %18
18: ; preds = %17, %2
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = icmp ugt i32 %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 -1, i32* %7
br label %23
23: ; preds = %22, %18
%24 = load i32, i32* @compare1.comparisons
%25 = add i32 %24, 1
store i32 %25, i32* @compare1.comparisons
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
@compare1.comparisons = internal unnamed_addr global i32 0
define i32 @compare1(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp ult i32 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp ugt i32 %4, %6
%10 = select i1 %9, i32 -1, i32 %8
%11 = load i32, i32* @compare1.comparisons
%12 = add i32 %11, 1
store i32 %12, i32* @compare1.comparisons
ret i32 %10
}
void LPCChannelEnable(unsigned long ulBase, unsigned long ulChannel) {
  ;
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000000))) |= (1 << ulChannel);
}


x86 assembly (clang, -O0):
<LPCChannelEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
or     %rdx,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCChannelEnable>:
mov    %rsi,%rcx
mov    $0x1,%eax
shl    %cl,%eax
cltq
or     %rax,(%rdi)
ret

LLVM IR (-O0):
define void @LPCChannelEnable(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 1, %6
%8 = sext i32 %7 to i64
%9 = load i64, i64* %3
%10 = add i64 %9, 0
%11 = inttoptr i64 %10 to i64*
%12 = load volatile i64, i64* %11
%13 = or i64 %12, %8
store volatile i64 %13, i64* %11
ret void
}

LLVM IR (-O2):
define void @LPCChannelEnable(i64 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl nuw i32 1, %3
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %0 to i64*
%7 = load volatile i64, i64* %6
%8 = or i64 %7, %5
store volatile i64 %8, i64* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double raio;
  scanf(" %lf", &raio);
  printf("VOLUME = %0.3lf\n", (4.0 / 3) * 3.14159 * (raio * raio * raio));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xeaa(%rip),%xmm0
mulsd  %xmm1,%xmm0
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  0xeb7(%rip),%xmm0
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c" %lf\00"
@.str.1 = [17 x i8] c"VOLUME = %0.3lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = load double, double* %2
%8 = fmul double %6, %7
%9 = fmul double 0x4010C1514ABD0449, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c" %lf\00"
@.str.1 = [17 x i8] c"VOLUME = %0.3lf\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fmul double %4, %4
%6 = fmul double %4, %5
%7 = fmul double %6, 0x4010C1514ABD0449
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}
unsigned xrop3_153_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = D ^ S;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_153_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_153_1_1>:
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %edi,%esi
not    %edi
shl    $0x8,%edi
not    %eax
and    %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_153_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
store i32 %14, i32* %6
%15 = load i8, i8* %4
%16 = zext i8 %15 to i32
%17 = shl i32 %16, 8
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
store i32 %20, i32* %7
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = xor i32 %21, %22
store i32 %23, i32* %8
%24 = load i32, i32* %8
%25 = xor i32 %24, -1
store i32 %25, i32* %8
%26 = load i32, i32* %8
%27 = load i32, i32* %6
%28 = xor i32 %27, -1
%29 = and i32 %26, %28
%30 = load i32, i32* %7
%31 = xor i32 %30, -1
%32 = and i32 %29, %31
%33 = load i32, i32* %5
%34 = load i32, i32* %6
%35 = and i32 %33, %34
%36 = or i32 %32, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %7
%39 = and i32 %37, %38
%40 = or i32 %36, %39
ret i32 %40
}

LLVM IR (-O2):
define i32 @xrop3_153_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = zext i8 %1 to i32
%5 = mul nuw nsw i32 %4, 257
%6 = xor i32 %3, -1
%7 = shl nsw i32 %6, 8
%8 = xor i32 %5, -1
%9 = and i32 %7, %8
%10 = or i8 %1, %0
%11 = zext i8 %10 to i32
%12 = or i32 %9, %11
ret i32 %12
}
void hardfault_handler(void) { return; }


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

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

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

LLVM IR (-O2):
define void @hardfault_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *installedProblemName(int);
int numberOfInstalledProblems(void) {
  static int result = -1;
  if (result == -1) {
    result = 0;
    while (installedProblemName(result) != NULL)
      result++;
  }
  return (result);
}


x86 assembly (clang, -O0):
<numberOfInstalledProblems>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0xffffffff,0x2f0d(%rip)
jne    1159 <numberOfInstalledProblems+0x49>
movl   $0x0,0x2efd(%rip)
mov    0x2ef7(%rip),%edi
call   1030 <installedProblemName@plt>
cmp    $0x0,%rax
je     1154 <numberOfInstalledProblems+0x44>
mov    0x2ee2(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ed9(%rip)
jmp    112b <numberOfInstalledProblems+0x1b>
jmp    1159 <numberOfInstalledProblems+0x49>
mov    0x2ec9(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numberOfInstalledProblems>:
push   %rax
cmpl   $0xffffffff,0x2f10(%rip)
je     1122 <numberOfInstalledProblems+0x12>
mov    0x2f08(%rip),%eax
pop    %rcx
ret
movl   $0x0,0x2efc(%rip)
xor    %edi,%edi
xchg   %ax,%ax
call   1030 <installedProblemName@plt>
test   %rax,%rax
je     111a <numberOfInstalledProblems+0xa>
mov    0x2ee8(%rip),%edi
add    $0x1,%edi
mov    %edi,0x2edf(%rip)
jmp    1130 <numberOfInstalledProblems+0x20>

LLVM IR (-O0):
@numberOfInstalledProblems.result = internal global i32 -1
define i32 @numberOfInstalledProblems() {
%1 = load i32, i32* @numberOfInstalledProblems.result
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %12
3: ; preds = %0
store i32 0, i32* @numberOfInstalledProblems.result
br label %4
4: ; preds = %8, %3
%5 = load i32, i32* @numberOfInstalledProblems.result
%6 = call i32* @installedProblemName(i32 %5)
%7 = icmp ne i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* @numberOfInstalledProblems.result
%10 = add nsw i32 %9, 1
store i32 %10, i32* @numberOfInstalledProblems.result
br label %4
11: ; preds = %4
br label %12
12: ; preds = %11, %0
%13 = load i32, i32* @numberOfInstalledProblems.result
ret i32 %13
}

LLVM IR (-O2):
@numberOfInstalledProblems.result = internal unnamed_addr global i32 -1
define i32 @numberOfInstalledProblems() {
%1 = load i32, i32* @numberOfInstalledProblems.result
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %11
3: ; preds = %0
store i32 0, i32* @numberOfInstalledProblems.result
%4 = tail call i32* @installedProblemName(i32 0)
%5 = icmp eq i32* %4, null
br i1 %5, label %11, label %6
6: ; preds = %3, %6
%7 = load i32, i32* @numberOfInstalledProblems.result
%8 = add nsw i32 %7, 1
store i32 %8, i32* @numberOfInstalledProblems.result
%9 = tail call i32* @installedProblemName(i32 %8)
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %6
11: ; preds = %6, %3, %0
%12 = load i32, i32* @numberOfInstalledProblems.result
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ paint(int, int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basPaint() {
  int x, y;
  y = popNumber();
  x = popNumber();
  pushNumber(paint(x, y));
}


x86 assembly (clang, -O0):
<basPaint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <paint@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basPaint>:
push   %rbx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1030 <paint@plt>
mov    %eax,%edi
pop    %rbx
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basPaint() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @popNumber()
store i32 %3, i32* %2
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %1
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call i32 @paint(i32 %5, i32 %6)
%8 = call i32 @pushNumber(i32 %7)
ret void
}

LLVM IR (-O2):
define void @basPaint() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 @paint(i32 %2, i32 %1)
%4 = tail call i32 @pushNumber(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int isalnum(int);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int ls_isalnum(int c) {
  int ret;
  setlocale(LC_ALL, "");
  ret = isalnum(c);
  setlocale(LC_ALL, "C");
  return ret;
}


x86 assembly (clang, -O0):
<ls_isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec6(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x4(%rbp),%edi
call   1030 <isalnum@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
call   1040 <setlocale@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_isalnum>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2eb3(%rip),%r14
mov    (%r14),%edi
lea    0xeca(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%edi
call   1030 <isalnum@plt>
mov    %eax,%ebx
mov    (%r14),%edi
lea    0xeb1(%rip),%rsi
call   1040 <setlocale@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_isalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @LC_ALL
%5 = call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = call i32 @isalnum(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* @LC_ALL
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"C\00"
define i32 @ls_isalnum(i32 %0) {
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @isalnum(i32 %0)
%5 = load i32, i32* @LC_ALL
%6 = tail call i32 @setlocale(i32 %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 %4
}
/* Variables and functions */
double atan(int /*<<< orphan*/);
int /*<<< orphan*/ luaL_check_number(int);
int /*<<< orphan*/ lua_pushnumber(double);
void math_atan(void) {
  lua_pushnumber(
      ((atan(luaL_check_number(1))) / ((3.14159265358979323846) / 180.0)));
}


x86 assembly (clang, -O0):
<math_atan>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mov    %eax,%edi
call   1050 <atan@plt>
movsd  0xeb3(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <lua_pushnumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_atan>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_check_number@plt>
mov    %eax,%edi
call   1050 <atan@plt>
divsd  0xeb6(%rip),%xmm0
pop    %rax
jmp    1040 <lua_pushnumber@plt>

LLVM IR (-O0):
define void @math_atan() {
%1 = call i32 @luaL_check_number(i32 1)
%2 = call double @atan(i32 %1)
%3 = fdiv double %2, 0x3F91DF46A2529D39
%4 = call i32 @lua_pushnumber(double %3)
ret void
}

LLVM IR (-O2):
define void @math_atan() {
%1 = tail call i32 @luaL_check_number(i32 1)
%2 = tail call double @atan(i32 %1)
%3 = fdiv double %2, 0x3F91DF46A2529D39
%4 = tail call i32 @lua_pushnumber(double %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  int n;
  int sum;
  if (!(i == 0 && n >= 0 && n <= 100 && sum == 0))
    return 0;
  while (i < n) {
    sum = sum + i;
    i++;
  }
  assert(sum >= 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1147 <main+0x37>
cmpl   $0x0,-0xc(%rbp)
jl     1147 <main+0x37>
cmpl   $0x64,-0xc(%rbp)
jg     1147 <main+0x37>
cmpl   $0x0,-0x10(%rbp)
je     1153 <main+0x43>
movl   $0x0,-0x4(%rbp)
jmp    1193 <main+0x83>
jmp    1158 <main+0x48>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    117b <main+0x6b>
mov    -0x10(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1158 <main+0x48>
cmpl   $0x0,-0x10(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp sle i32 %11, 100
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 0
br i1 %15, label %17, label %16
16: ; preds = %13, %10, %7, %0
store i32 0, i32* %1
br label %33
17: ; preds = %13
br label %18
18: ; preds = %22, %17
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %28
22: ; preds = %18
%23 = load i32, i32* %4
%24 = load i32, i32* %2
%25 = add nsw i32 %23, %24
store i32 %25, i32* %4
%26 = load i32, i32* %2
%27 = add nsw i32 %26, 1
store i32 %27, i32* %2
br label %18
28: ; preds = %18
%29 = load i32, i32* %4
%30 = icmp sge i32 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
store i32 0, i32* %1
br label %33
33: ; preds = %28, %16
%34 = load i32, i32* %1
ret i32 %34
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}