xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ SET_TDO();
void bit_in(uint8_t byte, int length, char *in) {
  for (length; length > 0; length--) {
    if (SET_TDO())
      in[0] |= 1;
    in[0] = in[0] << 1;
  }
}


x86 assembly (clang, -O0):
<bit_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1169 <bit_in+0x59>
mov    $0x0,%al
call   1030 <SET_TDO@plt>
cmp    $0x0,%rax
je     1149 <bit_in+0x39>
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
or     $0x1,%ecx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
shl    $0x1,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <bit_in+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_in>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    113b <bit_in+0x2b>
mov    %rdx,%rbx
mov    %esi,%ebp
add    $0x1,%ebp
nop
xor    %eax,%eax
call   1030 <SET_TDO@plt>
test   %rax,%rax
setne  %al
or     (%rbx),%al
add    %al,%al
mov    %al,(%rbx)
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
jg     1120 <bit_in+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @bit_in(i32 %0, i32 %1, i8* nocapture %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3, %5
%6 = phi i32 [ %13, %5 ], [ %1, %3 ]
%7 = tail call i64 (...) @SET_TDO()
%8 = icmp ne i64 %7, 0
%9 = load i8, i8* %2
%10 = zext i1 %8 to i8
%11 = or i8 %9, %10
%12 = shl i8 %11, 1
store i8 %12, i8* %2
%13 = add nsw i32 %6, -1
%14 = icmp sgt i32 %6, 1
br i1 %14, label %5, label %15
15: ; preds = %5, %3
ret void
}
double light_no_falloff(void *vli, struct anon$0 *L) { return 1.000000; }


