xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
char *realloc(char *, int /*<<< orphan*/);
void reallocSizeZero2() {
  char *p = malloc(12);
  char *r = realloc(p, 0);
  if (!r) {
    free(p);
  } else {
    free(r);
  }
  free(p);
}


x86 assembly (clang, -O0):
<reallocSizeZero2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1050 <realloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116e <reallocSizeZero2+0x3e>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
jmp    1177 <reallocSizeZero2+0x47>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocSizeZero2>:
push   %rbx
mov    $0xc,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <realloc@plt>
test   %rax,%rax
je     1152 <reallocSizeZero2+0x22>
mov    %rax,%rdi
jmp    1155 <reallocSizeZero2+0x25>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @reallocSizeZero2() {
%1 = tail call dereferenceable_or_null(12) i8* @malloc(i32 12)
%2 = tail call i8* @realloc(i8* %1, i32 0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @free(i8* %1)
br label %8
6: ; preds = %0
%7 = tail call i32 @free(i8* %2)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @free(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outportb(int, int);
void pit_phase(float hertz) {
  int divisor = 1193182 / hertz;
  outportb(0x43, 0x36);
  outportb(0x40, divisor & 0xFF);
  outportb(0x40, divisor >> 8);
}


x86 assembly (clang, -O0):
<pit_phase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
divss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outportb@plt>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x40,%edi
call   1030 <outportb@plt>
mov    -0x8(%rbp),%esi
sar    $0x8,%esi
mov    $0x40,%edi
call   1030 <outportb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pit_phase>:
push   %rbx
movss  0xee7(%rip),%xmm1
divss  %xmm0,%xmm1
cvttss2si %xmm1,%ebx
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outportb@plt>
movzbl %bl,%esi
mov    $0x40,%edi
call   1030 <outportb@plt>
sar    $0x8,%ebx
mov    $0x40,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <outportb@plt>

LLVM IR (-O0):
define void @pit_phase(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fdiv float 0x413234DE00000000, %4
%6 = fptosi float %5 to i32
store i32 %6, i32* %3
%7 = call i32 @outportb(i32 67, i32 54)
%8 = load i32, i32* %3
%9 = and i32 %8, 255
%10 = call i32 @outportb(i32 64, i32 %9)
%11 = load i32, i32* %3
%12 = ashr i32 %11, 8
%13 = call i32 @outportb(i32 64, i32 %12)
ret void
}

LLVM IR (-O2):
define void @pit_phase(float %0) {
%2 = fdiv float 0x413234DE00000000, %0
%3 = fptosi float %2 to i32
%4 = tail call i32 @outportb(i32 67, i32 54)
%5 = and i32 %3, 255
%6 = tail call i32 @outportb(i32 64, i32 %5)
%7 = ashr i32 %3, 8
%8 = tail call i32 @outportb(i32 64, i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ ferror(int /*<<< orphan*/);
int /*<<< orphan*/ flush_or_die();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stdout;
void final_flush_or_die() {
  flush_or_die();
  {
    if (!(!ferror(stdout))) {
      perror("stdout error");
      exit(EXIT_FAILURE);
    }
  };
}


x86 assembly (clang, -O0):
<final_flush_or_die>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <flush_or_die@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1030 <ferror@plt>
cmp    $0x0,%eax
je     117c <final_flush_or_die+0x3c>
lea    0xe97(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<final_flush_or_die>:
push   %rax
xor    %eax,%eax
call   1040 <flush_or_die@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
call   1030 <ferror@plt>
test   %eax,%eax
jne    115c <final_flush_or_die+0x1c>
pop    %rax
ret
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [13 x i8] c"stdout error\00"
@EXIT_FAILURE = global i32 0
define void @final_flush_or_die() {
%1 = call i32 (...) @flush_or_die()
%2 = load i32, i32* @stdout
%3 = call i32 @ferror(i32 %2)
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [13 x i8] c"stdout error\00"
@EXIT_FAILURE = global i32 0
define void @final_flush_or_die() {
%1 = tail call i32 (...) @flush_or_die()
%2 = load i32, i32* @stdout
%3 = tail call i32 @ferror(i32 %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
ret void
}
/* Variables and functions */
char *stb_skipnewline(char *s) {
  if (s[0] == '\r' || s[0] == '\n') {
    if (s[0] + s[1] == '\r' + '\n')
      ++s;
    ++s;
  }
  return s;
}


x86 assembly (clang, -O0):
<stb_skipnewline>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     1128 <stb_skipnewline+0x28>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    115a <stb_skipnewline+0x5a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
add    %ecx,%eax
cmp    $0x17,%eax
jne    114e <stb_skipnewline+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stb_skipnewline>:
mov    %rdi,%rax
movzbl (%rdi),%ecx
cmp    $0xd,%ecx
je     1110 <stb_skipnewline+0x10>
cmp    $0xa,%cl
jne    1128 <stb_skipnewline+0x28>
lea    0x1(%rax),%rdx
movsbl 0x1(%rax),%esi
add    %ecx,%esi
cmp    $0x17,%esi
cmovne %rax,%rdx
add    $0x1,%rdx
mov    %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @stb_skipnewline(i8* %0) {
%2 = load i8, i8* %0
switch i8 %2, label %12 [
i8 13, label %3
i8 10, label %3
]
3: ; preds = %1, %1
%4 = zext i8 %2 to i32
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, %4
%9 = icmp eq i32 %8, 23
%10 = select i1 %9, i8* %5, i8* %0
%11 = getelementptr inbounds i8, i8* %10, i64 1
br label %12
12: ; preds = %1, %3
%13 = phi i8* [ %11, %3 ], [ %0, %1 ]
ret i8* %13
}
void SwapDouble(double *d1, double *d2) {
  double tmp;
  tmp = *d1;
  *d1 = *d2;
  *d2 = tmp;
}


x86 assembly (clang, -O0):
<SwapDouble>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SwapDouble>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  %xmm1,(%rdi)
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @SwapDouble(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%6 = load double*, double** %3
%7 = load double, double* %6
store double %7, double* %5
%8 = load double*, double** %4
%9 = load double, double* %8
%10 = load double*, double** %3
store double %9, double* %10
%11 = load double, double* %5
%12 = load double*, double** %4
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @SwapDouble(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
store double %4, double* %0
store double %3, double* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int ioctl(int, int, unsigned char *);
int /*<<< orphan*/ printf(char *, int);
int getStatus(int _hFile) {
  unsigned char buff[20];
  int nRet;
  if ((nRet = ioctl(_hFile, 76, buff)) < 0) {
    printf("Error ioctl %d\n", nRet);
    close(_hFile);
    exit(1);
  }
  return buff[3];
}


x86 assembly (clang, -O0):
<getStatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rdx
mov    $0x4c,%esi
call   1040 <ioctl@plt>
mov    %eax,-0x24(%rbp)
cmp    $0x0,%eax
jge    1189 <getStatus+0x49>
mov    -0x24(%rbp),%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <close@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
movzbl -0x1d(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getStatus>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
mov    %rsp,%rdx
mov    $0x4c,%esi
call   1040 <ioctl@plt>
test   %eax,%eax
js     1163 <getStatus+0x23>
movzbl 0x3(%rsp),%eax
add    $0x20,%rsp
pop    %rbx
ret
lea    0xe96(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1050 <close@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Error ioctl %d\0A\00"
define i32 @getStatus(i32 %0) {
%2 = alloca i32
%3 = alloca [20 x i8]
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%7 = call i32 @ioctl(i32 %5, i32 76, i8* %6)
store i32 %7, i32* %4
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %15
9: ; preds = %1
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = load i32, i32* %2
%13 = call i32 @close(i32 %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %1
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 3
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@.str = [16 x i8] c"Error ioctl %d\0A\00"
define i32 @getStatus(i32 %0) {
%2 = alloca [20 x i8]
%3 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 0
%4 = call i32 @ioctl(i32 %0, i32 76, i8* %3)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %4)
%8 = call i32 @close(i32 %0)
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %2, i64 0, i64 3
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
ret i32 %13
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int swap_bytes16(int);
uint32_t swap_bytes32(uint32_t i) {
  uint32_t res = swap_bytes16(i);
  res <<= 16;
  res |= swap_bytes16(i >> 16);
  return res;
}


x86 assembly (clang, -O0):
<swap_bytes32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <swap_bytes16@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
call   1030 <swap_bytes16@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_bytes32>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <swap_bytes16@plt>
mov    %eax,%ebp
shl    $0x10,%ebp
sar    $0x10,%ebx
mov    %ebx,%edi
call   1030 <swap_bytes16@plt>
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @swap_bytes32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @swap_bytes16(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 16
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = ashr i32 %8, 16
%10 = call i32 @swap_bytes16(i32 %9)
%11 = load i32, i32* %3
%12 = or i32 %11, %10
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @swap_bytes32(i32 %0) {
%2 = tail call i32 @swap_bytes16(i32 %0)
%3 = shl i32 %2, 16
%4 = ashr i32 %0, 16
%5 = tail call i32 @swap_bytes16(i32 %4)
%6 = or i32 %3, %5
ret i32 %6
}
void EDIPARTYNAME_free(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @SSMR3PutBool() {
ret void
}
const char *isns_tcpudp_port_help(void) {
  return "<port>/tcp, <port>/udp, or <port> (defaults to TCP)";
}


x86 assembly (clang, -O0):
<isns_tcpudp_port_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isns_tcpudp_port_help>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [52 x i8] c"<port>/tcp, <port>/udp, or <port> (defaults to TCP)\00"
define i8* @isns_tcpudp_port_help() {
ret i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [52 x i8] c"<port>/tcp, <port>/udp, or <port> (defaults to TCP)\00"
define i8* @isns_tcpudp_port_help() {
ret i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0)
}
__attribute__((always_)) void debug_check_no_obj_freed(const void *address,
                                                       unsigned long size) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(char *, int, int, int /*<<< orphan*/ *);
int file_write(char *filename, char *buffer, int length) {
  FILE *out;
  if ((out = fopen(filename, "wb")) == NULL) {
    return 0;
  }
  fwrite(buffer, 1, length, out);
  fclose(out);
  return 1;
}


x86 assembly (clang, -O0):
<file_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    116d <file_write+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1192 <file_write+0x62>
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    $0x1,%esi
call   1050 <fwrite@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%r15
lea    0xebc(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1173 <file_write+0x43>
mov    %rax,%rbx
mov    $0x1,%ebp
mov    %r15,%rdi
mov    $0x1,%esi
mov    %r14d,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
jmp    1175 <file_write+0x45>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define i32 @file_write(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = tail call i32 @fwrite(i8* %1, i32 1, i32 %2, i32* %4)
%8 = tail call i32 @fclose(i32* %4)
br label %9
9: ; preds = %3, %6
%10 = phi i32 [ 1, %6 ], [ 0, %3 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ capture_event(void *, int, int, int /*<<< orphan*/);
void capture_write_slave_dma(uint16_t port, uint8_t val, void *p) {
  capture_event(p, (7 << 8), 1, port);
}


x86 assembly (clang, -O0):
<capture_write_slave_dma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x700,%esi
mov    $0x1,%edx
call   1030 <capture_event@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<capture_write_slave_dma>:
mov    %edi,%ecx
mov    %rdx,%rdi
mov    $0x700,%esi
mov    $0x1,%edx
jmp    1030 <capture_event@plt>

LLVM IR (-O0):
define void @capture_write_slave_dma(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i32, i32* %4
%9 = call i32 @capture_event(i8* %7, i32 1792, i32 1, i32 %8)
ret void
}

LLVM IR (-O2):
define void @capture_write_slave_dma(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @capture_event(i8* %2, i32 1792, i32 1, i32 %0)
ret void
}
int d_bun_rm2(double a1, double *a2) {
  return !(__builtin_isunordered(a1, *a2));
}


x86 assembly (clang, -O0):
<d_bun_rm2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomisd (%rax),%xmm0
setp   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_bun_rm2>:
xor    %eax,%eax
ucomisd (%rdi),%xmm0
setnp  %al
ret

LLVM IR (-O0):
define i32 @d_bun_rm2(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
store double %0, double* %3
store double* %1, double** %4
%5 = load double, double* %3
%6 = load double*, double** %4
%7 = load double, double* %6
%8 = fcmp uno double %5, %7
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @d_bun_rm2(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp ord double %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ midi_clock_get_tempo();
int /*<<< orphan*/ song_set_tempo(int /*<<< orphan*/);
void seq_ctrl_set_tempo(float tempo) { song_set_tempo(midi_clock_get_tempo()); }


x86 assembly (clang, -O0):
<seq_ctrl_set_tempo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <midi_clock_get_tempo@plt>
mov    %eax,%edi
call   1030 <song_set_tempo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_set_tempo>:
push   %rax
xor    %eax,%eax
call   1040 <midi_clock_get_tempo@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <song_set_tempo@plt>

LLVM IR (-O0):
define void @seq_ctrl_set_tempo(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call i32 (...) @midi_clock_get_tempo()
%4 = call i32 @song_set_tempo(i32 %3)
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_set_tempo(float %0) {
%2 = tail call i32 (...) @midi_clock_get_tempo()
%3 = tail call i32 @song_set_tempo(i32 %2)
ret void
}
void fb_write_cell(unsigned int i, char c, unsigned char fg, unsigned char bg) {
  char *fb = (char *)0x000B8000;
  fb[i] = c;
  fb[i + 1] = ((fg & 0x0F) << 4) | (bg & 0x0F);
}


x86 assembly (clang, -O0):
<fb_write_cell>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %edi,-0x4(%rbp)
mov    %dl,-0x5(%rbp)
mov    %cl,-0x6(%rbp)
mov    %al,-0x7(%rbp)
mov    $0xb8000,%eax
mov    %rax,-0x10(%rbp)
mov    -0x5(%rbp),%dl
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
movzbl -0x6(%rbp),%eax
and    $0xf,%eax
shl    $0x4,%eax
movzbl -0x7(%rbp),%ecx
and    $0xf,%ecx
or     %ecx,%eax
mov    %al,%dl
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,%ecx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_write_cell>:
mov    %edi,%eax
mov    %sil,0xb8000(%rax)
shl    $0x4,%dl
and    $0xf,%cl
or     %dl,%cl
add    $0x1,%edi
mov    %cl,0xb8000(%rdi)
ret

LLVM IR (-O0):
define void @fb_write_cell(i32 %0, i8 signext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8*
store i32 %0, i32* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
store i8* inttoptr (i64 753664 to i8*), i8** %9
%10 = load i8, i8* %6
%11 = load i8*, i8** %9
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 %10, i8* %14
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = and i32 %16, 15
%18 = shl i32 %17, 4
%19 = load i8, i8* %8
%20 = zext i8 %19 to i32
%21 = and i32 %20, 15
%22 = or i32 %18, %21
%23 = trunc i32 %22 to i8
%24 = load i8*, i8** %9
%25 = load i32, i32* %5
%26 = add i32 %25, 1
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %24, i64 %27
store i8 %23, i8* %28
ret void
}

LLVM IR (-O2):
define void @fb_write_cell(i32 %0, i8 signext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = zext i32 %0 to i64
%6 = getelementptr inbounds i8, i8* inttoptr (i64 753664 to i8*), i64 %5
store i8 %1, i8* %6
%7 = shl i8 %2, 4
%8 = and i8 %3, 15
%9 = or i8 %8, %7
%10 = add i32 %0, 1
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* inttoptr (i64 753664 to i8*), i64 %11
store i8 %9, i8* %12
ret void
}
/* Variables and functions */
double N1_y(double, double, double, double);
double N2_x(double sign, double xi, double et, double qq) {
  return N1_y(sign, xi, et, qq);
}


x86 assembly (clang, -O0):
<N2_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1030 <N1_y@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<N2_x>:
jmp    1030 <N1_y@plt>

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

LLVM IR (-O2):
define double @N2_x(double %0, double %1, double %2, double %3) {
%5 = tail call double @N1_y(double %0, double %1, double %2, double %3)
ret double %5
}
int leftShiftIntMasked3(int v) { return ((v & 0xff) << 3); }


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

x86 assembly (clang, -O2):
<leftShiftIntMasked3>:
movzbl %dil,%eax
shl    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @leftShiftIntMasked3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 3
ret i32 %5
}

LLVM IR (-O2):
define i32 @leftShiftIntMasked3(i32 %0) {
%2 = shl i32 %0, 3
%3 = and i32 %2, 2040
ret i32 %3
}
/* Variables and functions */
double RAND_MAX;
double rand();
double frand(void) { return -1.0 + rand() * 2.0 / RAND_MAX; }


x86 assembly (clang, -O0):
<frand>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
movaps %xmm0,%xmm1
movsd  0xee2(%rip),%xmm0
mulsd  %xmm0,%xmm1
mov    0x2eb7(%rip),%rax
divsd  (%rax),%xmm1
movsd  0xec3(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<frand>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
addsd  %xmm0,%xmm0
mov    0x2ec5(%rip),%rax
divsd  (%rax),%xmm0
addsd  0xed1(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @frand() {
%1 = call double (...) @rand()
%2 = fmul double %1, 2.000000e+00
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
%5 = fadd double -1.000000e+00, %4
ret double %5
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @frand() {
%1 = tail call double (...) @rand()
%2 = fmul double %1, 2.000000e+00
%3 = load double, double* @RAND_MAX
%4 = fdiv double %2, %3
%5 = fadd double %4, -1.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
char *get_wd() {
  static char wd[400];
  (void)getcwd(wd, 400);
  return (wd);
}


x86 assembly (clang, -O0):
<get_wd>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f25(%rip),%rdi
mov    $0x190,%esi
call   1030 <getcwd@plt>
lea    0x2f14(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_wd>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rdi
mov    $0x190,%esi
call   1030 <getcwd@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@get_wd.wd = internal global [400 x i8] zeroinitializer
define i8* @get_wd() {
%1 = call i32 @getcwd(i8* getelementptr inbounds ([400 x i8], [400 x i8]* @get_wd.wd, i64 0, i64 0), i32 400)
ret i8* getelementptr inbounds ([400 x i8], [400 x i8]* @get_wd.wd, i64 0, i64 0)
}

LLVM IR (-O2):
@get_wd.wd = internal global [400 x i8] zeroinitializer
define i8* @get_wd() {
%1 = tail call i32 @getcwd(i8* getelementptr inbounds ([400 x i8], [400 x i8]* @get_wd.wd, i64 0, i64 0), i32 400)
ret i8* getelementptr inbounds ([400 x i8], [400 x i8]* @get_wd.wd, i64 0, i64 0)
}
void rop3_96_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk1 = T & stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_96_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_96_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_96_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8, i8* %6
%29 = zext i8 %28 to i32
%30 = xor i32 %29, -1
%31 = and i32 %27, %30
%32 = load i8*, i8** %4
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
%35 = load i8, i8* %5
%36 = zext i8 %35 to i32
%37 = and i32 %34, %36
%38 = or i32 %31, %37
%39 = load i8*, i8** %4
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = load i8, i8* %6
%43 = zext i8 %42 to i32
%44 = and i32 %41, %43
%45 = or i32 %38, %44
%46 = trunc i32 %45 to i8
%47 = load i8*, i8** %4
store i8 %46, i8* %47
ret void
}

LLVM IR (-O2):
define void @rop3_96_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) { printf("hello world\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ OAL_DELETE_SEMAPHORE();
int /*<<< orphan*/ bbm_write(void *, int, int);
int fc8150_i2c_deinit(void *hDevice) {
  bbm_write(hDevice, 0x0013, 0x00);
  OAL_DELETE_SEMAPHORE();
  return 0;
}


x86 assembly (clang, -O0):
<fc8150_i2c_deinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x13,%esi
xor    %edx,%edx
call   1040 <bbm_write@plt>
mov    $0x0,%al
call   1030 <OAL_DELETE_SEMAPHORE@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8150_i2c_deinit>:
push   %rax
mov    $0x13,%esi
xor    %edx,%edx
call   1040 <bbm_write@plt>
xor    %eax,%eax
call   1030 <OAL_DELETE_SEMAPHORE@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @fc8150_i2c_deinit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bbm_write(i8* %3, i32 19, i32 0)
%5 = call i32 (...) @OAL_DELETE_SEMAPHORE()
ret i32 0
}

LLVM IR (-O2):
define i32 @fc8150_i2c_deinit(i8* %0) {
%2 = tail call i32 @bbm_write(i8* %0, i32 19, i32 0)
%3 = tail call i32 (...) @OAL_DELETE_SEMAPHORE()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ xaxis();
int /*<<< orphan*/ yaxis();
int /*<<< orphan*/ zaxis();
void ps001s() {
#pragma omp parallel sections
  {
#pragma omp section
    xaxis();
#pragma omp section
    yaxis();
#pragma omp section
    zaxis();
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <xaxis@plt>
mov    $0x0,%al
call   1040 <yaxis@plt>
mov    $0x0,%al
call   1030 <zaxis@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rax
xor    %eax,%eax
call   1050 <xaxis@plt>
xor    %eax,%eax
call   1040 <yaxis@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <zaxis@plt>

LLVM IR (-O0):
define void @ps001s() {
%1 = call i32 (...) @xaxis()
%2 = call i32 (...) @yaxis()
%3 = call i32 (...) @zaxis()
ret void
}

LLVM IR (-O2):
define void @ps001s() {
%1 = tail call i32 (...) @xaxis()
%2 = tail call i32 (...) @yaxis()
%3 = tail call i32 (...) @zaxis()
ret void
}
void breakpoint_test() {}


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

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

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

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

/* Variables and functions */
size_t strftime(char *s, size_t maxsize, const char *format,
                const struct tm *timeptr) {
  return 0;
}


x86 assembly (clang, -O0):
<strftime>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tm = type { i32 }
define i64 @strftime(i8* %0, i64 %1, i8* %2, %struct.tm* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca %struct.tm*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store %struct.tm* %3, %struct.tm** %8
ret i64 0
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i64 @strftime(i8* nocapture readnone %0, i64 %1, i8* nocapture readnone %2, %struct.tm* nocapture readnone %3) {
ret i64 0
}
void test_dir_is_not_recognized_as_dir(void) {
  do {
    seatest_assert_true(is_dir("test-data/existing-files"), __FUNCTION__, 14);
  } while (0);
}


x86 assembly (clang, -O0):
<test_dir_is_not_recognized_as_dir>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <test_dir_is_not_recognized_as_dir+0x9>
lea    0xed0(%rip),%rdi
mov    $0x0,%al
call   1040 <is_dir@plt>
mov    %eax,%edi
lea    0xed9(%rip),%rsi
mov    $0xe,%edx
mov    $0x0,%al
call   1030 <seatest_assert_true@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dir_is_not_recognized_as_dir>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <is_dir@plt>
lea    0xee3(%rip),%rsi
mov    %eax,%edi
mov    $0xe,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <seatest_assert_true@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"test-data/existing-files\00"
@__FUNCTION__.test_dir_is_not_recognized_as_dir = [34 x i8] c"test_dir_is_not_recognized_as_dir\00"
define void @test_dir_is_not_recognized_as_dir() {
br label %1
1: ; preds = %0
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @is_dir to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %2, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @__FUNCTION__.test_dir_is_not_recognized_as_dir, i64 0, i64 0), i32 14)
br label %4
4: ; preds = %1
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"test-data/existing-files\00"
@__FUNCTION__.test_dir_is_not_recognized_as_dir = [34 x i8] c"test_dir_is_not_recognized_as_dir\00"
define void @test_dir_is_not_recognized_as_dir() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @is_dir to i32 (i8*, ...)*)(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @seatest_assert_true to i32 (i32, i8*, i32, ...)*)(i32 %1, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @__FUNCTION__.test_dir_is_not_recognized_as_dir, i64 0, i64 0), i32 14)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int mapcon_coefficients_of_map(int dim, int ind, int nvr, double *cff) {
  int a[3], *b, fail;
  a[0] = dim;
  a[1] = ind;
  a[2] = nvr;
  fail = _ada_use_c2phc(436, a, b, cff);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_coefficients_of_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
lea    -0x24(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x1b4,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapcon_coefficients_of_map>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
mov    %esi,0x10(%rsp)
mov    %edx,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x1b4,%edi
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @mapcon_coefficients_of_map(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca [3 x i32]
%10 = alloca i32*
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store double* %3, double** %8
%12 = load i32, i32* %5
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %6
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %7
%17 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 2
store i32 %16, i32* %17
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %9, i64 0, i64 0
%19 = load i32*, i32** %10
%20 = load double*, double** %8
%21 = call i32 @_ada_use_c2phc(i32 436, i32* %18, i32* %19, double* %20)
store i32 %21, i32* %11
%22 = load i32, i32* %11
ret i32 %22
}

LLVM IR (-O2):
define i32 @mapcon_coefficients_of_map(i32 %0, i32 %1, i32 %2, double* %3) {
%5 = alloca [3 x i32]
%6 = bitcast [3 x i32]* %5 to i8*
%7 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %7
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %2, i32* %9
%10 = call i32 @_ada_use_c2phc(i32 436, i32* %7, i32* undef, double* %3)
ret i32 %10
}
/* Variables and functions */
int d38(int);
int d39(int a) { return d38(d38(a)); }


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

x86 assembly (clang, -O2):
<d39>:
push   %rax
call   1030 <d38@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d38@plt>

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

LLVM IR (-O2):
define i32 @d39(i32 %0) {
%2 = tail call i32 @d38(i32 %0)
%3 = tail call i32 @d38(i32 %2)
ret i32 %3
}
unsigned xrop3_190_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T ^ S;
  stk1 = D | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_190_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_190_0_0>:
xor    %esi,%edi
shl    $0x8,%edi
lea    0xff(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @xrop3_190_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %5
%26 = load i32, i32* %9
%27 = or i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
ret i32 %28
}

LLVM IR (-O2):
define i32 @xrop3_190_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = xor i8 %1, %0
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = or i32 %5, 255
ret i32 %6
}
int test_imm_08uint16_reg(unsigned short val) {
  return ((val) & (-0x08 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_08uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xfffffff8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_08uint16_reg>:
cmp    $0x8,%di
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_08uint16_reg(i16 zeroext %0) {
%2 = icmp ult i16 %0, 8
%3 = select i1 %2, i32 -40, i32 -20
ret i32 %3
}
void fus_vm_cleanup(struct fus_vm_t *vm) {}


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

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

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

LLVM IR (-O2):
%struct.fus_vm_t = type opaque
define void @fus_vm_cleanup(%struct.fus_vm_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x81() {
  Assert_real((isodigit(129) == 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_isodigit.c",
              650, ("isodigit should be 0 for 0x81"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x81>:
push   %rax
mov    $0x81,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x28a,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x81\00"
define void @t_isodigit_0x81() {
%1 = call i64 @isodigit(i32 129)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 650, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x81\00"
define void @t_isodigit_0x81() {
%1 = tail call i64 @isodigit(i32 129)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 650, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int rand();
float __randf() {
  unsigned char b = ((unsigned char)(rand() % 255));
  return b / 255.0f;
}


x86 assembly (clang, -O0):
<__randf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xff,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  0xec4(%rip),%xmm1
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__randf>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0xffffffff80808081,%rax,%rcx
shr    $0x20,%rcx
add    %eax,%ecx
mov    %ecx,%edx
shr    $0x1f,%edx
shr    $0x7,%ecx
add    %edx,%ecx
add    %eax,%ecx
movzbl %cl,%eax
cvtsi2ss %eax,%xmm0
divss  0xebe(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @__randf() {
%1 = alloca i8
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 255
%4 = trunc i32 %3 to i8
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = sitofp i32 %6 to float
%8 = fdiv float %7, 2.550000e+02
ret float %8
}

LLVM IR (-O2):
define float @__randf() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 255
%3 = and i32 %2, 255
%4 = sitofp i32 %3 to float
%5 = fdiv float %4, 2.550000e+02
ret float %5
}