xunge/DecIR huggingface dataset:
/* Variables and functions */
int inb(unsigned short);
int serial_identify_interrupt(unsigned short com) {
  return inb((com + 2)) & 0x0E;
}


x86 assembly (clang, -O0):
<serial_identify_interrupt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
add    $0x2,%eax
movzwl %ax,%edi
call   1030 <inb@plt>
and    $0xe,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_identify_interrupt>:
push   %rax
add    $0x2,%edi
movzwl %di,%edi
call   1030 <inb@plt>
and    $0xe,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @serial_identify_interrupt(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = add nsw i32 %4, 2
%6 = trunc i32 %5 to i16
%7 = call i32 @inb(i16 zeroext %6)
%8 = and i32 %7, 14
ret i32 %8
}

LLVM IR (-O2):
define i32 @serial_identify_interrupt(i16 zeroext %0) {
%2 = add i16 %0, 2
%3 = tail call i32 @inb(i16 zeroext %2)
%4 = and i32 %3, 14
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int usage(void) {
  fprintf(stdout, "gen_extents <-f path> <-l filesize> <-c chunksize> "
                  "[-k keep] [-m]\n");
  fprintf(stdout,
          "Example:\n"
          "       gen_extents -f /storage/testifle -l 1073741824 -c 4096"
          "-k 1\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xefa(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf04(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [67 x i8] c"gen_extents <-f path> <-l filesize> <-c chunksize> [-k keep] [-m]\0A\00"
@.str.1 = [76 x i8] c"Example:\0A gen_extents -f /storage/testifle -l 1073741824 -c 4096-k 1\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [67 x i8] c"gen_extents <-f path> <-l filesize> <-c chunksize> [-k keep] [-m]\0A\00"
@.str.1 = [76 x i8] c"Example:\0A gen_extents -f /storage/testifle -l 1073741824 -c 4096-k 1\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int getpid();
int getppid();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("PID = %i\n", getpid());
  printf("PPID = %i\n", getppid());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <getppid@plt>
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [10 x i8] c"PID = %i\0A\00"
@.str.1 = [11 x i8] c"PPID = %i\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @getpid()
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 (...) @getppid()
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"PID = %i\0A\00"
@.str.1 = [11 x i8] c"PPID = %i\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 (...) @getppid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
unsigned int exynos_5410_gpio_read(unsigned int);
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_toggle_15() {
  unsigned int bank_offset = 0x0C20;
  unsigned int bit_index = 2;
  unsigned int d = exynos_5410_gpio_read(bank_offset);
  d ^= (1U << bit_index);
  exynos_5410_gpio_write_mask(bank_offset, d, (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_toggle_15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc20,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <exynos_5410_gpio_read@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_toggle_15>:
push   %rax
mov    $0xc20,%edi
call   1040 <exynos_5410_gpio_read@plt>
xor    $0x4,%eax
mov    $0xc20,%edi
mov    %eax,%esi
mov    $0x4,%edx
pop    %rax
jmp    1030 <exynos_5410_gpio_write_mask@plt>

LLVM IR (-O0):
define void @odroid_xu_gpio_toggle_15() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 3104, i32* %1
store i32 2, i32* %2
%4 = load i32, i32* %1
%5 = call i32 @exynos_5410_gpio_read(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = shl i32 1, %6
%8 = load i32, i32* %3
%9 = xor i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %1
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = shl i32 1, %12
%14 = call i32 @exynos_5410_gpio_write_mask(i32 %10, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_toggle_15() {
%1 = tail call i32 @exynos_5410_gpio_read(i32 3104)
%2 = xor i32 %1, 4
%3 = tail call i32 @exynos_5410_gpio_write_mask(i32 3104, i32 %2, i32 4)
ret void
}
int f_add(int a, int b) { return a + b; }


x86 assembly (clang, -O0):
<f_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_add>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @f_add(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 = add nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @f_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ wiznetRegReadWord(int /*<<< orphan*/, int);
uint16_t wiznetGetSocketRXReadPointer(uint8_t socket) {
  return wiznetRegReadWord(socket, (0x0000 + 0x0028));
}


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

x86 assembly (clang, -O2):
<wiznetGetSocketRXReadPointer>:
mov    $0x28,%esi
jmp    1030 <wiznetRegReadWord@plt>

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

LLVM IR (-O2):
define i32 @wiznetGetSocketRXReadPointer(i32 %0) {
%2 = tail call i32 @wiznetRegReadWord(i32 %0, i32 40)
ret i32 %2
}
/* Variables and functions */
int abs(int);
int /*<<< orphan*/ setLiftMotors(int);
int /*<<< orphan*/ wait1Msec(int);
void moveLiftWithTime(int speed, int time) {
  time = abs(time);
  setLiftMotors(speed);
  wait1Msec(time);
  setLiftMotors(0);
}


x86 assembly (clang, -O0):
<moveLiftWithTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <setLiftMotors@plt>
mov    -0x8(%rbp),%edi
call   1040 <wait1Msec@plt>
xor    %edi,%edi
call   1050 <setLiftMotors@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<moveLiftWithTime>:
push   %rbx
mov    %esi,%ebx
neg    %ebx
cmovs  %esi,%ebx
call   1040 <setLiftMotors@plt>
mov    %ebx,%edi
call   1030 <wait1Msec@plt>
xor    %edi,%edi
pop    %rbx
jmp    1040 <setLiftMotors@plt>

LLVM IR (-O0):
define void @moveLiftWithTime(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @abs(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %3
%8 = call i32 @setLiftMotors(i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @wait1Msec(i32 %9)
%11 = call i32 @setLiftMotors(i32 0)
ret void
}

LLVM IR (-O2):
define void @moveLiftWithTime(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %1, i1 true)
%4 = tail call i32 @setLiftMotors(i32 %0)
%5 = tail call i32 @wait1Msec(i32 %3)
%6 = tail call i32 @setLiftMotors(i32 0)
ret void
}
void maccess(void *p) { asm volatile("movq (%0), %%rax\n" : : "c"(p) : "rax"); }


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

x86 assembly (clang, -O2):
<maccess>:
mov    %rdi,%rcx
mov    (%rcx),%rax
ret

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

LLVM IR (-O2):
define void @maccess(i8* %0) {
tail call void asm sideeffect "movq ($0), %rax\0A", "{cx},~{rax},~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret void
}
void loadcpu(unsigned int i) {
  while (1)
    while (--i)
      ;
}


x86 assembly (clang, -O0):
<loadcpu>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    110c <loadcpu+0xc>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1123 <loadcpu+0x23>
jmp    110c <loadcpu+0xc>
jmp    1107 <loadcpu+0x7>

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

LLVM IR (-O0):
define void @loadcpu(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %9
br label %4
4: ; preds = %8, %3
%5 = load i32, i32* %2
%6 = add i32 %5, -1
store i32 %6, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
br label %3
}

LLVM IR (-O2):
define void @loadcpu(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int int_compare_32bit(void *ptr1, void *ptr2) {
  return *((int *)ptr1) < *((int *)ptr2);
}


x86 assembly (clang, -O0):
<int_compare_32bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_compare_32bit>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setl   %al
ret

LLVM IR (-O0):
define i32 @int_compare_32bit(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = icmp slt i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @int_compare_32bit(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int opal_next_poweroftwo_inclusive(int value) {
  int power2;
  for (power2 = 1; power2 < value; power2 <<= 1)
    ;
  return power2;
}


x86 assembly (clang, -O0):
<opal_next_poweroftwo_inclusive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <opal_next_poweroftwo_inclusive+0x2d>
jmp    111f <opal_next_poweroftwo_inclusive+0x1f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <opal_next_poweroftwo_inclusive+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opal_next_poweroftwo_inclusive>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <opal_next_poweroftwo_inclusive+0x10>
ret

LLVM IR (-O0):
define i32 @opal_next_poweroftwo_inclusive(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %4
br label %9
9: ; preds = %8
%10 = load i32, i32* %3
%11 = shl i32 %10, 1
store i32 %11, i32* %3
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @opal_next_poweroftwo_inclusive(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int __infer_nondet_int();
int toupper(int x) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
void rop3_85_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  stk1 = ~*D;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


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

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

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

LLVM IR (-O2):
define void @rop3_85_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = or i8 %5, %4
%7 = xor i8 %6, -1
%8 = and i8 %4, %1
%9 = or i8 %8, %7
%10 = and i8 %4, %2
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
/* Variables and functions */
float __nv_fsqrt_rn(float);
float __fsqrt_rn(float __a) { return __nv_fsqrt_rn(__a); }


x86 assembly (clang, -O0):
<__fsqrt_rn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__nv_fsqrt_rn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fsqrt_rn>:
jmp    1030 <__nv_fsqrt_rn@plt>

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

LLVM IR (-O2):
define float @__fsqrt_rn(float %0) {
%2 = tail call float @__nv_fsqrt_rn(float %0)
ret float %2
}
/* Variables and functions */
scalar_t__ do_test_read_seek_neg(char *, char *);
int do_test_read_seek_negative(void) {
  int ret = 0;
  ret += do_test_read_seek_neg("r", "0123456789");
  ret += do_test_read_seek_neg("a+", "z012345678");
  return ret;
}


x86 assembly (clang, -O0):
<do_test_read_seek_negative>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <do_test_read_seek_neg@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1030 <do_test_read_seek_neg@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_test_read_seek_negative>:
push   %rbx
lea    0xee8(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <do_test_read_seek_neg@plt>
mov    %rax,%rbx
lea    0xedf(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <do_test_read_seek_neg@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [11 x i8] c"0123456789\00"
@.str.2 = [3 x i8] c"a+\00"
@.str.3 = [11 x i8] c"z012345678\00"
define i32 @do_test_read_seek_negative() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @do_test_read_seek_neg(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = add nsw i64 %4, %2
%6 = trunc i64 %5 to i32
store i32 %6, i32* %1
%7 = call i64 @do_test_read_seek_neg(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%8 = load i32, i32* %1
%9 = sext i32 %8 to i64
%10 = add nsw i64 %9, %7
%11 = trunc i64 %10 to i32
store i32 %11, i32* %1
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [11 x i8] c"0123456789\00"
@.str.2 = [3 x i8] c"a+\00"
@.str.3 = [11 x i8] c"z012345678\00"
define i32 @do_test_read_seek_negative() {
%1 = tail call i64 @do_test_read_seek_neg(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @do_test_read_seek_neg(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%3 = add i64 %2, %1
%4 = trunc i64 %3 to i32
ret i32 %4
}
int test_imm_16uint8_mem(unsigned char *val) {
  return ((*val) & (-0x16 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_16uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffffea,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_16uint8_mem>:
testb  $0xea,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_16uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -22
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int add1(int m, int n) {
  int c4 = m + n;
  return c4;
}


x86 assembly (clang, -O0):
<add1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add1>:
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @add1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @add1(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *);
main() {
  float kmHora;
  scanf("%f", &kmHora);
  printf("%f", (kmHora / 3.6));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xedc(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xeb5(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fdiv double %5, 3.600000e+00
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%4 = load float, float* %1
%5 = fpext float %4 to double
%6 = fdiv double %5, 3.600000e+00
%7 = fptrunc double %6 to float
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %7)
ret i32 0
}
int block_func(void) {
  int i = 0;
  {
    double i = 1.0;
    double f = 2.0;
    {
      const char *i = "stuff";
      const char *f = "foo";
      const char *b = "bar";
      return 0;
    }
  }
}


x86 assembly (clang, -O0):
<block_func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
lea    0xee4(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xedf(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xed8(%rip),%rax
mov    %rax,-0x30(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [6 x i8] c"stuff\00"
@.str.1 = [4 x i8] c"foo\00"
@.str.2 = [4 x i8] c"bar\00"
define i32 @block_func() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i32 0, i32* %1
store double 1.000000e+00, double* %2
store double 2.000000e+00, double* %3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8** %6
ret i32 0
}

LLVM IR (-O2):
define i32 @block_func() {
ret i32 0
}
void sprd_turnoff_watchdog(void) {}


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

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

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

LLVM IR (-O2):
define void @sprd_turnoff_watchdog() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ERR_clear_error();
int /*<<< orphan*/ OPENSSL_INIT_LOAD_CRYPTO_STRINGS;
int /*<<< orphan*/ OPENSSL_init_crypto(int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
int FuzzerInitialize(int *argc, char ***argv) {
  OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ERR_clear_error();
  return 1;
}


x86 assembly (clang, -O0):
<FuzzerInitialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <OPENSSL_init_crypto@plt>
mov    $0x0,%al
call   1030 <ERR_clear_error@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FuzzerInitialize>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <OPENSSL_init_crypto@plt>
xor    %eax,%eax
call   1030 <ERR_clear_error@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* %0, i8*** %1) {
%3 = alloca i32*
%4 = alloca i8***
store i32* %0, i32** %3
store i8*** %1, i8**** %4
%5 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%6 = call i32 @OPENSSL_init_crypto(i32 %5, i32* null)
%7 = call i32 (...) @ERR_clear_error()
ret i32 1
}

LLVM IR (-O2):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%4 = tail call i32 @OPENSSL_init_crypto(i32 %3, i32* null)
%5 = tail call i32 (...) @ERR_clear_error()
ret i32 1
}
/* Variables and functions */
char *strdup(char *);
int strlen(char *);
char *strstr(char *, char *);
char *tftpFile(char *URL) {
  char *host = URL + strlen("tftp://");
  char *filename = strstr(host, "/") + 1;
  if (filename) {
    return strdup(filename);
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<tftpFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
lea    0xeb5(%rip),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1050 <strstr@plt>
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1195 <tftpFile+0x65>
mov    -0x20(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    119d <tftpFile+0x6d>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tftpFile>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    $0x2f,%esi
call   1040 <strchr@plt>
lea    0x1(%rax),%rdi
pop    %rbx
jmp    1050 <strdup@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"tftp://\00"
@.str.1 = [2 x i8] c"/\00"
define i8* @tftpFile(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = call i8* @strstr(i8* %10, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = getelementptr inbounds i8, i8* %11, i64 1
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %18
15: ; preds = %1
%16 = load i8*, i8** %5
%17 = call i8* @strdup(i8* %16)
store i8* %17, i8** %2
br label %19
18: ; preds = %1
store i8* null, i8** %2
br label %19
19: ; preds = %18, %15
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [8 x i8] c"tftp://\00"
define noalias i8* @tftpFile(i8* %0) {
%2 = tail call i32 @strlen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i8* @strchr(i8* dereferenceable(1) %4, i32 47)
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = tail call i8* @strdup(i8* %6)
ret i8* %7
}
/* Variables and functions */
int syscall(int, char const *, char const *);
int test_cowcopy(const char *src, const char *dest) {
  return syscall(378, src, dest);
}


x86 assembly (clang, -O0):
<test_cowcopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x17a,%edi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cowcopy>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x17a,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @test_cowcopy(i8* %0, i8* %1) {
%3 = tail call i32 @syscall(i32 378, i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int size_in_medium(size_t size) {
  return size <= (size_t)(16 * 4 * 1024) && size > 256;
}


x86 assembly (clang, -O0):
<size_in_medium>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x10000,-0x8(%rbp)
mov    %al,-0x9(%rbp)
ja     1129 <size_in_medium+0x29>
cmpq   $0x100,-0x8(%rbp)
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<size_in_medium>:
add    $0xfffffffffffffeff,%rdi
xor    %eax,%eax
cmp    $0xff00,%rdi
setb   %al
ret

LLVM IR (-O0):
define i32 @size_in_medium(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp ule i64 %3, 65536
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i64, i64* %2
%7 = icmp ugt i64 %6, 256
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @size_in_medium(i64 %0) {
%2 = add i64 %0, -257
%3 = icmp ult i64 %2, 65280
%4 = zext i1 %3 to i32
ret i32 %4
}
short __min_short(short x, short y) { return ((x) > (y) ? (y) : (x)); }


x86 assembly (clang, -O0):
<__min_short>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movswl -0x4(%rbp),%ecx
cmp    %ecx,%eax
jle    112e <__min_short+0x2e>
movswl -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <__min_short+0x35>
movswl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<__min_short>:
mov    %edi,%eax
cmp    %si,%ax
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define signext i16 @__min_short(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = icmp sgt i32 %6, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i16, i16* %4
%12 = sext i16 %11 to i32
br label %16
13: ; preds = %2
%14 = load i16, i16* %3
%15 = sext i16 %14 to i32
br label %16
16: ; preds = %13, %10
%17 = phi i32 [ %12, %10 ], [ %15, %13 ]
%18 = trunc i32 %17 to i16
ret i16 %18
}

LLVM IR (-O2):
define signext i16 @__min_short(i16 signext %0, i16 signext %1) {
%3 = icmp sgt i16 %0, %1
%4 = select i1 %3, i16 %1, i16 %0
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 1;
  switch (a) {
    int b = 20;
  case 1:
    printf("b is %d\n", b);
    break;
  default:
    printf("b is %d\n", b);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    114b <main+0x3b>
jmp    1137 <main+0x27>
mov    -0xc(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
jmp    115a <main+0x4a>
mov    -0xc(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"b is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SendChar(int);
void GetScreen(void) {
  SendChar((0XEE) & 0xFF);
  SendChar((0xB1) & 0xFF);
  SendChar((0x01) & 0xFF);
  SendChar((((0XFFFCFFFF) >> 16) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) >> 16) & 0xFF);
  SendChar((((0XFFFCFFFF) & 0xFFFF) >> 8) & 0xFF);
  SendChar(((0XFFFCFFFF) & 0xFFFF) & 0xFF);
}


x86 assembly (clang, -O0):
<GetScreen>:
push   %rbp
mov    %rsp,%rbp
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x1,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetScreen>:
push   %rax
mov    $0xee,%edi
call   1030 <SendChar@plt>
mov    $0xb1,%edi
call   1030 <SendChar@plt>
mov    $0x1,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xfc,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
call   1030 <SendChar@plt>
mov    $0xff,%edi
pop    %rax
jmp    1030 <SendChar@plt>

LLVM IR (-O0):
define void @GetScreen() {
%1 = call i32 @SendChar(i32 238)
%2 = call i32 @SendChar(i32 177)
%3 = call i32 @SendChar(i32 1)
%4 = call i32 @SendChar(i32 255)
%5 = call i32 @SendChar(i32 252)
%6 = call i32 @SendChar(i32 255)
%7 = call i32 @SendChar(i32 255)
ret void
}

LLVM IR (-O2):
define void @GetScreen() {
%1 = tail call i32 @SendChar(i32 238)
%2 = tail call i32 @SendChar(i32 177)
%3 = tail call i32 @SendChar(i32 1)
%4 = tail call i32 @SendChar(i32 255)
%5 = tail call i32 @SendChar(i32 252)
%6 = tail call i32 @SendChar(i32 255)
%7 = tail call i32 @SendChar(i32 255)
ret void
}
/* Variables and functions */
long roundf(float);
long int lroundf(float x) { return roundf(x); }


x86 assembly (clang, -O0):
<lroundf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <roundf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lroundf>:
jmp    1030 <roundf@plt>

LLVM IR (-O0):
define i64 @lroundf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @roundf(float %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @lroundf(float %0) {
%2 = tail call i64 @roundf(float %0)
ret i64 %2
}
void foo750(int p) {}


x86 assembly (clang, -O0):
<foo750>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo750(i32 %0) {
ret void
}
void foo131(int p) {}


x86 assembly (clang, -O0):
<foo131>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo131(i32 %0) {
ret void
}
void elegirOpcion() {}


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

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

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

LLVM IR (-O2):
define void @elegirOpcion() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(int);
int /*<<< orphan*/ printf(char *);
int main() {
  int err = 0;
  printf("This is"
         "ver 0");
  error(err);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"This isver 0\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @error(i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"This isver 0\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @error(i32 0)
ret i32 0
}
/* Type definitions */
typedef int UErrorCode;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
char *u_errorName(int);
void print_error(UErrorCode status) {
  printf("err: %s (%d)\n", u_errorName(status), status);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <u_errorName@plt>
mov    %rax,%rsi
mov    -0x4(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
push   %rbx
mov    %edi,%ebx
call   1030 <u_errorName@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
mov    %ebx,%edx
pop    %rbx
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"err: %s (%d)\0A\00"
define void @print_error(i32 %0) {
%2 = tail call i8* @u_errorName(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %0)
ret void
}
/* Variables and functions */
double cerf_experimental_integration(int /*<<< orphan*/, double, double);
double cerf_experimental_rew(double x, double y) {
  return cerf_experimental_integration(0, x, y);
}


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

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

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

LLVM IR (-O2):
define double @cerf_experimental_rew(double %0, double %1) {
%3 = tail call double @cerf_experimental_integration(i32 0, double %0, double %1)
ret double %3
}
float get_remainder(float a, int b) {
  int dev = (int)a;
  float rem = a - dev;
  return (dev % b) + rem;
}


x86 assembly (clang, -O0):
<get_remainder>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtsi2ssl -0xc(%rbp),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2ss %edx,%xmm0
addss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_remainder>:
cvttss2si %xmm0,%eax
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
cltd
idiv   %edi
xorps  %xmm1,%xmm1
cvtsi2ss %edx,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @get_remainder(float %0, i32 %1) {
%3 = alloca float
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store float %0, float* %3
store i32 %1, i32* %4
%7 = load float, float* %3
%8 = fptosi float %7 to i32
store i32 %8, i32* %5
%9 = load float, float* %3
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to float
%12 = fsub float %9, %11
store float %12, float* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = srem i32 %13, %14
%16 = sitofp i32 %15 to float
%17 = load float, float* %6
%18 = fadd float %16, %17
ret float %18
}

LLVM IR (-O2):
define float @get_remainder(float %0, i32 %1) {
%3 = fptosi float %0 to i32
%4 = sitofp i32 %3 to float
%5 = fsub float %0, %4
%6 = srem i32 %3, %1
%7 = sitofp i32 %6 to float
%8 = fadd float %5, %7
ret float %8
}
int main() {
  int i;
  int j;
  i = 0;
  while (i < 100) {
    j = 0;
    while (j < 1) {
      j = j + 1;
    }
    i = i + 0;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jge    1149 <main+0x49>
movl   $0x0,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jge    113b <main+0x3b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <main+0x23>
mov    -0x8(%rbp),%eax
add    $0x0,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
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
store i32 0, i32* %2
br label %4
4: ; preds = %14, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %17
7: ; preds = %4
store i32 0, i32* %3
br label %8
8: ; preds = %11, %7
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %8
14: ; preds = %8
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 0
store i32 %16, i32* %2
br label %4
17: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
/* Type definitions */
struct RNAparconv_args_info {
  int dummy;
};

/* Variables and functions */
int RNAparconv_cmdline_parser2(int, char **, struct RNAparconv_args_info *,
                               int /*<<< orphan*/, int, int);
int RNAparconv_cmdline_parser(int argc, char **argv,
                              struct RNAparconv_args_info *args_info) {
  return RNAparconv_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<RNAparconv_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <RNAparconv_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAparconv_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <RNAparconv_cmdline_parser2@plt>

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

LLVM IR (-O2):
%struct.RNAparconv_args_info = type { i32 }
define i32 @RNAparconv_cmdline_parser(i32 %0, i8** %1, %struct.RNAparconv_args_info* %2) {
%4 = tail call i32 @RNAparconv_cmdline_parser2(i32 %0, i8** %1, %struct.RNAparconv_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
int test_imm_08uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x08 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_08uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x8,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_08uint64_midword_mem>:
testb  $0x8,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_08uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 524288
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void coloration(const char *texte, const char *typeCouleur) {
  printf("\033[%sm", typeCouleur);
  printf("%s", texte);
  printf("\033[%sm", "0");
}


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

x86 assembly (clang, -O2):
<coloration>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xecd(%rip),%rsi
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%sm\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [2 x i8] c"0\00"
define void @coloration(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}