xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __coverity_free__(void *);
int /*<<< orphan*/ __coverity_mark_as_afm_freed__(void *, char *);
void H5Aclose(void *id) {
  __coverity_free__(id);
  __coverity_mark_as_afm_freed__(id, "H5Aclose");
}


x86 assembly (clang, -O0):
<H5Aclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__coverity_free__@plt>
mov    -0x8(%rbp),%rdi
lea    0xec0(%rip),%rsi
call   1030 <__coverity_mark_as_afm_freed__@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<H5Aclose>:
push   %rbx
mov    %rdi,%rbx
call   1040 <__coverity_free__@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <__coverity_mark_as_afm_freed__@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"H5Aclose\00"
define void @H5Aclose(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @__coverity_free__(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @__coverity_mark_as_afm_freed__(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"H5Aclose\00"
define void @H5Aclose(i8* %0) {
%2 = tail call i32 @__coverity_free__(i8* %0)
%3 = tail call i32 @__coverity_mark_as_afm_freed__(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct trackDb {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cloneTdbListToSharedMem(char *, struct trackDb *,
                                           unsigned long, char *);
void trackDbCloneTdbListToSharedMem(char *db, struct trackDb *list,
                                    unsigned long size) {
  ;
  cloneTdbListToSharedMem(db, list, size, db);
}


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

x86 assembly (clang, -O2):
<trackDbCloneTdbListToSharedMem>:
mov    %rdi,%rcx
jmp    1030 <cloneTdbListToSharedMem@plt>

LLVM IR (-O0):
%struct.trackDb = type { i32 }
define void @trackDbCloneTdbListToSharedMem(i8* %0, %struct.trackDb* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca %struct.trackDb*
%6 = alloca i64
store i8* %0, i8** %4
store %struct.trackDb* %1, %struct.trackDb** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load %struct.trackDb*, %struct.trackDb** %5
%9 = load i64, i64* %6
%10 = load i8*, i8** %4
%11 = call i32 @cloneTdbListToSharedMem(i8* %7, %struct.trackDb* %8, i64 %9, i8* %10)
ret void
}

LLVM IR (-O2):
%struct.trackDb = type { i32 }
define void @trackDbCloneTdbListToSharedMem(i8* %0, %struct.trackDb* %1, i64 %2) {
%4 = tail call i32 @cloneTdbListToSharedMem(i8* %0, %struct.trackDb* %1, i64 %2, i8* %0)
ret void
}
int test_imm_E1int16_reg(short val) {
  return ((val) & (0xE1 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E1int16_reg(i16 signext %0) {
%2 = and i16 %0, 225
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
struct context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
void crash(struct context *context_unused, void *data_unused,
           size_t id_unused) {
  (void)context_unused;
  (void)data_unused;
  (void)id_unused;
  abort();
}


x86 assembly (clang, -O0):
<crash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<crash>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.context = type { i32 }
define void @crash(%struct.context* %0, i8* %1, i64 %2) {
%4 = alloca %struct.context*
%5 = alloca i8*
%6 = alloca i64
store %struct.context* %0, %struct.context** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load %struct.context*, %struct.context** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.context = type { i32 }
define void @crash(%struct.context* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
%4 = tail call i32 (...) @abort()
unreachable
}
void ___sl_plot_trace_now(const char *plot_name, const char *node_name) {
  (void)plot_name;
  (void)node_name;
}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __sigisemptyset(int /*<<< orphan*/ const *);
int sigisemptyset(const sigset_t *set) {
  if (set == NULL) {
    __set_errno(EINVAL);
    return -1;
  }
  return __sigisemptyset(set);
}


x86 assembly (clang, -O0):
<sigisemptyset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1151 <sigisemptyset+0x31>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <sigisemptyset+0x3d>
mov    -0x10(%rbp),%rdi
call   1040 <__sigisemptyset@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigisemptyset>:
test   %rdi,%rdi
je     112a <sigisemptyset+0xa>
jmp    1040 <__sigisemptyset@plt>
push   %rax
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sigisemptyset(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EINVAL
%8 = call i32 @__set_errno(i32 %7)
store i32 -1, i32* %2
br label %12
9: ; preds = %1
%10 = load i32*, i32** %3
%11 = call i32 @__sigisemptyset(i32* %10)
store i32 %11, i32* %2
br label %12
12: ; preds = %9, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sigisemptyset(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = load i32, i32* @EINVAL
%5 = tail call i32 @__set_errno(i32 %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @__sigisemptyset(i32* %0)
br label %8
8: ; preds = %6, %3
%9 = phi i32 [ -1, %3 ], [ %7, %6 ]
ret i32 %9
}
/* Variables and functions */
double acos(int);
int /*<<< orphan*/ printf(char *, double);
int main() { printf("%f\n", acos(-1)); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @acos(i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
ret i32 0
}
void glMaterialx(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glMaterialx() {
ret void
}
/* Type definitions */
struct timeval {
  long long tv_usec;
  scalar_t__ tv_sec;
};
typedef long long int64_t;

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int64_t __attribute__((unused)) get_ts(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (int64_t)tv.tv_sec * 1000000LL + tv.tv_usec;
}


x86 assembly (clang, -O0):
<get_ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ts>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @get_ts() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%4 = load i64, i64* %3
%5 = mul nsw i64 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%7 = load i64, i64* %6
%8 = add nsw i64 %5, %7
ret i64 %8
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @get_ts() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}
/* Type definitions */
struct kp_file {
  int dummy;
};

/* Variables and functions */
int skip_section(struct kp_file *, int, char *);
int skip_gcc_except_table(struct kp_file *f, int l0) {
  return skip_section(f, l0, ".gcc_except_table");
}


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

x86 assembly (clang, -O2):
<skip_gcc_except_table>:
lea    0xee9(%rip),%rdx
jmp    1030 <skip_section@plt>

LLVM IR (-O0):
%struct.kp_file = type { i32 }
@.str = [18 x i8] c".gcc_except_table\00"
define i32 @skip_gcc_except_table(%struct.kp_file* %0, i32 %1) {
%3 = alloca %struct.kp_file*
%4 = alloca i32
store %struct.kp_file* %0, %struct.kp_file** %3
store i32 %1, i32* %4
%5 = load %struct.kp_file*, %struct.kp_file** %3
%6 = load i32, i32* %4
%7 = call i32 @skip_section(%struct.kp_file* %5, i32 %6, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
%struct.kp_file = type { i32 }
@.str = [18 x i8] c".gcc_except_table\00"
define i32 @skip_gcc_except_table(%struct.kp_file* %0, i32 %1) {
%3 = tail call i32 @skip_section(%struct.kp_file* %0, i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Type definitions */
struct _RegionHandle {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_region_impl(struct _RegionHandle *);
void _free_region(struct _RegionHandle *r) { free_region_impl(r); }


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

x86 assembly (clang, -O2):
<_free_region>:
jmp    1030 <free_region_impl@plt>

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

LLVM IR (-O2):
%struct._RegionHandle = type { i32 }
define void @_free_region(%struct._RegionHandle* %0) {
%2 = tail call i32 @free_region_impl(%struct._RegionHandle* %0)
ret void
}
float DefaultValue_float() { return 0.f; }


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

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

LLVM IR (-O0):
define float @DefaultValue_float() {
ret float 0.000000e+00
}

LLVM IR (-O2):
define float @DefaultValue_float() {
ret float 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ HplMcs51GeneralIOC__P20__clr();
void ReverseGPIOP__0__In__clr(void) { HplMcs51GeneralIOC__P20__clr(); }


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

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

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

LLVM IR (-O2):
define void @ReverseGPIOP__0__In__clr() {
%1 = tail call i32 (...) @HplMcs51GeneralIOC__P20__clr()
ret void
}
int special_get_name(name, len, temp)
char *name;
int len;
char *temp;
{
  strcpy(temp, name);
  return 0;
}


x86 assembly (clang, -O0):
<special_get_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<special_get_name>:
push   %rax
mov    %rdi,%rsi
mov    %rdx,%rdi
call   1030 <strcpy@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @special_get_name(i8* nocapture %0, i32 %1, i8* %2) {
%4 = tail call i8* @strcpy(i8* dereferenceable(1) %2, i8* dereferenceable(1) %0)
ret i32 0
}
int Q_FloatSort(const void *float1, const void *float2) {
  return (*(const float *)float1 - *(const float *)float2);
}


x86 assembly (clang, -O0):
<Q_FloatSort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subss  (%rax),%xmm0
cvttss2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_FloatSort>:
movss  (%rdi),%xmm0
subss  (%rsi),%xmm0
cvttss2si %xmm0,%eax
ret

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

LLVM IR (-O2):
define i32 @Q_FloatSort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fsub float %4, %6
%8 = fptosi float %7 to i32
ret i32 %8
}
double _Complex conj(double _Complex z) { abort(); }


x86 assembly (clang, -O0):
<conj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x8(%rbp)
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<conj>:
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define { double, double } @conj(double %0, double %1) {
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
store double %0, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %1, double* %5
unreachable
}

LLVM IR (-O2):
define { double, double } @conj(double %0, double %1) {
tail call void @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ f(int, int, int);
int /*<<< orphan*/ g(int);
void main() {
  f(1, 2, 3);
  if (1)
    g(1);
  else
    g(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <f@plt>
mov    $0x1,%edi
call   1040 <g@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <f@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <g@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @f(i32 1, i32 2, i32 3)
%2 = call i32 @g(i32 1)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @f(i32 1, i32 2, i32 3)
%2 = tail call i32 @g(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
p_ar(int *b) {
  for (int i = 0; i < 3; i++)
    printf("b[%d] = %d\n", i, b[i]);
}


x86 assembly (clang, -O0):
<p_ar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1155 <p_ar+0x45>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <p_ar+0x13>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_ar>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%edx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x4(%rbx),%edx
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x8(%rbx),%edx
mov    %r14,%rdi
mov    $0x2,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"b[%d] = %d\0A\00"
define i32 @p_ar(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0, i32 %2)
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 %5)
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i32 %8)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc < 2) {
    printf("syntax error.\n");
  } else {
    printf("ok.\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1141 <main+0x31>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    114d <main+0x3d>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
lea    0xee9(%rip),%rax
lea    0xede(%rip),%rdi
cmovl  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [4 x i8] c"ok.\00"
@str.2 = [14 x i8] c"syntax error.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 2
%4 = select i1 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
ret i32 0
}
void gtk_action_block_activate_from() {}


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

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

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

LLVM IR (-O2):
define void @gtk_action_block_activate_from() {
ret void
}
/* Variables and functions */
int lspcon_i2c_spi_disable_protection(int);
int lspcon_i2c_spi_enable_write_status_register(int);
int lspcon_i2c_spi_wait_rom_free(int);
int lspcon_i2c_spi_disable_all_protection(int fd) {
  int ret = lspcon_i2c_spi_enable_write_status_register(fd);
  ret |= lspcon_i2c_spi_disable_protection(fd);
  ret |= lspcon_i2c_spi_wait_rom_free(fd);
  return ret;
}


x86 assembly (clang, -O0):
<lspcon_i2c_spi_disable_all_protection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <lspcon_i2c_spi_enable_write_status_register@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <lspcon_i2c_spi_disable_protection@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <lspcon_i2c_spi_wait_rom_free@plt>
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lspcon_i2c_spi_disable_all_protection>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
call   1050 <lspcon_i2c_spi_enable_write_status_register@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1040 <lspcon_i2c_spi_disable_protection@plt>
mov    %eax,%ebp
or     %r14d,%ebp
mov    %ebx,%edi
call   1030 <lspcon_i2c_spi_wait_rom_free@plt>
or     %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @lspcon_i2c_spi_disable_all_protection(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @lspcon_i2c_spi_enable_write_status_register(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = call i32 @lspcon_i2c_spi_disable_protection(i32 %6)
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = call i32 @lspcon_i2c_spi_wait_rom_free(i32 %10)
%12 = load i32, i32* %3
%13 = or i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @lspcon_i2c_spi_disable_all_protection(i32 %0) {
%2 = tail call i32 @lspcon_i2c_spi_enable_write_status_register(i32 %0)
%3 = tail call i32 @lspcon_i2c_spi_disable_protection(i32 %0)
%4 = or i32 %3, %2
%5 = tail call i32 @lspcon_i2c_spi_wait_rom_free(i32 %0)
%6 = or i32 %4, %5
ret i32 %6
}
/* Variables and functions */
double fmod(double, int);
double SKNormalizeDirection(double x) {
  x = fmod(x, 2 * 3.14159265358979323846);
  if (x < 0) {
    x += 2 * 3.14159265358979323846;
  }
  return x;
}


x86 assembly (clang, -O0):
<SKNormalizeDirection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x6,%edi
call   1030 <fmod@plt>
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1151 <SKNormalizeDirection+0x41>
movsd  0xeb9(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SKNormalizeDirection>:
push   %rax
mov    $0x6,%edi
call   1030 <fmod@plt>
movsd  0xedd(%rip),%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @SKNormalizeDirection(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @fmod(double %3, i32 6)
store double %4, double* %2
%5 = load double, double* %2
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fadd double %8, 0x401921FB54442D18
store double %9, double* %2
br label %10
10: ; preds = %7, %1
%11 = load double, double* %2
ret double %11
}

LLVM IR (-O2):
define double @SKNormalizeDirection(double %0) {
%2 = tail call double @fmod(double %0, i32 6)
%3 = fcmp olt double %2, 0.000000e+00
%4 = fadd double %2, 0x401921FB54442D18
%5 = select i1 %3, double %4, double %2
ret double %5
}
int hemmelig_funksjon(int a, int b) { return 45; }


x86 assembly (clang, -O0):
<hemmelig_funksjon>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x2d,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @hemmelig_funksjon(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 45
}

LLVM IR (-O2):
define i32 @hemmelig_funksjon(i32 %0, i32 %1) {
ret i32 45
}
/* Variables and functions */
char *strcpy(char *, char const *);
size_t strlen(char *);
char *strcat(char *destination, const char *source) {
  return strcpy(&destination[strlen(destination)], source);
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
add    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8*, i8** %4
%10 = call i8* @strcpy(i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = tail call i8* @strcpy(i8* dereferenceable(1) %4, i8* dereferenceable(1) %1)
ret i8* %4
}
int ld_ne_mm2(long double *a1, long double *a2) { return !(((*a1) != (*a2))); }


x86 assembly (clang, -O0):
<ld_ne_mm2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ne_mm2>:
fldt   (%rdi)
fldt   (%rsi)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setnp  %al
sete   %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @ld_ne_mm2(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp oeq x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_207() {
  Assert_real((isqrt(207) == 14),
              "/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/stdlib/isqrt.c",
              1040, ("Integer square root of 207 should be 14"));
}


x86 assembly (clang, -O0):
<t_sqrt_207>:
push   %rbp
mov    %rsp,%rbp
mov    $0xcf,%edi
call   1030 <isqrt@plt>
cmp    $0xe,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x410,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_207>:
push   %rax
mov    $0xcf,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xe,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x410,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 207 should be 14\00"
define void @t_sqrt_207() {
%1 = call i32 @isqrt(i32 207)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1040, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 207 should be 14\00"
define void @t_sqrt_207() {
%1 = tail call i32 @isqrt(i32 207)
%2 = icmp eq i32 %1, 14
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1040, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ perror(char *);
void *realloc(void *, size_t);
void *xrealloc(void *ptr, size_t size) {
  void *ret = realloc(ptr, size);
  if (!ret) {
    perror("dlib-xrealloc");
    abort();
  }
  return ret;
}


x86 assembly (clang, -O0):
<xrealloc>:
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 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116f <xrealloc+0x3f>
lea    0xe9d(%rip),%rdi
call   1050 <perror@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"dlib-xrealloc\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 (...) @abort()
unreachable
8: ; preds = %2
ret i8* %3
}
int multiplikation(int a, int b) { return a * b; }


x86 assembly (clang, -O0):
<multiplikation>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiplikation>:
mov    %edi,%eax
imul   %esi,%eax
ret

LLVM IR (-O0):
define i32 @multiplikation(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 = mul nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @multiplikation(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
void test66_Test_08_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test66_Test_08_targetInit__I() {
ret void
}
void vdbg_dump_regs(struct at_dma_chan *atchan) {}


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

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

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

LLVM IR (-O2):
%struct.at_dma_chan = type opaque
define void @vdbg_dump_regs(%struct.at_dma_chan* nocapture %0) {
ret void
}
void swap4(a, b) char a[], b[];
{
  b[0] = a[0];
  b[1] = a[1];
  b[2] = a[2];
  b[3] = a[3];
}


x86 assembly (clang, -O0):
<swap4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap4>:
mov    (%rdi),%al
mov    %al,(%rsi)
mov    0x1(%rdi),%al
mov    %al,0x1(%rsi)
mov    0x2(%rdi),%al
mov    %al,0x2(%rsi)
mov    0x3(%rdi),%al
mov    %al,0x3(%rsi)
ret

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

LLVM IR (-O2):
define void @swap4(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = load i8, i8* %0
store i8 %3, i8* %1
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 2
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = getelementptr inbounds i8, i8* %0, i64 3
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
double sqrt(double);
double distxy(double x1, double y1, double x2, double y2) {
  return sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
}


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

x86 assembly (clang, -O2):
<distxy>:
subsd  %xmm2,%xmm0
subsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1133 <distxy+0x23>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @distxy(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %5
%10 = load double, double* %7
%11 = fsub double %9, %10
%12 = load double, double* %5
%13 = load double, double* %7
%14 = fsub double %12, %13
%15 = load double, double* %6
%16 = load double, double* %8
%17 = fsub double %15, %16
%18 = load double, double* %6
%19 = load double, double* %8
%20 = fsub double %18, %19
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %11, double %14, double %21)
%23 = call double @sqrt(double %22)
ret double %23
}

LLVM IR (-O2):
define double @distxy(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %2
%6 = fsub double %1, %3
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @sqrt(double %8)
ret double %9
}
void main(void) {
  int x[10];
  int y;
  int w;
  w = x[y] + x[3];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x38(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @main() {
%1 = alloca [10 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %5
%7 = load i32, i32* %6
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
store i32 %10, i32* %3
ret void
}

LLVM IR (-O2):
define void @main() {
ret void
}
int areaOfRectangle(int length, int bredth) {
  int area;
  area = length * bredth;
  return area;
}


x86 assembly (clang, -O0):
<areaOfRectangle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<areaOfRectangle>:
mov    %edi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @areaOfRectangle(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int partition(int *, int, int);
void quicksort(int data[], int lower, int upper) {
  int pivot;
  if (upper > lower) {
    pivot = partition(data, lower, upper);
    quicksort(data, lower, pivot - 1);
    quicksort(data, pivot + 1, upper);
  }
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1174 <quicksort+0x54>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <partition@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1040 <quicksort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1040 <quicksort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %esi,%edx
jle    1166 <quicksort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1030 <partition@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <quicksort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quicksort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = icmp sgt i32 %8, %9
br i1 %10, label %11, label %24
11: ; preds = %3
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @partition(i32* %12, i32 %13, i32 %14)
store i32 %15, i32* %7
%16 = load i32*, i32** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = sub nsw i32 %18, 1
%20 = load i32*, i32** %4
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
%23 = load i32, i32* %6
br label %24
24: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, %1
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @partition(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quicksort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ verify_empty_object();
int /*<<< orphan*/ verify_one_string();
int main(void) {
  verify_empty_object();
  verify_one_string();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @verify_empty_object()
%2 = tail call i32 (...) @verify_one_string()
ret i32 0
}
/* Variables and functions */
double house_1(double *, int, double *);
double house(double *x, int N, double *v) {
  double beta;
  beta = house_1(x, N, v);
  return beta;
}


x86 assembly (clang, -O0):
<house>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <house_1@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<house>:
jmp    1030 <house_1@plt>

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

LLVM IR (-O2):
define double @house(double* %0, i32 %1, double* %2) {
%4 = tail call double @house_1(double* %0, i32 %1, double* %2)
ret double %4
}
int __attribute((fastcall)) check_fastcall_espdiff_3(int a, int b, int c) {
  return a + b + c;
}


x86 assembly (clang, -O0):
<check_fastcall_espdiff_3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_fastcall_espdiff_3>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @check_fastcall_espdiff_3(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
int par_fg_cap(struct xhda_codec *codec, struct xhda_node *node,
               unsigned int cmd) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.xhda_codec = type opaque
%struct.xhda_node = type opaque
define i32 @par_fg_cap(%struct.xhda_codec* nocapture readnone %0, %struct.xhda_node* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_add_pi8(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_add_pi8(__m64 a, __m64 b) { return _mm_add_pi8(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_add_pi8>:
jmp    1030 <_mm_add_pi8@plt>

LLVM IR (-O0):
define i32 @test_mm_add_pi8(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 @_mm_add_pi8(i32 %5, i32 %6)
ret i32 %7
}

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