xunge/DecIR huggingface dataset:
unsigned short int isoperand(char symb) {
  if (symb == '+' || symb == '-' || symb == '*' || symb == '/' || symb == '%')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isoperand>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movsbl -0x3(%rbp),%eax
cmp    $0x2b,%eax
je     114b <isoperand+0x4b>
movsbl -0x3(%rbp),%eax
cmp    $0x2d,%eax
je     114b <isoperand+0x4b>
movsbl -0x3(%rbp),%eax
cmp    $0x2a,%eax
je     114b <isoperand+0x4b>
movsbl -0x3(%rbp),%eax
cmp    $0x2f,%eax
je     114b <isoperand+0x4b>
movsbl -0x3(%rbp),%eax
cmp    $0x25,%eax
jne    1156 <isoperand+0x56>
movw   $0x1,-0x2(%rbp)
jmp    115c <isoperand+0x5c>
movw   $0x0,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isoperand>:
add    $0xdb,%dil
cmp    $0xa,%dil
ja     111a <isoperand+0x1a>
movsbq %dil,%rax
lea    0xeeb(%rip),%rcx
movzwl (%rcx,%rax,2),%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define zeroext i16 @isoperand(i8 signext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 43
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 42
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 47
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 37
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i16 1, i16* %2
br label %25
24: ; preds = %19
store i16 0, i16* %2
br label %25
25: ; preds = %24, %23
%26 = load i16, i16* %2
ret i16 %26
}

LLVM IR (-O2):
@switch.table.isoperand = [11 x i16] [i16 1, i16 0, i16 0, i16 0, i16 0, i16 1, i16 1, i16 0, i16 1, i16 0, i16 1]
define zeroext i16 @isoperand(i8 signext %0) {
%2 = add i8 %0, -37
%3 = icmp ult i8 %2, 11
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [11 x i16], [11 x i16]* @switch.table.isoperand, i64 0, i64 %5
%7 = load i16, i16* %6
br label %8
8: ; preds = %1, %4
%9 = phi i16 [ %7, %4 ], [ 0, %1 ]
ret i16 %9
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
struct list *list_begin(struct list const *);
scalar_t__ list_is_empty(struct list const *);
struct list *list_first(const struct list *head) {
  if (list_is_empty(head)) {
    return NULL;
  }
  return list_begin(head);
}


x86 assembly (clang, -O0):
<list_first>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <list_is_empty@plt>
cmp    $0x0,%rax
je     114c <list_first+0x2c>
movq   $0x0,-0x8(%rbp)
jmp    1159 <list_first+0x39>
mov    -0x10(%rbp),%rdi
call   1030 <list_begin@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_first>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_is_empty@plt>
test   %rax,%rax
je     1132 <list_first+0x12>
xor    %eax,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <list_begin@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define %struct.list* @list_first(%struct.list* %0) {
%2 = alloca %struct.list*
%3 = alloca %struct.list*
store %struct.list* %0, %struct.list** %3
%4 = load %struct.list*, %struct.list** %3
%5 = call i64 @list_is_empty(%struct.list* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store %struct.list* null, %struct.list** %2
br label %11
8: ; preds = %1
%9 = load %struct.list*, %struct.list** %3
%10 = call %struct.list* @list_begin(%struct.list* %9)
store %struct.list* %10, %struct.list** %2
br label %11
11: ; preds = %8, %7
%12 = load %struct.list*, %struct.list** %2
ret %struct.list* %12
}

LLVM IR (-O2):
%struct.list = type { i32 }
define %struct.list* @list_first(%struct.list* %0) {
%2 = tail call i64 @list_is_empty(%struct.list* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call %struct.list* @list_begin(%struct.list* %0)
br label %6
6: ; preds = %1, %4
%7 = phi %struct.list* [ %5, %4 ], [ null, %1 ]
ret %struct.list* %7
}
/* Variables and functions */
int /*<<< orphan*/ asic_clear();
int /*<<< orphan*/ asic_wait(int);
int /*<<< orphan*/ pvr2_render_load_scene(int /*<<< orphan*/);
int /*<<< orphan*/ pvr2_render_loaded_scene();
int /*<<< orphan*/ pvr_init();
int /*<<< orphan*/ stdin;
int main() {
  pvr_init();
  pvr2_render_load_scene(stdin);
  pvr2_render_loaded_scene();
  asic_clear();
  asic_wait(5);
  asic_clear();
  asic_wait(5);
  asic_clear();
  asic_wait(5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pvr_init@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1050 <pvr2_render_load_scene@plt>
mov    $0x0,%al
call   1060 <pvr2_render_loaded_scene@plt>
mov    $0x0,%al
call   1070 <asic_clear@plt>
mov    $0x5,%edi
call   1040 <asic_wait@plt>
mov    $0x0,%al
call   1070 <asic_clear@plt>
mov    $0x5,%edi
call   1040 <asic_wait@plt>
mov    $0x0,%al
call   1070 <asic_clear@plt>
mov    $0x5,%edi
call   1040 <asic_wait@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <pvr_init@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1050 <pvr2_render_load_scene@plt>
xor    %eax,%eax
call   1060 <pvr2_render_loaded_scene@plt>
xor    %eax,%eax
call   1070 <asic_clear@plt>
mov    $0x5,%edi
call   1040 <asic_wait@plt>
xor    %eax,%eax
call   1070 <asic_clear@plt>
mov    $0x5,%edi
call   1040 <asic_wait@plt>
xor    %eax,%eax
call   1070 <asic_clear@plt>
mov    $0x5,%edi
call   1040 <asic_wait@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = call i32 (...) @pvr_init()
%2 = load i32, i32* @stdin
%3 = call i32 @pvr2_render_load_scene(i32 %2)
%4 = call i32 (...) @pvr2_render_loaded_scene()
%5 = call i32 (...) @asic_clear()
%6 = call i32 @asic_wait(i32 5)
%7 = call i32 (...) @asic_clear()
%8 = call i32 @asic_wait(i32 5)
%9 = call i32 (...) @asic_clear()
%10 = call i32 @asic_wait(i32 5)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @pvr_init()
%2 = load i32, i32* @stdin
%3 = tail call i32 @pvr2_render_load_scene(i32 %2)
%4 = tail call i32 (...) @pvr2_render_loaded_scene()
%5 = tail call i32 (...) @asic_clear()
%6 = tail call i32 @asic_wait(i32 5)
%7 = tail call i32 (...) @asic_clear()
%8 = tail call i32 @asic_wait(i32 5)
%9 = tail call i32 (...) @asic_clear()
%10 = tail call i32 @asic_wait(i32 5)
ret i32 0
}
int parseRotations(struct SystemState *state, unsigned char *buffer,
                   unsigned int number) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.SystemState = type opaque
define i32 @parseRotations(%struct.SystemState* %0, i8* %1, i32 %2) {
%4 = alloca %struct.SystemState*
%5 = alloca i8*
%6 = alloca i32
store %struct.SystemState* %0, %struct.SystemState** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
%struct.SystemState = type opaque
define i32 @parseRotations(%struct.SystemState* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ is_even(int);
bool is_odd(int n) { return (!is_even(n)); }


x86 assembly (clang, -O0):
<is_odd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <is_even@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @is_odd(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @is_even(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_odd(i32 %0) {
%2 = tail call i32 @is_even(i32 %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void GrOffScreen8BPPPixelDraw(void *pvDisplayData, long lX, long lY,
                              unsigned long ulValue) {
  unsigned char *pucData;
  ;
  pucData = (unsigned char *)pvDisplayData;
  pucData += (*(unsigned short *)(pucData + 1) * lY) + lX + 6 + (256 * 3);
  *pucData = ulValue;
}


x86 assembly (clang, -O0):
<GrOffScreen8BPPPixelDraw>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movzwl 0x1(%rax),%eax
imul   -0x18(%rbp),%rax
add    -0x10(%rbp),%rax
add    $0x6,%rax
add    $0x300,%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    %al,%cl
mov    -0x28(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GrOffScreen8BPPPixelDraw>:
movzwl 0x1(%rdi),%eax
imul   %rdx,%rax
add    %rsi,%rax
mov    %cl,0x306(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @GrOffScreen8BPPPixelDraw(i8* %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
store i8* %10, i8** %9
%11 = load i8*, i8** %9
%12 = getelementptr inbounds i8, i8* %11, i64 1
%13 = bitcast i8* %12 to i16*
%14 = load i16, i16* %13
%15 = zext i16 %14 to i64
%16 = load i64, i64* %7
%17 = mul nsw i64 %15, %16
%18 = load i64, i64* %6
%19 = add nsw i64 %17, %18
%20 = add nsw i64 %19, 6
%21 = add nsw i64 %20, 768
%22 = load i8*, i8** %9
%23 = getelementptr inbounds i8, i8* %22, i64 %21
store i8* %23, i8** %9
%24 = load i64, i64* %8
%25 = trunc i64 %24 to i8
%26 = load i8*, i8** %9
store i8 %25, i8* %26
ret void
}

LLVM IR (-O2):
define void @GrOffScreen8BPPPixelDraw(i8* nocapture %0, i64 %1, i64 %2, i64 %3) {
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = bitcast i8* %5 to i16*
%7 = load i16, i16* %6
%8 = zext i16 %7 to i64
%9 = mul nsw i64 %8, %2
%10 = add i64 %1, 774
%11 = add i64 %10, %9
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = trunc i64 %3 to i8
store i8 %13, i8* %12
ret void
}
void SensorSetET_Test(unsigned char *RegBuf, unsigned char div) {}


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

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

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

LLVM IR (-O2):
define void @SensorSetET_Test(i8* nocapture %0, i8 zeroext %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_lst(void *d1) {
  char *d1s;
  d1s = (char *)d1;
  printf("%s\n", d1s);
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @print_lst(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snmp_disable_syslog();
void snmp_enable_syslog(void) { snmp_disable_syslog(); }


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

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

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

LLVM IR (-O2):
define void @snmp_enable_syslog() {
%1 = tail call i32 (...) @snmp_disable_syslog()
ret void
}
void emit_ordering_less(struct processor_explicatory_state *process_state,
                        struct modern_stream *stream, void *stream_state,
                        struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_ordering_less>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_ordering_less(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_ordering_less(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
double __ocml_sinpi_f64(double);
double sinpi(double x) { return __ocml_sinpi_f64(x); }


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

x86 assembly (clang, -O2):
<sinpi>:
jmp    1030 <__ocml_sinpi_f64@plt>

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

LLVM IR (-O2):
define double @sinpi(double %0) {
%2 = tail call double @__ocml_sinpi_f64(double %0)
ret double %2
}
int dblcmp(double d1, double d2) {
  double epsilon = d1 - d2;
  if (epsilon < 0.0)
    return -1;
  else if (epsilon > 0.0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<dblcmp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1137 <dblcmp+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    115c <dblcmp+0x5c>
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1155 <dblcmp+0x55>
movl   $0x1,-0x4(%rbp)
jmp    115c <dblcmp+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dblcmp>:
subsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @dblcmp(double %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double %7, %8
store double %9, double* %6
%10 = load double, double* %6
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 -1, i32* %3
br label %18
13: ; preds = %2
%14 = load double, double* %6
%15 = fcmp ogt double %14, 0.000000e+00
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 1, i32* %3
br label %18
17: ; preds = %13
store i32 0, i32* %3
br label %18
18: ; preds = %17, %16, %12
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @dblcmp(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fcmp olt double %3, 0.000000e+00
%5 = fcmp ogt double %3, 0.000000e+00
%6 = zext i1 %5 to i32
%7 = select i1 %4, i32 -1, i32 %6
ret i32 %7
}
/* Variables and functions */
double RAND_MAX;
int rand();
int irand(int min, int max) {
  return min + (int)(rand() * (max - min + 1.0) / (1.0 + RAND_MAX));
}


x86 assembly (clang, -O0):
<irand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cvtsi2sd %ecx,%xmm0
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cvtsi2sd %ecx,%xmm1
movsd  0xeba(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeaa(%rip),%xmm1
mov    0x2e8b(%rip),%rcx
addsd  (%rcx),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irand>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2sd %eax,%xmm0
sub    %ebp,%ebx
cvtsi2sd %ebx,%xmm1
movsd  0xed0(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm0,%xmm1
mov    0x2ea9(%rip),%rax
addsd  (%rax),%xmm2
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%eax
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define i32 @irand(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 = call i32 (...) @rand()
%7 = sitofp i32 %6 to double
%8 = load i32, i32* %4
%9 = load i32, i32* %3
%10 = sub nsw i32 %8, %9
%11 = sitofp i32 %10 to double
%12 = fadd double %11, 1.000000e+00
%13 = fmul double %7, %12
%14 = load double, double* @RAND_MAX
%15 = fadd double 1.000000e+00, %14
%16 = fdiv double %13, %15
%17 = fptosi double %16 to i32
%18 = add nsw i32 %5, %17
ret i32 %18
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define i32 @irand(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sitofp i32 %3 to double
%5 = sub nsw i32 %1, %0
%6 = sitofp i32 %5 to double
%7 = fadd double %6, 1.000000e+00
%8 = fmul double %7, %4
%9 = load double, double* @RAND_MAX
%10 = fadd double %9, 1.000000e+00
%11 = fdiv double %8, %10
%12 = fptosi double %11 to i32
%13 = add nsw i32 %12, %0
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void _warn_no_newline(const char *message) { fprintf(stderr, "%s", message); }


x86 assembly (clang, -O0):
<_warn_no_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_warn_no_newline>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @_warn_no_newline(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 ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @_warn_no_newline(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_env_masks();
int c_masklist(int argc, char *argv[]) {
  display_env_masks();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @c_masklist(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @display_env_masks()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ random_u08();
void rand_bytes(uint8_t *b, size_t blen) {
  size_t i;
  for (i = 0; i < blen; i++) {
    b[i] = random_u08();
  }
}


x86 assembly (clang, -O0):
<rand_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    115b <rand_bytes+0x4b>
mov    $0x0,%al
call   1030 <random_u08@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <rand_bytes+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_bytes>:
push   %r15
push   %r14
push   %rbx
test   %rsi,%rsi
je     1144 <rand_bytes+0x34>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <random_u08@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <rand_bytes+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @rand_bytes(i32* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %10, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %8, %4 ], [ 0, %2 ]
%6 = tail call i32 (...) @random_u08()
%7 = getelementptr inbounds i32, i32* %0, i64 %5
store i32 %6, i32* %7
%8 = add nuw i64 %5, 1
%9 = icmp eq i64 %8, %1
br i1 %9, label %10, label %4
10: ; preds = %4, %2
ret void
}
char *strcat(char *dest, const char *src) {
  while (*dest) {
    dest++;
  }
  while (*src) {
    *dest++ = *src++;
  }
  *dest = '\0';
  return dest;
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     112a <strcat+0x2a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <strcat+0xc>
jmp    112f <strcat+0x2f>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1163 <strcat+0x63>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    112f <strcat+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
add    $0x1,%rdi
cmpb   $0x0,(%rax)
jne    1100 <strcat>
mov    (%rsi),%cl
test   %cl,%cl
je     1136 <strcat+0x36>
mov    $0xffffffffffffffff,%rax
nopl   0x0(%rax)
mov    %cl,(%rdi,%rax,1)
movzbl 0x2(%rsi,%rax,1),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1120 <strcat+0x20>
add    %rax,%rdi
mov    %rdi,%rax
movb   $0x0,(%rax)
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = load i8, i8* %1
%10 = icmp eq i8 %9, 0
br i1 %10, label %19, label %11
11: ; preds = %8, %11
%12 = phi i8 [ %17, %11 ], [ %9, %8 ]
%13 = phi i8* [ %15, %11 ], [ %1, %8 ]
%14 = phi i8* [ %16, %11 ], [ %4, %8 ]
%15 = getelementptr inbounds i8, i8* %13, i64 1
%16 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %12, i8* %14
%17 = load i8, i8* %15
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %11
19: ; preds = %11, %8
%20 = phi i8* [ %4, %8 ], [ %16, %11 ]
store i8 0, i8* %20
ret i8* %20
}
other_func(booo) { echo(booo); }


x86 assembly (clang, -O0):
<other_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <echo@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @other_func(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @echo to i32 (i32, ...)*)(i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @other_func(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @echo to i32 (i32, ...)*)(i32 %0)
ret i32 undef
}
void gtk_ui_manager_get_action_groups() {}


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

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

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

LLVM IR (-O2):
define void @gtk_ui_manager_get_action_groups() {
ret void
}
/* Variables and functions */
int lpxrxtest_main(int, char **);
int main(int argc, char **argv) { return lpxrxtest_main(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <lpxrxtest_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <lpxrxtest_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @lpxrxtest_main(i32 %0, i8** %1)
ret i32 %3
}
void monte_nums_of_vars(long *ilen, long *olen, long *ffunc) {
  *ilen = 7;
  *olen = 4;
  *ffunc = -1;
}


x86 assembly (clang, -O0):
<monte_nums_of_vars>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x7,(%rax)
mov    -0x10(%rbp),%rax
movq   $0x4,(%rax)
mov    -0x18(%rbp),%rax
movq   $0xffffffffffffffff,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<monte_nums_of_vars>:
movq   $0x7,(%rdi)
movq   $0x4,(%rsi)
movq   $0xffffffffffffffff,(%rdx)
ret

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

LLVM IR (-O2):
define void @monte_nums_of_vars(i64* nocapture writeonly %0, i64* nocapture writeonly %1, i64* nocapture writeonly %2) {
store i64 7, i64* %0
store i64 4, i64* %1
store i64 -1, i64* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_test(int, int);
int main() {
  int *x, y;
  for (*x = 0; *x < 10; ++(*x))
    ;
  while (y != 90) {
    if (y < 80) {
      y = y + 10;
    } else if (y >= 80) {
      ++y;
    }
  }
  print_test(*x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0xa,(%rax)
jge    114b <main+0x3b>
jmp    113b <main+0x2b>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
jmp    1129 <main+0x19>
jmp    1150 <main+0x40>
cmpl   $0x5a,-0x14(%rbp)
je     118f <main+0x7f>
cmpl   $0x50,-0x14(%rbp)
jge    1172 <main+0x62>
mov    -0x14(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x14(%rbp)
jmp    118a <main+0x7a>
cmpl   $0x50,-0x14(%rbp)
jl     1185 <main+0x75>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118a <main+0x7a>
jmp    1150 <main+0x40>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%esi
call   1030 <print_test@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0x58() {
  Assert_real((isdigit(88) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isdigit.c",
              445, ("isdigit should be 0 for X"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isdigit.c\00"
@.str.1 = [26 x i8] c"isdigit should be 0 for X\00"
define void @t_isdigit_0x58() {
%1 = tail call i64 @isdigit(i32 88)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 445, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ project_manager_shutdown_project(char const *);
int /*<<< orphan*/ project_manager_start_project(char const *);
void project_manager_restart_project(const char *proj) {
  project_manager_shutdown_project(proj);
  project_manager_start_project(proj);
}


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

x86 assembly (clang, -O2):
<project_manager_restart_project>:
push   %rbx
mov    %rdi,%rbx
call   1040 <project_manager_shutdown_project@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <project_manager_start_project@plt>

LLVM IR (-O0):
define void @project_manager_restart_project(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @project_manager_shutdown_project(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @project_manager_start_project(i8* %5)
ret void
}

LLVM IR (-O2):
define void @project_manager_restart_project(i8* %0) {
%2 = tail call i32 @project_manager_shutdown_project(i8* %0)
%3 = tail call i32 @project_manager_start_project(i8* %0)
ret void
}
/* Variables and functions */
int M_PI;
double degps_of_radps(double rps) { return (rps / (2 * M_PI) * 60 * 360); }


x86 assembly (clang, -O0):
<degps_of_radps>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<degps_of_radps>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm0
mulsd  0xee5(%rip),%xmm0
mulsd  0xee5(%rip),%xmm0
ret

LLVM IR (-O0):
@M_PI = global i32 0
define double @degps_of_radps(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load i32, i32* @M_PI
%5 = mul nsw i32 2, %4
%6 = sitofp i32 %5 to double
%7 = fdiv double %3, %6
%8 = fmul double %7, 6.000000e+01
%9 = fmul double %8, 3.600000e+02
ret double %9
}

LLVM IR (-O2):
@M_PI = global i32 0
define double @degps_of_radps(double %0) {
%2 = load i32, i32* @M_PI
%3 = shl nsw i32 %2, 1
%4 = sitofp i32 %3 to double
%5 = fdiv double %0, %4
%6 = fmul double %5, 6.000000e+01
%7 = fmul double %6, 3.600000e+02
ret double %7
}
unsigned long power(int x, int n) {
  unsigned long a = 1;
  int i;
  for (i = 1; i <= n; i++)
    a *= x;
  return a;
}


x86 assembly (clang, -O0):
<power>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1140 <power+0x40>
movslq -0x4(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1119 <power+0x19>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<power>:
test   %esi,%esi
jle    111b <power+0x1b>
movslq %edi,%rcx
lea    -0x1(%rsi),%eax
mov    %esi,%edx
and    $0x7,%edx
cmp    $0x7,%eax
jae    1121 <power+0x21>
mov    $0x1,%eax
jmp    1155 <power+0x55>
mov    $0x1,%eax
ret
and    $0xfffffff8,%esi
mov    $0x1,%eax
nopl   0x0(%rax)
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
imul   %rcx,%rax
add    $0xfffffff8,%esi
jne    1130 <power+0x30>
test   %edx,%edx
je     1169 <power+0x69>
nopl   0x0(%rax)
imul   %rcx,%rax
add    $0xffffffff,%edx
jne    1160 <power+0x60>
ret

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

LLVM IR (-O2):
define i64 @power(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 1
br i1 %3, label %34, label %4
4: ; preds = %2
%5 = sext i32 %0 to i64
%6 = add i32 %1, -1
%7 = and i32 %1, 7
%8 = icmp ult i32 %6, 7
br i1 %8, label %24, label %9
9: ; preds = %4
%10 = and i32 %1, -8
br label %11
11: ; preds = %11, %9
%12 = phi i64 [ 1, %9 ], [ %21, %11 ]
%13 = phi i32 [ 0, %9 ], [ %22, %11 ]
%14 = mul i64 %12, %5
%15 = mul i64 %14, %5
%16 = mul i64 %15, %5
%17 = mul i64 %16, %5
%18 = mul i64 %17, %5
%19 = mul i64 %18, %5
%20 = mul i64 %19, %5
%21 = mul i64 %20, %5
%22 = add i32 %13, 8
%23 = icmp eq i32 %22, %10
br i1 %23, label %24, label %11
24: ; preds = %11, %4
%25 = phi i64 [ undef, %4 ], [ %21, %11 ]
%26 = phi i64 [ 1, %4 ], [ %21, %11 ]
%27 = icmp eq i32 %7, 0
br i1 %27, label %34, label %28
28: ; preds = %24, %28
%29 = phi i64 [ %31, %28 ], [ %26, %24 ]
%30 = phi i32 [ %32, %28 ], [ 0, %24 ]
%31 = mul i64 %29, %5
%32 = add i32 %30, 1
%33 = icmp eq i32 %32, %7
br i1 %33, label %34, label %28
34: ; preds = %24, %28, %2
%35 = phi i64 [ 1, %2 ], [ %25, %24 ], [ %31, %28 ]
ret i64 %35
}
/* Variables and functions */
int minitest_fail(char const *, char const *, int);
int minitest_pass(char const *);
int assert_false(int actual, const char *msg, const char *caller, int line) {
  if (!actual) {
    return minitest_pass(msg);
  } else {
    return minitest_fail(msg, caller, line);
  }
}


x86 assembly (clang, -O0):
<assert_false>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1151 <assert_false+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <minitest_pass@plt>
mov    %eax,-0x4(%rbp)
jmp    1164 <assert_false+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <minitest_fail@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_false>:
test   %edi,%edi
je     1131 <assert_false+0x11>
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1040 <minitest_fail@plt>
mov    %rsi,%rdi
jmp    1030 <minitest_pass@plt>

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

LLVM IR (-O2):
define i32 @assert_false(i32 %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @minitest_pass(i8* %1)
br label %10
8: ; preds = %4
%9 = tail call i32 @minitest_fail(i8* %1, i8* %2, i32 %3)
br label %10
10: ; preds = %8, %6
%11 = phi i32 [ %9, %8 ], [ %7, %6 ]
ret i32 %11
}
void w19(void *x, long long y) { *(long long *)(x + 32749) = y; }


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

x86 assembly (clang, -O2):
<w19>:
mov    %rsi,0x7fed(%rdi)
ret

LLVM IR (-O0):
define void @w19(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32749
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w19(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32749
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
/* Type definitions */
struct state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ randomizeAllAngularVelocities(struct state *);
int /*<<< orphan*/ randomizeAllZoomularVelocities(struct state *);
void randomizeAllVelocities(struct state *st) {
  randomizeAllAngularVelocities(st);
  randomizeAllZoomularVelocities(st);
}


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

x86 assembly (clang, -O2):
<randomizeAllVelocities>:
push   %rbx
mov    %rdi,%rbx
call   1030 <randomizeAllAngularVelocities@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <randomizeAllZoomularVelocities@plt>

LLVM IR (-O0):
%struct.state = type { i32 }
define void @randomizeAllVelocities(%struct.state* %0) {
%2 = alloca %struct.state*
store %struct.state* %0, %struct.state** %2
%3 = load %struct.state*, %struct.state** %2
%4 = call i32 @randomizeAllAngularVelocities(%struct.state* %3)
%5 = load %struct.state*, %struct.state** %2
%6 = call i32 @randomizeAllZoomularVelocities(%struct.state* %5)
ret void
}

LLVM IR (-O2):
%struct.state = type { i32 }
define void @randomizeAllVelocities(%struct.state* %0) {
%2 = tail call i32 @randomizeAllAngularVelocities(%struct.state* %0)
%3 = tail call i32 @randomizeAllZoomularVelocities(%struct.state* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int a = 39173482;
  int b = 127371;
  assert(a % b == 70585);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x255bd6a,-0x8(%rbp)
movl   $0x1f18b,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x113b9,%edx
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 39173482, i32* %2
store i32 127371, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 70585
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
int ge(int a, int b) { return a >= b; }


x86 assembly (clang, -O0):
<ge>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ge>:
xor    %eax,%eax
cmp    %esi,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @ge(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 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ge(i32 %0, i32 %1) {
%3 = icmp sge i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t len = 0;
  while (s[len]) {
    ++len;
  }
  return len;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}