xunge/DecIR huggingface dataset:
void uart_init() {
  (*(volatile unsigned long *)0x7F008000) &= 0;
  (*(volatile unsigned long *)0x7F008000) = 0x22222222;
  (*(volatile unsigned long *)0x7F005000) = 0x3;
  (*(volatile unsigned long *)0x7F005004) = 0x5;
  (*(volatile unsigned long *)0x7F005008) = 0x1;
  (*(volatile unsigned long *)0x7F00500C) = 0;
  (*(volatile unsigned short *)0x7F005028) = 35;
  (*(volatile unsigned short *)0x7F00502C) = 0x1;
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008000,%eax
mov    (%rax),%rcx
and    $0x0,%rcx
mov    $0x7f008000,%eax
mov    %rcx,(%rax)
mov    $0x7f008000,%eax
movq   $0x22222222,(%rax)
mov    $0x7f005000,%eax
movq   $0x3,(%rax)
mov    $0x7f005004,%eax
movq   $0x5,(%rax)
mov    $0x7f005008,%eax
movq   $0x1,(%rax)
mov    $0x7f00500c,%eax
movq   $0x0,(%rax)
mov    $0x7f005028,%eax
movw   $0x23,(%rax)
mov    $0x7f00502c,%eax
movw   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
mov    0x7f008000,%rax
7f
movq   $0x0,0x7f008000
movq   $0x22222222,0x7f008000
7f 22 22 22 22
movq   $0x3,0x7f005000
movq   $0x5,0x7f005004
movq   $0x1,0x7f005008
movq   $0x0,0x7f00500c
movw   $0x23,0x7f005028
movw   $0x1,0x7f00502c
ret

LLVM IR (-O0):
define void @uart_init() {
%1 = load volatile i64, i64* inttoptr (i64 2130739200 to i64*)
%2 = and i64 %1, 0
store volatile i64 %2, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 572662306, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
store volatile i16 35, i16* inttoptr (i64 2130726952 to i16*)
store volatile i16 1, i16* inttoptr (i64 2130726956 to i16*)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = load volatile i64, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 572662306, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
store volatile i16 35, i16* inttoptr (i64 2130726952 to i16*)
store volatile i16 1, i16* inttoptr (i64 2130726956 to i16*)
ret void
}
void lgtd_proto_untag(struct lgtd_client *client,
                      const struct lgtd_proto_target_list *targets,
                      const char *tag_label) {
  (void)client;
  (void)targets;
  (void)tag_label;
}


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

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

LLVM IR (-O0):
%struct.lgtd_client = type opaque
%struct.lgtd_proto_target_list = type opaque
define void @lgtd_proto_untag(%struct.lgtd_client* %0, %struct.lgtd_proto_target_list* %1, i8* %2) {
%4 = alloca %struct.lgtd_client*
%5 = alloca %struct.lgtd_proto_target_list*
%6 = alloca i8*
store %struct.lgtd_client* %0, %struct.lgtd_client** %4
store %struct.lgtd_proto_target_list* %1, %struct.lgtd_proto_target_list** %5
store i8* %2, i8** %6
%7 = load %struct.lgtd_client*, %struct.lgtd_client** %4
%8 = load %struct.lgtd_proto_target_list*, %struct.lgtd_proto_target_list** %5
%9 = load i8*, i8** %6
ret void
}

LLVM IR (-O2):
%struct.lgtd_client = type opaque
%struct.lgtd_proto_target_list = type opaque
define void @lgtd_proto_untag(%struct.lgtd_client* nocapture %0, %struct.lgtd_proto_target_list* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int O_CREAT;
int O_RDWR;
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("O_RDWR: %x\n", O_RDWR);
  printf("O_CREAT: %x\n", O_CREAT);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"O_RDWR: %x\0A\00"
@O_RDWR = global i32 0
@.str.1 = [13 x i8] c"O_CREAT: %x\0A\00"
@O_CREAT = global i32 0
define i32 @main() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @O_CREAT
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void __attribute((destructor)) mdbg_cleanup_mem_alloc(void) {
  write(2, "destr\n", 6);
}


x86 assembly (clang, -O0):
<mdbg_cleanup_mem_alloc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
lea    0xee0(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdbg_cleanup_mem_alloc>:
lea    0xee9(%rip),%rsi
mov    $0x2,%edi
mov    $0x6,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"destr\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mdbg_cleanup_mem_alloc, i8* null }]
define void @mdbg_cleanup_mem_alloc() {
%1 = call i32 @write(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"destr\0A\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @mdbg_cleanup_mem_alloc, i8* null }]
define void @mdbg_cleanup_mem_alloc() {
%1 = tail call i32 @write(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
ret void
}
void sm_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @sm_cleanup() {
ret void
}
void foo517() {}


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

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

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

LLVM IR (-O2):
define void @foo517() {
ret void
}
/* Variables and functions */
unsigned int inl_local(int);
int /*<<< orphan*/ slow_down_io();
__attribute__((always_)) unsigned int inl_local_p(int port) {
  unsigned int value = inl_local(port);
  slow_down_io();
  return value;
}


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

x86 assembly (clang, -O2):
<inl_local_p>:
push   %rbx
call   1030 <inl_local@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <slow_down_io@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @inl_local_p(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @inl_local(i32 %4)
store i32 %5, i32* %3
%6 = call i32 (...) @slow_down_io()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @inl_local_p(i32 %0) {
%2 = tail call i32 @inl_local(i32 %0)
%3 = tail call i32 (...) @slow_down_io()
ret i32 %2
}
/* Variables and functions */
double texel_sigmoid(double);
double texel_error(double score, double result) {
  return result - texel_sigmoid(score);
}


x86 assembly (clang, -O0):
<texel_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <texel_sigmoid@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<texel_error>:
push   %rax
movsd  %xmm1,(%rsp)
call   1030 <texel_sigmoid@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
define double @texel_error(double %0, double %1) {
%3 = tail call double @texel_sigmoid(double %0)
%4 = fsub double %1, %3
ret double %4
}
/* Type definitions */
struct passwd {
  char *pw_name;
};

/* Variables and functions */
struct passwd *getpwuid(int /*<<< orphan*/);
int /*<<< orphan*/ getuid();
char *getusername() {
  char *username = NULL;
  struct passwd *password = getpwuid(getuid());
  if (password) {
    username = password->pw_name;
  }
  return username;
}


x86 assembly (clang, -O0):
<getusername>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1158 <getusername+0x38>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getusername>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getuid@plt>
mov    %eax,%edi
call   1030 <getpwuid@plt>
test   %rax,%rax
je     1139 <getusername+0x19>
mov    (%rax),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.passwd = type { i8* }
define i8* @getusername() {
%1 = alloca i8*
%2 = alloca %struct.passwd*
store i8* null, i8** %1
%3 = call i32 (...) @getuid()
%4 = call %struct.passwd* @getpwuid(i32 %3)
store %struct.passwd* %4, %struct.passwd** %2
%5 = load %struct.passwd*, %struct.passwd** %2
%6 = icmp ne %struct.passwd* %5, null
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load %struct.passwd*, %struct.passwd** %2
%9 = getelementptr inbounds %struct.passwd, %struct.passwd* %8, i32 0, i32 0
%10 = load i8*, i8** %9
store i8* %10, i8** %1
br label %11
11: ; preds = %7, %0
%12 = load i8*, i8** %1
ret i8* %12
}

LLVM IR (-O2):
%struct.passwd = type { i8* }
define i8* @getusername() {
%1 = tail call i32 (...) @getuid()
%2 = tail call %struct.passwd* @getpwuid(i32 %1)
%3 = icmp eq %struct.passwd* %2, null
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = getelementptr inbounds %struct.passwd, %struct.passwd* %2, i64 0, i32 0
%6 = load i8*, i8** %5
br label %7
7: ; preds = %4, %0
%8 = phi i8* [ %6, %4 ], [ null, %0 ]
ret i8* %8
}
/* Type definitions */
struct pcf_entry {
  int dummy;
};

/* Variables and functions */
struct pcf_entry *getentry(void *, int);
unsigned int getformat(void *, struct pcf_entry *);
unsigned int pcf_getbitmapalign(void *base) {
  struct pcf_entry *entry = getentry(base, (1 << 3));
  unsigned int format = getformat(base, entry);
  return 1 << (format & 3);
}


x86 assembly (clang, -O0):
<pcf_getbitmapalign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1040 <getentry@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <getformat@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
and    $0x3,%ecx
mov    $0x1,%eax
shl    %cl,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcf_getbitmapalign>:
push   %rbx
mov    %rdi,%rbx
mov    $0x8,%esi
call   1040 <getentry@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <getformat@plt>
and    $0x3,%al
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%edx
mov    %edx,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.pcf_entry = type { i32 }
define i32 @pcf_getbitmapalign(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.pcf_entry*
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call %struct.pcf_entry* @getentry(i8* %5, i32 8)
store %struct.pcf_entry* %6, %struct.pcf_entry** %3
%7 = load i8*, i8** %2
%8 = load %struct.pcf_entry*, %struct.pcf_entry** %3
%9 = call i32 @getformat(i8* %7, %struct.pcf_entry* %8)
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = and i32 %10, 3
%12 = shl i32 1, %11
ret i32 %12
}

LLVM IR (-O2):
%struct.pcf_entry = type { i32 }
define i32 @pcf_getbitmapalign(i8* %0) {
%2 = tail call %struct.pcf_entry* @getentry(i8* %0, i32 8)
%3 = tail call i32 @getformat(i8* %0, %struct.pcf_entry* %2)
%4 = and i32 %3, 3
%5 = shl nuw nsw i32 1, %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_NAME;
typedef int /*<<< orphan*/ ASN1_STRING;

/* Variables and functions */
unsigned char *ASN1_STRING_data(int /*<<< orphan*/ *);
int /*<<< orphan*/ *req_GetNameNidI(int /*<<< orphan*/ *, unsigned long);
unsigned char *req_GetNameNid(X509_NAME *name, unsigned long nid) {
  ASN1_STRING *str = req_GetNameNidI(name, nid);
  if (!str)
    return NULL;
  return ASN1_STRING_data(str);
}


x86 assembly (clang, -O0):
<req_GetNameNid>:
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   1040 <req_GetNameNidI@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1159 <req_GetNameNid+0x39>
movq   $0x0,-0x8(%rbp)
jmp    1166 <req_GetNameNid+0x46>
mov    -0x20(%rbp),%rdi
call   1030 <ASN1_STRING_data@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<req_GetNameNid>:
push   %rax
call   1040 <req_GetNameNidI@plt>
test   %rax,%rax
je     1134 <req_GetNameNid+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1030 <ASN1_STRING_data@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @req_GetNameNid(i32* %0, i64 %1) {
%3 = tail call i32* @req_GetNameNidI(i32* %0, i64 %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i8* @ASN1_STRING_data(i32* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ null, %2 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrefixEvaluation() { printf("hey i am PrefixEvaluation"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"hey i am PrefixEvaluation\00"
define void @PrefixEvaluation() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"hey i am PrefixEvaluation\00"
define void @PrefixEvaluation() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
float absolute(float x) {
  if (x < 0) {
    return -x;
  } else {
    return x;
  }
}


x86 assembly (clang, -O0):
<absolute>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1132 <absolute+0x32>
movss  -0x8(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113c <absolute+0x3c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absolute>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @absolute(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void write32(volatile void *addr, uint32_t val) {
  *(volatile uint32_t *)addr = val;
}


x86 assembly (clang, -O0):
<write32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write32>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @write32(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store volatile i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M702_f(char *s) {
  debug("M702_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M702_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M702_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M702_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M702_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M702_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M702_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
void VDP_setPaletteColor(unsigned short numpal, unsigned short numcol,
                         unsigned short value) {
  volatile unsigned short *pw;
  volatile unsigned long *pl;
  unsigned short addr;
  pw = (unsigned short *)0xC00000;
  pl = (unsigned long *)0xC00004;
  addr = (numpal * 32) + (numcol * 2);
  *pl = ((0xC000 + ((addr)&0x3FFF)) << 16) + (((addr) >> 14) | 0x00);
  *pw = value;
}


x86 assembly (clang, -O0):
<VDP_setPaletteColor>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    $0xc00000,%eax
mov    %rax,-0x10(%rbp)
mov    $0xc00004,%eax
mov    %rax,-0x18(%rbp)
movzwl -0x2(%rbp),%eax
shl    $0x5,%eax
movzwl -0x4(%rbp),%ecx
shl    $0x1,%ecx
add    %ecx,%eax
mov    %ax,-0x1a(%rbp)
movzwl -0x1a(%rbp),%eax
and    $0x3fff,%eax
add    $0xc000,%eax
shl    $0x10,%eax
movzwl -0x1a(%rbp),%ecx
sar    $0xe,%ecx
or     $0x0,%ecx
add    %ecx,%eax
movslq %eax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x6(%rbp),%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VDP_setPaletteColor>:
shl    $0x5,%edi
lea    (%rdi,%rsi,2),%eax
movzwl %ax,%eax
mov    %eax,%ecx
shl    $0x10,%ecx
shr    $0xe,%eax
or     %ecx,%eax
or     $0xc0000000,%eax
cltq
mov    %rax,0xc00004
mov    %dx,0xc00000
ret

LLVM IR (-O0):
define void @VDP_setPaletteColor(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i16
%7 = alloca i16*
%8 = alloca i64*
%9 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
store i16* inttoptr (i64 12582912 to i16*), i16** %7
store i64* inttoptr (i64 12582916 to i64*), i64** %8
%10 = load i16, i16* %4
%11 = zext i16 %10 to i32
%12 = mul nsw i32 %11, 32
%13 = load i16, i16* %5
%14 = zext i16 %13 to i32
%15 = mul nsw i32 %14, 2
%16 = add nsw i32 %12, %15
%17 = trunc i32 %16 to i16
store i16 %17, i16* %9
%18 = load i16, i16* %9
%19 = zext i16 %18 to i32
%20 = and i32 %19, 16383
%21 = add nsw i32 49152, %20
%22 = shl i32 %21, 16
%23 = load i16, i16* %9
%24 = zext i16 %23 to i32
%25 = ashr i32 %24, 14
%26 = or i32 %25, 0
%27 = add nsw i32 %22, %26
%28 = sext i32 %27 to i64
%29 = load i64*, i64** %8
store volatile i64 %28, i64* %29
%30 = load i16, i16* %6
%31 = load i16*, i16** %7
store volatile i16 %30, i16* %31
ret void
}

LLVM IR (-O2):
define void @VDP_setPaletteColor(i16 zeroext %0, i16 zeroext %1, i16 zeroext %2) {
%4 = shl i16 %0, 5
%5 = shl i16 %1, 1
%6 = add i16 %5, %4
%7 = zext i16 %6 to i32
%8 = shl nuw i32 %7, 16
%9 = lshr i32 %7, 14
%10 = or i32 %8, %9
%11 = or i32 %10, -1073741824
%12 = sext i32 %11 to i64
store volatile i64 %12, i64* inttoptr (i64 12582916 to i64*)
store volatile i16 %2, i16* inttoptr (i64 12582912 to i16*)
ret void
}
unsigned long buf_get_uint32_le(const void *buf, unsigned long addr) {
  const unsigned char *tmp = (const unsigned char *)buf + addr;
  unsigned long ret;
  ret = tmp[3];
  ret = (ret << 8) | tmp[2];
  ret = (ret << 8) | tmp[1];
  ret = (ret << 8) | tmp[0];
  return (ret);
}


x86 assembly (clang, -O0):
<buf_get_uint32_le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x3(%rax),%eax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x8,%rax
mov    -0x18(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x8,%rax
mov    -0x18(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
shl    $0x8,%rax
mov    -0x18(%rbp),%rcx
movzbl (%rcx),%ecx
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @buf_get_uint32_le(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = load i8*, i8** %3
%8 = load i64, i64* %4
%9 = getelementptr inbounds i8, i8* %7, i64 %8
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = getelementptr inbounds i8, i8* %10, i64 3
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
store i64 %13, i64* %6
%14 = load i64, i64* %6
%15 = shl i64 %14, 8
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 2
%18 = load i8, i8* %17
%19 = zext i8 %18 to i64
%20 = or i64 %15, %19
store i64 %20, i64* %6
%21 = load i64, i64* %6
%22 = shl i64 %21, 8
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = zext i8 %25 to i64
%27 = or i64 %22, %26
store i64 %27, i64* %6
%28 = load i64, i64* %6
%29 = shl i64 %28, 8
%30 = load i8*, i8** %5
%31 = getelementptr inbounds i8, i8* %30, i64 0
%32 = load i8, i8* %31
%33 = zext i8 %32 to i64
%34 = or i64 %29, %33
store i64 %34, i64* %6
%35 = load i64, i64* %6
ret i64 %35
}

LLVM IR (-O2):
define i64 @buf_get_uint32_le(i8* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 %1
%4 = getelementptr inbounds i8, i8* %3, i64 3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 2
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = shl nuw nsw i64 %6, 16
%11 = shl nuw nsw i64 %9, 8
%12 = or i64 %11, %10
%13 = getelementptr inbounds i8, i8* %3, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i64
%16 = or i64 %12, %15
%17 = shl nuw nsw i64 %16, 8
%18 = load i8, i8* %3
%19 = zext i8 %18 to i64
%20 = or i64 %17, %19
ret i64 %20
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
char player2symbol(char player) {
  switch (player) {
  case 1:
    return 'x';
  case -1:
    return 'o';
  case 0:
    return ' ';
  default:
    assert(0);
  }
}


x86 assembly (clang, -O0):
<player2symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0xffffffff,%eax
je     115d <player2symbol+0x4d>
jmp    1133 <player2symbol+0x23>
mov    -0x8(%rbp),%eax
test   %eax,%eax
je     1166 <player2symbol+0x56>
jmp    1143 <player2symbol+0x33>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
jne    116f <player2symbol+0x5f>
jmp    1154 <player2symbol+0x44>
movb   $0x78,-0x1(%rbp)
jmp    1176 <player2symbol+0x66>
movb   $0x6f,-0x1(%rbp)
jmp    1176 <player2symbol+0x66>
movb   $0x20,-0x1(%rbp)
jmp    1176 <player2symbol+0x66>
xor    %edi,%edi
call   1030 <assert@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<player2symbol>:
add    $0x1,%edi
cmp    $0x3,%edi
jae    1125 <player2symbol+0x15>
shl    $0x3,%edi
mov    $0x78206f,%eax
mov    %edi,%ecx
shr    %cl,%eax
ret
push   %rax
xor    %edi,%edi
call   1030 <assert@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define signext i8 @player2symbol(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %9 [
i32 1, label %6
i32 -1, label %7
i32 0, label %8
]
6: ; preds = %1
store i8 120, i8* %2
br label %11
7: ; preds = %1
store i8 111, i8* %2
br label %11
8: ; preds = %1
store i8 32, i8* %2
br label %11
9: ; preds = %1
%10 = call i32 @assert(i32 0)
br label %11
11: ; preds = %6, %7, %8, %9
%12 = load i8, i8* %2
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @player2symbol(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, 1
%4 = icmp ult i32 %3, 3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @assert(i32 0)
br label %12
7: ; preds = %1
%8 = trunc i32 %3 to i24
%9 = shl i24 %8, 3
%10 = lshr i24 7872623, %9
%11 = trunc i24 %10 to i8
br label %12
12: ; preds = %7, %5
%13 = phi i8 [ undef, %5 ], [ %11, %7 ]
ret i8 %13
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ __stdfix_sat_hk(scalar_t__);
int32_t __stdfix_sneg_hk(int32_t x) { return (__stdfix_sat_hk((int32_t)-x)); }


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

x86 assembly (clang, -O2):
<__stdfix_sneg_hk>:
neg    %rdi
jmp    1030 <__stdfix_sat_hk@plt>

LLVM IR (-O0):
define i64 @__stdfix_sneg_hk(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 0, %3
%5 = call i64 @__stdfix_sat_hk(i64 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @__stdfix_sneg_hk(i64 %0) {
%2 = sub nsw i64 0, %0
%3 = tail call i64 @__stdfix_sat_hk(i64 %2)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0x19() {
  Assert_real((isprint(25) == 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_isprint.c",
              130, ("isprint should be 0 for 0x19"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0x19>:
push   %rax
mov    $0x19,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x82,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x19\00"
define void @t_isprint_0x19() {
%1 = call i64 @isprint(i32 25)
%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 130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0x19\00"
define void @t_isprint_0x19() {
%1 = tail call i64 @isprint(i32 25)
%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 130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
__attribute__((__weak__, __always___)) char *softboundcets_strcpy(char *dest,
                                                                  char *src) {
  void *ret_ptr = strcpy(dest, src);
  __softboundcets_propagate_metadata_shadow_stack_from(1, 0);
  return ret_ptr;
}


x86 assembly (clang, -O0):
<softboundcets_strcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
mov    $0x0,%al
call   1040 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<softboundcets_strcpy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcpy@plt>
mov    $0x1,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <__softboundcets_propagate_metadata_shadow_stack_from@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define weak i8* @softboundcets_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
%7 = load i8*, i8** %4
%8 = call i8* @strcpy(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @__softboundcets_propagate_metadata_shadow_stack_from to i32 (i32, i32, ...)*)(i32 1, i32 0)
%10 = load i8*, i8** %5
ret i8* %10
}

LLVM IR (-O2):
define weak i8* @softboundcets_strcpy(i8* %0, i8* %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @__softboundcets_propagate_metadata_shadow_stack_from to i32 (i32, i32, ...)*)(i32 1, i32 0)
ret i8* %0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int create_homotopy_with_given_gamma(double gamma_re, double gamma_im) {
  int *a, *b, fail;
  double c[2];
  c[0] = gamma_re;
  c[1] = gamma_im;
  fail = _ada_use_c2phc(153, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<create_homotopy_with_given_gamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    -0x40(%rbp),%rcx
mov    $0x99,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_homotopy_with_given_gamma>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %rsp,%rcx
mov    $0x99,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @create_homotopy_with_given_gamma(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca [2 x double]
store double %0, double* %3
store double %1, double* %4
%9 = load double, double* %3
%10 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
store double %9, double* %10
%11 = load double, double* %4
%12 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 1
store double %11, double* %12
%13 = load i32*, i32** %5
%14 = load i32*, i32** %6
%15 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%16 = call i32 @_ada_use_c2phc(i32 153, i32* %13, i32* %14, double* %15)
store i32 %16, i32* %7
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @create_homotopy_with_given_gamma(double %0, double %1) {
%3 = alloca [2 x double]
%4 = bitcast [2 x double]* %3 to i8*
%5 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 0
store double %0, double* %5
%6 = getelementptr inbounds [2 x double], [2 x double]* %3, i64 0, i64 1
store double %1, double* %6
%7 = call i32 @_ada_use_c2phc(i32 153, i32* undef, i32* undef, double* %5)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ initialize(int **, int);
int /*<<< orphan*/ play(int **, int);
int /*<<< orphan*/ print(int **);
int main(void) {
  int x[10][10];
  initialize(x, 1);
  print(x);
  play(x, 10);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
mov    $0x1,%esi
call   1040 <initialize@plt>
lea    -0x1a0(%rbp),%rdi
call   1030 <print@plt>
lea    -0x1a0(%rbp),%rdi
mov    $0xa,%esi
call   1050 <play@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x190,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <initialize@plt>
mov    %rbx,%rdi
call   1030 <print@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <play@plt>
xor    %eax,%eax
add    $0x190,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [10 x i32]]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%4 = bitcast [10 x i32]* %3 to i32**
%5 = call i32 @initialize(i32** %4, i32 1)
%6 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%7 = bitcast [10 x i32]* %6 to i32**
%8 = call i32 @print(i32** %7)
%9 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%10 = bitcast [10 x i32]* %9 to i32**
%11 = call i32 @play(i32** %10, i32 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x [10 x i32]]
%2 = bitcast [10 x [10 x i32]]* %1 to i8*
%3 = bitcast [10 x [10 x i32]]* %1 to i32**
%4 = call i32 @initialize(i32** %3, i32 1)
%5 = call i32 @print(i32** %3)
%6 = call i32 @play(i32** %3, i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fn_glutPassiveMotionFunc(void *);
void glutPassiveMotionFunc(void *fn) { fn_glutPassiveMotionFunc(fn); }


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

x86 assembly (clang, -O2):
<glutPassiveMotionFunc>:
jmp    1030 <fn_glutPassiveMotionFunc@plt>

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

LLVM IR (-O2):
define void @glutPassiveMotionFunc(i8* %0) {
%2 = tail call i32 @fn_glutPassiveMotionFunc(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x8d() {
  Assert_real((isalnum(141) == 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_isalnum.c",
              710, ("isalnum should be 0 for 0x8d"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x8d>:
push   %rax
mov    $0x8d,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2c6,%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 = [29 x i8] c"isalnum should be 0 for 0x8d\00"
define void @t_isalnum_0x8d() {
%1 = call i64 @isalnum(i32 141)
%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 710, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x8d\00"
define void @t_isalnum_0x8d() {
%1 = tail call i64 @isalnum(i32 141)
%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 710, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int isalnum(int c) {
  return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
         (c >= '0' && c <= '9');
}


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1120 <isalnum+0x20>
mov    $0x1,%al
cmpl   $0x7a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isalnum+0x58>
cmpl   $0x41,-0x4(%rbp)
jl     1139 <isalnum+0x39>
mov    $0x1,%al
cmpl   $0x5a,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1158 <isalnum+0x58>
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     1152 <isalnum+0x52>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
mov    %edi,%eax
and    $0xffffffdf,%eax
add    $0xffffffbf,%eax
cmp    $0x1a,%eax
setb   %al
add    $0xffffffd0,%edi
cmp    $0xa,%edi
setb   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %22, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 65
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 90
br i1 %13, label %22, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp sge i32 %15, 48
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp sle i32 %18, 57
br label %20
20: ; preds = %17, %14
%21 = phi i1 [ false, %14 ], [ %19, %17 ]
br label %22
22: ; preds = %20, %11, %5
%23 = phi i1 [ true, %11 ], [ true, %5 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = and i32 %0, -33
%3 = add i32 %2, -65
%4 = icmp ult i32 %3, 26
%5 = add i32 %0, -48
%6 = icmp ult i32 %5, 10
%7 = or i1 %6, %4
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ error(int, char *, char *, char *);
void dollar_error(int lineno, char *line, char *cptr) {
  error(lineno, line, cptr, "illegal $-name");
}


x86 assembly (clang, -O0):
<dollar_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xecb(%rip),%rcx
call   1030 <error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dollar_error>:
lea    0xee9(%rip),%rcx
jmp    1030 <error@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"illegal $-name\00"
define void @dollar_error(i32 %0, i8* %1, i8* %2) {
%4 = tail call i32 @error(i32 %0, i8* %1, i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  char character = 'A';
  char string[] = "This is a string";
  printf("%c\n", character);
  printf("%s\n", "This is a string");
  printf("%s\n", string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x41,-0x5(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed1(%rip),%al
mov    %al,-0x10(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xec4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeba(%rip),%rdi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x20(%rbp),%rsi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xee4(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x10(%rsp)
lea    0xed4(%rip),%rbx
lea    0xebd(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rsp,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.string = [17 x i8] c"This is a string\00"
@.str = [4 x i8] c"%c\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [17 x i8] c"This is a string\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [17 x i8]
store i32 0, i32* %1
store i8 65, i8* %2
%4 = bitcast [17 x i8]* %3 to i8*
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds [17 x i8], [17 x i8]* %3, i64 0, i64 0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
@.str.2 = [17 x i8] c"This is a string\00"
define i32 @main() {
%1 = alloca [17 x i8]
%2 = getelementptr inbounds [17 x i8], [17 x i8]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 65)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @puts(i8* %2)
ret i32 0
}
char *astrcat(char *s, char *ct) {
  char *out = s;
  while (*s++)
    ;
  s--;
  while ((*s++ = *ct++))
    ;
  return out;
}


x86 assembly (clang, -O0):
<astrcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1131 <astrcat+0x31>
jmp    1114 <astrcat+0x14>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%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     116c <astrcat+0x6c>
jmp    113d <astrcat+0x3d>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<astrcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <astrcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <astrcat+0x20>
ret

LLVM IR (-O0):
define i8* @astrcat(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 = %12, %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %3
%10 = load i8, i8* %8
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %3
br label %16
16: ; preds = %23, %13
%17 = load i8*, i8** %4
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %4
%19 = load i8, i8* %17
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i32 1
store i8* %21, i8** %3
store i8 %19, i8* %20
%22 = icmp ne i8 %19, 0
br i1 %22, label %23, label %24
23: ; preds = %16
br label %16
24: ; preds = %16
%25 = load i8*, i8** %5
ret i8* %25
}

LLVM IR (-O2):
define i8* @astrcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
int test_imm_8Buint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x8B << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Buint64_midword_reg>:
test   $0x8b0000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Buint64_midword_reg(i64 %0) {
%2 = and i64 %0, 9109504
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}