xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ MS_BIND;
int errno;
scalar_t__ mount(char const *, char const *, int /*<<< orphan*/ *,
                 int /*<<< orphan*/, int /*<<< orphan*/ *);
int bind_mount(const char *source, const char *target) {
  return mount(source, target, NULL, MS_BIND, NULL) < 0 ? -errno : 0;
}


x86 assembly (clang, -O0):
<bind_mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rax
mov    (%rax),%ecx
xor    %eax,%eax
mov    %eax,%r8d
mov    %r8,%rdx
call   1030 <mount@plt>
cmp    $0x0,%rax
jge    115b <bind_mount+0x4b>
xor    %eax,%eax
mov    0x2e87(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x14(%rbp)
jmp    1165 <bind_mount+0x55>
xor    %eax,%eax
mov    %eax,-0x14(%rbp)
jmp    1165 <bind_mount+0x55>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bind_mount>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    (%rax),%ecx
xor    %ebx,%ebx
xor    %edx,%edx
xor    %r8d,%r8d
call   1030 <mount@plt>
mov    0x2eab(%rip),%rcx
sub    (%rcx),%ebx
sar    $0x3f,%rax
and    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@MS_BIND = global i32 0
@errno = global i32 0
define i32 @bind_mount(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i32, i32* @MS_BIND
%8 = call i64 @mount(i8* %5, i8* %6, i32* null, i32 %7, i32* null)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* @errno
%12 = sub nsw i32 0, %11
br label %14
13: ; preds = %2
br label %14
14: ; preds = %13, %10
%15 = phi i32 [ %12, %10 ], [ 0, %13 ]
ret i32 %15
}

LLVM IR (-O2):
@MS_BIND = global i32 0
@errno = global i32 0
define i32 @bind_mount(i8* %0, i8* %1) {
%3 = load i32, i32* @MS_BIND
%4 = tail call i64 @mount(i8* %0, i8* %1, i32* null, i32 %3, i32* null)
%5 = icmp slt i64 %4, 0
%6 = load i32, i32* @errno
%7 = sub nsw i32 0, %6
%8 = select i1 %5, i32 %7, i32 0
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void emit_uint8_t(uint8_t **list, uint8_t d) { *((*list)++) = d; }


x86 assembly (clang, -O0):
<emit_uint8_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x4,%rsi
mov    %rsi,(%rdx)
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_uint8_t>:
mov    (%rdi),%rax
lea    0x4(%rax),%rcx
mov    %rcx,(%rdi)
mov    %esi,(%rax)
ret

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

LLVM IR (-O2):
define void @emit_uint8_t(i32** nocapture %0, i32 %1) {
%3 = load i32*, i32** %0
%4 = getelementptr inbounds i32, i32* %3, i64 1
store i32* %4, i32** %0
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, unsigned int volatile);
int /*<<< orphan*/ printf(char *, unsigned int volatile);
int setjmp(int /*<<< orphan*/);
int main() {
  jmp_buf buf;
  volatile unsigned i = 0;
  if (setjmp(buf) < 10) {
    printf("i == %u\n", i);
    longjmp(buf, ++i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <setjmp@plt>
cmp    $0xa,%eax
jge    1177 <main+0x47>
mov    -0xc(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    %esi,-0xc(%rbp)
call   1050 <longjmp@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
call   1040 <setjmp@plt>
cmp    $0x9,%eax
jle    1147 <main+0x17>
xor    %eax,%eax
pop    %rcx
ret
mov    0x4(%rsp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
add    $0x1,%esi
mov    %esi,0x4(%rsp)
call   1050 <longjmp@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"i == %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store volatile i32 0, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @setjmp(i32 %4)
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = load volatile i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = load volatile i32, i32* %3
%12 = add i32 %11, 1
store volatile i32 %12, i32* %3
%13 = call i32 @longjmp(i32 %10, i32 %12)
unreachable
14: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"i == %u\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store volatile i32 0, i32* %1
%3 = call i32 @setjmp(i32 undef)
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %11
5: ; preds = %0
%6 = load volatile i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load volatile i32, i32* %1
%9 = add i32 %8, 1
store volatile i32 %9, i32* %1
%10 = call i32 @longjmp(i32 undef, i32 %9)
unreachable
11: ; preds = %0
ret i32 0
}
/* Variables and functions */
int five();
char *test_multiply_five() {
  int out = five() * five();
  do {
    if (!(out == 25))
      return "error, five * five != 25";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_multiply_five>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <five@plt>
mov    %eax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <five@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x19,-0xc(%rbp)
je     114e <test_multiply_five+0x3e>
lea    0xebb(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    115b <test_multiply_five+0x4b>
jmp    1153 <test_multiply_five+0x43>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_multiply_five>:
push   %rbp
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <five@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <five@plt>
imul   %ebp,%eax
cmp    $0x19,%eax
lea    0xece(%rip),%rax
cmovne %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"error, five * five != 25\00"
define i8* @test_multiply_five() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i32 (...) @five()
%4 = call i32 (...) @five()
%5 = mul nsw i32 %3, %4
store i32 %5, i32* %2
br label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 25
br i1 %8, label %10, label %9
9: ; preds = %6
store i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8** %1
br label %12
10: ; preds = %6
br label %11
11: ; preds = %10
store i8* null, i8** %1
br label %12
12: ; preds = %11, %9
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [25 x i8] c"error, five * five != 25\00"
define i8* @test_multiply_five() {
%1 = tail call i32 (...) @five()
%2 = tail call i32 (...) @five()
%3 = mul nsw i32 %2, %1
%4 = icmp eq i32 %3, 25
%5 = select i1 %4, i8* null, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
ret i8* %5
}
int test_imm_7Fint64_lowword_reg(long long val) {
  return ((val) & (0x7F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_7Fint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 127
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
void reg32_set_bits(volatile uint32_t *reg, uint32_t value) { *reg |= value; }


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

x86 assembly (clang, -O2):
<reg32_set_bits>:
mov    %esi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
or     %eax,(%rdi)
ret

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

LLVM IR (-O2):
define void @reg32_set_bits(i32* %0, i32 %1) {
%3 = alloca i32
store volatile i32 %1, i32* %3
%4 = load volatile i32, i32* %3
%5 = load volatile i32, i32* %0
%6 = or i32 %5, %4
store volatile i32 %6, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ parse_success(void *);
void parse_should_fail_fail(void *o) { parse_success(o); }


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

x86 assembly (clang, -O2):
<parse_should_fail_fail>:
jmp    1030 <parse_success@plt>

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

LLVM IR (-O2):
define void @parse_should_fail_fail(i8* %0) {
%2 = tail call i32 @parse_success(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double);
double getCPUTime();
int /*<<< orphan*/ stderr;
scalar_t__ yyparse();
int main(int argc, const char **argv) {
  {
    double startTime, endTime;
    startTime = getCPUTime();
    while (yyparse())
      ;
    endTime = getCPUTime();
    fprintf(stderr, "!!! CPU time used: %lfs\n", endTime - startTime);
  };
  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    $0x0,%al
call   1030 <getCPUTime@plt>
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <yyparse@plt>
cmp    $0x0,%rax
je     1168 <main+0x38>
jmp    1152 <main+0x22>
mov    $0x0,%al
call   1030 <getCPUTime@plt>
movsd  %xmm0,-0x20(%rbp)
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
movsd  -0x20(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
lea    0xe72(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getCPUTime@plt>
movsd  %xmm0,(%rsp)
nopl   (%rax)
xor    %eax,%eax
call   1040 <yyparse@plt>
test   %rax,%rax
jne    1140 <main+0x10>
xor    %eax,%eax
call   1030 <getCPUTime@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
subsd  (%rsp),%xmm0
lea    0xe98(%rip),%rsi
call   1050 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"!!! CPU time used: %lfs\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call double (...) @getCPUTime()
store double %8, double* %6
br label %9
9: ; preds = %12, %2
%10 = call i64 (...) @yyparse()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %9
br label %9
13: ; preds = %9
%14 = call double (...) @getCPUTime()
store double %14, double* %7
%15 = load i32, i32* @stderr
%16 = load double, double* %7
%17 = load double, double* %6
%18 = fsub double %16, %17
%19 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %18)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"!!! CPU time used: %lfs\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double (...) @getCPUTime()
br label %4
4: ; preds = %4, %2
%5 = tail call i64 (...) @yyparse()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %4
7: ; preds = %4
%8 = tail call double (...) @getCPUTime()
%9 = load i32, i32* @stderr
%10 = fsub double %8, %3
%11 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), double %10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EBADF;
int STDOUT_FILENO;
int /*<<< orphan*/ errno;
int _lseek(int file, int offset __attribute__((unused)),
           int whence __attribute__((unused))) {
  if (STDOUT_FILENO == file)
    return 0;
  else {
    errno = EBADF;
    return -1;
  }
}


x86 assembly (clang, -O0):
<_lseek>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2edc(%rip),%rax
mov    (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    112b <_lseek+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1144 <_lseek+0x44>
mov    0x2e9e(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9d(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_lseek>:
mov    0x2ee9(%rip),%rcx
xor    %eax,%eax
cmp    %edi,(%rcx)
je     1124 <_lseek+0x24>
mov    0x2ebc(%rip),%rax
mov    (%rax),%eax
mov    0x2ebb(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@EBADF = global i32 0
@errno = global i32 0
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* @STDOUT_FILENO
%9 = load i32, i32* %5
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
store i32 0, i32* %4
br label %14
12: ; preds = %3
%13 = load i32, i32* @EBADF
store i32 %13, i32* @errno
store i32 -1, i32* %4
br label %14
14: ; preds = %12, %11
%15 = load i32, i32* %4
ret i32 %15
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@EBADF = global i32 0
@errno = global i32 0
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @STDOUT_FILENO
%5 = icmp eq i32 %4, %0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = load i32, i32* @EBADF
store i32 %7, i32* @errno
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ -1, %6 ], [ 0, %3 ]
ret i32 %9
}
void made_address(int addr, unsigned char *buf) {
  int i, j, k;
  char a;
  k = addr;
  buf[1] = (unsigned char)(k & 0xFF);
  k = addr & 0xFF00;
  buf[0] = ((unsigned char)(k >> 8)) & 0x7F;
  return;
}


x86 assembly (clang, -O0):
<made_address>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
sar    $0x8,%eax
movzbl %al,%eax
and    $0x7f,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<made_address>:
mov    %dil,0x1(%rsi)
shr    $0x8,%edi
and    $0x7f,%dil
mov    %dil,(%rsi)
ret

LLVM IR (-O0):
define void @made_address(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
store i32 %0, i32* %3
store i8* %1, i8** %4
%9 = load i32, i32* %3
store i32 %9, i32* %7
%10 = load i32, i32* %7
%11 = and i32 %10, 255
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
%15 = load i32, i32* %3
%16 = and i32 %15, 65280
store i32 %16, i32* %7
%17 = load i32, i32* %7
%18 = ashr i32 %17, 8
%19 = trunc i32 %18 to i8
%20 = zext i8 %19 to i32
%21 = and i32 %20, 127
%22 = trunc i32 %21 to i8
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 0
store i8 %22, i8* %24
ret void
}

LLVM IR (-O2):
define void @made_address(i32 %0, i8* nocapture writeonly %1) {
%3 = trunc i32 %0 to i8
%4 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %3, i8* %4
%5 = lshr i32 %0, 8
%6 = trunc i32 %5 to i8
%7 = and i8 %6, 127
store i8 %7, i8* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pem_password_cb;
typedef int /*<<< orphan*/ d2i_of_void;
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ *PEM_ASN1_read_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                      int /*<<< orphan*/ *, void **,
                                      int /*<<< orphan*/ *, void *);
int /*<<< orphan*/ PEM_STRING_RSA_PUBLIC;
scalar_t__ d2i_RSAPublicKey;
RSA *PEM_read_bio_RSAPublicKey(BIO *bp, RSA **x, pem_password_cb *cb, void *u) {
  return PEM_ASN1_read_bio((d2i_of_void *)d2i_RSAPublicKey,
                           PEM_STRING_RSA_PUBLIC, bp, (void **)x, cb, u);
}


x86 assembly (clang, -O0):
<PEM_read_bio_RSAPublicKey>:
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    0x2ea9(%rip),%rax
mov    (%rax),%rdi
mov    0x2eaf(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
call   1030 <PEM_ASN1_read_bio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_read_bio_RSAPublicKey>:
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
jmp    1030 <PEM_ASN1_read_bio@plt>

LLVM IR (-O0):
@d2i_RSAPublicKey = global i64 0
@PEM_STRING_RSA_PUBLIC = global i32 0
define i32* @PEM_read_bio_RSAPublicKey(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = alloca i32*
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i8*
store i32* %0, i32** %5
store i32** %1, i32*** %6
store i32* %2, i32** %7
store i8* %3, i8** %8
%9 = load i64, i64* @d2i_RSAPublicKey
%10 = inttoptr i64 %9 to i32*
%11 = load i32, i32* @PEM_STRING_RSA_PUBLIC
%12 = load i32*, i32** %5
%13 = load i32**, i32*** %6
%14 = bitcast i32** %13 to i8**
%15 = load i32*, i32** %7
%16 = load i8*, i8** %8
%17 = call i32* @PEM_ASN1_read_bio(i32* %10, i32 %11, i32* %12, i8** %14, i32* %15, i8* %16)
ret i32* %17
}

LLVM IR (-O2):
@d2i_RSAPublicKey = global i64 0
@PEM_STRING_RSA_PUBLIC = global i32 0
define i32* @PEM_read_bio_RSAPublicKey(i32* %0, i32** %1, i32* %2, i8* %3) {
%5 = load i64, i64* @d2i_RSAPublicKey
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_RSA_PUBLIC
%8 = bitcast i32** %1 to i8**
%9 = tail call i32* @PEM_ASN1_read_bio(i32* %6, i32 %7, i32* %0, i8** %8, i32* %2, i8* %3)
ret i32* %9
}
float ctof(float c) { return ((c * 9) / 5) + 32; }


x86 assembly (clang, -O0):
<ctof>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xee6(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xed6(%rip),%xmm1
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctof>:
mulss  0xef8(%rip),%xmm0
divss  0xef4(%rip),%xmm0
addss  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define float @ctof(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 9.000000e+00
%5 = fdiv float %4, 5.000000e+00
%6 = fadd float %5, 3.200000e+01
ret float %6
}

LLVM IR (-O2):
define float @ctof(float %0) {
%2 = fmul float %0, 9.000000e+00
%3 = fdiv float %2, 5.000000e+00
%4 = fadd float %3, 3.200000e+01
ret float %4
}
int test_imm_B3uint16_reg(unsigned short val) {
  return ((val) & (-0xB3 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_B3uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -179
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ putchar(char);
int main(int argc, char const *argv[]) {
  char ch;
  while ((ch = getchar()) != '#') {
    putchar(ch);
  }
  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    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x23,%eax
je     115a <main+0x3a>
movsbl -0x11(%rbp),%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x23,%al
je     1145 <main+0x25>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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
br label %7
7: ; preds = %11, %2
%8 = call signext i8 (...) @getchar()
store i8 %8, i8* %6
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 35
br i1 %10, label %11, label %14
11: ; preds = %7
%12 = load i8, i8* %6
%13 = call i32 @putchar(i8 signext %12)
br label %7
14: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call signext i8 (...) @getchar()
%4 = icmp eq i8 %3, 35
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %8, %5 ], [ %3, %2 ]
%7 = tail call i32 @putchar(i8 signext %6)
%8 = tail call signext i8 (...) @getchar()
%9 = icmp eq i8 %8, 35
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t subim503808(uint32_t x) { return x - -503808; }


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

x86 assembly (clang, -O2):
<subim503808>:
lea    0x7b000(%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @subim503808(i64 %0) {
%2 = add nsw i64 %0, 503808
ret i64 %2
}
void ptrace(__attribute__((unused)) int x, __attribute__((unused)) int y,
            __attribute__((unused)) int z, __attribute__((unused)) int w) {}


x86 assembly (clang, -O0):
<ptrace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ptrace(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @ptrace(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mxc_wd_reset();
void arch_reset(char mode) { mxc_wd_reset(); }


x86 assembly (clang, -O0):
<arch_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x0,%al
call   1030 <mxc_wd_reset@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @arch_reset(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 (...) @mxc_wd_reset()
ret void
}

LLVM IR (-O2):
define void @arch_reset(i8 signext %0) {
%2 = tail call i32 (...) @mxc_wd_reset()
ret void
}
int c_rawwriter__(fd, bb, n)
int *fd, *n;
char bb[];
{
  int i, nn;
  nn = (*n);
  i = write(*fd, bb, nn);
  if (i == nn)
    return (0);
  else
    return (i);
}


x86 assembly (clang, -O0):
<c_rawwriter__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%edx
mov    $0x0,%al
call   1030 <write@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    115c <c_rawwriter__+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1162 <c_rawwriter__+0x52>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_rawwriter__>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdx),%ebx
mov    (%rdi),%edi
xor    %ebp,%ebp
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <write@plt>
cmp    %ebx,%eax
cmove  %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @c_rawwriter__(i32* nocapture %0, i8* %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = load i32, i32* %0
%6 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i32, ...)*)(i32 %5, i8* %1, i32 %4)
%7 = icmp eq i32 %6, %4
%8 = select i1 %7, i32 0, i32 %6
ret i32 %8
}
void glSamplerParameteri(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glSamplerParameteri() {
ret void
}
void SteamAPI_ISteamMusic_SetVolume(void *self, float flVolume) {
  xlogf("%s(self = %p, flVolume = %f)", __func__, self, flVolume);
}


x86 assembly (clang, -O0):
<SteamAPI_ISteamMusic_SetVolume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xecb(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x1,%al
call   1030 <xlogf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamAPI_ISteamMusic_SetVolume>:
mov    %rdi,%rdx
cvtss2sd %xmm0,%xmm0
lea    0xee2(%rip),%rdi
lea    0xef8(%rip),%rsi
mov    $0x1,%al
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"%s(self = %p, flVolume = %f)\00"
@__func__.SteamAPI_ISteamMusic_SetVolume = [31 x i8] c"SteamAPI_ISteamMusic_SetVolume\00"
define void @SteamAPI_ISteamMusic_SetVolume(i8* %0, float %1) {
%3 = alloca i8*
%4 = alloca float
store i8* %0, i8** %3
store float %1, float* %4
%5 = load i8*, i8** %3
%6 = load float, float* %4
%7 = fpext float %6 to double
%8 = call i32 (i8*, i8*, i8*, double, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, double, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.SteamAPI_ISteamMusic_SetVolume, i64 0, i64 0), i8* %5, double %7)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"%s(self = %p, flVolume = %f)\00"
@__func__.SteamAPI_ISteamMusic_SetVolume = [31 x i8] c"SteamAPI_ISteamMusic_SetVolume\00"
define void @SteamAPI_ISteamMusic_SetVolume(i8* %0, float %1) {
%3 = fpext float %1 to double
%4 = tail call i32 (i8*, i8*, i8*, double, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, double, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([31 x i8], [31 x i8]* @__func__.SteamAPI_ISteamMusic_SetVolume, i64 0, i64 0), i8* %0, double %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ WriteUint24Be(int /*<<< orphan*/, void *);
int32_t WriteInt24Be(int32_t value, void *out) {
  return WriteUint24Be((uint32_t)value, out);
}


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

x86 assembly (clang, -O2):
<WriteInt24Be>:
jmp    1030 <WriteUint24Be@plt>

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

LLVM IR (-O2):
define i64 @WriteInt24Be(i64 %0, i8* %1) {
%3 = trunc i64 %0 to i32
%4 = tail call i64 @WriteUint24Be(i32 %3, i8* %1)
ret i64 %4
}
long return_long_2() { return 1073741823; }


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

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

LLVM IR (-O0):
define i64 @return_long_2() {
ret i64 1073741823
}

LLVM IR (-O2):
define i64 @return_long_2() {
ret i64 1073741823
}
/* Variables and functions */
char *fix_path(char *);
int /*<<< orphan*/ realpath(char *, char *);
char *absolute_path(char *filename) {
  static char absolute_name[1024];
  if (!realpath(filename, absolute_name)) {
    return NULL;
  }
  return fix_path(absolute_name);
}


x86 assembly (clang, -O0):
<absolute_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0x2f09(%rip),%rsi
call   1040 <realpath@plt>
cmp    $0x0,%eax
jne    1152 <absolute_path+0x32>
movq   $0x0,-0x8(%rbp)
jmp    1162 <absolute_path+0x42>
lea    0x2ee7(%rip),%rdi
call   1030 <fix_path@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<absolute_path>:
push   %rax
lea    0x2f18(%rip),%rsi
call   1040 <realpath@plt>
test   %eax,%eax
je     113e <absolute_path+0x1e>
lea    0x2f08(%rip),%rdi
pop    %rax
jmp    1030 <fix_path@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@absolute_path.absolute_name = internal global [1024 x i8] zeroinitializer
define i8* @absolute_path(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @realpath(i8* %4, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @absolute_path.absolute_name, i64 0, i64 0))
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i8* null, i8** %2
br label %10
8: ; preds = %1
%9 = call i8* @fix_path(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @absolute_path.absolute_name, i64 0, i64 0))
store i8* %9, i8** %2
br label %10
10: ; preds = %8, %7
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@absolute_path.absolute_name = internal global [1024 x i8] zeroinitializer
define i8* @absolute_path(i8* nocapture %0) {
%2 = tail call i32 @realpath(i8* %0, i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @absolute_path.absolute_name, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @fix_path(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @absolute_path.absolute_name, i64 0, i64 0))
br label %6
6: ; preds = %1, %4
%7 = phi i8* [ %5, %4 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isprint(int);
void t_isprint_0x4b() {
  Assert_real((isprint(75)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isprint.c",
              380, ("isprint should be 1 for K"));
}


x86 assembly (clang, -O0):
<t_isprint_0x4b>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4b,%edi
call   1030 <isprint@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x17c,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isprint_0x4b>:
push   %rax
mov    $0x4b,%edi
call   1030 <isprint@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x17c,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for K\00"
define void @t_isprint_0x4b() {
%1 = call i32 @isprint(i32 75)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 380, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isprint.c\00"
@.str.1 = [26 x i8] c"isprint should be 1 for K\00"
define void @t_isprint_0x4b() {
%1 = tail call i32 @isprint(i32 75)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 380, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct map {
  int dummy;
};

/* Variables and functions */
int map_iset(struct map *, char *, int /*<<< orphan*/, void *);
int /*<<< orphan*/ strlen(char *);
int map_set(struct map *m, char *key, void *val) {
  return map_iset(m, key, strlen(key), val);
}


x86 assembly (clang, -O0):
<map_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %eax,%edx
mov    -0x18(%rbp),%rcx
call   1040 <map_iset@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_set>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
mov    %r14,%rcx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <map_iset@plt>

LLVM IR (-O0):
%struct.map = type { i32 }
define i32 @map_set(%struct.map* %0, i8* %1, i8* %2) {
%4 = alloca %struct.map*
%5 = alloca i8*
%6 = alloca i8*
store %struct.map* %0, %struct.map** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load %struct.map*, %struct.map** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @strlen(i8* %9)
%11 = load i8*, i8** %6
%12 = call i32 @map_iset(%struct.map* %7, i8* %8, i32 %10, i8* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.map = type { i32 }
define i32 @map_set(%struct.map* %0, i8* %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %1)
%5 = tail call i32 @map_iset(%struct.map* %0, i8* %1, i32 %4, i8* %2)
ret i32 %5
}
signed char unsigned_char_to_signed_char(unsigned char src) { return src; }


x86 assembly (clang, -O0):
<unsigned_char_to_signed_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @unsigned_char_to_signed_char(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
define signext i8 @unsigned_char_to_signed_char(i8 returned zeroext %0) {
ret i8 %0
}
unsigned int f10(unsigned int x, unsigned long int y) {
  return (x << y) | (x >> (8 * sizeof(unsigned int) - y));
}


x86 assembly (clang, -O0):
<f10>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x10(%rbp),%rcx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f10>:
mov    %rsi,%rcx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @f10(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = shl i32 %5, %7
%9 = load i32, i32* %3
%10 = load i64, i64* %4
%11 = sub i64 32, %10
%12 = trunc i64 %11 to i32
%13 = lshr i32 %9, %12
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @f10(i32 %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = shl i32 %0, %3
%5 = sub i32 32, %3
%6 = lshr i32 %0, %5
%7 = or i32 %6, %4
ret i32 %7
}
char *procprt_VSTEXT_e(struct tstat *curstat, int avgval, int nsecs) {
  return "    0K";
}


x86 assembly (clang, -O0):
<procprt_VSTEXT_e>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xeeb(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<procprt_VSTEXT_e>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_VSTEXT_e(%struct.tstat* %0, i32 %1, i32 %2) {
%4 = alloca %struct.tstat*
%5 = alloca i32
%6 = alloca i32
store %struct.tstat* %0, %struct.tstat** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tstat = type opaque
@.str = [7 x i8] c" 0K\00"
define i8* @procprt_VSTEXT_e(%struct.tstat* nocapture readnone %0, i32 %1, i32 %2) {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
double _sin(x)
double x;
{ return sinus(x, 0); }


x86 assembly (clang, -O0):
<_sin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %edi,%edi
mov    $0x1,%al
call   1030 <sinus@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sin>:
push   %rax
xor    %edi,%edi
mov    $0x1,%al
call   1030 <sinus@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @_sin(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 (double, i32, ...) bitcast (i32 (...)* @sinus to i32 (double, i32, ...)*)(double %3, i32 0)
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @_sin(double %0) {
%2 = tail call i32 (double, i32, ...) bitcast (i32 (...)* @sinus to i32 (double, i32, ...)*)(double %0, i32 0)
%3 = sitofp i32 %2 to double
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ memGetDebugLevel();
void memInit(void) {
  static int initDebugLevel = 0;
  if (!initDebugLevel) {
    memGetDebugLevel();
    initDebugLevel = 1;
  }
}


x86 assembly (clang, -O0):
<memInit>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f11(%rip)
jne    1132 <memInit+0x22>
mov    $0x0,%al
call   1030 <memGetDebugLevel@plt>
movl   $0x1,0x2efa(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<memInit>:
push   %rax
cmpb   $0x0,0x2f14(%rip)
jne    1128 <memInit+0x18>
xor    %eax,%eax
call   1030 <memGetDebugLevel@plt>
movb   $0x1,0x2f04(%rip)
pop    %rax
ret

LLVM IR (-O0):
@memInit.initDebugLevel = internal global i32 0
define void @memInit() {
%1 = load i32, i32* @memInit.initDebugLevel
%2 = icmp ne i32 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = call i32 (...) @memGetDebugLevel()
store i32 1, i32* @memInit.initDebugLevel
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@memInit.initDebugLevel = internal unnamed_addr global i1 false
define void @memInit() {
%1 = load i1, i1* @memInit.initDebugLevel
br i1 %1, label %4, label %2
2: ; preds = %0
%3 = tail call i32 (...) @memGetDebugLevel()
store i1 true, i1* @memInit.initDebugLevel
br label %4
4: ; preds = %2, %0
ret void
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int OPENSSL_sk_unshift(int /*<<< orphan*/ *, void const *);
int sk_OPENSSL_BLOCK_unshift(struct stack_st_OPENSSL_BLOCK *sk, void *ptr) {
  return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr);
}


x86 assembly (clang, -O0):
<sk_OPENSSL_BLOCK_unshift>:
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 <OPENSSL_sk_unshift@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_unshift>:
jmp    1030 <OPENSSL_sk_unshift@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_unshift(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_BLOCK*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %3
%6 = bitcast %struct.stack_st_OPENSSL_BLOCK* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i32 @OPENSSL_sk_unshift(i32* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_unshift(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%4 = tail call i32 @OPENSSL_sk_unshift(i32* %3, i8* %1)
ret i32 %4
}
/* Variables and functions */
void typeofVoid() { (typeof(y()))0; }


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

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

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

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

/* Variables and functions */
__attribute__((always_)) uint32_t __UADD16(uint32_t x, uint32_t y) {
  int32_t r = 0, s = 0;
  r = (((x << 16) >> 16) + ((y << 16) >> 16)) & 0x0000FFFF;
  s = (((x) >> 16) + ((y) >> 16)) & 0x0000FFFF;
  return ((s << 16) | (r));
}


x86 assembly (clang, -O0):
<__UADD16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%ecx
shl    $0x10,%ecx
sar    $0x10,%ecx
add    %ecx,%eax
and    $0xffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
mov    -0x8(%rbp),%ecx
sar    $0x10,%ecx
add    %ecx,%eax
and    $0xffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__UADD16>:
lea    (%rsi,%rdi,1),%eax
movzwl %ax,%ecx
and    $0xffff0000,%edi
lea    (%rdi,%rsi,1),%eax
and    $0xffff0000,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__UADD16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %3
%8 = shl i32 %7, 16
%9 = ashr i32 %8, 16
%10 = load i32, i32* %4
%11 = shl i32 %10, 16
%12 = ashr i32 %11, 16
%13 = add nsw i32 %9, %12
%14 = and i32 %13, 65535
store i32 %14, i32* %5
%15 = load i32, i32* %3
%16 = ashr i32 %15, 16
%17 = load i32, i32* %4
%18 = ashr i32 %17, 16
%19 = add nsw i32 %16, %18
%20 = and i32 %19, 65535
store i32 %20, i32* %6
%21 = load i32, i32* %6
%22 = shl i32 %21, 16
%23 = load i32, i32* %5
%24 = or i32 %22, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @__UADD16(i32 %0, i32 %1) {
%3 = add i32 %1, %0
%4 = and i32 %3, 65535
%5 = and i32 %0, -65536
%6 = add i32 %5, %1
%7 = and i32 %6, -65536
%8 = or i32 %7, %4
ret i32 %8
}
int sfset_timestamp(int sock) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @sfset_timestamp(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ game();
int main() {
  game();
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @game()
ret i32 1
}