xunge/DecIR huggingface dataset:
/* Type definitions */
struct const_Intrusive_List {
  int dummy;
};
struct const_Intrusive_Link {
  int dummy;
};
struct Intrusive_List {
  int dummy;
};
struct Intrusive_Link {
  int dummy;
};

/* Variables and functions */
scalar_t__ erase_IL(struct Intrusive_List *, struct Intrusive_Link *);
const struct const_Intrusive_Link *
erase_const_IL(const struct const_Intrusive_List *lst,
               const struct const_Intrusive_Link *curr) {
  return (const struct const_Intrusive_Link *)erase_IL(
      (struct Intrusive_List *)lst, (struct Intrusive_Link *)curr);
}


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

x86 assembly (clang, -O2):
<erase_const_IL>:
jmp    1030 <erase_IL@plt>

LLVM IR (-O0):
%struct.const_Intrusive_List = type { i32 }
%struct.const_Intrusive_Link = type { i32 }
%struct.Intrusive_List = type { i32 }
%struct.Intrusive_Link = type { i32 }
define %struct.const_Intrusive_Link* @erase_const_IL(%struct.const_Intrusive_List* %0, %struct.const_Intrusive_Link* %1) {
%3 = alloca %struct.const_Intrusive_List*
%4 = alloca %struct.const_Intrusive_Link*
store %struct.const_Intrusive_List* %0, %struct.const_Intrusive_List** %3
store %struct.const_Intrusive_Link* %1, %struct.const_Intrusive_Link** %4
%5 = load %struct.const_Intrusive_List*, %struct.const_Intrusive_List** %3
%6 = bitcast %struct.const_Intrusive_List* %5 to %struct.Intrusive_List*
%7 = load %struct.const_Intrusive_Link*, %struct.const_Intrusive_Link** %4
%8 = bitcast %struct.const_Intrusive_Link* %7 to %struct.Intrusive_Link*
%9 = call i64 @erase_IL(%struct.Intrusive_List* %6, %struct.Intrusive_Link* %8)
%10 = inttoptr i64 %9 to %struct.const_Intrusive_Link*
ret %struct.const_Intrusive_Link* %10
}

LLVM IR (-O2):
%struct.const_Intrusive_List = type { i32 }
%struct.const_Intrusive_Link = type { i32 }
%struct.Intrusive_List = type { i32 }
%struct.Intrusive_Link = type { i32 }
define %struct.const_Intrusive_Link* @erase_const_IL(%struct.const_Intrusive_List* %0, %struct.const_Intrusive_Link* %1) {
%3 = bitcast %struct.const_Intrusive_List* %0 to %struct.Intrusive_List*
%4 = bitcast %struct.const_Intrusive_Link* %1 to %struct.Intrusive_Link*
%5 = tail call i64 @erase_IL(%struct.Intrusive_List* %3, %struct.Intrusive_Link* %4)
%6 = inttoptr i64 %5 to %struct.const_Intrusive_Link*
ret %struct.const_Intrusive_Link* %6
}
void RTNetIPv4IsTCPSizeValid(void) {}


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

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

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

