xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ m137common_setParams4101(int /*<<< orphan*/,
                                            int /*<<< orphan*/);
int /*<<< orphan*/ m139setChrBankPtr();
void m139setParams4101(uint16_t addr, uint8_t val) {
  m137common_setParams4101(addr, val);
  m139setChrBankPtr();
}


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

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

LLVM IR (-O0):
define void @m139setParams4101(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @m137common_setParams4101(i32 %5, i32 %6)
%8 = call i32 (...) @m139setChrBankPtr()
ret void
}

LLVM IR (-O2):
define void @m139setParams4101(i32 %0, i32 %1) {
%3 = tail call i32 @m137common_setParams4101(i32 %0, i32 %1)
%4 = tail call i32 (...) @m139setChrBankPtr()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ x;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, void const *, int);
uint32_t read32(const void *p) {
  uint32_t x;
  memcpy(&x, p, sizeof(x));
  return x;
}


x86 assembly (clang, -O0):
<read32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @read32(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
void free_llmatrix(long long **llmatrix, int L) {
  int i;
  for (i = 0; i < L; i++)
    free(llmatrix[i]);
  free(llmatrix);
}


x86 assembly (clang, -O0):
<free_llmatrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_llmatrix+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_llmatrix+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_llmatrix>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_llmatrix+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_llmatrix+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @free_llmatrix(i64** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i64*, i64** %0, i64 %7
%9 = bitcast i64** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast i64** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int U_PMF_COMPRESSEDIMAGE_get(char const *, char const **, char const *);
int /*<<< orphan*/ printf(char *);
int U_PMF_COMPRESSEDIMAGE_print(const char *contents, const char *blimit) {
  const char *Data;
  int status = U_PMF_COMPRESSEDIMAGE_get(contents, &Data, blimit);
  if (status) {
    printf("CompressedImage:\n");
  }
  return (status);
}


x86 assembly (clang, -O0):
<U_PMF_COMPRESSEDIMAGE_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    -0x18(%rbp),%rsi
call   1030 <U_PMF_COMPRESSEDIMAGE_get@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     115a <U_PMF_COMPRESSEDIMAGE_print+0x3a>
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_PMF_COMPRESSEDIMAGE_print>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rdx
lea    0x8(%rsp),%rsi
call   1030 <U_PMF_COMPRESSEDIMAGE_get@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1144 <U_PMF_COMPRESSEDIMAGE_print+0x24>
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@str = [17 x i8] c"CompressedImage:\00"
define i32 @U_PMF_COMPRESSEDIMAGE_print(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @U_PMF_COMPRESSEDIMAGE_get(i8* %0, i8** %3, i8* %1)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ nasm_error(int, char *);
size_t strlen(char const *);
int /*<<< orphan*/ strncpy(char *, char const *, int);
void copy_filename(char *dst, const char *src) {
  size_t len = strlen(src);
  if (len >= (size_t)256) {
    nasm_error(0x00000002 | 0x00000010, "file name too long");
    return;
  }
  strncpy(dst, src, 256);
}


x86 assembly (clang, -O0):
<copy_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x100,-0x18(%rbp)
jb     1171 <copy_filename+0x41>
mov    $0x12,%edi
lea    0xe99(%rip),%rsi
call   1050 <nasm_error@plt>
jmp    1183 <copy_filename+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x100,%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_filename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
cmp    $0x100,%rax
jb     1162 <copy_filename+0x32>
lea    0xeaf(%rip),%rsi
mov    $0x12,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <nasm_error@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x100,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"file name too long\00"
define void @copy_filename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = icmp uge i64 %8, 256
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @nasm_error(i32 18, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %16
12: ; preds = %2
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @strncpy(i8* %13, i8* %14, i32 256)
br label %16
16: ; preds = %12, %10
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"file name too long\00"
define void @copy_filename(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = icmp ugt i64 %3, 255
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @nasm_error(i32 18, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %2
%8 = tail call i32 @strncpy(i8* %0, i8* %1, i32 256)
br label %9
9: ; preds = %7, %5
ret void
}
int pre_show_moose_if() {}


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

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

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

LLVM IR (-O2):
define i32 @pre_show_moose_if() {
ret i32 undef
}
float constrain(float value) {
  if (value < 0.0f)
    return 0.0f;
  if (value > 100.0f)
    return 100.0f;
  return value;
}


x86 assembly (clang, -O0):
<constrain>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1123 <constrain+0x23>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1155 <constrain+0x55>
movss  -0x8(%rbp),%xmm0
movss  0xed0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    114b <constrain+0x4b>
movss  0xebf(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1155 <constrain+0x55>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<constrain>:
movss  0xef8(%rip),%xmm1
minss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
cmpltss %xmm2,%xmm0
andnps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @constrain(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fcmp ogt float %0, 1.000000e+02
%4 = select i1 %3, float 1.000000e+02, float %0
%5 = select i1 %2, float 0.000000e+00, float %4
ret float %5
}
double hparse_beam(void) { return (-6.90775527898214); }


x86 assembly (clang, -O0):
<hparse_beam>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<hparse_beam>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @hparse_beam() {
ret double 0xC01BA18A998FFFA4
}

LLVM IR (-O2):
define double @hparse_beam() {
ret double 0xC01BA18A998FFFA4
}
void reverse_string(char *phrase, int start, int end) {
  char tmp;
  while (end > start) {
    tmp = phrase[start];
    phrase[start] = phrase[end];
    phrase[end] = tmp;
    start++;
    end--;
  }
}


x86 assembly (clang, -O0):
<reverse_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1163 <reverse_string+0x63>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x11(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    110e <reverse_string+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_string>:
cmp    %esi,%edx
jle    1131 <reverse_string+0x31>
movslq %esi,%rax
movslq %edx,%rcx
add    $0x1,%rax
xchg   %ax,%ax
movzbl -0x1(%rdi,%rax,1),%esi
movzbl (%rdi,%rcx,1),%edx
mov    %dl,-0x1(%rdi,%rax,1)
mov    %sil,(%rdi,%rcx,1)
add    $0xffffffffffffffff,%rcx
lea    0x1(%rax),%rdx
cmp    %rax,%rcx
mov    %rdx,%rax
jg     1110 <reverse_string+0x10>
ret

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

LLVM IR (-O2):
define void @reverse_string(i8* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %5, label %18
5: ; preds = %3
%6 = sext i32 %1 to i64
%7 = sext i32 %2 to i64
br label %8
8: ; preds = %5, %8
%9 = phi i64 [ %7, %5 ], [ %16, %8 ]
%10 = phi i64 [ %6, %5 ], [ %15, %8 ]
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = getelementptr inbounds i8, i8* %0, i64 %9
%14 = load i8, i8* %13
store i8 %14, i8* %11
store i8 %12, i8* %13
%15 = add nsw i64 %10, 1
%16 = add nsw i64 %9, -1
%17 = icmp sgt i64 %16, %15
br i1 %17, label %8, label %18
18: ; preds = %8, %3
ret void
}
int test_imm_15int8_mem(signed char *val) {
  return ((*val) & (0x15 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_15int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 21
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
int str_is_numeric(char *str) {
  while (*str != 0) {
    if (!isdigit(*str)) {
      return 0;
    }
    str++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<str_is_numeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <str_is_numeric+0x4e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    114d <str_is_numeric+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1165 <str_is_numeric+0x55>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <str_is_numeric+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_is_numeric>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <str_is_numeric+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %eax,%eax
je     1149 <str_is_numeric+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <str_is_numeric+0x20>
jmp    114b <str_is_numeric+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @str_is_numeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isdigit(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0x9c() {
  Assert_real((isgraph(156) == 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_isgraph.c",
              785, ("isgraph should be 0 for 0x9c"));
}


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

x86 assembly (clang, -O2):
<t_isgraph_0x9c>:
push   %rax
mov    $0x9c,%edi
call   1040 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x311,%edx
pop    %rax
jmp    1030 <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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x9c\00"
define void @t_isgraph_0x9c() {
%1 = call i64 @isgraph(i32 156)
%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 785, 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_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0x9c\00"
define void @t_isgraph_0x9c() {
%1 = tail call i64 @isgraph(i32 156)
%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 785, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct Delay {
  int dummy;
};

/* Variables and functions */
float Delay_get(struct Delay *);
int /*<<< orphan*/ Delay_put(struct Delay *, float);
float Delay_putget(struct Delay *this, float x) {
  Delay_put(this, x);
  return Delay_get(this);
}


x86 assembly (clang, -O0):
<Delay_putget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movss  -0xc(%rbp),%xmm0
call   1040 <Delay_put@plt>
mov    -0x8(%rbp),%rdi
call   1030 <Delay_get@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Delay_putget>:
push   %rbx
mov    %rdi,%rbx
call   1040 <Delay_put@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <Delay_get@plt>

LLVM IR (-O0):
%struct.Delay = type { i32 }
define float @Delay_putget(%struct.Delay* %0, float %1) {
%3 = alloca %struct.Delay*
%4 = alloca float
store %struct.Delay* %0, %struct.Delay** %3
store float %1, float* %4
%5 = load %struct.Delay*, %struct.Delay** %3
%6 = load float, float* %4
%7 = call i32 @Delay_put(%struct.Delay* %5, float %6)
%8 = load %struct.Delay*, %struct.Delay** %3
%9 = call float @Delay_get(%struct.Delay* %8)
ret float %9
}

LLVM IR (-O2):
%struct.Delay = type { i32 }
define float @Delay_putget(%struct.Delay* %0, float %1) {
%3 = tail call i32 @Delay_put(%struct.Delay* %0, float %1)
%4 = tail call float @Delay_get(%struct.Delay* %0)
ret float %4
}
f() {
  long l2;
  unsigned short us;
  unsigned long ul;
  short s2;
  ul = us = l2 = s2 = -1;
  return ul;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movw   $0xffff,-0x1a(%rbp)
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
movw   $0xffff,-0xa(%rbp)
movq   $0xffff,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i64
%2 = alloca i16
%3 = alloca i64
%4 = alloca i16
store i16 -1, i16* %4
store i64 -1, i64* %1
store i16 -1, i16* %2
store i64 65535, i64* %3
%5 = load i64, i64* %3
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f() {
ret i32 65535
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
int main(void) {
  int x = 5;
  int y;
  const int *const ptr = &x;
  printf("%d\n", *ptr);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ standard_command(int, int, int, char **);
void one_variable_one_argument_command(int opcode_byte, char **arguments) {
  standard_command(opcode_byte, 1, 1, arguments);
}


x86 assembly (clang, -O0):
<one_variable_one_argument_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rcx
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <standard_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<one_variable_one_argument_command>:
mov    %rsi,%rcx
mov    $0x1,%esi
mov    $0x1,%edx
jmp    1030 <standard_command@plt>

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

LLVM IR (-O2):
define void @one_variable_one_argument_command(i32 %0, i8** %1) {
%3 = tail call i32 @standard_command(i32 %0, i32 1, i32 1, i8** %1)
ret void
}
void testClosureVrV(void (*closure)(void)) { (*closure)(); }


x86 assembly (clang, -O0):
<testClosureVrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   *-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureVrV>:
jmp    *%rdi

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

LLVM IR (-O2):
define void @testClosureVrV(void ()* nocapture %0) {
tail call void %0()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cio_routine_exit(void *);
void __attribute__((noreturn))
cio_routine_call(void (*func)(void *), void *arg) {
  func(arg);
  cio_routine_exit(arg);
}


x86 assembly (clang, -O0):
<cio_routine_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
call   *%rax
mov    -0x10(%rbp),%rdi
call   1030 <cio_routine_exit@plt>

x86 assembly (clang, -O2):
<cio_routine_call>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rax
mov    %rsi,%rdi
call   *%rax
mov    %rbx,%rdi
call   1030 <cio_routine_exit@plt>

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

LLVM IR (-O2):
define void @cio_routine_call(void (i8*)* nocapture %0, i8* %1) {
tail call void %0(i8* %1)
%3 = tail call i32 @cio_routine_exit(i8* %1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(long *);
void freeLongVector(long int *vector) { free(vector); }


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

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

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

LLVM IR (-O2):
define void @freeLongVector(i64* nocapture %0) {
%2 = tail call i32 @free(i64* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverseWords(char *);
int main(void) {
  char str[] = {' ', ' ', 't', 'h', 'e', ' ', ' ', 's', 'k', 'y', ' ',
                'i', 's', ' ', ' ', 'b', 'l', 'u', 'e', ' ', ' ', '\0'};
  printf("%s\n", str);
  reverseWords(str);
  printf("%s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xebf(%rip),%ax
mov    %ax,-0xc(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
call   1040 <reverseWords@plt>
lea    -0x20(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movaps 0xed2(%rip),%xmm0
movaps %xmm0,(%rsp)
movabs $0x202065756c6220,%rax
mov    %rax,0xe(%rsp)
lea    0xece(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <reverseWords@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.str = [22 x i8] c" the sky is blue \00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [22 x i8]
store i32 0, i32* %1
%3 = bitcast [22 x i8]* %2 to i8*
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%7 = call i32 @reverseWords(i8* %6)
%8 = getelementptr inbounds [22 x i8], [22 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [22 x i8] c" the sky is blue \00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [22 x i8]
%2 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @reverseWords(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int permute(int *num1, int *num2) {
  int save;
  save = *num1;
  *num1 = *num2;
  *num2 = save;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @permute(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
main() {
  int lista[] = {24, 30, 15, 45, 34};
  int ind;
  int *plista = lista;
  for (ind = 0; ind < 5; ind++)
    printf("%d  ", *plista++);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x5,-0x24(%rbp)
jge    1182 <main+0x72>
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    114d <main+0x3d>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1e,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2d,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x22,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.lista = [5 x i32] [i32 24, i32 30, i32 15, i32 45, i32 34]
@.str = [5 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca i32
%4 = alloca i32*
store i32 0, i32* %1
%5 = bitcast [5 x i32]* %2 to i8*
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
store i32* %6, i32** %4
store i32 0, i32* %3
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 5
br i1 %9, label %10, label %18
10: ; preds = %7
%11 = load i32*, i32** %4
%12 = getelementptr inbounds i32, i32* %11, i32 1
store i32* %12, i32** %4
%13 = load i32, i32* %11
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %13)
br label %15
15: ; preds = %10
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %7
18: ; preds = %7
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [5 x i8] c"%d \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 24)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 30)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 15)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 45)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 34)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ read_from_stdin();
scalar_t__ strcmp(char *, char *);
void arg_proc_option(char *c) {
  if (strcmp(c, "-") == 0)
    read_from_stdin();
}


x86 assembly (clang, -O0):
<arg_proc_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    114d <arg_proc_option+0x2d>
mov    $0x0,%al
call   1040 <read_from_stdin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_proc_option>:
push   %rax
lea    0xed8(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
je     1134 <arg_proc_option+0x14>
pop    %rax
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <read_from_stdin@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"-\00"
define void @arg_proc_option(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @read_from_stdin()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"-\00"
define void @arg_proc_option(i8* %0) {
%2 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @read_from_stdin()
br label %6
6: ; preds = %4, %1
ret void
}
int fun709() { return 709; }


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

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

LLVM IR (-O0):
define i32 @fun709() {
ret i32 709
}

LLVM IR (-O2):
define i32 @fun709() {
ret i32 709
}
/* Variables and functions */
int /*<<< orphan*/ get_rand();
double log(int /*<<< orphan*/);
double exp_dist(double i) { return (i * -1.0) * log(get_rand()); }


x86 assembly (clang, -O0):
<exp_dist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xecb(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <get_rand@plt>
mov    %eax,%edi
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exp_dist>:
sub    $0x18,%rsp
xorpd  0xed4(%rip),%xmm0
movapd %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <get_rand@plt>
mov    %eax,%edi
call   1040 <log@plt>
mulsd  (%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @exp_dist(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, -1.000000e+00
%5 = call i32 (...) @get_rand()
%6 = call double @log(i32 %5)
%7 = fmul double %4, %6
ret double %7
}

LLVM IR (-O2):
define double @exp_dist(double %0) {
%2 = fneg double %0
%3 = tail call i32 (...) @get_rand()
%4 = tail call double @log(i32 %3)
%5 = fmul double %4, %2
ret double %5
}
int STEST908(long v) { return v + 3; }


x86 assembly (clang, -O0):
<STEST908>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<STEST908>:
lea    0x3(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @STEST908(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = add i32 %2, 3
ret i32 %3
}
unsigned xrop3_255_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned stk1;
  stk1 = 0xffff;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_255_1_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)
movl   $0xffff,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_255_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
xor    $0xffff,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_255_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i32 %4, 65535
%6 = or i32 %5, %3
ret i32 %6
}
int end_of_line(const char *p) {
  while (*p == ' ')
    p++;
  if ((!p[0]) || (*p == '#') || (*p == '\n') || (*p == '\r'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<end_of_line>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1129 <end_of_line+0x29>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <end_of_line+0x8>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1166 <end_of_line+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
je     1166 <end_of_line+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1166 <end_of_line+0x66>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
jne    1172 <end_of_line+0x72>
movl   $0x1,-0x4(%rbp)
jmp    1179 <end_of_line+0x79>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_of_line>:
movzbl (%rdi),%eax
cmp    $0x20,%al
jne    110d <end_of_line+0xd>
add    $0x1,%rdi
jmp    1100 <end_of_line>
cmp    $0x23,%al
ja     112a <end_of_line+0x2a>
movzbl %al,%eax
movabs $0x800002401,%rcx
bt     %rax,%rcx
jae    112a <end_of_line+0x2a>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @end_of_line(i8* nocapture %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %8 [
i8 32, label %5
i8 0, label %7
i8 35, label %7
i8 10, label %7
i8 13, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2, %2, %2
br label %8
8: ; preds = %2, %7
%9 = phi i32 [ 1, %7 ], [ 0, %2 ]
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ hello;

/* Variables and functions */
int /*<<< orphan*/ hostcall_test_func_hello(char *, int);
int main(void) {
  char hello[] = "hello world";
  hostcall_test_func_hello(hello, sizeof(hello));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x6f77206f6c6c6568,%rax
20 77 6f
mov    %rax,0x8(%rsp)
movl   $0x646c72,0x10(%rsp)
lea    0x8(%rsp),%rdi
mov    $0xc,%esi
call   1030 <hostcall_test_func_hello@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.hello = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i8]
store i32 0, i32* %1
%3 = bitcast [12 x i8]* %2 to i8*
%4 = getelementptr inbounds [12 x i8], [12 x i8]* %2, i64 0, i64 0
%5 = call i32 @hostcall_test_func_hello(i8* %4, i32 12)
ret i32 0
}

LLVM IR (-O2):
@__const.main.hello = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = alloca [12 x i8]
%2 = getelementptr inbounds [12 x i8], [12 x i8]* %1, i64 0, i64 0
%3 = call i32 @hostcall_test_func_hello(i8* %2, i32 12)
ret i32 0
}
/* Variables and functions */
scalar_t__ my_malloc(int);
int *my_realloc(int *, int);
void test_config_options_no_free_bad() {
  int *p = (int *)my_malloc(sizeof(int));
  int *q = my_realloc(p, sizeof(int));
}


x86 assembly (clang, -O0):
<test_config_options_no_free_bad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <my_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1040 <my_realloc@plt>
mov    %rax,-0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_config_options_no_free_bad>:
push   %rax
mov    $0x4,%edi
call   1030 <my_malloc@plt>
mov    %rax,%rdi
mov    $0x4,%esi
pop    %rax
jmp    1040 <my_realloc@plt>

LLVM IR (-O0):
define void @test_config_options_no_free_bad() {
%1 = alloca i32*
%2 = alloca i32*
%3 = call i64 @my_malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %1
%5 = load i32*, i32** %1
%6 = call i32* @my_realloc(i32* %5, i32 4)
store i32* %6, i32** %2
ret void
}

LLVM IR (-O2):
define void @test_config_options_no_free_bad() {
%1 = tail call i64 @my_malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32* @my_realloc(i32* %2, i32 4)
ret void
}
int test_imm_E0int16_mem(short *val) {
  return ((*val) & (-0xE0 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E0int16_mem>:
movzwl (%rdi),%eax
test   $0xff20,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E0int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -224
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void AS1_OnError(void) {}


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

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

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

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

/* Variables and functions */
int _hasPathSum(struct TreeNode *, int /*<<< orphan*/, int);
bool hasPathSum(struct TreeNode *root, int sum) {
  if (root == NULL)
    return false;
  return _hasPathSum(root, 0, sum);
}


x86 assembly (clang, -O0):
<hasPathSum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <hasPathSum+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1147 <hasPathSum+0x37>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1030 <_hasPathSum@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hasPathSum>:
test   %rdi,%rdi
je     111e <hasPathSum+0xe>
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <_hasPathSum@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @hasPathSum(%struct.TreeNode* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.TreeNode*
%5 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %4
store i32 %1, i32* %5
%6 = load %struct.TreeNode*, %struct.TreeNode** %4
%7 = icmp eq %struct.TreeNode* %6, null
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %13
9: ; preds = %2
%10 = load %struct.TreeNode*, %struct.TreeNode** %4
%11 = load i32, i32* %5
%12 = call i32 @_hasPathSum(%struct.TreeNode* %10, i32 0, i32 %11)
store i32 %12, i32* %3
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @hasPathSum(%struct.TreeNode* %0, i32 %1) {
%3 = icmp eq %struct.TreeNode* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @_hasPathSum(%struct.TreeNode* %0, i32 0, i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
void flipSignDouble(void *data) {
  double *pValue = (double *)data;
  double value = *((double *)data) * -1;
  *pValue = value;
}


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

x86 assembly (clang, -O2):
<flipSignDouble>:
movsd  (%rdi),%xmm0
xorps  0xef5(%rip),%xmm0
movlps %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @flipSignDouble(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
%4 = alloca double
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to double*
store double* %6, double** %3
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to double*
%9 = load double, double* %8
%10 = fmul double %9, -1.000000e+00
store double %10, double* %4
%11 = load double, double* %4
%12 = load double*, double** %3
store double %11, double* %12
ret void
}

LLVM IR (-O2):
define void @flipSignDouble(i8* nocapture %0) {
%2 = bitcast i8* %0 to double*
%3 = load double, double* %2
%4 = fneg double %3
store double %4, double* %2
ret void
}