xunge/DecIR huggingface dataset:
int isDigit(int c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<isDigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isDigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isDigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isDigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalnum(int);
void t_isalnum_0x65() {
  Assert_real((isalnum(101)),
              "/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_isalnum.c",
              510, ("isalnum should be 1 for e"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x65>:
push   %rbp
mov    %rsp,%rbp
mov    $0x65,%edi
call   1030 <isalnum@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1fe,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x65>:
push   %rax
mov    $0x65,%edi
call   1030 <isalnum@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1fe,%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_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for e\00"
define void @t_isalnum_0x65() {
%1 = call i32 @isalnum(i32 101)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 510, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [26 x i8] c"isalnum should be 1 for e\00"
define void @t_isalnum_0x65() {
%1 = tail call i32 @isalnum(i32 101)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 510, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void bc_1R_none(struct grid *g, struct parList *par) {}


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

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

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

LLVM IR (-O2):
%struct.grid = type opaque
%struct.parList = type opaque
define void @bc_1R_none(%struct.grid* nocapture %0, %struct.parList* nocapture %1) {
ret void
}
void zero_time(unsigned char *entry) {
  int i;
  for (i = 20; i < 26; i++) {
    entry[i] = 0;
  }
}


x86 assembly (clang, -O0):
<zero_time>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x14,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jge    1133 <zero_time+0x33>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <zero_time+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_time>:
movw   $0x0,0x18(%rdi)
movl   $0x0,0x14(%rdi)
ret

LLVM IR (-O0):
define void @zero_time(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 20, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 26
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
store i8 0, i8* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @zero_time(i8* nocapture writeonly %0) {
%2 = getelementptr i8, i8* %0, i64 20
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ KAPI_save_as_header_String(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
void KAPI_save_as_header_String_list(FILE *fp, char *pch) {
  FILE *fpTmp = fp;
  KAPI_save_as_header_String(fp, pch);
  fwrite(",", sizeof(char), 1, fpTmp);
}


x86 assembly (clang, -O0):
<KAPI_save_as_header_String_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <KAPI_save_as_header_String@plt>
mov    -0x18(%rbp),%rcx
lea    0xeb0(%rip),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KAPI_save_as_header_String_list>:
push   %rbx
mov    %rdi,%rbx
call   1040 <KAPI_save_as_header_String@plt>
mov    $0x2c,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <fputc@plt>

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

LLVM IR (-O2):
define void @KAPI_save_as_header_String_list(i32* %0, i8* %1) {
%3 = tail call i32 @KAPI_save_as_header_String(i32* %0, i8* %1)
%4 = tail call i32 @fputc(i32 44, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CDD_Export_Status();
int /*<<< orphan*/ sub68k_interrupt(int, int);
void CDD_Processing(void) {
  CDD_Export_Status();
  sub68k_interrupt(4, -1);
}


x86 assembly (clang, -O0):
<CDD_Processing>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <CDD_Export_Status@plt>
mov    $0x4,%edi
mov    $0xffffffff,%esi
call   1030 <sub68k_interrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<CDD_Processing>:
push   %rax
xor    %eax,%eax
call   1040 <CDD_Export_Status@plt>
mov    $0x4,%edi
mov    $0xffffffff,%esi
pop    %rax
jmp    1030 <sub68k_interrupt@plt>

LLVM IR (-O0):
define void @CDD_Processing() {
%1 = call i32 (...) @CDD_Export_Status()
%2 = call i32 @sub68k_interrupt(i32 4, i32 -1)
ret void
}

LLVM IR (-O2):
define void @CDD_Processing() {
%1 = tail call i32 (...) @CDD_Export_Status()
%2 = tail call i32 @sub68k_interrupt(i32 4, i32 -1)
ret void
}
void gpuSynchronize() {}


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

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

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

LLVM IR (-O2):
define void @gpuSynchronize() {
ret void
}
/* Variables and functions */
int msgrcv(int, long *, int, int, int /*<<< orphan*/);
int recieveJugadaOrdenador(int queue) {
  long computer;
  return msgrcv(queue, &computer, sizeof(long), 5, 0);
}


x86 assembly (clang, -O0):
<recieveJugadaOrdenador>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
mov    $0x5,%ecx
xor    %r8d,%r8d
call   1030 <msgrcv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recieveJugadaOrdenador>:
push   %rax
mov    %rsp,%rsi
mov    $0x8,%edx
mov    $0x5,%ecx
xor    %r8d,%r8d
call   1030 <msgrcv@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @recieveJugadaOrdenador(i32 %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @msgrcv(i32 %0, i64* %2, i32 8, i32 5, i32 0)
ret i32 %4
}
/* Variables and functions */
int binary(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char n[100000];
  int new;
  printf("Digite um numero binario: ");
  scanf("%s", n);
  new = binary(n);
  printf("O número %s em decimal eh: %d\n", n, new);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x186c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x186b0(%rbp),%rsi
lea    0xebd(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x186b0(%rbp),%rdi
call   1030 <binary@plt>
mov    %eax,-0x186b4(%rbp)
lea    -0x186b0(%rbp),%rsi
mov    -0x186b4(%rbp),%edx
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x186c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x186a0,%rsp
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xece(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <binary@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x186a0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Digite um numero binario: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [32 x i8] c"O n\C3\BAmero %s em decimal eh: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100000 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [100000 x i8], [100000 x i8]* %2, i64 0, i64 0
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [100000 x i8], [100000 x i8]* %2, i64 0, i64 0
%8 = call i32 @binary(i8* %7)
store i32 %8, i32* %3
%9 = getelementptr inbounds [100000 x i8], [100000 x i8]* %2, i64 0, i64 0
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %9, i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Digite um numero binario: \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [32 x i8] c"O n\C3\BAmero %s em decimal eh: %d\0A\00"
define i32 @main() {
%1 = alloca [100000 x i8]
%2 = getelementptr inbounds [100000 x i8], [100000 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 @binary(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), i8* %2, i32 %5)
ret i32 0
}
char *strcpy(char *dest, const char *src) {
  char *out = dest;
  while ((*dest++ = *src++)) {
  }
  return out;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ glutStrokeRoman;
unsigned glob_glutStrokeRoman(void) { return (unsigned)&glutStrokeRoman; }


x86 assembly (clang, -O0):
<glob_glutStrokeRoman>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<glob_glutStrokeRoman>:
mov    0x2ee2(%rip),%eax
ret

LLVM IR (-O0):
@glutStrokeRoman = global i32 0
define i32 @glob_glutStrokeRoman() {
ret i32 ptrtoint (i32* @glutStrokeRoman to i32)
}

LLVM IR (-O2):
@glutStrokeRoman = global i32 0
define i32 @glob_glutStrokeRoman() {
ret i32 ptrtoint (i32* @glutStrokeRoman to i32)
}
/* Variables and functions */
int /*<<< orphan*/ ccin_release_system_frequency();
int /*<<< orphan*/ ccin_release_system_glossary();
int /*<<< orphan*/ ccin_release_user_frequency();
int /*<<< orphan*/ ccin_release_user_glossary();
int /*<<< orphan*/ ccin_save_system_frequency();
int /*<<< orphan*/ ccin_save_user_frequency();
int /*<<< orphan*/ ccin_save_user_glossary();
void ccin_close_imfactory() {
  ccin_save_system_frequency();
  ccin_save_user_frequency();
  ccin_save_user_glossary();
  ccin_release_system_glossary();
  ccin_release_system_frequency();
  ccin_release_user_glossary();
  ccin_release_user_frequency();
}


x86 assembly (clang, -O0):
<ccin_close_imfactory>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <ccin_save_system_frequency@plt>
mov    $0x0,%al
call   1040 <ccin_save_user_frequency@plt>
mov    $0x0,%al
call   1080 <ccin_save_user_glossary@plt>
mov    $0x0,%al
call   1050 <ccin_release_system_glossary@plt>
mov    $0x0,%al
call   1030 <ccin_release_system_frequency@plt>
mov    $0x0,%al
call   1060 <ccin_release_user_glossary@plt>
mov    $0x0,%al
call   1090 <ccin_release_user_frequency@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccin_close_imfactory>:
push   %rax
xor    %eax,%eax
call   1070 <ccin_save_system_frequency@plt>
xor    %eax,%eax
call   1040 <ccin_save_user_frequency@plt>
xor    %eax,%eax
call   1080 <ccin_save_user_glossary@plt>
xor    %eax,%eax
call   1050 <ccin_release_system_glossary@plt>
xor    %eax,%eax
call   1030 <ccin_release_system_frequency@plt>
xor    %eax,%eax
call   1060 <ccin_release_user_glossary@plt>
xor    %eax,%eax
pop    %rcx
jmp    1090 <ccin_release_user_frequency@plt>

LLVM IR (-O0):
define void @ccin_close_imfactory() {
%1 = call i32 (...) @ccin_save_system_frequency()
%2 = call i32 (...) @ccin_save_user_frequency()
%3 = call i32 (...) @ccin_save_user_glossary()
%4 = call i32 (...) @ccin_release_system_glossary()
%5 = call i32 (...) @ccin_release_system_frequency()
%6 = call i32 (...) @ccin_release_user_glossary()
%7 = call i32 (...) @ccin_release_user_frequency()
ret void
}

LLVM IR (-O2):
define void @ccin_close_imfactory() {
%1 = tail call i32 (...) @ccin_save_system_frequency()
%2 = tail call i32 (...) @ccin_save_user_frequency()
%3 = tail call i32 (...) @ccin_save_user_glossary()
%4 = tail call i32 (...) @ccin_release_system_glossary()
%5 = tail call i32 (...) @ccin_release_system_frequency()
%6 = tail call i32 (...) @ccin_release_user_glossary()
%7 = tail call i32 (...) @ccin_release_user_frequency()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
main() {
  int i, n;
  i = 5;
  n = 0;
  do
    n++;
  while (i--);
  assert(n == 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jne    112d <main+0x1d>
cmpl   $0x6,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 5, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
store i32 %6, i32* %3
br label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = add nsw i32 %8, -1
store i32 %9, i32* %2
%10 = icmp ne i32 %8, 0
br i1 %10, label %4, label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp eq i32 %12, 6
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ printf(char *);
int main(void) {
  void *mem = malloc(1000);
  printf("mem: %p\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"mem: %p\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @malloc(i32 1000)
store i8* %3, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"mem: %p\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int GCD(int x, int y) {
  int r;
  while (1) {
    r = x % y;
    if (r == 0)
      break;
    x = y;
    y = r;
  }
  return (y);
}


x86 assembly (clang, -O0):
<GCD>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1123 <GCD+0x23>
jmp    1134 <GCD+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <GCD+0xa>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GCD>:
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edi,%eax
mov    %edx,%edi
cltd
idiv   %edi
test   %edx,%edx
jne    1110 <GCD+0x10>
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @GCD(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %1, %2 ], [ %6, %3 ]
%5 = phi i32 [ %0, %2 ], [ %4, %3 ]
%6 = srem i32 %5, %4
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  char *str;
  int i;
  str = (char *)malloc(20);
  for (i = 0; i < 20; i++) {
    str[i] = 's';
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x14,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x14,-0x14(%rbp)
jge    1158 <main+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movb   $0x73,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1134 <main+0x24>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x14,%edi
call   1030 <malloc@plt>
movaps 0xede(%rip),%xmm0
movups %xmm0,(%rax)
movl   $0x73737373,0x10(%rax)
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 20)
%2 = inttoptr i64 %1 to i8*
ret i32 0
}
unsigned float_neg(unsigned uf) {
  if ((uf & 0x7FFFFFFF) > 0x7F800000) {
    return uf;
  }
  return uf ^ 0x80000000;
}


x86 assembly (clang, -O0):
<float_neg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7fffffff,%eax
cmp    $0x7f800000,%eax
jbe    1125 <float_neg+0x25>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1130 <float_neg+0x30>
mov    -0x8(%rbp),%eax
xor    $0x80000000,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_neg>:
mov    %edi,%ecx
and    $0x7fffffff,%ecx
mov    %edi,%eax
xor    $0x80000000,%eax
cmp    $0x7f800001,%ecx
cmovae %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @float_neg(i32 %0) {
%2 = and i32 %0, 2147483647
%3 = icmp ugt i32 %2, 2139095040
%4 = xor i32 %0, -2147483648
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
int fun706() { return 706; }


x86 assembly (clang, -O0):
<fun706>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2c2,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun706() {
ret i32 706
}

LLVM IR (-O2):
define i32 @fun706() {
ret i32 706
}
/* Variables and functions */
int /*<<< orphan*/ umfpack_dl_symbolic(long, long, long *, long *, double *,
                                       void **, double *, double *);
void umf4sym_(long *m, long *n, long Ap[], long Ai[], double Ax[],
              void **Symbolic, double Control[20], double Info[90]) {
  (void)umfpack_dl_symbolic(*m, *n, Ap, Ai, Ax, Symbolic, Control, Info);
}


x86 assembly (clang, -O0):
<umf4sym_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <umfpack_dl_symbolic@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<umf4sym_>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <umfpack_dl_symbolic@plt>

LLVM IR (-O0):
define void @umf4sym_(i64* %0, i64* %1, i64* %2, i64* %3, double* %4, i8** %5, double* %6, double* %7) {
%9 = alloca i64*
%10 = alloca i64*
%11 = alloca i64*
%12 = alloca i64*
%13 = alloca double*
%14 = alloca i8**
%15 = alloca double*
%16 = alloca double*
store i64* %0, i64** %9
store i64* %1, i64** %10
store i64* %2, i64** %11
store i64* %3, i64** %12
store double* %4, double** %13
store i8** %5, i8*** %14
store double* %6, double** %15
store double* %7, double** %16
%17 = load i64*, i64** %9
%18 = load i64, i64* %17
%19 = load i64*, i64** %10
%20 = load i64, i64* %19
%21 = load i64*, i64** %11
%22 = load i64*, i64** %12
%23 = load double*, double** %13
%24 = load i8**, i8*** %14
%25 = load double*, double** %15
%26 = load double*, double** %16
%27 = call i32 @umfpack_dl_symbolic(i64 %18, i64 %20, i64* %21, i64* %22, double* %23, i8** %24, double* %25, double* %26)
ret void
}

LLVM IR (-O2):
define void @umf4sym_(i64* nocapture %0, i64* nocapture %1, i64* %2, i64* %3, double* %4, i8** %5, double* %6, double* %7) {
%9 = load i64, i64* %0
%10 = load i64, i64* %1
%11 = tail call i32 @umfpack_dl_symbolic(i64 %9, i64 %10, i64* %2, i64* %3, double* %4, i8** %5, double* %6, double* %7)
ret void
}
unsigned bigint_uint_gcd(unsigned a, unsigned b) {
  while (1) {
    if (!a)
      return b;
    b %= a;
    if (!b)
      return a;
    a %= b;
  }
}


x86 assembly (clang, -O0):
<bigint_uint_gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111f <bigint_uint_gcd+0x1f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <bigint_uint_gcd+0x53>
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1141 <bigint_uint_gcd+0x41>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <bigint_uint_gcd+0x53>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %edx,-0x8(%rbp)
jmp    110a <bigint_uint_gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigint_uint_gcd>:
test   %edi,%edi
je     1128 <bigint_uint_gcd+0x28>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %esi,%eax
xor    %edx,%edx
div    %edi
test   %edx,%edx
je     112b <bigint_uint_gcd+0x2b>
mov    %edx,%esi
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%edi
test   %edx,%edx
jne    1110 <bigint_uint_gcd+0x10>
mov    %esi,%eax
ret
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @bigint_uint_gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %12, label %4
4: ; preds = %2, %9
%5 = phi i32 [ %7, %9 ], [ %1, %2 ]
%6 = phi i32 [ %10, %9 ], [ %0, %2 ]
%7 = urem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = urem i32 %6, %7
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %9, %4, %2
%13 = phi i32 [ %1, %2 ], [ %6, %4 ], [ %7, %9 ]
ret i32 %13
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fread(unsigned short *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
unsigned short get_audio_channels(FILE *file) {
  unsigned short ret;
  fseek(file, 22, SEEK_SET);
  fread(&ret, 2, 1, file);
  return ret;
}


x86 assembly (clang, -O0):
<get_audio_channels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%edx
mov    $0x16,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rcx
lea    -0xa(%rbp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <fread@plt>
movzwl -0xa(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_audio_channels>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    $0x16,%esi
call   1040 <fseek@plt>
lea    0xe(%rsp),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
movzwl 0xe(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define zeroext i16 @get_audio_channels(i32* %0) {
%2 = alloca i32*
%3 = alloca i16
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_SET
%6 = call i32 @fseek(i32* %4, i32 22, i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 @fread(i16* %3, i32 2, i32 1, i32* %7)
%9 = load i16, i16* %3
ret i16 %9
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define zeroext i16 @get_audio_channels(i32* nocapture %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @fseek(i32* %0, i32 22, i32 %4)
%6 = call i32 @fread(i16* %2, i32 2, i32 1, i32* %0)
%7 = load i16, i16* %2
ret i16 %7
}
void i386_epilog() {}


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

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

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

LLVM IR (-O2):
define void @i386_epilog() {
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void TimerSynchronize(uint32_t ui32Base, uint32_t ui32Timers) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000010))) = ui32Timers;
}


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

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

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

LLVM IR (-O2):
define void @TimerSynchronize(i64 %0, i64 %1) {
%3 = add i64 %0, 16
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
double sgn(double a) {
  if (a > 0)
    return 1;
  else if (a < 0)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<sgn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112d <sgn+0x2d>
movsd  0xee5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <sgn+0x55>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114d <sgn+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1155 <sgn+0x55>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgn>:
xorpd  %xmm1,%xmm1
movapd %xmm0,%xmm2
cmpltsd %xmm1,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
cmpltsd %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
andpd  %xmm1,%xmm0
andnpd %xmm3,%xmm1
orpd   %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @sgn(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fcmp olt double %0, 0.000000e+00
%4 = select i1 %3, double -1.000000e+00, double 0.000000e+00
%5 = select i1 %2, double 1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
scalar_t__ mlock(void *, int);
void *alloc_noswap(int size) {
  void *ptr;
  ptr = malloc(size);
  if (ptr == NULL)
    return NULL;
  if (mlock(ptr, size)) {
    free(ptr);
    return NULL;
  }
  return ptr;
}


x86 assembly (clang, -O0):
<alloc_noswap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115f <alloc_noswap+0x2f>
movq   $0x0,-0x8(%rbp)
jmp    1193 <alloc_noswap+0x63>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <mlock@plt>
cmp    $0x0,%rax
je     118b <alloc_noswap+0x5b>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
jmp    1193 <alloc_noswap+0x63>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_noswap>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
call   1050 <malloc@plt>
test   %rax,%rax
je     1159 <alloc_noswap+0x29>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1040 <mlock@plt>
test   %rax,%rax
je     115b <alloc_noswap+0x2b>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @alloc_noswap(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i64 @mlock(i8* %2, i32 %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @free(i8* %2)
br label %9
9: ; preds = %4, %1, %7
%10 = phi i8* [ null, %7 ], [ null, %1 ], [ %2, %4 ]
ret i8* %10
}
void INT_Excep_MTU11_TGIV11(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_MTU11_TGIV11() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ loge(char *, int);
int /*<<< orphan*/ usleep(int);
int ms_sleep(int ms) {
  if (ms > 10)
    loge("ms_sleep ms: %d", ms);
  usleep(ms * 1000);
  return (0);
}


x86 assembly (clang, -O0):
<ms_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jle    1144 <ms_sleep+0x24>
mov    -0x4(%rbp),%esi
lea    0xec1(%rip),%rdi
call   1030 <loge@plt>
imul   $0x3e8,-0x4(%rbp),%edi
call   1040 <usleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ms_sleep>:
push   %rbx
mov    %edi,%ebx
cmp    $0xb,%edi
jl     1136 <ms_sleep+0x16>
lea    0xed1(%rip),%rdi
mov    %ebx,%esi
call   1030 <loge@plt>
imul   $0x3e8,%ebx,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"ms_sleep ms: %d\00"
define i32 @ms_sleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @loge(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = mul nsw i32 %9, 1000
%11 = call i32 @usleep(i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"ms_sleep ms: %d\00"
define i32 @ms_sleep(i32 %0) {
%2 = icmp sgt i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @loge(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0)
br label %5
5: ; preds = %3, %1
%6 = mul nsw i32 %0, 1000
%7 = tail call i32 @usleep(i32 %6)
ret i32 0
}
/* Variables and functions */
long strtol(char const *, char **, int);
long itol(const char *s) { return (strtol(s, (char **)0, 10)); }


x86 assembly (clang, -O0):
<itol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itol>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i64 @itol(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i8** null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
define i64 @itol(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i8** null, i32 10)
ret i64 %2
}
long long maxi(long long a, long long b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<maxi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <maxi+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <maxi+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<maxi>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @maxi(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 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @maxi(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
bool nrf52_errata_49(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_49() {
ret i32 0
}
/* Variables and functions */
char const *getenv(char *);
const char *get_path(void) { return getenv("SRAY_DATA_PATH"); }


x86 assembly (clang, -O0):
<get_path>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <getenv@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"SRAY_DATA_PATH\00"
define i8* @get_path() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [15 x i8] c"SRAY_DATA_PATH\00"
define i8* @get_path() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
unsigned xrop3_102_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned stk1;
  stk1 = D ^ S;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_102_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_102_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = shl i32 %9, 8
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = or i32 %10, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = xor i32 %14, %15
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = load i32, i32* %6
%19 = xor i32 %18, -1
%20 = and i32 %17, %19
%21 = load i32, i32* %5
%22 = load i32, i32* %6
%23 = and i32 %21, %22
%24 = or i32 %20, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @xrop3_102_1_0(i8 zeroext %0, i8 zeroext %1) {
ret i32 255
}
/* Variables and functions */
int /*<<< orphan*/ AF_LOCAL;
int /*<<< orphan*/ SOCK_STREAM;
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int it_domain_socket() {
  int socketfd;
  if ((socketfd = socket(AF_LOCAL, SOCK_STREAM, 0)) == -1) {
    assert(0);
    return -1;
  }
  return socketfd;
}


x86 assembly (clang, -O0):
<it_domain_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,-0x8(%rbp)
cmp    $0xffffffff,%eax
jne    1160 <it_domain_socket+0x40>
xor    %edi,%edi
call   1030 <assert@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1166 <it_domain_socket+0x46>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<it_domain_socket>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1040 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1148 <it_domain_socket+0x28>
xor    %edi,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@AF_LOCAL = global i32 0
@SOCK_STREAM = global i32 0
define i32 @it_domain_socket() {
%1 = alloca i32
%2 = alloca i32
%3 = load i32, i32* @AF_LOCAL
%4 = load i32, i32* @SOCK_STREAM
%5 = call i32 @socket(i32 %3, i32 %4, i32 0)
store i32 %5, i32* %2
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 @assert(i32 0)
store i32 -1, i32* %1
br label %11
9: ; preds = %0
%10 = load i32, i32* %2
store i32 %10, i32* %1
br label %11
11: ; preds = %9, %7
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@AF_LOCAL = global i32 0
@SOCK_STREAM = global i32 0
define i32 @it_domain_socket() {
%1 = load i32, i32* @AF_LOCAL
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @assert(i32 0)
br label %7
7: ; preds = %0, %5
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xca() {
  Assert_real((isbdigit(202) == 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_isbdigit.c",
              1015, ("isbdigit should be 0 for 0xca"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xca>:
push   %rax
mov    $0xca,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3f7,%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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xca\00"
define void @t_isbdigit_0xca() {
%1 = call i64 @isbdigit(i32 202)
%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 1015, 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xca\00"
define void @t_isbdigit_0xca() {
%1 = tail call i64 @isbdigit(i32 202)
%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 1015, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int cmd_exit(int argc __attribute__((unused)),
             char **argv __attribute__((unused))) {
  return 3;
}


x86 assembly (clang, -O0):
<cmd_exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @cmd_exit(i32 %0, i8** nocapture readnone %1) {
ret i32 3
}
/* Variables and functions */
scalar_t__ pow(int, int);
int radix_len(int num) {
  int i;
  for (i = 1; num % (int)pow(10, i) != num; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<radix_len>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    $0xa,%edi
call   1030 <pow@plt>
mov    %rax,%rcx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
cmp    -0x4(%rbp),%edx
je     115a <radix_len+0x4a>
jmp    114c <radix_len+0x3c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <radix_len+0x12>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<radix_len>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
mov    $0xa,%edi
mov    %ebx,%esi
call   1030 <pow@plt>
mov    %rax,%rcx
mov    %ebp,%eax
cltd
idiv   %ecx
cmp    %ebp,%edx
jne    1120 <radix_len+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @radix_len(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i64 @pow(i32 10, i32 %6)
%8 = trunc i64 %7 to i32
%9 = srem i32 %5, %8
%10 = load i32, i32* %2
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %4
br label %13
13: ; preds = %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @radix_len(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %8, %2 ]
%4 = tail call i64 @pow(i32 10, i32 %3)
%5 = trunc i64 %4 to i32
%6 = srem i32 %0, %5
%7 = icmp eq i32 %6, %0
%8 = add nuw nsw i32 %3, 1
br i1 %7, label %9, label %2
9: ; preds = %2
ret i32 %3
}