xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *get_my_exe();
int /*<<< orphan*/ *pids_of_exe(char *);
pid_t *pids_of_my_exe(void) {
  char *myexe = get_my_exe();
  pid_t *ret = 0;
  if (myexe) {
    ret = pids_of_exe(myexe);
    free(myexe);
  }
  return ret;
}


x86 assembly (clang, -O0):
<pids_of_my_exe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <get_my_exe@plt>
mov    %rax,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116c <pids_of_my_exe+0x3c>
mov    -0x8(%rbp),%rdi
call   1040 <pids_of_exe@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pids_of_my_exe>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <get_my_exe@plt>
test   %rax,%rax
je     115b <pids_of_my_exe+0x2b>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <pids_of_exe@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
jmp    115d <pids_of_my_exe+0x2d>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @pids_of_my_exe() {
%1 = alloca i8*
%2 = alloca i32*
%3 = call i8* (...) @get_my_exe()
store i8* %3, i8** %1
store i32* null, i32** %2
%4 = load i8*, i8** %1
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %0
%7 = load i8*, i8** %1
%8 = call i32* @pids_of_exe(i8* %7)
store i32* %8, i32** %2
%9 = load i8*, i8** %1
%10 = call i32 @free(i8* %9)
br label %11
11: ; preds = %6, %0
%12 = load i32*, i32** %2
ret i32* %12
}

