xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ stress_mlock_region(void **, void **);
void stress_mlock_executable(void) {
  extern void *__start_mlocked_text;
  extern void *__stop_mlocked_text;
  extern void *__start_mlocked_data;
  extern void *__stop_mlocked_data;
  stress_mlock_region(&__start_mlocked_text, &__stop_mlocked_text);
  stress_mlock_region(&__start_mlocked_data, &__stop_mlocked_data);
}


x86 assembly (clang, -O0):
<stress_mlock_executable>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rdi
mov    0x2e9e(%rip),%rsi
call   1030 <stress_mlock_region@plt>
mov    0x2ec2(%rip),%rdi
mov    0x2eab(%rip),%rsi
call   1030 <stress_mlock_region@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<stress_mlock_executable>:
push   %rax
mov    0x2ec0(%rip),%rdi
mov    0x2ea1(%rip),%rsi
call   1030 <stress_mlock_region@plt>
mov    0x2ec5(%rip),%rdi
mov    0x2eae(%rip),%rsi
pop    %rax
jmp    1030 <stress_mlock_region@plt>

LLVM IR (-O0):
@__start_mlocked_text = external global i8*
@__stop_mlocked_text = external global i8*
@__start_mlocked_data = external global i8*
@__stop_mlocked_data = external global i8*
define void @stress_mlock_executable() {
%1 = call i32 @stress_mlock_region(i8** @__start_mlocked_text, i8** @__stop_mlocked_text)
%2 = call i32 @stress_mlock_region(i8** @__start_mlocked_data, i8** @__stop_mlocked_data)
ret void
}

