xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ stdout;
void onFileChanged(char *filepath) {
  printf("%s\n", filepath);
  fflush(stdout);
}


x86 assembly (clang, -O0):
<onFileChanged>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<onFileChanged>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@stdout = global i32 0
define void @onFileChanged(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@stdout = global i32 0
define void @onFileChanged(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_int;
typedef int /*<<< orphan*/ cl_event;
typedef scalar_t__ cl_command_queue;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_int clEnqueueMarker(cl_command_queue command_queue, cl_event *event) {
  unsigned int sys_args[2];
  sys_args[0] = (unsigned int)command_queue;
  sys_args[1] = (unsigned int)event;
  return (cl_int)syscall(325, 1070, sys_args);
}


x86 assembly (clang, -O0):
<clEnqueueMarker>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
lea    -0x18(%rbp),%rdx
mov    $0x145,%edi
mov    $0x42e,%esi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clEnqueueMarker>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rdx
mov    $0x145,%edi
mov    $0x42e,%esi
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clEnqueueMarker(i64 %0, i32* %1) {
%3 = alloca i64
%4 = alloca i32*
%5 = alloca [2 x i32]
store i64 %0, i64* %3
store i32* %1, i32** %4
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %7, i32* %8
%9 = load i32*, i32** %4
%10 = ptrtoint i32* %9 to i32
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %10, i32* %11
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%13 = call i32 @syscall(i32 325, i32 1070, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @clEnqueueMarker(i64 %0, i32* %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
%5 = trunc i64 %0 to i32
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
store i32 %5, i32* %6
%7 = ptrtoint i32* %1 to i64
%8 = trunc i64 %7 to i32
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
store i32 %8, i32* %9
%10 = call i32 @syscall(i32 325, i32 1070, i32* %6)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int mysql(char *text) {
  int num = 1;
  printf(text);
  if (num = 1) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<mysql>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x14(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1142 <mysql+0x32>
jmp    114e <mysql+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    1155 <mysql+0x45>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mysql(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 1, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* %5)
store i32 1, i32* %4
br i1 true, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %9
8: ; preds = %1
store i32 1, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @mysql(i8* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m512i;

/* Variables and functions */
int /*<<< orphan*/ _mm512_ror_epi32(int /*<<< orphan*/, int);
__attribute__((always_)) __m512i rot12_512(__m512i x) {
  return _mm512_ror_epi32(x, 12);
}


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

x86 assembly (clang, -O2):
<rot12_512>:
mov    $0xc,%esi
jmp    1030 <_mm512_ror_epi32@plt>

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

LLVM IR (-O2):
define i32 @rot12_512(i32 %0) {
%2 = tail call i32 @_mm512_ror_epi32(i32 %0, i32 12)
ret i32 %2
}
void mdp4_dsi_video_overlay_blt(struct msm_fb_data_type *mfd,
                                struct msmfb_overlay_blt *req) {}


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

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

LLVM IR (-O0):
%struct.msm_fb_data_type = type opaque
%struct.msmfb_overlay_blt = type opaque
define void @mdp4_dsi_video_overlay_blt(%struct.msm_fb_data_type* %0, %struct.msmfb_overlay_blt* %1) {
%3 = alloca %struct.msm_fb_data_type*
%4 = alloca %struct.msmfb_overlay_blt*
store %struct.msm_fb_data_type* %0, %struct.msm_fb_data_type** %3
store %struct.msmfb_overlay_blt* %1, %struct.msmfb_overlay_blt** %4
ret void
}

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
%struct.msmfb_overlay_blt = type opaque
define void @mdp4_dsi_video_overlay_blt(%struct.msm_fb_data_type* nocapture %0, %struct.msmfb_overlay_blt* nocapture %1) {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
char *malloc_wrapper_ret() { return (char *)malloc(12); }


x86 assembly (clang, -O0):
<malloc_wrapper_ret>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_wrapper_ret>:
mov    $0xc,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @malloc_wrapper_ret() {
%1 = call i64 @malloc(i32 12)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}

LLVM IR (-O2):
define i8* @malloc_wrapper_ret() {
%1 = tail call i64 @malloc(i32 12)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
int vde_chain_nm4_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm4_free(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ekg_oom_handler();
scalar_t__ strdup(char const *);
char *xstrdup(const char *s) {
  char *tmp;
  if (!s)
    return NULL;
  if (!(tmp = (char *)strdup(s)))
    ekg_oom_handler();
  return tmp;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <xstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    116a <xstrdup+0x4a>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1162 <xstrdup+0x42>
mov    $0x0,%al
call   1030 <ekg_oom_handler@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rbx
test   %rdi,%rdi
je     113c <xstrdup+0x1c>
call   1040 <strdup@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113e <xstrdup+0x1e>
xor    %eax,%eax
call   1030 <ekg_oom_handler@plt>
jmp    113e <xstrdup+0x1e>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i64 @strdup(i8* %0)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 (...) @ekg_oom_handler()
br label %9
9: ; preds = %3, %7, %1
%10 = phi i8* [ null, %1 ], [ %5, %7 ], [ %5, %3 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int inputChoice(int choice) {
  printf("Please put in a value that is non-negative: ");
  scanf("%d", &choice);
  return choice;
}


x86 assembly (clang, -O0):
<inputChoice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xeef(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputChoice>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [45 x i8] c"Please put in a value that is non-negative: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @inputChoice(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([45 x i8], [45 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* %2)
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [45 x i8] c"Please put in a value that is non-negative: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @inputChoice(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 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* %2)
%5 = load i32, i32* %2
ret i32 %5
}
char to_hex(int num) { return num + ((num < 10) ? '0' : 'A' - 10); }


x86 assembly (clang, -O0):
<to_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%esi
mov    $0x37,%ecx
mov    $0x30,%edx
cmp    $0xa,%esi
cmovl  %edx,%ecx
add    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_hex>:
lea    0x37(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define signext i8 @to_hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 48, i32 55
%8 = add nsw i32 %3, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define signext i8 @to_hex(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = select i1 %2, i32 48, i32 55
%4 = add nsw i32 %3, %0
%5 = trunc i32 %4 to i8
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
void printfloat(float f) { printf("%f", f); }


x86 assembly (clang, -O0):
<printfloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define void @printfloat(float %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bmount(char *);
int /*<<< orphan*/ bumount(char *);
int /*<<< orphan*/ mi_creat(char *);
int main(int argc, char **argv) {
  char *buffer2;
  int t_size, i = 0;
  bmount(argv[1]);
  mi_creat(argv[2]);
  bumount(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <bmount@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <mi_creat@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <bumount@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <bmount@plt>
mov    0x10(%rbx),%rdi
call   1030 <mi_creat@plt>
mov    0x8(%rbx),%rdi
call   1040 <bumount@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 0, i32* %7
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @bmount(i8* %10)
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 2
%14 = load i8*, i8** %13
%15 = call i32 @mi_creat(i8* %14)
%16 = load i8**, i8*** %4
%17 = getelementptr inbounds i8*, i8** %16, i64 1
%18 = load i8*, i8** %17
%19 = call i32 @bumount(i8* %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @bmount(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @mi_creat(i8* %7)
%9 = load i8*, i8** %3
%10 = tail call i32 @bumount(i8* %9)
ret i32 0
}
/* Variables and functions */
char *place_commas_in_number_string(char *);
int /*<<< orphan*/ round_double(double);
int /*<<< orphan*/ sprintf(char *, char *, int /*<<< orphan*/);
char *string_commas_rounded_dollar(double d) {
  char s[20];
  sprintf(s, "%.0lf", round_double(d));
  return place_commas_in_number_string(s);
}


x86 assembly (clang, -O0):
<string_commas_rounded_dollar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <round_double@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
lea    0xea4(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <place_commas_in_number_string@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_commas_rounded_dollar>:
push   %rbx
sub    $0x20,%rsp
call   1030 <round_double@plt>
lea    0xebf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%edx
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <place_commas_in_number_string@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%.0lf\00"
define i8* @string_commas_rounded_dollar(double %0) {
%2 = alloca double
%3 = alloca [20 x i8]
store double %0, double* %2
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = load double, double* %2
%6 = call i32 @round_double(double %5)
%7 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%9 = call i8* @place_commas_in_number_string(i8* %8)
ret i8* %9
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.0lf\00"
define i8* @string_commas_rounded_dollar(double %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @round_double(double %0)
%5 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = call i8* @place_commas_in_number_string(i8* %3)
ret i8* %6
}
/* Variables and functions */
scalar_t__ pow(float, int);
int sqrt(scalar_t__);
float circular_in(float step, float max_steps, float max_val) {
  float ratio = step / max_steps;
  return -max_val * (sqrt(1 - pow(ratio, 2)) - 1);
}


x86 assembly (clang, -O0):
<circular_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    $0x1,%edi
sub    %rax,%rdi
call   1040 <sqrt@plt>
movss  -0x14(%rbp),%xmm0
sub    $0x1,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circular_in>:
sub    $0x18,%rsp
divss  %xmm1,%xmm0
xorps  0xed1(%rip),%xmm2
movaps %xmm2,(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
mov    $0x1,%edi
sub    %rax,%rdi
call   1040 <sqrt@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @circular_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %4
%9 = load float, float* %5
%10 = fdiv float %8, %9
store float %10, float* %7
%11 = load float, float* %6
%12 = fneg float %11
%13 = load float, float* %7
%14 = call i64 @pow(float %13, i32 2)
%15 = sub nsw i64 1, %14
%16 = call i32 @sqrt(i64 %15)
%17 = sub nsw i32 %16, 1
%18 = sitofp i32 %17 to float
%19 = fmul float %12, %18
ret float %19
}

LLVM IR (-O2):
define float @circular_in(float %0, float %1, float %2) {
%4 = fdiv float %0, %1
%5 = fneg float %2
%6 = tail call i64 @pow(float %4, i32 2)
%7 = sub nsw i64 1, %6
%8 = tail call i32 @sqrt(i64 %7)
%9 = add nsw i32 %8, -1
%10 = sitofp i32 %9 to float
%11 = fmul float %5, %10
ret float %11
}
void addUser() {}


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

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

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

LLVM IR (-O2):
define void @addUser() {
ret void
}
/* Variables and functions */
int xcrc_byte(int, char);
int xcrc_calc(char *packet, int index, int count) {
  int crc = 0;
  while (count > 0) {
    crc = xcrc_byte(crc, packet[index++]);
    count--;
  }
  return crc;
}


x86 assembly (clang, -O0):
<xcrc_calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1162 <xcrc_calc+0x52>
mov    -0x14(%rbp),%edi
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%esi
call   1030 <xcrc_byte@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1129 <xcrc_calc+0x19>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xcrc_calc>:
push   %rbp
push   %rbx
push   %rax
test   %edx,%edx
jle    1148 <xcrc_calc+0x38>
mov    %edx,%ebp
mov    %rdi,%rbx
movslq %esi,%rax
add    %rax,%rbx
add    $0x1,%ebp
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%esi
mov    %eax,%edi
call   1030 <xcrc_byte@plt>
add    $0x1,%rbx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <xcrc_calc+0x20>
jmp    114a <xcrc_calc+0x3a>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @xcrc_calc(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = sext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %11, %7 ]
%9 = phi i32 [ 0, %5 ], [ %14, %7 ]
%10 = phi i32 [ %2, %5 ], [ %15, %7 ]
%11 = add nsw i64 %8, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %8
%13 = load i8, i8* %12
%14 = tail call i32 @xcrc_byte(i32 %9, i8 signext %13)
%15 = add nsw i32 %10, -1
%16 = icmp ugt i32 %10, 1
br i1 %16, label %7, label %17
17: ; preds = %7, %3
%18 = phi i32 [ 0, %3 ], [ %14, %7 ]
ret i32 %18
}
void gpx_read(void) {}


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

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

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

LLVM IR (-O2):
define void @gpx_read() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_eval(int);
int called_function(int);
void test(int i) {
  __analyzer_eval(i > 4);
  if (i > 4) {
    __analyzer_eval(i > 4);
    i = called_function(i);
    __analyzer_eval(i > 3);
  }
  __analyzer_eval(i > 3);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x4,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
cmpl   $0x4,-0x4(%rbp)
jle    1173 <test+0x53>
cmpl   $0x4,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
mov    -0x4(%rbp),%edi
call   1040 <called_function@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
cmpl   $0x3,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x5,%ebx
setge  %dil
call   1030 <__analyzer_eval@plt>
cmp    $0x5,%ebx
jl     1157 <test+0x37>
mov    $0x1,%edi
call   1030 <__analyzer_eval@plt>
mov    %ebx,%edi
call   1040 <called_function@plt>
mov    %eax,%ebx
xor    %edi,%edi
cmp    $0x4,%eax
setge  %dil
call   1030 <__analyzer_eval@plt>
xor    %edi,%edi
cmp    $0x4,%ebx
setge  %dil
pop    %rbx
jmp    1030 <__analyzer_eval@plt>

LLVM IR (-O0):
define void @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 4
%5 = zext i1 %4 to i32
%6 = call i32 @__analyzer_eval(i32 %5)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 4
br i1 %8, label %9, label %20
9: ; preds = %1
%10 = load i32, i32* %2
%11 = icmp sgt i32 %10, 4
%12 = zext i1 %11 to i32
%13 = call i32 @__analyzer_eval(i32 %12)
%14 = load i32, i32* %2
%15 = call i32 @called_function(i32 %14)
store i32 %15, i32* %2
%16 = load i32, i32* %2
%17 = icmp sgt i32 %16, 3
%18 = zext i1 %17 to i32
%19 = call i32 @__analyzer_eval(i32 %18)
br label %20
20: ; preds = %9, %1
%21 = load i32, i32* %2
%22 = icmp sgt i32 %21, 3
%23 = zext i1 %22 to i32
%24 = call i32 @__analyzer_eval(i32 %23)
ret void
}

LLVM IR (-O2):
define void @test(i32 %0) {
%2 = icmp sgt i32 %0, 4
%3 = zext i1 %2 to i32
%4 = tail call i32 @__analyzer_eval(i32 %3)
br i1 %2, label %5, label %11
5: ; preds = %1
%6 = tail call i32 @__analyzer_eval(i32 1)
%7 = tail call i32 @called_function(i32 %0)
%8 = icmp sgt i32 %7, 3
%9 = zext i1 %8 to i32
%10 = tail call i32 @__analyzer_eval(i32 %9)
br label %11
11: ; preds = %1, %5
%12 = phi i32 [ %7, %5 ], [ %0, %1 ]
%13 = icmp sgt i32 %12, 3
%14 = zext i1 %13 to i32
%15 = tail call i32 @__analyzer_eval(i32 %14)
ret void
}
/* Variables and functions */
scalar_t__ ft_strcmp(char const *, char const *);
int ft_strequ(char const *s1, char const *s2) {
  if (!(s1) || !(s2))
    return (0);
  if (ft_strcmp(s1, s2))
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<ft_strequ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1136 <ft_strequ+0x26>
cmpq   $0x0,-0x18(%rbp)
jne    1142 <ft_strequ+0x32>
movl   $0x0,-0x4(%rbp)
jmp    116c <ft_strequ+0x5c>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ft_strcmp@plt>
cmp    $0x0,%rax
je     1165 <ft_strequ+0x55>
movl   $0x0,-0x4(%rbp)
jmp    116c <ft_strequ+0x5c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strequ>:
xor    %eax,%eax
test   %rdi,%rdi
je     1131 <ft_strequ+0x21>
test   %rsi,%rsi
je     1131 <ft_strequ+0x21>
push   %rax
call   1030 <ft_strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @ft_strequ(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne i8* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = tail call i64 @ft_strcmp(i8* %0, i8* %1)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ 0, %2 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ audio_quit();
int /*<<< orphan*/ loader_quit();
int /*<<< orphan*/ video_quit();
void terminate() {
  loader_quit();
  audio_quit();
  video_quit();
}


x86 assembly (clang, -O0):
<terminate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <loader_quit@plt>
mov    $0x0,%al
call   1030 <audio_quit@plt>
mov    $0x0,%al
call   1050 <video_quit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminate>:
push   %rax
xor    %eax,%eax
call   1040 <loader_quit@plt>
xor    %eax,%eax
call   1030 <audio_quit@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <video_quit@plt>

LLVM IR (-O0):
define void @terminate() {
%1 = call i32 (...) @loader_quit()
%2 = call i32 (...) @audio_quit()
%3 = call i32 (...) @video_quit()
ret void
}

LLVM IR (-O2):
define void @terminate() {
%1 = tail call i32 (...) @loader_quit()
%2 = tail call i32 (...) @audio_quit()
%3 = tail call i32 (...) @video_quit()
ret void
}
int Bematech_FI_MinutosImprimindo(Var, Retorno) {
  return Formata("\x1b|35|19|\x1b", Var, Retorno);
}


x86 assembly (clang, -O0):
<Bematech_FI_MinutosImprimindo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <Formata@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bematech_FI_MinutosImprimindo>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
jmp    1030 <Formata@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\1B|35|19|\1B\00"
define i32 @Bematech_FI_MinutosImprimindo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [10 x i8] c"\1B|35|19|\1B\00"
define i32 @Bematech_FI_MinutosImprimindo(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @Formata to i32 (i8*, i32, i32, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 %3
}
double W(double x) {
  double q;
  q = 1. - x * x;
  return (q > 0.) ? q * q : 0.;
}


x86 assembly (clang, -O0):
<W>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1165 <W+0x65>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1172 <W+0x72>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1172 <W+0x72>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<W>:
mulsd  %xmm0,%xmm0
movsd  0xef4(%rip),%xmm1
subsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
cmpltsd %xmm1,%xmm0
mulsd  %xmm1,%xmm1
andpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @W(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fneg double %4
%7 = call double @llvm.fmuladd.f64(double %6, double %5, double 1.000000e+00)
store double %7, double* %3
%8 = load double, double* %3
%9 = fcmp ogt double %8, 0.000000e+00
br i1 %9, label %10, label %14
10: ; preds = %1
%11 = load double, double* %3
%12 = load double, double* %3
%13 = fmul double %11, %12
br label %15
14: ; preds = %1
br label %15
15: ; preds = %14, %10
%16 = phi double [ %13, %10 ], [ 0.000000e+00, %14 ]
ret double %16
}

LLVM IR (-O2):
define double @W(double %0) {
%2 = fneg double %0
%3 = tail call double @llvm.fmuladd.f64(double %2, double %0, double 1.000000e+00)
%4 = fcmp ogt double %3, 0.000000e+00
%5 = fmul double %3, %3
%6 = select i1 %4, double %5, double 0.000000e+00
ret double %6
}
void enable_interrupts() { __asm("sti"); }


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

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

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

LLVM IR (-O2):
define void @enable_interrupts() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int test_03(int a) { return a < 1 ? a : 1; }


x86 assembly (clang, -O0):
<test_03>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    111c <test_03+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <test_03+0x29>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <test_03+0x29>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_03>:
test   %edi,%edi
mov    $0x1,%eax
cmovle %edi,%eax
ret

LLVM IR (-O0):
define i32 @test_03(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi i32 [ %6, %5 ], [ 1, %7 ]
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_03(i32 %0) {
%2 = icmp slt i32 %0, 1
%3 = select i1 %2, i32 %0, i32 1
ret i32 %3
}
/* Variables and functions */
char *charToHexa(char);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
void convertType(char *type, char *res) {
  sprintf(res, "%s%s", charToHexa(type[0]), charToHexa(type[1]));
}


x86 assembly (clang, -O0):
<convertType>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <charToHexa@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1040 <charToHexa@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
lea    0xe99(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<convertType>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1040 <charToHexa@plt>
mov    %rax,%r15
movsbl 0x1(%rbx),%edi
call   1040 <charToHexa@plt>
lea    0xeba(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
mov    %rax,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
define void @convertType(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 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = call i8* @charToHexa(i8 signext %8)
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = call i8* @charToHexa(i8 signext %12)
%14 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define void @convertType(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = tail call i8* @charToHexa(i8 signext %3)
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = tail call i8* @charToHexa(i8 signext %6)
%8 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %7)
ret void
}
/* Type definitions */
struct render_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ render_list_add_orxy(struct render_list *, int, void const *,
                                        int /*<<< orphan*/, int /*<<< orphan*/,
                                        float, float, float);
void render_list_add_rxy(struct render_list *list, int type, const void *data,
                         float rotate, float x, float y) {
  render_list_add_orxy(list, type, data, 0, 0, rotate, x, y);
}


x86 assembly (clang, -O0):
<render_list_add_rxy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
movss  %xmm1,-0x20(%rbp)
movss  %xmm2,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
movss  -0x1c(%rbp),%xmm0
movss  -0x20(%rbp),%xmm1
movss  -0x24(%rbp),%xmm2
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1030 <render_list_add_orxy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<render_list_add_rxy>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <render_list_add_orxy@plt>

LLVM IR (-O0):
%struct.render_list = type { i32 }
define void @render_list_add_rxy(%struct.render_list* %0, i32 %1, i8* %2, float %3, float %4, float %5) {
%7 = alloca %struct.render_list*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca float
%11 = alloca float
%12 = alloca float
store %struct.render_list* %0, %struct.render_list** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load %struct.render_list*, %struct.render_list** %7
%14 = load i32, i32* %8
%15 = load i8*, i8** %9
%16 = load float, float* %10
%17 = load float, float* %11
%18 = load float, float* %12
%19 = call i32 @render_list_add_orxy(%struct.render_list* %13, i32 %14, i8* %15, i32 0, i32 0, float %16, float %17, float %18)
ret void
}

LLVM IR (-O2):
%struct.render_list = type { i32 }
define void @render_list_add_rxy(%struct.render_list* %0, i32 %1, i8* %2, float %3, float %4, float %5) {
%7 = tail call i32 @render_list_add_orxy(%struct.render_list* %0, i32 %1, i8* %2, i32 0, i32 0, float %3, float %4, float %5)
ret void
}
__attribute__((no)) int foo(int a, unsigned b) {
  unsigned c = 1;
  if (b >= 1 && b <= ((unsigned)(-1) - 1))
    return 0;
  c = b >> 4;
  if (c == 268435455)
    ;
  else
    __builtin_abort();
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x1,-0xc(%rbp)
jb     1145 <foo+0x35>
cmpl   $0xfffffffe,-0xc(%rbp)
ja     1145 <foo+0x35>
movl   $0x0,-0x4(%rbp)
jmp    116c <foo+0x5c>
mov    -0xc(%rbp),%eax
shr    $0x4,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0xfffffff,-0x10(%rbp)
jne    1160 <foo+0x50>
jmp    1165 <foo+0x55>
call   1030 <abort@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
test   %esi,%esi
je     1117 <foo+0x7>
xor    %eax,%eax
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @foo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 1, i32* %6
%7 = load i32, i32* %5
%8 = icmp uge i32 %7, 1
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* %5
%11 = icmp ule i32 %10, -2
br i1 %11, label %12, label %13
12: ; preds = %9
store i32 0, i32* %3
br label %21
13: ; preds = %9, %2
%14 = load i32, i32* %5
%15 = lshr i32 %14, 4
store i32 %15, i32* %6
%16 = load i32, i32* %6
%17 = icmp eq i32 %16, 268435455
br i1 %17, label %18, label %19
18: ; preds = %13
br label %20
19: ; preds = %13
unreachable
20: ; preds = %18
store i32 0, i32* %3
br label %21
21: ; preds = %20, %12
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @foo(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %5
4: ; preds = %2
tail call void @abort()
unreachable
5: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int);
int main(void) {
  int i;
  srand(19034525245636);
  for (i = 0; i < 100; i++)
    printf("%d\n", rand() % 1000);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xd21da0c4,%edi
call   1040 <srand@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1185 <main+0x55>
mov    $0x0,%al
call   1050 <rand@plt>
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1150 <main+0x20>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0xd21da0c4,%edi
call   1040 <srand@plt>
mov    $0x64,%ebp
lea    0xeb7(%rip),%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <rand@plt>
movslq %eax,%rsi
imul   $0x10624dd3,%rsi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
imul   $0x3e8,%eax,%eax
sub    %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebp
jne    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @srand(i32 -769810236)
store i32 0, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = call i32 (...) @rand()
%9 = srem i32 %8, 1000
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @srand(i32 -769810236)
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %7, %2 ]
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, 1000
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 100
br i1 %8, label %9, label %2
9: ; preds = %2
ret i32 0
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_append_list(struct list *, struct list const *);
struct list *list_new(int /*<<< orphan*/);
struct list *list_copy(const struct list *l) {
  struct list *n = list_new(0);
  list_append_list(n, l);
  return n;
}


x86 assembly (clang, -O0):
<list_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1040 <list_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <list_append_list@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_copy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1040 <list_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <list_append_list@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.list = type { i32 }
define %struct.list* @list_copy(%struct.list* %0) {
%2 = alloca %struct.list*
%3 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%4 = call %struct.list* @list_new(i32 0)
store %struct.list* %4, %struct.list** %3
%5 = load %struct.list*, %struct.list** %3
%6 = load %struct.list*, %struct.list** %2
%7 = call i32 @list_append_list(%struct.list* %5, %struct.list* %6)
%8 = load %struct.list*, %struct.list** %3
ret %struct.list* %8
}

LLVM IR (-O2):
%struct.list = type { i32 }
define %struct.list* @list_copy(%struct.list* %0) {
%2 = tail call %struct.list* @list_new(i32 0)
%3 = tail call i32 @list_append_list(%struct.list* %2, %struct.list* %0)
ret %struct.list* %2
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int puts(const char *string) {
  while (*string) {
    putchar(*string++);
  }
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putchar(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 0
}
/* Variables and functions */
unsigned int *vrna_refBPdist_matrix(short const *, short const *, unsigned int);
unsigned int *compute_BPdifferences(short *pt1, short *pt2, unsigned int turn) {
  return vrna_refBPdist_matrix((const short *)pt1, (const short *)pt2, turn);
}


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

x86 assembly (clang, -O2):
<compute_BPdifferences>:
jmp    1030 <vrna_refBPdist_matrix@plt>

LLVM IR (-O0):
define i32* @compute_BPdifferences(i16* %0, i16* %1, i32 %2) {
%4 = alloca i16*
%5 = alloca i16*
%6 = alloca i32
store i16* %0, i16** %4
store i16* %1, i16** %5
store i32 %2, i32* %6
%7 = load i16*, i16** %4
%8 = load i16*, i16** %5
%9 = load i32, i32* %6
%10 = call i32* @vrna_refBPdist_matrix(i16* %7, i16* %8, i32 %9)
ret i32* %10
}

LLVM IR (-O2):
define i32* @compute_BPdifferences(i16* %0, i16* %1, i32 %2) {
%4 = tail call i32* @vrna_refBPdist_matrix(i16* %0, i16* %1, i32 %2)
ret i32* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double f = 12344321.0;
  int p = 10000;
  printf("Div: %f\n", f / p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movl   $0x2710,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"Div: %f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double 0x409349BA786C2268)
ret i32 0
}
int test_imm_DEint16_reg(short val) {
  return ((val) & (-0xDE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DEint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0xffffff22,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_DEint16_reg>:
test   $0xff22,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_DEint16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, -222
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_DEint16_reg(i16 signext %0) {
%2 = and i16 %0, -222
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
int aaip_xinfo_func(void *data, int flag) {
  if (flag & 1) {
    free(data);
  }
  return 1;
}


x86 assembly (clang, -O0):
<aaip_xinfo_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1137 <aaip_xinfo_func+0x27>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aaip_xinfo_func>:
test   $0x1,%sil
je     1120 <aaip_xinfo_func+0x10>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @aaip_xinfo_func(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 = and i32 %5, 1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = call i32 @free(i8* %9)
br label %11
11: ; preds = %8, %2
ret i32 1
}

LLVM IR (-O2):
define i32 @aaip_xinfo_func(i8* nocapture %0, i32 %1) {
%3 = and i32 %1, 1
%4 = icmp eq i32 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %0)
br label %7
7: ; preds = %5, %2
ret i32 1
}