LLVM IR (-O2):
define i32* @pids_of_my_exe() {
%1 = tail call i8* (...) @get_my_exe()
%2 = icmp eq i8* %1, null
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32* @pids_of_exe(i8* %1)
%5 = tail call i32 @free(i8* %1)
br label %6
6: ; preds = %3, %0
%7 = phi i32* [ %4, %3 ], [ null, %0 ]
ret i32* %7
}
/* Variables and functions */
int /*<<< orphan*/ trap(char *);
void trap_si(void) { trap("software interrupt"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"software interrupt\00"
define void @trap_si() {
%1 = call i32 @trap(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"software interrupt\00"
define void @trap_si() {
%1 = tail call i32 @trap(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int find_or_insert(int);
void *process2(void *arg) {
  int val = 59;
  int found = find_or_insert(val);
  assert(found);
  return NULL;
}


x86 assembly (clang, -O0):
<process2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x3b,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <find_or_insert@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @process2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 59, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @find_or_insert(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = call i32 @assert(i32 %7)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @process2(i8* nocapture readnone %0) {
%2 = tail call i32 @find_or_insert(i32 59)
%3 = tail call i32 @assert(i32 %2)
ret i8* null
}
char next(char *str) {
  char c;
  if (*(str + 1) != '\0')
    c = *(str + 1);
  return c;
}


x86 assembly (clang, -O0):
<next>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     1123 <next+0x23>
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next>:
mov    0x1(%rdi),%al
ret

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

LLVM IR (-O2):
define signext i8 @next(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ readBMPFileAndConvertToMatrix();
int main(void) {
  readBMPFileAndConvertToMatrix();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @readBMPFileAndConvertToMatrix()
ret i32 0
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void DDI32BitsClear(uint32_t ui32Base, uint32_t ui32Reg, uint32_t ui32Val) {
  uint32_t ui32RegOffset;
  ;
  ;
  ui32RegOffset = 0x00000100;
  (*((volatile unsigned long *)(ui32Base + ui32RegOffset + ui32Reg))) = ui32Val;
}


x86 assembly (clang, -O0):
<DDI32BitsClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x100,-0x20(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<DDI32BitsClear>:
mov    %rdx,0x100(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @DDI32BitsClear(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
store i64 256, i64* %7
%8 = load i64, i64* %6
%9 = load i64, i64* %4
%10 = load i64, i64* %7
%11 = add i64 %9, %10
%12 = load i64, i64* %5
%13 = add i64 %11, %12
%14 = inttoptr i64 %13 to i64*
store volatile i64 %8, i64* %14
ret void
}

LLVM IR (-O2):
define void @DDI32BitsClear(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 256
%5 = add i64 %4, %1
%6 = inttoptr i64 %5 to i64*
store volatile i64 %2, i64* %6
ret void
}
signed short int signedshortint_ignoring_unsignedshort(signed short int x,
                                                       unsigned short y) {
  return x;
}


x86 assembly (clang, -O0):
<signedshortint_ignoring_unsignedshort>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedshortint_ignoring_unsignedshort>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @signedshortint_ignoring_unsignedshort(i16 signext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @signedshortint_ignoring_unsignedshort(i16 returned signext %0, i16 zeroext %1) {
ret i16 %0
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_invert(struct TreeNode *);
struct TreeNode *invertTree(struct TreeNode *root) {
  do_invert(root);
  return (root);
}


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

x86 assembly (clang, -O2):
<invertTree>:
push   %rbx
mov    %rdi,%rbx
call   1030 <do_invert@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @invertTree(%struct.TreeNode* %0) {
%2 = alloca %struct.TreeNode*
store %struct.TreeNode* %0, %struct.TreeNode** %2
%3 = load %struct.TreeNode*, %struct.TreeNode** %2
%4 = call i32 @do_invert(%struct.TreeNode* %3)
%5 = load %struct.TreeNode*, %struct.TreeNode** %2
ret %struct.TreeNode* %5
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define %struct.TreeNode* @invertTree(%struct.TreeNode* returned %0) {
%2 = tail call i32 @do_invert(%struct.TreeNode* %0)
ret %struct.TreeNode* %0
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long getMilliseconds() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}


x86 assembly (clang, -O0):
<getMilliseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getMilliseconds>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq (%rsp),%rax
imul   $0x3e8,%rax,%rcx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
cltq
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @getMilliseconds() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @getMilliseconds() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
%11 = sext i32 %10 to i64
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ fb_pixel(unsigned short *, int, int, int, int);
void fb_hline(unsigned short *fbmem, int w, int x1, int y, int x2, int color) {
  int i;
  for (i = x1; i < x2; i++)
    fb_pixel(fbmem, w, i, y, color);
}


x86 assembly (clang, -O0):
<fb_hline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1163 <fb_hline+0x53>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
call   1030 <fb_pixel@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1133 <fb_hline+0x23>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_hline>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    %r8d,%edx
jge    115b <fb_hline+0x4b>
mov    %r9d,%r14d
mov    %r8d,%r12d
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %esi,%r13d
mov    %rdi,%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rbp,%rdi
mov    %r13d,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    %r14d,%r8d
call   1030 <fb_pixel@plt>
add    $0x1,%ebx
cmp    %ebx,%r12d
jne    1140 <fb_hline+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @fb_hline(i16* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i16*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i16* %0, i16** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%14 = load i32, i32* %9
store i32 %14, i32* %13
br label %15
15: ; preds = %26, %6
%16 = load i32, i32* %13
%17 = load i32, i32* %11
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %29
19: ; preds = %15
%20 = load i16*, i16** %7
%21 = load i32, i32* %8
%22 = load i32, i32* %13
%23 = load i32, i32* %10
%24 = load i32, i32* %12
%25 = call i32 @fb_pixel(i16* %20, i32 %21, i32 %22, i32 %23, i32 %24)
br label %26
26: ; preds = %19
%27 = load i32, i32* %13
%28 = add nsw i32 %27, 1
store i32 %28, i32* %13
br label %15
29: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @fb_hline(i16* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp slt i32 %2, %4
br i1 %7, label %8, label %13
8: ; preds = %6, %8
%9 = phi i32 [ %11, %8 ], [ %2, %6 ]
%10 = tail call i32 @fb_pixel(i16* %0, i32 %1, i32 %9, i32 %3, i32 %5)
%11 = add i32 %9, 1
%12 = icmp eq i32 %11, %4
br i1 %12, label %13, label %8
13: ; preds = %8, %6
ret void
}
void arr_swap(char *frst, char *sec) {
  char pom = *sec;
  *sec = *frst;
  *frst = pom;
}


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

x86 assembly (clang, -O2):
<arr_swap>:
mov    (%rsi),%al
mov    (%rdi),%cl
mov    %cl,(%rsi)
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @arr_swap(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** %4
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = load i8*, i8** %4
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %3
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @arr_swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = load i8, i8* %0
store i8 %4, i8* %1
store i8 %3, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ draw_square();
int /*<<< orphan*/ usleep(int);
void idle() {
  usleep(1000);
  usleep(1000);
  draw_square();
}


x86 assembly (clang, -O0):
<idle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x0,%al
call   1030 <draw_square@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<idle>:
push   %rax
mov    $0x3e8,%edi
call   1040 <usleep@plt>
mov    $0x3e8,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <draw_square@plt>

LLVM IR (-O0):
define void @idle() {
%1 = call i32 @usleep(i32 1000)
%2 = call i32 @usleep(i32 1000)
%3 = call i32 (...) @draw_square()
ret void
}

LLVM IR (-O2):
define void @idle() {
%1 = tail call i32 @usleep(i32 1000)
%2 = tail call i32 @usleep(i32 1000)
%3 = tail call i32 (...) @draw_square()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x74() {
  Assert_real((isupper(116) == 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_isupper.c",
              585, ("isupper should be 0 for t"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x74>:
push   %rax
mov    $0x74,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x249,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for t\00"
define void @t_isupper_0x74() {
%1 = call i64 @isupper(i32 116)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 585, 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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for t\00"
define void @t_isupper_0x74() {
%1 = tail call i64 @isupper(i32 116)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 585, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int fun1108() { return 1108; }


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

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

LLVM IR (-O0):
define i32 @fun1108() {
ret i32 1108
}

LLVM IR (-O2):
define i32 @fun1108() {
ret i32 1108
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ os_freakout();
void longjmp(jmp_buf env, int val) { os_freakout(); }


x86 assembly (clang, -O0):
<longjmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <os_freakout@plt>

x86 assembly (clang, -O2):
<longjmp>:
push   %rax
xor    %eax,%eax
call   1030 <os_freakout@plt>

LLVM IR (-O0):
define void @longjmp(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @os_freakout()
unreachable
}

LLVM IR (-O2):
define void @longjmp(i32 %0, i32 %1) {
%3 = tail call i32 (...) @os_freakout()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_lvector(unsigned long *v, long nl, long nh) {
  free((void *)(v + nl - 1));
}


x86 assembly (clang, -O0):
<free_lvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_lvector>:
lea    (%rdi,%rsi,8),%rdi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_lvector(i64* %0, i64 %1, i64 %2) {
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64*, i64** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i64, i64* %7, i64 %8
%10 = getelementptr inbounds i64, i64* %9, i64 -1
%11 = bitcast i64* %10 to i8*
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @free_lvector(i64* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i64, i64* %0, i64 %1
%5 = getelementptr inbounds i64, i64* %4, i64 -1
%6 = bitcast i64* %5 to i8*
%7 = tail call i32 @free(i8* %6)
ret void
}
/* Type definitions */
struct Memos {
  int dummy;
};

/* Variables and functions */
scalar_t__ memos_add(struct Memos *, void *);
void *memoize(struct Memos *memos, void *ptr) {
  if (memos_add(memos, ptr))
    return ptr;
  return NULL;
}


x86 assembly (clang, -O0):
<memoize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <memos_add@plt>
cmp    $0x0,%rax
je     1144 <memoize+0x34>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114c <memoize+0x3c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memoize>:
push   %rbx
mov    %rsi,%rbx
call   1030 <memos_add@plt>
test   %rax,%rax
cmovne %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.Memos = type { i32 }
define i8* @memoize(%struct.Memos* %0, i8* %1) {
%3 = tail call i64 @memos_add(%struct.Memos* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* null, i8* %1
ret i8* %5
}
/* Variables and functions */
int abs(int);
void signed_int_to_two_bytes(int n, unsigned char *byte_ptr) {
  int sign_num;
  *byte_ptr = (unsigned char)(abs(n) % 256);
  byte_ptr++;
  if (n < 0)
    sign_num = 128;
  else
    sign_num = 0;
  *byte_ptr = (unsigned char)(sign_num + (abs(n) / 256));
}


x86 assembly (clang, -O0):
<signed_int_to_two_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1159 <signed_int_to_two_bytes+0x49>
movl   $0x80,-0x14(%rbp)
jmp    1160 <signed_int_to_two_bytes+0x50>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_int_to_two_bytes>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %al,(%rsi)
shr    $0x18,%edi
and    $0xffffff80,%edi
shr    $0x8,%eax
add    %edi,%eax
mov    %al,0x1(%rsi)
ret

LLVM IR (-O0):
define void @signed_int_to_two_bytes(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
%7 = call i32 @abs(i32 %6)
%8 = srem i32 %7, 256
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %4
store i8 %9, i8* %10
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %4
%13 = load i32, i32* %3
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 128, i32* %5
br label %17
16: ; preds = %2
store i32 0, i32* %5
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %5
%19 = load i32, i32* %3
%20 = call i32 @abs(i32 %19)
%21 = sdiv i32 %20, 256
%22 = add nsw i32 %18, %21
%23 = trunc i32 %22 to i8
%24 = load i8*, i8** %4
store i8 %23, i8* %24
ret void
}

LLVM IR (-O2):
define void @signed_int_to_two_bytes(i32 %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = trunc i32 %3 to i8
store i8 %4, i8* %1
%5 = lshr i32 %0, 24
%6 = and i32 %5, 128
%7 = getelementptr inbounds i8, i8* %1, i64 1
%8 = lshr i32 %3, 8
%9 = add nuw nsw i32 %6, %8
%10 = trunc i32 %9 to i8
store i8 %10, i8* %7
ret void
}
char *strcpy(char *dst, const char *src) {
  char *r = dst;
  char c;
  do {
    c = *src++;
    *dst++ = c;
  } while (c);
  return r;
}


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    %al,-0x19(%rbp)
mov    -0x19(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
cmpb   $0x0,-0x19(%rbp)
jne    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*
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
br label %8
8: ; preds = %15, %2
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %4
%11 = load i8, i8* %9
store i8 %11, i8* %6
%12 = load i8, i8* %6
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i32 1
store i8* %14, i8** %3
store i8 %12, i8* %13
br label %15
15: ; preds = %8
%16 = load i8, i8* %6
%17 = icmp ne i8 %16, 0
br i1 %17, label %8, label %18
18: ; preds = %15
%19 = load i8*, i8** %5
ret i8* %19
}

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
}
int h() { return 1; }


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

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

LLVM IR (-O0):
define i32 @h() {
ret i32 1
}

LLVM IR (-O2):
define i32 @h() {
ret i32 1
}
int fun359() { return 359; }


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

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

LLVM IR (-O0):
define i32 @fun359() {
ret i32 359
}

LLVM IR (-O2):
define i32 @fun359() {
ret i32 359
}
void rop3_78_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = S ^ T;
  stk2 = *D | stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


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

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

LLVM IR (-O0):
define void @rop3_78_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %9
%16 = load i8*, i8** %4
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = load i8, i8* %9
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
%22 = trunc i32 %21 to i8
store i8 %22, i8* %8
%23 = load i8, i8* %6
%24 = zext i8 %23 to i32
%25 = load i8, i8* %8
%26 = zext i8 %25 to i32
%27 = xor i32 %24, %26
%28 = trunc i32 %27 to i8
store i8 %28, i8* %7
%29 = load i8, i8* %7
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = load i8, i8* %7
%35 = zext i8 %34 to i32
%36 = load i8, i8* %6
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = or i32 %33, %39
%41 = load i8, i8* %6
%42 = zext i8 %41 to i32
%43 = load i8, i8* %5
%44 = zext i8 %43 to i32
%45 = xor i32 %44, -1
%46 = and i32 %42, %45
%47 = load i8*, i8** %4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = and i32 %46, %49
%51 = or i32 %40, %50
%52 = trunc i32 %51 to i8
%53 = load i8*, i8** %4
store i8 %52, i8* %53
ret void
}

LLVM IR (-O2):
define void @rop3_78_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, %2
%8 = and i8 %7, %1
%9 = xor i8 %2, -1
%10 = and i8 %6, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
%15 = or i8 %14, %8
store i8 %15, i8* %0
ret void
}
void __attribute__((always_)) mck_enable_all_irq() {}


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

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

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

LLVM IR (-O2):
define void @mck_enable_all_irq() {
ret void
}
int main() {
fail:
  return 1;
succ:
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
store i32 1, i32* %1
br label %4
3: ; No predecessors!
store i32 0, i32* %1
br label %4
4: ; preds = %3, %2
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int api1(int, int);
int getkey(int wait) { return api1(201, wait); }


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

x86 assembly (clang, -O2):
<getkey>:
mov    %edi,%esi
mov    $0xc9,%edi
jmp    1030 <api1@plt>

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

LLVM IR (-O2):
define i32 @getkey(i32 %0) {
%2 = tail call i32 @api1(i32 201, i32 %0)
ret i32 %2
}
int sandbox_release_fs_extension(const char *ext_token) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @sandbox_release_fs_extension(i8* nocapture readnone %0) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ RAND_MAX;
float rand();
float f_rand() { return 2 * (rand() / ((float)RAND_MAX)) - 1.; }


x86 assembly (clang, -O0):
<f_rand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
mov    0x2ec3(%rip),%rax
cvtsi2ssq (%rax),%xmm0
divss  %xmm0,%xmm1
movss  0xed2(%rip),%xmm0
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeba(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_rand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
mov    0x2ec9(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
addss  %xmm0,%xmm0
addss  0xecc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @f_rand() {
%1 = call float (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to float
%4 = fdiv float %1, %3
%5 = fmul float 2.000000e+00, %4
%6 = fpext float %5 to double
%7 = fsub double %6, 1.000000e+00
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @f_rand() {
%1 = tail call float (...) @rand()
%2 = load i64, i64* @RAND_MAX
%3 = sitofp i64 %2 to float
%4 = fdiv float %1, %3
%5 = fmul float %4, 2.000000e+00
%6 = fadd float %5, -1.000000e+00
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMRD1_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMRD1_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMRD1_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int isOperator(char c) {
  int result = 0;
  switch (c) {
  case '^':
  case '*':
  case '/':
  case '%':
  case '+':
  case '-':
  case '=':
  case '!':
  case '<':
  case '>':
    result = 1;
    break;
  default:
    break;
  }
  return result;
}


x86 assembly (clang, -O0):
<isOperator>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x21,%eax
je     1192 <isOperator+0x92>
jmp    1126 <isOperator+0x26>
mov    -0xc(%rbp),%eax
sub    $0x25,%eax
je     1192 <isOperator+0x92>
jmp    1137 <isOperator+0x37>
mov    -0xc(%rbp),%eax
add    $0xffffffd6,%eax
sub    $0x2,%eax
jb     1192 <isOperator+0x92>
jmp    114b <isOperator+0x4b>
mov    -0xc(%rbp),%eax
sub    $0x2d,%eax
je     1192 <isOperator+0x92>
jmp    115c <isOperator+0x5c>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     1192 <isOperator+0x92>
jmp    116d <isOperator+0x6d>
mov    -0xc(%rbp),%eax
add    $0xffffffc4,%eax
sub    $0x3,%eax
jb     1192 <isOperator+0x92>
jmp    1181 <isOperator+0x81>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
jne    119e <isOperator+0x9e>
jmp    1192 <isOperator+0x92>
movl   $0x1,-0x8(%rbp)
jmp    11a3 <isOperator+0xa3>
jmp    11a3 <isOperator+0xa3>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isOperator>:
xor    %eax,%eax
add    $0xffffffdf,%edi
cmp    $0x3d,%edi
ja     111f <isOperator+0x1f>
movabs $0x2000000038005611,%rcx
bt     %rdi,%rcx
jae    111f <isOperator+0x1f>
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isOperator(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
store i32 0, i32* %3
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 94, label %6
i32 42, label %6
i32 47, label %6
i32 37, label %6
i32 43, label %6
i32 45, label %6
i32 61, label %6
i32 33, label %6
i32 60, label %6
i32 62, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %3
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @isOperator(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %4 [
i32 94, label %3
i32 42, label %3
i32 47, label %3
i32 37, label %3
i32 43, label %3
i32 45, label %3
i32 61, label %3
i32 33, label %3
i32 60, label %3
i32 62, label %3
]
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
br label %4
4: ; preds = %1, %3
%5 = phi i32 [ 0, %1 ], [ 1, %3 ]
ret i32 %5
}
int highscore_get_id(int *id, int row_dim, int col_dim) {
  *id = row_dim * 100 + col_dim;
  return (0);
}


x86 assembly (clang, -O0):
<highscore_get_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
imul   $0x64,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<highscore_get_id>:
imul   $0x64,%esi,%eax
add    %edx,%eax
mov    %eax,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @highscore_get_id(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = mul nsw i32 %7, 100
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = load i32*, i32** %4
store i32 %10, i32* %11
ret i32 0
}

LLVM IR (-O2):
define i32 @highscore_get_id(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, 100
%5 = add nsw i32 %4, %2
store i32 %5, i32* %0
ret i32 0
}
double *change_sign3(const double a[], double result[]) {
  result[0] = -a[0];
  result[1] = -a[1];
  result[2] = -a[2];
  return result;
}


x86 assembly (clang, -O0):
<change_sign3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_sign3>:
mov    %rsi,%rax
movsd  (%rdi),%xmm0
movaps 0xef2(%rip),%xmm1
xorps  %xmm1,%xmm0
movlps %xmm0,(%rsi)
movsd  0x8(%rdi),%xmm0
xorps  %xmm1,%xmm0
movlps %xmm0,0x8(%rsi)
movsd  0x10(%rdi),%xmm0
xorps  %xmm1,%xmm0
movlps %xmm0,0x10(%rsi)
ret

LLVM IR (-O0):
define double* @change_sign3(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = fneg double %7
%9 = load double*, double** %4
%10 = getelementptr inbounds double, double* %9, i64 0
store double %8, double* %10
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = fneg double %13
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 1
store double %14, double* %16
%17 = load double*, double** %3
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = fneg double %19
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 2
store double %20, double* %22
%23 = load double*, double** %4
ret double* %23
}

LLVM IR (-O2):
define double* @change_sign3(double* nocapture %0, double* returned writeonly %1) {
%3 = load double, double* %0
%4 = fneg double %3
store double %4, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = fneg double %6
%8 = getelementptr inbounds double, double* %1, i64 1
store double %7, double* %8
%9 = getelementptr inbounds double, double* %0, i64 2
%10 = load double, double* %9
%11 = fneg double %10
%12 = getelementptr inbounds double, double* %1, i64 2
store double %11, double* %12
ret double* %1
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void lcd_shift(unsigned char data) { putchar('\n'); }


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

x86 assembly (clang, -O2):
<lcd_shift>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @lcd_shift(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @lcd_shift(i8 zeroext %0) {
%2 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CALC_appendString(char *);
void CALC_addMul() { CALC_appendString("*"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
define void @CALC_addMul() {
%1 = call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"*\00"
define void @CALC_addMul() {
%1 = tail call i32 @CALC_appendString(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
decode_i_s1(int a, int b) {
  b = (b >> 5) & 31;
  return a | 1 << b;
}


x86 assembly (clang, -O0):
<decode_i_s1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x5,%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_i_s1>:
mov    %edi,%eax
shr    $0x5,%esi
bts    %esi,%eax
ret

LLVM IR (-O0):
define i32 @decode_i_s1(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 5
%7 = and i32 %6, 31
store i32 %7, i32* %4
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = shl i32 1, %9
%11 = or i32 %8, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @decode_i_s1(i32 %0, i32 %1) {
%3 = lshr i32 %1, 5
%4 = and i32 %3, 31
%5 = shl nuw i32 1, %4
%6 = or i32 %5, %0
ret i32 %6
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_uid;
};
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int _print_user_info(struct stat file_stat) {
  struct passwd *usr;
  if ((usr = getpwuid(file_stat.st_uid)) == NULL)
    return -1;
  printf("%s", usr->pw_name);
  return 0;
}


x86 assembly (clang, -O0):
<_print_user_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    114d <_print_user_info+0x2d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <_print_user_info+0x47>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_print_user_info>:
push   %rax
call   1030 <getpwuid@plt>
test   %rax,%rax
je     113e <_print_user_info+0x1e>
mov    (%rax),%rsi
lea    0xecb(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
%struct.passwd = type { i8* }
@.str = [3 x i8] c"%s\00"
define i32 @_print_user_info(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.stat
%4 = alloca %struct.passwd*
%5 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call %struct.passwd* @getpwuid(i32 %7)
store %struct.passwd* %8, %struct.passwd** %4
%9 = icmp eq %struct.passwd* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %16
11: ; preds = %1
%12 = load %struct.passwd*, %struct.passwd** %4
%13 = getelementptr inbounds %struct.passwd, %struct.passwd* %12, i32 0, i32 0
%14 = load i8*, i8** %13
%15 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %14)
store i32 0, i32* %2
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
@.str = [3 x i8] c"%s\00"
define i32 @_print_user_info(i32 %0) {
%2 = tail call %struct.passwd* @getpwuid(i32 %0)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i8*, i8** %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ 0, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int);
int /*<<< orphan*/ stderr;
void celt_warning_int(const char *str, int val) {
  fprintf(stderr, "warning: %s %d\n", str, val);
}


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

x86 assembly (clang, -O2):
<celt_warning_int>:
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"warning: %s %d\0A\00"
define void @celt_warning_int(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"warning: %s %d\0A\00"
define void @celt_warning_int(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
long double ldexpl(long double x, int exp) { return x * (1 << exp); }


x86 assembly (clang, -O0):
<ldexpl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
fldt   -0x10(%rbp)
mov    -0x14(%rbp),%cl
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,-0x18(%rbp)
fildl  -0x18(%rbp)
fmulp  %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexpl>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
fldt   0x8(%rsp)
mov    %eax,-0x4(%rsp)
fimull -0x4(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @ldexpl(x86_fp80 %0, i32 %1) {
%3 = alloca x86_fp80
%4 = alloca i32
store x86_fp80 %0, x86_fp80* %3
store i32 %1, i32* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = sitofp i32 %7 to x86_fp80
%9 = fmul x86_fp80 %5, %8
ret x86_fp80 %9
}

LLVM IR (-O2):
define x86_fp80 @ldexpl(x86_fp80 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = sitofp i32 %3 to x86_fp80
%5 = fmul x86_fp80 %4, %0
ret x86_fp80 %5
}
double MINf(float a, float b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<MINf>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <MINf+0x30>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    113a <MINf+0x3a>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<MINf>:
minss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @MINf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load float, float* %3
br label %12
10: ; preds = %2
%11 = load float, float* %4
br label %12
12: ; preds = %10, %8
%13 = phi float [ %9, %8 ], [ %11, %10 ]
%14 = fpext float %13 to double
ret double %14
}

LLVM IR (-O2):
define double @MINf(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
%5 = fpext float %4 to double
ret double %5
}