xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void init_serial() {
  outb(0x3f8 + 1, 0x00);
  outb(0x3f8 + 3, 0x80);
  outb(0x3f8 + 0, 0x01);
  outb(0x3f8 + 1, 0x00);
  outb(0x3f8 + 3, 0x03);
  outb(0x3f8 + 2, 0x00);
  outb(0x3f8 + 4, 0x0B);
}


x86 assembly (clang, -O0):
<init_serial>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3fa,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fc,%edi
mov    $0xb,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_serial>:
push   %rax
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3fa,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fc,%edi
mov    $0xb,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @init_serial() {
%1 = call i32 @outb(i32 1017, i32 0)
%2 = call i32 @outb(i32 1019, i32 128)
%3 = call i32 @outb(i32 1016, i32 1)
%4 = call i32 @outb(i32 1017, i32 0)
%5 = call i32 @outb(i32 1019, i32 3)
%6 = call i32 @outb(i32 1018, i32 0)
%7 = call i32 @outb(i32 1020, i32 11)
ret void
}

LLVM IR (-O2):
define void @init_serial() {
%1 = tail call i32 @outb(i32 1017, i32 0)
%2 = tail call i32 @outb(i32 1019, i32 128)
%3 = tail call i32 @outb(i32 1016, i32 1)
%4 = tail call i32 @outb(i32 1017, i32 0)
%5 = tail call i32 @outb(i32 1019, i32 3)
%6 = tail call i32 @outb(i32 1018, i32 0)
%7 = tail call i32 @outb(i32 1020, i32 11)
ret void
}
/* Type definitions */
struct _cl_sampler {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct _cl_sampler *);
void opencl_sampler_free(struct _cl_sampler *sampler) { free(sampler); }


x86 assembly (clang, -O0):
<opencl_sampler_free>:
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):
<opencl_sampler_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct._cl_sampler = type { i32 }
define void @opencl_sampler_free(%struct._cl_sampler* nocapture %0) {
%2 = tail call i32 @free(%struct._cl_sampler* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int nb_cigarettesFume = NULL;
  nb_cigarettesFume = (((20 / 10) * 7) * ((8 * 365) + (2 * (365 + 1))));
  printf("Eric aurait pu economiser %d euros en dix ans.", nb_cigarettesFume);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [47 x i8] c"Eric aurait pu economiser %d euros en dix ans.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 51128, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [47 x i8] c"Eric aurait pu economiser %d euros en dix ans.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 51128)
ret i32 0
}
void ff_hevc_put_hevc_bi_w_qpel_h4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h4_10_sse4() {
ret void
}
float __ocl_half_divide_float(float src1, float src2) { return src1 / src2; }


