xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t comm_printer_read(unsigned char *, int);
int comm_printer_getc(void) {
  unsigned char c[1];
  size_t length;
  unsigned long result = 0;
  length = comm_printer_read(c, 1);
  result = c[0];
  if (length == 1)
    return (result);
  else
    return (-1);
}


x86 assembly (clang, -O0):
<comm_printer_getc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x18(%rbp)
lea    -0x5(%rbp),%rdi
mov    $0x1,%esi
call   1030 <comm_printer_read@plt>
mov    %rax,-0x10(%rbp)
movzbl -0x5(%rbp),%eax
mov    %rax,-0x18(%rbp)
cmpq   $0x1,-0x10(%rbp)
jne    1151 <comm_printer_getc+0x41>
mov    -0x18(%rbp),%rax
mov    %eax,-0x4(%rbp)
jmp    1158 <comm_printer_getc+0x48>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comm_printer_getc>:
push   %rax
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <comm_printer_read@plt>
cmp    $0x1,%rax
movzbl 0x7(%rsp),%ecx
mov    $0xffffffff,%eax
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @comm_printer_getc() {
%1 = alloca [1 x i8]
%2 = getelementptr inbounds [1 x i8], [1 x i8]* %1, i64 0, i64 0
%3 = call i64 @comm_printer_read(i8* %2, i32 1)
%4 = icmp eq i64 %3, 1
%5 = load i8, i8* %2
%6 = zext i8 %5 to i32
%7 = select i1 %4, i32 %6, i32 -1
ret i32 %7
}
/* Type definitions */
typedef char uint8_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, const char *argv[]) {
  uint8_t a;
  int32_t c;
  bool b;
  a = 'A';
  char *d;
  d = malloc(sizeof(char));
  d[0] = a;
  printf("%s\n", d);
  free(d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x41,-0x11(%rbp)
mov    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    -0x11(%rbp),%cl
mov    -0x28(%rbp),%rax
mov    %cl,(%rax)
mov    -0x28(%rbp),%rsi
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movb   $0x41,(%rax)
lea    0xeb8(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
store i8 65, i8* %3
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
ret i32 0
}
int reg_isnewline(int c) {
  return c == 0xA || c == 0xD || c == 0x2028 || c == 0x2029;
}


x86 assembly (clang, -O0):
<reg_isnewline>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1144 <reg_isnewline+0x44>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1144 <reg_isnewline+0x44>
mov    $0x1,%al
cmpl   $0x2028,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1144 <reg_isnewline+0x44>
cmpl   $0x2029,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_isnewline>:
mov    $0x1,%eax
cmp    $0xa,%edi
je     1122 <reg_isnewline+0x22>
cmp    $0xd,%edi
je     1122 <reg_isnewline+0x22>
cmp    $0x2028,%edi
je     1122 <reg_isnewline+0x22>
xor    %eax,%eax
cmp    $0x2029,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @reg_isnewline(i32 %0) {
switch i32 %0, label %2 [
i32 8232, label %5
i32 13, label %5
i32 10, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 8233
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ G_refAllReady_cmd(void *);
void Svcmd_StartMatch_f(void) { G_refAllReady_cmd(((void *)0)); }


x86 assembly (clang, -O0):
<Svcmd_StartMatch_f>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <G_refAllReady_cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Svcmd_StartMatch_f>:
xor    %edi,%edi
jmp    1030 <G_refAllReady_cmd@plt>

LLVM IR (-O0):
define void @Svcmd_StartMatch_f() {
%1 = call i32 @G_refAllReady_cmd(i8* null)
ret void
}

LLVM IR (-O2):
define void @Svcmd_StartMatch_f() {
%1 = tail call i32 @G_refAllReady_cmd(i8* null)
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ system(char *);
void gcc(char *name) {
  char *gcc = malloc(strlen("gcc temp.c -o ") + strlen(name));
  sprintf(gcc, "gcc temp.c -o %s", name);
  system(gcc);
}


x86 assembly (clang, -O0):
<gcc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe8b(%rip),%rsi
call   1060 <sprintf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <system@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0xe(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea1(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1060 <sprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <system@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"gcc temp.c -o \00"
@.str.1 = [17 x i8] c"gcc temp.c -o %s\00"
define void @gcc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i64 @strlen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %4, %6
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = load i8*, i8** %3
%13 = call i32 @system(i8* %12)
ret void
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"gcc temp.c -o %s\00"
define void @gcc(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 14
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%6 = tail call i32 @system(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ prints(char *);
void mdebug_start() { prints("[start]\n"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"[start]\0A\00"
define void @mdebug_start() {
%1 = call i32 @prints(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"[start]\0A\00"
define void @mdebug_start() {
%1 = tail call i32 @prints(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
void soru_9(const char s[], char tersten[]) {}


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

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

LLVM IR (-O0):
define void @soru_9(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @soru_9(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, double);
void tofile(int id, double length, FILE *less, FILE *more) {
  if (length > 4000)
    fprintf(more, "Path Id: %d\t\t Total Distance: %.4f\n", id, length);
  else
    fprintf(less, "Path Id: %d\t\t Total Distance: %.4f\n", id, length);
  return;
}


x86 assembly (clang, -O0):
<tofile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xecb(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    115c <tofile+0x4c>
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
jmp    1174 <tofile+0x64>
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
movsd  -0x10(%rbp),%xmm0
lea    0xe99(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tofile>:
mov    %rsi,%rcx
mov    %edi,%eax
ucomisd 0xee3(%rip),%xmm0
cmova  %rdx,%rcx
lea    0xee0(%rip),%rsi
mov    %rcx,%rdi
mov    %eax,%edx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"Path Id: %d\09\09 Total Distance: %.4f\0A\00"
define void @tofile(i32 %0, double %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store double %1, double* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load double, double* %6
%10 = fcmp ogt double %9, 4.000000e+03
br i1 %10, label %11, label %16
11: ; preds = %4
%12 = load i32*, i32** %8
%13 = load i32, i32* %5
%14 = load double, double* %6
%15 = call i32 @fprintf(i32* %12, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %13, double %14)
br label %21
16: ; preds = %4
%17 = load i32*, i32** %7
%18 = load i32, i32* %5
%19 = load double, double* %6
%20 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %18, double %19)
br label %21
21: ; preds = %16, %11
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Path Id: %d\09\09 Total Distance: %.4f\0A\00"
define void @tofile(i32 %0, double %1, i32* nocapture %2, i32* nocapture %3) {
%5 = fcmp ogt double %1, 4.000000e+03
%6 = select i1 %5, i32* %3, i32* %2
%7 = tail call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %0, double %1)
ret void
}
/* Type definitions */
struct joindata {
  int dummy;
};

/* Variables and functions */
char *join2(struct joindata *, char const *, int /*<<< orphan*/,
            int /*<<< orphan*/);
char *join_dup(struct joindata *jd, const char *s) {
  return s ? join2(jd, s, 0, 0) : 0;
}


x86 assembly (clang, -O0):
<join_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1145 <join_dup+0x35>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <join2@plt>
mov    %rax,-0x18(%rbp)
jmp    1150 <join_dup+0x40>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1150 <join_dup+0x40>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<join_dup>:
test   %rsi,%rsi
je     111e <join_dup+0xe>
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <join2@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.joindata = type { i32 }
define i8* @join_dup(%struct.joindata* %0, i8* %1) {
%3 = alloca %struct.joindata*
%4 = alloca i8*
store %struct.joindata* %0, %struct.joindata** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load %struct.joindata*, %struct.joindata** %3
%9 = load i8*, i8** %4
%10 = call i8* @join2(%struct.joindata* %8, i8* %9, i32 0, i32 0)
br label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %7
%13 = phi i8* [ %10, %7 ], [ null, %11 ]
ret i8* %13
}

LLVM IR (-O2):
%struct.joindata = type { i32 }
define i8* @join_dup(%struct.joindata* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i8* @join2(%struct.joindata* %0, i8* %1, i32 0, i32 0)
br label %6
6: ; preds = %2, %4
%7 = phi i8* [ %5, %4 ], [ null, %2 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ isatty(int /*<<< orphan*/);
int /*<<< orphan*/ write(int /*<<< orphan*/, int *, int);
int ft_putrchar(int c) {
  write(isatty(STDOUT_FILENO), &c, 1);
  return (c);
}


x86 assembly (clang, -O0):
<ft_putrchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <isatty@plt>
mov    %eax,%edi
lea    -0x4(%rbp),%rsi
mov    $0x1,%edx
call   1040 <write@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putrchar>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %edi,0xc(%rsp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <isatty@plt>
lea    0xc(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define i32 @ft_putrchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @isatty(i32 %3)
%5 = call i32 @write(i32 %4, i32* %2, i32 1)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define i32 @ft_putrchar(i32 returned %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @isatty(i32 %3)
%5 = call i32 @write(i32 %4, i32* %2, i32 1)
ret i32 %0
}
void test_CALL() {}


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

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

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

LLVM IR (-O2):
define void @test_CALL() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ IDEA_keyset(unsigned char *);
char *IDEAencrypt(unsigned char *, unsigned int);
char *IDEA_encrypt(unsigned char *input, unsigned char *key, unsigned size) {
  IDEA_keyset(key);
  return IDEAencrypt(input, size);
}


x86 assembly (clang, -O0):
<IDEA_encrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <IDEA_keyset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <IDEAencrypt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IDEA_encrypt>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <IDEA_keyset@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <IDEAencrypt@plt>

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

LLVM IR (-O2):
define i8* @IDEA_encrypt(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @IDEA_keyset(i8* %1)
%5 = tail call i8* @IDEAencrypt(i8* %0, i32 %2)
ret i8* %5
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t eq_int32_t(int32_t a, int32_t b) { return a == b; }


x86 assembly (clang, -O0):
<eq_int32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq_int32_t>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @eq_int32_t(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @eq_int32_t(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int apicid_to_node(int logical_apicid) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @apicid_to_node(i32 %0) {
ret i32 0
}
int ebc_isdigit(char c) { return (c >= 0xf0) && (c <= 0xf9); }


x86 assembly (clang, -O0):
<ebc_isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0xf0,%ecx
mov    %al,-0x2(%rbp)
jl     112e <ebc_isdigit+0x2e>
movsbl -0x1(%rbp),%eax
cmp    $0xf9,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @ebc_isdigit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 240
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 249
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @ebc_isdigit(i8 signext %0) {
ret i32 0
}
int ETree_nFactorEntriesInFront(int b, int m) {
  int nent = b * b + 2 * b * m;
  return nent;
}


x86 assembly (clang, -O0):
<ETree_nFactorEntriesInFront>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x1,%ecx
imul   -0x8(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ETree_nFactorEntriesInFront>:
lea    (%rdi,%rsi,2),%eax
imul   %edi,%eax
ret

LLVM IR (-O0):
define i32 @ETree_nFactorEntriesInFront(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %3
%8 = mul nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = mul nsw i32 2, %9
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
%13 = add nsw i32 %8, %12
store i32 %13, i32* %5
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @ETree_nFactorEntriesInFront(i32 %0, i32 %1) {
%3 = shl i32 %1, 1
%4 = add i32 %3, %0
%5 = mul i32 %4, %0
ret i32 %5
}
double fland(double a, double b) { return a && b; }


x86 assembly (clang, -O0):
<fland>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
jne    1130 <fland+0x30>
jp     1130 <fland+0x30>
jmp    1147 <fland+0x47>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setne  %al
setp   %cl
or     %cl,%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fland>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
setp   %al
setne  %cl
or     %al,%cl
ucomisd %xmm2,%xmm1
setp   %al
setne  %dl
or     %al,%dl
and    %cl,%dl
movzbl %dl,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @fland(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fcmp une double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load double, double* %4
%9 = fcmp une double %8, 0.000000e+00
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = sitofp i32 %12 to double
ret double %13
}

LLVM IR (-O2):
define double @fland(double %0, double %1) {
%3 = fcmp une double %0, 0.000000e+00
%4 = fcmp une double %1, 0.000000e+00
%5 = and i1 %3, %4
%6 = uitofp i1 %5 to double
ret double %6
}
/* Variables and functions */
char *strrchr(char *, char);
char *portable_basename(char *path) {
  char *p = strrchr(path, '/');
  return p ? p + 1 : path;
}


x86 assembly (clang, -O0):
<portable_basename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <portable_basename+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1152 <portable_basename+0x42>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<portable_basename>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmove  %rbx,%rcx
mov    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @portable_basename(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 47)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %13
11: ; preds = %1
%12 = load i8*, i8** %2
br label %13
13: ; preds = %11, %8
%14 = phi i8* [ %10, %8 ], [ %12, %11 ]
ret i8* %14
}

LLVM IR (-O2):
define i8* @portable_basename(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* %0, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0xdf() {
  Assert_real((isalnum(223) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              1120, ("isalnum should be 0 for 0xdf"));
}


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

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

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

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


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

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

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

LLVM IR (-O2):
%struct.work_struct = type opaque
define void @acc_detach_check(%struct.work_struct* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __builtin_arm_mcr(int, int /*<<< orphan*/, unsigned int, int,
                                     int /*<<< orphan*/, int);
void mcr(unsigned a) { __builtin_arm_mcr(15, 0, a, 13, 0, 3); }


x86 assembly (clang, -O0):
<mcr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xf,%edi
xor    %r8d,%r8d
mov    $0xd,%ecx
mov    $0x3,%r9d
mov    %r8d,%esi
call   1030 <__builtin_arm_mcr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcr>:
mov    %edi,%edx
mov    $0xf,%edi
xor    %esi,%esi
mov    $0xd,%ecx
xor    %r8d,%r8d
mov    $0x3,%r9d
jmp    1030 <__builtin_arm_mcr@plt>

LLVM IR (-O0):
define void @mcr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__builtin_arm_mcr(i32 15, i32 0, i32 %3, i32 13, i32 0, i32 3)
ret void
}

LLVM IR (-O2):
define void @mcr(i32 %0) {
%2 = tail call i32 @__builtin_arm_mcr(i32 15, i32 0, i32 %0, i32 13, i32 0, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ jogo();
int processa_argumentos(int, char **);
int main(int argc, char *argv[]) {
  int erro = processa_argumentos(argc, argv);
  if (!erro) {
    jogo();
  }
  return erro;
}


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <processa_argumentos@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1156 <main+0x36>
mov    $0x0,%al
call   1040 <jogo@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
call   1030 <processa_argumentos@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1133 <main+0x13>
xor    %eax,%eax
call   1040 <jogo@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @processa_argumentos(i32 %0, i8** %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @jogo()
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
scalar_t__ close(int);
int ss_close_fd(int fd) { return (close(fd) == 0); }


x86 assembly (clang, -O0):
<ss_close_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss_close_fd>:
push   %rax
call   1030 <close@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ss_close_fd(i32 %0) {
%2 = tail call i64 @close(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ssl3_connect(int);
int main(void) {
  int s;
  {
    {
      s = 12292;
      ssl3_connect(s);
    }
    return (0);
  }
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ssl3_connect(i32 12292)
ret i32 0
}
void set_fp_status_ctl(int fpstat_in) {
  int fpstat = fpstat_in;
  __asm__ volatile("ldmxcsr %0" : "=m"(fpstat));
  return;
}


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

x86 assembly (clang, -O2):
<set_fp_status_ctl>:
mov    %edi,-0x4(%rsp)
ldmxcsr -0x4(%rsp)
ret

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

LLVM IR (-O2):
define void @set_fp_status_ctl(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 %0, i32* %2
ret void
}
/* Type definitions */
struct bkey {
  int dummy;
};
typedef int /*<<< orphan*/ __u64;

/* Variables and functions */
int bkey_u64s(struct bkey const *);
unsigned long bkey_bytes(const struct bkey *k) {
  return bkey_u64s(k) * sizeof(__u64);
}


x86 assembly (clang, -O0):
<bkey_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <bkey_u64s@plt>
cltq
shl    $0x2,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bkey_bytes>:
push   %rax
call   1030 <bkey_u64s@plt>
cltq
shl    $0x2,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.bkey = type { i32 }
define i64 @bkey_bytes(%struct.bkey* %0) {
%2 = alloca %struct.bkey*
store %struct.bkey* %0, %struct.bkey** %2
%3 = load %struct.bkey*, %struct.bkey** %2
%4 = call i32 @bkey_u64s(%struct.bkey* %3)
%5 = sext i32 %4 to i64
%6 = mul i64 %5, 4
ret i64 %6
}

LLVM IR (-O2):
%struct.bkey = type { i32 }
define i64 @bkey_bytes(%struct.bkey* %0) {
%2 = tail call i32 @bkey_u64s(%struct.bkey* %0)
%3 = sext i32 %2 to i64
%4 = shl nsw i64 %3, 2
ret i64 %4
}
int test_imm_8Fuint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x8F << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Fuint64_midword_reg(i64 %0) {
%2 = and i64 %0, 9371648
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xd4() {
  Assert_real((isprint(212) == 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",
              1065, ("isprint should be 0 for 0xd4"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xd4>:
push   %rax
mov    $0xd4,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x429,%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 0xd4\00"
define void @t_isprint_0xd4() {
%1 = call i64 @isprint(i32 212)
%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 1065, 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 0xd4\00"
define void @t_isprint_0xd4() {
%1 = tail call i64 @isprint(i32 212)
%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 1065, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_missing() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_missing"
         "\n");
}


x86 assembly (clang, -O0):
<pa_memblockq_missing>:
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_memblockq_missing>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_memblockq_missing\00"
define i32 @pa_memblockq_missing() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
FILE *wopen_file(const char *output) {
  FILE *out = fopen(output, "wb");
  if (!out) {
    fprintf(stderr, "cannot open file '%s' for writing\n", output);
    exit(-2);
  }
  return out;
}


x86 assembly (clang, -O0):
<wopen_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117e <wopen_file+0x4e>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wopen_file>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1147 <wopen_file+0x17>
pop    %rbx
ret
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
lea    0xeac(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
@stderr = global i32 0
@.str.1 = [35 x i8] c"cannot open file '%s' for writing\0A\00"
define i32* @wopen_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 @exit(i32 -2)
unreachable
13: ; preds = %1
%14 = load i32*, i32** %3
ret i32* %14
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
@stderr = global i32 0
@.str.1 = [35 x i8] c"cannot open file '%s' for writing\0A\00"
define noalias i32* @wopen_file(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%7 = tail call i32 @exit(i32 -2)
unreachable
8: ; preds = %1
ret i32* %2
}
/* Variables and functions */
int do_it(char const *, int,
          int (*)(char const *, struct stat const *, int, struct FTW *), int,
          int);
int nftw(const char *path,
         int (*fcb)(const char *, const struct stat *, int, struct FTW *),
         int descriptors, int flags) {
  return do_it(path, 1, fcb, descriptors, flags);
}


x86 assembly (clang, -O0):
<nftw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0x1,%esi
call   1030 <do_it@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nftw>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    $0x1,%esi
jmp    1030 <do_it@plt>

LLVM IR (-O0):
%struct.stat = type opaque
%struct.FTW = type opaque
%struct.stat.0 = type opaque
%struct.FTW.1 = type opaque
define i32 @nftw(i8* %0, i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32 (i8*, %struct.stat*, i32, %struct.FTW*)*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1, i32 (i8*, %struct.stat*, i32, %struct.FTW*)** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32 (i8*, %struct.stat*, i32, %struct.FTW*)*, i32 (i8*, %struct.stat*, i32, %struct.FTW*)** %6
%11 = bitcast i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %10 to i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)*
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = call i32 @do_it(i8* %9, i32 1, i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)* %11, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type opaque
%struct.FTW = type opaque
%struct.stat.0 = type opaque
%struct.FTW.1 = type opaque
define i32 @nftw(i8* %0, i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1, i32 %2, i32 %3) {
%5 = bitcast i32 (i8*, %struct.stat*, i32, %struct.FTW*)* %1 to i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)*
%6 = tail call i32 @do_it(i8* %0, i32 1, i32 (i8*, %struct.stat.0*, i32, %struct.FTW.1*)* %5, i32 %2, i32 %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("EG1302A - Spring 2014\n");
  printf("Luis Avila\n");
  printf("%d/%d/%d\n", 01, 28, 14);
  printf("assignment 05");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee1(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0xe,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
call   1030 <puts@plt>
lea    0xefa(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x1,%esi
mov    $0x1c,%edx
mov    $0xe,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xead(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"EG1302A - Spring 2014\0A\00"
@.str.1 = [12 x i8] c"Luis Avila\0A\00"
@.str.2 = [10 x i8] c"%d/%d/%d\0A\00"
@.str.3 = [14 x i8] c"assignment 05\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 14)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [10 x i8] c"%d/%d/%d\0A\00"
@.str.3 = [14 x i8] c"assignment 05\00"
@str = [22 x i8] c"EG1302A - Spring 2014\00"
@str.4 = [11 x i8] c"Luis Avila\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 28, i32 14)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
void MPI_Comm_split() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int, int, int);
void ibx_debug_blc_pwm_ctl1(char *result, int len, int reg, uint32_t val,
                            uint32_t devid) {
  int enable, override, inverted_polarity;
  enable = (val >> 31) & 1;
  override = (val >> 30) & 1;
  inverted_polarity = (val >> 29) & 1;
  snprintf(result, len, "enable %d, override %d, inverted polarity %d", enable,
           override, inverted_polarity);
}


x86 assembly (clang, -O0):
<ibx_debug_blc_pwm_ctl1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1e,%eax
and    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
sar    $0x1d,%eax
and    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x24(%rbp),%r9d
lea    0xe9a(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ibx_debug_blc_pwm_ctl1>:
mov    %ecx,%r9d
shr    $0x1f,%ecx
mov    %r9d,%r8d
shr    $0x1e,%r8d
and    $0x1,%r8d
shr    $0x1d,%r9d
and    $0x1,%r9d
lea    0xed0(%rip),%rdx
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"enable %d, override %d, inverted polarity %d\00"
define void @ibx_debug_blc_pwm_ctl1(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%14 = load i32, i32* %9
%15 = ashr i32 %14, 31
%16 = and i32 %15, 1
store i32 %16, i32* %11
%17 = load i32, i32* %9
%18 = ashr i32 %17, 30
%19 = and i32 %18, 1
store i32 %19, i32* %12
%20 = load i32, i32* %9
%21 = ashr i32 %20, 29
%22 = and i32 %21, 1
store i32 %22, i32* %13
%23 = load i8*, i8** %6
%24 = load i32, i32* %7
%25 = load i32, i32* %11
%26 = load i32, i32* %12
%27 = load i32, i32* %13
%28 = call i32 @snprintf(i8* %23, i32 %24, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %26, i32 %27)
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"enable %d, override %d, inverted polarity %d\00"
define void @ibx_debug_blc_pwm_ctl1(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = lshr i32 %3, 31
%7 = lshr i32 %3, 30
%8 = and i32 %7, 1
%9 = lshr i32 %3, 29
%10 = and i32 %9, 1
%11 = tail call i32 @snprintf(i8* %0, i32 %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8, i32 %10)
ret void
}
void XeviGetVisualInfo() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ BrzSequenceOptimised_ackup(struct comp *, int);
void BrzSequence_ackup(struct comp *comp, int port) {
  BrzSequenceOptimised_ackup(comp, port);
}


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

x86 assembly (clang, -O2):
<BrzSequence_ackup>:
jmp    1030 <BrzSequenceOptimised_ackup@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
define void @BrzSequence_ackup(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%5 = load %struct.comp*, %struct.comp** %3
%6 = load i32, i32* %4
%7 = call i32 @BrzSequenceOptimised_ackup(%struct.comp* %5, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzSequence_ackup(%struct.comp* %0, i32 %1) {
%3 = tail call i32 @BrzSequenceOptimised_ackup(%struct.comp* %0, i32 %1)
ret void
}
unsigned int getStringLength(unsigned int src) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @getStringLength(i32 %0) {
ret i32 0
}