xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ RegisterServer();
int /*<<< orphan*/ UnregisterServer();
void MasterServer_OnChange(void) {
  UnregisterServer();
  RegisterServer();
}


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

x86 assembly (clang, -O2):
<MasterServer_OnChange>:
push   %rax
xor    %eax,%eax
call   1040 <UnregisterServer@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <RegisterServer@plt>

LLVM IR (-O0):
define void @MasterServer_OnChange() {
%1 = call i32 (...) @UnregisterServer()
%2 = call i32 (...) @RegisterServer()
ret void
}

LLVM IR (-O2):
define void @MasterServer_OnChange() {
%1 = tail call i32 (...) @UnregisterServer()
%2 = tail call i32 (...) @RegisterServer()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emsAnnul(int *);
void errAnnul(int *status) { emsAnnul(status); }


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

x86 assembly (clang, -O2):
<errAnnul>:
jmp    1030 <emsAnnul@plt>

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

LLVM IR (-O2):
define void @errAnnul(i32* %0) {
%2 = tail call i32 @emsAnnul(i32* %0)
ret void
}
void UI_LoadBestScores(const char *map, int game) {}


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

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

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

LLVM IR (-O2):
define void @UI_LoadBestScores(i8* nocapture %0, i32 %1) {
ret void
}
double umath_double_abs(double value) {
  return value >= 0.0 ? value : (-value);
}


x86 assembly (clang, -O0):
<umath_double_abs>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     112a <umath_double_abs+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    114b <umath_double_abs+0x4b>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<umath_double_abs>:
movapd 0xef8(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmplesd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define double @umath_double_abs(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %0, double %3
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *memmove(void *destination, const void *source, size_t num) {
  void *d = malloc(num);
  memcpy(d, source, num);
  memcpy(destination, d, num);
  free(d);
  return destination;
}


x86 assembly (clang, -O0):
<memmove>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memmove>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r12
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rdx,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r12,%rdx
call   1040 <memcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r15,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @memmove(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i64, i64* %6
%9 = call i8* @malloc(i64 %8)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i8*, i8** %5
%12 = load i64, i64* %6
%13 = call i32 @memcpy(i8* %10, i8* %11, i64 %12)
%14 = load i8*, i8** %4
%15 = load i8*, i8** %7
%16 = load i64, i64* %6
%17 = call i32 @memcpy(i8* %14, i8* %15, i64 %16)
%18 = load i8*, i8** %7
%19 = call i32 @free(i8* %18)
%20 = load i8*, i8** %4
ret i8* %20
}

LLVM IR (-O2):
define i8* @memmove(i8* returned %0, i8* %1, i64 %2) {
%4 = tail call i8* @malloc(i64 %2)
%5 = tail call i32 @memcpy(i8* %4, i8* %1, i64 %2)
%6 = tail call i32 @memcpy(i8* %0, i8* %4, i64 %2)
%7 = tail call i32 @free(i8* %4)
ret i8* %0
}
int test_imm_F7int64_midword_reg(long long val) {
  return ((val >> 16) & (0xF7 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F7int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 247
%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_F7int64_midword_reg(i64 %0) {
%2 = and i64 %0, 16187392
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void miami_interval_delimiter_() {}


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

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

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

LLVM IR (-O2):
define void @miami_interval_delimiter_() {
ret void
}
unsigned char _is_exponential_char(char c) { return (c == 'e') || (c == 'E'); }


x86 assembly (clang, -O0):
<_is_exponential_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x65,%ecx
mov    %al,-0x2(%rbp)
je     1129 <_is_exponential_char+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x45,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_exponential_char>:
and    $0xdf,%dil
cmp    $0x45,%dil
sete   %al
ret

LLVM IR (-O0):
define zeroext i8 @_is_exponential_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 101
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 69
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @_is_exponential_char(i8 signext %0) {
%2 = and i8 %0, -33
%3 = icmp eq i8 %2, 69
%4 = zext i1 %3 to i8
ret i8 %4
}
/* Variables and functions */
int /*<<< orphan*/ find_prev(int *, int *, int, int);
int /*<<< orphan*/ list_unlink_after(int *, int *, int, int,
                                     int /*<<< orphan*/);
void list_unlink(int *first, int *next, int head, int node) {
  list_unlink_after(first, next, head, node,
                    find_prev(first, next, head, node));
}


x86 assembly (clang, -O0):
<list_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1040 <find_prev@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    %eax,%r8d
call   1030 <list_unlink_after@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_unlink>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1040 <find_prev@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <list_unlink_after@plt>

LLVM IR (-O0):
define void @list_unlink(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = load i32*, i32** %5
%14 = load i32*, i32** %6
%15 = load i32, i32* %7
%16 = load i32, i32* %8
%17 = call i32 @find_prev(i32* %13, i32* %14, i32 %15, i32 %16)
%18 = call i32 @list_unlink_after(i32* %9, i32* %10, i32 %11, i32 %12, i32 %17)
ret void
}

LLVM IR (-O2):
define void @list_unlink(i32* %0, i32* %1, i32 %2, i32 %3) {
%5 = tail call i32 @find_prev(i32* %0, i32* %1, i32 %2, i32 %3)
%6 = tail call i32 @list_unlink_after(i32* %0, i32* %1, i32 %2, i32 %3, i32 %5)
ret void
}
void ATI4200_Init() {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @ATI4200_Init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  if (argc == 1) {
    printf("more arguments are required\n");
    exit(1);
  }
  printf("argc = %d\n", argc);
  return 0;
}


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)
cmpl   $0x1,-0x8(%rbp)
jne    1158 <main+0x38>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
mov    -0x8(%rbp),%esi
lea    0xebb(%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
cmp    $0x1,%edi
je     114a <main+0x1a>
mov    %edi,%esi
lea    0xec1(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeba(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"more arguments are required\0A\00"
@.str.1 = [11 x i8] c"argc = %d\0A\00"
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 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i32, i32* %4
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [11 x i8] c"argc = %d\0A\00"
@str = [28 x i8] c"more arguments are required\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void ShowHeartbeat(int Sig) {
  printf("Heartbeat\n");
  fflush(stdout);
  alarm(60);
}


x86 assembly (clang, -O0):
<ShowHeartbeat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x3c,%edi
call   1040 <alarm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowHeartbeat>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0x3c,%edi
pop    %rax
jmp    1040 <alarm@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Heartbeat\0A\00"
@stdout = global i32 0
define void @ShowHeartbeat(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
%6 = call i32 @alarm(i32 60)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [10 x i8] c"Heartbeat\00"
define void @ShowHeartbeat(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
%5 = tail call i32 @alarm(i32 60)
ret void
}
/* Variables and functions */
int cos(int);
int cos16(int theta) {
  return (int)(cos(theta * (2 * 3.14159265358979323846) / 0x10000) * 0x1000);
}


x86 assembly (clang, -O0):
<cos16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecc(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
shl    $0xc,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cos16>:
push   %rax
cvtsi2sd %edi,%xmm0
mulsd  0xee3(%rip),%xmm0
mulsd  0xee3(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
shl    $0xc,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cos16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 0x401921FB54442D18
%6 = fdiv double %5, 6.553600e+04
%7 = fptosi double %6 to i32
%8 = call i32 @cos(i32 %7)
%9 = mul nsw i32 %8, 4096
ret i32 %9
}

LLVM IR (-O2):
define i32 @cos16(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 0x401921FB54442D18
%4 = fmul double %3, 0x3EF0000000000000
%5 = fptosi double %4 to i32
%6 = tail call i32 @cos(i32 %5)
%7 = shl nsw i32 %6, 12
ret i32 %7
}
void if_freenameindex(struct if_nameindex *ptr) {}


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

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

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

LLVM IR (-O2):
%struct.if_nameindex = type opaque
define void @if_freenameindex(%struct.if_nameindex* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_label_terminator();
int /*<<< orphan*/ output_string(char *);
void declare_entry_point(char *symbol_name) {
  output_string(symbol_name);
  output_label_terminator();
  newline();
}


x86 assembly (clang, -O0):
<declare_entry_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <output_string@plt>
mov    $0x0,%al
call   1050 <output_label_terminator@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<declare_entry_point>:
push   %rax
call   1040 <output_string@plt>
xor    %eax,%eax
call   1050 <output_label_terminator@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <newline@plt>

LLVM IR (-O0):
define void @declare_entry_point(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output_string(i8* %3)
%5 = call i32 (...) @output_label_terminator()
%6 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
define void @declare_entry_point(i8* %0) {
%2 = tail call i32 @output_string(i8* %0)
%3 = tail call i32 (...) @output_label_terminator()
%4 = tail call i32 (...) @newline()
ret void
}
void foo722(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo722(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *xmalloc(int);
char *copy_string(char *str) {
  int len = strlen(str);
  char *rslt;
  rslt = xmalloc(len + 1);
  strcpy(rslt, str);
  return rslt;
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1050 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <xmalloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @copy_string(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @xmalloc(i32 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void fail(void) {
  {
  ERROR:
    __VERIFIER_error();
    assert(0);
    goto ERROR;
  }
}


x86 assembly (clang, -O0):
<fail>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <fail+0x9>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1129 <fail+0x9>

x86 assembly (clang, -O2):
<fail>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <__VERIFIER_error@plt>
xor    %edi,%edi
call   1030 <assert@plt>
jmp    1130 <fail+0x10>

LLVM IR (-O0):
define void @fail() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @__VERIFIER_error()
%3 = call i32 @assert(i32 0)
br label %1
}

LLVM IR (-O2):
define void @fail() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @__VERIFIER_error()
%3 = tail call i32 @assert(i32 0)
br label %1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int /*<<< orphan*/ num_planes;
};
struct TYPE_4__ {
  TYPE_1__ pix_mp;
};
struct v4l2_format {
  int type;
  TYPE_2__ fmt;
};
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
#define V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 129
#define V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE 128
void v4l_format_s_num_planes(struct v4l2_format *fmt, __u8 num_planes) {
  switch (fmt->type) {
  case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
  case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
    fmt->fmt.pix_mp.num_planes = num_planes;
    break;
  }
}


x86 assembly (clang, -O0):
<v4l_format_s_num_planes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0xffffff80,%eax
sub    $0x1,%eax
ja     112c <v4l_format_s_num_planes+0x2c>
jmp    1122 <v4l_format_s_num_planes+0x22>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<v4l_format_s_num_planes>:
mov    (%rdi),%eax
and    $0xfffffffe,%eax
cmp    $0x80,%eax
jne    110f <v4l_format_s_num_planes+0xf>
mov    %esi,0x4(%rdi)
ret

LLVM IR (-O0):
%struct.v4l2_format = type { i32, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @v4l_format_s_num_planes(%struct.v4l2_format* %0, i32 %1) {
%3 = alloca %struct.v4l2_format*
%4 = alloca i32
store %struct.v4l2_format* %0, %struct.v4l2_format** %3
store i32 %1, i32* %4
%5 = load %struct.v4l2_format*, %struct.v4l2_format** %3
%6 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %5, i32 0, i32 0
%7 = load i32, i32* %6
switch i32 %7, label %14 [
i32 129, label %8
i32 128, label %8
]
8: ; preds = %2, %2
%9 = load i32, i32* %4
%10 = load %struct.v4l2_format*, %struct.v4l2_format** %3
%11 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %10, i32 0, i32 1
%12 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %11, i32 0, i32 0
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %12, i32 0, i32 0
store i32 %9, i32* %13
br label %14
14: ; preds = %2, %8
ret void
}

LLVM IR (-O2):
%struct.v4l2_format = type { i32, %struct.TYPE_4__ }
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @v4l_format_s_num_planes(%struct.v4l2_format* nocapture %0, i32 %1) {
%3 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 0
%4 = load i32, i32* %3
%5 = and i32 %4, -2
%6 = icmp eq i32 %5, 128
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = getelementptr inbounds %struct.v4l2_format, %struct.v4l2_format* %0, i64 0, i32 1, i32 0, i32 0
store i32 %1, i32* %8
br label %9
9: ; preds = %2, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checaNumero(int, int);
main() {
  int a, b;
  checaNumero(a, b);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @checaNumero(i32 undef, i32 undef)
ret i32 0
}
/* Variables and functions */
long double floorl(long double);
long double ceill(long double x) { return -floorl(-x); }


x86 assembly (clang, -O0):
<ceill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fchs
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <floorl@plt>
fchs
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceill>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fchs
fstpt  (%rsp)
call   1030 <floorl@plt>
fchs
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @ceill(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fneg x86_fp80 %3
%5 = call x86_fp80 @llvm.floor.f80(x86_fp80 %4)
%6 = fneg x86_fp80 %5
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @ceill(x86_fp80 %0) {
%2 = fneg x86_fp80 %0
%3 = tail call x86_fp80 @llvm.floor.f80(x86_fp80 %2)
%4 = fneg x86_fp80 %3
ret x86_fp80 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ Time;

/* Variables and functions */
int /*<<< orphan*/ cdelete(void *, int /*<<< orphan*/);
void delete (void *client, Time t) { cdelete(client, t); }


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

x86 assembly (clang, -O2):
<delete>:
jmp    1030 <cdelete@plt>

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

LLVM IR (-O2):
define void @delete(i8* %0, i32 %1) {
%3 = tail call i32 @cdelete(i8* %0, i32 %1)
ret void
}
int __attribute__((no)) foo(short x, unsigned short y) { return x * y; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movswl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
imul   %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i16 signext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = mul nsw i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @foo(i16 signext %0, i16 zeroext %1) {
%3 = sext i16 %0 to i32
%4 = zext i16 %1 to i32
%5 = mul nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
scalar_t__ test_point_neg(unsigned int);
void check_neg_point(unsigned int number_of_tests) {
  printf("Point neg:\n");
  if (test_point_neg(number_of_tests)) {
    printf("Success\n");
  } else {
    printf("Failed\n");
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<check_neg_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <test_point_neg@plt>
cmp    $0x0,%rax
je     115a <check_neg_point+0x3a>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
jmp    1166 <check_neg_point+0x46>
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_neg_point>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%edi
call   1050 <test_point_neg@plt>
test   %rax,%rax
lea    0xebb(%rip),%rax
lea    0xebb(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Point neg:\0A\00"
@.str.1 = [9 x i8] c"Success\0A\00"
@.str.2 = [8 x i8] c"Failed\0A\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @check_neg_point(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i64 @test_point_neg(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %1
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"Point neg:\00"
@str.4 = [7 x i8] c"Failed\00"
@str.5 = [8 x i8] c"Success\00"
define void @check_neg_point(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = tail call i64 @test_point_neg(i32 %0)
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @str.5, i64 0, i64 0)
%6 = tail call i32 @puts(i8* dereferenceable(1) %5)
%7 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGABRT;
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ sigignore(int /*<<< orphan*/);
int main(void) {
  if (sigignore(SIGABRT) != 0) {
    perror("sigignore failed");
    return 2;
  }
  printf("Test PASSED\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
call   1030 <sigignore@plt>
cmp    $0x0,%rax
je     116f <main+0x3f>
lea    0xea2(%rip),%rdi
call   1050 <perror@plt>
movl   $0x2,-0x4(%rbp)
jmp    1182 <main+0x52>
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <sigignore@plt>
test   %rax,%rax
jne    1154 <main+0x24>
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xea5(%rip),%rdi
call   1050 <perror@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGABRT = global i32 0
@.str = [17 x i8] c"sigignore failed\00"
@.str.1 = [13 x i8] c"Test PASSED\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGABRT
%3 = call i64 @sigignore(i32 %2)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
store i32 2, i32* %1
br label %9
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@SIGABRT = global i32 0
@.str = [17 x i8] c"sigignore failed\00"
@str = [12 x i8] c"Test PASSED\00"
define i32 @main() {
%1 = load i32, i32* @SIGABRT
%2 = tail call i64 @sigignore(i32 %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ 2, %4 ], [ 0, %6 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ driveTicksToInches(long);
float inToCm(int /*<<< orphan*/);
float driveTicksToCentimeters(long ticks) {
  return inToCm(driveTicksToInches(ticks));
}


x86 assembly (clang, -O0):
<driveTicksToCentimeters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <driveTicksToInches@plt>
mov    %eax,%edi
call   1030 <inToCm@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<driveTicksToCentimeters>:
push   %rax
call   1040 <driveTicksToInches@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <inToCm@plt>

LLVM IR (-O0):
define float @driveTicksToCentimeters(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @driveTicksToInches(i64 %3)
%5 = call float @inToCm(i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @driveTicksToCentimeters(i64 %0) {
%2 = tail call i32 @driveTicksToInches(i64 %0)
%3 = tail call float @inToCm(i32 %2)
ret float %3
}
/* Variables and functions */
long double truncl(long double);
long double nearbyintl(long double x) { return truncl(x); }


x86 assembly (clang, -O0):
<nearbyintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <truncl@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nearbyintl>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <truncl@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @nearbyintl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @llvm.trunc.f80(x86_fp80 %3)
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @nearbyintl(x86_fp80 %0) {
%2 = tail call x86_fp80 @llvm.trunc.f80(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0x10() {
  Assert_real((isalpha(16) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalpha.c",
              85, ("isalpha should be 0 for 0x10"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalpha.c\00"
@.str.1 = [29 x i8] c"isalpha should be 0 for 0x10\00"
define void @t_isalpha_0x10() {
%1 = tail call i64 @isalpha(i32 16)
%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 85, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int lisys_dir_filter_visible(const char *dir, const char *name, void *data) {
  if (name[0] == '.')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<lisys_dir_filter_visible>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    112c <lisys_dir_filter_visible+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    1133 <lisys_dir_filter_visible+0x33>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lisys_dir_filter_visible>:
xor    %eax,%eax
cmpb   $0x2e,(%rsi)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @lisys_dir_filter_visible(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture readnone %2) {
%4 = load i8, i8* %1
%5 = icmp ne i8 %4, 46
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
struct s390Device {
  int dummy;
};
struct device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ freeDevice(struct device *);
void s390FreeDevice(struct s390Device *dev) {
  freeDevice((struct device *)dev);
}


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

x86 assembly (clang, -O2):
<s390FreeDevice>:
jmp    1030 <freeDevice@plt>

LLVM IR (-O0):
%struct.s390Device = type { i32 }
%struct.device = type { i32 }
define void @s390FreeDevice(%struct.s390Device* %0) {
%2 = alloca %struct.s390Device*
store %struct.s390Device* %0, %struct.s390Device** %2
%3 = load %struct.s390Device*, %struct.s390Device** %2
%4 = bitcast %struct.s390Device* %3 to %struct.device*
%5 = call i32 @freeDevice(%struct.device* %4)
ret void
}

LLVM IR (-O2):
%struct.s390Device = type { i32 }
%struct.device = type { i32 }
define void @s390FreeDevice(%struct.s390Device* %0) {
%2 = bitcast %struct.s390Device* %0 to %struct.device*
%3 = tail call i32 @freeDevice(%struct.device* %2)
ret void
}
int memspan(char const *buf, char ch, int len) {
  while (len-- >= 0 && buf[len] == ch)
    ;
  return len < 0;
}


x86 assembly (clang, -O0):
<memspan>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    %ecx,%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
jl     1142 <memspan+0x42>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1152 <memspan+0x52>
jmp    1157 <memspan+0x57>
jmp    1111 <memspan+0x11>
cmpl   $0x0,-0x10(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memspan>:
movslq %edx,%rdx
cmp    $0xffffffff,%edx
mov    $0xffffffff,%r8d
cmovl  %edx,%r8d
lea    0x1(%rdx),%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %rdx,%rdx
js     1138 <memspan+0x38>
add    $0xffffffff,%ecx
lea    -0x1(%rdx),%rax
cmp    %sil,-0x1(%rdi,%rdx,1)
mov    %rax,%rdx
je     1120 <memspan+0x20>
jmp    113b <memspan+0x3b>
mov    %r8d,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setle  %al
ret

LLVM IR (-O0):
define i32 @memspan(i8* %0, i8 signext %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
br label %7
7: ; preds = %23, %3
%8 = load i32, i32* %6
%9 = add nsw i32 %8, -1
store i32 %9, i32* %6
%10 = icmp sge i32 %8, 0
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i8, i8* %5
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %17, %19
br label %21
21: ; preds = %11, %7
%22 = phi i1 [ false, %7 ], [ %20, %11 ]
br i1 %22, label %23, label %24
23: ; preds = %21
br label %7
24: ; preds = %21
%25 = load i32, i32* %6
%26 = icmp slt i32 %25, 0
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @memspan(i8* nocapture %0, i8 signext %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = call i32 @llvm.smin.i32(i32 %2, i32 -1)
br label %6
6: ; preds = %10, %3
%7 = phi i64 [ %8, %10 ], [ %4, %3 ]
%8 = add nsw i64 %7, -1
%9 = icmp sgt i64 %7, -1
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 %8
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, %1
br i1 %13, label %6, label %14
14: ; preds = %10
%15 = trunc i64 %7 to i32
br label %16
16: ; preds = %6, %14
%17 = phi i32 [ %15, %14 ], [ %5, %6 ]
%18 = icmp slt i32 %17, 1
%19 = zext i1 %18 to i32
ret i32 %19
}
/* Type definitions */
typedef int uint8_t;
typedef scalar_t__ uint32_t;

/* Variables and functions */
void USBHostMode(uint32_t ui32Base) {
  ;
  (*((volatile uint8_t *)(ui32Base + 0x0000041C))) = 0x00000002;
}


x86 assembly (clang, -O0):
<USBHostMode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,0x41c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostMode>:
movl   $0x2,0x41c(%rdi)
ret

LLVM IR (-O0):
define void @USBHostMode(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1052
%5 = inttoptr i64 %4 to i32*
store volatile i32 2, i32* %5
ret void
}

LLVM IR (-O2):
define void @USBHostMode(i64 %0) {
%2 = add nsw i64 %0, 1052
%3 = inttoptr i64 %2 to i32*
store volatile i32 2, i32* %3
ret void
}
int main() {
  float x$1 = ((float)({
    double t$1 = 0x0p+0;
    (((int)t$1) ? t$1 : 0x1.b333333333333p+2);
  }));
  float y$1 = 0x1.8p+2f;
  printf("%f %f\n", x$1, y$1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
cmp    $0x0,%eax
je     1144 <main+0x34>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1156 <main+0x46>
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    1156 <main+0x46>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe92(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x1c(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe78(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [7 x i8] c"%f %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca double
%4 = alloca double
%5 = alloca float
store i32 0, i32* %1
store double 0.000000e+00, double* %3
%6 = load double, double* %3
%7 = fptosi double %6 to i32
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = load double, double* %3
br label %12
11: ; preds = %0
br label %12
12: ; preds = %11, %9
%13 = phi double [ %10, %9 ], [ 6.800000e+00, %11 ]
store double %13, double* %4
%14 = load double, double* %4
%15 = fptrunc double %14 to float
store float %15, float* %2
store float 6.000000e+00, float* %5
%16 = load float, float* %2
%17 = fpext float %16 to double
%18 = load float, float* %5
%19 = fpext float %18 to double
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double %17, double %19)
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f %f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), double 0x401B333340000000, double 6.000000e+00)
ret i32 0
}
/* Type definitions */
struct imgImage {
  int dummy;
};

/* Variables and functions */
int read_tga(char const *, struct imgImage *, int /*<<< orphan*/);
int imgStatImgTga(const char *filename, struct imgImage *img_data) {
  int err = read_tga(filename, img_data, 0);
  return err;
}


x86 assembly (clang, -O0):
<imgStatImgTga>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1030 <read_tga@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.imgImage = type { i32 }
define i32 @imgStatImgTga(i8* %0, %struct.imgImage* %1) {
%3 = alloca i8*
%4 = alloca %struct.imgImage*
%5 = alloca i32
store i8* %0, i8** %3
store %struct.imgImage* %1, %struct.imgImage** %4
%6 = load i8*, i8** %3
%7 = load %struct.imgImage*, %struct.imgImage** %4
%8 = call i32 @read_tga(i8* %6, %struct.imgImage* %7, i32 0)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
%struct.imgImage = type { i32 }
define i32 @imgStatImgTga(i8* %0, %struct.imgImage* %1) {
%3 = tail call i32 @read_tga(i8* %0, %struct.imgImage* %1, i32 0)
ret i32 %3
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int read_byte(scalar_t__);
uint16_t read_word(uint8_t addr) {
  return (read_byte(addr + 1) << 8) | read_byte(addr);
}


x86 assembly (clang, -O0):
<read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x1,%rdi
call   1030 <read_byte@plt>
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <read_byte@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_word>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
add    $0x1,%rdi
call   1030 <read_byte@plt>
mov    %eax,%ebp
shl    $0x8,%ebp
mov    %rbx,%rdi
call   1030 <read_byte@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @read_word(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1
%5 = call i32 @read_byte(i64 %4)
%6 = shl i32 %5, 8
%7 = load i64, i64* %2
%8 = call i32 @read_byte(i64 %7)
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @read_word(i64 %0) {
%2 = add nsw i64 %0, 1
%3 = tail call i32 @read_byte(i64 %2)
%4 = shl i32 %3, 8
%5 = tail call i32 @read_byte(i64 %0)
%6 = or i32 %4, %5
ret i32 %6
}
int f(int x) {
  static int y;
  return x;
}


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

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

LLVM IR (-O0):
@f.y = internal global i32 0
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
ret i32 %3
}

LLVM IR (-O2):
define i32 @f(i32 returned %0) {
ret i32 %0
}
void *incompatible_return(int which, struct S1 *s1, struct S2 *s2) {
  if (which == 1)
    return s1;
  else
    return s2;
}


x86 assembly (clang, -O0):
<incompatible_return>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1126 <incompatible_return+0x26>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112e <incompatible_return+0x2e>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<incompatible_return>:
mov    %rsi,%rax
cmp    $0x1,%edi
cmovne %rdx,%rax
ret

LLVM IR (-O0):
%struct.S1 = type opaque
%struct.S2 = type opaque
define i8* @incompatible_return(i32 %0, %struct.S1* %1, %struct.S2* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.S1*
%7 = alloca %struct.S2*
store i32 %0, i32* %5
store %struct.S1* %1, %struct.S1** %6
store %struct.S2* %2, %struct.S2** %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load %struct.S1*, %struct.S1** %6
%12 = bitcast %struct.S1* %11 to i8*
store i8* %12, i8** %4
br label %16
13: ; preds = %3
%14 = load %struct.S2*, %struct.S2** %7
%15 = bitcast %struct.S2* %14 to i8*
store i8* %15, i8** %4
br label %16
16: ; preds = %13, %10
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
%struct.S1 = type opaque
%struct.S2 = type opaque
define i8* @incompatible_return(i32 %0, %struct.S1* readnone %1, %struct.S2* readnone %2) {
%4 = icmp eq i32 %0, 1
%5 = bitcast %struct.S1* %1 to i8*
%6 = bitcast %struct.S2* %2 to i8*
%7 = select i1 %4, i8* %5, i8* %6
ret i8* %7
}