xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ outb(int, unsigned short);
void update_cursor(unsigned short cursor) {
  cursor = cursor / 2;
  outb(0x3D4, 14);
  outb(0x3D5, (cursor >> 8) & 0x00ff);
  outb(0x3D4, 15);
  outb(0x3D5, cursor & 0x00ff);
}


x86 assembly (clang, -O0):
<update_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %ax,-0x2(%rbp)
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <outb@plt>
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzwl %ax,%esi
call   1030 <outb@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <outb@plt>
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzwl %ax,%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_cursor>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %edi,%ebp
shr    %ebp
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <outb@plt>
shr    $0x9,%ebx
mov    $0x3d5,%edi
mov    %ebx,%esi
call   1030 <outb@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <outb@plt>
movzbl %bpl,%esi
mov    $0x3d5,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @update_cursor(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = sdiv i32 %4, 2
%6 = trunc i32 %5 to i16
store i16 %6, i16* %2
%7 = call i32 @outb(i32 980, i16 zeroext 14)
%8 = load i16, i16* %2
%9 = zext i16 %8 to i32
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = trunc i32 %11 to i16
%13 = call i32 @outb(i32 981, i16 zeroext %12)
%14 = call i32 @outb(i32 980, i16 zeroext 15)
%15 = load i16, i16* %2
%16 = zext i16 %15 to i32
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i16
%19 = call i32 @outb(i32 981, i16 zeroext %18)
ret void
}

