xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned short inw(int);
int /*<<< orphan*/ io_wait();
unsigned short inw_p(int port) {
  unsigned short value = inw(port);
  io_wait();
  return value;
}


x86 assembly (clang, -O0):
<inw_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <inw@plt>
mov    %ax,-0x6(%rbp)
mov    $0x0,%al
call   1040 <io_wait@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw_p>:
push   %rbx
call   1030 <inw@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <io_wait@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @inw_p(i32 %0) {
%2 = alloca i32
%3 = alloca i16
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call zeroext i16 @inw(i32 %4)
store i16 %5, i16* %3
%6 = call i32 (...) @io_wait()
%7 = load i16, i16* %3
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @inw_p(i32 %0) {
%2 = tail call zeroext i16 @inw(i32 %0)
%3 = tail call i32 (...) @io_wait()
ret i16 %2
}
OP(dd, f5) { op_f5(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_f5()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_daustd_usage() {
  printf(
      "Usage: daust [options]\n"
      "\t-V, --version\t\tPrint the version and exit.\n"
      "\t-h, --help\t\tPrint this help and exit.\n\n"
      "Options: \n"
      "\t-l, --logfile\t\tFilename for optional logging.\n"
      "\t-k, --keynode\t\tNode that will introduce this node to the network.\n"
      "\t-p, --publicfacing\tSpecify a public facing address for this node.\n"
      "\t-v, --verbose\t\tMore verbose output\n");
}


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

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

LLVM IR (-O0):
@.str = [335 x i8] c"Usage: daust [options]\0A\09-V, --version\09\09Print the version and exit.\0A\09-h, --help\09\09Print this help and exit.\0A\0AOptions: \0A\09-l, --logfile\09\09Filename for optional logging.\0A\09-k, --keynode\09\09Node that will introduce this node to the network.\0A\09-p, --publicfacing\09Specify a public facing address for this node.\0A\09-v, --verbose\09\09More verbose output\0A\00"
define void @print_daustd_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([335 x i8], [335 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [334 x i8] c"Usage: daust [options]\0A\09-V, --version\09\09Print the version and exit.\0A\09-h, --help\09\09Print this help and exit.\0A\0AOptions: \0A\09-l, --logfile\09\09Filename for optional logging.\0A\09-k, --keynode\09\09Node that will introduce this node to the network.\0A\09-p, --publicfacing\09Specify a public facing address for this node.\0A\09-v, --verbose\09\09More verbose output\00"
define void @print_daustd_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([334 x i8], [334 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct re_registers {
  int dummy;
};
struct re_pattern_buffer {
  int dummy;
};

/* Variables and functions */
int re_search_stub(struct re_pattern_buffer *, char const *, int, int,
                   int /*<<< orphan*/, int, struct re_registers *, int);
int re_match(struct re_pattern_buffer *bufp, const char *string, int length,
             int start, struct re_registers *regs) {
  return re_search_stub(bufp, string, length, start, 0, length, regs, 1);
}


x86 assembly (clang, -O0):
<re_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
mov    -0x14(%rbp),%r9d
mov    -0x20(%rbp),%rax
xor    %r8d,%r8d
mov    %rax,(%rsp)
movl   $0x1,0x8(%rsp)
call   1030 <re_search_stub@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_match>:
push   %rax
mov    %r8,%rax
xor    %r8d,%r8d
mov    %edx,%r9d
push   $0x1
push   %rax
call   1030 <re_search_stub@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
%struct.re_pattern_buffer = type { i32 }
%struct.re_registers = type { i32 }
define i32 @re_match(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4) {
%6 = alloca %struct.re_pattern_buffer*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.re_registers*
store %struct.re_pattern_buffer* %0, %struct.re_pattern_buffer** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store %struct.re_registers* %4, %struct.re_registers** %10
%11 = load %struct.re_pattern_buffer*, %struct.re_pattern_buffer** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %8
%16 = load %struct.re_registers*, %struct.re_registers** %10
%17 = call i32 @re_search_stub(%struct.re_pattern_buffer* %11, i8* %12, i32 %13, i32 %14, i32 0, i32 %15, %struct.re_registers* %16, i32 1)
ret i32 %17
}

LLVM IR (-O2):
%struct.re_pattern_buffer = type { i32 }
%struct.re_registers = type { i32 }
define i32 @re_match(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i32 %3, %struct.re_registers* %4) {
%6 = tail call i32 @re_search_stub(%struct.re_pattern_buffer* %0, i8* %1, i32 %2, i32 %3, i32 0, i32 %2, %struct.re_registers* %4, i32 1)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
char *strdup(char *);
char *pair_one2m_prompt_element_name(char *pair_one2m_prefix,
                                     char *folder_label) {
  char element_name[128];
  sprintf(element_name, "%s%s", pair_one2m_prefix, folder_label);
  return strdup(element_name);
}


x86 assembly (clang, -O0):
<pair_one2m_prompt_element_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb7(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x90(%rbp),%rdi
call   1040 <strdup@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pair_one2m_prompt_element_name>:
push   %rbx
sub    $0x80,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xecb(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strdup@plt>
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
define i8* @pair_one2m_prompt_element_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [128 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%11 = call i8* @strdup(i8* %10)
ret i8* %11
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
define noalias i8* @pair_one2m_prompt_element_name(i8* %0, i8* %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%6 = call i8* @strdup(i8* %4)
ret i8* %6
}
int cairo_code_draw_casHarmonicsLabel_get_height() { return 10; }


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

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

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

LLVM IR (-O2):
define i32 @cairo_code_draw_casHarmonicsLabel_get_height() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ err(int /*<<< orphan*/, char *);
char *strdup(char const *);
char *xstrdup(const char *str) {
  char *ret = strdup(str);
  if (!ret && str)
    err(EXIT_FAILURE, "cannot duplicate string");
  return ret;
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1164 <xstrdup+0x44>
cmpq   $0x0,-0x8(%rbp)
je     1164 <xstrdup+0x44>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
lea    0xea1(%rip),%rsi
call   1030 <err@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1040 <strdup@plt>
mov    %rax,%r14
test   %rbx,%rbx
je     114e <xstrdup+0x2e>
test   %r14,%r14
jne    114e <xstrdup+0x2e>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xeb7(%rip),%rsi
call   1030 <err@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [24 x i8] c"cannot duplicate string\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %14, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = icmp ne i8* %9, null
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* @EXIT_FAILURE
%13 = call i32 @err(i32 %12, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %11, %8, %1
%15 = load i8*, i8** %3
ret i8* %15
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [24 x i8] c"cannot duplicate string\00"
define noalias i8* @xstrdup(i8* %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i8* %0, null
%5 = and i1 %4, %3
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @err(i32 %7, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %6, %1
ret i8* %2
}
int test_imm_72int64_highword_reg(long long val) {
  return ((val >> 32) & (0x72 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_72int64_highword_reg>:
movabs $0x7200000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_72int64_highword_reg(i64 %0) {
%2 = and i64 %0, 489626271744
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
unsigned short csum_fold(int /*<<< orphan*/);
int /*<<< orphan*/ csum_tcpudp_nofold(unsigned long, unsigned long,
                                      unsigned short, unsigned short,
                                      unsigned int);
unsigned short int csum_tcpudp_magic(unsigned long saddr, unsigned long daddr,
                                     unsigned short len, unsigned short proto,
                                     unsigned int sum) {
  return (csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum)));
}


x86 assembly (clang, -O0):
<csum_tcpudp_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x12(%rbp),%cx
mov    -0x14(%rbp),%ax
mov    -0x18(%rbp),%r8d
movzwl %cx,%edx
movzwl %ax,%ecx
call   1040 <csum_tcpudp_nofold@plt>
mov    %eax,%edi
call   1030 <csum_fold@plt>
movzwl %ax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_tcpudp_magic>:
push   %rax
call   1040 <csum_tcpudp_nofold@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <csum_fold@plt>

LLVM IR (-O0):
define zeroext i16 @csum_tcpudp_magic(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i16 %2, i16* %8
store i16 %3, i16* %9
store i32 %4, i32* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i16, i16* %8
%14 = load i16, i16* %9
%15 = load i32, i32* %10
%16 = call i32 @csum_tcpudp_nofold(i64 %11, i64 %12, i16 zeroext %13, i16 zeroext %14, i32 %15)
%17 = call zeroext i16 @csum_fold(i32 %16)
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @csum_tcpudp_magic(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4) {
%6 = tail call i32 @csum_tcpudp_nofold(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4)
%7 = tail call zeroext i16 @csum_fold(i32 %6)
ret i16 %7
}
main() {
  int mat[4][3] = {{0}, {0}, {0}, {0}};
  int *p = mat;
  printf("Endereco de mat[0][0] = %p\n", &mat[0][0]);
  printf("Endereco de mat[0][0] = %p\n", p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rsi
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xed1(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [28 x i8] c"Endereco de mat[0][0] = %p\0A\00"
define i32 @main() {
%1 = alloca [4 x [3 x i32]]
%2 = bitcast [4 x [3 x i32]]* %1 to i8*
%3 = getelementptr inbounds [4 x [3 x i32]], [4 x [3 x i32]]* %1, i64 0, i64 0, i64 0
%4 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32* %3)
ret i32 0
}
int func1(int a, int b) { return a + b; }


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

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

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

LLVM IR (-O2):
define i32 @func1(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430Usart1P__Usart__enableTxIntr();
void Msp430UartP__0__Usart__enableTxIntr(void) {
  HplMsp430Usart1P__Usart__enableTxIntr();
}


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

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

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

LLVM IR (-O2):
define void @Msp430UartP__0__Usart__enableTxIntr() {
%1 = tail call i32 (...) @HplMsp430Usart1P__Usart__enableTxIntr()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int feof(int /*<<< orphan*/ *);
int feof_unlocked(FILE *stream) { return feof(stream); }


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

x86 assembly (clang, -O2):
<feof_unlocked>:
jmp    1030 <feof@plt>

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

LLVM IR (-O2):
define i32 @feof_unlocked(i32* nocapture %0) {
%2 = tail call i32 @feof(i32* %0)
ret i32 %2
}
/* Variables and functions */
char *str2case(char *, char, char, int);
char *str2upper(char *str) { return str2case(str, 'a', 'z', -32); }


x86 assembly (clang, -O0):
<str2upper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x61,%esi
mov    $0x7a,%edx
mov    $0xffffffe0,%ecx
call   1030 <str2case@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str2upper>:
mov    $0x61,%esi
mov    $0x7a,%edx
mov    $0xffffffe0,%ecx
jmp    1030 <str2case@plt>

LLVM IR (-O0):
define i8* @str2upper(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @str2case(i8* %3, i8 signext 97, i8 signext 122, i32 -32)
ret i8* %4
}

LLVM IR (-O2):
define i8* @str2upper(i8* %0) {
%2 = tail call i8* @str2case(i8* %0, i8 signext 97, i8 signext 122, i32 -32)
ret i8* %2
}
/* Variables and functions */
int my_lcb_ll(char *, unsigned long long *, char *, int);
int my_lcb(char *m, unsigned long *r, char *nul, int len) {
  unsigned long long val;
  int retcode;
  retcode = my_lcb_ll(m, &val, nul, len);
  *r = val;
  return retcode;
}


x86 assembly (clang, -O0):
<my_lcb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
lea    -0x28(%rbp),%rsi
call   1030 <my_lcb_ll@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_lcb>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <my_lcb_ll@plt>
mov    0x8(%rsp),%rcx
mov    %rcx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @my_lcb(i8* %0, i64* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i64
%10 = alloca i32
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = call i32 @my_lcb_ll(i8* %11, i64* %9, i8* %12, i32 %13)
store i32 %14, i32* %10
%15 = load i64, i64* %9
%16 = load i64*, i64** %6
store i64 %15, i64* %16
%17 = load i32, i32* %10
ret i32 %17
}

LLVM IR (-O2):
define i32 @my_lcb(i8* %0, i64* nocapture writeonly %1, i8* %2, i32 %3) {
%5 = alloca i64
%6 = bitcast i64* %5 to i8*
%7 = call i32 @my_lcb_ll(i8* %0, i64* %5, i8* %2, i32 %3)
%8 = load i64, i64* %5
store i64 %8, i64* %1
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ UP3D_GetParameter(int);
int32_t UP3D_GetLayer() { return UP3D_GetParameter(0x0A); }


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

x86 assembly (clang, -O2):
<UP3D_GetLayer>:
mov    $0xa,%edi
jmp    1030 <UP3D_GetParameter@plt>

LLVM IR (-O0):
define i32 @UP3D_GetLayer() {
%1 = call i32 @UP3D_GetParameter(i32 10)
ret i32 %1
}

LLVM IR (-O2):
define i32 @UP3D_GetLayer() {
%1 = tail call i32 @UP3D_GetParameter(i32 10)
ret i32 %1
}
void ScaleRowDown2Linear_16_C() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown2Linear_16_C() {
ret void
}
/* Variables and functions */
float fabs(float);
float error(float x, float xNew) { return fabs(xNew - x); }


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

x86 assembly (clang, -O2):
<error>:
subss  %xmm0,%xmm1
andps  0xef5(%rip),%xmm1
movaps %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @error(float %0, float %1) {
%3 = fsub float %1, %0
%4 = tail call float @llvm.fabs.f32(float %3)
ret float %4
}
void RTThreadSelfAutoAdopt(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadSelfAutoAdopt() {
ret void
}
int foo() {
  int *x;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @foo() {
%1 = alloca i32*
ret i32 0
}

LLVM IR (-O2):
define i32 @foo() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int gpio_ex_unex_port(int /*<<< orphan*/, int);
int gpio_export(uint16_t gpio) { return gpio_ex_unex_port(gpio, true); }


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

x86 assembly (clang, -O2):
<gpio_export>:
mov    $0x1,%esi
jmp    1030 <gpio_ex_unex_port@plt>

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

LLVM IR (-O2):
define i32 @gpio_export(i32 %0) {
%2 = tail call i32 @gpio_ex_unex_port(i32 %0, i32 1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, double, double, double,
                           int);
int /*<<< orphan*/ stderr;
void print_running_stat(double wall_time, double user_time, double system_time,
                        int mem_usage) {
  fprintf(stderr, "%.4lfr%.4lfu%.4lfs%dkbytes\n", wall_time, user_time,
          system_time, mem_usage);
}


x86 assembly (clang, -O0):
<print_running_stat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    -0x1c(%rbp),%edx
lea    0xeb4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_running_stat>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"%.4lfr%.4lfu%.4lfs%dkbytes\0A\00"
define void @print_running_stat(double %0, double %1, double %2, i32 %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca i32
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store i32 %3, i32* %8
%9 = load i32, i32* @stderr
%10 = load double, double* %5
%11 = load double, double* %6
%12 = load double, double* %7
%13 = load i32, i32* %8
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double %10, double %11, double %12, i32 %13)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"%.4lfr%.4lfu%.4lfs%dkbytes\0A\00"
define void @print_running_stat(double %0, double %1, double %2, i32 %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), double %0, double %1, double %2, i32 %3)
ret void
}
/* Variables and functions */
scalar_t__ strcasecmp(char *, char *);
int yesnotoi(char *str) {
  if (strcasecmp(str, "yes") == 0)
    return 1;
  if (strcasecmp(str, "no") == 0)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<yesnotoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1142 <yesnotoi+0x32>
movl   $0x1,-0x4(%rbp)
jmp    116f <yesnotoi+0x5f>
mov    -0x10(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
jne    1168 <yesnotoi+0x58>
movl   $0x0,-0x4(%rbp)
jmp    116f <yesnotoi+0x5f>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yesnotoi>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcasecmp@plt>
test   %rax,%rax
je     113b <yesnotoi+0x2b>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcasecmp@plt>
neg    %rax
sbb    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"yes\00"
@.str.1 = [3 x i8] c"no\00"
define i32 @yesnotoi(i8* nocapture %0) {
%2 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @strcasecmp(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
%7 = sext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
unsigned xrop3_210_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~S;
  stk2 = D & stk3;
  stk1 = T ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

x86 assembly (clang, -O2):
<xrop3_210_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
mov    %eax,%edx
xor    %edi,%edx
xor    $0xff,%edx
or     %ecx,%eax
not    %eax
and    %edx,%eax
or     %edi,%esi
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_210_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %3
%8 = xor i32 %7, 255
%9 = or i32 %6, %4
%10 = xor i32 %9, -1
%11 = and i32 %8, %10
%12 = or i8 %1, %0
%13 = zext i8 %12 to i32
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ pushk(int /*<<< orphan*/);
void pushzero() { pushk(0); }


x86 assembly (clang, -O0):
<pushzero>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <pushk@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushzero>:
xor    %edi,%edi
jmp    1030 <pushk@plt>

LLVM IR (-O0):
define void @pushzero() {
%1 = call i32 @pushk(i32 0)
ret void
}

LLVM IR (-O2):
define void @pushzero() {
%1 = tail call i32 @pushk(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  scanf("%d", &n);
  printf("%d\n", n * n);
  printf("%d", n * n * n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
imul   -0x8(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
imul   -0x8(%rbp),%esi
imul   -0x8(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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>
mov    0xc(%rsp),%esi
imul   %esi,%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
mov    %eax,%esi
imul   %eax,%esi
imul   %eax,%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
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 i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 %4, %5
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = mul nsw i32 %8, %9
%11 = load i32, i32* %2
%12 = mul nsw i32 %10, %11
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = mul nsw i32 %4, %4
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %1
%8 = mul nsw i32 %7, %7
%9 = mul nsw i32 %8, %7
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
int _link_r(struct _reent *r, char *old, char *new) { return -1; }


x86 assembly (clang, -O0):
<_link_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_link_r(%struct._reent* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
ret i32 -1
}
/* Variables and functions */
int lsmStrlen(const char *zName) {
  int nRet = 0;
  while (zName[nRet])
    nRet++;
  return nRet;
}


x86 assembly (clang, -O0):
<lsmStrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     112f <lsmStrlen+0x2f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <lsmStrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lsmStrlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <lsmStrlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @lsmStrlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t load_be64(const uint8_t *p) {
  return ((uint64_t)p[0] << 56) | ((uint64_t)p[1] << 48) |
         ((uint64_t)p[2] << 40) | ((uint64_t)p[3] << 32) |
         ((uint64_t)p[4] << 24) | ((uint64_t)p[5] << 16) |
         ((uint64_t)p[6] << 8) | ((uint64_t)p[7]);
}


x86 assembly (clang, -O0):
<load_be64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    $0x38,%ecx
shl    %cl,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
mov    %ecx,%edx
mov    $0x30,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
mov    %ecx,%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
mov    %ecx,%edx
mov    $0x20,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%rcx
shl    $0x18,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x28(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x30(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x38(%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @load_be64(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 56
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 48
%13 = or i32 %7, %12
%14 = load i64*, i64** %2
%15 = getelementptr inbounds i64, i64* %14, i64 2
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 40
%19 = or i32 %13, %18
%20 = load i64*, i64** %2
%21 = getelementptr inbounds i64, i64* %20, i64 3
%22 = load i64, i64* %21
%23 = trunc i64 %22 to i32
%24 = shl i32 %23, 32
%25 = or i32 %19, %24
%26 = load i64*, i64** %2
%27 = getelementptr inbounds i64, i64* %26, i64 4
%28 = load i64, i64* %27
%29 = trunc i64 %28 to i32
%30 = shl i32 %29, 24
%31 = or i32 %25, %30
%32 = load i64*, i64** %2
%33 = getelementptr inbounds i64, i64* %32, i64 5
%34 = load i64, i64* %33
%35 = trunc i64 %34 to i32
%36 = shl i32 %35, 16
%37 = or i32 %31, %36
%38 = load i64*, i64** %2
%39 = getelementptr inbounds i64, i64* %38, i64 6
%40 = load i64, i64* %39
%41 = trunc i64 %40 to i32
%42 = shl i32 %41, 8
%43 = or i32 %37, %42
%44 = load i64*, i64** %2
%45 = getelementptr inbounds i64, i64* %44, i64 7
%46 = load i64, i64* %45
%47 = trunc i64 %46 to i32
%48 = or i32 %43, %47
ret i32 %48
}

LLVM IR (-O2):
define i32 @load_be64(i64* nocapture readnone %0) {
ret i32 poison
}
void gtk_text_iter_set_line_index() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_set_line_index() {
ret void
}
int f(foo, bar, com) {
  unsigned align;
  if (foo)
    return 0;
  while (1) {
    switch (bar) {
    case 1:
      if (com != 0)
        return align;
      *(char *)0 = 0;
    }
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1123 <f+0x23>
movl   $0x0,-0x4(%rbp)
jmp    1158 <f+0x58>
jmp    1128 <f+0x28>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
jne    1153 <f+0x53>
jmp    1139 <f+0x39>
cmpl   $0x0,-0x10(%rbp)
je     114e <f+0x4e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <f+0x58>
xor    %eax,%eax
movb   $0x0,(%rax)
jmp    1128 <f+0x28>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
test   %edi,%edi
jne    1109 <f+0x9>
cmp    $0x1,%esi
jne    1110 <f+0x10>
xor    %eax,%eax
ret
nopl   0x0(%rax)
jmp    1110 <f+0x10>

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %10
5: ; preds = %3
%6 = icmp eq i32 %1, 1
br i1 %6, label %8, label %7
7: ; preds = %5, %7
br label %7
8: ; preds = %5
%9 = icmp ne i32 %2, 0
tail call void @llvm.assume(i1 %9)
br label %10
10: ; preds = %3, %8
ret i32 0
}
int isDelimiter(char c, const char *d) {
  while (*d != c && *d != '\0')
    d++;
  if (*d == '\0')
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<isDelimiter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
movsbl -0x5(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x11(%rbp)
je     1136 <isDelimiter+0x36>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1146 <isDelimiter+0x46>
jmp    1157 <isDelimiter+0x57>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110e <isDelimiter+0xe>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1173 <isDelimiter+0x73>
movl   $0x0,-0x4(%rbp)
jmp    117a <isDelimiter+0x7a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isDelimiter>:
movzbl (%rsi),%ecx
cmp    %dil,%cl
je     1110 <isDelimiter+0x10>
add    $0x1,%rsi
test   %cl,%cl
jne    1100 <isDelimiter>
xor    %eax,%eax
test   %cl,%cl
setne  %al
ret

LLVM IR (-O0):
define i32 @isDelimiter(i8 signext %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8*
store i8 %0, i8* %4
store i8* %1, i8** %5
br label %6
6: ; preds = %20, %2
%7 = load i8*, i8** %5
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %9, %11
br i1 %12, label %13, label %18
13: ; preds = %6
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %6
%19 = phi i1 [ false, %6 ], [ %17, %13 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %5
br label %6
23: ; preds = %18
%24 = load i8*, i8** %5
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %29
28: ; preds = %23
store i32 0, i32* %3
br label %30
29: ; preds = %23
store i32 1, i32* %3
br label %30
30: ; preds = %29, %28
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @isDelimiter(i8 signext %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, %0
%7 = icmp eq i8 %5, 0
%8 = or i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3
%11 = xor i1 %7, true
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
struct list *list_prev(struct list const *, struct list const *);
struct list *list_tail(const struct list *list) {
  return list_prev(list, list);
}


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

x86 assembly (clang, -O2):
<list_tail>:
mov    %rdi,%rsi
jmp    1030 <list_prev@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define %struct.list* @list_tail(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = load %struct.list*, %struct.list** %2
%5 = call %struct.list* @list_prev(%struct.list* %3, %struct.list* %4)
ret %struct.list* %5
}

LLVM IR (-O2):
%struct.list = type { i32 }
define %struct.list* @list_tail(%struct.list* %0) {
%2 = tail call %struct.list* @list_prev(%struct.list* %0, %struct.list* %0)
ret %struct.list* %2
}
/* Variables and functions */
unsigned long TimerValueGet(int, int);
unsigned long wave_cap32_getvalue(void) {
  return (0xffffffff - TimerValueGet(0x40030000, 0x000000ff));
}


x86 assembly (clang, -O0):
<wave_cap32_getvalue>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40030000,%edi
mov    $0xff,%esi
call   1030 <TimerValueGet@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_cap32_getvalue>:
push   %rax
mov    $0x40030000,%edi
mov    $0xff,%esi
call   1030 <TimerValueGet@plt>
mov    $0xffffffff,%ecx
sub    %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @wave_cap32_getvalue() {
%1 = call i64 @TimerValueGet(i32 1073938432, i32 255)
%2 = sub i64 4294967295, %1
ret i64 %2
}

LLVM IR (-O2):
define i64 @wave_cap32_getvalue() {
%1 = tail call i64 @TimerValueGet(i32 1073938432, i32 255)
%2 = sub i64 4294967295, %1
ret i64 %2
}
/* Variables and functions */
char *encode16(char *, int);
char *encodeXorOnly(char *ptr) {
  ptr = encode16(ptr, 0x0021);
  return ptr;
}


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

x86 assembly (clang, -O2):
<encodeXorOnly>:
mov    $0x21,%esi
jmp    1030 <encode16@plt>

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

LLVM IR (-O2):
define i8* @encodeXorOnly(i8* %0) {
%2 = tail call i8* @encode16(i8* %0, i32 33)
ret i8* %2
}
/* Type definitions */
struct vec3 {
  int dummy;
};

/* Variables and functions */
float sqrtf(int /*<<< orphan*/);
int /*<<< orphan*/ vec3_dot(struct vec3 *, struct vec3 *);
float vec3_length(struct vec3 *v) { return sqrtf(vec3_dot(v, v)); }


x86 assembly (clang, -O0):
<vec3_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <vec3_dot@plt>
mov    %eax,%edi
call   1040 <sqrtf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_length>:
push   %rax
mov    %rdi,%rsi
call   1030 <vec3_dot@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <sqrtf@plt>

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define float @vec3_length(%struct.vec3* %0) {
%2 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %2
%3 = load %struct.vec3*, %struct.vec3** %2
%4 = load %struct.vec3*, %struct.vec3** %2
%5 = call i32 @vec3_dot(%struct.vec3* %3, %struct.vec3* %4)
%6 = call float @sqrtf(i32 %5)
ret float %6
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define float @vec3_length(%struct.vec3* %0) {
%2 = tail call i32 @vec3_dot(%struct.vec3* %0, %struct.vec3* %0)
%3 = tail call float @sqrtf(i32 %2)
ret float %3
}
int is_error_packet(int opcode) { return opcode == 5; }


x86 assembly (clang, -O0):
<is_error_packet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_error_packet>:
xor    %eax,%eax
cmp    $0x5,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_error_packet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 5
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_error_packet(i32 %0) {
%2 = icmp eq i32 %0, 5
%3 = zext i1 %2 to i32
ret i32 %3
}