x86 assembly (clang, -O0):
<__ocl_half_divide_float>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_half_divide_float>:
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__ocl_half_divide_float(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* %4
%7 = fdiv float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @__ocl_half_divide_float(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ Cffempty();
extern void ftpdef_(void) {
  ;
  Cffempty();
  return;
}


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

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

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

LLVM IR (-O2):
define void @ftpdef_() {
%1 = tail call i32 (...) @Cffempty()
ret void
}
/* Type definitions */
typedef int uint64_t;
typedef int int64_t;

/* Variables and functions */
int64_t pts_signed_diff(uint64_t x, uint64_t y) {
  int64_t r = x - y;
  return (r << 31) >> 31;
}


x86 assembly (clang, -O0):
<pts_signed_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1f,%eax
sar    $0x1f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pts_signed_diff>:
mov    %edi,%eax
sub    %esi,%eax
and    $0x1,%eax
neg    %eax
ret

LLVM IR (-O0):
define i32 @pts_signed_diff(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = shl i32 %9, 31
%11 = ashr i32 %10, 31
ret i32 %11
}

LLVM IR (-O2):
define i32 @pts_signed_diff(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = and i32 %3, 1
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Type definitions */
struct stream {
  int dummy;
};

/* Variables and functions */
int decode_atom_format_6_1(unsigned char const *, struct stream *);
int decode_atom_format_6_11(const unsigned char *pkt, struct stream *stream) {
  return decode_atom_format_6_1(pkt, stream);
}


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

x86 assembly (clang, -O2):
<decode_atom_format_6_11>:
jmp    1030 <decode_atom_format_6_1@plt>

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

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_atom_format_6_11(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_atom_format_6_1(i8* %0, %struct.stream* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void keyboard(unsigned char ch, int x, int y) {
  (void)x;
  (void)y;
  if ((ch == 'q') || (ch == 'Q'))
    exit(0);
}


x86 assembly (clang, -O0):
<keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x71,%eax
je     113e <keyboard+0x2e>
movzbl -0x1(%rbp),%eax
cmp    $0x51,%eax
jne    1145 <keyboard+0x35>
xor    %edi,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard>:
and    $0xdf,%dil
cmp    $0x51,%dil
je     111b <keyboard+0xb>
ret
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 113
br i1 %11, label %16, label %12
12: ; preds = %3
%13 = load i8, i8* %4
%14 = zext i8 %13 to i32
%15 = icmp eq i32 %14, 81
br i1 %15, label %16, label %18
16: ; preds = %12, %3
%17 = call i32 @exit(i32 0)
unreachable
18: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = and i8 %0, -33
%5 = icmp eq i8 %4, 81
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %3
ret void
}
/* Variables and functions */
unsigned int hasard(unsigned int const, unsigned int const);
unsigned int tirerVieAleatoireNouveauEnnemi(const unsigned int niveauIA) {
  static const unsigned int baseVieEnnemi[3][2] = {{7, 12}, {12, 21}, {21, 35}};
  return hasard(baseVieEnnemi[niveauIA][0], baseVieEnnemi[niveauIA][1]);
}


x86 assembly (clang, -O0):
<tirerVieAleatoireNouveauEnnemi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xed9(%rip),%rax
mov    (%rax,%rcx,8),%edi
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
lea    0xeca(%rip),%rax
mov    0x4(%rax,%rcx,8),%esi
call   1030 <hasard@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tirerVieAleatoireNouveauEnnemi>:
mov    %edi,%eax
lea    0xee7(%rip),%rcx
mov    (%rcx,%rax,8),%edi
mov    0x4(%rcx,%rax,8),%esi
jmp    1030 <hasard@plt>

LLVM IR (-O0):
@tirerVieAleatoireNouveauEnnemi.baseVieEnnemi = internal constant [3 x [2 x i32]] [[2 x i32] [i32 7, i32 12], [2 x i32] [i32 12, i32 21], [2 x i32] [i32 21, i32 35]]
define i32 @tirerVieAleatoireNouveauEnnemi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerVieAleatoireNouveauEnnemi.baseVieEnnemi, i64 0, i64 %4
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%7 = load i32, i32* %6
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerVieAleatoireNouveauEnnemi.baseVieEnnemi, i64 0, i64 %9
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%12 = load i32, i32* %11
%13 = call i32 @hasard(i32 %7, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@tirerVieAleatoireNouveauEnnemi.baseVieEnnemi = internal unnamed_addr constant [3 x [2 x i32]] [[2 x i32] [i32 7, i32 12], [2 x i32] [i32 12, i32 21], [2 x i32] [i32 21, i32 35]]
define i32 @tirerVieAleatoireNouveauEnnemi(i32 %0) {
%2 = zext i32 %0 to i64
%3 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerVieAleatoireNouveauEnnemi.baseVieEnnemi, i64 0, i64 %2, i64 0
%4 = load i32, i32* %3
%5 = getelementptr inbounds [3 x [2 x i32]], [3 x [2 x i32]]* @tirerVieAleatoireNouveauEnnemi.baseVieEnnemi, i64 0, i64 %2, i64 1
%6 = load i32, i32* %5
%7 = tail call i32 @hasard(i32 %4, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr,
          "usage: %s [-p <protocol>] [-h <head skip>] [-s <src mac address>] "
          "[-d <dst mac address>] <input filename> <output filename>\n",
          progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [125 x i8] c"usage: %s [-p <protocol>] [-h <head skip>] [-s <src mac address>] [-d <dst mac address>] <input filename> <output filename>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [125 x i8] c"usage: %s [-p <protocol>] [-h <head skip>] [-s <src mac address>] [-d <dst mac address>] <input filename> <output filename>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([125 x i8], [125 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf2(char *);
void GenStartAsciiString(void) { printf2("\ttext("); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\09text(\00"
define void @GenStartAsciiString() {
%1 = call i32 @printf2(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\09text(\00"
define void @GenStartAsciiString() {
%1 = tail call i32 @printf2(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct device {
  int dummy;
};
struct ddcDevice {
  int dummy;
};

/* Variables and functions */
int compareDevice(struct device *, struct device *);
int ddcCompareDevice(struct ddcDevice *dev1, struct ddcDevice *dev2) {
  return compareDevice((struct device *)dev1, (struct device *)dev2);
}


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

x86 assembly (clang, -O2):
<ddcCompareDevice>:
jmp    1030 <compareDevice@plt>

LLVM IR (-O0):
%struct.ddcDevice = type { i32 }
%struct.device = type { i32 }
define i32 @ddcCompareDevice(%struct.ddcDevice* %0, %struct.ddcDevice* %1) {
%3 = alloca %struct.ddcDevice*
%4 = alloca %struct.ddcDevice*
store %struct.ddcDevice* %0, %struct.ddcDevice** %3
store %struct.ddcDevice* %1, %struct.ddcDevice** %4
%5 = load %struct.ddcDevice*, %struct.ddcDevice** %3
%6 = bitcast %struct.ddcDevice* %5 to %struct.device*
%7 = load %struct.ddcDevice*, %struct.ddcDevice** %4
%8 = bitcast %struct.ddcDevice* %7 to %struct.device*
%9 = call i32 @compareDevice(%struct.device* %6, %struct.device* %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.ddcDevice = type { i32 }
%struct.device = type { i32 }
define i32 @ddcCompareDevice(%struct.ddcDevice* %0, %struct.ddcDevice* %1) {
%3 = bitcast %struct.ddcDevice* %0 to %struct.device*
%4 = bitcast %struct.ddcDevice* %1 to %struct.device*
%5 = tail call i32 @compareDevice(%struct.device* %3, %struct.device* %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ g(int *);
int f(int x, int y[x]) {
  int buf[x];
  g(buf);
  return buf[2];
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x18(%rbp)
lea    0xf(,%rax,4),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x28(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x20(%rbp)
call   1030 <g@plt>
mov    -0x28(%rbp),%rax
mov    0x8(%rax),%eax
mov    -0x18(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbp
mov    %rsp,%rbp
push   %r14
push   %rbx
mov    %edi,%eax
mov    %rsp,%r14
lea    0xf(,%rax,4),%rbx
and    $0xfffffffffffffff0,%rbx
mov    %r14,%rdi
sub    %rbx,%rdi
mov    %rdi,%rsp
call   1030 <g@plt>
neg    %rbx
mov    0x8(%r14,%rbx,1),%eax
lea    -0x10(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = call i8* @llvm.stacksave()
store i8* %11, i8** %5
%12 = alloca i32, i64 %10
store i64 %10, i64* %6
%13 = call i32 @g(i32* %12)
%14 = getelementptr inbounds i32, i32* %12, i64 2
%15 = load i32, i32* %14
%16 = load i8*, i8** %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32* nocapture readnone %1) {
%3 = zext i32 %0 to i64
%4 = alloca i32, i64 %3
%5 = call i32 @g(i32* %4)
%6 = getelementptr inbounds i32, i32* %4, i64 2
%7 = load i32, i32* %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct abr {
  int dummy;
};
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ rec_parcours_abr(struct abr *, char *, int /*<<< orphan*/,
                                    int /*<<< orphan*/ *);
int8_t next_huffman_value(struct abr *table, char *code) {
  char *direction = code;
  uint8_t symb;
  rec_parcours_abr(table, direction, 0, &symb);
  return symb;
}


x86 assembly (clang, -O0):
<next_huffman_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
xor    %edx,%edx
lea    -0x1c(%rbp),%rcx
call   1030 <rec_parcours_abr@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_huffman_value>:
push   %rax
lea    0x4(%rsp),%rcx
xor    %edx,%edx
call   1030 <rec_parcours_abr@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.abr = type { i32 }
define i32 @next_huffman_value(%struct.abr* %0, i8* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @rec_parcours_abr(%struct.abr* %0, i8* %1, i32 0, i32* %3)
%6 = load i32, i32* %3
ret i32 %6
}
int test_imm_AAuint8_mem(unsigned char *val) {
  return ((*val) & (0xAA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AAuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xaa,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_AAuint8_mem>:
testb  $0xaa,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_AAuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -86
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a = 1;
  int b;
  if (a--)
    printf("%d", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1149 <main+0x39>
mov    -0x8(%rbp),%esi
lea    0xebc(%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
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
void fs_write_ini(char *dir, char *name) {}


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

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

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

LLVM IR (-O2):
define void @fs_write_ini(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ milli_delay(int);
int /*<<< orphan*/ printf(char *);
void TestC() {
  int i = 0x2000;
  while (1) {
    printf("C");
    milli_delay(200);
  }
}


x86 assembly (clang, -O0):
<TestC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2000,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    $0xc8,%edi
call   1040 <milli_delay@plt>
jmp    112f <TestC+0xf>

x86 assembly (clang, -O2):
<TestC>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x43,%edi
call   1030 <putchar@plt>
mov    $0xc8,%edi
call   1040 <milli_delay@plt>
jmp    1130 <TestC+0x10>

LLVM IR (-O0):
@.str = [2 x i8] c"C\00"
define void @TestC() {
%1 = alloca i32
store i32 8192, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @milli_delay(i32 200)
br label %2
}

LLVM IR (-O2):
define void @TestC() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @putchar(i32 67)
%3 = tail call i32 @milli_delay(i32 200)
br label %1
}
long rpb_routine(long p) {
  long price;
  price = 90000;
  price += (p / 10) % 20001;
  price += (p % 1000) * 100;
  return (price);
}


x86 assembly (clang, -O0):
<rpb_routine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x15f90,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    $0x4e21,%ecx
cqto
idiv   %rcx
add    -0x10(%rbp),%rdx
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
imul   $0x64,%rdx,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpb_routine>:
movabs $0x6666666666666667,%rcx
66 66 66
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rcx
add    %rax,%rcx
movabs $0x1a368d05fa30683d,%rdx
8d 36 1a
mov    %rcx,%rax
imul   %rdx
mov    %rdx,%rsi
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0xb,%rsi
add    %rax,%rsi
movabs $0x20c49ba5e353f7cf,%rdx
9b c4 20
mov    %rdi,%rax
imul   %rdx
imul   $0x4e21,%rsi,%rax
sub    %rax,%rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rax,%rdx
imul   $0x3e8,%rdx,%rax
sub    %rax,%rdi
imul   $0x64,%rdi,%rax
add    %rcx,%rax
add    $0x15f90,%rax
ret

LLVM IR (-O0):
define i64 @rpb_routine(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %2
store i64 90000, i64* %3
%4 = load i64, i64* %2
%5 = sdiv i64 %4, 10
%6 = srem i64 %5, 20001
%7 = load i64, i64* %3
%8 = add nsw i64 %7, %6
store i64 %8, i64* %3
%9 = load i64, i64* %2
%10 = srem i64 %9, 1000
%11 = mul nsw i64 %10, 100
%12 = load i64, i64* %3
%13 = add nsw i64 %12, %11
store i64 %13, i64* %3
%14 = load i64, i64* %3
ret i64 %14
}

LLVM IR (-O2):
define i64 @rpb_routine(i64 %0) {
%2 = sdiv i64 %0, 10
%3 = srem i64 %2, 20001
%4 = add nsw i64 %3, 90000
%5 = srem i64 %0, 1000
%6 = mul nsw i64 %5, 100
%7 = add nsw i64 %4, %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ memcpy(char *, char *, size_t);
char *xmalloc(size_t);
char *mem2str(char *p, size_t n) {
  char *q;
  if ((q = xmalloc(n + 1)) == NULL)
    exit(1);
  memcpy(q, p, n + 1);
  *(q + n) = 0;
  return q;
}


x86 assembly (clang, -O0):
<mem2str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1165 <mem2str+0x35>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
add    $0x1,%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mem2str>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
lea    0x1(%rsi),%r12
mov    %r12,%rdi
call   1030 <xmalloc@plt>
test   %rax,%rax
je     1174 <mem2str+0x44>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
call   1040 <memcpy@plt>
movb   $0x0,(%rbx,%r14,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i8* @mem2str(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = add i64 %6, 1
%8 = call i8* @xmalloc(i64 %7)
store i8* %8, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i8*, i8** %5
%14 = load i8*, i8** %3
%15 = load i64, i64* %4
%16 = add i64 %15, 1
%17 = call i32 @memcpy(i8* %13, i8* %14, i64 %16)
%18 = load i8*, i8** %5
%19 = load i64, i64* %4
%20 = getelementptr inbounds i8, i8* %18, i64 %19
store i8 0, i8* %20
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @mem2str(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i8* @xmalloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %3)
%10 = getelementptr inbounds i8, i8* %4, i64 %1
store i8 0, i8* %10
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ system(char *);
int edit_rc_conf(void) {
  endwin();
  system(" /usr/bin/ee "
         " /etc/rc.conf");
  return 0;
}


x86 assembly (clang, -O0):
<edit_rc_conf>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <endwin@plt>
lea    0xece(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<edit_rc_conf>:
push   %rax
xor    %eax,%eax
call   1040 <endwin@plt>
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c" /usr/bin/ee /etc/rc.conf\00"
define i32 @edit_rc_conf() {
%1 = call i32 (...) @endwin()
%2 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c" /usr/bin/ee /etc/rc.conf\00"
define i32 @edit_rc_conf() {
%1 = tail call i32 (...) @endwin()
%2 = tail call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  int num;
  num = 1;
  printf("I am a simple");
  printf(" computer.\n");
  printf("My favorite number is %d because it is first.\n", num);
  return 2;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"I am a simple\00"
@.str.1 = [12 x i8] c" computer.\0A\00"
@.str.2 = [47 x i8] c"My favorite number is %d because it is first.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 2
}

LLVM IR (-O2):
@.str = [14 x i8] c"I am a simple\00"
@.str.2 = [47 x i8] c"My favorite number is %d because it is first.\0A\00"
@str = [11 x i8] c" computer.\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 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 i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i32 1)
ret i32 2
}
void PR20473() {
  bar((char[2]){""});
  bar((char[3]){""});
}


x86 assembly (clang, -O0):
<PR20473>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee1(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0x2(%rbp),%rdi
mov    $0x0,%al
call   1030 <bar@plt>
mov    0xecd(%rip),%ax
mov    %ax,-0x5(%rbp)
mov    0xec5(%rip),%al
mov    %al,-0x3(%rbp)
lea    -0x5(%rbp),%rdi
mov    $0x0,%al
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PR20473>:
push   %rax
movw   $0x0,0x6(%rsp)
lea    0x6(%rsp),%rdi
xor    %eax,%eax
call   1030 <bar@plt>
movw   $0x0,0x2(%rsp)
movb   $0x0,0x4(%rsp)
lea    0x2(%rsp),%rdi
xor    %eax,%eax
call   1030 <bar@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [2 x i8] zeroinitializer
@.str.1 = [3 x i8] zeroinitializer
define void @PR20473() {
%1 = alloca [2 x i8]
%2 = alloca [3 x i8]
%3 = bitcast [2 x i8]* %1 to i8*
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @bar to i32 (i8*, ...)*)(i8* %4)
%6 = bitcast [3 x i8]* %2 to i8*
%7 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @bar to i32 (i8*, ...)*)(i8* %7)
ret void
}

LLVM IR (-O2):
define void @PR20473() {
%1 = alloca i16
%2 = alloca [3 x i8]
store i16 0, i16* %1
%3 = bitcast i16* %1 to i8*
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @bar to i32 (i8*, ...)*)(i8* %3)
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @bar to i32 (i8*, ...)*)(i8* %5)
ret void
}
/* Variables and functions */
float ceilf(float const);
float stdlib_base_ceilf(const float x) { return ceilf(x); }


x86 assembly (clang, -O0):
<stdlib_base_ceilf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <ceilf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdlib_base_ceilf>:
jmp    1030 <ceilf@plt>

LLVM IR (-O0):
define float @stdlib_base_ceilf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @llvm.ceil.f32(float %3)
ret float %4
}

LLVM IR (-O2):
define float @stdlib_base_ceilf(float %0) {
%2 = tail call float @llvm.ceil.f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalpha(int);
void t_isalpha_0xb1() {
  Assert_real((isalpha(177) == 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",
              890, ("isalpha should be 0 for 0xb1"));
}


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

x86 assembly (clang, -O2):
<t_isalpha_0xb1>:
push   %rax
mov    $0xb1,%edi
call   1030 <isalpha@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x37a,%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 0xb1\00"
define void @t_isalpha_0xb1() {
%1 = call i64 @isalpha(i32 177)
%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 890, 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 0xb1\00"
define void @t_isalpha_0xb1() {
%1 = tail call i64 @isalpha(i32 177)
%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 890, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void m44f_translate_left(float *src, float dx, float dy, float dz) {
  float *t = src + 3;
  t[0] += dx;
  t[4] += dy;
  t[8] += dz;
}


x86 assembly (clang, -O0):
<m44f_translate_left>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
mov    -0x8(%rbp),%rax
add    $0xc,%rax
mov    %rax,-0x20(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  (%rax),%xmm0
movss  %xmm0,(%rax)
movss  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  0x10(%rax),%xmm0
movss  %xmm0,0x10(%rax)
movss  -0x14(%rbp),%xmm0
mov    -0x20(%rbp),%rax
addss  0x20(%rax),%xmm0
movss  %xmm0,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<m44f_translate_left>:
addss  0xc(%rdi),%xmm0
movss  %xmm0,0xc(%rdi)
addss  0x1c(%rdi),%xmm1
movss  %xmm1,0x1c(%rdi)
addss  0x2c(%rdi),%xmm2
movss  %xmm2,0x2c(%rdi)
ret

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

LLVM IR (-O2):
define void @m44f_translate_left(float* nocapture %0, float %1, float %2, float %3) {
%5 = getelementptr inbounds float, float* %0, i64 3
%6 = load float, float* %5
%7 = fadd float %6, %1
store float %7, float* %5
%8 = getelementptr inbounds float, float* %0, i64 7
%9 = load float, float* %8
%10 = fadd float %9, %2
store float %10, float* %8
%11 = getelementptr inbounds float, float* %0, i64 11
%12 = load float, float* %11
%13 = fadd float %12, %3
store float %13, float* %11
ret void
}
int XDisplayHeight() {}


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

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

LLVM IR (-O0):
define i32 @XDisplayHeight() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XDisplayHeight() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ glPushMatrix();
int /*<<< orphan*/ printf(char *, ...);
void trace_glPushMatrix(void) {
  printf("%20s(", "glPushMatrix");
  printf(");\n");
  glPushMatrix();
}


x86 assembly (clang, -O0):
<trace_glPushMatrix>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <glPushMatrix@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<trace_glPushMatrix>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xec7(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <glPushMatrix@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%20s(\00"
@.str.1 = [13 x i8] c"glPushMatrix\00"
@.str.2 = [4 x i8] c");\0A\00"
define void @trace_glPushMatrix() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (...) @glPushMatrix()
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%20s(\00"
@.str.1 = [13 x i8] c"glPushMatrix\00"
@str = [3 x i8] c");\00"
define void @trace_glPushMatrix() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @glPushMatrix()
ret void
}
/* Variables and functions */
int strlen(char *);
scalar_t__ wormIsAltSplicedName(char *);
void makeIsoformBaseName(char *name) {
  if (wormIsAltSplicedName(name))
    name[strlen(name) - 1] = 0;
}


x86 assembly (clang, -O0):
<makeIsoformBaseName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <wormIsAltSplicedName@plt>
cmp    $0x0,%rax
je     1160 <makeIsoformBaseName+0x40>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeIsoformBaseName>:
push   %rbx
mov    %rdi,%rbx
call   1040 <wormIsAltSplicedName@plt>
test   %rax,%rax
je     113d <makeIsoformBaseName+0x1d>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
pop    %rbx
ret

LLVM IR (-O0):
define void @makeIsoformBaseName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @wormIsAltSplicedName(i8* %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = load i8*, i8** %2
%9 = call i32 @strlen(i8* %8)
%10 = sub nsw i32 %9, 1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %7, i64 %11
store i8 0, i8* %12
br label %13
13: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @makeIsoformBaseName(i8* %0) {
%2 = tail call i64 @wormIsAltSplicedName(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 0, i8* %8
br label %9
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)());
void process_keystroke_x() {
  printf("Caught x\n");
  signal(SIGUSR1, process_keystroke_x);
}


x86 assembly (clang, -O0):
<process_keystroke_x>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    0x2e98(%rip),%rsi
call   1040 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_keystroke_x>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eb4(%rip),%rax
mov    (%rax),%edi
mov    0x2e9b(%rip),%rsi
pop    %rax
jmp    1040 <signal@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Caught x\0A\00"
@SIGUSR1 = global i32 0
define void @process_keystroke_x() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @SIGUSR1
%3 = call i32 @signal(i32 %2, void (...)* bitcast (void ()* @process_keystroke_x to void (...)*))
ret void
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
@str = [9 x i8] c"Caught x\00"
define void @process_keystroke_x() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @SIGUSR1
%3 = tail call i32 @signal(i32 %2, void (...)* bitcast (void ()* @process_keystroke_x to void (...)*))
ret void
}
/* Variables and functions */
int fail_real(int /*<<< orphan*/, int);
int udiv_i16(int, int);
int test_udiv(void) {
  if (udiv_i16(-534, 7) != 9286)
    return fail_real(0, 287);
  return 0x40;
}


x86 assembly (clang, -O0):
<test_udiv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xfffffdea,%edi
mov    $0x7,%esi
call   1030 <udiv_i16@plt>
cmp    $0x2446,%eax
je     1156 <test_udiv+0x36>
xor    %edi,%edi
mov    $0x11f,%esi
call   1040 <fail_real@plt>
mov    %eax,-0x4(%rbp)
jmp    115d <test_udiv+0x3d>
movl   $0x40,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_udiv>:
push   %rax
mov    $0xfffffdea,%edi
mov    $0x7,%esi
call   1030 <udiv_i16@plt>
cmp    $0x2446,%eax
jne    113e <test_udiv+0x1e>
mov    $0x40,%eax
pop    %rcx
ret
xor    %edi,%edi
mov    $0x11f,%esi
pop    %rax
jmp    1040 <fail_real@plt>

LLVM IR (-O0):
define i32 @test_udiv() {
%1 = alloca i32
%2 = call i32 @udiv_i16(i32 -534, i32 7)
%3 = icmp ne i32 %2, 9286
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @fail_real(i32 0, i32 287)
store i32 %5, i32* %1
br label %7
6: ; preds = %0
store i32 64, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_udiv() {
%1 = tail call i32 @udiv_i16(i32 -534, i32 7)
%2 = icmp eq i32 %1, 9286
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @fail_real(i32 0, i32 287)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 64, %0 ]
ret i32 %6
}
/* Type definitions */
typedef enum spectrum { ____Placeholder_spectrum } spectrum;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, ...);
int main(void) {
  enum spectrum { read, orange, yellow, green, blue, voiolet };
  enum spectrum color;
  printf("read = %d, orange = %d \n", read, orange);
  enum levels { low = 100, medium = 200, high = 2000 };
  printf("low = %d, medium = %d, high = %d \n", low, medium, high);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [25 x i8] c"read = %d, orange = %d \0A\00"
@.str.1 = [35 x i8] c"low = %d, medium = %d, high = %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
%4 = call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 100, i32 200, i32 2000)
ret i32 0
}

LLVM IR (-O2):
@.str = [25 x i8] c"read = %d, orange = %d \0A\00"
@.str.1 = [35 x i8] c"low = %d, medium = %d, high = %d \0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
%2 = tail call i32 (i8*, i32, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 100, i32 200, i32 2000)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int);
void write_register(int n, uint16_t val) {
  printf("*************** Write Register value: %hx, addr: %d\n", val, n);
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"*************** Write Register value: %hx, addr: %d\0A\00"
define void @write_register(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"*************** Write Register value: %hx, addr: %d\0A\00"
define void @write_register(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
ret void
}