LLVM IR (-O2):
define void @update_cursor(i16 zeroext %0) {
%2 = lshr i16 %0, 1
%3 = tail call i32 @outb(i32 980, i16 zeroext 14)
%4 = lshr i16 %0, 9
%5 = tail call i32 @outb(i32 981, i16 zeroext %4)
%6 = tail call i32 @outb(i32 980, i16 zeroext 15)
%7 = and i16 %2, 255
%8 = tail call i32 @outb(i32 981, i16 zeroext %7)
ret void
}
int acc_func() {
  int i, a[10];
#pragma acc data copyout(a)
  {
#pragma acc parallel loop
    for (i = 0; i < 10; i++) {
      a[i] = i;
    }
  }
  for (i = 0; i < 10; i++) {
    if (a[i] != i) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<acc_func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    112e <acc_func+0x2e>
mov    -0x8(%rbp),%ecx
movslq -0x8(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110b <acc_func+0xb>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    116f <acc_func+0x6f>
movslq -0x8(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
cmp    -0x8(%rbp),%eax
je     115c <acc_func+0x5c>
movl   $0x1,-0x4(%rbp)
jmp    1176 <acc_func+0x76>
jmp    1161 <acc_func+0x61>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1135 <acc_func+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @acc_func() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [10 x i32]
store i32 0, i32* %2
br label %4
4: ; preds = %12, %0
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %10
store i32 %8, i32* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %4
15: ; preds = %4
store i32 0, i32* %2
br label %16
16: ; preds = %28, %15
%17 = load i32, i32* %2
%18 = icmp slt i32 %17, 10
br i1 %18, label %19, label %31
19: ; preds = %16
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = load i32, i32* %2
%25 = icmp ne i32 %23, %24
br i1 %25, label %26, label %27
26: ; preds = %19
store i32 1, i32* %1
br label %32
27: ; preds = %19
br label %28
28: ; preds = %27
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %16
31: ; preds = %16
store i32 0, i32* %1
br label %32
32: ; preds = %31, %26
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
define i32 @acc_func() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void siginthandler(int sig) {
  printf("\nEnding connection...\n");
  exit(0);
}


x86 assembly (clang, -O0):
<siginthandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<siginthandler>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"\0AEnding connection...\0A\00"
define void @siginthandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [22 x i8] c"\0AEnding connection...\00"
define void @siginthandler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 0)
unreachable
}
void av_parser_parse2() {}


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

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

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

LLVM IR (-O2):
define void @av_parser_parse2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ KeSetEvent(int, int /*<<< orphan*/, int /*<<< orphan*/);
int KbFilter_Complete(int DeviceObject, int Irp, int Context) {
  int event;
  {
    {
      event = Context;
      KeSetEvent(event, 0, 0);
    }
    return (3221225494LL);
  }
}


x86 assembly (clang, -O0):
<KbFilter_Complete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <KeSetEvent@plt>
mov    $0xc0000016,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KbFilter_Complete>:
push   %rax
mov    %edx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <KeSetEvent@plt>
mov    $0xc0000016,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @KbFilter_Complete(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @KeSetEvent(i32 %2, i32 0, i32 0)
ret i32 -1073741802
}
int test_imm_0Euint32_mem(unsigned int *val) {
  return ((*val) & (0x0E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_0Euint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 14
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo207(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo207(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x93() {
  Assert_real((islower(147) == 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_islower.c",
              740, ("islower should be 0 for 0x93"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x93>:
push   %rax
mov    $0x93,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2e4,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x93\00"
define void @t_islower_0x93() {
%1 = call i64 @islower(i32 147)
%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 740, i8* getelementptr inbounds ([29 x i8], [29 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x93\00"
define void @t_islower_0x93() {
%1 = tail call i64 @islower(i32 147)
%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 740, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setupLoggers();
int /*<<< orphan*/ setupPollers();
void setup() {
  ;
  ;
  setupPollers();
  ;
  ;
  setupLoggers();
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @setup() {
%1 = call i32 (...) @setupPollers()
%2 = call i32 (...) @setupLoggers()
ret void
}

LLVM IR (-O2):
define void @setup() {
%1 = tail call i32 (...) @setupPollers()
%2 = tail call i32 (...) @setupLoggers()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ eeprom_update_dword(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/);
void eeconfig_update_haptic(uint32_t val) {
  eeprom_update_dword((uint32_t *)24, val);
}


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

x86 assembly (clang, -O2):
<eeconfig_update_haptic>:
mov    %edi,%esi
mov    $0x18,%edi
jmp    1030 <eeprom_update_dword@plt>

LLVM IR (-O0):
define void @eeconfig_update_haptic(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @eeprom_update_dword(i32* inttoptr (i64 24 to i32*), i32 %3)
ret void
}

LLVM IR (-O2):
define void @eeconfig_update_haptic(i32 %0) {
%2 = tail call i32 @eeprom_update_dword(i32* inttoptr (i64 24 to i32*), i32 %0)
ret void
}
int os_tell(void *data, long *pos) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @os_tell(i8* nocapture readnone %0, i64* nocapture readnone %1) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
uint __VERIFIER_nondet_uint() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__VERIFIER_nondet_uint() {
ret i32 0
}
void EVP_MD_CTX_copy(void) {}


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

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

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

LLVM IR (-O2):
define void @EVP_MD_CTX_copy() {
ret void
}
/* Variables and functions */
bool is_positive(int x) { return x > 0; }


x86 assembly (clang, -O0):
<is_positive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_positive>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
ret

LLVM IR (-O0):
define i32 @is_positive(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_positive(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
void rop3_69_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~S;
  stk2 = T & stk3;
  stk1 = *D | stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_69_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)
movzbl -0x9(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
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_69_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_69_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %6
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = xor i32 %28, -1
%30 = trunc i32 %29 to i8
store i8 %30, i8* %7
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %5
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8, i8* %6
%38 = zext i8 %37 to i32
%39 = xor i32 %38, -1
%40 = and i32 %36, %39
%41 = load i8*, i8** %4
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = load i8, i8* %5
%45 = zext i8 %44 to i32
%46 = and i32 %43, %45
%47 = or i32 %40, %46
%48 = load i8*, i8** %4
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = load i8, i8* %6
%52 = zext i8 %51 to i32
%53 = and i32 %50, %52
%54 = or i32 %47, %53
%55 = trunc i32 %54 to i8
%56 = load i8*, i8** %4
store i8 %55, i8* %56
ret void
}

LLVM IR (-O2):
define void @rop3_69_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
}
void RTSha256Final(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSha256Final() {
ret void
}
void brcmf_proto_bcdc_detach_pre_delif(struct brcmf_pub *drvr) {}


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

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

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

LLVM IR (-O2):
%struct.brcmf_pub = type opaque
define void @brcmf_proto_bcdc_detach_pre_delif(%struct.brcmf_pub* nocapture %0) {
ret void
}
int test_imm_4Euint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x4E << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_4Euint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 78
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ PieceContainsBlock(int const **, int, int);
int CanPlacePiece(const int piece[][2], int x, int y) {
  return !PieceContainsBlock(piece, x, y);
}


x86 assembly (clang, -O0):
<CanPlacePiece>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <PieceContainsBlock@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):
<CanPlacePiece>:
push   %rax
call   1030 <PieceContainsBlock@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @CanPlacePiece([2 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca [2 x i32]*
%5 = alloca i32
%6 = alloca i32
store [2 x i32]* %0, [2 x i32]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load [2 x i32]*, [2 x i32]** %4
%8 = bitcast [2 x i32]* %7 to i32**
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @PieceContainsBlock(i32** %8, i32 %9, i32 %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @CanPlacePiece([2 x i32]* %0, i32 %1, i32 %2) {
%4 = bitcast [2 x i32]* %0 to i32**
%5 = tail call i32 @PieceContainsBlock(i32** %4, i32 %1, i32 %2)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int foo();
int bar(void) { return foo(); }


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

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

LLVM IR (-O0):
define i32 @bar() {
%1 = call i32 (...) @foo()
ret i32 %1
}

LLVM IR (-O2):
define i32 @bar() {
%1 = tail call i32 (...) @foo()
ret i32 %1
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *ptr, *dst;
  ptr = dst = (char *)malloc(strlen(s) + 1);
  while (*dst++ = *s++)
    ;
  *dst = 0;
  return ptr;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1178 <strdup+0x58>
jmp    1149 <strdup+0x29>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rdi
call   1040 <malloc@plt>
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rbx,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1140 <strdup+0x20>
movb   $0x0,(%rax,%rcx,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
br label %6
6: ; preds = %6, %1
%7 = phi i8* [ %0, %1 ], [ %9, %6 ]
%8 = phi i8* [ %5, %1 ], [ %11, %6 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %7
%11 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %10, i8* %8
%12 = icmp eq i8 %10, 0
br i1 %12, label %13, label %6
13: ; preds = %6
store i8 0, i8* %11
ret i8* %5
}
/* Type definitions */
typedef void const uint8_t;
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int ldl_be_p(void const *);
uint64_t ldq_be_p(const void *ptr) {
  uint32_t a, b;
  a = ldl_be_p(ptr);
  b = ldl_be_p((uint8_t *)ptr + 4);
  return (((uint64_t)a << 32) | b);
}


x86 assembly (clang, -O0):
<ldq_be_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ldl_be_p@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
call   1030 <ldl_be_p@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
or     -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldq_be_p>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ldl_be_p@plt>
add    $0x4,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <ldl_be_p@plt>

LLVM IR (-O0):
define i32 @ldq_be_p(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @ldl_be_p(i8* %5)
store i32 %6, i32* %3
%7 = load i8*, i8** %2
%8 = getelementptr i8, i8* %7, i64 4
%9 = call i32 @ldl_be_p(i8* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = shl i32 %10, 32
%12 = load i32, i32* %4
%13 = or i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @ldq_be_p(i8* %0) {
%2 = tail call i32 @ldl_be_p(i8* %0)
%3 = getelementptr i8, i8* %0, i64 4
%4 = tail call i32 @ldl_be_p(i8* %3)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void bdos_l_write(void) {
  fprintf(stderr, "BDOS L_WRITE not yet implemented\n");
}


x86 assembly (clang, -O0):
<bdos_l_write>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bdos_l_write>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"BDOS L_WRITE not yet implemented\0A\00"
define void @bdos_l_write() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"BDOS L_WRITE not yet implemented\0A\00"
define void @bdos_l_write() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENODEV;
int /*<<< orphan*/ errno;
int fcntl(int fd, int cmd, ...) {
  (void)fd;
  (void)cmd;
  errno = ENODEV;
  return -1;
}


x86 assembly (clang, -O0):
<fcntl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fcntl>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENODEV = global i32 0
@errno = global i32 0
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = load i32, i32* @ENODEV
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENODEV = global i32 0
@errno = global i32 0
define i32 @fcntl(i32 %0, i32 %1, ...) {
%3 = load i32, i32* @ENODEV
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ m68ki_check_interrupts();
int /*<<< orphan*/ m68ki_set_sr_noint(unsigned int);
void m68ki_set_sr(unsigned int value) {
  m68ki_set_sr_noint(value);
  m68ki_check_interrupts();
}


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

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

LLVM IR (-O0):
define void @m68ki_set_sr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @m68ki_set_sr_noint(i32 %3)
%5 = call i32 (...) @m68ki_check_interrupts()
ret void
}

LLVM IR (-O2):
define void @m68ki_set_sr(i32 %0) {
%2 = tail call i32 @m68ki_set_sr_noint(i32 %0)
%3 = tail call i32 (...) @m68ki_check_interrupts()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  unsigned int u = 1;
  unsigned char *p;
  unsigned char x, y;
  p = (unsigned char *)&u;
  x = *p;
  assert(x == 0);
  y = p[3];
  assert(y == 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    0x3(%rax),%al
mov    %al,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
%2 = tail call i32 @assert(i32 0)
ret i32 0
}
void foo079() {}


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

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

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

LLVM IR (-O2):
define void @foo079() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void sub_reg32_imm32(int reg32, unsigned int imm32) {
  put8(0x81);
  put8(0xE8 + reg32);
  put32(imm32);
}


x86 assembly (clang, -O0):
<sub_reg32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x81,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xe8,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_reg32_imm32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x81,%edi
call   1030 <put8@plt>
add    $0xe8,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @sub_reg32_imm32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 129)
%6 = load i32, i32* %3
%7 = add nsw i32 232, %6
%8 = call i32 @put8(i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @put32(i32 %9)
ret void
}

LLVM IR (-O2):
define void @sub_reg32_imm32(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 129)
%4 = add nsw i32 %0, 232
%5 = tail call i32 @put8(i32 %4)
%6 = tail call i32 @put32(i32 %1)
ret void
}
void PGMPhysSimpleWriteGCPhys(void) {}


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

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

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

LLVM IR (-O2):
define void @PGMPhysSimpleWriteGCPhys() {
ret void
}
void INT_Excep_PERIB_INTB193(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB193() {
ret void
}
void unicode2ascii(unsigned char *out, const unsigned short *in) {
  int i = 0;
  while (in[i]) {
    out[i] = in[i] & 0xFF;
    i++;
  }
  out[i] = 0;
}


x86 assembly (clang, -O0):
<unicode2ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpw   $0x0,(%rax,%rcx,2)
je     1152 <unicode2ascii+0x52>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movzwl (%rax,%rcx,2),%eax
and    $0xff,%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <unicode2ascii+0x13>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unicode2ascii>:
movzwl (%rsi),%eax
test   %ax,%ax
je     1128 <unicode2ascii+0x28>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
mov    %al,(%rdi,%rcx,1)
movzwl 0x2(%rsi,%rcx,2),%eax
add    $0x1,%rcx
test   %ax,%ax
jne    1110 <unicode2ascii+0x10>
mov    %ecx,%eax
movb   $0x0,(%rdi,%rax,1)
ret
xor    %eax,%eax
movb   $0x0,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @unicode2ascii(i8* %0, i16* %1) {
%3 = alloca i8*
%4 = alloca i16*
%5 = alloca i32
store i8* %0, i8** %3
store i16* %1, i16** %4
store i32 0, i32* %5
br label %6
6: ; preds = %13, %2
%7 = load i16*, i16** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i16, i16* %7, i64 %9
%11 = load i16, i16* %10
%12 = icmp ne i16 %11, 0
br i1 %12, label %13, label %28
13: ; preds = %6
%14 = load i16*, i16** %4
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i16, i16* %14, i64 %16
%18 = load i16, i16* %17
%19 = zext i16 %18 to i32
%20 = and i32 %19, 255
%21 = trunc i32 %20 to i8
%22 = load i8*, i8** %3
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8, i8* %22, i64 %24
store i8 %21, i8* %25
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %6
28: ; preds = %6
%29 = load i8*, i8** %3
%30 = load i32, i32* %5
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i8, i8* %29, i64 %31
store i8 0, i8* %32
ret void
}

LLVM IR (-O2):
define void @unicode2ascii(i8* nocapture writeonly %0, i16* nocapture %1) {
%3 = load i16, i16* %1
%4 = icmp eq i16 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 0, %2 ]
%7 = phi i16 [ %12, %5 ], [ %3, %2 ]
%8 = trunc i16 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %8, i8* %9
%10 = add nuw nsw i64 %6, 1
%11 = getelementptr inbounds i16, i16* %1, i64 %10
%12 = load i16, i16* %11
%13 = icmp eq i16 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5
%15 = and i64 %10, 4294967295
br label %16
16: ; preds = %14, %2
%17 = phi i64 [ 0, %2 ], [ %15, %14 ]
%18 = getelementptr inbounds i8, i8* %0, i64 %17
store i8 0, i8* %18
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int, int, int);
main() {
  int inten = 10;
  test(16, 32, inten / 2.0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edx
mov    $0x10,%edi
mov    $0x20,%esi
call   1030 <test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x10,%edi
mov    $0x20,%esi
mov    $0x5,%edx
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 10, i32* %1
%2 = load i32, i32* %1
%3 = sitofp i32 %2 to double
%4 = fdiv double %3, 2.000000e+00
%5 = fptosi double %4 to i32
%6 = call i32 @test(i32 16, i32 32, i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 16, i32 32, i32 5)
ret i32 0
}
/* Variables and functions */
long DeleteOneRecordWithoutProtection(int);
long DeleteOneRecordWithHMAC(int id) {
  return DeleteOneRecordWithoutProtection(id);
}


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

x86 assembly (clang, -O2):
<DeleteOneRecordWithHMAC>:
jmp    1030 <DeleteOneRecordWithoutProtection@plt>

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

LLVM IR (-O2):
define i64 @DeleteOneRecordWithHMAC(i32 %0) {
%2 = tail call i64 @DeleteOneRecordWithoutProtection(i32 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ DirectIndexedXE0(int);
int /*<<< orphan*/ ROL8(int /*<<< orphan*/);
void Op36E0M1(void) { ROL8(DirectIndexedXE0(3)); }


x86 assembly (clang, -O0):
<Op36E0M1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
call   1030 <ROL8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op36E0M1>:
push   %rax
mov    $0x3,%edi
call   1040 <DirectIndexedXE0@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <ROL8@plt>

LLVM IR (-O0):
define void @Op36E0M1() {
%1 = call i32 @DirectIndexedXE0(i32 3)
%2 = call i32 @ROL8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op36E0M1() {
%1 = tail call i32 @DirectIndexedXE0(i32 3)
%2 = tail call i32 @ROL8(i32 %1)
ret void
}
/* Variables and functions */
int biscDrive(int, int);
int biscSpin(int velocity) { return biscDrive(velocity, 0xFFFF); }


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

x86 assembly (clang, -O2):
<biscSpin>:
mov    $0xffff,%esi
jmp    1030 <biscDrive@plt>

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

LLVM IR (-O2):
define i32 @biscSpin(i32 %0) {
%2 = tail call i32 @biscDrive(i32 %0, i32 65535)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ _Legal_lookahead(int, int, int /*<<< orphan*/);
int /*<<< orphan*/ _Term();
int /*<<< orphan*/ advance();
scalar_t__ match(int);
void _Expression(void) {
  if (!_Legal_lookahead(6, 4, 0))
    return;
  _Term();
  while (match(2)) {
    advance();
    _Term();
  }
}


x86 assembly (clang, -O0):
<_Expression>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1060 <_Legal_lookahead@plt>
cmp    $0x0,%eax
jne    1163 <_Expression+0x23>
jmp    1191 <_Expression+0x51>
mov    $0x0,%al
call   1030 <_Term@plt>
mov    $0x2,%edi
call   1050 <match@plt>
cmp    $0x0,%rax
je     1191 <_Expression+0x51>
mov    $0x0,%al
call   1040 <advance@plt>
mov    $0x0,%al
call   1030 <_Term@plt>
jmp    116a <_Expression+0x2a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Expression>:
push   %rax
mov    $0x6,%edi
mov    $0x4,%esi
xor    %edx,%edx
call   1060 <_Legal_lookahead@plt>
test   %eax,%eax
je     117f <_Expression+0x3f>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <_Term@plt>
mov    $0x2,%edi
call   1050 <match@plt>
test   %rax,%rax
je     117f <_Expression+0x3f>
xor    %eax,%eax
call   1040 <advance@plt>
jmp    1160 <_Expression+0x20>
pop    %rax
ret

LLVM IR (-O0):
define void @_Expression() {
%1 = call i32 @_Legal_lookahead(i32 6, i32 4, i32 0)
%2 = icmp ne i32 %1, 0
br i1 %2, label %4, label %3
3: ; preds = %0
br label %12
4: ; preds = %0
%5 = call i32 (...) @_Term()
br label %6
6: ; preds = %9, %4
%7 = call i64 @match(i32 2)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = call i32 (...) @advance()
%11 = call i32 (...) @_Term()
br label %6
12: ; preds = %3, %6
ret void
}

LLVM IR (-O2):
define void @_Expression() {
%1 = tail call i32 @_Legal_lookahead(i32 6, i32 4, i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %12, label %3
3: ; preds = %0
%4 = tail call i32 (...) @_Term()
%5 = tail call i64 @match(i32 2)
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %3, %7
%8 = tail call i32 (...) @advance()
%9 = tail call i32 (...) @_Term()
%10 = tail call i64 @match(i32 2)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %3, %0
ret void
}
float geometric_schlick_smith(float n_dot_v, float roughness) {
  return n_dot_v / (n_dot_v * (1 - roughness) + roughness);
}


x86 assembly (clang, -O0):
<geometric_schlick_smith>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xee0(%rip),%xmm3
subss  -0x8(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
mulss  %xmm3,%xmm1
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geometric_schlick_smith>:
movss  0xef8(%rip),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @geometric_schlick_smith(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fsub float 1.000000e+00, %7
%9 = load float, float* %4
%10 = call float @llvm.fmuladd.f32(float %6, float %8, float %9)
%11 = fdiv float %5, %10
ret float %11
}

LLVM IR (-O2):
define float @geometric_schlick_smith(float %0, float %1) {
%3 = fsub float 1.000000e+00, %1
%4 = tail call float @llvm.fmuladd.f32(float %0, float %3, float %1)
%5 = fdiv float %0, %4
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array_2(int *arr, int n) {
  int i = 0;
  while (i < n) {
    printf("%d ", *(arr++));
    i++;
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115f <print_array_2+0x4f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%esi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_array_2+0x16>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array_2>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array_2+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1140 <print_array_2+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @print_array_2(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i32 [ %10, %4 ], [ 0, %2 ]
%6 = phi i32* [ %7, %4 ], [ %0, %2 ]
%7 = getelementptr inbounds i32, i32* %6, i64 1
%8 = load i32, i32* %6
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = add nuw nsw i32 %5, 1
%11 = icmp eq i32 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %4, %2
%13 = tail call i32 @putchar(i32 10)
ret void
}
void SYNC_REINIT() {}


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

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

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

LLVM IR (-O2):
define void @SYNC_REINIT() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(char *);
void f3(void) {
  char buf[512];
  foo(buf);
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
lea    -0x200(%rbp),%rdi
call   1030 <foo@plt>
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
sub    $0x208,%rsp
mov    %rsp,%rdi
call   1030 <foo@plt>
add    $0x208,%rsp
ret

LLVM IR (-O0):
define void @f3() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @foo(i8* %2)
ret void
}

LLVM IR (-O2):
define void @f3() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @foo(i8* %2)
ret void
}
move(y, x) int y, x;
{ printf("\033[%d;%dH", y, x); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define i32 @move(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello World!");
  return 0;
}


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)
lea    0xed3(%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 = [13 x i8] c"Hello World!\00"
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 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}