LLVM IR (-O2):
define void @RTNetIPv4IsTCPSizeValid() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int void_edit();
int void_game();
int main(int argc, char **argv) {
  return ((argc > 1) && !strcmp(argv[1], "editor")) ? void_edit() : void_game();
}


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)
cmpl   $0x1,-0x8(%rbp)
jle    117c <main+0x4c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xea1(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    117c <main+0x4c>
mov    $0x0,%al
call   1030 <void_edit@plt>
mov    %eax,-0x14(%rbp)
jmp    1186 <main+0x56>
mov    $0x0,%al
call   1050 <void_game@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     114f <main+0x1f>
push   %rax
mov    0x8(%rsi),%rdi
lea    0xebf(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
lea    0x8(%rsp),%rsp
je     1156 <main+0x26>
xor    %eax,%eax
jmp    1050 <void_game@plt>
xor    %eax,%eax
jmp    1030 <void_edit@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"editor\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %6, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = tail call i32 (...) @void_edit()
br label %13
11: ; preds = %4, %2
%12 = tail call i32 (...) @void_game()
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ __armputchar(char);
int /*<<< orphan*/ error_set(int);
__attribute__((long_call, section(".fastrun"))) void spur_isr() {
  __armputchar('?');
  error_set((1 << 6));
}


x86 assembly (clang, -O0):
<spur_isr>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f,%edi
call   1030 <__armputchar@plt>
mov    $0x40,%edi
call   1040 <error_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spur_isr>:
push   %rax
mov    $0x3f,%edi
call   1030 <__armputchar@plt>
mov    $0x40,%edi
pop    %rax
jmp    1040 <error_set@plt>

LLVM IR (-O0):
define void @spur_isr() section ".fastrun" {
%1 = call i32 @__armputchar(i8 signext 63)
%2 = call i32 @error_set(i32 64)
ret void
}

LLVM IR (-O2):
define void @spur_isr() section ".fastrun" {
%1 = tail call i32 @__armputchar(i8 signext 63)
%2 = tail call i32 @error_set(i32 64)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
double difftime(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void delay(int nDelaySeconds) {
  time_t tStart, tNow;
  double fdElapsedSeconds;
  time(&tStart);
  do {
    time(&tNow);
    fdElapsedSeconds = difftime(tNow, tStart);
  } while (fdElapsedSeconds < nDelaySeconds);
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <time@plt>
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <difftime@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
cvtsi2sdl -0x4(%rbp),%xmm0
ucomisd %xmm1,%xmm0
ja     1134 <delay+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
lea    0x4(%rsp),%rdi
call   1040 <time@plt>
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %rsp,%rbx
xchg   %ax,%ax
mov    %rbx,%rdi
call   1040 <time@plt>
mov    (%rsp),%edi
mov    0x4(%rsp),%esi
call   1030 <difftime@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm0,%xmm1
ja     1140 <delay+0x20>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %2
%6 = call i32 @time(i32* %3)
br label %7
7: ; preds = %12, %1
%8 = call i32 @time(i32* %4)
%9 = load i32, i32* %4
%10 = load i32, i32* %3
%11 = call double @difftime(i32 %9, i32 %10)
store double %11, double* %5
br label %12
12: ; preds = %7
%13 = load double, double* %5
%14 = load i32, i32* %2
%15 = sitofp i32 %14 to double
%16 = fcmp olt double %13, %15
br i1 %16, label %7, label %17
17: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = call i32 @time(i32* %2)
%7 = sitofp i32 %0 to double
br label %8
8: ; preds = %8, %1
%9 = call i32 @time(i32* %3)
%10 = load i32, i32* %3
%11 = load i32, i32* %2
%12 = call double @difftime(i32 %10, i32 %11)
%13 = fcmp olt double %12, %7
br i1 %13, label %8, label %14
14: ; preds = %8
ret void
}
/* Variables and functions */
int addition_func(int, int, int, int, int);
int adc_func(int src, int dest, int is_word) {
  return addition_func(src, dest, is_word, 1, 1);
}


x86 assembly (clang, -O0):
<adc_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1030 <addition_func@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_func>:
mov    $0x1,%ecx
mov    $0x1,%r8d
jmp    1030 <addition_func@plt>

LLVM IR (-O0):
define i32 @adc_func(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @addition_func(i32 %7, i32 %8, i32 %9, i32 1, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @adc_func(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @addition_func(i32 %0, i32 %1, i32 %2, i32 1, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
scalar_t__ strncmp(char const *, char const *, int /*<<< orphan*/);
int begins_with(const char *s, const char *beg) {
  if (strncmp(s, beg, strlen(beg)) == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<begins_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    116e <begins_with+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <begins_with+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<begins_with>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @begins_with(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint16_t chpl_bitops_rotl_16(uint16_t x, uint16_t n) {
  assert(n < 16);
  return (x << n) | (x >> (-n & (16 - 1)));
}


x86 assembly (clang, -O0):
<chpl_bitops_rotl_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0xf,%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_bitops_rotl_16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x10,%esi
setl   %dil
call   1030 <assert@plt>
mov    %ebp,%eax
mov    %ebx,%ecx
shl    %cl,%eax
neg    %bl
and    $0xf,%bl
mov    %ebx,%ecx
sar    %cl,%ebp
or     %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @chpl_bitops_rotl_16(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 = icmp slt i32 %5, 16
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = shl i32 %9, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 0, %13
%15 = and i32 %14, 15
%16 = ashr i32 %12, %15
%17 = or i32 %11, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @chpl_bitops_rotl_16(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 16
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = shl i32 %0, %1
%7 = sub nsw i32 0, %1
%8 = and i32 %7, 15
%9 = ashr i32 %0, %8
%10 = or i32 %9, %6
ret i32 %10
}
/* Variables and functions */
scalar_t__ malloc(unsigned int);
unsigned char *ucmatrix(int a, int b) {
  unsigned char *m;
  m = (unsigned char *)malloc((unsigned)a * b * sizeof(char));
  if (!m)
    return (NULL);
  return (m);
}


x86 assembly (clang, -O0):
<ucmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
imul   -0x10(%rbp),%eax
mov    %eax,%eax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    114e <ucmatrix+0x3e>
movq   $0x0,-0x8(%rbp)
jmp    1156 <ucmatrix+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucmatrix>:
imul   %esi,%edi
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define i8* @ucmatrix(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ func();
int main() {
  func();
  return 5;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func()
ret i32 5
}
float sub(void) { return 0.0; }


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

x86 assembly (clang, -O2):
<sub>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sub() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @sub() {
ret float 0.000000e+00
}
void foo789() {}


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

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

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

LLVM IR (-O2):
define void @foo789() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void print_usage(const char *prog) {
  printf("Usage: %s [-DsbdlHOLC3]\n", prog);
  puts("  -D --device   device to use (default /dev/spidev1.1)\n"
       "  -s --speed    max speed (Hz)\n"
       "  -d --delay_SPI    delay_SPI (usec)\n"
       "  -b --bpw      bits per word \n"
       "  -l --loop     loopback\n"
       "  -H --cpha     clock phase\n"
       "  -O --cpol     clock polarity\n"
       "  -L --lsb      least significant bit first\n"
       "  -C --cs-high  chip select active high\n"
       "  -3 --3wire    SI/SO signals shared\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s [-DsbdlHOLC3]\0A\00"
@.str.1 = [360 x i8] c" -D --device device to use (default /dev/spidev1.1)\0A -s --speed max speed (Hz)\0A -d --delay_SPI delay_SPI (usec)\0A -b --bpw bits per word \0A -l --loop loopback\0A -H --cpha clock phase\0A -O --cpol clock polarity\0A -L --lsb least significant bit first\0A -C --cs-high chip select active high\0A -3 --3wire SI/SO signals shared\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([360 x i8], [360 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s [-DsbdlHOLC3]\0A\00"
@.str.1 = [360 x i8] c" -D --device device to use (default /dev/spidev1.1)\0A -s --speed max speed (Hz)\0A -d --delay_SPI delay_SPI (usec)\0A -b --bpw bits per word \0A -l --loop loopback\0A -H --cpha clock phase\0A -O --cpol clock polarity\0A -L --lsb least significant bit first\0A -C --cs-high chip select active high\0A -3 --3wire SI/SO signals shared\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([360 x i8], [360 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
void rop3_249_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk2 = ~stk2;
  stk1 = T | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


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

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

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

LLVM IR (-O2):
define void @rop3_249_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %5, -1
%7 = or i8 %6, %2
%8 = xor i8 %1, -1
%9 = and i8 %7, %8
%10 = and i8 %4, %1
%11 = or i8 %9, %10
store i8 %11, i8* %0
ret void
}
void foo529(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo529(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cl_int;
typedef scalar_t__ cl_command_queue;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int, unsigned int *);
cl_int clEnqueueBarrier(cl_command_queue command_queue) {
  unsigned int sys_args[1];
  sys_args[0] = (unsigned int)command_queue;
  return (cl_int)syscall(325, 1072, sys_args);
}


x86 assembly (clang, -O0):
<clEnqueueBarrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdx
mov    $0x145,%edi
mov    $0x430,%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clEnqueueBarrier>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x145,%edi
mov    $0x430,%esi
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @clEnqueueBarrier(i64 %0) {
%2 = alloca i64
%3 = alloca [1 x i32]
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = trunc i64 %4 to i32
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
store i32 %5, i32* %6
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%8 = call i32 @syscall(i32 325, i32 1072, i32* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @clEnqueueBarrier(i64 %0) {
%2 = alloca [1 x i32]
%3 = bitcast [1 x i32]* %2 to i8*
%4 = trunc i64 %0 to i32
%5 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
store i32 %4, i32* %5
%6 = call i32 @syscall(i32 325, i32 1072, i32* %5)
ret i32 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ subwindow;
};
typedef TYPE_1__ XKeyEvent;

/* Variables and functions */
unsigned long get_XKeyEvent_subwindow(void *_p) {
  return (unsigned long)((XKeyEvent *)_p)->subwindow;
}


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

x86 assembly (clang, -O2):
<get_XKeyEvent_subwindow>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XKeyEvent_subwindow(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XKeyEvent_subwindow(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
int where_stmt() {}


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

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

LLVM IR (-O0):
define i32 @where_stmt() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @where_stmt() {
ret i32 undef
}
int find_pivot_column_first(const int n, const float *p) {
  for (int i = 1; i < n; i++)
    if (p[i] > 0)
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<find_pivot_column_first>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1155 <find_pivot_column_first+0x55>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    1142 <find_pivot_column_first+0x42>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115c <find_pivot_column_first+0x5c>
jmp    1147 <find_pivot_column_first+0x47>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <find_pivot_column_first+0x12>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_pivot_column_first>:
mov    $0xffffffff,%eax
cmp    $0x2,%edi
jl     1133 <find_pivot_column_first+0x33>
mov    %edi,%edx
mov    $0x1,%ecx
xorps  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movss  (%rsi,%rcx,4),%xmm1
ucomiss %xmm0,%xmm1
ja     1134 <find_pivot_column_first+0x34>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1120 <find_pivot_column_first+0x20>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @find_pivot_column_first(i32 %0, float* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca float*
%6 = alloca i32
store i32 %0, i32* %4
store float* %1, float** %5
store i32 1, i32* %6
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = load float*, float** %5
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds float, float* %12, i64 %14
%16 = load float, float* %15
%17 = fcmp ogt float %16, 0.000000e+00
br i1 %17, label %18, label %20
18: ; preds = %11
%19 = load i32, i32* %6
store i32 %19, i32* %3
br label %25
20: ; preds = %11
br label %21
21: ; preds = %20
%22 = load i32, i32* %6
%23 = add nsw i32 %22, 1
store i32 %23, i32* %6
br label %7
24: ; preds = %7
store i32 -1, i32* %3
br label %25
25: ; preds = %24, %18
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @find_pivot_column_first(i32 %0, float* nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %11
%7 = phi i64 [ 1, %4 ], [ %12, %11 ]
%8 = getelementptr inbounds float, float* %1, i64 %7
%9 = load float, float* %8
%10 = fcmp ogt float %9, 0.000000e+00
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %16, label %6
14: ; preds = %6
%15 = trunc i64 %7 to i32
br label %16
16: ; preds = %11, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %11 ]
ret i32 %17
}
/* Variables and functions */
int gmx_trjconv(int, char **);
int main(int argc, char *argv[]) { return gmx_trjconv(argc, argv); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <gmx_trjconv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <gmx_trjconv@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_trjconv(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ RCT2_CALLPROC_EBPSAFE(int);
void window_map_scrollmousedown() { RCT2_CALLPROC_EBPSAFE(0x0068D726); }


x86 assembly (clang, -O0):
<window_map_scrollmousedown>:
push   %rbp
mov    %rsp,%rbp
mov    $0x68d726,%edi
call   1030 <RCT2_CALLPROC_EBPSAFE@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<window_map_scrollmousedown>:
mov    $0x68d726,%edi
jmp    1030 <RCT2_CALLPROC_EBPSAFE@plt>

LLVM IR (-O0):
define void @window_map_scrollmousedown() {
%1 = call i32 @RCT2_CALLPROC_EBPSAFE(i32 6870822)
ret void
}

LLVM IR (-O2):
define void @window_map_scrollmousedown() {
%1 = tail call i32 @RCT2_CALLPROC_EBPSAFE(i32 6870822)
ret void
}
int foo1(int arg) { return arg; }


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

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

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

LLVM IR (-O2):
define i32 @foo1(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int foo(int /*<<< orphan*/ *);
int x;
int main() {
  int x = (foo(&x), x);
  assert(x == 42);
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <foo@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <foo@plt>
xor    %edi,%edi
cmpl   $0x2a,0x4(%rsp)
sete   %dil
call   1030 <assert@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@x = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @foo(i32* %2)
%4 = load i32, i32* %2
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 42
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@x = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @foo(i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 42
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %1
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x03() {
  Assert_real((isgraph(3) == 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_isgraph.c",
              20, ("isgraph should be 0 for 0x03"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x03>:
push   %rax
mov    $0x3,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x14,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x03\00"
define void @t_isgraph_0x03() {
%1 = call i64 @isgraph(i32 3)
%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 20, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x03\00"
define void @t_isgraph_0x03() {
%1 = tail call i64 @isgraph(i32 3)
%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 20, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int emac2_reg_status_set(unsigned int dev_id, union emac2_reg_status_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.emac2_reg_status_u = type opaque
define i32 @emac2_reg_status_set(i32 %0, %union.emac2_reg_status_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_reg_status_u*
store i32 %0, i32* %3
store %union.emac2_reg_status_u* %1, %union.emac2_reg_status_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_reg_status_u = type opaque
define i32 @emac2_reg_status_set(i32 %0, %union.emac2_reg_status_u* nocapture readnone %1) {
ret i32 1
}
void g(int *j, int k) {
  if (*j + k < 6) {
    *j = *j + 1;
    g(j, k);
  }
}


x86 assembly (clang, -O0):
<g>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    -0xc(%rbp),%eax
cmp    $0x6,%eax
jge    114c <g+0x3c>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g>:
mov    (%rdi),%eax
add    %esi,%eax
cmp    $0x5,%eax
jg     1112 <g+0x12>
mov    $0x6,%eax
sub    %esi,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @g(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, %1
%5 = icmp slt i32 %4, 6
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = sub i32 6, %1
store i32 %7, i32* %0
br label %8
8: ; preds = %6, %2
ret void
}
imm0adrx1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if (22 <= (((short *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<imm0adrx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0x10(%rbp),%rcx
mov    $0xa98ac7,%eax
movswl (%rax,%rcx,2),%ecx
mov    $0x16,%eax
cmp    %ecx,%eax
jg     1145 <imm0adrx1+0x45>
movl   $0x1,-0x4(%rbp)
jmp    114c <imm0adrx1+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imm0adrx1>:
movslq %ecx,%rcx
xor    %eax,%eax
cmpw   $0x16,0xa98ac7(%rcx,%rcx,1)
setge  %al
ret

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

LLVM IR (-O2):
define i32 @imm0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %7
%9 = load i16, i16* %8
%10 = icmp sgt i16 %9, 21
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x97() {
  Assert_real((ispunct(151) == 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",
              760, ("ispunct should be 0 for 0x97"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x97>:
push   %rax
mov    $0x97,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2f8,%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 = [29 x i8] c"ispunct should be 0 for 0x97\00"
define void @t_ispunct_0x97() {
%1 = call i64 @ispunct(i32 151)
%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 760, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x97\00"
define void @t_ispunct_0x97() {
%1 = tail call i64 @ispunct(i32 151)
%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 760, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
extern double n1n2n3s1(int n1, int n2, int n3, float s1) {
  return n1 + n2 + n3 + s1;
}


x86 assembly (clang, -O0):
<n1n2n3s1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cvtsi2ss %eax,%xmm0
addss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<n1n2n3s1>:
add    %esi,%edi
add    %edx,%edi
cvtsi2ss %edi,%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @n1n2n3s1(i32 %0, i32 %1, i32 %2, float %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store float %3, float* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %7
%13 = add nsw i32 %11, %12
%14 = sitofp i32 %13 to float
%15 = load float, float* %8
%16 = fadd float %14, %15
%17 = fpext float %16 to double
ret double %17
}

LLVM IR (-O2):
define double @n1n2n3s1(i32 %0, i32 %1, i32 %2, float %3) {
%5 = add nsw i32 %1, %0
%6 = add nsw i32 %5, %2
%7 = sitofp i32 %6 to float
%8 = fadd float %7, %3
%9 = fpext float %8 to double
ret double %9
}
/* Variables and functions */
int MIDI_GetContext();
int MUSIC_GetContext(void) { return MIDI_GetContext(); }


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

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

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

LLVM IR (-O2):
define i32 @MUSIC_GetContext() {
%1 = tail call i32 (...) @MIDI_GetContext()
ret i32 %1
}
/* Variables and functions */
int sound_header_type(char *);
int sound_aiff_p(char *arg) { return (sound_header_type(arg) == 56); }


x86 assembly (clang, -O0):
<sound_aiff_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <sound_header_type@plt>
cmp    $0x38,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sound_aiff_p>:
push   %rax
call   1030 <sound_header_type@plt>
xor    %ecx,%ecx
cmp    $0x38,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sound_aiff_p(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @sound_header_type(i8* %3)
%5 = icmp eq i32 %4, 56
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @sound_aiff_p(i8* %0) {
%2 = tail call i32 @sound_header_type(i8* %0)
%3 = icmp eq i32 %2, 56
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set_dir_out(int);
int /*<<< orphan*/ gpio_unfreeze();
int /*<<< orphan*/ gpio_write_scl_sda(int, int);
void operation_i2c_start() {
  gpio_write_scl_sda(1, 1);
  gpio_set_dir_out(((1 << 0) | (1 << 1)));
  gpio_unfreeze();
  gpio_write_scl_sda(1, 0);
  gpio_write_scl_sda(0, 0);
}


x86 assembly (clang, -O0):
<operation_i2c_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%esi
mov    %esi,%edi
call   1050 <gpio_write_scl_sda@plt>
mov    $0x3,%edi
call   1030 <gpio_set_dir_out@plt>
mov    $0x0,%al
call   1040 <gpio_unfreeze@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <gpio_write_scl_sda@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1050 <gpio_write_scl_sda@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<operation_i2c_start>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1050 <gpio_write_scl_sda@plt>
mov    $0x3,%edi
call   1030 <gpio_set_dir_out@plt>
xor    %eax,%eax
call   1040 <gpio_unfreeze@plt>
mov    $0x1,%edi
xor    %esi,%esi
call   1050 <gpio_write_scl_sda@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1050 <gpio_write_scl_sda@plt>

LLVM IR (-O0):
define void @operation_i2c_start() {
%1 = call i32 @gpio_write_scl_sda(i32 1, i32 1)
%2 = call i32 @gpio_set_dir_out(i32 3)
%3 = call i32 (...) @gpio_unfreeze()
%4 = call i32 @gpio_write_scl_sda(i32 1, i32 0)
%5 = call i32 @gpio_write_scl_sda(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @operation_i2c_start() {
%1 = tail call i32 @gpio_write_scl_sda(i32 1, i32 1)
%2 = tail call i32 @gpio_set_dir_out(i32 3)
%3 = tail call i32 (...) @gpio_unfreeze()
%4 = tail call i32 @gpio_write_scl_sda(i32 1, i32 0)
%5 = tail call i32 @gpio_write_scl_sda(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun_call_ret_6() {
  printf("I am return void\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"I am return void\00"
define void @fun_call_ret_6() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
void change_bit(int nr, volatile void *addr) {
  asm volatile(""
               "btcl %1,%0"
               : "=m"((*(volatile long *)addr))
               : "Ir"(nr), "m"((*(volatile long *)addr))
               : "memory");
}


x86 assembly (clang, -O0):
<change_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rdx
btc    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_bit>:
btc    %edi,(%rsi)
ret

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

LLVM IR (-O2):
define void @change_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i64*
tail call void asm sideeffect "btcl $1,$0", "=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %3, i32 %0, i64* elementtype(i64) %3)
ret void
}
int xmlUCSIsCJKCompatibility(int code) {
  return (((code >= 0x3300) && (code <= 0x33FF)));
}


x86 assembly (clang, -O0):
<xmlUCSIsCJKCompatibility>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x3300,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsCJKCompatibility+0x26>
cmpl   $0x33ff,-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):
<xmlUCSIsCJKCompatibility>:
and    $0xffffff00,%edi
xor    %eax,%eax
cmp    $0x3300,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsCJKCompatibility(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 13056
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 13311
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 @xmlUCSIsCJKCompatibility(i32 %0) {
%2 = and i32 %0, -256
%3 = icmp eq i32 %2, 13056
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ puts(char *);
int banner(void) {
  puts("motet - The MOTET Cipher & SE Scrambler");
  puts("MOTET  Copyright (C) C.C.Kayne 2014, GNU GPL V.3, cckayne@gmail.com");
  printf("\n%s\n", "This program comes with absolutely no warranty:");
  puts("It is free software: You are welcome to redistribute it.");
  return 0;
}


x86 assembly (clang, -O0):
<banner>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
lea    0xf29(%rip),%rdi
lea    0xf27(%rip),%rsi
call   1040 <printf@plt>
lea    0xf4b(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<banner>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2c(%rip),%rdi
lea    0xf2a(%rip),%rsi
call   1040 <printf@plt>
lea    0xf4e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [40 x i8] c"motet - The MOTET Cipher & SE Scrambler\00"
@.str.1 = [68 x i8] c"MOTET Copyright (C) C.C.Kayne 2014, GNU GPL V.3, cckayne@gmail.com\00"
@.str.2 = [5 x i8] c"\0A%s\0A\00"
@.str.3 = [48 x i8] c"This program comes with absolutely no warranty:\00"
@.str.4 = [57 x i8] c"It is free software: You are welcome to redistribute it.\00"
define i32 @banner() {
%1 = call i32 @puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @puts(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%4 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [40 x i8] c"motet - The MOTET Cipher & SE Scrambler\00"
@.str.1 = [68 x i8] c"MOTET Copyright (C) C.C.Kayne 2014, GNU GPL V.3, cckayne@gmail.com\00"
@.str.2 = [5 x i8] c"\0A%s\0A\00"
@.str.3 = [48 x i8] c"This program comes with absolutely no warranty:\00"
@.str.4 = [57 x i8] c"It is free software: You are welcome to redistribute it.\00"
define i32 @banner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.3, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}