LLVM IR (-O2):
@__start_mlocked_text = external global i8*
@__stop_mlocked_text = external global i8*
@__start_mlocked_data = external global i8*
@__stop_mlocked_data = external global i8*
define void @stress_mlock_executable() {
%1 = tail call i32 @stress_mlock_region(i8** @__start_mlocked_text, i8** @__stop_mlocked_text)
%2 = tail call i32 @stress_mlock_region(i8** @__start_mlocked_data, i8** @__stop_mlocked_data)
ret void
}
int main() {
  int x = 6;
  {
    static int x = 7;
    return x;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
mov    0x2f08(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@main.x = internal global i32 7
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 6, i32* %2
%3 = load i32, i32* @main.x
ret i32 %3
}

LLVM IR (-O2):
define i32 @main() {
ret i32 7
}
unsigned char clip(const int pixel) {
  int result;
  result = ((pixel < 0) ? 0 : pixel);
  return (unsigned char)((result < 255) ? result : 255);
}


x86 assembly (clang, -O0):
<clip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    111b <clip+0x1b>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1121 <clip+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jge    113f <clip+0x3f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    114c <clip+0x4c>
mov    $0xff,%eax
mov    %eax,-0x10(%rbp)
jmp    114c <clip+0x4c>
mov    -0x10(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clip>:
xor    %ecx,%ecx
test   %edi,%edi
cmovns %edi,%ecx
cmp    $0xff,%ecx
mov    $0xff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @clip(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %9
7: ; preds = %1
%8 = load i32, i32* %2
br label %9
9: ; preds = %7, %6
%10 = phi i32 [ 0, %6 ], [ %8, %7 ]
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 255
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = load i32, i32* %3
br label %16
15: ; preds = %9
br label %16
16: ; preds = %15, %13
%17 = phi i32 [ %14, %13 ], [ 255, %15 ]
%18 = trunc i32 %17 to i8
ret i8 %18
}

LLVM IR (-O2):
define zeroext i8 @clip(i32 %0) {
%2 = icmp sgt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
%4 = icmp ult i32 %3, 255
%5 = select i1 %4, i32 %3, i32 255
%6 = trunc i32 %5 to i8
ret i8 %6
}
void cw1200_debug_ba(struct cw1200_common *priv, int ba_cnt, int ba_acc) {}


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

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
%struct.cw1200_common = type opaque
define void @cw1200_debug_ba(%struct.cw1200_common* %0, i32 %1, i32 %2) {
%4 = alloca %struct.cw1200_common*
%5 = alloca i32
%6 = alloca i32
store %struct.cw1200_common* %0, %struct.cw1200_common** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.cw1200_common = type opaque
define void @cw1200_debug_ba(%struct.cw1200_common* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int biscSendByte(int);
int biscSendInt(int);
int biscWaitAngle(int degrees) {
  if (biscSendByte(157) == -1)
    return -1;
  if (biscSendInt(degrees) == -1)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<biscWaitAngle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x9d,%edi
call   1030 <biscSendByte@plt>
cmp    $0xffffffff,%eax
jne    114a <biscWaitAngle+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <biscWaitAngle+0x4e>
mov    -0x8(%rbp),%edi
call   1040 <biscSendInt@plt>
cmp    $0xffffffff,%eax
jne    1167 <biscWaitAngle+0x47>
movl   $0xffffffff,-0x4(%rbp)
jmp    116e <biscWaitAngle+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<biscWaitAngle>:
push   %rbx
mov    %edi,%ebx
mov    $0x9d,%edi
call   1030 <biscSendByte@plt>
cmp    $0xffffffff,%eax
je     1147 <biscWaitAngle+0x27>
mov    %ebx,%edi
call   1040 <biscSendInt@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
sete   %al
neg    %eax
pop    %rbx
ret
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @biscWaitAngle(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @biscSendByte(i32 157)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @biscSendInt(i32 %8)
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 -1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @biscWaitAngle(i32 %0) {
%2 = tail call i32 @biscSendByte(i32 157)
%3 = icmp eq i32 %2, -1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @biscSendInt(i32 %0)
%6 = icmp eq i32 %5, -1
%7 = sext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int, int,
                           char *);
void svgLine(FILE *file, char *strColor, int x1, int y1, int x2, int y2) {
  fprintf(file,
          "<line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\" "
          "style=\"stroke:%s;stroke-width:2\"/>\n",
          x1, y1, x2, y2, strColor);
}


x86 assembly (clang, -O0):
<svgLine>:
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    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x1c(%rbp),%r8d
mov    -0x20(%rbp),%r9d
mov    -0x10(%rbp),%rax
lea    0xeb5(%rip),%rsi
mov    %rax,(%rsp)
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svgLine>:
push   %rax
mov    %rsi,(%rsp)
lea    0xee4(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [74 x i8] c"<line x1=\22%d\22 y1=\22%d\22 x2=\22%d\22 y2=\22%d\22 style=\22stroke:%s;stroke-width:2\22/>\0A\00"
define void @svgLine(i32* %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%13 = load i32*, i32** %7
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = load i32, i32* %11
%17 = load i32, i32* %12
%18 = load i8*, i8** %8
%19 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %15, i32 %16, i32 %17, i8* %18)
ret void
}

LLVM IR (-O2):
@.str = [74 x i8] c"<line x1=\22%d\22 y1=\22%d\22 x2=\22%d\22 y2=\22%d\22 style=\22stroke:%s;stroke-width:2\22/>\0A\00"
define void @svgLine(i32* nocapture %0, i8* %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %3, i32 %4, i32 %5, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int main() {
  double spuren = 3712;
  double sektoren = 108;
  double byte = 512;
  double kazapitaet, megabyte;
  kazapitaet = (byte * sektoren * spuren);
  megabyte = (kazapitaet / 1024 / 1024);
  printf("\n\n\tKazapitaet Byte:\t%.2f Byte", kazapitaet);
  printf("\n\tKazapitaet MegaByte:\t%.2f Megabyte\n\n", megabyte);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xef1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xedc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xec7(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe99(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe98(%rip),%rdi
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [30 x i8] c"\0A\0A\09Kazapitaet Byte:\09%.2f Byte\00"
@.str.1 = [39 x i8] c"\0A\09Kazapitaet MegaByte:\09%.2f Megabyte\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store i32 0, i32* %1
store double 3.712000e+03, double* %2
store double 1.080000e+02, double* %3
store double 5.120000e+02, double* %4
%7 = load double, double* %4
%8 = load double, double* %3
%9 = fmul double %7, %8
%10 = load double, double* %2
%11 = fmul double %9, %10
store double %11, double* %5
%12 = load double, double* %5
%13 = fdiv double %12, 1.024000e+03
%14 = fdiv double %13, 1.024000e+03
store double %14, double* %6
%15 = load double, double* %5
%16 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double %15)
%17 = load double, double* %6
%18 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), double %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"\0A\0A\09Kazapitaet Byte:\09%.2f Byte\00"
@.str.1 = [39 x i8] c"\0A\09Kazapitaet MegaByte:\09%.2f Megabyte\0A\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), double 0x41A8780000000000)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0), double 1.957500e+02)
ret i32 0
}
/* Variables and functions */
double *new_doubleFss(int);
double *fss_NewDouble(int n) { return new_doubleFss(n); }


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

x86 assembly (clang, -O2):
<fss_NewDouble>:
jmp    1030 <new_doubleFss@plt>

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

LLVM IR (-O2):
define double* @fss_NewDouble(i32 %0) {
%2 = tail call double* @new_doubleFss(i32 %0)
ret double* %2
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ capture_event(void *, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
uint8_t capture_read_slave_pic(uint16_t port, void *p) {
  capture_event(p, (6 << 8), 0, port);
  return 0xff;
}


x86 assembly (clang, -O0):
<capture_read_slave_pic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x600,%esi
xor    %edx,%edx
call   1030 <capture_event@plt>
mov    $0xff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capture_read_slave_pic>:
push   %rax
mov    %edi,%ecx
mov    %rsi,%rdi
mov    $0x600,%esi
xor    %edx,%edx
call   1030 <capture_event@plt>
mov    $0xff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @capture_read_slave_pic(i32 %0, i8* %1) {
%3 = tail call i32 @capture_event(i8* %1, i32 1536, i32 0, i32 %0)
ret i32 255
}
/* Variables and functions */
int /*<<< orphan*/ zwave_sendClassCommand(unsigned int, int, int,
                                          unsigned char *, int);
void zwavecmd_scene_controller_set(unsigned int id, unsigned int group,
                                   unsigned int scene, unsigned int duration) {
  unsigned char buf[255];
  buf[0] = group;
  buf[1] = scene;
  buf[2] = duration;
  zwave_sendClassCommand(id, 0x2D, 0x1, buf, 3);
}


x86 assembly (clang, -O0):
<zwavecmd_scene_controller_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %al,-0x110(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,-0x10f(%rbp)
mov    -0x10(%rbp),%eax
mov    %al,-0x10e(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x110(%rbp),%rcx
mov    $0x2d,%esi
mov    $0x1,%edx
mov    $0x3,%r8d
call   1030 <zwave_sendClassCommand@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zwavecmd_scene_controller_set>:
sub    $0x108,%rsp
mov    %sil,(%rsp)
mov    %dl,0x1(%rsp)
mov    %cl,0x2(%rsp)
mov    %rsp,%rcx
mov    $0x2d,%esi
mov    $0x1,%edx
mov    $0x3,%r8d
call   1030 <zwave_sendClassCommand@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define void @zwavecmd_scene_controller_set(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [255 x i8]
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%10 = load i32, i32* %6
%11 = trunc i32 %10 to i8
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
store i8 %11, i8* %12
%13 = load i32, i32* %7
%14 = trunc i32 %13 to i8
%15 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 1
store i8 %14, i8* %15
%16 = load i32, i32* %8
%17 = trunc i32 %16 to i8
%18 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 2
store i8 %17, i8* %18
%19 = load i32, i32* %5
%20 = getelementptr inbounds [255 x i8], [255 x i8]* %9, i64 0, i64 0
%21 = call i32 @zwave_sendClassCommand(i32 %19, i32 45, i32 1, i8* %20, i32 3)
ret void
}

LLVM IR (-O2):
define void @zwavecmd_scene_controller_set(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [255 x i8]
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%7 = trunc i32 %1 to i8
store i8 %7, i8* %6
%8 = trunc i32 %2 to i8
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 1
store i8 %8, i8* %9
%10 = trunc i32 %3 to i8
%11 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 2
store i8 %10, i8* %11
%12 = call i32 @zwave_sendClassCommand(i32 %0, i32 45, i32 1, i8* %6, i32 3)
ret void
}
signed long long int
signedlonglongint_ignoring_longdouble(signed long long int x, long double y) {
  return x;
}


x86 assembly (clang, -O0):
<signedlonglongint_ignoring_longdouble>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedlonglongint_ignoring_longdouble>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlonglongint_ignoring_longdouble(i64 %0, x86_fp80 %1) {
%3 = alloca i64
%4 = alloca x86_fp80
store i64 %0, i64* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlonglongint_ignoring_longdouble(i64 returned %0, x86_fp80 %1) {
ret i64 %0
}
int letsgo_get_op(int s) { return s ^ 3; }


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

x86 assembly (clang, -O2):
<letsgo_get_op>:
mov    %edi,%eax
xor    $0x3,%eax
ret

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

LLVM IR (-O2):
define i32 @letsgo_get_op(i32 %0) {
%2 = xor i32 %0, 3
ret i32 %2
}
/* Variables and functions */
unsigned char _addcarry_u64(unsigned char, unsigned long long,
                            unsigned long long, unsigned long long *);
unsigned char test_addcarry_u64(unsigned char __cf, unsigned long long __x,
                                unsigned long long __y,
                                unsigned long long *__p) {
  return _addcarry_u64(__cf, __x, __y, __p);
}


x86 assembly (clang, -O0):
<test_addcarry_u64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
movzbl %al,%edi
call   1030 <_addcarry_u64@plt>
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_addcarry_u64>:
jmp    1030 <_addcarry_u64@plt>

LLVM IR (-O0):
define zeroext i8 @test_addcarry_u64(i8 zeroext %0, i64 %1, i64 %2, i64* %3) {
%5 = alloca i8
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64*
store i8 %0, i8* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64* %3, i64** %8
%9 = load i8, i8* %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64*, i64** %8
%13 = call zeroext i8 @_addcarry_u64(i8 zeroext %9, i64 %10, i64 %11, i64* %12)
ret i8 %13
}

LLVM IR (-O2):
define zeroext i8 @test_addcarry_u64(i8 zeroext %0, i64 %1, i64 %2, i64* %3) {
%5 = tail call zeroext i8 @_addcarry_u64(i8 zeroext %0, i64 %1, i64 %2, i64* %3)
ret i8 %5
}
/* Variables and functions */
int /*<<< orphan*/ t1();
int /*<<< orphan*/ t2();
int main(void) {
  t1();
  t2();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @t1()
%3 = call i32 (...) @t2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @t1()
%2 = tail call i32 (...) @t2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr,
          "Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\n"
          "\t -d Number of subdirectories to generate:   Default: 100\n"
          "\t -f Number of c files in each subdirectory: Default: 100\n"
          "\t -h Help!\n"
          "\t -t Number of threads to generate:          Default: 8\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    $0xffffffff,%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    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [230 x i8] c"Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\0A\09 -d Number of subdirectories to generate: Default: 100\0A\09 -f Number of c files in each subdirectory: Default: 100\0A\09 -h Help!\0A\09 -t Number of threads to generate: Default: 8\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 ([230 x i8], [230 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [230 x i8] c"Usage: %s -d NUMDIR -f NUMFILES -h -t NUMTHRD\0A\09 -d Number of subdirectories to generate: Default: 100\0A\09 -f Number of c files in each subdirectory: Default: 100\0A\09 -h Help!\0A\09 -t Number of threads to generate: Default: 8\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([230 x i8], [230 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void delaySeconds(int sec) {
  usleep((sec * 1000 * 1000));
  return;
}


x86 assembly (clang, -O0):
<delaySeconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x3e8,-0x4(%rbp),%eax
imul   $0x3e8,%eax,%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delaySeconds>:
imul   $0xf4240,%edi,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @delaySeconds(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 1000
%5 = mul nsw i32 %4, 1000
%6 = call i32 @usleep(i32 %5)
ret void
}

LLVM IR (-O2):
define void @delaySeconds(i32 %0) {
%2 = mul i32 %0, 1000000
%3 = tail call i32 @usleep(i32 %2)
ret void
}
/* Variables and functions */
int close(int const);
int drvOCM_CloseDev(const int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<drvOCM_CloseDev>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @drvOCM_CloseDev(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
void my_swap(int *a, int *b) {
  int swap;
  swap = *b;
  *b = *a;
  *a = swap;
}


x86 assembly (clang, -O0):
<my_swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_swap>:
mov    (%rsi),%eax
mov    (%rdi),%ecx
mov    %ecx,(%rsi)
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @my_swap(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** %4
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @my_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
store i32 %4, i32* %1
store i32 %3, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void mywrite(char *buf, int len) { write(-1, buf, len); }


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

x86 assembly (clang, -O2):
<mywrite>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xffffffff,%edi
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @mywrite(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 @write(i32 -1, i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @mywrite(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @write(i32 -1, i8* %0, i32 %1)
ret void
}
void s5p_sdo_setname(char *name) {}


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

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

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

LLVM IR (-O2):
define void @s5p_sdo_setname(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ link(char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if ((link(argv[1], argv[2])) != 0 || argc != 3)
    fprintf(stderr, "An error has occured\n");
  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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1040 <link@plt>
cmp    $0x0,%rax
jne    115f <main+0x3f>
cmpl   $0x3,-0x8(%rbp)
je     1174 <main+0x54>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %edi,%ebx
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1040 <link@plt>
cmp    $0x3,%ebx
jne    113a <main+0x1a>
test   %rax,%rax
je     114f <main+0x2f>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"An error has occured\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 i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i64 @link(i8* %8, i8* %11)
%13 = icmp ne i64 %12, 0
br i1 %13, label %17, label %14
14: ; preds = %2
%15 = load i32, i32* %4
%16 = icmp ne i32 %15, 3
br i1 %16, label %17, label %20
17: ; preds = %14, %2
%18 = load i32, i32* @stderr
%19 = call i32 @fprintf(i32 %18, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %20
20: ; preds = %17, %14
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"An error has occured\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i64 @link(i8* %4, i8* %6)
%8 = icmp ne i64 %7, 0
%9 = icmp ne i32 %0, 3
%10 = or i1 %9, %8
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %2, %11
ret i32 0
}
void outb_p(unsigned char value, unsigned short port) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0,%"
                       "w"
                       "1"
                       "\noutb %%al,$0x80"
                       :
                       : "a"(value), "Nd"(port));
}


x86 assembly (clang, -O0):
<outb_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<outb_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
out    %al,$0x80
ret

LLVM IR (-O0):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
%5 = load i8, i8* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @outb_p(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},${1:w}\0Aoutb %al,$$0x80", "{ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Push(int);
scalar_t__ WaitKey();
void pRAWKEYQ() { Push(WaitKey() ? -1 : 0); }


x86 assembly (clang, -O0):
<pRAWKEYQ>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <WaitKey@plt>
mov    %rax,%rcx
xor    %edi,%edi
mov    $0xffffffff,%eax
cmp    $0x0,%rcx
cmovne %eax,%edi
call   1030 <Push@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pRAWKEYQ>:
push   %rax
xor    %eax,%eax
call   1040 <WaitKey@plt>
neg    %rax
sbb    %edi,%edi
pop    %rax
jmp    1030 <Push@plt>

LLVM IR (-O0):
define void @pRAWKEYQ() {
%1 = call i64 (...) @WaitKey()
%2 = icmp ne i64 %1, 0
%3 = zext i1 %2 to i64
%4 = select i1 %2, i32 -1, i32 0
%5 = call i32 @Push(i32 %4)
ret void
}

LLVM IR (-O2):
define void @pRAWKEYQ() {
%1 = tail call i64 (...) @WaitKey()
%2 = icmp ne i64 %1, 0
%3 = sext i1 %2 to i32
%4 = tail call i32 @Push(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xfb() {
  Assert_real((isascii(251) == 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_isascii.c",
              1260, ("isascii should be 0 for 0xfb"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xfb>:
push   %rax
mov    $0xfb,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ec,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xfb\00"
define void @t_isascii_0xfb() {
%1 = call i64 @isascii(i32 251)
%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 1260, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xfb\00"
define void @t_isascii_0xfb() {
%1 = tail call i64 @isascii(i32 251)
%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 1260, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sys_PrintChar(unsigned int);
void sys_PrintString(unsigned int *str) {
  unsigned int i;
  for (i = 0; str[i] != '\0'; i++) {
    sys_PrintChar(str[i]);
  }
}


x86 assembly (clang, -O0):
<sys_PrintString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
cmpl   $0x0,(%rax,%rcx,4)
je     1151 <sys_PrintString+0x41>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    (%rax,%rcx,4),%edi
call   1030 <sys_PrintChar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <sys_PrintString+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_PrintString>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%edi
test   %edi,%edi
je     1141 <sys_PrintString+0x31>
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1030 <sys_PrintChar@plt>
mov    %ebp,%eax
mov    (%rbx,%rax,4),%edi
add    $0x1,%ebp
test   %edi,%edi
jne    1130 <sys_PrintString+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @sys_PrintString(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %8, %4 ], [ 0, %1 ]
%7 = tail call i32 @sys_PrintChar(i32 %5)
%8 = add i32 %6, 1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
ret void
}
int main(void) {
  int x = 1, y = 5, z = 0;
  asm("movl %[in1], %[out] \n addl %[in2], %[out]"
      : [out] "=r"(z)
      : [in1] "m"(x), [in2] "m"(y));
  if (z != 6) {
    printf("Error %d\n", (int)1);
    exit(1);
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
je     1174 <main+0x54>
lea    0xea2(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x1,0x4(%rsp)
movl   $0x5,(%rsp)
mov    0x4(%rsp),%eax
add    (%rsp),%eax
cmp    $0x6,%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb9(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Error %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 5, i32* %3
store i32 0, i32* %4
%5 = call i32 asm "movl $1, $0 \0A addl $2, $0", "=r,*m,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %2, i32* elementtype(i32) %3)
store i32 %5, i32* %4
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
unreachable
10: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"Error %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 5, i32* %2
%5 = call i32 asm "movl $1, $0 \0A addl $2, $0", "=r,*m,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %1, i32* elementtype(i32) %2)
%6 = icmp eq i32 %5, 6
br i1 %6, label %9, label %7
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1)
unreachable
9: ; preds = %0
ret i32 0
}
void read_arrays_solver_adios_(void) {}


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

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

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

LLVM IR (-O2):
define void @read_arrays_solver_adios_() {
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_event_source_get_pending(void *s) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_event_source_get_pending>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ecf(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_event_source_get_pending>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_event_source_get_pending(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_source_get_pending(i8* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
%3 = sub nsw i32 0, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void signal_usr1(int sig) { exit(0); }


x86 assembly (clang, -O0):
<signal_usr1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
define void @signal_usr1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @signal_usr1(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void set_32_be(uint8_t *const p, const uint32_t x) {
  p[0] = x >> 24;
  p[1] = (x >> 16) & 0xff;
  p[2] = (x >> 8) & 0xff;
  p[3] = x & 0xff;
}


x86 assembly (clang, -O0):
<set_32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_32_be>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
sar    $0x18,%eax
mov    %eax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %eax,0x4(%rdi)
mov    %edx,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @set_32_be(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 = ashr i32 %5, 24
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 16
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 8
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
%19 = load i32, i32* %4
%20 = and i32 %19, 255
%21 = load i32*, i32** %3
%22 = getelementptr inbounds i32, i32* %21, i64 3
store i32 %20, i32* %22
ret void
}

LLVM IR (-O2):
define void @set_32_be(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
store i32 %3, i32* %0
%4 = lshr i32 %1, 16
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 8
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
%10 = and i32 %1, 255
%11 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %10, i32* %11
ret void
}
/* Variables and functions */
unsigned int SquareOfSums(unsigned int const);
unsigned int SumOfSquares(unsigned int const);
int /*<<< orphan*/ printf(char *, unsigned int);
int main() {
  const unsigned int RANGE = 100;
  unsigned int difference = 0;
  difference = SquareOfSums(RANGE) - SumOfSquares(RANGE);
  printf("%d", difference);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%edi
call   1050 <SquareOfSums@plt>
mov    %eax,%ebx
mov    $0x64,%edi
call   1040 <SumOfSquares@plt>
sub    %eax,%ebx
lea    0xeb0(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
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 100, i32* %2
store i32 0, i32* %3
%4 = call i32 @SquareOfSums(i32 100)
%5 = call i32 @SumOfSquares(i32 100)
%6 = sub i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @SquareOfSums(i32 100)
%2 = tail call i32 @SumOfSquares(i32 100)
%3 = sub i32 %1, %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
int Operand_mr2_encode(unsigned int *valp) {
  int error;
  error = (*valp & ~0x3) != 0;
  return error;
}


x86 assembly (clang, -O0):
<Operand_mr2_encode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0xfffffffc,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_mr2_encode>:
xor    %eax,%eax
cmpl   $0x4,(%rdi)
setae  %al
ret

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

LLVM IR (-O2):
define i32 @Operand_mr2_encode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ugt i32 %2, 3
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x48() {
  Assert_real((isspace(72) == 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_isspace.c",
              365, ("isspace should be 0 for H"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x48>:
push   %rax
mov    $0x48,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x16d,%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_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for H\00"
define void @t_isspace_0x48() {
%1 = call i64 @isspace(i32 72)
%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 365, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for H\00"
define void @t_isspace_0x48() {
%1 = tail call i64 @isspace(i32 72)
%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 365, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct fhci_usb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ flush_all_transmissions(struct fhci_usb *);
void flush_actual_frame(struct fhci_usb *usb) { flush_all_transmissions(usb); }


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

x86 assembly (clang, -O2):
<flush_actual_frame>:
jmp    1030 <flush_all_transmissions@plt>

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

LLVM IR (-O2):
%struct.fhci_usb = type { i32 }
define void @flush_actual_frame(%struct.fhci_usb* %0) {
%2 = tail call i32 @flush_all_transmissions(%struct.fhci_usb* %0)
ret void
}
void foo43() {}


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

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

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

LLVM IR (-O2):
define void @foo43() {
ret void
}