xunge/DecIR huggingface dataset:
void substitute(char *str, int ch1, int ch2) {
  for (; *str; str++) {
    if (*str == ch1)
      *str = ch2;
  }
}


x86 assembly (clang, -O0):
<substitute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <substitute+0x4c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
jne    1136 <substitute+0x36>
mov    -0x10(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
jmp    113b <substitute+0x3b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110e <substitute+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<substitute>:
mov    (%rdi),%al
test   %al,%al
je     1127 <substitute+0x27>
add    $0x1,%rdi
jmp    111b <substitute+0x1b>
nopl   0x0(%rax)
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
je     1127 <substitute+0x27>
movsbl %al,%eax
cmp    %esi,%eax
jne    1110 <substitute+0x10>
mov    %dl,-0x1(%rdi)
jmp    1110 <substitute+0x10>
ret

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

LLVM IR (-O2):
define void @substitute(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %18, label %6
6: ; preds = %3
%7 = trunc i32 %2 to i8
br label %8
8: ; preds = %6, %14
%9 = phi i8 [ %4, %6 ], [ %16, %14 ]
%10 = phi i8* [ %0, %6 ], [ %15, %14 ]
%11 = sext i8 %9 to i32
%12 = icmp eq i32 %11, %1
br i1 %12, label %13, label %14
13: ; preds = %8
store i8 %7, i8* %10
br label %14
14: ; preds = %8, %13
%15 = getelementptr inbounds i8, i8* %10, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %8
18: ; preds = %14, %3
ret void
}
void foo083() {}


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

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

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

LLVM IR (-O2):
define void @foo083() {
ret void
}
/* Variables and functions */
unsigned long long _pext_u64(unsigned long long, unsigned long long);
unsigned long long test_pext_u64(unsigned long long __X,
                                 unsigned long long __Y) {
  return _pext_u64(__X, __Y);
}


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

x86 assembly (clang, -O2):
<test_pext_u64>:
jmp    1030 <_pext_u64@plt>

LLVM IR (-O0):
define i64 @test_pext_u64(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i64 @_pext_u64(i64 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @test_pext_u64(i64 %0, i64 %1) {
%3 = tail call i64 @_pext_u64(i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ TEST(char *, int /*<<< orphan*/);
char *XDisplayName(char *string) {
  TEST("XDisplayName", 0);
  return string;
}


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

x86 assembly (clang, -O2):
<XDisplayName>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %esi,%esi
call   1030 <TEST@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"XDisplayName\00"
define i8* @XDisplayName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @TEST(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = load i8*, i8** %2
ret i8* %4
}

LLVM IR (-O2):
@.str = [13 x i8] c"XDisplayName\00"
define i8* @XDisplayName(i8* readnone returned %0) {
%2 = tail call i32 @TEST(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ triRec(int /*<<< orphan*/, int, int *, double *, double *);
void trierCroissant(int nbVal, int *ind, double *val, double *val2) {
  triRec(0, nbVal - 1, ind, val, val2);
}


x86 assembly (clang, -O0):
<trierCroissant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
xor    %edi,%edi
call   1030 <triRec@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trierCroissant>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    -0x1(%rdi),%esi
xor    %edi,%edi
jmp    1030 <triRec@plt>

LLVM IR (-O0):
define void @trierCroissant(i32 %0, i32* %1, double* %2, double* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca double*
%8 = alloca double*
store i32 %0, i32* %5
store i32* %1, i32** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load i32, i32* %5
%10 = sub nsw i32 %9, 1
%11 = load i32*, i32** %6
%12 = load double*, double** %7
%13 = load double*, double** %8
%14 = call i32 @triRec(i32 0, i32 %10, i32* %11, double* %12, double* %13)
ret void
}

LLVM IR (-O2):
define void @trierCroissant(i32 %0, i32* %1, double* %2, double* %3) {
%5 = add nsw i32 %0, -1
%6 = tail call i32 @triRec(i32 0, i32 %5, i32* %1, double* %2, double* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ get_uint32(int /*<<< orphan*/ *, int);
uint32_t ses_config_generation(uint8_t *data) { return get_uint32(data, 4); }


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

x86 assembly (clang, -O2):
<ses_config_generation>:
mov    $0x4,%esi
jmp    1030 <get_uint32@plt>

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

LLVM IR (-O2):
define i32 @ses_config_generation(i32* %0) {
%2 = tail call i32 @get_uint32(i32* %0, i32 4)
ret i32 %2
}
int hom_set_ops(struct platform_hom_ops *hom_ops) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.platform_hom_ops = type opaque
define i32 @hom_set_ops(%struct.platform_hom_ops* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
typedef long long uint16_t;

/* Variables and functions */
const char *int_to_binary(uint16_t x) {
  static char b[sizeof(uint16_t) * 8 + 1] = {0};
  int y;
  long long z;
  for (z = (1LL << sizeof(uint16_t) * 8) - 1, y = 0; z > 0; z >>= 1, y++) {
    b[y] = (((x & z) == z) ? '1' : '0');
  }
  b[y] = 0;
  return b;
}


x86 assembly (clang, -O0):
<int_to_binary>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x18(%rbp)
jle    1164 <int_to_binary+0x64>
mov    -0x8(%rbp),%rdx
and    -0x18(%rbp),%rdx
mov    -0x18(%rbp),%rsi
mov    $0x30,%eax
mov    $0x31,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %al,%dl
movslq -0xc(%rbp),%rcx
lea    0x2ee9(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
sar    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1113 <int_to_binary+0x13>
movslq -0xc(%rbp),%rcx
lea    0x2ec1(%rip),%rax
movb   $0x0,(%rax,%rcx,1)
lea    0x2eb6(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_binary>:
movb   $0x0,0x2f29(%rip)
lea    0x2f22(%rip),%rax
ret

LLVM IR (-O0):
@int_to_binary.b = internal global [65 x i8] zeroinitializer
define i8* @int_to_binary(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
store i64 %0, i64* %2
store i64 poison, i64* %4
store i32 0, i32* %3
br label %5
5: ; preds = %20, %1
%6 = load i64, i64* %4
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %25
8: ; preds = %5
%9 = load i64, i64* %2
%10 = load i64, i64* %4
%11 = and i64 %9, %10
%12 = load i64, i64* %4
%13 = icmp eq i64 %11, %12
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 49, i32 48
%16 = trunc i32 %15 to i8
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [65 x i8], [65 x i8]* @int_to_binary.b, i64 0, i64 %18
store i8 %16, i8* %19
br label %20
20: ; preds = %8
%21 = load i64, i64* %4
%22 = ashr i64 %21, 1
store i64 %22, i64* %4
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %5
25: ; preds = %5
%26 = load i32, i32* %3
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [65 x i8], [65 x i8]* @int_to_binary.b, i64 0, i64 %27
store i8 0, i8* %28
ret i8* getelementptr inbounds ([65 x i8], [65 x i8]* @int_to_binary.b, i64 0, i64 0)
}

LLVM IR (-O2):
@int_to_binary.b = internal global [65 x i8] zeroinitializer
define i8* @int_to_binary(i64 %0) {
store i8 0, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @int_to_binary.b, i64 0, i64 0)
ret i8* getelementptr inbounds ([65 x i8], [65 x i8]* @int_to_binary.b, i64 0, i64 0)
}
void foo624() {}


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

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

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

LLVM IR (-O2):
define void @foo624() {
ret void
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t __attribute__((section(".iram1"))) DPORT_REG_READ(uint32_t reg) {
  return (*(volatile uint32_t *)(reg));
}


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

x86 assembly (clang, -O2):
<DPORT_REG_READ>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    (%rax),%rax
ret

LLVM IR (-O0):
define i64 @DPORT_REG_READ(i64 %0) section ".iram1" {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @DPORT_REG_READ(i64 %0) section ".iram1" {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = inttoptr i64 %3 to i64*
%5 = load volatile i64, i64* %4
ret i64 %5
}
/* Type definitions */
struct tavl_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void **tavl_probe(struct tavl_table *, void *);
void(tavl_assert_insert)(struct tavl_table *table, void *item) {
  void **p = tavl_probe(table, item);
  assert(p != NULL && *p == item);
}


x86 assembly (clang, -O0):
<tavl_assert_insert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <tavl_probe@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
je     1162 <tavl_assert_insert+0x42>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tavl_assert_insert>:
push   %rbx
mov    %rsi,%rbx
call   1040 <tavl_probe@plt>
xor    %edi,%edi
test   %rax,%rax
je     1137 <tavl_assert_insert+0x17>
cmp    %rbx,(%rax)
sete   %dil
pop    %rbx
jmp    1030 <assert@plt>

LLVM IR (-O0):
%struct.tavl_table = type { i32 }
define void @tavl_assert_insert(%struct.tavl_table* %0, i8* %1) {
%3 = alloca %struct.tavl_table*
%4 = alloca i8*
%5 = alloca i8**
store %struct.tavl_table* %0, %struct.tavl_table** %3
store i8* %1, i8** %4
%6 = load %struct.tavl_table*, %struct.tavl_table** %3
%7 = load i8*, i8** %4
%8 = call i8** @tavl_probe(%struct.tavl_table* %6, i8* %7)
store i8** %8, i8*** %5
%9 = load i8**, i8*** %5
%10 = icmp ne i8** %9, null
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = load i8*, i8** %12
%14 = load i8*, i8** %4
%15 = icmp eq i8* %13, %14
br label %16
16: ; preds = %11, %2
%17 = phi i1 [ false, %2 ], [ %15, %11 ]
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
ret void
}

LLVM IR (-O2):
%struct.tavl_table = type { i32 }
define void @tavl_assert_insert(%struct.tavl_table* %0, i8* %1) {
%3 = tail call i8** @tavl_probe(%struct.tavl_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
%11 = tail call i32 @assert(i32 %10)
ret void
}
void avpriv_split_xiph_headers() {}


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

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

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

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

/* Variables and functions */
double CLOCKS_PER_SEC;
clock_t secs2ticks(double secs) { return (clock_t)(secs * CLOCKS_PER_SEC); }


x86 assembly (clang, -O0):
<secs2ticks>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ed3(%rip),%rax
mulsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<secs2ticks>:
mov    0x2ee1(%rip),%rax
mulsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
@CLOCKS_PER_SEC = global double 0.000000e+00
define i32 @secs2ticks(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* @CLOCKS_PER_SEC
%5 = fmul double %3, %4
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@CLOCKS_PER_SEC = global double 0.000000e+00
define i32 @secs2ticks(double %0) {
%2 = load double, double* @CLOCKS_PER_SEC
%3 = fmul double %2, %0
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *xstrdup(const char *s) {
  char *t;
  size_t len;
  if (!s)
    return NULL;
  len = strlen(s) + 1;
  t = (char *)malloc(len);
  if (t) {
    memcpy(t, s, len);
  }
  return t;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <xstrdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1197 <xstrdup+0x67>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     118f <xstrdup+0x5f>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1168 <xstrdup+0x38>
mov    %rdi,%r14
call   1030 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     116a <xstrdup+0x3a>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <memcpy@plt>
jmp    116a <xstrdup+0x3a>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %9, label %8
8: ; preds = %1
store i8* null, i8** %2
br label %26
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %11, 1
%13 = sext i32 %12 to i64
store i64 %13, i64* %5
%14 = load i64, i64* %5
%15 = call i64 @malloc(i64 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %4
%17 = load i8*, i8** %4
%18 = icmp ne i8* %17, null
br i1 %18, label %19, label %24
19: ; preds = %9
%20 = load i8*, i8** %4
%21 = load i8*, i8** %3
%22 = load i64, i64* %5
%23 = call i32 @memcpy(i8* %20, i8* %21, i64 %22)
br label %24
24: ; preds = %19, %9
%25 = load i8*, i8** %4
store i8* %25, i8** %2
br label %26
26: ; preds = %24, %8
%27 = load i8*, i8** %2
ret i8* %27
}

LLVM IR (-O2):
define i8* @xstrdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %12, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = icmp eq i64 %7, 0
br i1 %9, label %12, label %10
10: ; preds = %3
%11 = tail call i32 @memcpy(i8* %8, i8* %0, i64 %6)
br label %12
12: ; preds = %3, %10, %1
%13 = phi i8* [ null, %1 ], [ %8, %10 ], [ %8, %3 ]
ret i8* %13
}
/* Variables and functions */
double Slater_4S_6S(double, double, double);
double Slater_6S_4S(double rij, double xii, double xij) {
  return Slater_4S_6S(rij, xij, xii);
}


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

x86 assembly (clang, -O2):
<Slater_6S_4S>:
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <Slater_4S_6S@plt>

LLVM IR (-O0):
define double @Slater_6S_4S(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
%7 = load double, double* %4
%8 = load double, double* %6
%9 = load double, double* %5
%10 = call double @Slater_4S_6S(double %7, double %8, double %9)
ret double %10
}

LLVM IR (-O2):
define double @Slater_6S_4S(double %0, double %1, double %2) {
%4 = tail call double @Slater_4S_6S(double %0, double %2, double %1)
ret double %4
}
__attribute__((naked)) void *__wrap_free(void *mem) { asm("jmp memfree"); }


x86 assembly (clang, -O0):
<__wrap_free>:
jmp    1030 <memfree@plt>

x86 assembly (clang, -O2):
<__wrap_free>:
jmp    1030 <memfree@plt>

LLVM IR (-O0):
define i8* @__wrap_free(i8* %0) {
unreachable
}

LLVM IR (-O2):
define i8* @__wrap_free(i8* %0) {
tail call void asm sideeffect "jmp memfree", "~{dirflag},~{fpsr},~{flags}"()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void mk_mem_free(void *ptr) { free(ptr); }


x86 assembly (clang, -O0):
<mk_mem_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):
<mk_mem_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @mk_mem_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void X509_add1_ext_i2d(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_add1_ext_i2d() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int a, b, temp;
  scanf("%d", &a);
  scanf("%d", &b);
  temp = a;
  a = b;
  b = temp;
  printf("%d\n", a);
  printf("%d", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xec1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%esi
mov    %esi,0xc(%rsp)
mov    %eax,0x8(%rsp)
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
store i32 %8, i32* %1
store i32 %7, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i32, i32* %2
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}
void set_tr(unsigned int seg) {
  __asm__ volatile("ltr %0" : : "rm"((unsigned short)(seg)));
}


x86 assembly (clang, -O0):
<set_tr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %ax,-0x6(%rbp)
ltr    -0x6(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_tr>:
mov    %di,-0x2(%rsp)
ltr    -0x2(%rsp)
ret

LLVM IR (-O0):
define void @set_tr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = trunc i32 %3 to i16
ret void
}

LLVM IR (-O2):
define void @set_tr(i32 %0) {
%2 = trunc i32 %0 to i16
tail call void asm sideeffect "ltr $0", "rm,~{dirflag},~{fpsr},~{flags}"(i16 %2)
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=14 "
         "REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed "
         "Aug 15 19:35:59 CST 2012 BUILD=DEBUG CPU= USING_UMP=1 "
         "USING_MALI200=0 USING_MALI400=7 USING_MALI400_L2_CACHE=2 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c "
         "platform/meson_platform/mali_fix.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=12 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=";
}


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 = [462 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Aug 15 19:35:59 CST 2012 BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=7 USING_MALI400_L2_CACHE=2 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=12 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([462 x i8], [462 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [462 x i8] c"malidrv: CONFIG=aml-meson-m400-2 USING_OS_MEMORY=1 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Wed Aug 15 19:35:59 CST 2012 BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=7 USING_MALI400_L2_CACHE=2 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c platform/meson_platform/mali_fix.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=12 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([462 x i8], [462 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char *argv[]) {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(c);
    putchar(c);
  }
  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    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1164 <main+0x44>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
je     115c <main+0x3c>
mov    %eax,%ebx
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
cmp    (%r14),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %13, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %10, %6 ], [ %3, %2 ]
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 @putchar(i32 %7)
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void arg_dp(void) { printf("dp\n"); }


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

x86 assembly (clang, -O2):
<arg_dp>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [3 x i8] c"dp\00"
define void @arg_dp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
float test3f(float x) { return __builtin_sinf(x); }


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

x86 assembly (clang, -O2):
<test3f>:
jmp    1030 <sinf@plt>

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

LLVM IR (-O2):
define float @test3f(float %0) {
%2 = tail call float @sinf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void exit_with(const char *error_message) {
  perror(error_message);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<exit_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exit_with>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @exit_with(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @exit_with(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ XKeyPressedEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void free_XKeyPressedEvent(void *_p) {
  if (_p == NULL)
    abort();
  free((XKeyPressedEvent *)_p);
}


x86 assembly (clang, -O0):
<free_XKeyPressedEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113e <free_XKeyPressedEvent+0x1e>
mov    $0x0,%al
call   1040 <abort@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_XKeyPressedEvent>:
test   %rdi,%rdi
je     112a <free_XKeyPressedEvent+0xa>
jmp    1030 <free@plt>
push   %rax
xor    %eax,%eax
call   1040 <abort@plt>

LLVM IR (-O0):
define void @free_XKeyPressedEvent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = bitcast i8* %8 to i32*
%10 = call i32 @free(i32* %9)
ret void
}

LLVM IR (-O2):
define void @free_XKeyPressedEvent(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
%6 = bitcast i8* %0 to i32*
%7 = tail call i32 @free(i32* %6)
ret void
}
void removeBottomWall(int (*maze)[25], int startRow, int startCol) {
  int removeRow, removeCol;
  removeRow = (startRow + 1) * 2;
  removeCol = (startCol)*2 - 1 + 2;
  maze[removeRow][removeCol] = 0;
}


x86 assembly (clang, -O0):
<removeBottomWall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
add    $0x2,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeBottomWall>:
lea    (%rsi,%rsi,1),%eax
add    $0x2,%eax
lea    (%rdx,%rdx,1),%ecx
add    $0x1,%ecx
cltq
movslq %ecx,%rcx
imul   $0x64,%rax,%rax
add    %rdi,%rax
movl   $0x0,(%rax,%rcx,4)
ret

LLVM IR (-O0):
define void @removeBottomWall([25 x i32]* %0, i32 %1, i32 %2) {
%4 = alloca [25 x i32]*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store [25 x i32]* %0, [25 x i32]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
%11 = mul nsw i32 %10, 2
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = mul nsw i32 %12, 2
%14 = sub nsw i32 %13, 1
%15 = add nsw i32 %14, 2
store i32 %15, i32* %8
%16 = load [25 x i32]*, [25 x i32]** %4
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [25 x i32], [25 x i32]* %16, i64 %18
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [25 x i32], [25 x i32]* %19, i64 0, i64 %21
store i32 0, i32* %22
ret void
}

LLVM IR (-O2):
define void @removeBottomWall([25 x i32]* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 1
%5 = add i32 %4, 2
%6 = shl nsw i32 %2, 1
%7 = or i32 %6, 1
%8 = sext i32 %5 to i64
%9 = sext i32 %7 to i64
%10 = getelementptr inbounds [25 x i32], [25 x i32]* %0, i64 %8, i64 %9
store i32 0, i32* %10
ret void
}
int fun1063() { return 1063; }


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

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

LLVM IR (-O0):
define i32 @fun1063() {
ret i32 1063
}

LLVM IR (-O2):
define i32 @fun1063() {
ret i32 1063
}
void podstawa(szerokosc) {
  int i;
  for (i = 0; i < szerokosc; i++)
    putchar('*');
  putchar('\n');
}


x86 assembly (clang, -O0):
<podstawa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <podstawa+0x38>
mov    $0x2a,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <podstawa+0x12>
mov    $0xa,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<podstawa>:
push   %rbx
test   %edi,%edi
jle    1131 <podstawa+0x21>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x2a,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <podstawa+0x10>
mov    $0xa,%edi
xor    %eax,%eax
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @podstawa(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 42)
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
%14 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
ret void
}

LLVM IR (-O2):
define void @podstawa(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 42)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
%9 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 10)
ret void
}
/* Variables and functions */
int foo(int);
int /*<<< orphan*/ printf(char *, int, int);
main() {
  int i, t = 0;
  for (i = 256; i <= 256; i++) {
    t = foo(i);
    printf("%d %d\n", i, t);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x100,-0x8(%rbp)
cmpl   $0x100,-0x8(%rbp)
jg     1175 <main+0x55>
mov    -0x8(%rbp),%edi
call   1040 <foo@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe9e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @foo(i32 256)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 256, i32 %1)
ret i32 0
}
int return10_32() { return 10; }


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

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

LLVM IR (-O0):
define i32 @return10_32() {
ret i32 10
}

LLVM IR (-O2):
define i32 @return10_32() {
ret i32 10
}
/* Variables and functions */
void *malloc(size_t);
void *rpl_malloc(size_t size) {
  if (size == 0)
    size = 1;
  return malloc(size);
}


x86 assembly (clang, -O0):
<rpl_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112f <rpl_malloc+0x1f>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpl_malloc>:
test   %rdi,%rdi
mov    $0x1,%eax
cmove  %rax,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @rpl_malloc(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 1, i64* %2
br label %6
6: ; preds = %5, %1
%7 = load i64, i64* %2
%8 = call i8* @malloc(i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define noalias i8* @rpl_malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = select i1 %2, i64 1, i64 %0
%4 = tail call i8* @malloc(i64 %3)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void usage(FILE *stream, char *argv0) {
  fprintf(stream, "Usage: %s FILENAME ... [- FUNCTION [FILENAME ...]]\n",
          argv0);
}


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

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

LLVM IR (-O0):
@.str = [52 x i8] c"Usage: %s FILENAME ... [- FUNCTION [FILENAME ...]]\0A\00"
define void @usage(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"Usage: %s FILENAME ... [- FUNCTION [FILENAME ...]]\0A\00"
define void @usage(i32* nocapture %0, i8* %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i8* %1)
ret void
}
suffix(s) register char *s;
{
  while (*s)
    s++;
  if (*(s - 2) == '.')
    return (*--s);
  return ('x');
}


x86 assembly (clang, -O0):
<suffix>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1126 <suffix+0x26>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <suffix+0x8>
mov    -0x10(%rbp),%rax
movsbl -0x2(%rax),%eax
cmp    $0x2e,%eax
jne    1152 <suffix+0x52>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl -0x1(%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <suffix+0x59>
movl   $0x78,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<suffix>:
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1100 <suffix>
mov    $0x78,%eax
cmpb   $0x2e,-0x3(%rdi)
jne    1118 <suffix+0x18>
movsbl -0x2(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @suffix(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 -2
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 46
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = getelementptr inbounds i8, i8* %3, i64 -1
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
br label %15
15: ; preds = %7, %11
%16 = phi i32 [ %14, %11 ], [ 120, %7 ]
ret i32 %16
}
/* Type definitions */
struct comp {
  int dummy;
};
struct BrzFetch_ {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SEND_REQUP(int);
int /*<<< orphan*/ TRACE_FOLLOW_THREAD(int, int /*<<< orphan*/);
void BrzFetch_requp(struct comp *comp, int port) {
  struct BrzFetch_ *c = (struct BrzFetch_ *)comp;
  TRACE_FOLLOW_THREAD(1, 0);
  SEND_REQUP(1);
}


x86 assembly (clang, -O0):
<BrzFetch_requp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <TRACE_FOLLOW_THREAD@plt>
mov    $0x1,%edi
call   1040 <SEND_REQUP@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BrzFetch_requp>:
push   %rax
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <TRACE_FOLLOW_THREAD@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <SEND_REQUP@plt>

LLVM IR (-O0):
%struct.comp = type { i32 }
%struct.BrzFetch_ = type { i32 }
define void @BrzFetch_requp(%struct.comp* %0, i32 %1) {
%3 = alloca %struct.comp*
%4 = alloca i32
%5 = alloca %struct.BrzFetch_*
store %struct.comp* %0, %struct.comp** %3
store i32 %1, i32* %4
%6 = load %struct.comp*, %struct.comp** %3
%7 = bitcast %struct.comp* %6 to %struct.BrzFetch_*
store %struct.BrzFetch_* %7, %struct.BrzFetch_** %5
%8 = call i32 @TRACE_FOLLOW_THREAD(i32 1, i32 0)
%9 = call i32 @SEND_REQUP(i32 1)
ret void
}

LLVM IR (-O2):
%struct.comp = type { i32 }
define void @BrzFetch_requp(%struct.comp* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @TRACE_FOLLOW_THREAD(i32 1, i32 0)
%4 = tail call i32 @SEND_REQUP(i32 1)
ret void
}
void adj360(deg) double *deg;
{
  for (;;)
    if (*deg < 0)
      *deg += 360;
    else if (*deg > 360)
      *deg -= 360;
    else
      break;
}


x86 assembly (clang, -O0):
<adj360>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
jbe    1132 <adj360+0x32>
mov    -0x8(%rbp),%rax
movsd  0xedb(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
jmp    1173 <adj360+0x73>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xebe(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1169 <adj360+0x69>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xea4(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rax)
jmp    116e <adj360+0x6e>
jmp    1178 <adj360+0x78>
jmp    1173 <adj360+0x73>
jmp    1108 <adj360+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<adj360>:
movsd  (%rdi),%xmm0
movsd  0xef4(%rip),%xmm1
xorpd  %xmm2,%xmm2
movsd  0xef0(%rip),%xmm3
jmp    1128 <adj360+0x28>
nopw   0x0(%rax,%rax,1)
addsd  %xmm4,%xmm0
movsd  %xmm0,(%rdi)
ucomisd %xmm0,%xmm2
movapd %xmm1,%xmm4
ja     1120 <adj360+0x20>
ucomisd %xmm1,%xmm0
movapd %xmm3,%xmm4
ja     1120 <adj360+0x20>
ret

LLVM IR (-O0):
define void @adj360(double* %0) {
%2 = alloca double*
store double* %0, double** %2
br label %3
3: ; preds = %21, %1
%4 = load double*, double** %2
%5 = load double, double* %4
%6 = fcmp olt double %5, 0.000000e+00
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load double*, double** %2
%9 = load double, double* %8
%10 = fadd double %9, 3.600000e+02
store double %10, double* %8
br label %21
11: ; preds = %3
%12 = load double*, double** %2
%13 = load double, double* %12
%14 = fcmp ogt double %13, 3.600000e+02
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load double*, double** %2
%17 = load double, double* %16
%18 = fsub double %17, 3.600000e+02
store double %18, double* %16
br label %20
19: ; preds = %11
br label %22
20: ; preds = %15
br label %21
21: ; preds = %20, %7
br label %3
22: ; preds = %19
ret void
}

LLVM IR (-O2):
define void @adj360(double* nocapture %0) {
%2 = load double, double* %0
br label %3
3: ; preds = %8, %1
%4 = phi double [ %10, %8 ], [ %2, %1 ]
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = fcmp ogt double %4, 3.600000e+02
br i1 %7, label %8, label %11
8: ; preds = %6, %3
%9 = phi double [ 3.600000e+02, %3 ], [ -3.600000e+02, %6 ]
%10 = fadd double %4, %9
store double %10, double* %0
br label %3
11: ; preds = %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __f77_f_back();
f_back() { __f77_f_back(); }


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

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

LLVM IR (-O0):
define i32 @f_back() {
%1 = alloca i32
%2 = call i32 (...) @__f77_f_back()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @f_back() {
%1 = tail call i32 (...) @__f77_f_back()
ret i32 undef
}
f(int (*p)()) {
  int (*f[2])();
  f[0] = p;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f(i32 (...)* %0) {
%2 = alloca i32
%3 = alloca i32 (...)*
%4 = alloca [2 x i32 (...)*]
store i32 (...)* %0, i32 (...)** %3
%5 = load i32 (...)*, i32 (...)** %3
%6 = getelementptr inbounds [2 x i32 (...)*], [2 x i32 (...)*]* %4, i64 0, i64 0
store i32 (...)* %5, i32 (...)** %6
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
define i32 @f(i32 (...)* nocapture readnone %0) {
ret i32 undef
}