xunge/DecIR huggingface dataset:
int main() {
  int arg1 = 0xAAAAAAAA;
  int arg2 = 0x55555555;
  int out = 0;
  __asm__("movl %1, %0; orl %2, %0;" : "=r"(out) : "m"(arg1), "m"(arg2));
  return (arg1 | arg2) == out;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0xaaaaaaaa,-0x8(%rbp)
movl   $0x55555555,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
or     -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
movl   $0xaaaaaaaa,-0x4(%rsp)
aa
movl   $0x55555555,-0x8(%rsp)
55
mov    -0x4(%rsp),%ecx
or     -0x8(%rsp),%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 -1431655766, i32* %2
store i32 1431655765, i32* %3
store i32 0, i32* %4
%5 = call i32 asm "movl $1, $0; orl $2, $0;", "=r,*m,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %2, i32* elementtype(i32) %3)
store i32 %5, i32* %4
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = or i32 %6, %7
%9 = load i32, i32* %4
%10 = icmp eq i32 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 -1431655766, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 1431655765, i32* %2
%5 = call i32 asm "movl $1, $0; orl $2, $0;", "=r,*m,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %1, i32* elementtype(i32) %2)
%6 = icmp eq i32 %5, -1
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
struct expression {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ expr_cg_constant_expression(struct expression *, char *);
void expr_cg_zero_extend(struct expression *e) {
  expr_cg_constant_expression(e, "zext");
}


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

x86 assembly (clang, -O2):
<expr_cg_zero_extend>:
lea    0xee9(%rip),%rsi
jmp    1030 <expr_cg_constant_expression@plt>

LLVM IR (-O0):
%struct.expression = type { i32 }
@.str = [5 x i8] c"zext\00"
define void @expr_cg_zero_extend(%struct.expression* %0) {
%2 = alloca %struct.expression*
store %struct.expression* %0, %struct.expression** %2
%3 = load %struct.expression*, %struct.expression** %2
%4 = call i32 @expr_cg_constant_expression(%struct.expression* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.expression = type { i32 }
@.str = [5 x i8] c"zext\00"
define void @expr_cg_zero_extend(%struct.expression* %0) {
%2 = tail call i32 @expr_cg_constant_expression(%struct.expression* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int s(int);
x() { return s(0) == 1 && s(1) == 0 && s(2) == 1; }


x86 assembly (clang, -O0):
<x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <s@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x1(%rbp)
jne    115c <x+0x4c>
mov    $0x1,%edi
call   1030 <s@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1(%rbp)
jne    115c <x+0x4c>
mov    $0x2,%edi
call   1030 <s@plt>
cmp    $0x1,%eax
sete   %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x>:
push   %rbx
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <s@plt>
cmp    $0x1,%eax
jne    113f <x+0x2f>
mov    $0x1,%edi
call   1030 <s@plt>
test   %eax,%eax
jne    113f <x+0x2f>
mov    $0x2,%edi
call   1030 <s@plt>
xor    %ebx,%ebx
cmp    $0x1,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @x() {
%1 = call i32 @s(i32 0)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %9
3: ; preds = %0
%4 = call i32 @s(i32 1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = call i32 @s(i32 2)
%8 = icmp eq i32 %7, 1
br label %9
9: ; preds = %6, %3, %0
%10 = phi i1 [ false, %3 ], [ false, %0 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @x() {
%1 = tail call i32 @s(i32 0)
%2 = icmp eq i32 %1, 1
br i1 %2, label %3, label %10
3: ; preds = %0
%4 = tail call i32 @s(i32 1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @s(i32 2)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %3, %0
%11 = phi i32 [ 0, %3 ], [ 0, %0 ], [ %9, %6 ]
ret i32 %11
}
char *name_rq(int type) {
  switch (type) {
  case 0:
    return "get";
  case 1:
    return "put";
  case 2:
    return "delete";
  case 3:
    return "list";
  default:
    return "other";
  }
}


x86 assembly (clang, -O0):
<name_rq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
sub    $0x3,%rax
ja     116c <name_rq+0x6c>
mov    -0x18(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
lea    0xedd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <name_rq+0x77>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <name_rq+0x77>
lea    0xec5(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <name_rq+0x77>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <name_rq+0x77>
lea    0xeb1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_rq>:
cmp    $0x3,%edi
ja     1117 <name_rq+0x17>
movslq %edi,%rax
lea    0xf0d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xef6(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"get\00"
@.str.1 = [4 x i8] c"put\00"
@.str.2 = [7 x i8] c"delete\00"
@.str.3 = [5 x i8] c"list\00"
@.str.4 = [6 x i8] c"other\00"
define i8* @name_rq(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
]
5: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
br label %10
6: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %10
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %10
8: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %10
9: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8** %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"get\00"
@.str.1 = [4 x i8] c"put\00"
@.str.2 = [7 x i8] c"delete\00"
@.str.3 = [5 x i8] c"list\00"
@.str.4 = [6 x i8] c"other\00"
@reltable.name_rq = [4 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str to i64), i64 ptrtoint ([4 x i32]* @reltable.name_rq to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([4 x i8]* @.str.1 to i64), i64 ptrtoint ([4 x i32]* @reltable.name_rq to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([4 x i32]* @reltable.name_rq to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str.3 to i64), i64 ptrtoint ([4 x i32]* @reltable.name_rq to i64)) to i32)]
define i8* @name_rq(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([4 x i32]* @reltable.name_rq to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), %1 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xcd() {
  Assert_real((isodigit(205) == 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_isodigit.c",
              1030, ("isodigit should be 0 for 0xcd"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xcd>:
push   %rax
mov    $0xcd,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x406,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xcd\00"
define void @t_isodigit_0xcd() {
%1 = call i64 @isodigit(i32 205)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1030, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xcd\00"
define void @t_isodigit_0xcd() {
%1 = tail call i64 @isodigit(i32 205)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1030, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void test(int size) {
  int *p;
  int i = 0;
  printf("\n %s: \n", __func__);
  p = malloc(size);
  printf("\n %p \n", p);
  printf("\n");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
lea    0xec7(%rip),%rdi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x4(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe99(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
movslq %ebx,%rdi
call   1050 <malloc@plt>
lea    0xeb6(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.test = [5 x i8] c"test\00"
@.str.1 = [7 x i8] c"\0A %p \0A\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @test(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.test, i64 0, i64 0))
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = call i8* @malloc(i64 %7)
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %3
%10 = load i32*, i32** %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A %s: \0A\00"
@__func__.test = [5 x i8] c"test\00"
@.str.1 = [7 x i8] c"\0A %p \0A\00"
define void @test(i32 %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__func__.test, i64 0, i64 0))
%3 = sext i32 %0 to i64
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ val;
struct udcFile {
  int dummy;
};

/* Variables and functions */
unsigned short byteSwap16(unsigned short);
int /*<<< orphan*/ udcMustRead(struct udcFile *, unsigned short *, int);
unsigned short udcReadBits16(struct udcFile *file, int isSwapped) {
  unsigned short val;
  udcMustRead(file, &val, sizeof(val));
  if (isSwapped)
    val = byteSwap16(val);
  return val;
}


x86 assembly (clang, -O0):
<udcReadBits16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xe(%rbp),%rsi
mov    $0x2,%edx
call   1040 <udcMustRead@plt>
cmpl   $0x0,-0xc(%rbp)
je     1158 <udcReadBits16+0x38>
movzwl -0xe(%rbp),%edi
call   1030 <byteSwap16@plt>
mov    %ax,-0xe(%rbp)
movzwl -0xe(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<udcReadBits16>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
lea    0xe(%rsp),%rsi
mov    $0x2,%edx
call   1040 <udcMustRead@plt>
movzwl 0xe(%rsp),%eax
test   %ebx,%ebx
je     1147 <udcReadBits16+0x27>
movzwl %ax,%edi
call   1030 <byteSwap16@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.udcFile = type { i32 }
define zeroext i16 @udcReadBits16(%struct.udcFile* %0, i32 %1) {
%3 = alloca %struct.udcFile*
%4 = alloca i32
%5 = alloca i16
store %struct.udcFile* %0, %struct.udcFile** %3
store i32 %1, i32* %4
%6 = load %struct.udcFile*, %struct.udcFile** %3
%7 = call i32 @udcMustRead(%struct.udcFile* %6, i16* %5, i32 2)
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i16, i16* %5
%12 = call zeroext i16 @byteSwap16(i16 zeroext %11)
store i16 %12, i16* %5
br label %13
13: ; preds = %10, %2
%14 = load i16, i16* %5
ret i16 %14
}

LLVM IR (-O2):
%struct.udcFile = type { i32 }
define zeroext i16 @udcReadBits16(%struct.udcFile* %0, i32 %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = call i32 @udcMustRead(%struct.udcFile* %0, i16* %3, i32 2)
%6 = icmp eq i32 %1, 0
%7 = load i16, i16* %3
br i1 %6, label %10, label %8
8: ; preds = %2
%9 = call zeroext i16 @byteSwap16(i16 zeroext %7)
br label %10
10: ; preds = %2, %8
%11 = phi i16 [ %9, %8 ], [ %7, %2 ]
ret i16 %11
}
int thread_start(int (*entry)(void *), void *eudata) {
  entry(eudata);
  return 1;
}


x86 assembly (clang, -O0):
<thread_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_start>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
call   *%rax
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @thread_start(i32 (i8*)* nocapture %0, i8* %1) {
%3 = tail call i32 %0(i8* %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ __set_64bit(unsigned long long *, unsigned int,
                               unsigned int);
__attribute__((always_)) void __set_64bit_constant(unsigned long long *ptr,
                                                   unsigned long long value) {
  __set_64bit(ptr, (unsigned int)value, (unsigned int)(value >> 32));
}


x86 assembly (clang, -O0):
<__set_64bit_constant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    %eax,%esi
mov    -0x10(%rbp),%rax
shr    $0x20,%rax
mov    %eax,%edx
call   1030 <__set_64bit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set_64bit_constant>:
mov    %rsi,%rdx
shr    $0x20,%rdx
jmp    1030 <__set_64bit@plt>

LLVM IR (-O0):
define void @__set_64bit_constant(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = load i64, i64* %4
%9 = lshr i64 %8, 32
%10 = trunc i64 %9 to i32
%11 = call i32 @__set_64bit(i64* %5, i32 %7, i32 %10)
ret void
}

LLVM IR (-O2):
define void @__set_64bit_constant(i64* %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = lshr i64 %1, 32
%5 = trunc i64 %4 to i32
%6 = tail call i32 @__set_64bit(i64* %0, i32 %3, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FUart_SendByte(int, char);
void outbyte(char byte) { FUart_SendByte(0x28001000, byte); }


x86 assembly (clang, -O0):
<outbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x28001000,%edi
movsbl -0x1(%rbp),%esi
call   1030 <FUart_SendByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outbyte>:
mov    %edi,%esi
mov    $0x28001000,%edi
jmp    1030 <FUart_SendByte@plt>

LLVM IR (-O0):
define void @outbyte(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @FUart_SendByte(i32 671092736, i8 signext %3)
ret void
}

LLVM IR (-O2):
define void @outbyte(i8 signext %0) {
%2 = tail call i32 @FUart_SendByte(i32 671092736, i8 signext %0)
ret void
}
float calculateMaxReadoutGradientAmplitude(float fieldOfView,
                                           float samplingInterval) {
  return 1.0f / (samplingInterval * 4257 * fieldOfView);
}


x86 assembly (clang, -O0):
<calculateMaxReadoutGradientAmplitude>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xeee(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  0xed8(%rip),%xmm0
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateMaxReadoutGradientAmplitude>:
mulss  0xef8(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  0xef0(%rip),%xmm0
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @calculateMaxReadoutGradientAmplitude(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %4
%6 = fmul float %5, 4.257000e+03
%7 = load float, float* %3
%8 = fmul float %6, %7
%9 = fdiv float 1.000000e+00, %8
ret float %9
}

LLVM IR (-O2):
define float @calculateMaxReadoutGradientAmplitude(float %0, float %1) {
%3 = fmul float %1, 4.257000e+03
%4 = fmul float %3, %0
%5 = fdiv float 1.000000e+00, %4
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_sqrt_sd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d __attribute__((__target__("sse2")))
mm_sqrt_sd_wrap(__m128d a, __m128d b) {
  return _mm_sqrt_sd(a, b);
}


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

x86 assembly (clang, -O2):
<mm_sqrt_sd_wrap>:
jmp    1030 <_mm_sqrt_sd@plt>

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

LLVM IR (-O2):
define i32 @mm_sqrt_sd_wrap(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_sqrt_sd(i32 %0, i32 %1)
ret i32 %3
}
int max(unsigned int first, unsigned int second) {
  int max = -1;
  if (first > second) {
    max = first;
  } else {
    max = second;
  }
  return max;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jbe    1128 <max+0x28>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    112e <max+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %esi,%edi
cmova  %edi,%eax
ret

LLVM IR (-O0):
define i32 @max(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 -1, i32* %5
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = icmp ugt i32 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load i32, i32* %3
store i32 %10, i32* %5
br label %13
11: ; preds = %2
%12 = load i32, i32* %4
store i32 %12, i32* %5
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @max(i32 %0, i32 %1) {
%3 = icmp ugt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
void out16(unsigned long addr, unsigned short data) {
  *(volatile unsigned short *)addr = data;
}


x86 assembly (clang, -O0):
<out16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0xa(%rbp),%cx
mov    -0x8(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<out16>:
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @out16(i64 %0, i16 zeroext %1) {
%3 = alloca i64
%4 = alloca i16
store i64 %0, i64* %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = load i64, i64* %3
%7 = inttoptr i64 %6 to i16*
store volatile i16 %5, i16* %7
ret void
}

LLVM IR (-O2):
define void @out16(i64 %0, i16 zeroext %1) {
%3 = inttoptr i64 %0 to i16*
store volatile i16 %1, i16* %3
ret void
}
/* Variables and functions */
scalar_t__ gfx_test_timing_active();
scalar_t__ gfx_test_vertical_active();
int gu2_wait_vertical_blank(void) {
  if (gfx_test_timing_active()) {
    while (!gfx_test_vertical_active())
      ;
    while (gfx_test_vertical_active())
      ;
  }
  return (0);
}


x86 assembly (clang, -O0):
<gu2_wait_vertical_blank>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gfx_test_timing_active@plt>
cmp    $0x0,%rax
je     117c <gu2_wait_vertical_blank+0x5c>
jmp    113a <gu2_wait_vertical_blank+0x1a>
mov    $0x0,%al
call   1040 <gfx_test_vertical_active@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1157 <gu2_wait_vertical_blank+0x37>
jmp    115c <gu2_wait_vertical_blank+0x3c>
jmp    113a <gu2_wait_vertical_blank+0x1a>
jmp    1161 <gu2_wait_vertical_blank+0x41>
mov    $0x0,%al
call   1040 <gfx_test_vertical_active@plt>
cmp    $0x0,%rax
je     1177 <gu2_wait_vertical_blank+0x57>
jmp    1161 <gu2_wait_vertical_blank+0x41>
jmp    117c <gu2_wait_vertical_blank+0x5c>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gu2_wait_vertical_blank>:
push   %rax
xor    %eax,%eax
call   1030 <gfx_test_timing_active@plt>
test   %rax,%rax
je     114c <gu2_wait_vertical_blank+0x2c>
nopl   (%rax)
xor    %eax,%eax
call   1040 <gfx_test_vertical_active@plt>
test   %rax,%rax
je     1130 <gu2_wait_vertical_blank+0x10>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <gfx_test_vertical_active@plt>
test   %rax,%rax
jne    1140 <gu2_wait_vertical_blank+0x20>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @gu2_wait_vertical_blank() {
%1 = call i64 (...) @gfx_test_timing_active()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %15
3: ; preds = %0
br label %4
4: ; preds = %8, %3
%5 = call i64 (...) @gfx_test_vertical_active()
%6 = icmp ne i64 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
br label %10
10: ; preds = %13, %9
%11 = call i64 (...) @gfx_test_vertical_active()
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %10
br label %10
14: ; preds = %10
br label %15
15: ; preds = %14, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @gu2_wait_vertical_blank() {
%1 = tail call i64 (...) @gfx_test_timing_active()
%2 = icmp eq i64 %1, 0
br i1 %2, label %9, label %3
3: ; preds = %0, %3
%4 = tail call i64 (...) @gfx_test_vertical_active()
%5 = icmp eq i64 %4, 0
br i1 %5, label %3, label %6
6: ; preds = %3, %6
%7 = tail call i64 (...) @gfx_test_vertical_active()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %6
9: ; preds = %6, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, double, double *);
int main() {
  double c[1000];
  bar(1, 5.0, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1f50(%rbp),%rsi
mov    $0x1,%edi
movsd  0xeca(%rip),%xmm0
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x1f50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x1f48,%rsp
movsd  0xee1(%rip),%xmm0
mov    %rsp,%rsi
mov    $0x1,%edi
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x1f48,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x double]
store i32 0, i32* %1
%3 = getelementptr inbounds [1000 x double], [1000 x double]* %2, i64 0, i64 0
%4 = call i32 @bar(i32 1, double 5.000000e+00, double* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x double]
%2 = bitcast [1000 x double]* %1 to i8*
%3 = getelementptr inbounds [1000 x double], [1000 x double]* %1, i64 0, i64 0
%4 = call i32 @bar(i32 1, double 5.000000e+00, double* %3)
ret i32 0
}
void gtk_tree_drag_dest_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_drag_dest_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bulk_erase_PIC24(int);
void bulk_erase_P24KA(unsigned char doRestore) { bulk_erase_PIC24(0x4064); }


x86 assembly (clang, -O0):
<bulk_erase_P24KA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x4064,%edi
call   1030 <bulk_erase_PIC24@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bulk_erase_P24KA>:
mov    $0x4064,%edi
jmp    1030 <bulk_erase_PIC24@plt>

LLVM IR (-O0):
define void @bulk_erase_P24KA(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @bulk_erase_PIC24(i32 16484)
ret void
}

LLVM IR (-O2):
define void @bulk_erase_P24KA(i8 zeroext %0) {
%2 = tail call i32 @bulk_erase_PIC24(i32 16484)
ret void
}
int isescaped(char *hay, char *ptr) {
  if (ptr <= hay)
    return 0;
  if (*(ptr - 1) != '\\')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isescaped>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
ja     1126 <isescaped+0x26>
movl   $0x0,-0x4(%rbp)
jmp    114a <isescaped+0x4a>
mov    -0x18(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x5c,%eax
je     1143 <isescaped+0x43>
movl   $0x0,-0x4(%rbp)
jmp    114a <isescaped+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isescaped>:
xor    %eax,%eax
cmp    %rdi,%rsi
jbe    1110 <isescaped+0x10>
xor    %eax,%eax
cmpb   $0x5c,-0x1(%rsi)
sete   %al
ret

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

LLVM IR (-O2):
define i32 @isescaped(i8* readnone %0, i8* %1) {
%3 = icmp ugt i8* %1, %0
br i1 %3, label %4, label %9
4: ; preds = %2
%5 = getelementptr inbounds i8, i8* %1, i64 -1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 92
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %2
%10 = phi i32 [ 0, %2 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
double time(int /*<<< orphan*/ *);
double monotonic_seconds() { return time(NULL); }


x86 assembly (clang, -O0):
<monotonic_seconds>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define double @monotonic_seconds() {
%1 = call double @time(i32* null)
ret double %1
}

LLVM IR (-O2):
define double @monotonic_seconds() {
%1 = tail call double @time(i32* null)
ret double %1
}
int left_index(int x) { return (x << 1) + 1; }


x86 assembly (clang, -O0):
<left_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<left_index>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @left_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 1
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @left_index(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ func(int);
int main() {
  func(4);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @func(i32 4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @func(i32 4)
ret i32 0
}
int default_score(char x, char y) {
  if (x == y) {
    return 0;
  }
  return 3;
}


x86 assembly (clang, -O0):
<default_score>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
movsbl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jne    112c <default_score+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1133 <default_score+0x33>
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_score>:
xor    %eax,%eax
cmp    %sil,%dil
setne  %al
lea    (%rax,%rax,2),%eax
ret

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

LLVM IR (-O2):
define i32 @default_score(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, %1
%4 = select i1 %3, i32 0, i32 3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ TIOCMGET;
int TIOCM_CTS;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
int /*<<< orphan*/ printf(char *, int);
bool serial_get_cts(int fd) {
  int status;
  ioctl(fd, TIOCMGET, &status);
  printf("%d\n", status);
  return (status & TIOCM_CTS);
}


x86 assembly (clang, -O0):
<serial_get_cts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1040 <ioctl@plt>
mov    -0x8(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
mov    0x2e7f(%rip),%rcx
and    (%rcx),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serial_get_cts>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1040 <ioctl@plt>
mov    0x4(%rsp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%eax
and    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@TIOCMGET = global i32 0
@.str = [4 x i8] c"%d\0A\00"
@TIOCM_CTS = global i32 0
define i32 @serial_get_cts(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @TIOCMGET
%6 = call i32 @ioctl(i32 %4, i32 %5, i32* %3)
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* @TIOCM_CTS
%11 = and i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
@TIOCMGET = global i32 0
@.str = [4 x i8] c"%d\0A\00"
@TIOCM_CTS = global i32 0
define i32 @serial_get_cts(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @TIOCMGET
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
%9 = load i32, i32* @TIOCM_CTS
%10 = and i32 %9, %8
ret i32 %10
}
void _IdtEntCreate(unsigned long long *pIdtEntry, void (*routine)(void *),
                   unsigned int dpl) {
  unsigned long *pIdtEntry32 = (unsigned long *)pIdtEntry;
  pIdtEntry32[0] = (0x0008 << 16) | ((unsigned short)(unsigned int)routine);
  pIdtEntry32[1] =
      ((unsigned int)routine & 0xffff0000) | (0x8e00 | (dpl << 13));
}


x86 assembly (clang, -O0):
<_IdtEntCreate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movzwl %ax,%eax
or     $0x80000,%eax
movslq %eax,%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
and    $0xffff0000,%eax
mov    -0x14(%rbp),%ecx
shl    $0xd,%ecx
or     $0x8e00,%ecx
or     %ecx,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_IdtEntCreate>:
movzwl %si,%eax
or     $0x80000,%rax
mov    %rax,(%rdi)
and    $0xffff0000,%esi
shl    $0xd,%edx
or     %esi,%edx
or     $0x8e00,%edx
mov    %rdx,0x8(%rdi)
ret

LLVM IR (-O0):
define void @_IdtEntCreate(i64* %0, void (i8*)* %1, i32 %2) {
%4 = alloca i64*
%5 = alloca void (i8*)*
%6 = alloca i32
%7 = alloca i64*
store i64* %0, i64** %4
store void (i8*)* %1, void (i8*)** %5
store i32 %2, i32* %6
%8 = load i64*, i64** %4
store i64* %8, i64** %7
%9 = load void (i8*)*, void (i8*)** %5
%10 = ptrtoint void (i8*)* %9 to i32
%11 = trunc i32 %10 to i16
%12 = zext i16 %11 to i32
%13 = or i32 524288, %12
%14 = sext i32 %13 to i64
%15 = load i64*, i64** %7
%16 = getelementptr inbounds i64, i64* %15, i64 0
store i64 %14, i64* %16
%17 = load void (i8*)*, void (i8*)** %5
%18 = ptrtoint void (i8*)* %17 to i32
%19 = and i32 %18, -65536
%20 = load i32, i32* %6
%21 = shl i32 %20, 13
%22 = or i32 36352, %21
%23 = or i32 %19, %22
%24 = zext i32 %23 to i64
%25 = load i64*, i64** %7
%26 = getelementptr inbounds i64, i64* %25, i64 1
store i64 %24, i64* %26
ret void
}

LLVM IR (-O2):
define void @_IdtEntCreate(i64* nocapture writeonly %0, void (i8*)* %1, i32 %2) {
%4 = ptrtoint void (i8*)* %1 to i64
%5 = trunc i64 %4 to i32
%6 = and i64 %4, 65535
%7 = or i64 %6, 524288
store i64 %7, i64* %0
%8 = and i32 %5, -65536
%9 = shl i32 %2, 13
%10 = or i32 %9, %8
%11 = or i32 %10, 36352
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %12, i64* %13
ret void
}
void YUY2ToUVRow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @YUY2ToUVRow_Any_NEON() {
ret void
}
/* Type definitions */
struct flashctx {
  int dummy;
};

/* Variables and functions */
int printlock_regspace2_uniform_64k(struct flashctx *);
int printlock_w39v080a(struct flashctx *);
int printlock_w39v080fa(struct flashctx *flash) {
  int ret = 0;
  ret = printlock_w39v080a(flash);
  ret |= printlock_regspace2_uniform_64k(flash);
  return ret;
}


x86 assembly (clang, -O0):
<printlock_w39v080fa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <printlock_w39v080a@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <printlock_regspace2_uniform_64k@plt>
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printlock_w39v080fa>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <printlock_w39v080a@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <printlock_regspace2_uniform_64k@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.flashctx = type { i32 }
define i32 @printlock_w39v080fa(%struct.flashctx* %0) {
%2 = alloca %struct.flashctx*
%3 = alloca i32
store %struct.flashctx* %0, %struct.flashctx** %2
store i32 0, i32* %3
%4 = load %struct.flashctx*, %struct.flashctx** %2
%5 = call i32 @printlock_w39v080a(%struct.flashctx* %4)
store i32 %5, i32* %3
%6 = load %struct.flashctx*, %struct.flashctx** %2
%7 = call i32 @printlock_regspace2_uniform_64k(%struct.flashctx* %6)
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
%struct.flashctx = type { i32 }
define i32 @printlock_w39v080fa(%struct.flashctx* %0) {
%2 = tail call i32 @printlock_w39v080a(%struct.flashctx* %0)
%3 = tail call i32 @printlock_regspace2_uniform_64k(%struct.flashctx* %0)
%4 = or i32 %3, %2
ret i32 %4
}
void CRYPTO_set_mem_debug_functions(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_set_mem_debug_functions() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x77() {
  Assert_real((isodigit(119) == 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_isodigit.c",
              600, ("isodigit should be 0 for w"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x77>:
push   %rax
mov    $0x77,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x258,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for w\00"
define void @t_isodigit_0x77() {
%1 = call i64 @isodigit(i32 119)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 600, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for w\00"
define void @t_isodigit_0x77() {
%1 = tail call i64 @isodigit(i32 119)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 600, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *, char *);
void Jump_If_Greater(char *label) { Inst_Printf("bgt", "$1,%s", label); }


x86 assembly (clang, -O0):
<Jump_If_Greater>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <Inst_Printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Jump_If_Greater>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xee3(%rip),%rsi
jmp    1030 <Inst_Printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"bgt\00"
@.str.1 = [6 x i8] c"$1,%s\00"
define void @Jump_If_Greater(i8* %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
int guiMessage2(char *m) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @guiMessage2(i8* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ le16toh(int /*<<< orphan*/);
void disk_identify_fixup_uint16(uint8_t identify[512],
                                unsigned int offset_words) {
  uint16_t *p;
  p = (uint16_t *)identify;
  p[offset_words] = le16toh(p[offset_words]);
}


x86 assembly (clang, -O0):
<disk_identify_fixup_uint16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
call   1030 <le16toh@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %edx,(%rax,%rcx,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disk_identify_fixup_uint16>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %esi,%ebx
mov    (%rdi,%rbx,4),%edi
call   1030 <le16toh@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @disk_identify_fixup_uint16(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
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %4
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = load i32, i32* %10
%12 = call i32 @le16toh(i32 %11)
%13 = load i32*, i32** %5
%14 = load i32, i32* %4
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
store i32 %12, i32* %16
ret void
}

LLVM IR (-O2):
define void @disk_identify_fixup_uint16(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = load i32, i32* %4
%6 = tail call i32 @le16toh(i32 %5)
store i32 %6, i32* %4
ret void
}
int format_url(char *url, int len) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @format_url(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
void swap(int *a, int i, int j) {
  int temp;
  temp = *(a + i);
  *(a + i) = *(a + j);
  *(a + j) = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(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** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VMFilePrint(int, char *);
int /*<<< orphan*/ VMThreadSleep(int);
void VMMain(int argc, char *argv[]) {
  VMFilePrint(1, "Going to sleep for 10 ticks\n");
  VMThreadSleep(10);
  VMFilePrint(1, "Awake\nGoodbye\n");
}


x86 assembly (clang, -O0):
<VMMain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
lea    0xec5(%rip),%rsi
call   1040 <VMFilePrint@plt>
mov    $0xa,%edi
call   1030 <VMThreadSleep@plt>
mov    $0x1,%edi
lea    0xec7(%rip),%rsi
call   1040 <VMFilePrint@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VMMain>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x1,%edi
call   1040 <VMFilePrint@plt>
mov    $0xa,%edi
call   1030 <VMThreadSleep@plt>
lea    0xeda(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1040 <VMFilePrint@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"Going to sleep for 10 ticks\0A\00"
@.str.1 = [15 x i8] c"Awake\0AGoodbye\0A\00"
define void @VMMain(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @VMFilePrint(i32 1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @VMThreadSleep(i32 10)
%7 = call i32 @VMFilePrint(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"Going to sleep for 10 ticks\0A\00"
@.str.1 = [15 x i8] c"Awake\0AGoodbye\0A\00"
define void @VMMain(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @VMFilePrint(i32 1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @VMThreadSleep(i32 10)
%5 = tail call i32 @VMFilePrint(i32 1, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord2dv(int /*<<< orphan*/ *);
void TexCoord2dv(GLdouble v[2]) { glTexCoord2dv(v); }


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

x86 assembly (clang, -O2):
<TexCoord2dv>:
jmp    1030 <glTexCoord2dv@plt>

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

LLVM IR (-O2):
define void @TexCoord2dv(i32* %0) {
%2 = tail call i32 @glTexCoord2dv(i32* %0)
ret void
}