xunge/DecIR huggingface dataset:
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t ROL64_62(uint64_t x) {
  __asm__("rolq $62, %0" : "=r"(x) : "0"(x));
  return x;
}


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

x86 assembly (clang, -O2):
<ROL64_62>:
mov    %rdi,%rax
rol    $0x3e,%rax
ret

LLVM IR (-O0):
define i8* @ROL64_62(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* asm "rolq $$62, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %3)
store i8* %4, i8** %2
%5 = load i8*, i8** %2
ret i8* %5
}

LLVM IR (-O2):
define i8* @ROL64_62(i8* readnone %0) {
%2 = tail call i8* asm "rolq $$62, $0", "=r,0,~{dirflag},~{fpsr},~{flags}"(i8* %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutexattr_t;

/* Variables and functions */
int mutexattr_init(int /*<<< orphan*/ *);
int pthread_mutexattr_init(pthread_mutexattr_t *attr) {
  return mutexattr_init(attr);
}


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

x86 assembly (clang, -O2):
<pthread_mutexattr_init>:
jmp    1030 <mutexattr_init@plt>

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

LLVM IR (-O2):
define i32 @pthread_mutexattr_init(i32* %0) {
%2 = tail call i32 @mutexattr_init(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ vmread(int /*<<< orphan*/, int /*<<< orphan*/ *);
uint64_t vmreadz(uint64_t encoding) {
  uint64_t value = 0;
  vmread(encoding, &value);
  return value;
}


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

x86 assembly (clang, -O2):
<vmreadz>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <vmread@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vmreadz(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @vmread(i32 %4, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @vmreadz(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @vmread(i32 %0, i32* %2)
%5 = load i32, i32* %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ lcd_cmd(int);
void lcd_init(void) {
  lcd_cmd(0x020 | 0x010 | 0x008);
  lcd_cmd(0x008 | 0x004);
  lcd_cmd(0x002);
  lcd_cmd(0x001);
}


x86 assembly (clang, -O0):
<lcd_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x38,%edi
call   1030 <lcd_cmd@plt>
mov    $0xc,%edi
call   1030 <lcd_cmd@plt>
mov    $0x2,%edi
call   1030 <lcd_cmd@plt>
mov    $0x1,%edi
call   1030 <lcd_cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_init>:
push   %rax
mov    $0x38,%edi
call   1030 <lcd_cmd@plt>
mov    $0xc,%edi
call   1030 <lcd_cmd@plt>
mov    $0x2,%edi
call   1030 <lcd_cmd@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <lcd_cmd@plt>

LLVM IR (-O0):
define void @lcd_init() {
%1 = call i32 @lcd_cmd(i32 56)
%2 = call i32 @lcd_cmd(i32 12)
%3 = call i32 @lcd_cmd(i32 2)
%4 = call i32 @lcd_cmd(i32 1)
ret void
}

LLVM IR (-O2):
define void @lcd_init() {
%1 = tail call i32 @lcd_cmd(i32 56)
%2 = tail call i32 @lcd_cmd(i32 12)
%3 = tail call i32 @lcd_cmd(i32 2)
%4 = tail call i32 @lcd_cmd(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printArray(int *arr, int n) {
  int i;
  for (i = 0; i < n; i++) {
    printf("%d ", arr[i]);
  }
}


x86 assembly (clang, -O0):
<printArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <printArray+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <printArray+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArray(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CODESET;
char *nl_langinfo(int /*<<< orphan*/);
int main(int argc, char **argv) {
  char *cs = nl_langinfo(CODESET);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@CODESET = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @CODESET
%4 = tail call i8* @nl_langinfo(i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned short *, unsigned short *);
int main() {
  short unsigned int x, y;
  x = -5;
  y = -10;
  foo(&x, &y);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movw   $0xfffb,-0x2(%rbp)
movw   $0xfff6,-0x4(%rbp)
lea    -0x2(%rbp),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0xfffb,0x6(%rsp)
movw   $0xfff6,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i16
%2 = alloca i16
%3 = bitcast i16* %1 to i8*
%4 = bitcast i16* %2 to i8*
store i16 -5, i16* %1
store i16 -10, i16* %2
%5 = call i32 @foo(i16* %1, i16* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void clearLogs() { system("rm -f shh_log*"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"rm -f shh_log*\00"
define void @clearLogs() {
%1 = call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"rm -f shh_log*\00"
define void @clearLogs() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float pow(double, float);
double linear_to_gamma_2_2(double value) {
  if (value > 0.0030402477F)
    return 1.055F * pow(value, (1.0F / 2.4F)) - 0.055F;
  return 12.92F * value;
}


x86 assembly (clang, -O0):
<linear_to_gamma_2_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    116c <linear_to_gamma_2_2+0x5c>
movsd  -0x10(%rbp),%xmm0
movss  0xed7(%rip),%xmm1
call   1030 <pow@plt>
movss  0xec2(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xeba(%rip),%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117e <linear_to_gamma_2_2+0x6e>
movsd  0xe94(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_to_gamma_2_2>:
push   %rax
ucomisd 0xee7(%rip),%xmm0
jbe    113e <linear_to_gamma_2_2+0x2e>
movss  0xeed(%rip),%xmm1
call   1030 <pow@plt>
mulss  0xee4(%rip),%xmm0
addss  0xee0(%rip),%xmm0
cvtss2sd %xmm0,%xmm0
pop    %rax
ret
mulsd  0xec2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @linear_to_gamma_2_2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0x3F68E7DC80000000
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = call float @pow(double %7, float 0x3FDAAAAAA0000000)
%9 = call float @llvm.fmuladd.f32(float 0x3FF0E147A0000000, float %8, float 0xBFAC28F5C0000000)
%10 = fpext float %9 to double
store double %10, double* %2
br label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = fmul double 0x4029D70A40000000, %12
store double %13, double* %2
br label %14
14: ; preds = %11, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @linear_to_gamma_2_2(double %0) {
%2 = fcmp ogt double %0, 0x3F68E7DC80000000
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call float @pow(double %0, float 0x3FDAAAAAA0000000)
%5 = tail call float @llvm.fmuladd.f32(float %4, float 0x3FF0E147A0000000, float 0xBFAC28F5C0000000)
%6 = fpext float %5 to double
br label %9
7: ; preds = %1
%8 = fmul double %0, 0x4029D70A40000000
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
/* Variables and functions */
int btp_skip_char_span(char const **, char *);
int btp_skip_unsigned_integer(const char **input) {
  return btp_skip_char_span(input, "0123456789");
}


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

x86 assembly (clang, -O2):
<btp_skip_unsigned_integer>:
lea    0xee9(%rip),%rsi
jmp    1030 <btp_skip_char_span@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"0123456789\00"
define i32 @btp_skip_unsigned_integer(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = call i32 @btp_skip_char_span(i8** %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [11 x i8] c"0123456789\00"
define i32 @btp_skip_unsigned_integer(i8** %0) {
%2 = tail call i32 @btp_skip_char_span(i8** %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void copy96(uint32_t *dst, uint32_t *src) {
  dst[0] = src[0];
  dst[1] = src[1];
  dst[2] = src[2];
}


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

x86 assembly (clang, -O2):
<copy96>:
mov    (%rsi),%eax
mov    %eax,(%rdi)
mov    0x4(%rsi),%eax
mov    %eax,0x4(%rdi)
mov    0x8(%rsi),%eax
mov    %eax,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @copy96(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
store i32 %3, i32* %0
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = getelementptr inbounds i32, i32* %1, i64 2
%8 = load i32, i32* %7
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_SMBUS_QUICK;
long i2c_smbus_access(int, unsigned char, int /*<<< orphan*/,
                      int /*<<< orphan*/, int /*<<< orphan*/);
long i2c_smbus_write_quick(int file, unsigned char value) {
  return i2c_smbus_access(file, value, 0, I2C_SMBUS_QUICK, 0);
}


x86 assembly (clang, -O0):
<i2c_smbus_write_quick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x5(%rbp),%al
mov    0x2eb2(%rip),%rcx
mov    (%rcx),%ecx
xor    %r8d,%r8d
movzbl %al,%esi
mov    %r8d,%edx
call   1030 <i2c_smbus_access@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_smbus_write_quick>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
xor    %edx,%edx
xor    %r8d,%r8d
jmp    1030 <i2c_smbus_access@plt>

LLVM IR (-O0):
@I2C_SMBUS_QUICK = global i32 0
define i64 @i2c_smbus_write_quick(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i32, i32* %3
%6 = load i8, i8* %4
%7 = load i32, i32* @I2C_SMBUS_QUICK
%8 = call i64 @i2c_smbus_access(i32 %5, i8 zeroext %6, i32 0, i32 %7, i32 0)
ret i64 %8
}

LLVM IR (-O2):
@I2C_SMBUS_QUICK = global i32 0
define i64 @i2c_smbus_write_quick(i32 %0, i8 zeroext %1) {
%3 = load i32, i32* @I2C_SMBUS_QUICK
%4 = tail call i64 @i2c_smbus_access(i32 %0, i8 zeroext %1, i32 0, i32 %3, i32 0)
ret i64 %4
}
/* Type definitions */
struct MCTStatStruc {
  int dummy;
};
struct DCTStatStruc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mct_SetClToNB_D(struct MCTStatStruc *,
                                   struct DCTStatStruc *);
int /*<<< orphan*/ mct_SetWbEnhWsbDis_D(struct MCTStatStruc *,
                                        struct DCTStatStruc *);
int /*<<< orphan*/ print_t(char *);
void mct_InitialMCT_D(struct MCTStatStruc *pMCTstat,
                      struct DCTStatStruc *pDCTstat) {
  print_t("\tmct_InitialMCT_D: Set Cl, Wb\n");
  mct_SetClToNB_D(pMCTstat, pDCTstat);
  mct_SetWbEnhWsbDis_D(pMCTstat, pDCTstat);
}


x86 assembly (clang, -O0):
<mct_InitialMCT_D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
call   1040 <print_t@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <mct_SetClToNB_D@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <mct_SetWbEnhWsbDis_D@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mct_InitialMCT_D>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xebf(%rip),%rdi
call   1040 <print_t@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <mct_SetClToNB_D@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mct_SetWbEnhWsbDis_D@plt>

LLVM IR (-O0):
%struct.MCTStatStruc = type { i32 }
%struct.DCTStatStruc = type { i32 }
@.str = [31 x i8] c"\09mct_InitialMCT_D: Set Cl, Wb\0A\00"
define void @mct_InitialMCT_D(%struct.MCTStatStruc* %0, %struct.DCTStatStruc* %1) {
%3 = alloca %struct.MCTStatStruc*
%4 = alloca %struct.DCTStatStruc*
store %struct.MCTStatStruc* %0, %struct.MCTStatStruc** %3
store %struct.DCTStatStruc* %1, %struct.DCTStatStruc** %4
%5 = call i32 @print_t(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%6 = load %struct.MCTStatStruc*, %struct.MCTStatStruc** %3
%7 = load %struct.DCTStatStruc*, %struct.DCTStatStruc** %4
%8 = call i32 @mct_SetClToNB_D(%struct.MCTStatStruc* %6, %struct.DCTStatStruc* %7)
%9 = load %struct.MCTStatStruc*, %struct.MCTStatStruc** %3
%10 = load %struct.DCTStatStruc*, %struct.DCTStatStruc** %4
%11 = call i32 @mct_SetWbEnhWsbDis_D(%struct.MCTStatStruc* %9, %struct.DCTStatStruc* %10)
ret void
}

LLVM IR (-O2):
%struct.MCTStatStruc = type { i32 }
%struct.DCTStatStruc = type { i32 }
@.str = [31 x i8] c"\09mct_InitialMCT_D: Set Cl, Wb\0A\00"
define void @mct_InitialMCT_D(%struct.MCTStatStruc* %0, %struct.DCTStatStruc* %1) {
%3 = tail call i32 @print_t(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @mct_SetClToNB_D(%struct.MCTStatStruc* %0, %struct.DCTStatStruc* %1)
%5 = tail call i32 @mct_SetWbEnhWsbDis_D(%struct.MCTStatStruc* %0, %struct.DCTStatStruc* %1)
ret void
}
void gtk_gc_get() {}


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

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

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

LLVM IR (-O2):
define void @gtk_gc_get() {
ret void
}
/* Type definitions */
struct rusage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ wait3(int *, int /*<<< orphan*/, struct rusage *);
void reaper(int sig) {
  int status;
  while (wait3(&status, WNOHANG, (struct rusage *)0) >= 0)
    ;
}


x86 assembly (clang, -O0):
<reaper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <wait3@plt>
cmp    $0x0,%rax
jl     1140 <reaper+0x30>
jmp    111b <reaper+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reaper>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1030 <wait3@plt>
test   %rax,%rax
jns    1120 <reaper+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.rusage = type { i32 }
@WNOHANG = global i32 0
define void @reaper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* @WNOHANG
%6 = call i64 @wait3(i32* %3, i32 %5, %struct.rusage* null)
%7 = icmp sge i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
@WNOHANG = global i32 0
define void @reaper(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i64 @wait3(i32* %2, i32 %5, %struct.rusage* null)
%7 = icmp sgt i64 %6, -1
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *,
                      char const *);
void __func_ge_sint(struct Var *avar, const char *areg, const char *lreg,
                    const char *rreg) {
  pA("if (%s >= %s) {%s = 1;} else {%s = 0;}", lreg, rreg, areg, areg);
}


x86 assembly (clang, -O0):
<__func_ge_sint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec1(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__func_ge_sint>:
mov    %rsi,%r8
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
mov    %r8,%rcx
jmp    1030 <pA@plt>

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [39 x i8] c"if (%s >= %s) {%s = 1;} else {%s = 0;}\00"
define void @__func_ge_sint(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %7
%10 = load i8*, i8** %8
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @pA(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [39 x i8] c"if (%s >= %s) {%s = 1;} else {%s = 0;}\00"
define void @__func_ge_sint(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %3, i8* %1, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ActuatorSettingsHandle();
int /*<<< orphan*/ UAVObjLogging(int /*<<< orphan*/);
void ActuatorSettingsLogging() { UAVObjLogging(ActuatorSettingsHandle()); }


x86 assembly (clang, -O0):
<ActuatorSettingsLogging>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <ActuatorSettingsHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjLogging@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ActuatorSettingsLogging>:
push   %rax
xor    %eax,%eax
call   1040 <ActuatorSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjLogging@plt>

LLVM IR (-O0):
define void @ActuatorSettingsLogging() {
%1 = call i32 (...) @ActuatorSettingsHandle()
%2 = call i32 @UAVObjLogging(i32 %1)
ret void
}

LLVM IR (-O2):
define void @ActuatorSettingsLogging() {
%1 = tail call i32 (...) @ActuatorSettingsHandle()
%2 = tail call i32 @UAVObjLogging(i32 %1)
ret void
}
/* Type definitions */
struct script_stack_element {
  int dummy;
};

/* Variables and functions */
struct script_stack_element *make_stack_element(unsigned char *, int);
struct script_stack_element *make_uint8(unsigned char v) {
  return make_stack_element(&v, 1);
}


x86 assembly (clang, -O0):
<make_uint8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <make_stack_element@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_uint8>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <make_stack_element@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.script_stack_element = type { i32 }
define %struct.script_stack_element* @make_uint8(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call %struct.script_stack_element* @make_stack_element(i8* %2, i32 1)
ret %struct.script_stack_element* %3
}

LLVM IR (-O2):
%struct.script_stack_element = type { i32 }
define %struct.script_stack_element* @make_uint8(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call %struct.script_stack_element* @make_stack_element(i8* %2, i32 1)
ret %struct.script_stack_element* %3
}
/* Variables and functions */
int /*<<< orphan*/ ORA_();
int /*<<< orphan*/ c64_memIndirectZeroX();
void ORA_izx(void) {
  c64_memIndirectZeroX();
  ORA_();
}


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

x86 assembly (clang, -O2):
<ORA_izx>:
push   %rax
xor    %eax,%eax
call   1030 <c64_memIndirectZeroX@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ORA_@plt>

LLVM IR (-O0):
define void @ORA_izx() {
%1 = call i32 (...) @c64_memIndirectZeroX()
%2 = call i32 (...) @ORA_()
ret void
}

LLVM IR (-O2):
define void @ORA_izx() {
%1 = tail call i32 (...) @c64_memIndirectZeroX()
%2 = tail call i32 (...) @ORA_()
ret void
}
void rop3_143_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;
  stk1 = ~stk1;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_143_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
and    %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
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%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_143_1_0>:
mov    (%rdi),%al
and    %sil,%al
or     %esi,%edx
not    %dl
or     %al,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_143_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 = and 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 = and 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 = xor i32 %27, -1
%29 = trunc i32 %28 to i8
store i8 %29, i8* %7
%30 = load i8, i8* %7
%31 = zext i8 %30 to i32
%32 = load i8, i8* %5
%33 = zext i8 %32 to i32
%34 = xor i32 %33, -1
%35 = and i32 %31, %34
%36 = load i8*, i8** %4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = load i8, i8* %5
%40 = zext i8 %39 to i32
%41 = and i32 %38, %40
%42 = or i32 %35, %41
%43 = trunc i32 %42 to i8
%44 = load i8*, i8** %4
store i8 %43, i8* %44
ret void
}

LLVM IR (-O2):
define void @rop3_143_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = and i8 %4, %1
%6 = or i8 %2, %1
%7 = xor i8 %6, -1
%8 = or i8 %5, %7
store i8 %8, i8* %0
ret void
}
int XoNcolors() { return (64); }


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

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

LLVM IR (-O0):
define i32 @XoNcolors() {
ret i32 64
}

LLVM IR (-O2):
define i32 @XoNcolors() {
ret i32 64
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main() {
  fprintf(stderr, "Hello stderr\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"Hello stderr\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"Hello stderr\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
unsigned char *bf_create(int);
int /*<<< orphan*/ bf_delete(unsigned char *, int);
int bf_test_memory() {
  unsigned char *field;
  field = bf_create(80);
  bf_delete(field, 80);
  return 0;
}


x86 assembly (clang, -O0):
<bf_test_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x50,%edi
call   1040 <bf_create@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x50,%esi
call   1030 <bf_delete@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bf_test_memory>:
push   %rax
mov    $0x50,%edi
call   1040 <bf_create@plt>
mov    %rax,%rdi
mov    $0x50,%esi
call   1030 <bf_delete@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @bf_test_memory() {
%1 = alloca i8*
%2 = call i8* @bf_create(i32 80)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @bf_delete(i8* %3, i32 80)
ret i32 0
}

LLVM IR (-O2):
define i32 @bf_test_memory() {
%1 = tail call i8* @bf_create(i32 80)
%2 = tail call i32 @bf_delete(i8* %1, i32 80)
ret i32 0
}
void setPointer(int *address, int value) { *address = value; }


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

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

LLVM IR (-O0):
define void @setPointer(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 = load i32*, i32** %3
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @setPointer(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void main_exit(int code) { exit(code); }


x86 assembly (clang, -O0):
<main_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main_exit>:
push   %rax
call   1030 <exit@plt>

LLVM IR (-O0):
define void @main_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
define void @main_exit(i32 %0) {
%2 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xf0() {
  Assert_real((ispunct(240) == 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",
              1205, ("ispunct should be 0 for 0xf0"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0xf0>:
push   %rax
mov    $0xf0,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4b5,%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 0xf0\00"
define void @t_ispunct_0xf0() {
%1 = call i64 @ispunct(i32 240)
%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 1205, 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 0xf0\00"
define void @t_ispunct_0xf0() {
%1 = tail call i64 @ispunct(i32 240)
%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 1205, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void curl_multi_info_read() {}


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

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

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

LLVM IR (-O2):
define void @curl_multi_info_read() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void nva_gwr8(void *base, uint32_t addr, uint32_t val) {
  *(((volatile uint8_t *)base) + addr) = val;
}


x86 assembly (clang, -O0):
<nva_gwr8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nva_gwr8>:
movslq %esi,%rax
mov    %edx,(%rdi,%rax,4)
ret

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

LLVM IR (-O2):
define void @nva_gwr8(i8* %0, i32 %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = sext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %4, i64 %5
store volatile i32 %2, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ enablePWM(unsigned char);
int /*<<< orphan*/ exportPWM(unsigned char);
int /*<<< orphan*/ setDutyCyclePWM(unsigned char, unsigned long);
int /*<<< orphan*/ setPeriodPWM(unsigned char, unsigned long);
int initPWM(unsigned char n, unsigned long int period,
            unsigned long int dutyCycle) {
  exportPWM(n);
  enablePWM(n);
  setPeriodPWM(n, period);
  setDutyCyclePWM(n, dutyCycle);
}


x86 assembly (clang, -O0):
<initPWM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movzbl -0x5(%rbp),%edi
call   1060 <exportPWM@plt>
movzbl -0x5(%rbp),%edi
call   1040 <enablePWM@plt>
mov    -0x5(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1050 <setPeriodPWM@plt>
mov    -0x5(%rbp),%al
mov    -0x18(%rbp),%rsi
movzbl %al,%edi
call   1030 <setDutyCyclePWM@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initPWM>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
call   1060 <exportPWM@plt>
mov    %ebp,%edi
call   1040 <enablePWM@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <setPeriodPWM@plt>
mov    %ebp,%edi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <setDutyCyclePWM@plt>

LLVM IR (-O0):
define i32 @initPWM(i8 zeroext %0, i64 %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i64
%7 = alloca i64
store i8 %0, i8* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
%8 = load i8, i8* %5
%9 = call i32 @exportPWM(i8 zeroext %8)
%10 = load i8, i8* %5
%11 = call i32 @enablePWM(i8 zeroext %10)
%12 = load i8, i8* %5
%13 = load i64, i64* %6
%14 = call i32 @setPeriodPWM(i8 zeroext %12, i64 %13)
%15 = load i8, i8* %5
%16 = load i64, i64* %7
%17 = call i32 @setDutyCyclePWM(i8 zeroext %15, i64 %16)
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @initPWM(i8 zeroext %0, i64 %1, i64 %2) {
%4 = tail call i32 @exportPWM(i8 zeroext %0)
%5 = tail call i32 @enablePWM(i8 zeroext %0)
%6 = tail call i32 @setPeriodPWM(i8 zeroext %0, i64 %1)
%7 = tail call i32 @setDutyCyclePWM(i8 zeroext %0, i64 %2)
ret i32 undef
}
void av_audio_fifo_space() {}


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

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

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

LLVM IR (-O2):
define void @av_audio_fifo_space() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xdd() {
  Assert_real((isalnum(221) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1110, ("isalnum should be 0 for 0xdd"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0xdd>:
push   %rax
mov    $0xdd,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x456,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0xdd\00"
define void @t_isalnum_0xdd() {
%1 = call i64 @isalnum(i32 221)
%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 1110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

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


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"section_begin\00"
define void @section_begin() {
ret void
}

LLVM IR (-O2):
define void @section_begin() {
ret void
}
int genpd_dev_pm_attach(struct device_d *dev) { return 0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ __iar_program_start();
void ResetISR(void) {
  (*((volatile uint32_t *)(0xE000ED88))) =
      (((*((volatile uint32_t *)(0xE000ED88))) & ~(0x00300000 | 0x00C00000)) |
       0x00300000 | 0x00C00000);
  __iar_program_start();
}


x86 assembly (clang, -O0):
<ResetISR>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000ed88,%eax
mov    (%rax),%ecx
and    $0xff0fffff,%ecx
or     $0x300000,%ecx
or     $0xc00000,%ecx
mov    $0xe000ed88,%eax
mov    %ecx,(%rax)
mov    $0x0,%al
call   1030 <__iar_program_start@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResetISR>:
mov    $0xe000ed88,%eax
orl    $0xf00000,(%rax)
xor    %eax,%eax
jmp    1030 <__iar_program_start@plt>

LLVM IR (-O0):
define void @ResetISR() {
%1 = load volatile i32, i32* inttoptr (i64 3758157192 to i32*)
%2 = and i32 %1, -15728641
%3 = or i32 %2, 3145728
%4 = or i32 %3, 12582912
store volatile i32 %4, i32* inttoptr (i64 3758157192 to i32*)
%5 = call i32 (...) @__iar_program_start()
ret void
}

LLVM IR (-O2):
define void @ResetISR() {
%1 = load volatile i32, i32* inttoptr (i64 3758157192 to i32*)
%2 = or i32 %1, 15728640
store volatile i32 %2, i32* inttoptr (i64 3758157192 to i32*)
%3 = tail call i32 (...) @__iar_program_start()
ret void
}
int min(int a, int b) { return a > b ? b : a; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovg  %esi,%eax
ret

LLVM IR (-O0):
define i32 @min(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* %4
%7 = icmp sgt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
/* Variables and functions */
int unlink(char const *);
int UnixVfs_unlink(const char *zPath) {
  int rc;
  rc = unlink(zPath);
  return rc == 0 ? 0 : -1;
}


x86 assembly (clang, -O0):
<UnixVfs_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <unlink@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnixVfs_unlink>:
push   %rax
call   1030 <unlink@plt>
neg    %eax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @UnixVfs_unlink(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
%3 = icmp ne i32 %2, 0
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ test_and_set(int *, int);
void acquire_spinlock(volatile int *lock) {
  do {
    while (*lock)
      ;
  } while (test_and_set((int *)lock, 1) != 0);
}


x86 assembly (clang, -O0):
<acquire_spinlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
jmp    1121 <acquire_spinlock+0x11>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
cmp    $0x0,%eax
je     1135 <acquire_spinlock+0x25>
jmp    1121 <acquire_spinlock+0x11>
jmp    113a <acquire_spinlock+0x2a>
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <test_and_set@plt>
cmp    $0x0,%rax
jne    111c <acquire_spinlock+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acquire_spinlock>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpl   $0x0,(%rbx)
jne    1120 <acquire_spinlock+0x10>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <test_and_set@plt>
test   %rax,%rax
jne    1120 <acquire_spinlock+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @acquire_spinlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
br label %3
3: ; preds = %10, %1
br label %4
4: ; preds = %8, %3
%5 = load i32*, i32** %2
%6 = load volatile i32, i32* %5
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %4
br label %4
9: ; preds = %4
br label %10
10: ; preds = %9
%11 = load i32*, i32** %2
%12 = call i64 @test_and_set(i32* %11, i32 1)
%13 = icmp ne i64 %12, 0
br i1 %13, label %3, label %14
14: ; preds = %10
ret void
}

LLVM IR (-O2):
define void @acquire_spinlock(i32* %0) {
br label %2
2: ; preds = %5, %1
%3 = load volatile i32, i32* %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %2, %6
br label %2
6: ; preds = %2
%7 = tail call i64 @test_and_set(i32* %0, i32 1)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %6
ret void
}
int iszero(int *x) { return x[0] == 1 && x[1] == 0; }


x86 assembly (clang, -O0):
<iszero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x1,(%rcx)
mov    %al,-0x9(%rbp)
jne    1128 <iszero+0x28>
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iszero>:
xor    %eax,%eax
cmpl   $0x1,(%rdi)
jne    1110 <iszero+0x10>
xor    %eax,%eax
cmpl   $0x0,0x4(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @iszero(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @iszero(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %10
}