xunge/DecIR huggingface dataset:
/* Variables and functions */
void *__emutls_get_address(void) { return NULL; }


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

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

LLVM IR (-O0):
define i8* @__emutls_get_address() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @__emutls_get_address() {
ret i8* null
}
double get_experimental_use_factor(double original_process_time,
                                   double improved_process_time) {
  return (original_process_time - improved_process_time) /
         (original_process_time);
}


x86 assembly (clang, -O0):
<get_experimental_use_factor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_experimental_use_factor>:
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @get_experimental_use_factor(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 = load double, double* %4
%7 = fsub double %5, %6
%8 = load double, double* %3
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @get_experimental_use_factor(double %0, double %1) {
%3 = fsub double %0, %1
%4 = fdiv double %3, %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
char *quitcmd() { exit(0); }


x86 assembly (clang, -O0):
<quitcmd>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define i8* @quitcmd() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define noalias i8* @quitcmd() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ RamWrite32A(int, int);
void IniPtAve(void) {
  RamWrite32A(0x1235, 0x3f800000);
  RamWrite32A(0x1236, 0x3f800000);
  RamWrite32A(0x1237, 0x3f800000);
  RamWrite32A(0x1238, 0x3f800000);
}


x86 assembly (clang, -O0):
<IniPtAve>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1235,%edi
mov    $0x3f800000,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1236,%edi
mov    $0x3f800000,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1237,%edi
mov    $0x3f800000,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1238,%edi
mov    $0x3f800000,%esi
call   1030 <RamWrite32A@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IniPtAve>:
push   %rax
mov    $0x1235,%edi
mov    $0x3f800000,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1236,%edi
mov    $0x3f800000,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1237,%edi
mov    $0x3f800000,%esi
call   1030 <RamWrite32A@plt>
mov    $0x1238,%edi
mov    $0x3f800000,%esi
pop    %rax
jmp    1030 <RamWrite32A@plt>

LLVM IR (-O0):
define void @IniPtAve() {
%1 = call i32 @RamWrite32A(i32 4661, i32 1065353216)
%2 = call i32 @RamWrite32A(i32 4662, i32 1065353216)
%3 = call i32 @RamWrite32A(i32 4663, i32 1065353216)
%4 = call i32 @RamWrite32A(i32 4664, i32 1065353216)
ret void
}

LLVM IR (-O2):
define void @IniPtAve() {
%1 = tail call i32 @RamWrite32A(i32 4661, i32 1065353216)
%2 = tail call i32 @RamWrite32A(i32 4662, i32 1065353216)
%3 = tail call i32 @RamWrite32A(i32 4663, i32 1065353216)
%4 = tail call i32 @RamWrite32A(i32 4664, i32 1065353216)
ret void
}
/* Variables and functions */
int f(int, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main(int argc, char *argv[]) {
  int a, b;
  scanf("%i %i", &a, &b);
  printf("%i", f(a, b, 1));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x1,%edx
call   1030 <f@plt>
mov    %eax,%esi
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
mov    (%rsp),%esi
mov    $0x1,%edx
call   1030 <f@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%i %i\00"
@.str.1 = [3 x i8] c"%i\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
%6 = bitcast i32* %4 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @f(i32 %8, i32 %9, i32 1)
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
void RTTarFileReadAt(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTarFileReadAt() {
ret void
}
double quadraticEaseInd(double p) { return p * p; }


x86 assembly (clang, -O0):
<quadraticEaseInd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadraticEaseInd>:
mulsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @quadraticEaseInd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @quadraticEaseInd(double %0) {
%2 = fmul double %0, %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ tk_putc(int /*<<< orphan*/);
int tk_puts(char *msg) {
  char *s;
  s = msg;
  while (*s) {
    tk_putc(*s++);
  }
}


x86 assembly (clang, -O0):
<tk_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     114d <tk_puts+0x3d>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%edi
call   1030 <tk_putc@plt>
jmp    1124 <tk_puts+0x14>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tk_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <tk_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <tk_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <tk_puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @tk_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @tk_putc(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int vlistDelAtt(int vlistID, int varID, const char *name) {
  int status = 0;
  (void)vlistID;
  (void)varID;
  (void)name;
  fprintf(stderr, "vlistDelAtt not implemented!\n");
  return (status);
}


x86 assembly (clang, -O0):
<vlistDelAtt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"vlistDelAtt not implemented!\0A\00"
define i32 @vlistDelAtt(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
store i32 0, i32* %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* %7
ret i32 %13
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"vlistDelAtt not implemented!\0A\00"
define i32 @vlistDelAtt(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void glShadeModel(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glShadeModel() {
ret void
}
/* Variables and functions */
int main_libesprom(int, char **);
int main(int argc, char **argv) { return main_libesprom(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <main_libesprom@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @main_libesprom(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
scalar_t__ getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse(char *);
int main() {
  char line[128];
  while (getline(line, 128) > 0) {
    reverse(line);
    printf("%s", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
mov    $0x80,%esi
call   1050 <getline@plt>
cmp    $0x0,%rax
jle    1181 <main+0x51>
lea    -0x90(%rbp),%rdi
call   1030 <reverse@plt>
lea    -0x90(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
mov    %rsp,%rdi
mov    $0x80,%esi
call   1050 <getline@plt>
test   %rax,%rax
jle    1185 <main+0x55>
mov    %rsp,%rbx
lea    0xeaa(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <reverse@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x80,%esi
call   1050 <getline@plt>
test   %rax,%rax
jg     1160 <main+0x30>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%5 = call i64 @getline(i8* %4, i32 128)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%9 = call i32 @reverse(i8* %8)
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = call i64 @getline(i8* %2, i32 128)
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = call i32 @reverse(i8* %2)
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%8 = call i64 @getline(i8* %2, i32 128)
%9 = icmp sgt i64 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void guest_config_show_usage(void) {
  printf("guest-client [ARGS]\n");
  printf("  where ARGS may be any of: \n");
  printf("    --name      Override the name of the instance\n");
  printf("    --device    Override default communication channel device\n");
  printf("\n");
}


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

x86 assembly (clang, -O2):
<guest_config_show_usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
lea    0xee0(%rip),%rdi
call   1040 <puts@plt>
lea    0xef1(%rip),%rdi
call   1040 <puts@plt>
lea    0xf17(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"guest-client [ARGS]\0A\00"
@.str.1 = [30 x i8] c" where ARGS may be any of: \0A\00"
@.str.2 = [51 x i8] c" --name Override the name of the instance\0A\00"
@.str.3 = [63 x i8] c" --device Override default communication channel device\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @guest_config_show_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"guest-client [ARGS]\00"
@str.5 = [29 x i8] c" where ARGS may be any of: \00"
@str.6 = [50 x i8] c" --name Override the name of the instance\00"
@str.7 = [62 x i8] c" --device Override default communication channel device\00"
define void @guest_config_show_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.6, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.7, i64 0, i64 0))
%5 = tail call i32 @putchar(i32 10)
ret void
}
int main() { int x; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void SzFreeTemp(void *address) { free(address); }


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

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

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

LLVM IR (-O2):
define void @SzFreeTemp(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
__attribute__((__unused__)) int _int_consume(void *p, ...) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_int_consume(i8* nocapture readnone %0, ...) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int f();
main() {
  if (f() != 20)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <f@plt>
cmp    $0x14,%eax
je     1156 <main+0x26>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
cmp    $0x14,%eax
jne    1144 <main+0x14>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = icmp eq i32 %1, 20
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *_plkr_strndup(char *str, int len) {
  char *dup;
  dup = (char *)malloc(len + 1);
  strncpy(dup, str, len);
  dup[len] = 0;
  return dup;
}


x86 assembly (clang, -O0):
<_plkr_strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_plkr_strndup>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <strncpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @_plkr_strndup(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i64 @malloc(i32 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = call i32 @strncpy(i8* %10, i8* %11, i32 %12)
%14 = load i8*, i8** %5
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %14, i64 %16
store i8 0, i8* %17
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
define i8* @_plkr_strndup(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strncpy(i8* %5, i8* %0, i32 %1)
%7 = sext i32 %1 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 0, i8* %8
ret i8* %5
}
void arm_random_module_init(void) {}


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

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

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

LLVM IR (-O2):
define void @arm_random_module_init() {
ret void
}
void setReadLock(void *mem, int semid) {
  int *p = mem;
  p[(2)] = semid;
}


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

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

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

LLVM IR (-O2):
define void @setReadLock(i8* nocapture writeonly %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i32*
store i32 %1, i32* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ os_shellexec(char const *, char *, int);
int /*<<< orphan*/ printf(char *, char const *, char *);
void os_printoutput(const char *cmd) {
  char buf[2048] = {0};
  os_shellexec(cmd, buf, 2048);
  printf("$ %s\n%s\n", cmd, buf);
}


x86 assembly (clang, -O0):
<os_printoutput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x810,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x810(%rbp),%rdi
xor    %esi,%esi
mov    $0x800,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    -0x810(%rbp),%rsi
mov    $0x800,%edx
call   1050 <os_shellexec@plt>
mov    -0x8(%rbp),%rsi
lea    -0x810(%rbp),%rdx
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
add    $0x810,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<os_printoutput>:
push   %r14
push   %rbx
sub    $0x808,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    $0x800,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x800,%edx
call   1050 <os_shellexec@plt>
lea    0xe9a(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
add    $0x808,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"$ %s\0A%s\0A\00"
define void @os_printoutput(i8* %0) {
%2 = alloca i8*
%3 = alloca [2048 x i8]
store i8* %0, i8** %2
%4 = bitcast [2048 x i8]* %3 to i8*
%5 = load i8*, i8** %2
%6 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%7 = call i32 @os_shellexec(i8* %5, i8* %6, i32 2048)
%8 = load i8*, i8** %2
%9 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%10 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %8, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"$ %s\0A%s\0A\00"
define void @os_printoutput(i8* %0) {
%2 = alloca [2048 x i8]
%3 = getelementptr inbounds [2048 x i8], [2048 x i8]* %2, i64 0, i64 0
%4 = call i32 @os_shellexec(i8* %0, i8* %3, i32 2048)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %3)
ret void
}
int nextNumberMultipleOf3(int num) {
  int rem = num % 3;
  return num + (3 - rem);
}


x86 assembly (clang, -O0):
<nextNumberMultipleOf3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
sub    -0x8(%rbp),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextNumberMultipleOf3>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
lea    (%rax,%rax,2),%eax
add    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @nextNumberMultipleOf3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = srem i32 %4, 3
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = sub nsw i32 3, %7
%9 = add nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @nextNumberMultipleOf3(i32 %0) {
%2 = srem i32 %0, 3
%3 = add i32 %0, 3
%4 = sub i32 %3, %2
ret i32 %4
}
/* Variables and functions */
scalar_t__ is_digit(char const);
char *__skip_digit(const char *s) {
  while (is_digit(*s))
    s++;
  return (char *)s;
}


x86 assembly (clang, -O0):
<__skip_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <is_digit@plt>
cmp    $0x0,%rax
je     1143 <__skip_digit+0x33>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <__skip_digit+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__skip_digit>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <is_digit@plt>
test   %rax,%rax
jne    1120 <__skip_digit+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @__skip_digit(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @is_digit(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
void flags_v0(void) {
  emit("lahf\n");
  emit("mov al,0\n");
}


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

x86 assembly (clang, -O2):
<flags_v0>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <emit@plt>
lea    0xee2(%rip),%rdi
pop    %rax
jmp    1030 <emit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"lahf\0A\00"
@.str.1 = [10 x i8] c"mov al,0\0A\00"
define void @flags_v0() {
%1 = call i32 @emit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"lahf\0A\00"
@.str.1 = [10 x i8] c"mov al,0\0A\00"
define void @flags_v0() {
%1 = tail call i32 @emit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ strcasecmp(char const *, char const *);
int same_aname(const char *an1, const char *an2) {
  return strcasecmp(an1, an2) == 0;
}


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

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

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

LLVM IR (-O2):
define i32 @same_aname(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strcasecmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
float abs(float i) { return (i < 0) ? (i * -1) : i; }


x86 assembly (clang, -O0):
<abs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    112d <abs+0x2d>
movss  0xee2(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1137 <abs+0x37>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @abs(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fmul float %6, -1.000000e+00
br label %10
8: ; preds = %1
%9 = load float, float* %2
br label %10
10: ; preds = %8, %5
%11 = phi float [ %7, %5 ], [ %9, %8 ]
ret float %11
}

LLVM IR (-O2):
define float @abs(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
int do_537() { return 537; }


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

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

LLVM IR (-O0):
define i32 @do_537() {
ret i32 537
}

LLVM IR (-O2):
define i32 @do_537() {
ret i32 537
}
void vax_to_local_ints_(unsigned *ia, const int *n) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_subs_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_subs_pi16(__m64 a, __m64 b) { return _mm_subs_pi16(a, b); }


x86 assembly (clang, -O0):
<test_mm_subs_pi16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <_mm_subs_pi16@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mm_subs_pi16>:
jmp    1030 <_mm_subs_pi16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_subs_pi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_subs_pi16(i32 %0, i32 %1)
ret i32 %3
}
cbuf25(f, n) { return (cbuf(f, n, 25)); }


x86 assembly (clang, -O0):
<cbuf25>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x19,%edx
mov    $0x0,%al
call   1030 <cbuf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbuf25>:
mov    $0x19,%edx
xor    %eax,%eax
jmp    1030 <cbuf@plt>

LLVM IR (-O0):
define i32 @cbuf25(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 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %5, i32 %6, i32 25)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cbuf25(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @cbuf to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 25)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int z = ({
    int x = 0;
    x += 2;
    x;
  });
  printf("%d\n", z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 2)
ret i32 0
}
int numeric(char *str) {
  int i;
  for (i = 0; str[i]; i++) {
    if (str[i] < '0' || str[i] > '9') {
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     116a <numeric+0x6a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jl     114b <numeric+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    1157 <numeric+0x57>
movl   $0x0,-0x4(%rbp)
jmp    1171 <numeric+0x71>
jmp    115c <numeric+0x5c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <numeric+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numeric>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <numeric+0x23>
add    $0x1,%rdi
nop
add    $0xc6,%cl
cmp    $0xf5,%cl
jbe    1124 <numeric+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <numeric+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @numeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -58
%12 = icmp ult i8 %11, -10
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xb4() {
  Assert_real((isprint(180) == 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",
              905, ("isprint should be 0 for 0xb4"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xb4>:
push   %rax
mov    $0xb4,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x389,%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 0xb4\00"
define void @t_isprint_0xb4() {
%1 = call i64 @isprint(i32 180)
%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 905, 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 0xb4\00"
define void @t_isprint_0xb4() {
%1 = tail call i64 @isprint(i32 180)
%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 905, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void draw2_(x, y) float *x, *y;
{ draw(*x, *y, 0.0); }


x86 assembly (clang, -O0):
<draw2_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
call   1030 <draw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw2_>:
movss  (%rdi),%xmm0
cvtss2sd %xmm0,%xmm0
movss  (%rsi),%xmm1
cvtss2sd %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x3,%al
jmp    1030 <draw@plt>

LLVM IR (-O0):
define void @draw2_(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = load float, float* %5
%7 = fpext float %6 to double
%8 = load float*, float** %4
%9 = load float, float* %8
%10 = fpext float %9 to double
%11 = call i32 (double, double, double, ...) bitcast (i32 (...)* @draw to i32 (double, double, double, ...)*)(double %7, double %10, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @draw2_(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = fpext float %3 to double
%5 = load float, float* %1
%6 = fpext float %5 to double
%7 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @draw to i32 (double, double, double, ...)*)(double %4, double %6, double 0.000000e+00)
ret void
}
/* Type definitions */
struct ValueBounds {
  int dummy;
};
typedef int /*<<< orphan*/ sqlite3_stmt;

/* Variables and functions */
struct ValueBounds *buildTsBounds(int /*<<< orphan*/ *);
int /*<<< orphan*/ finishedStmt(int /*<<< orphan*/ *);
int /*<<< orphan*/ *getStmt(char *);
struct ValueBounds *calcTsBoundsAll(char *hs, char *ad) {
  sqlite3_stmt *stmtTsBounds = getStmt("SELECT MIN(ts), MAX(ts) FROM data");
  struct ValueBounds *tsBounds = buildTsBounds(stmtTsBounds);
  finishedStmt(stmtTsBounds);
  return tsBounds;
}


x86 assembly (clang, -O0):
<calcTsBoundsAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb9(%rip),%rdi
call   1040 <getStmt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <buildTsBounds@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <finishedStmt@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcTsBoundsAll>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%rdi
call   1040 <getStmt@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <buildTsBounds@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1050 <finishedStmt@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.ValueBounds = type { i32 }
@.str = [34 x i8] c"SELECT MIN(ts), MAX(ts) FROM data\00"
define %struct.ValueBounds* @calcTsBoundsAll(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca %struct.ValueBounds*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = call i32* @getStmt(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = call %struct.ValueBounds* @buildTsBounds(i32* %8)
store %struct.ValueBounds* %9, %struct.ValueBounds** %6
%10 = load i32*, i32** %5
%11 = call i32 @finishedStmt(i32* %10)
%12 = load %struct.ValueBounds*, %struct.ValueBounds** %6
ret %struct.ValueBounds* %12
}

LLVM IR (-O2):
%struct.ValueBounds = type { i32 }
@.str = [34 x i8] c"SELECT MIN(ts), MAX(ts) FROM data\00"
define %struct.ValueBounds* @calcTsBoundsAll(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32* @getStmt(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = tail call %struct.ValueBounds* @buildTsBounds(i32* %3)
%5 = tail call i32 @finishedStmt(i32* %3)
ret %struct.ValueBounds* %4
}
/* Variables and functions */
scalar_t__ _lgtd_command_pipe_open(char const *);
int /*<<< orphan*/ lgtd_info(char *, char const *);
bool lgtd_command_pipe_open(const char *path) {
  if (_lgtd_command_pipe_open(path)) {
    lgtd_info("command pipe ready at %s", path);
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<lgtd_command_pipe_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <_lgtd_command_pipe_open@plt>
cmp    $0x0,%rax
je     115b <lgtd_command_pipe_open+0x3b>
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <lgtd_info@plt>
movl   $0x1,-0x4(%rbp)
jmp    1162 <lgtd_command_pipe_open+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lgtd_command_pipe_open>:
push   %rbx
mov    %rdi,%rbx
call   1040 <_lgtd_command_pipe_open@plt>
test   %rax,%rax
je     1144 <lgtd_command_pipe_open+0x24>
lea    0xecb(%rip),%rdi
mov    %rbx,%rsi
call   1030 <lgtd_info@plt>
mov    $0x1,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"command pipe ready at %s\00"
define i32 @lgtd_command_pipe_open(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @_lgtd_command_pipe_open(i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %3
%9 = call i32 @lgtd_info(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %8)
store i32 1, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [25 x i8] c"command pipe ready at %s\00"
define i32 @lgtd_command_pipe_open(i8* %0) {
%2 = tail call i64 @_lgtd_command_pipe_open(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @lgtd_info(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fprintf(int /*<<< orphan*/ *, char *, char *, char *, char *, char *);
int kvp_write_file(FILE *f, char *s1, char *s2, char *s3) {
  int ret;
  ret = fprintf(f, "%s%s%s%s\n", s1, s2, "=", s3);
  if (ret < 0)
    return 0x80004005;
  return 0;
}


x86 assembly (clang, -O0):
<kvp_write_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r9
lea    0xec1(%rip),%rsi
lea    0xec4(%rip),%r8
call   1030 <fprintf@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jge    1164 <kvp_write_file+0x54>
movl   $0x80004005,-0x4(%rbp)
jmp    116b <kvp_write_file+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kvp_write_file>:
push   %rax
mov    %rcx,%r9
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xedf(%rip),%rsi
lea    0xee2(%rip),%r8
call   1030 <fprintf@plt>
sar    $0x1f,%eax
and    $0x80004005,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%s%s%s%s\0A\00"
@.str.1 = [2 x i8] c"=\00"
define i32 @kvp_write_file(i32* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%6 = icmp slt i32 %5, 0
%7 = select i1 %6, i32 -2147467259, i32 0
ret i32 %7
}
int xmlUCSIsSuperscriptsandSudirripts(int code) {
  return (((code >= 0x2070) && (code <= 0x209F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsSuperscriptsandSudirripts>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2070,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsSuperscriptsandSudirripts+0x26>
cmpl   $0x209f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsSuperscriptsandSudirripts>:
add    $0xffffdf90,%edi
xor    %eax,%eax
cmp    $0x30,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsSuperscriptsandSudirripts(i32 %0) {
%2 = add i32 %0, -8304
%3 = icmp ult i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}