xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ remove_space(char *);
int main(int argc, char const *argv[]) {
  char *s = "abc de";
  remove_space(s);
  printf("%s\n", s);
  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)
lea    0xec3(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <remove_space@plt>
mov    -0x18(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
call   1040 <remove_space@plt>
lea    0xed0(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"abc de\00"
@.str.1 = [4 x i8] c"%s\0A\00"
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
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @remove_space(i8* %7)
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"abc de\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @remove_space(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void cmdSetAutoPvc(int cmdType, struct cmd_arg *pCmdArg) {}


x86 assembly (clang, -O0):
<cmdSetAutoPvc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.cmd_arg = type opaque
define void @cmdSetAutoPvc(i32 %0, %struct.cmd_arg* %1) {
%3 = alloca i32
%4 = alloca %struct.cmd_arg*
store i32 %0, i32* %3
store %struct.cmd_arg* %1, %struct.cmd_arg** %4
ret void
}

LLVM IR (-O2):
%struct.cmd_arg = type opaque
define void @cmdSetAutoPvc(i32 %0, %struct.cmd_arg* nocapture %1) {
ret void
}
const char *Alloc_Name(void) { return "Alloc"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Alloc\00"
define i8* @Alloc_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"Alloc\00"
define i8* @Alloc_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
struct full_item *as_full_item(unsigned char *full_item) {
  return (struct full_item *)full_item;
}


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

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

LLVM IR (-O0):
%struct.full_item = type opaque
define %struct.full_item* @as_full_item(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.full_item*
ret %struct.full_item* %4
}

LLVM IR (-O2):
%struct.full_item = type opaque
define %struct.full_item* @as_full_item(i8* readnone %0) {
%2 = bitcast i8* %0 to %struct.full_item*
ret %struct.full_item* %2
}
int near_zero_tol(double a) { return (a < (1e-14) && a > -(1e-14)); }


x86 assembly (clang, -O0):
<near_zero_tol>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xor    %eax,%eax
movsd  0xeed(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
mov    %al,-0x9(%rbp)
jbe    1138 <near_zero_tol+0x38>
movsd  -0x8(%rbp),%xmm0
movsd  0xeda(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<near_zero_tol>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
ucomisd 0xef1(%rip),%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @near_zero_tol(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0x3D06849B86A12B9B
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp ogt double %6, 0xBD06849B86A12B9B
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @near_zero_tol(double %0) {
%2 = fcmp olt double %0, 0x3D06849B86A12B9B
%3 = fcmp ogt double %0, 0xBD06849B86A12B9B
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char *realloc(int /*<<< orphan*/, int);
void reallocPtrZero1() { char *r = realloc(0, 12); }


x86 assembly (clang, -O0):
<reallocPtrZero1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0xc,%esi
call   1030 <realloc@plt>
mov    %rax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reallocPtrZero1>:
xor    %edi,%edi
mov    $0xc,%esi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define void @reallocPtrZero1() {
%1 = alloca i8*
%2 = call i8* @realloc(i32 0, i32 12)
store i8* %2, i8** %1
ret void
}

LLVM IR (-O2):
define void @reallocPtrZero1() {
%1 = tail call i8* @realloc(i32 0, i32 12)
ret void
}
void swapArray(int a[], int i, int j) {
  int t = a[i];
  a[i] = a[j];
  a[j] = t;
}


x86 assembly (clang, -O0):
<swapArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swapArray>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swapArray(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** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swapArray(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
char *getvar_null(const char *name) { return ""; }


x86 assembly (clang, -O0):
<getvar_null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @getvar_null(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @getvar_null(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(int argc, char const *argv[]) {
  puts("C Rocks!");
  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)
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"C Rocks!\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 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"C Rocks!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int test_imm_B6int64_midword_reg(long long val) {
  return ((val >> 16) & (0xB6 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_B6int64_midword_reg>:
test   $0xb60000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B6int64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = ashr i64 %3, 16
%5 = and i64 %4, 182
%6 = icmp ne i64 %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_B6int64_midword_reg(i64 %0) {
%2 = and i64 %0, 11927552
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void memError(void) {
  fprintf(stderr, "Memory alloc error\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<memError>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<memError>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Memory alloc error\0A\00"
@EXIT_FAILURE = global i32 0
define void @memError() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Memory alloc error\0A\00"
@EXIT_FAILURE = global i32 0
define void @memError() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
double cf_standard_forcing(double t, double x, double y) { return 1.0; }


x86 assembly (clang, -O0):
<cf_standard_forcing>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  0xee5(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @cf_standard_forcing(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @cf_standard_forcing(double %0, double %1, double %2) {
ret double 1.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_REVOKED;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_item_dup(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_REVOKED_it;
X509_REVOKED *X509_REVOKED_dup(X509_REVOKED *a) {
  return ASN1_item_dup(&X509_REVOKED_it, a);
}


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

x86 assembly (clang, -O2):
<X509_REVOKED_dup>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rdi
jmp    1030 <ASN1_item_dup@plt>

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

LLVM IR (-O2):
@X509_REVOKED_it = global i32 0
define i32* @X509_REVOKED_dup(i32* %0) {
%2 = tail call i32* @ASN1_item_dup(i32* @X509_REVOKED_it, i32* %0)
ret i32* %2
}
int d() { return 13; }


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

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

LLVM IR (-O0):
define i32 @d() {
ret i32 13
}

LLVM IR (-O2):
define i32 @d() {
ret i32 13
}
void update_worklist_report_dialog(void) {}


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

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

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

LLVM IR (-O2):
define void @update_worklist_report_dialog() {
ret void
}
long to32bit(c1, c2, c3, c4) {
  long value = 0L;
  value = (c1 & 0xff);
  value = (value << 8) + (c2 & 0xff);
  value = (value << 8) + (c3 & 0xff);
  value = (value << 8) + (c4 & 0xff);
  return (value);
}


x86 assembly (clang, -O0):
<to32bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    -0x8(%rbp),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x8,%rax
mov    -0x10(%rbp),%ecx
and    $0xff,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to32bit>:
shl    $0x18,%edi
movzbl %sil,%eax
shl    $0x10,%eax
or     %edi,%eax
shl    $0x8,%edx
movzwl %dx,%edx
or     %eax,%edx
movzbl %cl,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i64 @to32bit(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
store i64 0, i64* %9
%10 = load i32, i32* %5
%11 = and i32 %10, 255
%12 = sext i32 %11 to i64
store i64 %12, i64* %9
%13 = load i64, i64* %9
%14 = shl i64 %13, 8
%15 = load i32, i32* %6
%16 = and i32 %15, 255
%17 = sext i32 %16 to i64
%18 = add nsw i64 %14, %17
store i64 %18, i64* %9
%19 = load i64, i64* %9
%20 = shl i64 %19, 8
%21 = load i32, i32* %7
%22 = and i32 %21, 255
%23 = sext i32 %22 to i64
%24 = add nsw i64 %20, %23
store i64 %24, i64* %9
%25 = load i64, i64* %9
%26 = shl i64 %25, 8
%27 = load i32, i32* %8
%28 = and i32 %27, 255
%29 = sext i32 %28 to i64
%30 = add nsw i64 %26, %29
store i64 %30, i64* %9
%31 = load i64, i64* %9
ret i64 %31
}

LLVM IR (-O2):
define i64 @to32bit(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %0, 24
%6 = shl i32 %1, 16
%7 = and i32 %6, 16711680
%8 = or i32 %7, %5
%9 = shl i32 %2, 8
%10 = and i32 %9, 65280
%11 = or i32 %8, %10
%12 = and i32 %3, 255
%13 = or i32 %11, %12
%14 = zext i32 %13 to i64
ret i64 %14
}
void memory_stats() {}


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

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

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

LLVM IR (-O2):
define void @memory_stats() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int member_0;
  int member_1;
  int member_2;
};
struct TYPE_3__ {
  int member_0;
  int member_1;
  int member_2;
};

/* Variables and functions */
int /*<<< orphan*/ abort();
main() {
  int x[][2][3] = {
      {{1, 2, 3}, {1, 2, 3}},
      {{1, 2, 3}, {1, 2, 3}},
  };
  if (x[1][1][0] != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x30,%edx
call   1040 <memcpy@plt>
cmpl   $0x1,-0x1c(%rbp)
je     1155 <main+0x35>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.x = [2 x [2 x [3 x i32]]] [[2 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 3], [3 x i32] [i32 1, i32 2, i32 3]], [2 x [3 x i32]] [[3 x i32] [i32 1, i32 2, i32 3], [3 x i32] [i32 1, i32 2, i32 3]]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [2 x [3 x i32]]]
store i32 0, i32* %1
%3 = bitcast [2 x [2 x [3 x i32]]]* %2 to i8*
%4 = getelementptr inbounds [2 x [2 x [3 x i32]]], [2 x [2 x [3 x i32]]]* %2, i64 0, i64 1
%5 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %4, i64 0, i64 1
%6 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @abort()
unreachable
11: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ErrorMessage(char *, size_t);
int /*<<< orphan*/ free(void *);
void *realloc(void *, size_t);
void *ReallocWithErrorMessage(void *Ptr, size_t Size) {
  void *NewPtr;
  if (!(NewPtr = realloc(Ptr, Size))) {
    ErrorMessage("Memory reallocation of %u bytes failed.\n", Size);
    free(Ptr);
  }
  return NewPtr;
}


x86 assembly (clang, -O0):
<ReallocWithErrorMessage>:
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   1050 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
jne    1174 <ReallocWithErrorMessage+0x44>
mov    -0x10(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1040 <ErrorMessage@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReallocWithErrorMessage>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
call   1050 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115f <ReallocWithErrorMessage+0x2f>
lea    0xeb1(%rip),%rdi
mov    %r15,%rsi
call   1040 <ErrorMessage@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [41 x i8] c"Memory reallocation of %u bytes failed.\0A\00"
define i8* @ReallocWithErrorMessage(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 = icmp ne i8* %8, null
br i1 %9, label %15, label %10
10: ; preds = %2
%11 = load i64, i64* %4
%12 = call i32 @ErrorMessage(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = load i8*, i8** %3
%14 = call i32 @free(i8* %13)
br label %15
15: ; preds = %10, %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@.str = [41 x i8] c"Memory reallocation of %u bytes failed.\0A\00"
define noalias i8* @ReallocWithErrorMessage(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 @ErrorMessage(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %1)
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int Cnd_Present();
int Cnd_Absent(void) { return (1 - Cnd_Present()); }


x86 assembly (clang, -O0):
<Cnd_Absent>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Cnd_Present@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cnd_Absent>:
push   %rax
xor    %eax,%eax
call   1030 <Cnd_Present@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @Cnd_Absent() {
%1 = call i32 (...) @Cnd_Present()
%2 = sub nsw i32 1, %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @Cnd_Absent() {
%1 = tail call i32 (...) @Cnd_Present()
%2 = sub nsw i32 1, %1
ret i32 %2
}
unsigned xrop3_128_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = T & S;
  stk1 = D & stk2;
  return stk1;
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_128_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = and i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Eunice-6 Taquitos with Guacamole, Sour Cream, Cheese, Corn Salsa (on "
         "the side).\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [81 x i8] c"Eunice-6 Taquitos with Guacamole, Sour Cream, Cheese, Corn Salsa (on the side).\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [80 x i8] c"Eunice-6 Taquitos with Guacamole, Sour Cream, Cheese, Corn Salsa (on the side).\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int get_highest_bit(unsigned long long v) { return 64 - __builtin_clzll(v); }


x86 assembly (clang, -O0):
<get_highest_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
bsr    %rax,%rax
xor    $0x3f,%rax
mov    %eax,%ecx
mov    $0x40,%eax
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_highest_bit>:
bsr    %rdi,%rax
xor    $0xffffffc0,%eax
add    $0x41,%eax
ret

LLVM IR (-O0):
define i32 @get_highest_bit(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @llvm.ctlz.i64(i64 %3, i1 true)
%5 = trunc i64 %4 to i32
%6 = sub nsw i32 64, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @get_highest_bit(i64 %0) {
%2 = tail call i64 @llvm.ctlz.i64(i64 %0, i1 true)
%3 = trunc i64 %2 to i32
%4 = sub nuw nsw i32 64, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ OSTimeDlyHMSM(int /*<<< orphan*/, int /*<<< orphan*/, int,
                                 int /*<<< orphan*/);
void LowTask(void *pdata) {
  pdata = pdata;
  while (1) {
    OSTimeDlyHMSM(0, 0, 1, 0);
  }
}


x86 assembly (clang, -O0):
<LowTask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
xor    %ecx,%ecx
mov    $0x1,%edx
mov    %ecx,%edi
mov    %ecx,%esi
call   1030 <OSTimeDlyHMSM@plt>
jmp    1124 <LowTask+0x14>

x86 assembly (clang, -O2):
<LowTask>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
xor    %esi,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <OSTimeDlyHMSM@plt>
jmp    1120 <LowTask+0x10>

LLVM IR (-O0):
define void @LowTask(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
store i8* %3, i8** %2
br label %4
4: ; preds = %1, %4
%5 = call i32 @OSTimeDlyHMSM(i32 0, i32 0, i32 1, i32 0)
br label %4
}

LLVM IR (-O2):
define void @LowTask(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 @OSTimeDlyHMSM(i32 0, i32 0, i32 1, i32 0)
br label %2
}
void avformat_alloc_context() {}


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

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

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

LLVM IR (-O2):
define void @avformat_alloc_context() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BootComUartCheckActivationRequest();
void BootComCheckActivationRequest(void) {
  BootComUartCheckActivationRequest();
}


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

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

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

LLVM IR (-O2):
define void @BootComCheckActivationRequest() {
%1 = tail call i32 (...) @BootComUartCheckActivationRequest()
ret void
}
void vlc_array(int n, int foo[n]) {
  printf("%s has array value %p\n", __func__, foo);
  printf("%s has array size %zu\n", __func__, sizeof foo);
}


x86 assembly (clang, -O0):
<vlc_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
lea    0xed6(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
lea    0xed1(%rip),%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vlc_array>:
push   %rbx
mov    %rsi,%rdx
lea    0xee5(%rip),%rdi
lea    0xef5(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeee(%rip),%rdi
mov    $0x8,%edx
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%s has array value %p\0A\00"
@__func__.vlc_array = [10 x i8] c"vlc_array\00"
@.str.1 = [23 x i8] c"%s has array size %zu\0A\00"
define void @vlc_array(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 = zext i32 %5 to i64
%7 = load i32*, i32** %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.vlc_array, i64 0, i64 0), i32* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.vlc_array, i64 0, i64 0), i64 8)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s has array value %p\0A\00"
@__func__.vlc_array = [10 x i8] c"vlc_array\00"
@.str.1 = [23 x i8] c"%s has array size %zu\0A\00"
define void @vlc_array(i32 %0, i32* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.vlc_array, i64 0, i64 0), i32* %1)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @__func__.vlc_array, i64 0, i64 0), i64 8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_assert_double_eq_fail_add_test();
void test_assert_double_eq_fail_add_test_constructor(void) {
  test_assert_double_eq_fail_add_test();
}


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

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

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

LLVM IR (-O2):
define void @test_assert_double_eq_fail_add_test_constructor() {
%1 = tail call i32 (...) @test_assert_double_eq_fail_add_test()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XmbTextListToTextProperty() {
  printf("XmbTextListToTextProperty called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [33 x i8] c"XmbTextListToTextProperty called\00"
define i32 @XmbTextListToTextProperty() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ getInput();
int /*<<< orphan*/ process();
int main(int args, char **argv) {
  while (getInput()) {
    process();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getInput@plt>
cmp    $0x0,%rax
je     1153 <main+0x33>
mov    $0x0,%al
call   1040 <process@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getInput@plt>
test   %rax,%rax
je     1145 <main+0x25>
xor    %eax,%eax
call   1040 <process@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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
br label %6
6: ; preds = %9, %2
%7 = call i64 (...) @getInput()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
%10 = call i32 (...) @process()
br label %6
11: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @getInput()
%4 = icmp eq i64 %3, 0
br i1 %4, label %9, label %5
5: ; preds = %2, %5
%6 = tail call i32 (...) @process()
%7 = tail call i64 (...) @getInput()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %5
9: ; preds = %5, %2
ret i32 0
}
double dot(const double v1[3], const double v2[3]) {
  int i;
  double sum;
  sum = 0.0;
  for (i = 0; i < 3; i++)
    sum += v1[i] * v2[i];
  return sum;
}


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    115f <dot+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <dot+0x1b>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  (%rsi),%xmm0
xorpd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
mulsd  0x8(%rsi),%xmm1
addsd  %xmm2,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca i32
%6 = alloca double
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %6
store i32 0, i32* %5
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load double*, double** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = load double, double* %19
%21 = load double, double* %6
%22 = call double @llvm.fmuladd.f64(double %15, double %20, double %21)
store double %22, double* %6
br label %23
23: ; preds = %10
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %7
26: ; preds = %7
%27 = load double, double* %6
ret double %27
}

LLVM IR (-O2):
define double @dot(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double 0.000000e+00)
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = tail call double @llvm.fmuladd.f64(double %7, double %9, double %5)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ ckKeyboardResetPC();
char ckTerminalGetChar();
int /*<<< orphan*/ ckTerminalPrintString(char *);
void ckCoshellCmdReset(const char *param) {
  ckTerminalPrintString("Are you sure to reset computer? [y/n]");
  if (ckTerminalGetChar() == 'y') {
    ckKeyboardResetPC();
  } else {
    ckTerminalPrintString("Reset canceled.\n");
  }
}


x86 assembly (clang, -O0):
<ckCoshellCmdReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1050 <ckTerminalPrintString@plt>
mov    $0x0,%al
call   1040 <ckTerminalGetChar@plt>
movsbl %al,%eax
cmp    $0x79,%eax
jne    1167 <ckCoshellCmdReset+0x37>
mov    $0x0,%al
call   1030 <ckKeyboardResetPC@plt>
jmp    1173 <ckCoshellCmdReset+0x43>
lea    0xeb8(%rip),%rdi
call   1050 <ckTerminalPrintString@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ckCoshellCmdReset>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <ckTerminalPrintString@plt>
xor    %eax,%eax
call   1040 <ckTerminalGetChar@plt>
cmp    $0x79,%al
jne    1150 <ckCoshellCmdReset+0x20>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ckKeyboardResetPC@plt>
lea    0xecf(%rip),%rdi
pop    %rax
jmp    1050 <ckTerminalPrintString@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"Are you sure to reset computer? [y/n]\00"
@.str.1 = [17 x i8] c"Reset canceled.\0A\00"
define void @ckCoshellCmdReset(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @ckTerminalPrintString(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call signext i8 (...) @ckTerminalGetChar()
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 121
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (...) @ckKeyboardResetPC()
br label %11
9: ; preds = %1
%10 = call i32 @ckTerminalPrintString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"Are you sure to reset computer? [y/n]\00"
@.str.1 = [17 x i8] c"Reset canceled.\0A\00"
define void @ckCoshellCmdReset(i8* nocapture readnone %0) {
%2 = tail call i32 @ckTerminalPrintString(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = tail call signext i8 (...) @ckTerminalGetChar()
%4 = icmp eq i8 %3, 121
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (...) @ckKeyboardResetPC()
br label %9
7: ; preds = %1
%8 = tail call i32 @ckTerminalPrintString(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, unsigned long);
char *allocfile(char *s, unsigned long n) {
  static char b[1024];
  if (s == NULL)
    s = ".mpatrol";
  sprintf(b, "%s.%lu", s, n);
  return b;
}


x86 assembly (clang, -O0):
<allocfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1136 <allocfile+0x26>
lea    0xece(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0x2efb(%rip),%rdi
lea    0xebd(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2ee8(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<allocfile>:
push   %rbx
mov    %rsi,%rcx
test   %rdi,%rdi
lea    0xee2(%rip),%rdx
cmovne %rdi,%rdx
lea    0x2f17(%rip),%rbx
lea    0xed9(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@allocfile.b = internal global [1024 x i8] zeroinitializer
@.str = [9 x i8] c".mpatrol\00"
@.str.1 = [7 x i8] c"%s.%lu\00"
define i8* @allocfile(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %3
br label %8
8: ; preds = %7, %2
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @sprintf(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @allocfile.b, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %9, i64 %10)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @allocfile.b, i64 0, i64 0)
}

LLVM IR (-O2):
@allocfile.b = internal global [1024 x i8] zeroinitializer
@.str = [9 x i8] c".mpatrol\00"
@.str.1 = [7 x i8] c"%s.%lu\00"
define i8* @allocfile(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
%4 = select i1 %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0
%5 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([1024 x i8], [1024 x i8]* @allocfile.b, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %4, i64 %1)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @allocfile.b, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char, char);
void printFourCC(char *fourCC) {
  printf("%c%c%c%c", fourCC[0], fourCC[1], fourCC[2], fourCC[3]);
}


x86 assembly (clang, -O0):
<printFourCC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%sil
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%dl
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x8(%rbp),%rax
lea    0xec4(%rip),%rdi
movsbl %sil,%esi
movsbl %dl,%edx
movsbl %cl,%ecx
movsbl 0x3(%rax),%r8d
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printFourCC>:
movsbl (%rdi),%esi
movsbl 0x1(%rdi),%edx
movsbl 0x2(%rdi),%ecx
movsbl 0x3(%rdi),%r8d
lea    0xed9(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%c%c%c%c\00"
define void @printFourCC(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 3
%14 = load i8, i8* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %5, i8 signext %8, i8 signext %11, i8 signext %14)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%c%c%c%c\00"
define void @printFourCC(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 3
%8 = load i8, i8* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %2, i8 signext %4, i8 signext %6, i8 signext %8)
ret void
}
OP(ed, d9) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ get_array(int **, int **, int *);
int /*<<< orphan*/ print_add(int **, int **, int *);
int main() {
  int A[10][10] = {0}, B[10][10] = {0};
  int N;
  get_array(A, B, &N);
  print_add(A, B, &N);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x340,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1030 <memset@plt>
lea    -0x330(%rbp),%rdi
xor    %esi,%esi
mov    $0x190,%edx
call   1030 <memset@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x330(%rbp),%rsi
lea    -0x334(%rbp),%rdx
call   1040 <get_array@plt>
lea    -0x1a0(%rbp),%rdi
lea    -0x330(%rbp),%rsi
lea    -0x334(%rbp),%rdx
call   1050 <print_add@plt>
xor    %eax,%eax
add    $0x340,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x330,%rsp
lea    0x1a0(%rsp),%r14
mov    $0x190,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
lea    0x10(%rsp),%rbx
mov    $0x190,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
lea    0xc(%rsp),%r15
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1040 <get_array@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <print_add@plt>
xor    %eax,%eax
add    $0x330,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [10 x i32]]
%3 = alloca [10 x [10 x i32]]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [10 x [10 x i32]]* %2 to i8*
%6 = bitcast [10 x [10 x i32]]* %3 to i8*
%7 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%8 = bitcast [10 x i32]* %7 to i32**
%9 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %3, i64 0, i64 0
%10 = bitcast [10 x i32]* %9 to i32**
%11 = call i32 @get_array(i32** %8, i32** %10, i32* %4)
%12 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%13 = bitcast [10 x i32]* %12 to i32**
%14 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %3, i64 0, i64 0
%15 = bitcast [10 x i32]* %14 to i32**
%16 = call i32 @print_add(i32** %13, i32** %15, i32* %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x [10 x i32]]
%2 = alloca [10 x [10 x i32]]
%3 = alloca i32
%4 = bitcast [10 x [10 x i32]]* %1 to i8*
%5 = bitcast [10 x [10 x i32]]* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = bitcast [10 x [10 x i32]]* %1 to i32**
%8 = bitcast [10 x [10 x i32]]* %2 to i32**
%9 = call i32 @get_array(i32** %7, i32** %8, i32* %3)
%10 = call i32 @print_add(i32** %7, i32** %8, i32* %3)
ret i32 0
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t prv_gt_real_fn(double a, double b) { return a > b ? -1 : 0; }


x86 assembly (clang, -O0):
<prv_gt_real_fn>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_gt_real_fn>:
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
neg    %eax
ret

LLVM IR (-O0):
define i32 @prv_gt_real_fn(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @prv_gt_real_fn(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test(int *, int);
int main(void) {
  int a[] = {1, 2};
  test(a, 2);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movabs $0x200000001,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.a = [2 x i32] [i32 1, i32 2]
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @test(i32* %3, i32 2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
store i64 8589934593, i64* %1
%3 = bitcast i64* %1 to i32*
%4 = call i32 @test(i32* %3, i32 2)
ret i32 0
}
/* Variables and functions */
scalar_t__ malloc(int);
int *malloc_elements() { return (int *)malloc(4096 * sizeof(int)); }


x86 assembly (clang, -O0):
<malloc_elements>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4000,%edi
call   1030 <malloc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_elements>:
mov    $0x4000,%edi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i32* @malloc_elements() {
%1 = call i64 @malloc(i32 16384)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
define i32* @malloc_elements() {
%1 = tail call i64 @malloc(i32 16384)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}