xunge/DecIR huggingface dataset:
/* Variables and functions */
void *malloc(int);
int /*<<< orphan*/ mes_aux(int, char *, int);
void *ighmm_malloc(int bytes) {
  void *res;
  if (bytes <= 0)
    bytes = 1;
  res = malloc(bytes);
  if (res)
    return (res);
  else
    mes_aux((1 | 16 | 4), "malloc: could not allocate %d bytes\n", bytes);
  return (NULL);
}


x86 assembly (clang, -O0):
<ighmm_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jg     113c <ighmm_malloc+0x1c>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <ighmm_malloc+0x40>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    117c <ighmm_malloc+0x5c>
mov    -0xc(%rbp),%edx
mov    $0x15,%edi
lea    0xe91(%rip),%rsi
call   1040 <mes_aux@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ighmm_malloc>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
mov    $0x1,%ebx
cmovg  %edi,%ebx
mov    %ebx,%edi
call   1030 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1150 <ighmm_malloc+0x30>
lea    0xebc(%rip),%rsi
mov    $0x15,%edi
mov    %ebx,%edx
call   1040 <mes_aux@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [37 x i8] c"malloc: could not allocate %d bytes\0A\00"
define i8* @ighmm_malloc(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = icmp sle i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %8
8: ; preds = %7, %1
%9 = load i32, i32* %3
%10 = call i8* @malloc(i32 %9)
store i8* %10, i8** %4
%11 = load i8*, i8** %4
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %4
store i8* %14, i8** %2
br label %19
15: ; preds = %8
%16 = load i32, i32* %3
%17 = call i32 @mes_aux(i32 21, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15
store i8* null, i8** %2
br label %19
19: ; preds = %18, %13
%20 = load i8*, i8** %2
ret i8* %20
}

LLVM IR (-O2):
@.str = [37 x i8] c"malloc: could not allocate %d bytes\0A\00"
define noalias i8* @ighmm_malloc(i32 %0) {
%2 = icmp sgt i32 %0, 1
%3 = select i1 %2, i32 %0, i32 1
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 @mes_aux(i32 21, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %1, %6
ret i8* %4
}
void occampi_branchlabelhook_free(void *chook) { return; }


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

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

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

LLVM IR (-O2):
define void @occampi_branchlabelhook_free(i8* nocapture %0) {
ret void
}
void set_value_at(int *board, int row, int column, int value) {
  board[(10 * row) + column] = value;
}


x86 assembly (clang, -O0):
<set_value_at>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
imul   $0xa,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_value_at>:
lea    (%rsi,%rsi,4),%eax
lea    (%rdx,%rax,2),%eax
cltq
mov    %ecx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @set_value_at(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %8
%10 = load i32*, i32** %5
%11 = load i32, i32* %6
%12 = mul nsw i32 10, %11
%13 = load i32, i32* %7
%14 = add nsw i32 %12, %13
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %10, i64 %15
store i32 %9, i32* %16
ret void
}

LLVM IR (-O2):
define void @set_value_at(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = mul nsw i32 %1, 10
%6 = add nsw i32 %5, %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %3, i32* %8
ret void
}
void caller_1_1_1_1_1_1_2() {}


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

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

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

LLVM IR (-O2):
define void @caller_1_1_1_1_1_1_2() {
ret void
}
/* Variables and functions */
short or_h(short *, short *);
short intr_wrap_543(short p1, short p2) { return or_h(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_543>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    -0x2(%rbp),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <or_h@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_543>:
push   %rax
mov    %di,0x6(%rsp)
mov    %si,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1030 <or_h@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_543(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @or_h(i16* %3, i16* %4)
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @intr_wrap_543(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @or_h(i16* %3, i16* %4)
ret i16 %5
}
/* Variables and functions */
int /*<<< orphan*/ dcshft_(int *, int *, int *, double *, int *);
void wcc_dcshft_(int *M, int *N, int *OFFSET, char *A, int *LDA) {
  dcshft_(M, N, OFFSET, (double *)A, LDA);
}


x86 assembly (clang, -O0):
<wcc_dcshft_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <dcshft_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dcshft_>:
jmp    1030 <dcshft_@plt>

LLVM IR (-O0):
define void @wcc_dcshft_(i32* %0, i32* %1, i32* %2, i8* %3, i32* %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i8*
%10 = alloca i32*
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i8* %3, i8** %9
store i32* %4, i32** %10
%11 = load i32*, i32** %6
%12 = load i32*, i32** %7
%13 = load i32*, i32** %8
%14 = load i8*, i8** %9
%15 = bitcast i8* %14 to double*
%16 = load i32*, i32** %10
%17 = call i32 @dcshft_(i32* %11, i32* %12, i32* %13, double* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @wcc_dcshft_(i32* %0, i32* %1, i32* %2, i8* %3, i32* %4) {
%6 = bitcast i8* %3 to double*
%7 = tail call i32 @dcshft_(i32* %0, i32* %1, i32* %2, double* %6, i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
int /*<<< orphan*/ set_tail(void *, int /*<<< orphan*/);
int main(int argc, const char *argv[]) {
  ;
  void *ptr = malloc(sizeof(char) * 100);
  set_tail(ptr, 0);
  free(ptr);
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1050 <set_tail@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <set_tail@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @malloc(i32 100)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @set_tail(i8* %8, i32 0)
%10 = load i8*, i8** %6
%11 = call i32 @free(i8* %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call dereferenceable_or_null(100) i8* @malloc(i32 100)
%4 = tail call i32 @set_tail(i8* %3, i32 0)
%5 = tail call i32 @free(i8* %3)
ret i32 0
}
int __gthread_active_p(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @__gthread_active_p() {
ret i32 1
}

LLVM IR (-O2):
define i32 @__gthread_active_p() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, unsigned int);
int /*<<< orphan*/ stderr;
__attribute__((hcos_noinstrument)) void
check_bitmask(const char *name, unsigned int reported, unsigned int expected) {
  if (reported != expected)
    do {
      fprintf(stderr,
              "FAIL: "
              "Reported %s did not match expected. Reported: 0x%x, Expected: "
              "0x%x\n",
              name, reported, expected);
      exit(1);
    } while (1);
}


x86 assembly (clang, -O0):
<check_bitmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
je     116d <check_bitmask+0x4d>
jmp    1143 <check_bitmask+0x23>
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xea2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_bitmask>:
mov    %edx,%r8d
cmp    %edx,%esi
jne    1128 <check_bitmask+0x8>
ret
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
lea    0xec2(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [74 x i8] c"FAIL: Reported %s did not match expected. Reported: 0x%x, Expected: 0x%x\0A\00"
define void @check_bitmask(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %5
%8 = load i32, i32* %6
%9 = icmp ne i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %3
br label %11
11: ; preds = %18, %10
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %13, i32 %14, i32 %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; No predecessors!
br i1 true, label %11, label %19
19: ; preds = %18
br label %20
20: ; preds = %19, %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [74 x i8] c"FAIL: Reported %s did not match expected. Reported: 0x%x, Expected: 0x%x\0A\00"
define void @check_bitmask(i8* %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %1, %2
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i32 %2)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
int ph_ftp_data_deinit(void *handler) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ph_ftp_data_deinit(i8* nocapture readnone %0) {
ret i32 0
}
double exact2(double x, double y) { return 0.0; }


x86 assembly (clang, -O0):
<exact2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact2>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @exact2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @exact2(double %0, double %1) {
ret double 0.000000e+00
}
/* Variables and functions */
int input(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Enter the string: ");
  printf("The space character was encountered at position %d.\n", input(1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x1,%edi
call   1030 <input@plt>
mov    %eax,%esi
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Enter the string: \00"
@.str.1 = [53 x i8] c"The space character was encountered at position %d.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @input(i32 1)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Enter the string: \00"
@.str.1 = [53 x i8] c"The space character was encountered at position %d.\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @input(i32 1)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
int vde_chain_nm9_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm9_free(i8* nocapture readnone %0) {
ret i32 0
}
void intel_crt_restore(struct drm_output *output) {}


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

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

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

LLVM IR (-O2):
%struct.drm_output = type opaque
define void @intel_crt_restore(%struct.drm_output* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void *thread_function(void *arg) {
  int x = (int)arg;
  printf("Thread <%d> executing\n", x);
  return NULL;
}


x86 assembly (clang, -O0):
<thread_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_function>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"Thread <%d> executing\0A\00"
define noalias i8* @thread_function(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ squeeze(char *, char *);
int main() {
  char s1[] = "catrugb";
  char s2[] = "hatb";
  squeeze(s1, s2);
  printf("%s\n\n", s1);
  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,-0xc(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x11(%rbp)
mov    0xec3(%rip),%al
mov    %al,-0xd(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x11(%rbp),%rsi
call   1030 <squeeze@plt>
lea    -0xc(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x62677572746163,%rax
mov    %rax,0x8(%rsp)
movb   $0x0,0x4(%rsp)
movl   $0x62746168,(%rsp)
lea    0x8(%rsp),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <squeeze@plt>
lea    0xeae(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.s2 = [5 x i8] c"hatb\00"
@.str = [5 x i8] c"%s\0A\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca [5 x i8]
%3 = bitcast i64* %1 to i8*
store i64 27698301846708579, i64* %1
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = call i32 @squeeze(i8* %3, i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LOCK_SH;
int resctrl_lock(int /*<<< orphan*/);
int resctrl_lock_shared(void) { return resctrl_lock(LOCK_SH); }


x86 assembly (clang, -O0):
<resctrl_lock_shared>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <resctrl_lock@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<resctrl_lock_shared>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <resctrl_lock@plt>

LLVM IR (-O0):
@LOCK_SH = global i32 0
define i32 @resctrl_lock_shared() {
%1 = load i32, i32* @LOCK_SH
%2 = call i32 @resctrl_lock(i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@LOCK_SH = global i32 0
define i32 @resctrl_lock_shared() {
%1 = load i32, i32* @LOCK_SH
%2 = tail call i32 @resctrl_lock(i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x8a() {
  Assert_real((ispunct(138) == 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_ispunct.c",
              695, ("ispunct should be 0 for 0x8a"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x8a\00"
define void @t_ispunct_0x8a() {
%1 = call i64 @ispunct(i32 138)
%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 695, 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_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x8a\00"
define void @t_ispunct_0x8a() {
%1 = tail call i64 @ispunct(i32 138)
%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 695, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void rop3_56_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = *D | T;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_56_1_0>:
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 -0xa(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%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    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_56_1_0>:
mov    (%rdi),%al
xor    %dl,%al
and    %sil,%al
xor    %dl,%al
mov    %al,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_56_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %1, -1
%6 = and i8 %5, %2
%7 = and i8 %4, %1
%8 = or i8 %7, %6
store i8 %8, i8* %0
ret void
}
void XcmsScreenWhitePointOfCCC() {}


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

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

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

LLVM IR (-O2):
define void @XcmsScreenWhitePointOfCCC() {
ret void
}
/* Variables and functions */
int ds1621_write_value(int, int, int /*<<< orphan*/);
int stop_convert(int dev_fd) { return (ds1621_write_value(dev_fd, 0x22, 0)); }


x86 assembly (clang, -O0):
<stop_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x22,%esi
xor    %edx,%edx
call   1030 <ds1621_write_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_convert>:
mov    $0x22,%esi
xor    %edx,%edx
jmp    1030 <ds1621_write_value@plt>

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

LLVM IR (-O2):
define i32 @stop_convert(i32 %0) {
%2 = tail call i32 @ds1621_write_value(i32 %0, i32 34, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
FILE *efopen(const char *path, const char *mode) {
  FILE *f;
  f = fopen(path, mode);
  if (f == NULL) {
    fprintf(stderr, "fail to open file %s\n", path);
    exit(-2);
  }
  return f;
}


x86 assembly (clang, -O0):
<efopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    117f <efopen+0x4f>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe90(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<efopen>:
push   %rbx
mov    %rdi,%rbx
call   1040 <fopen@plt>
test   %rax,%rax
je     1140 <efopen+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0xfffffffe,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [22 x i8] c"fail to open file %s\0A\00"
define i32* @efopen(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32* @fopen(i8* %6, i8* %7)
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = icmp eq i32* %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i8*, i8** %3
%14 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = call i32 @exit(i32 -2)
unreachable
16: ; preds = %2
%17 = load i32*, i32** %5
ret i32* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [22 x i8] c"fail to open file %s\0A\00"
define noalias i32* @efopen(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
%4 = icmp eq i32* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @exit(i32 -2)
unreachable
9: ; preds = %2
ret i32* %3
}
int test_imm_62uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x62 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_62uint64_lowword_reg>:
test   $0x62,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_62uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 98
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void erase() {}


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

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

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

LLVM IR (-O2):
define void @erase() {
ret void
}
/* Variables and functions */
int close(int);
int udp_close(int s) { return close(s); }


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

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

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

LLVM IR (-O2):
define i32 @udp_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
float __ocml_log2_f32(float);
float log2f(float x) { return __ocml_log2_f32(x); }


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

x86 assembly (clang, -O2):
<log2f>:
jmp    1030 <__ocml_log2_f32@plt>

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

LLVM IR (-O2):
define float @log2f(float %0) {
%2 = tail call float @__ocml_log2_f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ f(int);
int main(void) {
  if (f(~128))
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffff7f,%edi
call   1040 <f@plt>
cmp    $0x0,%rax
je     115a <main+0x2a>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffff7f,%edi
call   1040 <f@plt>
test   %rax,%rax
jne    1147 <main+0x17>
xor    %edi,%edi
call   1050 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @f(i32 -129)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
%7 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @f(i32 -129)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int icrypto_verifykeyfile(char const *, int);
int crypto_verifykeyfile(const char *fname, int secure) {
  if (!fname) {
    return -1;
  }
  return icrypto_verifykeyfile(fname, secure);
}


x86 assembly (clang, -O0):
<crypto_verifykeyfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1136 <crypto_verifykeyfile+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1145 <crypto_verifykeyfile+0x35>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <icrypto_verifykeyfile@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_verifykeyfile>:
test   %rdi,%rdi
je     111a <crypto_verifykeyfile+0xa>
jmp    1030 <icrypto_verifykeyfile@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @crypto_verifykeyfile(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %2
store i32 -1, i32* %3
br label %13
9: ; preds = %2
%10 = load i8*, i8** %4
%11 = load i32, i32* %5
%12 = call i32 @icrypto_verifykeyfile(i8* %10, 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):
define i32 @crypto_verifykeyfile(i8* %0, i32 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @icrypto_verifykeyfile(i8* %0, i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ -1, %2 ]
ret i32 %7
}
/* Variables and functions */
scalar_t__ tolower(char);
char *strtolower(char *string) {
  char *cp;
  cp = string;
  while (*cp != '\0') {
    *cp = (char)tolower(*cp);
    cp++;
  }
  return (string);
}


x86 assembly (clang, -O0):
<strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1159 <strtolower+0x49>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strtolower+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1146 <strtolower+0x36>
lea    0x1(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,-0x1(%rbx)
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <strtolower+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strtolower(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = tail call i64 @tolower(i8 signext %5)
%8 = trunc i64 %7 to i8
store i8 %8, i8* %6
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret i8* %0
}
void gtk_notebook_get_current_page() {}


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

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

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

LLVM IR (-O2):
define void @gtk_notebook_get_current_page() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_TYPE_ARRAY;
int bpf_create_map(int /*<<< orphan*/, int, int, int, int /*<<< orphan*/);
int bpf_map_create(void) {
  return bpf_create_map(BPF_MAP_TYPE_ARRAY, sizeof(uint32_t), sizeof(uint32_t),
                        1024, 0);
}


x86 assembly (clang, -O0):
<bpf_map_create>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    $0x4,%edx
mov    $0x400,%ecx
xor    %r8d,%r8d
mov    %edx,%esi
call   1030 <bpf_create_map@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bpf_map_create>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
mov    $0x4,%esi
mov    $0x4,%edx
mov    $0x400,%ecx
xor    %r8d,%r8d
jmp    1030 <bpf_create_map@plt>

LLVM IR (-O0):
@BPF_MAP_TYPE_ARRAY = global i32 0
define i32 @bpf_map_create() {
%1 = load i32, i32* @BPF_MAP_TYPE_ARRAY
%2 = call i32 @bpf_create_map(i32 %1, i32 4, i32 4, i32 1024, i32 0)
ret i32 %2
}

LLVM IR (-O2):
@BPF_MAP_TYPE_ARRAY = global i32 0
define i32 @bpf_map_create() {
%1 = load i32, i32* @BPF_MAP_TYPE_ARRAY
%2 = tail call i32 @bpf_create_map(i32 %1, i32 4, i32 4, i32 1024, i32 0)
ret i32 %2
}
void k_quicksort_swap(int *data1, int *data2) {
  int tmp = *data1;
  *data1 = *data2;
  *data2 = tmp;
}


x86 assembly (clang, -O0):
<k_quicksort_swap>:
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)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @k_quicksort_swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %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 void
}

LLVM IR (-O2):
define void @k_quicksort_swap(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 void
}
/* Variables and functions */
int /*<<< orphan*/ gpio_clr(int);
int /*<<< orphan*/ gpio_put(int, short);
int /*<<< orphan*/ gpio_set(int);
void reg_shift(short bit) {
  gpio_put(1 << 4, bit);
  gpio_set(1 << 7);
  gpio_clr(1 << 7);
}


x86 assembly (clang, -O0):
<reg_shift>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    $0x10,%edi
movswl -0x2(%rbp),%esi
call   1040 <gpio_put@plt>
mov    $0x80,%edi
call   1050 <gpio_set@plt>
mov    $0x80,%edi
call   1030 <gpio_clr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_shift>:
push   %rax
mov    %edi,%esi
mov    $0x10,%edi
call   1040 <gpio_put@plt>
mov    $0x80,%edi
call   1050 <gpio_set@plt>
mov    $0x80,%edi
pop    %rax
jmp    1030 <gpio_clr@plt>

LLVM IR (-O0):
define void @reg_shift(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call i32 @gpio_put(i32 16, i16 signext %3)
%5 = call i32 @gpio_set(i32 128)
%6 = call i32 @gpio_clr(i32 128)
ret void
}

LLVM IR (-O2):
define void @reg_shift(i16 signext %0) {
%2 = tail call i32 @gpio_put(i32 16, i16 signext %0)
%3 = tail call i32 @gpio_set(i32 128)
%4 = tail call i32 @gpio_clr(i32 128)
ret void
}
int compare_double(const void *pa, const void *pb) {
  double a = *(double *)pa, b = *(double *)pb;
  if (a < b)
    return -1;
  if (a > b)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<compare_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <compare_double+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <compare_double+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <compare_double+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <compare_double+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_double>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_double(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double
%7 = alloca double
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to double*
%10 = load double, double* %9
store double %10, double* %6
%11 = load i8*, i8** %5
%12 = bitcast i8* %11 to double*
%13 = load double, double* %12
store double %13, double* %7
%14 = load double, double* %6
%15 = load double, double* %7
%16 = fcmp olt double %14, %15
br i1 %16, label %17, label %18
17: ; preds = %2
store i32 -1, i32* %3
br label %24
18: ; preds = %2
%19 = load double, double* %6
%20 = load double, double* %7
%21 = fcmp ogt double %19, %20
br i1 %21, label %22, label %23
22: ; preds = %18
store i32 1, i32* %3
br label %24
23: ; preds = %18
store i32 0, i32* %3
br label %24
24: ; preds = %23, %22, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compare_double(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ free(void *const);
void WebPSafeFree(void *const ptr) {
  if (ptr != NULL) {
    do {
    } while (0);
    do {
    } while (0);
  }
  free(ptr);
}


x86 assembly (clang, -O0):
<WebPSafeFree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <WebPSafeFree+0x30>
jmp    112c <WebPSafeFree+0x1c>
jmp    1131 <WebPSafeFree+0x21>
jmp    1136 <WebPSafeFree+0x26>
jmp    113b <WebPSafeFree+0x2b>
jmp    1140 <WebPSafeFree+0x30>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @WebPSafeFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int strval(char *str) {
  register int num;
  num = 0;
  while (*str) {
    num <<= 8;
    num += (int)*str++;
  }
  return (num);
}


x86 assembly (clang, -O0):
<strval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1142 <strval+0x42>
mov    -0xc(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strval+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strval>:
mov    (%rdi),%cl
test   %cl,%cl
je     1124 <strval+0x24>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
shl    $0x8,%eax
movsbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <strval+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @strval(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = shl i32 %6, 8
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add nsw i32 %8, %10
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %15
}
int cvs_symbol_name_compare(void *x, void *y) {
  if (x < y)
    return -1;
  else if (y < x)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cvs_symbol_name_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1126 <cvs_symbol_name_compare+0x26>
movl   $0xffffffff,-0x4(%rbp)
jmp    1147 <cvs_symbol_name_compare+0x47>
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1140 <cvs_symbol_name_compare+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <cvs_symbol_name_compare+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvs_symbol_name_compare>:
xor    %ecx,%ecx
cmp    %rdi,%rsi
setb   %cl
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @cvs_symbol_name_compare(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = icmp ult i8* %1, %0
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Variables and functions */
int __builtin_mips_cabs_le_s(float, float);
int test14(float a, float b) { return __builtin_mips_cabs_le_s(a, b); }


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

x86 assembly (clang, -O2):
<test14>:
jmp    1030 <__builtin_mips_cabs_le_s@plt>

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

LLVM IR (-O2):
define i32 @test14(float %0, float %1) {
%3 = tail call i32 @__builtin_mips_cabs_le_s(float %0, float %1)
ret i32 %3
}