xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0x84() {
  Assert_real((isascii(132) == 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_isascii.c",
              665, ("isascii should be 0 for 0x84"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x84>:
push   %rax
mov    $0x84,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x299,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0x84\00"
define void @t_isascii_0x84() {
%1 = call i64 @isascii(i32 132)
%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 665, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0x84\00"
define void @t_isascii_0x84() {
%1 = tail call i64 @isascii(i32 132)
%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 665, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void AckIpcFlag(unsigned long int flag) {
  (*((volatile unsigned long *)(0x400FB700 + 0x000000000))) |= flag;
  return;
}


x86 assembly (clang, -O0):
<AckIpcFlag>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x400fb700,%ecx
mov    (%rcx),%rcx
or     %rax,%rcx
mov    $0x400fb700,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<AckIpcFlag>:
or     %rdi,0x400fb700
40
ret

LLVM IR (-O0):
define void @AckIpcFlag(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load volatile i64, i64* inttoptr (i64 1074771712 to i64*)
%5 = or i64 %4, %3
store volatile i64 %5, i64* inttoptr (i64 1074771712 to i64*)
ret void
}

LLVM IR (-O2):
define void @AckIpcFlag(i64 %0) {
%2 = load volatile i64, i64* inttoptr (i64 1074771712 to i64*)
%3 = or i64 %2, %0
store volatile i64 %3, i64* inttoptr (i64 1074771712 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void show_version() {
  printf("cgichk "
         "2.60"
         " - "
         "Mar 15 2022"
         "\n\n");
  printf("Based on 'CGI Checker 1.35' by su1d sh3ll\n");
  printf("Cooked and rewritten by Fortyseven.\n\n");
  exit(0);
}


x86 assembly (clang, -O0):
<show_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf04(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<show_version>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee7(%rip),%rdi
call   1030 <puts@plt>
lea    0xf05(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"cgichk 2.60 - Mar 15 2022\0A\0A\00"
@.str.1 = [43 x i8] c"Based on 'CGI Checker 1.35' by su1d sh3ll\0A\00"
@.str.2 = [38 x i8] c"Cooked and rewritten by Fortyseven.\0A\0A\00"
define void @show_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [27 x i8] c"cgichk 2.60 - Mar 15 2022\0A\00"
@str.3 = [42 x i8] c"Based on 'CGI Checker 1.35' by su1d sh3ll\00"
@str.4 = [37 x i8] c"Cooked and rewritten by Fortyseven.\0A\00"
define void @show_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
void H() {}


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

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

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

LLVM IR (-O2):
define void @H() {
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y, r;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  r = 1;
  while (y > 0) {
    r = r * x;
    y = y - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    115c <main+0x4c>
mov    -0x10(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
store i32 1, i32* %4
br label %7
7: ; preds = %10, %0
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %7
%11 = load i32, i32* %4
%12 = load i32, i32* %2
%13 = mul nsw i32 %11, %12
store i32 %13, i32* %4
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %3
br label %7
16: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
int strnlen(char const *, size_t);
int __snprintf2(char *buff, size_t s, const char *fmt) {
  strncpy(buff, fmt, s);
  return strnlen(fmt, s);
}


x86 assembly (clang, -O0):
<__snprintf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strnlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__snprintf2>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdx,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strnlen@plt>

LLVM IR (-O0):
define i32 @__snprintf2(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %6
%9 = load i64, i64* %5
%10 = call i32 @strncpy(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %6
%12 = load i64, i64* %5
%13 = call i32 @strnlen(i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @__snprintf2(i8* %0, i64 %1, i8* %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %2, i64 %1)
%5 = tail call i32 @strnlen(i8* %2, i64 %1)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ eeprom_write_block(int /*<<< orphan*/ *,
                                      int /*<<< orphan*/ *, int);
void eeprom_write_byte(uint8_t *addr, uint8_t value) {
  eeprom_write_block(&value, addr, 1);
}


x86 assembly (clang, -O0):
<eeprom_write_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x1,%edx
call   1030 <eeprom_write_block@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eeprom_write_byte>:
push   %rax
mov    %rdi,%rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    %rax,%rsi
mov    $0x1,%edx
call   1030 <eeprom_write_block@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @eeprom_write_byte(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 = call i32 @eeprom_write_block(i32* %4, i32* %5, i32 1)
ret void
}

LLVM IR (-O2):
define void @eeprom_write_byte(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @eeprom_write_block(i32* %3, i32* %0, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fdopen(int, char *);
char *fgets(char *, int, int /*<<< orphan*/ *);
char *read_line(int socket_fd, char *s, int max_size) {
  FILE *stream;
  stream = fdopen(socket_fd, "r");
  if (stream == NULL)
    return NULL;
  return fgets(s, max_size, stream);
}


x86 assembly (clang, -O0):
<read_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0xc(%rbp),%edi
lea    0xec4(%rip),%rsi
call   1040 <fdopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    115d <read_line+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    1171 <read_line+0x51>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rdx
call   1030 <fgets@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_line>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xed1(%rip),%rsi
call   1040 <fdopen@plt>
test   %rax,%rax
je     114c <read_line+0x2c>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fgets@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i8* @read_line(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32* @fdopen(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i8* @fgets(i8* %1, i32 %2, i32* %4)
br label %8
8: ; preds = %3, %6
%9 = phi i8* [ %7, %6 ], [ null, %3 ]
ret i8* %9
}
int isValidSeparatorChar(int c) {
  if ((c >= 65 && c <= 90) || (c >= 97 && c <= 122) || (c >= 192 && c <= 214) ||
      (c >= 217 && c <= 246) || (c >= 249 && c <= 255))
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<isValidSeparatorChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     111b <isValidSeparatorChar+0x1b>
cmpl   $0x5a,-0x8(%rbp)
jle    117d <isValidSeparatorChar+0x7d>
cmpl   $0x61,-0x8(%rbp)
jl     112f <isValidSeparatorChar+0x2f>
cmpl   $0x7a,-0x8(%rbp)
jle    117d <isValidSeparatorChar+0x7d>
cmpl   $0xc0,-0x8(%rbp)
jl     1149 <isValidSeparatorChar+0x49>
cmpl   $0xd6,-0x8(%rbp)
jle    117d <isValidSeparatorChar+0x7d>
cmpl   $0xd9,-0x8(%rbp)
jl     1163 <isValidSeparatorChar+0x63>
cmpl   $0xf6,-0x8(%rbp)
jle    117d <isValidSeparatorChar+0x7d>
cmpl   $0xf9,-0x8(%rbp)
jl     1189 <isValidSeparatorChar+0x89>
cmpl   $0xff,-0x8(%rbp)
jg     1189 <isValidSeparatorChar+0x89>
movl   $0x0,-0x4(%rbp)
jmp    1190 <isValidSeparatorChar+0x90>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidSeparatorChar>:
movd   %edi,%xmm0
and    $0xffffffdf,%edi
movd   %edi,%xmm1
punpckldq %xmm1,%xmm0
pshufd $0x40,%xmm0,%xmm0
paddd  0xee4(%rip),%xmm0
pxor   0xeec(%rip),%xmm0
movdqa 0xef4(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
movmskps %xmm1,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @isValidSeparatorChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %33, label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
%11 = icmp sge i32 %10, 97
br i1 %11, label %12, label %15
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp sle i32 %13, 122
br i1 %14, label %33, label %15
15: ; preds = %12, %9
%16 = load i32, i32* %3
%17 = icmp sge i32 %16, 192
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %3
%20 = icmp sle i32 %19, 214
br i1 %20, label %33, label %21
21: ; preds = %18, %15
%22 = load i32, i32* %3
%23 = icmp sge i32 %22, 217
br i1 %23, label %24, label %27
24: ; preds = %21
%25 = load i32, i32* %3
%26 = icmp sle i32 %25, 246
br i1 %26, label %33, label %27
27: ; preds = %24, %21
%28 = load i32, i32* %3
%29 = icmp sge i32 %28, 249
br i1 %29, label %30, label %34
30: ; preds = %27
%31 = load i32, i32* %3
%32 = icmp sle i32 %31, 255
br i1 %32, label %33, label %34
33: ; preds = %30, %24, %18, %12, %6
store i32 0, i32* %2
br label %35
34: ; preds = %30, %27
store i32 1, i32* %2
br label %35
35: ; preds = %34, %33
%36 = load i32, i32* %2
ret i32 %36
}

LLVM IR (-O2):
define i32 @isValidSeparatorChar(i32 %0) {
%2 = and i32 %0, -33
%3 = insertelement <4 x i32> poison, i32 %0, i64 0
%4 = insertelement <4 x i32> %3, i32 %2, i64 1
%5 = shufflevector <4 x i32> %4, <4 x i32> poison, <4 x i32> <i32 0, i32 0, i32 0, i32 1>
%6 = add <4 x i32> %5, <i32 -249, i32 -217, i32 -192, i32 -65>
%7 = icmp ult <4 x i32> %6, <i32 7, i32 30, i32 23, i32 26>
%8 = bitcast <4 x i1> %7 to i4
%9 = icmp eq i4 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
int safe(void) {
  extern int q;
  int lp;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @safe() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @safe() {
ret i32 0
}
void EFlash_Delay(unsigned int period) {
  int loop;
  for (loop = 0; loop < period; loop++)
    continue;
}


x86 assembly (clang, -O0):
<EFlash_Delay>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jae    112d <EFlash_Delay+0x2d>
jmp    111f <EFlash_Delay+0x1f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <EFlash_Delay+0xe>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @EFlash_Delay(i32 %0) {
ret void
}
void PWMGenEnable(unsigned long ulBase, unsigned long ulGen) {
  ;
  ;
  (*((volatile unsigned long *)(((ulBase) + (ulGen)) + 0x00000000))) |=
      0x00000001;
}


x86 assembly (clang, -O0):
<PWMGenEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<PWMGenEnable>:
orq    $0x1,(%rsi,%rdi,1)
ret

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

LLVM IR (-O2):
define void @PWMGenEnable(i64 %0, i64 %1) {
%3 = add i64 %1, %0
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
%6 = or i64 %5, 1
store volatile i64 %6, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xee() {
  Assert_real((isprint(238) == 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_isprint.c",
              1195, ("isprint should be 0 for 0xee"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xee>:
push   %rax
mov    $0xee,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ab,%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 = [29 x i8] c"isprint should be 0 for 0xee\00"
define void @t_isprint_0xee() {
%1 = call i64 @isprint(i32 238)
%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 1195, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xee\00"
define void @t_isprint_0xee() {
%1 = tail call i64 @isprint(i32 238)
%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 1195, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
int main() {
  char a = 'Z', b = 'Y', c = 'X';
  printf("%c %c %c\n ", a, b, c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x5a,-0x5(%rbp)
movb   $0x59,-0x6(%rbp)
movb   $0x58,-0x7(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
lea    0xec8(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x7(%rbp),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x5a,%esi
mov    $0x59,%edx
mov    $0x58,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"%c %c %c\0A \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8 signext 90, i8 signext 89, i8 signext 88)
ret i32 0
}
int stringLength(const char *s) {
  int len = 0;
  for (; *s; s++) {
    len++;
  }
  return len;
}


x86 assembly (clang, -O0):
<stringLength>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1136 <stringLength+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <stringLength+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringLength>:
cmpb   $0x0,(%rdi)
je     111c <stringLength+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <stringLength+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @stringLength(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_hashmap_remove() {
  printf("NOT IMPLEMENTED:"
         "pa_hashmap_remove"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"NOT IMPLEMENTED:pa_hashmap_remove\0A\00"
define i32 @pa_hashmap_remove() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_hashmap_remove\00"
define i32 @pa_hashmap_remove() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
double sin(double);
double o_sinc(double x) {
  if (x == 0.)
    return 1.;
  else
    return sin(x) / x;
}


x86 assembly (clang, -O0):
<o_sinc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1147 <o_sinc+0x37>
jp     1147 <o_sinc+0x37>
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    115b <o_sinc+0x4b>
movsd  -0x10(%rbp),%xmm0
call   1030 <sin@plt>
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<o_sinc>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1127 <o_sinc+0x17>
jp     1127 <o_sinc+0x17>
movsd  0xedb(%rip),%xmm0
pop    %rax
ret
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @o_sinc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp oeq double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 1.000000e+00, double* %2
br label %12
7: ; preds = %1
%8 = load double, double* %3
%9 = call double @sin(double %8)
%10 = load double, double* %3
%11 = fdiv double %9, %10
store double %11, double* %2
br label %12
12: ; preds = %7, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @o_sinc(double %0) {
%2 = fcmp oeq double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call double @sin(double %0)
%5 = fdiv double %4, %0
br label %6
6: ; preds = %1, %3
%7 = phi double [ %5, %3 ], [ 1.000000e+00, %1 ]
ret double %7
}
void ff_hevc_put_hevc_qpel_hv4_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_hv4_8_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void freemem(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @freemem(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help09(void) {
  printf("  r                 show all registers\n");
  printf("  r  <reg>          show register <reg>\n");
  printf("  r  <reg> <data>   set register <reg> to <data>\n");
}


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

x86 assembly (clang, -O2):
<help09>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf03(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1f(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [40 x i8] c" r show all registers\0A\00"
@.str.1 = [41 x i8] c" r <reg> show register <reg>\0A\00"
@.str.2 = [50 x i8] c" r <reg> <data> set register <reg> to <data>\0A\00"
define void @help09() {
%1 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c" r show all registers\00"
@str.3 = [40 x i8] c" r <reg> show register <reg>\00"
@str.4 = [49 x i8] c" r <reg> <data> set register <reg> to <data>\00"
define void @help09() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.4, i64 0, i64 0))
ret void
}
int check_weights(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @check_weights() {
ret i32 0
}

LLVM IR (-O2):
define i32 @check_weights() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void get_u24(const unsigned char *buf, uint32_t *up) {
  uint32_t b, u = 0;
  int i;
  for (i = 0; i < 3; i++) {
    b = buf[i];
    u <<= 8;
    u |= b;
  }
  *up = u;
}


x86 assembly (clang, -O0):
<get_u24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1153 <get_u24+0x53>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111a <get_u24+0x1a>
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_u24>:
movzbl (%rdi),%eax
movzbl 0x1(%rdi),%ecx
movzbl 0x2(%rdi),%edx
shl    $0x10,%eax
shl    $0x8,%ecx
or     %eax,%ecx
or     %edx,%ecx
mov    %ecx,(%rsi)
ret

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

LLVM IR (-O2):
define void @get_u24(i8* nocapture %0, i32* nocapture writeonly %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = getelementptr inbounds i8, i8* %0, i64 2
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl nuw nsw i32 %4, 16
%12 = shl nuw nsw i32 %7, 8
%13 = or i32 %11, %12
%14 = or i32 %13, %10
store i32 %14, i32* %1
ret void
}
int Int_mod(int x, int divider) { return x % divider; }


x86 assembly (clang, -O0):
<Int_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_mod>:
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @Int_mod(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 = srem i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @Int_mod(i32 %0, i32 %1) {
%3 = srem i32 %0, %1
ret i32 %3
}
void foo548(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo548(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplAdc12P__HplAdc12__stopConversion();
void Msp430Adc12ImplP__HplAdc12__stopConversion(void) {
  HplAdc12P__HplAdc12__stopConversion();
}


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

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

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

LLVM IR (-O2):
define void @Msp430Adc12ImplP__HplAdc12__stopConversion() {
%1 = tail call i32 (...) @HplAdc12P__HplAdc12__stopConversion()
ret void
}
int jsonsl__digit2int(char ch) {
  int d = ch - '0';
  if ((unsigned)d < 10) {
    return d;
  }
  d = ch - 'a';
  if ((unsigned)d < 6) {
    return d + 10;
  }
  d = ch - 'A';
  if ((unsigned)d < 6) {
    return d + 10;
  }
  return -1;
}


x86 assembly (clang, -O0):
<jsonsl__digit2int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jae    1129 <jsonsl__digit2int+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <jsonsl__digit2int+0x74>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jae    114b <jsonsl__digit2int+0x4b>
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <jsonsl__digit2int+0x74>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x6,-0xc(%rbp)
jae    116d <jsonsl__digit2int+0x6d>
mov    -0xc(%rbp),%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1174 <jsonsl__digit2int+0x74>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonsl__digit2int>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <jsonsl__digit2int+0x27>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <jsonsl__digit2int+0x16>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x41(%rdi),%eax
add    $0xffffffc9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @jsonsl__digit2int(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i8 %0, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 48
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp ult i32 %8, 10
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %4
store i32 %11, i32* %2
br label %31
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 97
store i32 %15, i32* %4
%16 = load i32, i32* %4
%17 = icmp ult i32 %16, 6
br i1 %17, label %18, label %21
18: ; preds = %12
%19 = load i32, i32* %4
%20 = add nsw i32 %19, 10
store i32 %20, i32* %2
br label %31
21: ; preds = %12
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = sub nsw i32 %23, 65
store i32 %24, i32* %4
%25 = load i32, i32* %4
%26 = icmp ult i32 %25, 6
br i1 %26, label %27, label %30
27: ; preds = %21
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 10
store i32 %29, i32* %2
br label %31
30: ; preds = %21
store i32 -1, i32* %2
br label %31
31: ; preds = %30, %27, %18, %10
%32 = load i32, i32* %2
ret i32 %32
}

LLVM IR (-O2):
define i32 @jsonsl__digit2int(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, -48
%4 = icmp ult i32 %3, 10
br i1 %4, label %15, label %5
5: ; preds = %1
%6 = add nsw i32 %2, -97
%7 = icmp ult i32 %6, 6
br i1 %7, label %8, label %10
8: ; preds = %5
%9 = add nsw i32 %2, -87
br label %15
10: ; preds = %5
%11 = add nsw i32 %2, -65
%12 = icmp ult i32 %11, 6
%13 = add nsw i32 %2, -55
%14 = select i1 %12, i32 %13, i32 -1
br label %15
15: ; preds = %10, %1, %8
%16 = phi i32 [ %9, %8 ], [ %3, %1 ], [ %14, %10 ]
ret i32 %16
}
double r8(void *x) { return *(double *)(x + 32760); }


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

x86 assembly (clang, -O2):
<r8>:
movsd  0x7ff8(%rdi),%xmm0
ret

LLVM IR (-O0):
define double @r8(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32760
%5 = bitcast i8* %4 to double*
%6 = load double, double* %5
ret double %6
}

LLVM IR (-O2):
define double @r8(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32760
%3 = bitcast i8* %2 to double*
%4 = load double, double* %3
ret double %4
}
/* Type definitions */
struct hs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct hs *);
int /*<<< orphan*/ hs_destroy(struct hs *);
void hs_free(struct hs *hs) {
  hs_destroy(hs);
  free(hs);
}


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

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

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

LLVM IR (-O2):
%struct.hs = type { i32 }
define void @hs_free(%struct.hs* %0) {
%2 = tail call i32 @hs_destroy(%struct.hs* %0)
%3 = tail call i32 @free(%struct.hs* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_poly1305_from_bytes(uintptr_t, uintptr_t);
void fiat_poly1305_from_bytes(uint64_t out1[3], const uint8_t arg1[17]) {
  internal_fiat_poly1305_from_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_poly1305_from_bytes>:
jmp    1030 <internal_fiat_poly1305_from_bytes@plt>

LLVM IR (-O0):
define void @fiat_poly1305_from_bytes(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 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_poly1305_from_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_poly1305_from_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_poly1305_from_bytes(i64 %3, i64 %4)
ret void
}
int lm_able_gl_sanlock(struct lockspace *ls, int enable) { return -1; }


x86 assembly (clang, -O0):
<lm_able_gl_sanlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.lockspace = type opaque
define i32 @lm_able_gl_sanlock(%struct.lockspace* nocapture readnone %0, i32 %1) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void gotoxy(int x, int y) { printf("\033[%d;%dH", x, y); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(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 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
define void @gotoxy(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int longestPalSubstr(char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char str[] = "aabbcc";
  printf("\nLength is: %d\n", longestPalSubstr(str));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xebd(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0xb(%rbp),%rdi
call   1040 <longestPalSubstr@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x636362,0x3(%rsp)
movl   $0x62626161,(%rsp)
mov    %rsp,%rdi
call   1040 <longestPalSubstr@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.str = [7 x i8] c"aabbcc\00"
@.str = [16 x i8] c"\0ALength is: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8]
store i32 0, i32* %1
%3 = bitcast [7 x i8]* %2 to i8*
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%5 = call i32 @longestPalSubstr(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [7 x i8] c"aabbcc\00"
@.str = [16 x i8] c"\0ALength is: %d\0A\00"
define i32 @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = call i32 @longestPalSubstr(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/);
int CED_StartSelfTest(int fh) { return ioctl(fh, _IO(0xce, 31)); }


x86 assembly (clang, -O0):
<CED_StartSelfTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xce,%edi
mov    $0x1f,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CED_StartSelfTest>:
push   %rbx
mov    %edi,%ebx
mov    $0xce,%edi
mov    $0x1f,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @CED_StartSelfTest(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 206, i32 31)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @CED_StartSelfTest(i32 %0) {
%2 = tail call i32 @_IO(i32 206, i32 31)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ atoi(char *);
int ccc_func(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("result: %d\n", ccc_func(atoi(argv[1]), atoi(argv[2])));
  return EXIT_SUCCESS;
}


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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1050 <atoi@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <ccc_func@plt>
mov    %eax,%esi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebp
mov    0x10(%rbx),%rdi
call   1050 <atoi@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <ccc_func@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"result: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @atoi(i8* %8)
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 2
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
%14 = call i32 @ccc_func(i32 %9, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
}

LLVM IR (-O2):
@.str = [12 x i8] c"result: %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i32 @atoi(i8* %7)
%9 = tail call i32 @ccc_func(i32 %5, i32 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
/* Type definitions */
typedef int int32_t;
typedef scalar_t__ int16_t;

/* Variables and functions */
int32_t GSM_MULT_R(int16_t a, int16_t b) {
  return (((int32_t)(a)) * ((int32_t)(b)) + 16384) >> 15;
}


x86 assembly (clang, -O0):
<GSM_MULT_R>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
imul   %ecx,%eax
add    $0x4000,%eax
sar    $0xf,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GSM_MULT_R>:
imul   %edi,%esi
lea    0x4000(%rsi),%eax
sar    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @GSM_MULT_R(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = mul nsw i32 %6, %8
%10 = add nsw i32 %9, 16384
%11 = ashr i32 %10, 15
ret i32 %11
}

LLVM IR (-O2):
define i32 @GSM_MULT_R(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = mul nsw i32 %4, %3
%6 = add nsw i32 %5, 16384
%7 = ashr i32 %6, 15
ret i32 %7
}