xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ rbearing;
};
typedef TYPE_1__ XCharStruct;

/* Variables and functions */
short get_XCharStruct_rbearing(void *_p) {
  return (short)((XCharStruct *)_p)->rbearing;
}


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

x86 assembly (clang, -O2):
<get_XCharStruct_rbearing>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i16 @get_XCharStruct_rbearing(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @get_XCharStruct_rbearing(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 "
         "REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 "
         "CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=Thu "
         "Sep 12 10:58:44 WIT 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 "
         "USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 "
         "USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= "
         "MALI_PLATFORM_FILE=platform/ux500/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y";
}


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

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

LLVM IR (-O0):
@.str = [471 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=Thu Sep 12 10:58:44 WIT 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([471 x i8], [471 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [471 x i8] c"malidrv: CONFIG=ux500 USING_OS_MEMORY=1 API_VERSION=17 REPO_URL=r3p1-01rel0 REVISION=r3p1-01rel0 CHANGED_REVISION=r3p1-01rel0 CHANGE_DATE=r3p1-01rel0 BUILD_DATE=Thu Sep 12 10:58:44 WIT 2013 BUILD=DEBUG CPU=ux500 USING_UMP=1 USING_HWMEM=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/ux500/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=16 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=y\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([471 x i8], [471 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct castle_norm_key {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct castle_norm_key *);
void castle_norm_key_free(struct castle_norm_key *key) { free(key); }


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

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

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

LLVM IR (-O2):
%struct.castle_norm_key = type { i32 }
define void @castle_norm_key_free(%struct.castle_norm_key* nocapture %0) {
%2 = tail call i32 @free(%struct.castle_norm_key* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(char const *prog) {
  fprintf(stderr, "usage: %s\n\nUntoggles the caps lock\n", prog);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c"usage: %s\0A\0AUntoggles the caps lock\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c"usage: %s\0A\0AUntoggles the caps lock\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ isspace(char);
int strlen(char *);
char *Com_Chop(char *s) {
  char *right;
  right = s + strlen(s) - 1;
  while (isspace(*right))
    *right-- = 0;
  return s;
}


x86 assembly (clang, -O0):
<Com_Chop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     117e <Com_Chop+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
jmp    1151 <Com_Chop+0x31>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Com_Chop>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
movslq %eax,%rbx
movsbl -0x1(%r14,%rbx,1),%edi
call   1040 <isspace@plt>
test   %rax,%rax
je     1165 <Com_Chop+0x45>
add    %r14,%rbx
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
movb   $0x0,(%rbx)
movsbl -0x1(%rbx),%edi
add    $0xffffffffffffffff,%rbx
call   1040 <isspace@plt>
test   %rax,%rax
jne    1150 <Com_Chop+0x30>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @Com_Chop(i8* returned %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = load i8, i8* %5
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %1, %9
%10 = phi i8* [ %11, %9 ], [ %5, %1 ]
store i8 0, i8* %10
%11 = getelementptr inbounds i8, i8* %10, i64 -1
%12 = load i8, i8* %11
%13 = tail call i64 @isspace(i8 signext %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %9
15: ; preds = %9, %1
ret i8* %0
}
unsigned char _htoi(char *inhex) {
  unsigned char val;
  char c;
  c = inhex[0] & 0x5f;
  if (c > '9')
    c += 9;
  val = (c & 0x0f) << 4;
  c = inhex[1] & 0x5f;
  if (c > '9')
    c += 9;
  val += (c & 0x0f);
  return (val);
}


x86 assembly (clang, -O0):
<_htoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0x5f,%eax
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
cmp    $0x39,%eax
jle    112c <_htoi+0x2c>
movsbl -0xa(%rbp),%eax
add    $0x9,%eax
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
and    $0xf,%eax
shl    $0x4,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
and    $0x5f,%eax
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
cmp    $0x39,%eax
jle    115e <_htoi+0x5e>
movsbl -0xa(%rbp),%eax
add    $0x9,%eax
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%ecx
and    $0xf,%ecx
movzbl -0x9(%rbp),%eax
add    %ecx,%eax
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_htoi>:
mov    (%rdi),%cl
mov    %ecx,%edx
and    $0x5e,%dl
movzbl 0x1(%rdi),%esi
mov    %esi,%eax
and    $0x5e,%al
lea    0x9(%rsi),%edi
cmp    $0x3a,%al
movzbl %dil,%eax
cmovb  %esi,%eax
shl    $0x4,%cl
lea    -0x70(%rcx),%esi
cmp    $0x3a,%dl
movzbl %cl,%ecx
movzbl %sil,%edx
cmovb  %ecx,%edx
and    $0xf,%al
or     %dl,%al
ret

LLVM IR (-O0):
define zeroext i8 @_htoi(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = and i32 %8, 95
%10 = trunc i32 %9 to i8
store i8 %10, i8* %4
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = icmp sgt i32 %12, 57
br i1 %13, label %14, label %19
14: ; preds = %1
%15 = load i8, i8* %4
%16 = sext i8 %15 to i32
%17 = add nsw i32 %16, 9
%18 = trunc i32 %17 to i8
store i8 %18, i8* %4
br label %19
19: ; preds = %14, %1
%20 = load i8, i8* %4
%21 = sext i8 %20 to i32
%22 = and i32 %21, 15
%23 = shl i32 %22, 4
%24 = trunc i32 %23 to i8
store i8 %24, i8* %3
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i64 1
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = and i32 %28, 95
%30 = trunc i32 %29 to i8
store i8 %30, i8* %4
%31 = load i8, i8* %4
%32 = sext i8 %31 to i32
%33 = icmp sgt i32 %32, 57
br i1 %33, label %34, label %39
34: ; preds = %19
%35 = load i8, i8* %4
%36 = sext i8 %35 to i32
%37 = add nsw i32 %36, 9
%38 = trunc i32 %37 to i8
store i8 %38, i8* %4
br label %39
39: ; preds = %34, %19
%40 = load i8, i8* %4
%41 = sext i8 %40 to i32
%42 = and i32 %41, 15
%43 = load i8, i8* %3
%44 = zext i8 %43 to i32
%45 = add nsw i32 %44, %42
%46 = trunc i32 %45 to i8
store i8 %46, i8* %3
%47 = load i8, i8* %3
ret i8 %47
}

LLVM IR (-O2):
define zeroext i8 @_htoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 94
%4 = icmp ugt i8 %3, 57
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = and i8 %6, 94
%8 = icmp ugt i8 %7, 57
%9 = add i8 %6, 9
%10 = select i1 %8, i8 %9, i8 %6
%11 = shl i8 %2, 4
%12 = add i8 %11, -112
%13 = select i1 %4, i8 %12, i8 %11
%14 = and i8 %10, 15
%15 = or i8 %14, %13
ret i8 %15
}
/* Variables and functions */
int /*<<< orphan*/ strings_strbival();
int /*<<< orphan*/ strings_strbody();
int /*<<< orphan*/ strings_strinsert();
int strings_main(void *rtime, int argc, char **argv) {
  (void)rtime;
  (void)argc;
  (void)argv;
  strings_strbody();
  strings_strbival();
  strings_strinsert();
  return 0;
}


x86 assembly (clang, -O0):
<strings_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <strings_strbody@plt>
mov    $0x0,%al
call   1030 <strings_strbival@plt>
mov    $0x0,%al
call   1040 <strings_strinsert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strings_main>:
push   %rax
xor    %eax,%eax
call   1050 <strings_strbody@plt>
xor    %eax,%eax
call   1030 <strings_strbival@plt>
xor    %eax,%eax
call   1040 <strings_strinsert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @strings_main(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** %4
%8 = load i32, i32* %5
%9 = load i8**, i8*** %6
%10 = call i32 (...) @strings_strbody()
%11 = call i32 (...) @strings_strbival()
%12 = call i32 (...) @strings_strinsert()
ret i32 0
}

LLVM IR (-O2):
define i32 @strings_main(i8* nocapture readnone %0, i32 %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @strings_strbody()
%5 = tail call i32 (...) @strings_strbival()
%6 = tail call i32 (...) @strings_strinsert()
ret i32 0
}
int main() {
  signed int a = 4;
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
void ASN1_item_ex_i2d(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_item_ex_i2d() {
ret void
}
/* Variables and functions */
int core6_swap(char *, int);
int U_EMRPOLYBEZIERTO16_swap(char *record, int torev) {
  return (core6_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRPOLYBEZIERTO16_swap>:
jmp    1030 <core6_swap@plt>

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

LLVM IR (-O2):
define i32 @U_EMRPOLYBEZIERTO16_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core6_swap(i8* %0, i32 %1)
ret i32 %3
}
double ellipseFunc(double i, double j, double x, double y, double a, double b) {
  return 1 - (((x - i) * (x - i)) / ((a) * (a)) +
              ((y - j) * (y - j)) / ((b) * (b)));
}


x86 assembly (clang, -O0):
<ellipseFunc>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
divsd  %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  -0x30(%rbp),%xmm2
divsd  %xmm2,%xmm0
addsd  %xmm0,%xmm1
movsd  0xe86(%rip),%xmm0
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ellipseFunc>:
unpcklpd %xmm3,%xmm2
unpcklpd %xmm1,%xmm0
subpd  %xmm0,%xmm2
mulpd  %xmm2,%xmm2
unpcklpd %xmm5,%xmm4
mulpd  %xmm4,%xmm4
divpd  %xmm4,%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
addsd  %xmm2,%xmm1
movsd  0xed0(%rip),%xmm0
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ellipseFunc(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
%13 = load double, double* %9
%14 = load double, double* %7
%15 = fsub double %13, %14
%16 = load double, double* %9
%17 = load double, double* %7
%18 = fsub double %16, %17
%19 = fmul double %15, %18
%20 = load double, double* %11
%21 = load double, double* %11
%22 = fmul double %20, %21
%23 = fdiv double %19, %22
%24 = load double, double* %10
%25 = load double, double* %8
%26 = fsub double %24, %25
%27 = load double, double* %10
%28 = load double, double* %8
%29 = fsub double %27, %28
%30 = fmul double %26, %29
%31 = load double, double* %12
%32 = load double, double* %12
%33 = fmul double %31, %32
%34 = fdiv double %30, %33
%35 = fadd double %23, %34
%36 = fsub double 1.000000e+00, %35
ret double %36
}

LLVM IR (-O2):
define double @ellipseFunc(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = insertelement <2 x double> poison, double %2, i64 0
%8 = insertelement <2 x double> %7, double %3, i64 1
%9 = insertelement <2 x double> poison, double %0, i64 0
%10 = insertelement <2 x double> %9, double %1, i64 1
%11 = fsub <2 x double> %8, %10
%12 = fmul <2 x double> %11, %11
%13 = insertelement <2 x double> poison, double %4, i64 0
%14 = insertelement <2 x double> %13, double %5, i64 1
%15 = fmul <2 x double> %14, %14
%16 = fdiv <2 x double> %12, %15
%17 = shufflevector <2 x double> %16, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%18 = fadd <2 x double> %16, %17
%19 = extractelement <2 x double> %18, i64 0
%20 = fsub double 1.000000e+00, %19
ret double %20
}
void path_038_expected_1(int y) {
  do {
    y++;
  } while (0);
}


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

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

LLVM IR (-O0):
define void @path_038_expected_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %6
6: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @path_038_expected_1(i32 %0) {
ret void
}
/* Variables and functions */
int snprintf(char *, int, char *, char *, int);
int woodstock_disassemble_branch(char *mnem, int addr, int op1, char *buf,
                                 int len) {
  int l;
  int target;
  target = (addr & 07400) + (op1 >> 2);
  l = snprintf(buf, len, "%s %04o", mnem, target);
  buf += l;
  len -= l;
  return (1);
}


x86 assembly (clang, -O0):
<woodstock_disassemble_branch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf00,%eax
mov    -0x10(%rbp),%ecx
sar    $0x2,%ecx
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%rcx
mov    -0x24(%rbp),%r8d
lea    0xead(%rip),%rdx
call   1030 <snprintf@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x1c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x1,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<woodstock_disassemble_branch>:
push   %rax
mov    %r8d,%r9d
mov    %rdi,%rax
and    $0xf00,%esi
sar    $0x2,%edx
lea    (%rdx,%rsi,1),%r8d
lea    0xed5(%rip),%rdx
mov    %rcx,%rdi
mov    %r9d,%esi
mov    %rax,%rcx
call   1030 <snprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%s %04o\00"
define i32 @woodstock_disassemble_branch(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%13 = load i32, i32* %7
%14 = and i32 %13, 3840
%15 = load i32, i32* %8
%16 = ashr i32 %15, 2
%17 = add nsw i32 %14, %16
store i32 %17, i32* %12
%18 = load i8*, i8** %9
%19 = load i32, i32* %10
%20 = load i8*, i8** %6
%21 = load i32, i32* %12
%22 = call i32 @snprintf(i8* %18, i32 %19, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %20, i32 %21)
store i32 %22, i32* %11
%23 = load i32, i32* %11
%24 = load i8*, i8** %9
%25 = sext i32 %23 to i64
%26 = getelementptr inbounds i8, i8* %24, i64 %25
store i8* %26, i8** %9
%27 = load i32, i32* %11
%28 = load i32, i32* %10
%29 = sub nsw i32 %28, %27
store i32 %29, i32* %10
ret i32 1
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s %04o\00"
define i32 @woodstock_disassemble_branch(i8* %0, i32 %1, i32 %2, i8* %3, i32 %4) {
%6 = and i32 %1, 3840
%7 = ashr i32 %2, 2
%8 = add nsw i32 %7, %6
%9 = tail call i32 @snprintf(i8* %3, i32 %4, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %8)
ret i32 1
}
int sbd(double x) { return __builtin_signbit(x); }


x86 assembly (clang, -O0):
<sbd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbd>:
movmskpd %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @sbd(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = bitcast double %3 to i64
%5 = icmp slt i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @sbd(double %0) {
%2 = bitcast double %0 to i64
%3 = lshr i64 %2, 63
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void report_error(char *message) { fprintf(stderr, "ERROR: %s\n", message); }


x86 assembly (clang, -O0):
<report_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_error>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @report_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
define void @report_error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mdea_error(char **, char *);
int mdea_string_node_get_boolean(void *p, int *boolean, char **error) {
  mdea_error(error, "Expected boolean, got string");
  return -1;
}


x86 assembly (clang, -O0):
<mdea_string_node_get_boolean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mdea_string_node_get_boolean>:
push   %rax
mov    %rdx,%rdi
lea    0xee5(%rip),%rsi
call   1030 <mdea_error@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Expected boolean, got string\00"
define i32 @mdea_string_node_get_boolean(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 = call i32 @mdea_error(i8** %7, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [29 x i8] c"Expected boolean, got string\00"
define i32 @mdea_string_node_get_boolean(i8* nocapture readnone %0, i32* nocapture readnone %1, i8** %2) {
%4 = tail call i32 @mdea_error(i8** %2, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
int SuiteSparse_version(int version[3]) {
  if (version != ((void *)0)) {
    version[0] = 5;
    version[1] = 4;
    version[2] = 0;
  }
  return (((5) * 1000 + (4)));
}


x86 assembly (clang, -O0):
<SuiteSparse_version>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1133 <SuiteSparse_version+0x33>
mov    -0x8(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x8(%rbp),%rax
movl   $0x4,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x0,0x8(%rax)
mov    $0x138c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SuiteSparse_version>:
test   %rdi,%rdi
je     1119 <SuiteSparse_version+0x19>
movabs $0x400000005,%rax
mov    %rax,(%rdi)
movl   $0x0,0x8(%rdi)
mov    $0x138c,%eax
ret

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

LLVM IR (-O2):
define i32 @SuiteSparse_version(i32* writeonly %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
store i32 5, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
store i32 4, i32* %4
%5 = getelementptr inbounds i32, i32* %0, i64 2
store i32 0, i32* %5
br label %6
6: ; preds = %3, %1
ret i32 5004
}
int test_imm_EEuint16_reg(unsigned short val) {
  return ((val) & (0xEE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_EEuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 238
%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_EEuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 238
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int rand();
int get_record_score() { return (rand() % 10) + 1; }


x86 assembly (clang, -O0):
<get_record_score>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_record_score>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_record_score() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 10
%3 = add nsw i32 %2, 1
ret i32 %3
}

LLVM IR (-O2):
define i32 @get_record_score() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 10
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ DAY_3;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_day_3() { return nl_langinfo(DAY_3); }


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

x86 assembly (clang, -O2):
<langinfo_day_3>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@DAY_3 = global i32 0
define i8* @langinfo_day_3() {
%1 = load i32, i32* @DAY_3
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@DAY_3 = global i32 0
define i8* @langinfo_day_3() {
%1 = load i32, i32* @DAY_3
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
regx0adrx1_set(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (p0[x0]) = (((int *)11111111)[x1]); }


x86 assembly (clang, -O0):
<regx0adrx1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
movslq -0x14(%rbp),%rcx
mov    $0xa98ac7,%eax
mov    (%rax,%rcx,4),%edx
mov    -0x20(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adrx1_set>:
movslq %ecx,%rax
mov    0xa98ac7(,%rax,4),%eax
movslq %edx,%rcx
mov    %eax,(%r8,%rcx,4)
ret

LLVM IR (-O0):
define i32 @regx0adrx1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* %11
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %12
%19 = load i32, i32* %10
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @regx0adrx1_set(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture writeonly %4, i32* nocapture readnone %5) {
%7 = sext i32 %3 to i64
%8 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %7
%9 = load i32, i32* %8
%10 = sext i32 %2 to i64
%11 = getelementptr inbounds i32, i32* %4, i64 %10
store i32 %9, i32* %11
ret i32 undef
}
int clamp_min(int input, int minvalue) {
  return input < minvalue ? minvalue : input;
}


x86 assembly (clang, -O0):
<clamp_min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <clamp_min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <clamp_min+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp_min>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

LLVM IR (-O0):
define i32 @clamp_min(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 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
br label %12
10: ; preds = %2
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @clamp_min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
int(isdigit)(int c) { return isdigit(c); }


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

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

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

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
void make_indent(FILE *output, int level) {
  for (int i = 0; i < level << 1; i++)
    fputc(' ', output);
}


x86 assembly (clang, -O0):
<make_indent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x1,%ecx
cmp    %ecx,%eax
jge    1153 <make_indent+0x43>
mov    -0x8(%rbp),%rsi
mov    $0x20,%edi
call   1030 <fputc@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <make_indent+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_indent>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
add    %esi,%ebx
test   %ebx,%ebx
jle    1132 <make_indent+0x22>
mov    %rdi,%r14
nop
mov    $0x20,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
add    $0xffffffff,%ebx
jne    1120 <make_indent+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @make_indent(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %14, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = shl i32 %8, 1
%10 = icmp slt i32 %7, %9
br i1 %10, label %11, label %17
11: ; preds = %6
%12 = load i32*, i32** %3
%13 = call i32 @fputc(i8 signext 32, i32* %12)
br label %14
14: ; preds = %11
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
store i32 %16, i32* %5
br label %6
17: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @make_indent(i32* nocapture %0, i32 %1) {
%3 = shl i32 %1, 1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ 0, %2 ]
%8 = tail call i32 @fputc(i8 signext 32, i32* %0)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, %3
br i1 %10, label %5, label %6
}
void disablePromiscuousReception(void) {}


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

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

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

LLVM IR (-O2):
define void @disablePromiscuousReception() {
ret void
}
/* Variables and functions */
scalar_t__ errno;
size_t fwrite(void const *, int, size_t, void *);
long io_write(const void *buf, size_t bytes, void *uptr) {
  size_t sz = fwrite(buf, 1, bytes, uptr);
  if (sz < bytes && errno)
    return -1;
  return sz;
}


x86 assembly (clang, -O0):
<io_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    116a <io_write+0x5a>
mov    0x2e8d(%rip),%rax
cmpq   $0x0,(%rax)
je     116a <io_write+0x5a>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1172 <io_write+0x62>
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_write>:
push   %rbx
mov    %rdx,%rcx
mov    %rsi,%rbx
mov    $0x1,%esi
mov    %rbx,%rdx
call   1030 <fwrite@plt>
mov    0x2eb5(%rip),%rcx
xor    %edx,%edx
cmp    (%rcx),%rdx
sbb    %rcx,%rcx
or     %rax,%rcx
cmp    %rbx,%rax
cmovb  %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
define i64 @io_write(i8* %0, i64 %1, i8* %2) {
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %7
%12 = call i64 @fwrite(i8* %9, i32 1, i64 %10, i8* %11)
store i64 %12, i64* %8
%13 = load i64, i64* %8
%14 = load i64, i64* %6
%15 = icmp ult i64 %13, %14
br i1 %15, label %16, label %20
16: ; preds = %3
%17 = load i64, i64* @errno
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %16
store i64 -1, i64* %4
br label %22
20: ; preds = %16, %3
%21 = load i64, i64* %8
store i64 %21, i64* %4
br label %22
22: ; preds = %20, %19
%23 = load i64, i64* %4
ret i64 %23
}

LLVM IR (-O2):
@errno = global i64 0
define i64 @io_write(i8* nocapture %0, i64 %1, i8* nocapture %2) {
%4 = tail call i64 @fwrite(i8* %0, i32 1, i64 %1, i8* %2)
%5 = icmp ult i64 %4, %1
%6 = load i64, i64* @errno
%7 = icmp ne i64 %6, 0
%8 = select i1 %5, i1 %7, i1 false
%9 = select i1 %8, i64 -1, i64 %4
ret i64 %9
}
void cpu_idle(void) { __asm__ volatile("hlt" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @cpu_idle() {
tail call void asm sideeffect "hlt", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
void glmGenerateZeroMatrix4d(double m[16]) {
  memset(m, 0, 16 * sizeof(double));
}


x86 assembly (clang, -O0):
<glmGenerateZeroMatrix4d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateZeroMatrix4d>:
xor    %esi,%esi
mov    $0x80,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @glmGenerateZeroMatrix4d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = call i32 @memset(double* %3, i32 0, i32 128)
ret void
}

LLVM IR (-O2):
define void @glmGenerateZeroMatrix4d(double* %0) {
%2 = tail call i32 @memset(double* %0, i32 0, i32 128)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mx_set_clear_zmap_bit(int, int, int);
void mx_set_zmap_bit(int device, int i) { mx_set_clear_zmap_bit(device, i, 1); }


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

x86 assembly (clang, -O2):
<mx_set_zmap_bit>:
mov    $0x1,%edx
jmp    1030 <mx_set_clear_zmap_bit@plt>

LLVM IR (-O0):
define void @mx_set_zmap_bit(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 @mx_set_clear_zmap_bit(i32 %5, i32 %6, i32 1)
ret void
}

LLVM IR (-O2):
define void @mx_set_zmap_bit(i32 %0, i32 %1) {
%3 = tail call i32 @mx_set_clear_zmap_bit(i32 %0, i32 %1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
long sieveOfEratosthenes(int, int);
long task10() {
  if (64 == 32) {
    printf("INFO: This is a 32bit OS. Problem 10 can only be calculated under "
           "64bit. =( \n");
    return -1;
  }
  return sieveOfEratosthenes(2000000, 1);
}


x86 assembly (clang, -O0):
<task10>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1e8480,%edi
mov    $0x1,%esi
call   1030 <sieveOfEratosthenes@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<task10>:
mov    $0x1e8480,%edi
mov    $0x1,%esi
jmp    1030 <sieveOfEratosthenes@plt>

LLVM IR (-O0):
define i64 @task10() {
%1 = call i64 @sieveOfEratosthenes(i32 2000000, i32 1)
ret i64 %1
}

LLVM IR (-O2):
define i64 @task10() {
%1 = tail call i64 @sieveOfEratosthenes(i32 2000000, i32 1)
ret i64 %1
}
void glPopAttrib(void) {}


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

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

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

LLVM IR (-O2):
define void @glPopAttrib() {
ret void
}
void show_info_a() {
  printf("%s %d: %s() hello world\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/gcc/"
         "combine-object/a.c",
         21, __func__);
}


x86 assembly (clang, -O0):
<show_info_a>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef7(%rip),%rsi
mov    $0x15,%edx
lea    0xf83(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_info_a>:
lea    0xee9(%rip),%rdi
lea    0xefb(%rip),%rsi
lea    0xf8c(%rip),%rcx
mov    $0x15,%edx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"%s %d: %s() hello world\0A\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/gcc/combine-object/a.c\00"
@__func__.show_info_a = [12 x i8] c"show_info_a\00"
define void @show_info_a() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.show_info_a, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"%s %d: %s() hello world\0A\00"
@.str.1 = [152 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/fengbohello/practice/refs/heads/master/gcc/combine-object/a.c\00"
@__func__.show_info_a = [12 x i8] c"show_info_a\00"
define void @show_info_a() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([152 x i8], [152 x i8]* @.str.1, i64 0, i64 0), i32 21, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.show_info_a, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void leave_message(void) { fprintf(stderr, "bye bye\n"); }


x86 assembly (clang, -O0):
<leave_message>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<leave_message>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [9 x i8] c"bye bye\0A\00"
define void @leave_message() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [9 x i8] c"bye bye\0A\00"
define void @leave_message() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_40uint8_mem(unsigned char *val) {
  return ((*val) & (-0x40 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_40uint8_mem>:
cmpb   $0x40,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_40uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp ult i8 %2, 64
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int ack(long, long);
int /*<<< orphan*/ printf(char *, int);
long strtol(char *, int /*<<< orphan*/, int);
int main(int argc, char **argv) {
  long m = strtol(argv[1], 0, 10);
  long n = strtol(argv[2], 0, 10);
  printf("%d\n", ack(m, n));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <ack@plt>
mov    %eax,%esi
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %rax,%r14
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1050 <strtol@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <ack@plt>
lea    0xe94(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i64 @strtol(i8* %4, i32 0, i32 10)
%6 = getelementptr inbounds i8*, i8** %1, i64 2
%7 = load i8*, i8** %6
%8 = tail call i64 @strtol(i8* %7, i32 0, i32 10)
%9 = tail call i32 @ack(i64 %5, i64 %8)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int sqrt(int);
uint64_t isqrt(uint64_t a, bool *isinteger) {
  uint64_t x = sqrt(a);
  *isinteger = x * x == a;
  return x;
}


x86 assembly (clang, -O0):
<isqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sqrt@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isqrt>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <sqrt@plt>
mov    %eax,%ecx
imul   %eax,%ecx
xor    %edx,%edx
cmp    %ebp,%ecx
sete   %dl
mov    %edx,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @isqrt(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 = call i32 @sqrt(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %5
%10 = mul nsw i32 %8, %9
%11 = load i32, i32* %3
%12 = icmp eq i32 %10, %11
%13 = zext i1 %12 to i32
%14 = load i32*, i32** %4
store i32 %13, i32* %14
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @isqrt(i32 %0, i32* nocapture writeonly %1) {
%3 = tail call i32 @sqrt(i32 %0)
%4 = mul nsw i32 %3, %3
%5 = icmp eq i32 %4, %0
%6 = zext i1 %5 to i32
store i32 %6, i32* %1
ret i32 %3
}
int main() {
  char out = 0x55;
  __asm__("movl $0x42, %%eax; cmpl $0x84, %%eax; setc %%al" : "=a"(out));
  return out;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movb   $0x55,-0x5(%rbp)
mov    $0x42,%eax
cmp    $0x84,%eax
setb   %al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x42,%eax
cmp    $0x84,%eax
setb   %al
movsbl %al,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 85, i8* %2
%3 = call i8 asm "movl $$0x42, %eax; cmpl $$0x84, %eax; setc %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i8 asm "movl $$0x42, %eax; cmpl $$0x84, %eax; setc %al", "={ax},~{dirflag},~{fpsr},~{flags}"()
%2 = sext i8 %1 to i32
ret i32 %2
}
void foo366() {}


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

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

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

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