x86 assembly (clang, -O0):
<light_no_falloff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  0xeec(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<light_no_falloff>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
%"struct.anon$0" = type opaque
define double @light_no_falloff(i8* %0, %"struct.anon$0"* %1) {
%3 = alloca i8*
%4 = alloca %"struct.anon$0"*
store i8* %0, i8** %3
store %"struct.anon$0"* %1, %"struct.anon$0"** %4
ret double 1.000000e+00
}

LLVM IR (-O2):
%"struct.anon$0" = type opaque
define double @light_no_falloff(i8* nocapture readnone %0, %"struct.anon$0"* nocapture readnone %1) {
ret double 1.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int CountCheck(unsigned char *, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  unsigned char data[] = {0x1b, 0x2c, 0xfb, 0x5f, 0x6c};
  printf("%02X\n", CountCheck(data, sizeof(data)));
  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,-0x9(%rbp)
mov    0xec6(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0x9(%rbp),%rdi
mov    $0x5,%esi
call   1040 <CountCheck@plt>
mov    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movb   $0x6c,0x4(%rsp)
movl   $0x5ffb2c1b,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <CountCheck@plt>
lea    0xec4(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.data = [5 x i8] c"\1B,\FB_l"
@.str = [6 x i8] c"%02X\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8]
store i32 0, i32* %1
%3 = bitcast [5 x i8]* %2 to i8*
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @CountCheck(i8* %4, i32 5)
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.data = [5 x i8] c"\1B,\FB_l"
@.str = [6 x i8] c"%02X\0A\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%3 = call i32 @CountCheck(i8* %2, i32 5)
%4 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage(int argc, char *argv[]) {
  if (argc != 2) {
    printf("Usage: %s </dev/videoX>\n", argv[0]);
    exit(0);
  }
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x4(%rbp)
je     1153 <usage+0x33>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
cmp    $0x2,%edi
jne    1126 <usage+0x6>
ret
push   %rax
mov    (%rsi),%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s </dev/videoX>\0A\00"
define void @usage(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = icmp ne i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %2
%8 = load i8**, i8*** %4
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s </dev/videoX>\0A\00"
define void @usage(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2
ret void
}
/* Type definitions */
struct work_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
bool schedule_work_on(int cpu, struct work_struct *work) {
  assert(0);
  return true;
}


x86 assembly (clang, -O0):
<schedule_work_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.work_struct = type { i32 }
define i32 @schedule_work_on(i32 %0, %struct.work_struct* %1) {
%3 = alloca i32
%4 = alloca %struct.work_struct*
store i32 %0, i32* %3
store %struct.work_struct* %1, %struct.work_struct** %4
%5 = call i32 @assert(i32 0)
ret i32 1
}

LLVM IR (-O2):
%struct.work_struct = type { i32 }
define i32 @schedule_work_on(i32 %0, %struct.work_struct* nocapture readnone %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 1
}
void screen_init_hook(void) {}


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

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

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

LLVM IR (-O2):
define void @screen_init_hook() {
ret void
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ putchar(int);
int main() {
  int c = getchar();
  if (c >= 'A' && c <= 'Z') {
    c += 32;
  } else if (c >= 'a' && c <= 'z') {
    c -= 32;
  }
  putchar(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     115b <main+0x3b>
cmpl   $0x5a,-0x8(%rbp)
jg     115b <main+0x3b>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    117d <main+0x5d>
cmpl   $0x61,-0x8(%rbp)
jl     1178 <main+0x58>
cmpl   $0x7a,-0x8(%rbp)
jg     1178 <main+0x58>
mov    -0x8(%rbp),%eax
sub    $0x20,%eax
mov    %eax,-0x8(%rbp)
jmp    117d <main+0x5d>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
lea    -0x41(%rax),%ecx
cmp    $0x19,%ecx
ja     1135 <main+0x15>
add    $0x20,%eax
jmp    1143 <main+0x23>
lea    -0x61(%rax),%ecx
lea    -0x20(%rax),%edx
cmp    $0x1a,%ecx
cmovae %eax,%edx
mov    %edx,%eax
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @getchar()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %12
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %22
12: ; preds = %6, %0
%13 = load i32, i32* %2
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %21
15: ; preds = %12
%16 = load i32, i32* %2
%17 = icmp sle i32 %16, 122
br i1 %17, label %18, label %21
18: ; preds = %15
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 32
store i32 %20, i32* %2
br label %21
21: ; preds = %18, %15, %12
br label %22
22: ; preds = %21, %9
%23 = load i32, i32* %2
%24 = call i32 @putchar(i32 %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = add i32 %1, -65
%3 = icmp ult i32 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = add nuw nsw i32 %1, 32
br label %11
6: ; preds = %0
%7 = add i32 %1, -97
%8 = icmp ult i32 %7, 26
%9 = add nsw i32 %1, -32
%10 = select i1 %8, i32 %9, i32 %1
br label %11
11: ; preds = %6, %4
%12 = phi i32 [ %5, %4 ], [ %10, %6 ]
%13 = tail call i32 @putchar(i32 %12)
ret i32 0
}
void JvRunMain() {}


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

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

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

LLVM IR (-O2):
define void @JvRunMain() {
ret void
}
int hputi4(hstring, keyword, ival)
char *hstring;
const char *keyword;
int ival;
{
  char value[30];
  sprintf(value, "%d", ival);
  return (hputc(hstring, keyword, value));
}


x86 assembly (clang, -O0):
<hputi4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xebf(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x40(%rbp),%rdx
mov    $0x0,%al
call   1030 <hputc@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hputi4>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xeca(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
xor    %eax,%eax
call   1030 <hputc@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @hputi4(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [30 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%9 = load i32, i32* %6
%10 = call i32 (i8*, i8*, ...) @sprintf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = getelementptr inbounds [30 x i8], [30 x i8]* %7, i64 0, i64 0
%14 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @hputc to i32 (i8*, i8*, i8*, ...)*)(i8* %11, i8* %12, i8* %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @hputi4(i8* %0, i8* %1, i32 %2) {
%4 = alloca [30 x i8]
%5 = getelementptr inbounds [30 x i8], [30 x i8]* %4, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
%7 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @hputc to i32 (i8*, i8*, i8*, ...)*)(i8* %0, i8* %1, i8* %5)
ret i32 %7
}
/* Variables and functions */
scalar_t__ isalnum(char);
int whiteonly(char *s) {
  while (*s) {
    if (isalnum(*s))
      return 0;
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<whiteonly>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115c <whiteonly+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     114b <whiteonly+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1163 <whiteonly+0x53>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <whiteonly+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whiteonly>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114c <whiteonly+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isalnum@plt>
test   %rax,%rax
jne    114a <whiteonly+0x3a>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <whiteonly+0x20>
jmp    114c <whiteonly+0x3c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @whiteonly(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i64 @isalnum(i8 signext %8)
%11 = icmp eq i64 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %4, label %13
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
int CClinkern_flipper_reset(int ncount) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @CClinkern_flipper_reset(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isalpha(int);
void t_isalpha_0x61() {
  Assert_real((isalpha(97)),
              "/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_isalpha.c",
              490, ("isalpha should be 1 for a"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x61>:
push   %rax
mov    $0x61,%edi
call   1030 <isalpha@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x1ea,%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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for a\00"
define void @t_isalpha_0x61() {
%1 = call i32 @isalpha(i32 97)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 490, 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_isalpha.c\00"
@.str.1 = [26 x i8] c"isalpha should be 1 for a\00"
define void @t_isalpha_0x61() {
%1 = tail call i32 @isalpha(i32 97)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 490, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo_2_1_2_2_2_2_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_2_2_2_2_2_2_2() {
ret void
}
/* Variables and functions */
int cfg_processor_get_hex_int_attr(void *, char *);
int cfg_io_get_gpio_int_addr(void *port) {
  return cfg_processor_get_hex_int_attr(port, "intaddr");
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"intaddr\00"
define i32 @cfg_io_get_gpio_int_addr(i8* %0) {
%2 = tail call i32 @cfg_processor_get_hex_int_attr(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
long long _mpy32us(unsigned int src1, int src2) {
  return ((int)src1) * ((long long)src2);
}


x86 assembly (clang, -O0):
<_mpy32us>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x4(%rbp),%rax
movslq -0x8(%rbp),%rcx
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_mpy32us>:
movslq %edi,%rcx
movslq %esi,%rax
imul   %rcx,%rax
ret

LLVM IR (-O0):
define i64 @_mpy32us(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 = sext i32 %5 to i64
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = mul nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @_mpy32us(i32 %0, i32 %1) {
%3 = sext i32 %0 to i64
%4 = sext i32 %1 to i64
%5 = mul nsw i64 %4, %3
ret i64 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ foo(int, int, int /*<<< orphan*/);
int main(void) {
  if (foo(3, 2, 0) != 0)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x3,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1040 <foo@plt>
cmp    $0x0,%rax
je     1151 <main+0x31>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1040 <foo@plt>
test   %rax,%rax
jne    113b <main+0x1b>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @foo(i32 3, i32 2, i32 0)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @foo(i32 3, i32 2, i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
void fdi_init() {}


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

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

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

LLVM IR (-O2):
define void @fdi_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Report(char *);
int astGMark(int n, const float *x, const float *y, int type) {
  Report("astGMark");
  return 0;
}


x86 assembly (clang, -O0):
<astGMark>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
lea    0xed3(%rip),%rdi
call   1030 <Report@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astGMark>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <Report@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"astGMark\00"
define i32 @astGMark(i32 %0, float* %1, float* %2, i32 %3) {
%5 = alloca i32
%6 = alloca float*
%7 = alloca float*
%8 = alloca i32
store i32 %0, i32* %5
store float* %1, float** %6
store float* %2, float** %7
store i32 %3, i32* %8
%9 = call i32 @Report(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"astGMark\00"
define i32 @astGMark(i32 %0, float* nocapture readnone %1, float* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @Report(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x99() {
  Assert_real((isalpha(153) == 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_isalpha.c",
              770, ("isalpha should be 0 for 0x99"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0x99>:
push   %rax
mov    $0x99,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x302,%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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x99\00"
define void @t_isalpha_0x99() {
%1 = call i64 @isalpha(i32 153)
%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 770, 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_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x99\00"
define void @t_isalpha_0x99() {
%1 = tail call i64 @isalpha(i32 153)
%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 770, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void driver_usr2() { printf("stop the bus!\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"stop the bus!\0A\00"
define void @driver_usr2() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"stop the bus!\00"
define void @driver_usr2() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct userinfo {
  int dummy;
};
struct instance_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ IRC_SendMessage(struct instance_data *, char *, char *);
void CMD_say(struct instance_data *pID, struct userinfo *pUI, char *szChannel,
             unsigned int iArgc, char **ppArgs, char *szArgsRaw) {
  if (iArgc)
    IRC_SendMessage(pID, szChannel, szArgsRaw);
}


x86 assembly (clang, -O0):
<CMD_say>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     114a <CMD_say+0x3a>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <IRC_SendMessage@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMD_say>:
test   %ecx,%ecx
je     111f <CMD_say+0xf>
mov    %rdx,%rsi
mov    %r9,%rdx
jmp    1030 <IRC_SendMessage@plt>
ret

LLVM IR (-O0):
%struct.instance_data = type { i32 }
%struct.userinfo = type { i32 }
define void @CMD_say(%struct.instance_data* %0, %struct.userinfo* %1, i8* %2, i32 %3, i8** %4, i8* %5) {
%7 = alloca %struct.instance_data*
%8 = alloca %struct.userinfo*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8**
%12 = alloca i8*
store %struct.instance_data* %0, %struct.instance_data** %7
store %struct.userinfo* %1, %struct.userinfo** %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i8** %4, i8*** %11
store i8* %5, i8** %12
%13 = load i32, i32* %10
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %6
%16 = load %struct.instance_data*, %struct.instance_data** %7
%17 = load i8*, i8** %9
%18 = load i8*, i8** %12
%19 = call i32 @IRC_SendMessage(%struct.instance_data* %16, i8* %17, i8* %18)
br label %20
20: ; preds = %15, %6
ret void
}

LLVM IR (-O2):
%struct.instance_data = type { i32 }
%struct.userinfo = type { i32 }
define void @CMD_say(%struct.instance_data* %0, %struct.userinfo* nocapture readnone %1, i8* %2, i32 %3, i8** nocapture readnone %4, i8* %5) {
%7 = icmp eq i32 %3, 0
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @IRC_SendMessage(%struct.instance_data* %0, i8* %2, i8* %5)
br label %10
10: ; preds = %8, %6
ret void
}
/* Type definitions */
struct bi_tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ bi_tree_create_impl(struct bi_tree *, int *, size_t);
struct bi_tree *bi_tree_init(size_t);
struct bi_tree *bi_tree_create(int arr[], size_t n) {
  struct bi_tree *bi = bi_tree_init(n);
  if (bi)
    bi_tree_create_impl(bi, arr, n);
  return bi;
}


x86 assembly (clang, -O0):
<bi_tree_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <bi_tree_init@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1159 <bi_tree_create+0x39>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <bi_tree_create_impl@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_tree_create>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
call   1040 <bi_tree_init@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1149 <bi_tree_create+0x29>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <bi_tree_create_impl@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.bi_tree = type { i32 }
define %struct.bi_tree* @bi_tree_create(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca %struct.bi_tree*
store i32* %0, i32** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call %struct.bi_tree* @bi_tree_init(i64 %6)
store %struct.bi_tree* %7, %struct.bi_tree** %5
%8 = load %struct.bi_tree*, %struct.bi_tree** %5
%9 = icmp ne %struct.bi_tree* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load %struct.bi_tree*, %struct.bi_tree** %5
%12 = load i32*, i32** %3
%13 = load i64, i64* %4
%14 = call i32 @bi_tree_create_impl(%struct.bi_tree* %11, i32* %12, i64 %13)
br label %15
15: ; preds = %10, %2
%16 = load %struct.bi_tree*, %struct.bi_tree** %5
ret %struct.bi_tree* %16
}

LLVM IR (-O2):
%struct.bi_tree = type { i32 }
define %struct.bi_tree* @bi_tree_create(i32* %0, i64 %1) {
%3 = tail call %struct.bi_tree* @bi_tree_init(i64 %1)
%4 = icmp eq %struct.bi_tree* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @bi_tree_create_impl(%struct.bi_tree* %3, i32* %0, i64 %1)
br label %7
7: ; preds = %5, %2
ret %struct.bi_tree* %3
}
void mls_type_data_uint_to_bytearray(unsigned char *outb, unsigned int inb) {
  outb[0] = (unsigned char)((inb >> 24) & (unsigned char)0xff);
  outb[1] = (unsigned char)((inb >> 16) & (unsigned char)0xff);
  outb[2] = (unsigned char)((inb >> 8) & (unsigned char)0xff);
  outb[3] = (unsigned char)((inb) & (unsigned char)0xff);
}


x86 assembly (clang, -O0):
<mls_type_data_uint_to_bytearray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @mls_type_data_uint_to_bytearray(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = lshr i32 %1, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %1, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %1 to i8
%12 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %11, i8* %12
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int /*<<< orphan*/ plotz(char *);
scalar_t__ pthread_sigmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/ *);
scalar_t__ sigfillset(int /*<<< orphan*/ *);
void disable() {
  sigset_t blocked;
  if (sigfillset(&blocked))
    plotz("disable sigfillset");
  if (pthread_sigmask(SIG_SETMASK, &blocked, NULL))
    plotz("disable sigmask");
}


x86 assembly (clang, -O0):
<disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigfillset@plt>
cmp    $0x0,%rax
je     1157 <disable+0x27>
lea    0xeae(%rip),%rdi
call   1030 <plotz@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1050 <pthread_sigmask@plt>
cmp    $0x0,%rax
je     1183 <disable+0x53>
lea    0xe95(%rip),%rdi
call   1030 <plotz@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <sigfillset@plt>
test   %rax,%rax
je     114c <disable+0x1c>
lea    0xeb9(%rip),%rdi
call   1030 <plotz@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
xor    %edx,%edx
call   1050 <pthread_sigmask@plt>
test   %rax,%rax
je     1172 <disable+0x42>
lea    0xea6(%rip),%rdi
call   1030 <plotz@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"disable sigfillset\00"
@SIG_SETMASK = global i32 0
@.str.1 = [16 x i8] c"disable sigmask\00"
define void @disable() {
%1 = alloca i32
%2 = call i64 @sigfillset(i32* %1)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @plotz(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* @SIG_SETMASK
%8 = call i64 @pthread_sigmask(i32 %7, i32* %1, i32* null)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %6
%11 = call i32 @plotz(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %12
12: ; preds = %10, %6
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"disable sigfillset\00"
@SIG_SETMASK = global i32 0
@.str.1 = [16 x i8] c"disable sigmask\00"
define void @disable() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @sigfillset(i32* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @plotz(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %0
%8 = load i32, i32* @SIG_SETMASK
%9 = call i64 @pthread_sigmask(i32 %8, i32* %1, i32* null)
%10 = icmp eq i64 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %7
%12 = call i32 @plotz(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %11, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ acc_device_nvidia;
int /*<<< orphan*/ acc_shutdown(int /*<<< orphan*/);
int acc_func() {
  int i;
#pragma acc parallel loop
  for (i = 0; i < 100; i++) {
    int j;
    j = i;
  }
  acc_shutdown(acc_device_nvidia);
  return 0;
}


x86 assembly (clang, -O0):
<acc_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jge    113d <acc_func+0x2d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <acc_func+0xf>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1030 <acc_shutdown@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@acc_device_nvidia = global i32 0
define i32 @acc_func() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
br label %8
8: ; preds = %6
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %3
11: ; preds = %3
%12 = load i32, i32* @acc_device_nvidia
%13 = call i32 @acc_shutdown(i32 %12)
ret i32 0
}

LLVM IR (-O2):
@acc_device_nvidia = global i32 0
define i32 @acc_func() {
%1 = load i32, i32* @acc_device_nvidia
%2 = tail call i32 @acc_shutdown(i32 %1)
ret i32 0
}
void __attribute__((weak)) thread_entry(int cid, int nc) {
  while (cid != 0)
    ;
}


x86 assembly (clang, -O0):
<thread_entry>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1119 <thread_entry+0x19>
jmp    110a <thread_entry+0xa>
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_entry>:
test   %edi,%edi
je     1112 <thread_entry+0x12>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
jmp    1110 <thread_entry+0x10>
ret

LLVM IR (-O0):
define weak void @thread_entry(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %5
5: ; preds = %8, %2
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %5
br label %5
9: ; preds = %5
ret void
}

LLVM IR (-O2):
define weak void @thread_entry(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %5, label %4
4: ; preds = %2, %4
br label %4
5: ; preds = %2
ret void
}
/* Variables and functions */
int ints_argextreme(int *, int, int /*<<< orphan*/);
int ints_argmax(int *ints, int size) { return ints_argextreme(ints, size, 0); }


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

x86 assembly (clang, -O2):
<ints_argmax>:
xor    %edx,%edx
jmp    1030 <ints_argextreme@plt>

LLVM IR (-O0):
define i32 @ints_argmax(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 @ints_argextreme(i32* %5, i32 %6, i32 0)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ints_argmax(i32* %0, i32 %1) {
%3 = tail call i32 @ints_argextreme(i32* %0, i32 %1, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ MD5toa(char *, char *);
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ toMD5X(char const *, int /*<<< orphan*/, char *);
void toMD5(const char *str, char md5[]) {
  char digest[16];
  toMD5X(str, strlen(str), digest);
  MD5toa(digest, md5);
}


x86 assembly (clang, -O0):
<toMD5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
lea    -0x20(%rbp),%rdx
call   1040 <toMD5X@plt>
lea    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <MD5toa@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toMD5>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r15,%rdx
call   1040 <toMD5X@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <MD5toa@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @toMD5(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [16 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%10 = call i32 @toMD5X(i8* %6, i32 %8, i8* %9)
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%12 = load i8*, i8** %4
%13 = call i32 @MD5toa(i8* %11, i8* %12)
ret void
}

LLVM IR (-O2):
define void @toMD5(i8* %0, i8* %1) {
%3 = alloca [16 x i8]
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @strlen(i8* %0)
%6 = call i32 @toMD5X(i8* %0, i32 %5, i8* %4)
%7 = call i32 @MD5toa(i8* %4, i8* %1)
ret void
}
/* Type definitions */
typedef int uint64_t;
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
void timespecns(struct timespec *t, uint64_t ns) {
  t->tv_sec = ((ns) / 1000000000);
  t->tv_nsec = ns % 1000000000;
}


x86 assembly (clang, -O0):
<timespecns>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
mov    $0x3b9aca00,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    %edx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespecns>:
movslq %esi,%rax
imul   $0x44b82fa1,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x3c,%rcx
add    %edx,%ecx
mov    %ecx,(%rdi)
imul   $0x3b9aca00,%ecx,%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @timespecns(%struct.timespec* %0, i32 %1) {
%3 = alloca %struct.timespec*
%4 = alloca i32
store %struct.timespec* %0, %struct.timespec** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = sdiv i32 %5, 1000000000
%7 = load %struct.timespec*, %struct.timespec** %3
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = srem i32 %9, 1000000000
%11 = load %struct.timespec*, %struct.timespec** %3
%12 = getelementptr inbounds %struct.timespec, %struct.timespec* %11, i32 0, i32 1
store i32 %10, i32* %12
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @timespecns(%struct.timespec* nocapture writeonly %0, i32 %1) {
%3 = sdiv i32 %1, 1000000000
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 0
store i32 %3, i32* %4
%5 = srem i32 %1, 1000000000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %0, i64 0, i32 1
store i32 %5, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_string(char *);
char *l_askNbytes(int /*<<< orphan*/, char *, int /*<<< orphan*/, int);
char *macjobhits(char *arg) { return l_askNbytes(get_string(arg), "5b", 0, 6); }


x86 assembly (clang, -O0):
<macjobhits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_string@plt>
mov    %eax,%edi
lea    0xec2(%rip),%rsi
xor    %edx,%edx
mov    $0x6,%ecx
call   1030 <l_askNbytes@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macjobhits>:
push   %rax
call   1040 <get_string@plt>
lea    0xed3(%rip),%rsi
mov    %eax,%edi
xor    %edx,%edx
mov    $0x6,%ecx
pop    %rax
jmp    1030 <l_askNbytes@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"5b\00"
define i8* @macjobhits(i8* %0) {
%2 = tail call i32 @get_string(i8* %0)
%3 = tail call i8* @l_askNbytes(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0, i32 6)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ Drive_RestoreConfig();
void Drive_Wakeup(void) { Drive_RestoreConfig(); }


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

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

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

LLVM IR (-O2):
define void @Drive_Wakeup() {
%1 = tail call i32 (...) @Drive_RestoreConfig()
ret void
}
/* Variables and functions */
int INT32_MIN;
void r_set_na_int_(int *val) { *val = INT32_MIN; }


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

x86 assembly (clang, -O2):
<r_set_na_int_>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
@INT32_MIN = global i32 0
define void @r_set_na_int_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @INT32_MIN
%4 = load i32*, i32** %2
store i32 %3, i32* %4
ret void
}

LLVM IR (-O2):
@INT32_MIN = global i32 0
define void @r_set_na_int_(i32* nocapture writeonly %0) {
%2 = load i32, i32* @INT32_MIN
store i32 %2, i32* %0
ret void
}
int main(int argc, char *argv[], char *envp[]) {
  int local0;
  int o1;
  o1 = *(argv + 4);
  proc1(argc, o1, local0);
  printf("%d\n", argc);
  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    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    $0x0,%al
call   1040 <proc1@plt>
mov    -0x8(%rbp),%esi
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
mov    0x20(%rsi),%esi
xor    %eax,%eax
call   1040 <proc1@plt>
lea    0xecc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1, i8** nocapture readnone %2) {
%4 = getelementptr inbounds i8*, i8** %1, i64 4
%5 = load i8*, i8** %4
%6 = ptrtoint i8* %5 to i64
%7 = trunc i64 %6 to i32
%8 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @proc1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %7, i32 undef)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 0
}