xunge/DecIR huggingface dataset:
void XSetLocaleModifiers() {}


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

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

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

LLVM IR (-O2):
define void @XSetLocaleModifiers() {
ret void
}
/* Variables and functions */
int lengthOfLongestSubstring(char const *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  const char *str = "abcdabcdefabcdefg";
  int len = lengthOfLongestSubstring(str);
  printf("%d\n", len);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <lengthOfLongestSubstring@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [18 x i8] c"abcdabcdefabcdefg\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @lengthOfLongestSubstring(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bt_change_case(char, char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *, char *);
char *strdup(char *);
void show_case_changed(char transform, char *msg, char *string) {
  char *dup;
  dup = strdup(string);
  bt_change_case(transform, dup, 0);
  printf("%s%s\n", msg, dup);
  free(dup);
}


x86 assembly (clang, -O0):
<show_case_changed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1060 <strdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x1(%rbp),%al
mov    -0x20(%rbp),%rsi
xor    %edx,%edx
movsbl %al,%edi
call   1040 <bt_change_case@plt>
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe7d(%rip),%rdi
call   1050 <printf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_case_changed>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
mov    %rdx,%rdi
call   1060 <strdup@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    %rax,%rsi
xor    %edx,%edx
call   1040 <bt_change_case@plt>
lea    0xe99(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1050 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%s%s\0A\00"
define void @show_case_changed(i8 signext %0, i8* %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8 %0, i8* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = call i8* @strdup(i8* %8)
store i8* %9, i8** %7
%10 = load i8, i8* %4
%11 = load i8*, i8** %7
%12 = call i32 @bt_change_case(i8 signext %10, i8* %11, i32 0)
%13 = load i8*, i8** %5
%14 = load i8*, i8** %7
%15 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %13, i8* %14)
%16 = load i8*, i8** %7
%17 = call i32 @free(i8* %16)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s%s\0A\00"
define void @show_case_changed(i8 signext %0, i8* %1, i8* nocapture %2) {
%4 = tail call i8* @strdup(i8* %2)
%5 = tail call i32 @bt_change_case(i8 signext %0, i8* %4, i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %4)
%7 = tail call i32 @free(i8* %4)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ free(void *);
char *getenv(char *);
void *malloc(int);
int main(int argc, char *argv[]) {
  int num = 3;
  char *path = getenv("HOME");
  void *ptr;
  if (argc > 1)
    num = atoi(argv[1]);
  ptr = malloc(num);
  free(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3,-0x14(%rbp)
lea    0xe9c(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x20(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1187 <main+0x47>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xeb1(%rip),%rdi
call   1030 <getenv@plt>
mov    $0x3,%edi
cmp    $0x2,%ebp
jl     1169 <main+0x29>
mov    0x8(%rbx),%rdi
call   1060 <atoi@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rdi
call   1040 <free@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"HOME\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %6
%9 = call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i8* %9, i8** %7
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
store i32 %16, i32* %6
br label %17
17: ; preds = %12, %2
%18 = load i32, i32* %6
%19 = call i8* @malloc(i32 %18)
store i8* %19, i8** %8
%20 = load i8*, i8** %8
%21 = call i32 @free(i8* %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"HOME\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i8* @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8*, i8** %1, i64 1
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ %8, %5 ], [ 3, %2 ]
%11 = tail call i8* @malloc(i32 %10)
%12 = tail call i32 @free(i8* %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
int /*<<< orphan*/ dlopen(char *, int /*<<< orphan*/);
void myInit() { dlopen("/no_such/path", RTLD_LAZY); }


x86 assembly (clang, -O0):
<myInit>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <dlopen@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<myInit>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <dlopen@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"/no_such/path\00"
@RTLD_LAZY = global i32 0
define void @myInit() {
%1 = load i32, i32* @RTLD_LAZY
%2 = call i32 @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"/no_such/path\00"
@RTLD_LAZY = global i32 0
define void @myInit() {
%1 = load i32, i32* @RTLD_LAZY
%2 = tail call i32 @dlopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ makelong(int /*<<< orphan*/, int /*<<< orphan*/ *);
int tx(int /*<<< orphan*/ *, int);
int sendlong(uint32_t data) {
  uint8_t mybuf[12];
  makelong(data, mybuf);
  return tx(mybuf, 11);
}


x86 assembly (clang, -O0):
<sendlong>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x40(%rbp),%rsi
call   1030 <makelong@plt>
lea    -0x40(%rbp),%rdi
mov    $0xb,%esi
call   1040 <tx@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendlong>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <makelong@plt>
mov    %rbx,%rdi
mov    $0xb,%esi
call   1040 <tx@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @sendlong(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32 @makelong(i32 %4, i32* %5)
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%8 = call i32 @tx(i32* %7, i32 11)
ret i32 %8
}

LLVM IR (-O2):
define i32 @sendlong(i32 %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = call i32 @makelong(i32 %0, i32* %4)
%6 = call i32 @tx(i32* %4, i32 11)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void func0() { puts("This is the function func0(). "); }


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"This is the function func0(). \00"
define void @func0() {
%1 = call i32 @puts(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"This is the function func0(). \00"
define void @func0() {
%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*/ _psTraceStr(char *, char *);
void _psErrorStr(char *msg, char *val) { _psTraceStr(msg, val); }


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

x86 assembly (clang, -O2):
<_psErrorStr>:
jmp    1030 <_psTraceStr@plt>

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

LLVM IR (-O2):
define void @_psErrorStr(i8* %0, i8* %1) {
%3 = tail call i32 @_psTraceStr(i8* %0, i8* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
scalar_t__ isprint(int);
scalar_t__ isspace(int);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
void skip_space(FILE *input) {
  int c;
  while (isspace(c = fgetc(input)))
    ;
  if (isprint(c)) {
    ungetc(c, input);
  }
}


x86 assembly (clang, -O0):
<skip_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,%edi
mov    %edi,-0xc(%rbp)
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     116e <skip_space+0x2e>
jmp    114c <skip_space+0xc>
mov    -0xc(%rbp),%edi
call   1060 <isprint@plt>
cmp    $0x0,%rax
je     118c <skip_space+0x4c>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1050 <ungetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_space>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1150 <skip_space+0x10>
mov    %ebp,%edi
call   1060 <isprint@plt>
test   %rax,%rax
je     1182 <skip_space+0x42>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <ungetc@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @skip_space(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = tail call i64 @isspace(i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
%7 = tail call i64 @isprint(i32 %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @ungetc(i32 %3, i32* %0)
br label %11
11: ; preds = %9, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ r();
void good_goto1(void) {
  a();
  goto label;
label:
  r();
}


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

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

LLVM IR (-O0):
define void @good_goto1() {
%1 = call i32 (...) @a()
br label %2
2: ; preds = %0
%3 = call i32 (...) @r()
ret void
}

LLVM IR (-O2):
define void @good_goto1() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @r()
ret void
}
int ___dojogen___(void) { return 1; }


x86 assembly (clang, -O0):
<___dojogen___>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @___dojogen___() {
ret i32 1
}

LLVM IR (-O2):
define i32 @___dojogen___() {
ret i32 1
}
/* Variables and functions */
size_t ft_strlen(char const *);
int /*<<< orphan*/ ft_strncmp(char const *, char const *, size_t);
int is_var(const char *to_match, const char *var) {
  size_t size_to_match;
  size_to_match = ft_strlen(to_match);
  if (!ft_strncmp(to_match, var, size_to_match) && var[size_to_match] == '=')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<is_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ft_strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <ft_strncmp@plt>
cmp    $0x0,%eax
jne    1178 <is_var+0x58>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
jne    1178 <is_var+0x58>
movl   $0x1,-0x4(%rbp)
jmp    117f <is_var+0x5f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_var>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <ft_strlen@plt>
mov    %rax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <ft_strncmp@plt>
test   %eax,%eax
jne    1151 <is_var+0x31>
mov    $0x1,%eax
cmpb   $0x3d,(%r14,%r15,1)
je     1153 <is_var+0x33>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @is_var(i8* %0, i8* %1) {
%3 = tail call i64 @ft_strlen(i8* %0)
%4 = tail call i32 @ft_strncmp(i8* %0, i8* %1, i64 %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %1, i64 %3
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 61
br i1 %9, label %11, label %10
10: ; preds = %6, %2
br label %11
11: ; preds = %6, %10
%12 = phi i32 [ 0, %10 ], [ 1, %6 ]
ret i32 %12
}
void gtk_notebook_query_tab_label_packing() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ RandomInitialise(unsigned long, unsigned long);
int time(int *);
void kbsRandomize() {
  unsigned long tempULong, tempULong2;
  time_t currentTimeValue;
  currentTimeValue = time(&currentTimeValue);
  tempULong = 503 * currentTimeValue;
  tempULong2 = 613 * currentTimeValue;
  tempULong = 31328;
  tempULong2 = 30081;
  RandomInitialise(tempULong, tempULong2);
}


x86 assembly (clang, -O0):
<kbsRandomize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x14(%rbp),%rdi
call   1040 <time@plt>
mov    %eax,-0x14(%rbp)
imul   $0x1f7,-0x14(%rbp),%eax
cltq
mov    %rax,-0x8(%rbp)
imul   $0x265,-0x14(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
movq   $0x7a60,-0x8(%rbp)
movq   $0x7581,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <RandomInitialise@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kbsRandomize>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
mov    $0x7a60,%edi
mov    $0x7581,%esi
call   1030 <RandomInitialise@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @kbsRandomize() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i32
%4 = call i32 @time(i32* %3)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = mul nsw i32 503, %5
%7 = sext i32 %6 to i64
store i64 %7, i64* %1
%8 = load i32, i32* %3
%9 = mul nsw i32 613, %8
%10 = sext i32 %9 to i64
store i64 %10, i64* %2
store i64 31328, i64* %1
store i64 30081, i64* %2
%11 = load i64, i64* %1
%12 = load i64, i64* %2
%13 = call i32 @RandomInitialise(i64 %11, i64 %12)
ret void
}

LLVM IR (-O2):
define void @kbsRandomize() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
store i32 %3, i32* %1
%4 = call i32 @RandomInitialise(i64 31328, i64 30081)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t ntohs(uint16_t netshort) {
  return ((netshort & 0xff00) >> 8) | ((netshort & 0x00ff) << 8);
}


x86 assembly (clang, -O0):
<ntohs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohs>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @ntohs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ntohs(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
void *xrealloc(void *ptr, size_t size) {
  void *retval = realloc(ptr, size);
  if (retval == NULL) {
    fprintf(stderr, "realloc failed!\n");
    abort();
  }
  return retval;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1178 <xrealloc+0x48>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1050 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"realloc failed!\0A\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"realloc failed!\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ my_log_error(char *, char const *, double, double);
void my_assert_lessDouble(const char *description, double actualVal,
                          double refVal) {
  if (actualVal >= refVal)
    my_log_error("assert failed, \"%s\" must be less than %lf but is %lf\n",
                 description, refVal, actualVal);
}


x86 assembly (clang, -O0):
<my_assert_lessDouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jb     1150 <my_assert_lessDouble+0x40>
mov    -0x8(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xeb5(%rip),%rdi
call   1030 <my_log_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_assert_lessDouble>:
ucomisd %xmm1,%xmm0
jae    1117 <my_assert_lessDouble+0x7>
ret
movapd %xmm0,%xmm2
mov    %rdi,%rsi
lea    0xedb(%rip),%rdi
movapd %xmm1,%xmm0
movapd %xmm2,%xmm1
jmp    1030 <my_log_error@plt>

LLVM IR (-O0):
@.str = [54 x i8] c"assert failed, \22%s\22 must be less than %lf but is %lf\0A\00"
define void @my_assert_lessDouble(i8* %0, double %1, double %2) {
%4 = alloca i8*
%5 = alloca double
%6 = alloca double
store i8* %0, i8** %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %6
%9 = fcmp oge double %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load double, double* %6
%13 = load double, double* %5
%14 = call i32 @my_log_error(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %11, double %12, double %13)
br label %15
15: ; preds = %10, %3
ret void
}

LLVM IR (-O2):
@.str = [54 x i8] c"assert failed, \22%s\22 must be less than %lf but is %lf\0A\00"
define void @my_assert_lessDouble(i8* %0, double %1, double %2) {
%4 = fcmp ult double %1, %2
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @my_log_error(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0), i8* %0, double %2, double %1)
br label %7
7: ; preds = %5, %3
ret void
}
void VTV_not_an_error(void) {}


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

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

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

LLVM IR (-O2):
define void @VTV_not_an_error() {
ret void
}
int execute_waitpid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_waitpid() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ arg_int3(int, int, int);
void arg_int2(int a, int b) { arg_int3(a, b, b + 1); }


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

x86 assembly (clang, -O2):
<arg_int2>:
lea    0x1(%rsi),%edx
jmp    1030 <arg_int3@plt>

LLVM IR (-O0):
define void @arg_int2(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 = load i32, i32* %4
%8 = add nsw i32 %7, 1
%9 = call i32 @arg_int3(i32 %5, i32 %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @arg_int2(i32 %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i32 @arg_int3(i32 %0, i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int scanf(char *, char *);
int main() {
  char phrase[25];
  if (scanf("%24s", phrase) == 1) {
    puts(phrase);
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <scanf@plt>
cmp    $0x1,%eax
jne    115d <main+0x3d>
lea    -0x20(%rbp),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    1164 <main+0x44>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
jne    1149 <main+0x29>
mov    %rsp,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%24s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
store i32 0, i32* %1
br label %10
9: ; preds = %0
store i32 1, i32* %1
br label %10
10: ; preds = %9, %6
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"%24s\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @puts(i8* %2)
br label %7
7: ; preds = %0, %5
%8 = phi i32 [ 0, %5 ], [ 1, %0 ]
ret i32 %8
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ printf(char *, int);
main() {
  char str[6] = "a";
  printf("Integer value of given string is %d \n", atoi(str));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xecc(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0x6(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.str = [6 x i8] c"a\00\00\00\00\00"
@.str = [38 x i8] c"Integer value of given string is %d \0A\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = bitcast [6 x i8]* %1 to i8*
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = call i32 @atoi(i8* %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [6 x i8] c"a\00\00\00\00\00"
@.str = [38 x i8] c"Integer value of given string is %d \0A\00"
define i32 @main() {
%1 = tail call i32 @atoi(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__const.main.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_token(int);
int /*<<< orphan*/ printf(char *, int);
int yyget_lineno();
int yylex();
int main(void) {
  while (1) {
    int token = yylex();
    if (token == 0) {
      break;
    }
    if (token < 0) {
      printf("error on line %d\n", yyget_lineno());
      break;
    }
    print_token(token);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <yylex@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1168 <main+0x28>
jmp    1199 <main+0x59>
cmpl   $0x0,-0x8(%rbp)
jge    118c <main+0x4c>
mov    $0x0,%al
call   1040 <yyget_lineno@plt>
mov    %eax,%esi
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
jmp    1199 <main+0x59>
mov    -0x8(%rbp),%edi
call   1050 <print_token@plt>
jmp    114f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1060 <yylex@plt>
test   %eax,%eax
je     117d <main+0x3d>
test   %eax,%eax
js     1168 <main+0x28>
mov    %eax,%edi
call   1050 <print_token@plt>
jmp    1150 <main+0x10>
xor    %eax,%eax
call   1040 <yyget_lineno@plt>
lea    0xe8a(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"error on line %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %0, %14
%4 = call i32 (...) @yylex()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %17
8: ; preds = %3
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = call i32 (...) @yyget_lineno()
%13 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %17
14: ; preds = %8
%15 = load i32, i32* %2
%16 = call i32 @print_token(i32 %15)
br label %3
17: ; preds = %11, %7
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"error on line %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @yylex()
%2 = icmp eq i32 %1, 0
br i1 %2, label %13, label %3
3: ; preds = %0, %9
%4 = phi i32 [ %11, %9 ], [ %1, %0 ]
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 (...) @yyget_lineno()
%8 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %7)
br label %13
9: ; preds = %3
%10 = tail call i32 @print_token(i32 %4)
%11 = tail call i32 (...) @yylex()
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %3
13: ; preds = %9, %0, %6
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ event_dispatch();
void pubsubclient_run() { event_dispatch(); }


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

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

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

LLVM IR (-O2):
define void @pubsubclient_run() {
%1 = tail call i32 (...) @event_dispatch()
ret void
}
/* Variables and functions */
char *ckmalloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *mkWord(char *s) {
  char *b;
  b = ckmalloc(strlen(s) + 1);
  strcpy(b, s);
  return b;
}


x86 assembly (clang, -O0):
<mkWord>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <ckmalloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkWord>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <ckmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @mkWord(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @ckmalloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @mkWord(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @ckmalloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fib(long);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, long *);
int main() {
  long int n;
  printf("Digite o tamanho da sequencia fibbonacci : ");
  scanf("%d", &n);
  fib(n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <fib@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%rdi
call   1050 <fib@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Digite o tamanho da sequencia fibbonacci : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i64
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = call i32 @fib(i64 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [44 x i8] c"Digite o tamanho da sequencia fibbonacci : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 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), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 @fib(i64 %5)
ret i32 0
}
void free_vector(v, nl, nh) double *v;
int nl, nh;
{ free((char *)(v + nl)); }


x86 assembly (clang, -O0):
<free_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_vector>:
movslq %esi,%rax
lea    (%rdi,%rax,8),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_vector(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds double, double* %7, i64 %9
%11 = bitcast double* %10 to i8*
ret void
}

LLVM IR (-O2):
define void @free_vector(double* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds double, double* %0, i64 %4
%6 = bitcast double* %5 to i8*
tail call void @free(i8* %6)
ret void
}
/* Variables and functions */
int core4_safe(char const *);
int U_EMRSTROKEANDFILLPATH_safe(const char *record) {
  return (core4_safe(record));
}


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

x86 assembly (clang, -O2):
<U_EMRSTROKEANDFILLPATH_safe>:
jmp    1030 <core4_safe@plt>

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

LLVM IR (-O2):
define i32 @U_EMRSTROKEANDFILLPATH_safe(i8* %0) {
%2 = tail call i32 @core4_safe(i8* %0)
ret i32 %2
}
void ModelicaUtilityFunctions_freeModelicaUtilityFunctions(void *functions) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ WaitKey();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
struct passwd *getpwnam(const char *name) {
  fprintf(stderr, "getpwnam %s\n", name);
  WaitKey();
  return 0;
}


x86 assembly (clang, -O0):
<getpwnam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <WaitKey@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getpwnam>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1040 <WaitKey@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.passwd = type { i32 }
@stderr = global i32 0
@.str = [13 x i8] c"getpwnam %s\0A\00"
define %struct.passwd* @getpwnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @WaitKey()
ret %struct.passwd* null
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
@stderr = global i32 0
@.str = [13 x i8] c"getpwnam %s\0A\00"
define noalias %struct.passwd* @getpwnam(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @WaitKey()
ret %struct.passwd* null
}
int is_prime(int n) {
  int i;
  for (i = 2; i <= n - 1; i++) {
    if (n % i == 0) {
      return 0;
    }
  }
  if (i == n) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_prime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     114e <is_prime+0x4e>
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    113b <is_prime+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    116d <is_prime+0x6d>
jmp    1140 <is_prime+0x40>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110e <is_prime+0xe>
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1166 <is_prime+0x66>
movl   $0x1,-0x4(%rbp)
jmp    116d <is_prime+0x6d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_prime>:
mov    $0x2,%ecx
cmp    $0x3,%edi
jl     1122 <is_prime+0x22>
mov    $0x2,%ecx
nop
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     112a <is_prime+0x2a>
add    $0x1,%ecx
cmp    %ecx,%edi
jne    1110 <is_prime+0x10>
mov    %edi,%ecx
xor    %eax,%eax
cmp    %edi,%ecx
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_prime(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 2, i32* %4
br label %5
5: ; preds = %17, %1
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %7, 1
%9 = icmp sle i32 %6, %8
br i1 %9, label %10, label %20
10: ; preds = %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = srem i32 %11, %12
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
store i32 0, i32* %2
br label %26
16: ; preds = %10
br label %17
17: ; preds = %16
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load i32, i32* %4
%22 = load i32, i32* %3
%23 = icmp eq i32 %21, %22
br i1 %23, label %24, label %25
24: ; preds = %20
store i32 1, i32* %2
br label %26
25: ; preds = %20
store i32 0, i32* %2
br label %26
26: ; preds = %25, %24, %15
%27 = load i32, i32* %2
ret i32 %27
}

LLVM IR (-O2):
define i32 @is_prime(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %3, label %10
3: ; preds = %1, %7
%4 = phi i32 [ %8, %7 ], [ 2, %1 ]
%5 = srem i32 %0, %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %3
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %7, %1
%11 = phi i32 [ 2, %1 ], [ %0, %7 ]
%12 = icmp eq i32 %11, %0
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %3, %10
%15 = phi i32 [ %13, %10 ], [ 0, %3 ]
ret i32 %15
}
void ff_hevc_put_hevc_pel_pixels48_10_avx2() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_qpel_hv8_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emsBegin(int *);
void errBegin(int *status) { emsBegin(status); }


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

x86 assembly (clang, -O2):
<errBegin>:
jmp    1030 <emsBegin@plt>

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

LLVM IR (-O2):
define void @errBegin(i32* %0) {
%2 = tail call i32 @emsBegin(i32* %0)
ret void
}
/* Variables and functions */
void set(int *p, size_t i) { p[i >> 5] |= 1 << (i & 0x1f); }


x86 assembly (clang, -O0):
<set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    $0x5,%rcx
or     (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set>:
mov    %rsi,%rcx
mov    $0x1,%eax
shl    %cl,%eax
shr    $0x5,%rcx
or     %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @set(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 31
%7 = trunc i64 %6 to i32
%8 = shl i32 1, %7
%9 = load i32*, i32** %3
%10 = load i64, i64* %4
%11 = lshr i64 %10, 5
%12 = getelementptr inbounds i32, i32* %9, i64 %11
%13 = load i32, i32* %12
%14 = or i32 %13, %8
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @set(i32* nocapture %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = and i32 %3, 31
%5 = shl nuw i32 1, %4
%6 = lshr i64 %1, 5
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = or i32 %8, %5
store i32 %9, i32* %7
ret void
}
unsigned char f87(unsigned char x, int y) {
  return (x << ((-y) & (8 - 1))) + (x >> y);
}


x86 assembly (clang, -O0):
<f87>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0x7,%ecx
shl    %cl,%eax
movzbl -0x1(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f87>:
mov    %esi,%ecx
neg    %cl
and    $0x7,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @f87(i8 zeroext %0, i32 %1) {
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
store i32 %1, i32* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = load i32, i32* %4
%8 = sub nsw i32 0, %7
%9 = and i32 %8, 7
%10 = shl i32 %6, %9
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = load i32, i32* %4
%14 = ashr i32 %12, %13
%15 = add nsw i32 %10, %14
%16 = trunc i32 %15 to i8
ret i8 %16
}

LLVM IR (-O2):
define zeroext i8 @f87(i8 zeroext %0, i32 %1) {
%3 = zext i8 %0 to i32
%4 = sub nsw i32 0, %1
%5 = and i32 %4, 7
%6 = shl nuw nsw i32 %3, %5
%7 = lshr i32 %3, %1
%8 = add nuw nsw i32 %6, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}
/* Variables and functions */
int /*<<< orphan*/ grib_set_bit_off(unsigned char *, long *);
int /*<<< orphan*/ grib_set_bit_on(unsigned char *, long *);
void grib_set_bit(unsigned char *p, long bitp, int val) {
  if (val == 0)
    grib_set_bit_off(p, &bitp);
  else
    grib_set_bit_on(p, &bitp);
}


x86 assembly (clang, -O0):
<grib_set_bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    114f <grib_set_bit+0x2f>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <grib_set_bit_off@plt>
jmp    115c <grib_set_bit+0x3c>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <grib_set_bit_on@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grib_set_bit>:
push   %rax
mov    %rsi,(%rsp)
mov    %rsp,%rsi
test   %edx,%edx
je     1133 <grib_set_bit+0x13>
call   1030 <grib_set_bit_on@plt>
pop    %rax
ret
call   1040 <grib_set_bit_off@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @grib_set_bit(i8* %0, i64 %1, i32 %2) {
%4 = alloca i64
store i64 %1, i64* %4
%5 = icmp eq i32 %2, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = call i32 @grib_set_bit_off(i8* %0, i64* %4)
br label %10
8: ; preds = %3
%9 = call i32 @grib_set_bit_on(i8* %0, i64* %4)
br label %10
10: ; preds = %8, %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t read_cycle_counter(void) { return 0; }


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

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

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

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