xunge/DecIR huggingface dataset:
int is_closing_quote(char x, char q) {
  return (((q == '{') && (x == '}')) || ((q == '\"') && (x == '\"')));
}


x86 assembly (clang, -O0):
<is_closing_quote>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x7b,%eax
jne    112f <is_closing_quote+0x2f>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7d,%ecx
mov    %al,-0x3(%rbp)
je     1154 <is_closing_quote+0x54>
movsbl -0x2(%rbp),%ecx
xor    %eax,%eax
cmp    $0x22,%ecx
mov    %al,-0x4(%rbp)
jne    114e <is_closing_quote+0x4e>
movsbl -0x1(%rbp),%eax
cmp    $0x22,%eax
sete   %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_closing_quote>:
mov    %esi,%eax
xor    $0x7b,%al
mov    %edi,%ecx
xor    $0x7d,%cl
or     %al,%cl
sete   %al
xor    $0x22,%sil
xor    $0x22,%dil
or     %sil,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_closing_quote(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 123
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 125
br i1 %11, label %22, label %12
12: ; preds = %8, %2
%13 = load i8, i8* %4
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 34
br i1 %15, label %16, label %20
16: ; preds = %12
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 34
br label %20
20: ; preds = %16, %12
%21 = phi i1 [ false, %12 ], [ %19, %16 ]
br label %22
22: ; preds = %20, %8
%23 = phi i1 [ true, %8 ], [ %21, %20 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @is_closing_quote(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %1, 123
%4 = icmp eq i8 %0, 125
%5 = and i1 %4, %3
%6 = icmp eq i8 %1, 34
%7 = icmp eq i8 %0, 34
%8 = and i1 %7, %6
%9 = or i1 %5, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
int invert(int x, int p, int n) {
  int mask = 1 << 31 >> 32 + ~(p + n) ^ ~0 << p;
  return x ^ mask;
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
add    $0x20,%ecx
mov    $0x80000000,%eax
sar    %cl,%eax
mov    -0x8(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
add    %esi,%edx
mov    $0x1f,%cl
sub    %dl,%cl
mov    $0x80000000,%edx
sar    %cl,%edx
mov    $0xffffffff,%eax
mov    %esi,%ecx
shl    %cl,%eax
xor    %edi,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = add nsw i32 %8, %9
%11 = xor i32 %10, -1
%12 = add nsw i32 32, %11
%13 = ashr i32 -2147483648, %12
%14 = load i32, i32* %5
%15 = shl i32 -1, %14
%16 = xor i32 %13, %15
store i32 %16, i32* %7
%17 = load i32, i32* %4
%18 = load i32, i32* %7
%19 = xor i32 %17, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = add i32 %1, %2
%5 = sub i32 31, %4
%6 = ashr i32 -2147483648, %5
%7 = shl nsw i32 -1, %1
%8 = xor i32 %7, %0
%9 = xor i32 %8, %6
ret i32 %9
}
int test_imm_E5uint16_reg(unsigned short val) {
  return ((val) & (0xE5 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E5uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xe5,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E5uint16_reg>:
test   $0xe5,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E5uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 229
%6 = icmp ne i32 %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_E5uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 229
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
scalar_t__ range(int, char, float);
uint8_t hex_digit(int c) {
  if (range(c, '0', '9'))
    return ((uint8_t)(c - '0'));
  if (range(c, 'a', 'f'))
    return ((uint8_t)(c - 'a' + 10));
  return 0xff;
}


x86 assembly (clang, -O0):
<hex_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x30,%esi
movss  0xed5(%rip),%xmm0
call   1030 <range@plt>
cmp    $0x0,%rax
je     1148 <hex_digit+0x38>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    117f <hex_digit+0x6f>
mov    -0x8(%rbp),%edi
mov    $0x61,%esi
movss  0xeac(%rip),%xmm0
call   1030 <range@plt>
cmp    $0x0,%rax
je     1178 <hex_digit+0x68>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117f <hex_digit+0x6f>
movl   $0xff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex_digit>:
push   %rbx
mov    %edi,%ebx
movss  0xee5(%rip),%xmm0
mov    $0x30,%esi
call   1030 <range@plt>
test   %rax,%rax
je     112f <hex_digit+0x1f>
add    $0xffffffd0,%ebx
jmp    1151 <hex_digit+0x41>
movss  0xecd(%rip),%xmm0
mov    %ebx,%edi
mov    $0x61,%esi
call   1030 <range@plt>
add    $0xffffffa9,%ebx
test   %rax,%rax
mov    $0xff,%eax
cmove  %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hex_digit(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @range(i32 %4, i8 signext 48, float 5.700000e+01)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 48
store i32 %9, i32* %2
br label %19
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i64 @range(i32 %11, i8 signext 97, float 1.020000e+02)
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 97
%17 = add nsw i32 %16, 10
store i32 %17, i32* %2
br label %19
18: ; preds = %10
store i32 255, i32* %2
br label %19
19: ; preds = %18, %14, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @hex_digit(i32 %0) {
%2 = tail call i64 @range(i32 %0, i8 signext 48, float 5.700000e+01)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = add nsw i32 %0, -48
br label %11
6: ; preds = %1
%7 = tail call i64 @range(i32 %0, i8 signext 97, float 1.020000e+02)
%8 = icmp eq i64 %7, 0
%9 = add nsw i32 %0, -87
%10 = select i1 %8, i32 255, i32 %9
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ %5, %4 ], [ %10, %6 ]
ret i32 %12
}
int test_imm_A2int8_mem(signed char *val) {
  return ((*val) & (-0xA2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A2int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff5e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A2int8_mem>:
movsbl (%rdi),%eax
test   $0xffffff5e,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A2int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -162
%7 = icmp ne i32 %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_A2int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = and i32 %3, -162
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 -40, i32 -20
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ds2unprotect();
void ds2unprotect_(void) { ds2unprotect(); }


x86 assembly (clang, -O0):
<ds2unprotect_>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ds2unprotect@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds2unprotect_>:
xor    %eax,%eax
jmp    1030 <ds2unprotect@plt>

LLVM IR (-O0):
define void @ds2unprotect_() {
%1 = call i32 (...) @ds2unprotect()
ret void
}

LLVM IR (-O2):
define void @ds2unprotect_() {
%1 = tail call i32 (...) @ds2unprotect()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t const);
int /*<<< orphan*/ perror(char const *const);
void *alloc(const size_t size, const char *const s) {
  void *ptr = malloc(size);
  if (ptr == NULL) {
    perror(s);
    exit(-1);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116b <alloc+0x3b>
mov    -0x10(%rbp),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc>:
push   %rbx
mov    %rsi,%rbx
call   1030 <malloc@plt>
test   %rax,%rax
je     1140 <alloc+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i8* @alloc(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%6 = load i64, i64* %3
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = call i32 @perror(i8* %11)
%13 = call i32 @exit(i32 -1)
unreachable
14: ; preds = %2
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define noalias i8* @alloc(i64 %0, i8* nocapture %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* %1)
%7 = tail call i32 @exit(i32 -1)
unreachable
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR8B_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

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

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

LLVM IR (-O2):
define void @U_WMR8B_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
int main(void) {
  test(4);
  test(6);
  test(9);
  test(14);
  test(25);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @test(i32 4)
%3 = call i32 @test(i32 6)
%4 = call i32 @test(i32 9)
%5 = call i32 @test(i32 14)
%6 = call i32 @test(i32 25)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test(i32 4)
%2 = tail call i32 @test(i32 6)
%3 = tail call i32 @test(i32 9)
%4 = tail call i32 @test(i32 14)
%5 = tail call i32 @test(i32 25)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t read16be(const uint8_t *buf) {
  uint16_t ret = 0;
  for (unsigned i = 0; i < 16 / 8; ++i)
    ret |= (uint16_t)buf[i] << (16 - 8 - i * 8);
  return ret;
}


x86 assembly (clang, -O0):
<read16be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jae    114e <read16be+0x4e>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x10(%rbp),%edx
shl    $0x3,%edx
mov    $0x8,%ecx
sub    %edx,%ecx
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1116 <read16be+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16be>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read16be(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
%4 = alloca i32
store i64* %0, i64** %2
store i32 0, i32* %3
store i32 0, i32* %4
br label %5
5: ; preds = %21, %1
%6 = load i32, i32* %4
%7 = icmp ult i32 %6, 2
br i1 %7, label %8, label %24
8: ; preds = %5
%9 = load i64*, i64** %2
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %9, i64 %11
%13 = load i64, i64* %12
%14 = trunc i64 %13 to i32
%15 = load i32, i32* %4
%16 = mul i32 %15, 8
%17 = sub i32 8, %16
%18 = shl i32 %14, %17
%19 = load i32, i32* %3
%20 = or i32 %19, %18
store i32 %20, i32* %3
br label %21
21: ; preds = %8
%22 = load i32, i32* %4
%23 = add i32 %22, 1
store i32 %23, i32* %4
br label %5
24: ; preds = %5
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @read16be(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void decode_destroy(unsigned char *decode) { free(decode); }


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

x86 assembly (clang, -O2):
<decode_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @decode_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printArray(int *, int);
int /*<<< orphan*/ radixSort(int *, int);
int main() {
  int A[] = {123, 4123, 412, 41234, 41234, 44324, 2313, 22, 1, 83838};
  radixSort(A, 10);
  printArray(A, 10);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <radixSort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1060 <printArray@plt>
mov    $0x0,%al
call   1030 <getchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <radixSort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <printArray@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.A = [10 x i32] [i32 123, i32 4123, i32 412, i32 41234, i32 41234, i32 44324, i32 2313, i32 22, i32 1, i32 83838]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @radixSort(i32* %3, i32 10)
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = call i32 @printArray(i32* %5, i32 10)
%7 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = [10 x i32] [i32 123, i32 4123, i32 412, i32 41234, i32 41234, i32 44324, i32 2313, i32 22, i32 1, i32 83838]
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @radixSort(i32* %3, i32 10)
%5 = call i32 @printArray(i32* %3, i32 10)
%6 = call i32 (...) @getchar()
ret i32 0
}
__attribute__((no, noclone)) unsigned __int128 t101_3mul(unsigned __int128 y) {
  unsigned __int128 r;
  if (__builtin_mul_overflow((signed __int128)(-1), y, &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t101_3mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rdx
mov    -0x28(%rbp),%rsi
mov    %rdx,%rax
or     %rsi,%rax
setne  %al
xor    %ecx,%ecx
neg    %rdx
sbb    %rsi,%rcx
mov    %rdx,-0x40(%rbp)
mov    %rcx,-0x38(%rbp)
test   $0x1,%al
jne    115e <t101_3mul+0x4e>
jmp    1165 <t101_3mul+0x55>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t101_3mul>:
push   %r14
push   %rbx
push   %rax
xor    %r14d,%r14d
mov    %rdi,%rbx
neg    %rbx
sbb    %rsi,%r14
or     %rsi,%rdi
je     112c <t101_3mul+0x1c>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %rbx,%rax
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t101_3mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = call { i128, i1 } @llvm.umul.with.overflow.i128(i128 1, i128 %11)
%13 = extractvalue { i128, i1 } %12, 1
%14 = extractvalue { i128, i1 } %12, 0
%15 = icmp ne i128 %14, 0
%16 = and i1 true, %15
%17 = or i1 %13, %16
%18 = sub i128 0, %14
%19 = select i1 true, i128 %18, i128 %14
store i128 %19, i128* %6
br i1 %17, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t101_3mul(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = icmp eq i128 %6, 0
%8 = sub i128 0, %6
br i1 %7, label %11, label %9
9: ; preds = %2
%10 = tail call i32 (...) @bar()
br label %11
11: ; preds = %9, %2
%12 = trunc i128 %8 to i64
%13 = lshr i128 %8, 64
%14 = trunc i128 %13 to i64
%15 = insertvalue { i64, i64 } poison, i64 %12, 0
%16 = insertvalue { i64, i64 } %15, i64 %14, 1
ret { i64, i64 } %16
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void ADCIntClearEx(uint32_t ui32Base, uint32_t ui32IntFlags) {
  (*((volatile uint32_t *)(ui32Base + 0x0000000C))) = ui32IntFlags;
}


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

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

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

LLVM IR (-O2):
define void @ADCIntClearEx(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 12
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PTHREAD_CANCEL_ENABLE;
int /*<<< orphan*/ pthread_setcancelstate(int /*<<< orphan*/,
                                          int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
void *a_thread_function() {
  pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
  while (1)
    sleep(1);
  return NULL;
}


x86 assembly (clang, -O0):
<a_thread_function>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <pthread_setcancelstate@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1136 <a_thread_function+0x16>

x86 assembly (clang, -O2):
<a_thread_function>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1030 <pthread_setcancelstate@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1140 <a_thread_function+0x20>

LLVM IR (-O0):
@PTHREAD_CANCEL_ENABLE = global i32 0
define i8* @a_thread_function() {
%1 = load i32, i32* @PTHREAD_CANCEL_ENABLE
%2 = call i32 @pthread_setcancelstate(i32 %1, i32* null)
br label %3
3: ; preds = %0, %3
%4 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
@PTHREAD_CANCEL_ENABLE = global i32 0
define noalias i8* @a_thread_function() {
%1 = load i32, i32* @PTHREAD_CANCEL_ENABLE
%2 = tail call i32 @pthread_setcancelstate(i32 %1, i32* null)
br label %3
3: ; preds = %0, %3
%4 = tail call i32 @sleep(i32 1)
br label %3
}
int get_attr_code(int attr) {
  switch (attr) {
  case 0x00000001:
    return 0;
  case 0x00000002:
    return 1;
  case 0x00000004:
    return 4;
  case 0x00000008:
    return 5;
  case 0x00000010:
    return 7;
  case 0x00000020:
    return 8;
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_attr_code>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x1f,%eax
ja     1178 <get_attr_code+0x78>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x4(%rbp)
jmp    117f <get_attr_code+0x7f>
movl   $0x1,-0x4(%rbp)
jmp    117f <get_attr_code+0x7f>
movl   $0x4,-0x4(%rbp)
jmp    117f <get_attr_code+0x7f>
movl   $0x5,-0x4(%rbp)
jmp    117f <get_attr_code+0x7f>
movl   $0x7,-0x4(%rbp)
jmp    117f <get_attr_code+0x7f>
movl   $0x8,-0x4(%rbp)
jmp    117f <get_attr_code+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_attr_code>:
xor    %eax,%eax
add    $0xfffffffe,%edi
cmp    $0x1e,%edi
ja     1137 <get_attr_code+0x37>
lea    0xeef(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x1,%eax
ret
mov    $0x4,%eax
ret
mov    $0x5,%eax
ret
mov    $0x7,%eax
ret
mov    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @get_attr_code(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 1, label %5
i32 2, label %6
i32 4, label %7
i32 8, label %8
i32 16, label %9
i32 32, label %10
]
5: ; preds = %1
store i32 0, i32* %2
br label %12
6: ; preds = %1
store i32 1, i32* %2
br label %12
7: ; preds = %1
store i32 4, i32* %2
br label %12
8: ; preds = %1
store i32 5, i32* %2
br label %12
9: ; preds = %1
store i32 7, i32* %2
br label %12
10: ; preds = %1
store i32 8, i32* %2
br label %12
11: ; preds = %1
store i32 0, i32* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_attr_code(i32 %0) {
switch i32 %0, label %7 [
i32 32, label %6
i32 2, label %2
i32 4, label %3
i32 8, label %4
i32 16, label %5
]
2: ; preds = %1
br label %7
3: ; preds = %1
br label %7
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %5, %4, %3, %2
%8 = phi i32 [ 8, %6 ], [ 7, %5 ], [ 5, %4 ], [ 4, %3 ], [ 1, %2 ], [ 0, %1 ]
ret i32 %8
}
/* Type definitions */
struct sembuf {
  int sem_num;
  int sem_op;
  int /*<<< orphan*/ sem_flg;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
int semop(int, struct sembuf *, int);
int semaphore_up(int semid, int semnum) {
  struct sembuf operations[1];
  operations[0].sem_num = semnum;
  operations[0].sem_op = 1;
  operations[0].sem_flg = SEM_UNDO;
  return semop(semid, operations, 1);
}


x86 assembly (clang, -O0):
<semaphore_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0x1,-0x14(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<semaphore_up>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
movl   $0x1,0xc(%rsp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define i32 @semaphore_up(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [1 x %struct.sembuf]
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %5, i64 0, i64 0
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %7, i32 0, i32 0
store i32 %6, i32* %8
%9 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %5, i64 0, i64 0
%10 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %9, i32 0, i32 1
store i32 1, i32* %10
%11 = load i32, i32* @SEM_UNDO
%12 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %5, i64 0, i64 0
%13 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %12, i32 0, i32 2
store i32 %11, i32* %13
%14 = load i32, i32* %3
%15 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %5, i64 0, i64 0
%16 = call i32 @semop(i32 %14, %struct.sembuf* %15, i32 1)
ret i32 %16
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
@SEM_UNDO = global i32 0
define i32 @semaphore_up(i32 %0, i32 %1) {
%3 = alloca [1 x %struct.sembuf]
%4 = bitcast [1 x %struct.sembuf]* %3 to i8*
%5 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %3, i64 0, i64 0, i32 0
store i32 %1, i32* %6
%7 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %3, i64 0, i64 0, i32 1
store i32 1, i32* %7
%8 = load i32, i32* @SEM_UNDO
%9 = getelementptr inbounds [1 x %struct.sembuf], [1 x %struct.sembuf]* %3, i64 0, i64 0, i32 2
store i32 %8, i32* %9
%10 = call i32 @semop(i32 %0, %struct.sembuf* %5, i32 1)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ say_stop(char *, int);
void hit(void) { say_stop("I'm gonna rock your world!", 1); }


x86 assembly (clang, -O0):
<hit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say_stop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hit>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say_stop@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"I'm gonna rock your world!\00"
define void @hit() {
%1 = call i32 @say_stop(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"I'm gonna rock your world!\00"
define void @hit() {
%1 = tail call i32 @say_stop(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
int test_imm_3Euint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x3E << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_3Euint64_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, 62
%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_3Euint64_midword_reg(i64 %0) {
%2 = and i64 %0, 4063232
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
size_t strlen(char const *);
scalar_t__ strncmp(char const *, char const *, size_t);
const char *string_drop_prefix(const char *prefix, const char *str) {
  size_t n = strlen(prefix);
  if (strncmp(prefix, str, n) == 0) {
    return str + n;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<string_drop_prefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1169 <string_drop_prefix+0x49>
mov    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1171 <string_drop_prefix+0x51>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_drop_prefix>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
add    %r15,%rbx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @string_drop_prefix(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i64 %3)
%5 = icmp eq i64 %4, 0
%6 = getelementptr inbounds i8, i8* %1, i64 %3
%7 = select i1 %5, i8* %6, i8* null
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x3e() {
  Assert_real((isodigit(62) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              315, ("isodigit should be 0 for >"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for >\00"
define void @t_isodigit_0x3e() {
%1 = call i64 @isodigit(i32 62)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [27 x i8] c"isodigit should be 0 for >\00"
define void @t_isodigit_0x3e() {
%1 = tail call i64 @isodigit(i32 62)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 315, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_73int8_mem(signed char *val) {
  return ((*val) & (-0x73 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_73int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xffffff8d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_73int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, -115
%7 = icmp ne i32 %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_73int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -115
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
float fsgn(float const);
float flt_sgn(const float x) { return fsgn(x); }


x86 assembly (clang, -O0):
<flt_sgn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fsgn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flt_sgn>:
jmp    1030 <fsgn@plt>

LLVM IR (-O0):
define float @flt_sgn(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fsgn(float %3)
ret float %4
}

LLVM IR (-O2):
define float @flt_sgn(float %0) {
%2 = tail call float @fsgn(float %0)
ret float %2
}
void pop() {
  asm volatile("popq %%rbx\n\t"
               "popq %%rax\n\t"
               "movq %%rbx, (%%rax)\n\t" ::
                   :);
}


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

x86 assembly (clang, -O2):
<pop>:
pop    %rbx
pop    %rax
mov    %rbx,(%rax)
ret

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

LLVM IR (-O2):
define void @pop() {
tail call void asm sideeffect "popq %rbx\0A\09popq %rax\0A\09movq %rbx, (%rax)\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
decode_i_pn(int a, int b) {
  b = (b >> 5) & 31;
  return (a & 0xfff00000) | 1 << b;
}


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

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

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

LLVM IR (-O2):
define i32 @decode_i_pn(i32 %0, i32 %1) {
%3 = lshr i32 %1, 5
%4 = and i32 %3, 31
%5 = and i32 %0, -1048576
%6 = shl nuw i32 1, %4
%7 = or i32 %6, %5
ret i32 %7
}
/* Type definitions */
struct Room {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct Room *);
void destroyRoom(struct Room *room) { free(room); }


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

x86 assembly (clang, -O2):
<destroyRoom>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.Room = type { i32 }
define void @destroyRoom(%struct.Room* nocapture %0) {
%2 = tail call i32 @free(%struct.Room* %0)
ret void
}
unsigned xrop3_236_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & T;
  stk1 = S | stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


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

x86 assembly (clang, -O2):
<xrop3_236_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_236_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = and i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %6
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %6
%30 = and i32 %28, %29
%31 = load i32, i32* %8
%32 = load i32, i32* %7
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = or i32 %30, %34
%36 = load i32, i32* %7
%37 = load i32, i32* %6
%38 = xor i32 %37, -1
%39 = and i32 %36, %38
%40 = load i32, i32* %5
%41 = and i32 %39, %40
%42 = or i32 %35, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_236_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = or i32 %4, %5
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ _critbit_is_set(uintptr_t const, int /*<<< orphan*/ const);
int /*<<< orphan*/ assert(int);
size_t _critbit_get_index(const uintptr_t v, const uint8_t bit) {
  assert(v != 0);
  return (_critbit_is_set(v, bit) ? 1 : 0);
}


x86 assembly (clang, -O0):
<_critbit_get_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <_critbit_is_set@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_critbit_get_index>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1040 <assert@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <_critbit_is_set@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i64 @_critbit_get_index(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i64, i64* %3
%10 = load i32, i32* %4
%11 = call i64 @_critbit_is_set(i64 %9, i32 %10)
%12 = icmp ne i64 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = sext i32 %14 to i64
ret i64 %15
}

LLVM IR (-O2):
define i64 @_critbit_get_index(i64 %0, i32 %1) {
%3 = icmp ne i64 %0, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i64 @_critbit_is_set(i64 %0, i32 %1)
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
ret i64 %8
}
/* Variables and functions */
long long CalculateNumberOfMatchingXORSets();
int /*<<< orphan*/ printf(char *, long long);
int main() {
  long long int numberOfMatchingXORSets = CalculateNumberOfMatchingXORSets();
  printf("%lld\n", numberOfMatchingXORSets);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = tail call i64 (...) @CalculateNumberOfMatchingXORSets()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 0
}
/* Variables and functions */
int sched_yield();
int pthread_yield(void) { return sched_yield(); }


x86 assembly (clang, -O0):
<pthread_yield>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <sched_yield@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_yield>:
xor    %eax,%eax
jmp    1030 <sched_yield@plt>

LLVM IR (-O0):
define i32 @pthread_yield() {
%1 = call i32 (...) @sched_yield()
ret i32 %1
}

LLVM IR (-O2):
define i32 @pthread_yield() {
%1 = tail call i32 (...) @sched_yield()
ret i32 %1
}
/* Variables and functions */
int getpid();
scalar_t__ malloc(int);
int pthread_self();
int /*<<< orphan*/ sprintf(char *, char *, int, int);
char *getThreadIdentity() {
  char *buf = (char *)malloc(30);
  sprintf(buf, "%d.%u", getpid(), pthread_self());
  return buf;
}


x86 assembly (clang, -O0):
<getThreadIdentity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x1e,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    %eax,%ecx
lea    0xe81(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getThreadIdentity>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1e,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xe99(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
mov    %eax,%ecx
call   1060 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d.%u\00"
define i8* @getThreadIdentity() {
%1 = alloca i8*
%2 = call i64 @malloc(i32 30)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 (...) @getpid()
%6 = call i32 (...) @pthread_self()
%7 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d.%u\00"
define i8* @getThreadIdentity() {
%1 = tail call i64 @malloc(i32 30)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 (...) @pthread_self()
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i8* %2
}
int testArg(int a) { return a; }


x86 assembly (clang, -O0):
<testArg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @testArg(i32 returned %0) {
ret i32 %0
}
void foo344() {}


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

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

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

LLVM IR (-O2):
define void @foo344() {
ret void
}
void free_3d_double(double ***ddd) {
  free(ddd[0][0]);
  free(ddd[0]);
  free(ddd);
}


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

x86 assembly (clang, -O2):
<free_3d_double>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_3d_double(double*** %0) {
%2 = alloca double***
store double*** %0, double**** %2
%3 = load double***, double**** %2
%4 = getelementptr inbounds double**, double*** %3, i64 0
%5 = load double**, double*** %4
%6 = getelementptr inbounds double*, double** %5, i64 0
%7 = load double*, double** %6
%8 = bitcast double* %7 to i8*
%9 = load double***, double**** %2
%10 = getelementptr inbounds double**, double*** %9, i64 0
%11 = load double**, double*** %10
%12 = bitcast double** %11 to i8*
%13 = load double***, double**** %2
%14 = bitcast double*** %13 to i8*
ret void
}

LLVM IR (-O2):
define void @free_3d_double(double*** nocapture %0) {
%2 = bitcast double*** %0 to i8***
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
tail call void @free(i8* %4)
%5 = bitcast double*** %0 to i8**
%6 = load i8*, i8** %5
tail call void @free(i8* %6)
%7 = bitcast double*** %0 to i8*
tail call void @free(i8* %7)
ret void
}