xunge/DecIR huggingface dataset:
const char *gai_strerror(int ecode) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  while (1)
    ;
  return 0;
}


x86 assembly (clang, -O0):
<gai_strerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
lea    0xedc(%rip),%rsi
lea    0xee7(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
jmp    1132 <gai_strerror+0x22>

x86 assembly (clang, -O2):
<gai_strerror>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
nopl   0x0(%rax,%rax,1)
jmp    1130 <gai_strerror+0x20>

LLVM IR (-O0):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.gai_strerror = [13 x i8] c"gai_strerror\00"
define i8* @gai_strerror(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.gai_strerror, i64 0, i64 0))
br label %4
4: ; preds = %1, %4
br label %4
}

LLVM IR (-O2):
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.gai_strerror = [13 x i8] c"gai_strerror\00"
define i8* @gai_strerror(i32 %0) {
%2 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__FUNCTION__.gai_strerror, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
br label %3
}
void UserPreShutdownCalloutf(void) {}


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

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

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

LLVM IR (-O2):
define void @UserPreShutdownCalloutf() {
ret void
}
int pci_save_msix_state(struct pci_dev *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define i32 @pci_save_msix_state(%struct.pci_dev* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef size_t uint32_t;
typedef size_t uint16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void _print_ts(uint16_t len, double *tsdata) {
  uint32_t i;
  for (i = 0; i < len; i++)
    printf("%0.4f ", tsdata[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<_print_ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1162 <_print_ts+0x52>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xeb6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <_print_ts+0x18>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_print_ts>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1159 <_print_ts+0x39>
mov    %rsi,%r14
mov    %rdi,%r12
xor    %ebx,%ebx
lea    0xec4(%rip),%r15
nopl   0x0(%rax)
movsd  (%r14,%rbx,8),%xmm0
mov    %r15,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <_print_ts+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%0.4f \00"
define void @_print_ts(i64 %0, double* nocapture %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %11, label %4
4: ; preds = %2, %4
%5 = phi i64 [ %9, %4 ], [ 0, %2 ]
%6 = getelementptr inbounds double, double* %1, i64 %5
%7 = load double, double* %6
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %7)
%9 = add nuw i64 %5, 1
%10 = icmp eq i64 %9, %0
br i1 %10, label %11, label %4
11: ; preds = %4, %2
%12 = tail call i32 @putchar(i32 10)
ret void
}
void __attribute__((no)) fill(int size, char *hepp) {
  for (int i = size - 1; i >= 0; i--) {
    hepp[i] = rand() % 128;
    __asm__("");
  }
}


x86 assembly (clang, -O0):
<fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     115a <fill+0x4a>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x80,%ecx
cltd
idiv   %ecx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1128 <fill+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill>:
push   %r15
push   %r14
push   %rbx
test   %edi,%edi
jle    1159 <fill+0x49>
mov    %rsi,%r14
mov    %edi,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    -0x2(%rbx),%r15d
xor    %eax,%eax
call   1030 <rand@plt>
lea    0x7f(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0x80,%ecx
sub    %ecx,%eax
mov    %al,(%r14,%r15,1)
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1130 <fill+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @fill(i32 %0, i8* nocapture writeonly %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ %5, %4 ], [ %9, %7 ]
%9 = add nsw i64 %8, -1
%10 = tail call i32 (...) @rand()
%11 = srem i32 %10, 128
%12 = trunc i32 %11 to i8
%13 = and i64 %9, 4294967295
%14 = getelementptr inbounds i8, i8* %1, i64 %13
store i8 %12, i8* %14
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%15 = icmp ugt i64 %8, 1
br i1 %15, label %7, label %6
}
int test_imm_B2uint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xB2 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B2uint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 764504178688
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void posix_class_neg2NP_XDIGIT() {}


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

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

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

LLVM IR (-O2):
define void @posix_class_neg2NP_XDIGIT() {
ret void
}
int cisdigit(int c) { return (c >= '0') && (c <= '9'); }


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

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

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

LLVM IR (-O2):
define i32 @cisdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int write_standard_start_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(760, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<write_standard_start_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x2f8,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_standard_start_Laurent_system>:
mov    $0x2f8,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @write_standard_start_Laurent_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 760, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_standard_start_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 760, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct ambapp_dev_hdr {
  int dummy;
};
struct ambapp_apb_info {
  int dummy;
};

/* Variables and functions */
int ambapp_find_apbslvs_next(struct ambapp_dev_hdr *, int, int,
                             struct ambapp_apb_info *, int, int);
int ambapp_find_apbslv_next(struct ambapp_dev_hdr *root, int vendor, int device,
                            struct ambapp_apb_info *dev, int index) {
  return ambapp_find_apbslvs_next(root, vendor, device, dev, index, 1);
}


x86 assembly (clang, -O0):
<ambapp_find_apbslv_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x1,%r9d
call   1030 <ambapp_find_apbslvs_next@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ambapp_find_apbslv_next>:
mov    $0x1,%r9d
jmp    1030 <ambapp_find_apbslvs_next@plt>

LLVM IR (-O0):
%struct.ambapp_dev_hdr = type { i32 }
%struct.ambapp_apb_info = type { i32 }
define i32 @ambapp_find_apbslv_next(%struct.ambapp_dev_hdr* %0, i32 %1, i32 %2, %struct.ambapp_apb_info* %3, i32 %4) {
%6 = alloca %struct.ambapp_dev_hdr*
%7 = alloca i32
%8 = alloca i32
%9 = alloca %struct.ambapp_apb_info*
%10 = alloca i32
store %struct.ambapp_dev_hdr* %0, %struct.ambapp_dev_hdr** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store %struct.ambapp_apb_info* %3, %struct.ambapp_apb_info** %9
store i32 %4, i32* %10
%11 = load %struct.ambapp_dev_hdr*, %struct.ambapp_dev_hdr** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load %struct.ambapp_apb_info*, %struct.ambapp_apb_info** %9
%15 = load i32, i32* %10
%16 = call i32 @ambapp_find_apbslvs_next(%struct.ambapp_dev_hdr* %11, i32 %12, i32 %13, %struct.ambapp_apb_info* %14, i32 %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
%struct.ambapp_dev_hdr = type { i32 }
%struct.ambapp_apb_info = type { i32 }
define i32 @ambapp_find_apbslv_next(%struct.ambapp_dev_hdr* %0, i32 %1, i32 %2, %struct.ambapp_apb_info* %3, i32 %4) {
%6 = tail call i32 @ambapp_find_apbslvs_next(%struct.ambapp_dev_hdr* %0, i32 %1, i32 %2, %struct.ambapp_apb_info* %3, i32 %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ AddPolyPoint(int, int);
int /*<<< orphan*/ EndPolyLine();
int /*<<< orphan*/ StartPolyLine(int, int, int);
void DoDiamond(int i) {
  StartPolyLine(50 + i, 50, 3);
  AddPolyPoint(75 + i, 75);
  AddPolyPoint(50 + i, 100);
  AddPolyPoint(25 + i, 75);
  EndPolyLine();
}


x86 assembly (clang, -O0):
<DoDiamond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
add    $0x32,%edi
mov    $0x32,%esi
mov    $0x3,%edx
call   1050 <StartPolyLine@plt>
mov    -0x4(%rbp),%edi
add    $0x4b,%edi
mov    $0x4b,%esi
call   1030 <AddPolyPoint@plt>
mov    -0x4(%rbp),%edi
add    $0x32,%edi
mov    $0x64,%esi
call   1030 <AddPolyPoint@plt>
mov    -0x4(%rbp),%edi
add    $0x19,%edi
mov    $0x4b,%esi
call   1030 <AddPolyPoint@plt>
mov    $0x0,%al
call   1040 <EndPolyLine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoDiamond>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x32(%rbx),%ebp
mov    %ebp,%edi
mov    $0x32,%esi
mov    $0x3,%edx
call   1050 <StartPolyLine@plt>
lea    0x4b(%rbx),%edi
mov    $0x4b,%esi
call   1030 <AddPolyPoint@plt>
mov    %ebp,%edi
mov    $0x64,%esi
call   1030 <AddPolyPoint@plt>
add    $0x19,%ebx
mov    %ebx,%edi
mov    $0x4b,%esi
call   1030 <AddPolyPoint@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <EndPolyLine@plt>

LLVM IR (-O0):
define void @DoDiamond(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 50, %3
%5 = call i32 @StartPolyLine(i32 %4, i32 50, i32 3)
%6 = load i32, i32* %2
%7 = add nsw i32 75, %6
%8 = call i32 @AddPolyPoint(i32 %7, i32 75)
%9 = load i32, i32* %2
%10 = add nsw i32 50, %9
%11 = call i32 @AddPolyPoint(i32 %10, i32 100)
%12 = load i32, i32* %2
%13 = add nsw i32 25, %12
%14 = call i32 @AddPolyPoint(i32 %13, i32 75)
%15 = call i32 (...) @EndPolyLine()
ret void
}

LLVM IR (-O2):
define void @DoDiamond(i32 %0) {
%2 = add nsw i32 %0, 50
%3 = tail call i32 @StartPolyLine(i32 %2, i32 50, i32 3)
%4 = add nsw i32 %0, 75
%5 = tail call i32 @AddPolyPoint(i32 %4, i32 75)
%6 = tail call i32 @AddPolyPoint(i32 %2, i32 100)
%7 = add nsw i32 %0, 25
%8 = tail call i32 @AddPolyPoint(i32 %7, i32 75)
%9 = tail call i32 (...) @EndPolyLine()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xe2() {
  Assert_real((isdigit(226) == 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_isdigit.c",
              1135, ("isdigit should be 0 for 0xe2"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xe2>:
push   %rax
mov    $0xe2,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46f,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xe2\00"
define void @t_isdigit_0xe2() {
%1 = call i64 @isdigit(i32 226)
%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 1135, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xe2\00"
define void @t_isdigit_0xe2() {
%1 = tail call i64 @isdigit(i32 226)
%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 1135, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int qsort_compfunc(const void *x, const void *y) {
  int pp, qq;
  int t;
  pp = (int)(*(int *)x);
  qq = (int)(*(int *)y);
  if (pp < qq)
    t = -1;
  else if (pp == qq)
    t = 0;
  else
    t = 1;
  return t;
}


x86 assembly (clang, -O0):
<qsort_compfunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1136 <qsort_compfunc+0x36>
movl   $0xffffffff,-0x1c(%rbp)
jmp    115a <qsort_compfunc+0x5a>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jne    114e <qsort_compfunc+0x4e>
movl   $0x0,-0x1c(%rbp)
jmp    1155 <qsort_compfunc+0x55>
movl   $0x1,-0x1c(%rbp)
jmp    115a <qsort_compfunc+0x5a>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qsort_compfunc>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @qsort_compfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
float log(float);
float gp2y0a02ykGetCentimerDistanceForTension(float milliVolt) {
  return -47.82f * log(milliVolt) + 352.11f;
}


x86 assembly (clang, -O0):
<gp2y0a02ykGetCentimerDistanceForTension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log@plt>
movss  0xed1(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xec9(%rip),%xmm1
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp2y0a02ykGetCentimerDistanceForTension>:
push   %rax
call   1030 <log@plt>
mulss  0xee2(%rip),%xmm0
addss  0xede(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gp2y0a02ykGetCentimerDistanceForTension(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @log(float %3)
%5 = call float @llvm.fmuladd.f32(float 0xC047E8F5C0000000, float %4, float 0x407601C280000000)
ret float %5
}

LLVM IR (-O2):
define float @gp2y0a02ykGetCentimerDistanceForTension(float %0) {
%2 = tail call float @log(float %0)
%3 = tail call float @llvm.fmuladd.f32(float %2, float 0xC047E8F5C0000000, float 0x407601C280000000)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void *calloc(size_t, size_t);
void *memcalloc(size_t nmemb, size_t size) {
  void *mem;
  if (size == 0)
    return NULL;
  mem = calloc(nmemb, size);
  assert(mem != NULL);
  return mem;
}


x86 assembly (clang, -O0):
<memcalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1148 <memcalloc+0x28>
movq   $0x0,-0x8(%rbp)
jmp    1173 <memcalloc+0x53>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memcalloc>:
push   %rbx
test   %rsi,%rsi
je     113e <memcalloc+0x1e>
call   1030 <calloc@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1040 <assert@plt>
jmp    1140 <memcalloc+0x20>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @memcalloc(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = tail call i8* @calloc(i64 %0, i64 %1)
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
br label %9
9: ; preds = %2, %4
%10 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void jump(int lab) { printf("\tjmp\tL%d\n", lab); }


x86 assembly (clang, -O0):
<jump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jump>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"\09jmp\09L%d\0A\00"
define void @jump(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"\09jmp\09L%d\0A\00"
define void @jump(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef char wint_t;

/* Variables and functions */
scalar_t__ iswalnum(char);
int is_word(wint_t ch) { return ch == '_' || iswalnum(ch); }


x86 assembly (clang, -O0):
<is_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     1143 <is_word+0x33>
movsbl -0x1(%rbp),%edi
call   1030 <iswalnum@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_word>:
mov    $0x1,%eax
cmp    $0x5f,%dil
je     1134 <is_word+0x24>
push   %rax
movsbl %dil,%edi
call   1030 <iswalnum@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @is_word(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 95
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @iswalnum(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_word(i8 signext %0) {
%2 = icmp eq i8 %0, 95
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @iswalnum(i8 signext %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
struct mainwindow {
  int dummy;
};

/* Variables and functions */
int select_item(struct mainwindow *);
int handle_select(struct mainwindow *mw) { return select_item(mw); }


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

x86 assembly (clang, -O2):
<handle_select>:
jmp    1030 <select_item@plt>

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

LLVM IR (-O2):
%struct.mainwindow = type { i32 }
define i32 @handle_select(%struct.mainwindow* %0) {
%2 = tail call i32 @select_item(%struct.mainwindow* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ write_imm(int);
int /*<<< orphan*/ write_instr(int);
int f9_handler(char **save) {
  write_instr(0x00);
  write_imm(0x42);
  write_instr(0x28);
  return 0;
}


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

x86 assembly (clang, -O2):
<f9_handler>:
push   %rax
xor    %edi,%edi
call   1040 <write_instr@plt>
mov    $0x42,%edi
call   1030 <write_imm@plt>
mov    $0x28,%edi
call   1040 <write_instr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @f9_handler(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @write_instr(i32 0)
%4 = call i32 @write_imm(i32 66)
%5 = call i32 @write_instr(i32 40)
ret i32 0
}

LLVM IR (-O2):
define i32 @f9_handler(i8** nocapture readnone %0) {
%2 = tail call i32 @write_instr(i32 0)
%3 = tail call i32 @write_imm(i32 66)
%4 = tail call i32 @write_instr(i32 40)
ret i32 0
}
int host_is_little(void) {
  unsigned long var = 1;
  unsigned char *pvar = (unsigned char *)&var;
  return (*pvar == 1);
}


x86 assembly (clang, -O0):
<host_is_little>:
push   %rbp
mov    %rsp,%rbp
movq   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @host_is_little() {
%1 = alloca i64
%2 = alloca i8*
store i64 1, i64* %1
%3 = bitcast i64* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @host_is_little() {
ret i32 1
}
float hpmDot(float ax, float ay, float az, float bx, float by, float bz) {
  return ax * bx + ay * by + az * bz;
}


x86 assembly (clang, -O0):
<hpmDot>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
movss  -0x8(%rbp),%xmm0
mulss  -0x14(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x18(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<hpmDot>:
mulss  %xmm4,%xmm1
mulss  %xmm3,%xmm0
addss  %xmm1,%xmm0
mulss  %xmm5,%xmm2
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @hpmDot(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %7
%14 = load float, float* %10
%15 = load float, float* %8
%16 = load float, float* %11
%17 = fmul float %15, %16
%18 = call float @llvm.fmuladd.f32(float %13, float %14, float %17)
%19 = load float, float* %9
%20 = load float, float* %12
%21 = call float @llvm.fmuladd.f32(float %19, float %20, float %18)
ret float %21
}

LLVM IR (-O2):
define float @hpmDot(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = fmul float %1, %4
%8 = tail call float @llvm.fmuladd.f32(float %0, float %3, float %7)
%9 = tail call float @llvm.fmuladd.f32(float %2, float %5, float %8)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *mpfr_get_version();
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  const char *version = mpfr_get_version();
  char subversion[6];
  memcpy(subversion, version, 5);
  subversion[5] = '\0';
  if (strcmp(subversion, "4.0.0") == 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <mpfr_get_version@plt>
mov    %rax,-0x18(%rbp)
lea    -0x1e(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,-0x19(%rbp)
lea    -0x1e(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    118d <main+0x5d>
movl   $0x0,-0x4(%rbp)
jmp    1194 <main+0x64>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1050 <mpfr_get_version@plt>
lea    0xa(%rsp),%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
movb   $0x0,0xf(%rsp)
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"4.0.0\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [6 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i8* (...) @mpfr_get_version()
store i8* %8, i8** %6
%9 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%10 = load i8*, i8** %6
%11 = call i32 @memcpy(i8* %9, i8* %10, i32 5)
%12 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 5
store i8 0, i8* %12
%13 = getelementptr inbounds [6 x i8], [6 x i8]* %7, i64 0, i64 0
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %2
store i32 0, i32* %3
br label %18
17: ; preds = %2
store i32 1, i32* %3
br label %18
18: ; preds = %17, %16
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
@.str = [6 x i8] c"4.0.0\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x i8]
%4 = tail call i8* (...) @mpfr_get_version()
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 0
%6 = call i32 @memcpy(i8* %5, i8* %4, i32 5)
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %3, i64 0, i64 5
store i8 0, i8* %7
%8 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x76() {
  Assert_real((ispunct(118) == 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_ispunct.c",
              595, ("ispunct should be 0 for v"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x76>:
push   %rax
mov    $0x76,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x253,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for v\00"
define void @t_ispunct_0x76() {
%1 = call i64 @ispunct(i32 118)
%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 595, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 0 for v\00"
define void @t_ispunct_0x76() {
%1 = tail call i64 @ispunct(i32 118)
%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 595, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int isEven(int num) { return !(num & 0x1); }


x86 assembly (clang, -O0):
<isEven>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isEven>:
mov    %edi,%eax
not    %eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @isEven(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @isEven(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
ret i32 %3
}
char is_special(char ch) {
  switch (ch) {
  case '=':
  case '<':
  case '>':
  case '|':
  case '+':
  case '-':
  case '*':
  case '&':
  case '(':
  case ')':
  case '{':
  case '%':
  case '}':
  case '[':
  case ']':
  case '@':
  case '$':
  case '\'':
  case '\"':
  case ' ':
  case ',':
  case ';':
    return ch;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_special>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
add    $0xffffffe0,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5d,%eax
ja     113f <is_special+0x3f>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1143 <is_special+0x43>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_special>:
mov    %edi,%eax
lea    -0x20(%rax),%ecx
cmp    $0x5d,%ecx
ja     111b <is_special+0x1b>
lea    0xeef(%rip),%rdx
movslq (%rdx,%rcx,4),%rcx
add    %rdx,%rcx
jmp    *%rcx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define signext i8 @is_special(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 %8 [
i32 61, label %6
i32 60, label %6
i32 62, label %6
i32 124, label %6
i32 43, label %6
i32 45, label %6
i32 42, label %6
i32 38, label %6
i32 40, label %6
i32 41, label %6
i32 123, label %6
i32 37, label %6
i32 125, label %6
i32 91, label %6
i32 93, label %6
i32 64, label %6
i32 36, label %6
i32 39, label %6
i32 34, label %6
i32 32, label %6
i32 44, label %6
i32 59, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
%7 = load i8, i8* %3
store i8 %7, i8* %2
br label %9
8: ; preds = %1
store i8 0, i8* %2
br label %9
9: ; preds = %8, %6
%10 = load i8, i8* %2
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @is_special(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 61, label %4
i32 60, label %4
i32 62, label %4
i32 124, label %4
i32 43, label %4
i32 45, label %4
i32 42, label %4
i32 38, label %4
i32 40, label %4
i32 41, label %4
i32 123, label %4
i32 37, label %4
i32 125, label %4
i32 91, label %4
i32 93, label %4
i32 64, label %4
i32 36, label %4
i32 39, label %4
i32 34, label %4
i32 32, label %4
i32 44, label %4
i32 59, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i8 [ 0, %3 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ], [ %0, %1 ]
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("\n\n\t\t::batata::\n\n");
  int a = 2;
  int *b = (int *)malloc(sizeof(int));
  *b = a + 1;
  printf("\t%d,\t%d\n\n", a, *b);
  free(b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x2,-0x8(%rbp)
mov    $0x4,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rax
mov    (%rax),%edx
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec2(%rip),%rdi
call   1040 <puts@plt>
mov    $0x4,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
movl   $0x3,(%rax)
lea    0xe99(%rip),%rdi
mov    $0x2,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0A\0A\09\09::batata::\0A\0A\00"
@.str.1 = [10 x i8] c"\09%d,\09%d\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %2
%5 = call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %3
%7 = load i32, i32* %2
%8 = add nsw i32 %7, 1
%9 = load i32*, i32** %3
store i32 %8, i32* %9
%10 = load i32, i32* %2
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %12)
%14 = load i32*, i32** %3
%15 = call i32 @free(i32* %14)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"\09%d,\09%d\0A\0A\00"
@str = [16 x i8] c"\0A\0A\09\09::batata::\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32 3, i32* %3
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 2, i32 3)
%5 = tail call i32 @free(i32* %3)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/
mrtd_bac_eifd_mifd(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
                   int /*<<< orphan*/ const *, int /*<<< orphan*/ const *,
                   int /*<<< orphan*/ const *, int /*<<< orphan*/ *,
                   int /*<<< orphan*/ *);
void mrtd_bac_cmd_data(const uint8_t *rnd_ifd, const uint8_t *kifd,
                       const uint8_t *remote_challenge, const uint8_t *kenc,
                       const uint8_t *kmac, uint8_t *cmd_data) {
  mrtd_bac_eifd_mifd(rnd_ifd, kifd, remote_challenge, kenc, kmac, cmd_data,
                     cmd_data + 32);
}


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

x86 assembly (clang, -O2):
<mrtd_bac_cmd_data>:
push   %rax
lea    0x80(%r9),%rax
mov    %rax,(%rsp)
call   1030 <mrtd_bac_eifd_mifd@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @mrtd_bac_cmd_data(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
store i32* %0, i32** %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
%13 = load i32*, i32** %7
%14 = load i32*, i32** %8
%15 = load i32*, i32** %9
%16 = load i32*, i32** %10
%17 = load i32*, i32** %11
%18 = load i32*, i32** %12
%19 = load i32*, i32** %12
%20 = getelementptr inbounds i32, i32* %19, i64 32
%21 = call i32 @mrtd_bac_eifd_mifd(i32* %13, i32* %14, i32* %15, i32* %16, i32* %17, i32* %18, i32* %20)
ret void
}

LLVM IR (-O2):
define void @mrtd_bac_cmd_data(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = getelementptr inbounds i32, i32* %5, i64 32
%8 = tail call i32 @mrtd_bac_eifd_mifd(i32* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5, i32* %7)
ret void
}
/* Type definitions */
typedef unsigned int uint16_t;

/* Variables and functions */
uint16_t short_from(void *_p) {
  unsigned char *p = (unsigned char *)_p;
  uint16_t r, _p0, _p1;
  _p0 = p[0];
  _p1 = p[1];
  r = (uint16_t)((_p1 << 8u) + _p0);
  return r;
}


x86 assembly (clang, -O0):
<short_from>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x8,%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<short_from>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @short_from(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
void array_uint32_le_set(unsigned char data[], const unsigned int input) {
  data[0] = input & 0xFF;
  data[1] = (input >> 8) & 0xFF;
  data[2] = (input >> 16) & 0xFF;
  data[3] = (input >> 24) & 0xFF;
}


x86 assembly (clang, -O0):
<array_uint32_le_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @array_uint32_le_set(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
%10 = lshr i32 %1, 24
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
void RTDbgLineFree(void) {}


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

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

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

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