xunge/DecIR huggingface dataset:
/* Type definitions */
struct uv__epoll_event {
  int dummy;
};

/* Variables and functions */
int syscall(int, int, struct uv__epoll_event *, int, int);
int uv__epoll_wait(int epfd, struct uv__epoll_event *events, int nevents,
                   int timeout) {
  return syscall(232, epfd, events, nevents, timeout);
}


x86 assembly (clang, -O0):
<uv__epoll_wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
mov    $0xe8,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uv__epoll_wait>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0xe8,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.uv__epoll_event = type { i32 }
define i32 @uv__epoll_wait(i32 %0, %struct.uv__epoll_event* %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca %struct.uv__epoll_event*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store %struct.uv__epoll_event* %1, %struct.uv__epoll_event** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load %struct.uv__epoll_event*, %struct.uv__epoll_event** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @syscall(i32 232, i32 %9, %struct.uv__epoll_event* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.uv__epoll_event = type { i32 }
define i32 @uv__epoll_wait(i32 %0, %struct.uv__epoll_event* %1, i32 %2, i32 %3) {
%5 = tail call i32 @syscall(i32 232, i32 %0, %struct.uv__epoll_event* %1, i32 %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(unsigned int, int /*<<< orphan*/ *);
void fputi16(unsigned int in, FILE *f) {
  fputc(in, f);
  fputc(in >> 8, f);
}


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

x86 assembly (clang, -O2):
<fputi16>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1030 <fputc@plt>
shr    $0x8,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fputc@plt>

LLVM IR (-O0):
define void @fputi16(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32, i32* %3
%6 = load i32*, i32** %4
%7 = call i32 @fputc(i32 %5, i32* %6)
%8 = load i32, i32* %3
%9 = lshr i32 %8, 8
%10 = load i32*, i32** %4
%11 = call i32 @fputc(i32 %9, i32* %10)
ret void
}

LLVM IR (-O2):
define void @fputi16(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @fputc(i32 %0, i32* %1)
%4 = lshr i32 %0, 8
%5 = tail call i32 @fputc(i32 %4, i32* %1)
ret void
}
/* Variables and functions */
int smp_bm_substr_exist(char const *, char const *);
int smp_str_substr_exist(const char *text, const char *substr) {
  return smp_bm_substr_exist(text, substr);
}


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

x86 assembly (clang, -O2):
<smp_str_substr_exist>:
jmp    1030 <smp_bm_substr_exist@plt>

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

LLVM IR (-O2):
define i32 @smp_str_substr_exist(i8* %0, i8* %1) {
%3 = tail call i32 @smp_bm_substr_exist(i8* %0, i8* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ setup(int, char **);
int /*<<< orphan*/ teardown();
int /*<<< orphan*/ test_runner();
int main(int argc, char *argv[]) {
  setup(argc, argv);
  test_runner();
  teardown();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <setup@plt>
mov    $0x0,%al
call   1030 <test_runner@plt>
mov    $0x0,%al
call   1050 <teardown@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1060 <setup@plt>
xor    %eax,%eax
call   1030 <test_runner@plt>
xor    %eax,%eax
call   1050 <teardown@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @setup(i32 %6, i8** %7)
%9 = call i32 (...) @test_runner()
%10 = call i32 (...) @teardown()
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @setup(i32 %0, i8** %1)
%4 = tail call i32 (...) @test_runner()
%5 = tail call i32 (...) @teardown()
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
char *opt_string(char *str, char *def) {
  if (str == NULL) {
    return def;
  } else {
    return str;
  }
}


x86 assembly (clang, -O0):
<opt_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1124 <opt_string+0x24>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <opt_string+0x2c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_string>:
mov    %rsi,%rax
test   %rdi,%rdi
cmovne %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @opt_string(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, null
%4 = select i1 %3, i8* %1, i8* %0
ret i8* %4
}
/* Variables and functions */
int PIPE_BUF;
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", PIPE_BUF);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@PIPE_BUF = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @PIPE_BUF
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@PIPE_BUF = global i32 0
define i32 @main() {
%1 = load i32, i32* @PIPE_BUF
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ do_bt();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void crash(int signo) {
  do_bt();
  exit(0);
}


x86 assembly (clang, -O0):
<crash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <do_bt@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @crash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @do_bt()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @crash(i32 %0) {
%2 = tail call i32 (...) @do_bt()
%3 = tail call i32 @exit(i32 0)
unreachable
}
float _Complex add_float_rr(float a, float b) { return a + b; }


x86 assembly (clang, -O0):
<add_float_rr>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0x4(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_float_rr>:
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
movss  %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define <2 x float> @add_float_rr(float %0, float %1) {
%3 = alloca { float, float }
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fadd float %6, %7
%9 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 0
%10 = getelementptr inbounds { float, float }, { float, float }* %3, i32 0, i32 1
store float %8, float* %9
store float 0.000000e+00, float* %10
%11 = bitcast { float, float }* %3 to <2 x float>*
%12 = load <2 x float>, <2 x float>* %11
ret <2 x float> %12
}

LLVM IR (-O2):
define <2 x float> @add_float_rr(float %0, float %1) {
%3 = fadd float %0, %1
%4 = insertelement <2 x float> <float poison, float 0.000000e+00>, float %3, i64 0
ret <2 x float> %4
}
/* Variables and functions */
int /*<<< orphan*/ response(int, char *, char *, char *);
void unimplemented(int client) {
  response(
      client, "HTTP/1.0 501 Method Not Implemented\r\n",
      "Content-Type: text/html\r\nContent-Length: %d\r\n\r\n",
      "<HTML><HEAD><TITLE>Method Not Implemented</TITLE></HEAD><BODY><P>HTTP "
      "request method not supenv_ported.</BODY></HTML>\r\n");
}


x86 assembly (clang, -O0):
<unimplemented>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xedb(%rip),%rsi
lea    0xefa(%rip),%rdx
lea    0xf23(%rip),%rcx
call   1030 <response@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unimplemented>:
lea    0xee9(%rip),%rsi
lea    0xf08(%rip),%rdx
lea    0xf31(%rip),%rcx
jmp    1030 <response@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"HTTP/1.0 501 Method Not Implemented\0D\0A\00"
@.str.1 = [48 x i8] c"Content-Type: text/html\0D\0AContent-Length: %d\0D\0A\0D\0A\00"
@.str.2 = [120 x i8] c"<HTML><HEAD><TITLE>Method Not Implemented</TITLE></HEAD><BODY><P>HTTP request method not supenv_ported.</BODY></HTML>\0D\0A\00"
define void @unimplemented(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @response(i32 %3, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"HTTP/1.0 501 Method Not Implemented\0D\0A\00"
@.str.1 = [48 x i8] c"Content-Type: text/html\0D\0AContent-Length: %d\0D\0A\0D\0A\00"
@.str.2 = [120 x i8] c"<HTML><HEAD><TITLE>Method Not Implemented</TITLE></HEAD><BODY><P>HTTP request method not supenv_ported.</BODY></HTML>\0D\0A\00"
define void @unimplemented(i32 %0) {
%2 = tail call i32 @response(i32 %0, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.2, i64 0, i64 0))
ret void
}
void CRYPTO_dbg_get_options(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_dbg_get_options() {
ret void
}
void gf8mul_01000100(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm6\n"
                       "\tpxor    %xmm7, %xmm5\n"
                       "\tpxor    %xmm7, %xmm2\n"
                       "\tpxor    %xmm7, %xmm1\n"
                       "\tpxor    %xmm6, %xmm5\n"
                       "\tpxor    %xmm6, %xmm4\n"
                       "\tpxor    %xmm6, %xmm1\n"
                       "\tpxor    %xmm6, %xmm0\n"
                       "\tpxor    %xmm5, %xmm7\n"
                       "\tpxor    %xmm5, %xmm6\n"
                       "\tpxor    %xmm5, %xmm1\n"
                       "\tpxor    %xmm4, %xmm6\n"
                       "\tpxor    %xmm4, %xmm5\n"
                       "\tpxor    %xmm4, %xmm0\n"
                       "\tpxor    %xmm3, %xmm4\n"
                       "\tpxor    %xmm2, %xmm7\n"
                       "\tpxor    %xmm2, %xmm1\n"
                       "\tpxor    %xmm1, %xmm7\n"
                       "\tpxor    %xmm1, %xmm3\n"
                       "\tpxor    %xmm3, %xmm1\n"
                       "\tpxor    %xmm0, %xmm6\n"
                       "\tpxor    %xmm0, %xmm2\n"
                       "\tpxor    %xmm2, %xmm0\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm4
pxor   %xmm6,%xmm1
pxor   %xmm6,%xmm0
pxor   %xmm5,%xmm7
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm1
pxor   %xmm4,%xmm6
pxor   %xmm4,%xmm5
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm4
pxor   %xmm2,%xmm7
pxor   %xmm2,%xmm1
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm3
pxor   %xmm3,%xmm1
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm2
pxor   %xmm2,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm6
pxor   %xmm7,%xmm5
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm6,%xmm5
pxor   %xmm6,%xmm4
pxor   %xmm6,%xmm1
pxor   %xmm6,%xmm0
pxor   %xmm5,%xmm7
pxor   %xmm5,%xmm6
pxor   %xmm5,%xmm1
pxor   %xmm4,%xmm6
pxor   %xmm4,%xmm5
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm4
pxor   %xmm2,%xmm7
pxor   %xmm2,%xmm1
pxor   %xmm1,%xmm7
pxor   %xmm1,%xmm3
pxor   %xmm3,%xmm1
pxor   %xmm0,%xmm6
pxor   %xmm0,%xmm2
pxor   %xmm2,%xmm0
ret

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

LLVM IR (-O2):
define void @gf8mul_01000100() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm6\0A\09pxor %xmm7, %xmm5\0A\09pxor %xmm7, %xmm2\0A\09pxor %xmm7, %xmm1\0A\09pxor %xmm6, %xmm5\0A\09pxor %xmm6, %xmm4\0A\09pxor %xmm6, %xmm1\0A\09pxor %xmm6, %xmm0\0A\09pxor %xmm5, %xmm7\0A\09pxor %xmm5, %xmm6\0A\09pxor %xmm5, %xmm1\0A\09pxor %xmm4, %xmm6\0A\09pxor %xmm4, %xmm5\0A\09pxor %xmm4, %xmm0\0A\09pxor %xmm3, %xmm4\0A\09pxor %xmm2, %xmm7\0A\09pxor %xmm2, %xmm1\0A\09pxor %xmm1, %xmm7\0A\09pxor %xmm1, %xmm3\0A\09pxor %xmm3, %xmm1\0A\09pxor %xmm0, %xmm6\0A\09pxor %xmm0, %xmm2\0A\09pxor %xmm2, %xmm0\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
void uninitvar_fflush(void) {
  FILE *fp;
  fflush(fp);
}


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

x86 assembly (clang, -O2):
<uninitvar_fflush>:
jmp    1030 <fflush@plt>

LLVM IR (-O0):
define void @uninitvar_fflush() {
%1 = alloca i32*
%2 = load i32*, i32** %1
%3 = call i32 @fflush(i32* %2)
ret void
}

LLVM IR (-O2):
define void @uninitvar_fflush() {
%1 = tail call i32 @fflush(i32* undef)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print() { printf("testerionooooooooo\n"); }


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"testerionooooooooo\00"
define void @print() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int f433(int *);
int f434(int *p) { return f433(p); }


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

x86 assembly (clang, -O2):
<f434>:
jmp    1030 <f433@plt>

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

LLVM IR (-O2):
define i32 @f434(i32* %0) {
%2 = tail call i32 @f433(i32* %0)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int pci_get_bus(int);
int pci_get_func(int);
int pci_get_slot(int);
uint32_t pci_get_addr(uint32_t device, int field) {
  return 0x80000000 | (pci_get_bus(device) << 16) |
         (pci_get_slot(device) << 11) | (pci_get_func(device) << 8) |
         (field & 0xfc);
}


x86 assembly (clang, -O0):
<pci_get_addr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <pci_get_bus@plt>
shl    $0x10,%eax
or     $0x80000000,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <pci_get_slot@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
shl    $0xb,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <pci_get_func@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    $0xfc,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_get_addr>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r15d
call   1030 <pci_get_bus@plt>
mov    %eax,%r14d
shl    $0x10,%r14d
mov    %r15d,%edi
call   1050 <pci_get_slot@plt>
mov    %eax,%ebp
shl    $0xb,%ebp
mov    %r15d,%edi
call   1040 <pci_get_func@plt>
shl    $0x8,%eax
or     %ebp,%eax
and    $0xfc,%ebx
or     %r14d,%ebx
or     %ebx,%eax
or     $0x80000000,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @pci_get_addr(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 = call i32 @pci_get_bus(i32 %5)
%7 = shl i32 %6, 16
%8 = or i32 -2147483648, %7
%9 = load i32, i32* %3
%10 = call i32 @pci_get_slot(i32 %9)
%11 = shl i32 %10, 11
%12 = or i32 %8, %11
%13 = load i32, i32* %3
%14 = call i32 @pci_get_func(i32 %13)
%15 = shl i32 %14, 8
%16 = or i32 %12, %15
%17 = load i32, i32* %4
%18 = and i32 %17, 252
%19 = or i32 %16, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @pci_get_addr(i32 %0, i32 %1) {
%3 = tail call i32 @pci_get_bus(i32 %0)
%4 = shl i32 %3, 16
%5 = tail call i32 @pci_get_slot(i32 %0)
%6 = shl i32 %5, 11
%7 = tail call i32 @pci_get_func(i32 %0)
%8 = shl i32 %7, 8
%9 = and i32 %1, 252
%10 = or i32 %9, %4
%11 = or i32 %10, %6
%12 = or i32 %11, %8
%13 = or i32 %12, -2147483648
ret i32 %13
}
/* Variables and functions */
scalar_t__ error();
int /*<<< orphan*/ init_object(int, unsigned long);
int /*<<< orphan*/ memory_init(int);
unsigned long symbol_size();
void define_symbol() {
  unsigned long size;
  size = symbol_size();
  init_object(48, size);
  if (error())
    return;
  memory_init(48);
  if (error()) {
    return;
  }
}


x86 assembly (clang, -O0):
<define_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <symbol_size@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x30,%edi
call   1040 <init_object@plt>
mov    $0x0,%al
call   1060 <error@plt>
cmp    $0x0,%rax
je     1177 <define_symbol+0x37>
jmp    1197 <define_symbol+0x57>
mov    $0x30,%edi
call   1030 <memory_init@plt>
mov    $0x0,%al
call   1060 <error@plt>
cmp    $0x0,%rax
je     1197 <define_symbol+0x57>
jmp    1197 <define_symbol+0x57>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<define_symbol>:
push   %rax
xor    %eax,%eax
call   1050 <symbol_size@plt>
mov    $0x30,%edi
mov    %rax,%rsi
call   1040 <init_object@plt>
xor    %eax,%eax
call   1060 <error@plt>
test   %rax,%rax
je     1163 <define_symbol+0x23>
pop    %rax
ret
mov    $0x30,%edi
call   1030 <memory_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <error@plt>

LLVM IR (-O0):
define void @define_symbol() {
%1 = alloca i64
%2 = call i64 (...) @symbol_size()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = call i32 @init_object(i32 48, i64 %3)
%5 = call i64 (...) @error()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
br label %13
8: ; preds = %0
%9 = call i32 @memory_init(i32 48)
%10 = call i64 (...) @error()
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
br label %13
13: ; preds = %7, %12, %8
ret void
}

LLVM IR (-O2):
define void @define_symbol() {
%1 = tail call i64 (...) @symbol_size()
%2 = tail call i32 @init_object(i32 48, i64 %1)
%3 = tail call i64 (...) @error()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = tail call i32 @memory_init(i32 48)
%7 = tail call i64 (...) @error()
br label %8
8: ; preds = %5, %0
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void adts_set_num_blocks(uint8_t *p_adts, uint8_t i_blocks_min1) {
  p_adts[6] &= ~0x03;
  p_adts[6] |= i_blocks_min1 & 0x03;
}


x86 assembly (clang, -O0):
<adts_set_num_blocks>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%ecx
and    $0xfffffffc,%ecx
mov    %ecx,0x18(%rax)
mov    -0xc(%rbp),%ecx
and    $0x3,%ecx
mov    -0x8(%rbp),%rax
or     0x18(%rax),%ecx
mov    %ecx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<adts_set_num_blocks>:
mov    0x18(%rdi),%eax
and    $0xfffffffc,%eax
and    $0x3,%esi
or     %eax,%esi
mov    %esi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @adts_set_num_blocks(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 = getelementptr inbounds i32, i32* %5, i64 6
%7 = load i32, i32* %6
%8 = and i32 %7, -4
store i32 %8, i32* %6
%9 = load i32, i32* %4
%10 = and i32 %9, 3
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 6
%13 = load i32, i32* %12
%14 = or i32 %13, %10
store i32 %14, i32* %12
ret void
}

LLVM IR (-O2):
define void @adts_set_num_blocks(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 6
%4 = load i32, i32* %3
%5 = and i32 %4, -4
%6 = and i32 %1, 3
%7 = or i32 %5, %6
store i32 %7, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void write(char *someString) { printf("%s", someString); }


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

x86 assembly (clang, -O2):
<write>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @write(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void cleanupMalloc(char *const *const allocation) {}


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

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

LLVM IR (-O0):
define void @cleanupMalloc(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
ret void
}

LLVM IR (-O2):
define void @cleanupMalloc(i8** nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int);
int main() {
  char m = 32;
  int i;
  for (i = 32; i < 127; i++) {
    printf("\n Symbol: %c Number: %d\n", m, i);
    m++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x20,-0x5(%rbp)
movl   $0x20,-0xc(%rbp)
cmpl   $0x7f,-0xc(%rbp)
jge    115f <main+0x4f>
mov    -0x5(%rbp),%al
mov    -0xc(%rbp),%edx
lea    0xebf(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <main+0x1a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x20,%ebx
lea    0xee0(%rip),%r14
movsbl %bl,%esi
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x7f,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [25 x i8] c"\0A Symbol: %c Number: %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 32, %0 ], [ %5, %1 ]
%3 = trunc i32 %2 to i8
%4 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8 signext %3, i32 %2)
%5 = add nuw nsw i32 %2, 1
%6 = icmp eq i32 %5, 127
br i1 %6, label %7, label %1
7: ; preds = %1
ret i32 0
}
const char *X509_get_default_private_dir(void) {
  return ("/etc/ssl"
          "/private");
}


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"/etc/ssl/private\00"
define i8* @X509_get_default_private_dir() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"/etc/ssl/private\00"
define i8* @X509_get_default_private_dir() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
int Int_inc(int x) { return x + 1; }


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

x86 assembly (clang, -O2):
<Int_inc>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @Int_inc(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void PrintHelp(char *pName) {
  printf("Usage: %s [-t{time_corr}] [-s{skip}n] [-w{window}]"
         "  input-file \n",
         pName);
  exit(0);
}


x86 assembly (clang, -O0):
<PrintHelp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<PrintHelp>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [65 x i8] c"Usage: %s [-t{time_corr}] [-s{skip}n] [-w{window}] input-file \0A\00"
define void @PrintHelp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [65 x i8] c"Usage: %s [-t{time_corr}] [-s{skip}n] [-w{window}] input-file \0A\00"
define void @PrintHelp(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned long long);
char *_itoa(unsigned long long int value, char *buflim) {
  sprintf(buflim, "%llu", value);
  return buflim;
}


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"%llu\00"
define i8* @_itoa(i64 %0, i8* returned writeonly %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %0)
ret i8* %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
struct lldp_tlv {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ validate_length_max_256(struct lldp_tlv *);
uint8_t validate_chassis_id_tlv(struct lldp_tlv *tlv) {
  return validate_length_max_256(tlv);
}


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

x86 assembly (clang, -O2):
<validate_chassis_id_tlv>:
jmp    1030 <validate_length_max_256@plt>

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

LLVM IR (-O2):
%struct.lldp_tlv = type { i32 }
define i32 @validate_chassis_id_tlv(%struct.lldp_tlv* %0) {
%2 = tail call i32 @validate_length_max_256(%struct.lldp_tlv* %0)
ret i32 %2
}
void test_isalpha_macro(void) {
  int i, j;
  for (i = -127; i < 256;)
    j = i, printf("%s: %d -> %d\n", __FUNCTION__, j, isalpha(i++) ? 1 : 0);
}


x86 assembly (clang, -O0):
<test_isalpha_macro>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffff81,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1184 <test_isalpha_macro+0x64>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
call   1040 <isalpha@plt>
mov    -0xc(%rbp),%edx
mov    %eax,%esi
xor    %ecx,%ecx
mov    $0x1,%eax
cmp    $0x0,%esi
cmovne %eax,%ecx
lea    0xe8f(%rip),%rdi
lea    0xe96(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <test_isalpha_macro+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_isalpha_macro>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0xffffff81,%ebx
lea    0xecd(%rip),%r14
lea    0xed4(%rip),%r15
nopw   0x0(%rax,%rax,1)
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1040 <isalpha@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %ebp,%ebx
cmp    $0x100,%ebp
jne    1140 <test_isalpha_macro+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isalpha_macro = [19 x i8] c"test_isalpha_macro\00"
define void @test_isalpha_macro() {
%1 = alloca i32
%2 = alloca i32
store i32 -127, i32* %1
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = load i32, i32* %1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
%11 = call i32 @isalpha(i32 %9)
%12 = icmp ne i32 %11, 0
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 1, i32 0
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.test_isalpha_macro, i64 0, i64 0), i32 %8, i32 %14)
br label %3
16: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s: %d -> %d\0A\00"
@__FUNCTION__.test_isalpha_macro = [19 x i8] c"test_isalpha_macro\00"
define void @test_isalpha_macro() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ -127, %0 ], [ %3, %1 ]
%3 = add nsw i32 %2, 1
%4 = tail call i32 @isalpha(i32 %2)
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__FUNCTION__.test_isalpha_macro, i64 0, i64 0), i32 %2, i32 %6)
%8 = icmp eq i32 %3, 256
br i1 %8, label %9, label %1
9: ; preds = %1
ret void
}
void gtk_widget_create_pango_context() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_create_pango_context() {
ret void
}
int PLIT(int v) { return v << 1; }


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

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

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

LLVM IR (-O2):
define i32 @PLIT(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
uint8_t tolowercase(uint8_t ch) {
  if ((ch >= 'A') && (ch <= 'Z'))
    return ch + 0x20;
  return ch;
}


x86 assembly (clang, -O0):
<tolowercase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1133 <tolowercase+0x33>
movsbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1133 <tolowercase+0x33>
movsbl -0x2(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1139 <tolowercase+0x39>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolowercase>:
lea    -0x41(%rdi),%eax
lea    0x20(%rdi),%ecx
cmp    $0x1a,%al
movzbl %cl,%eax
cmovae %edi,%eax
ret

LLVM IR (-O0):
define signext i8 @tolowercase(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = add nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
br label %18
16: ; preds = %7, %1
%17 = load i8, i8* %3
store i8 %17, i8* %2
br label %18
18: ; preds = %16, %11
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @tolowercase(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = add i8 %0, 32
%5 = select i1 %3, i8 %4, i8 %0
ret i8 %5
}
/* Variables and functions */
int sqrt(float);
float g2Dash(float x) { return -1 / (2 * sqrt(x + 6)); }


x86 assembly (clang, -O0):
<g2Dash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
call   1030 <sqrt@plt>
mov    %eax,%ecx
shl    $0x1,%ecx
mov    $0xffffffff,%eax
cltd
idiv   %ecx
cvtsi2ss %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g2Dash>:
push   %rax
addss  0xee7(%rip),%xmm0
call   1030 <sqrt@plt>
mov    %eax,%ecx
add    %eax,%ecx
mov    $0xffffffff,%eax
cltd
idiv   %ecx
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @g2Dash(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fadd float %3, 6.000000e+00
%5 = call i32 @sqrt(float %4)
%6 = mul nsw i32 2, %5
%7 = sdiv i32 -1, %6
%8 = sitofp i32 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @g2Dash(float %0) {
%2 = fadd float %0, 6.000000e+00
%3 = tail call i32 @sqrt(float %2)
%4 = shl nsw i32 %3, 1
%5 = sdiv i32 -1, %4
%6 = sitofp i32 %5 to float
ret float %6
}
/* Variables and functions */
scalar_t__ isalpha(char);
scalar_t__ isdigit(char);
int isValidStringChar(char c) {
  int result = -1;
  if (isalpha(c) || isdigit(c) || c == ' ' || c == '_') {
    result = 1;
  }
  return result;
}


x86 assembly (clang, -O0):
<isValidStringChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
jne    1175 <isValidStringChar+0x55>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
jne    1175 <isValidStringChar+0x55>
movsbl -0x1(%rbp),%eax
cmp    $0x20,%eax
je     1175 <isValidStringChar+0x55>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
jne    117c <isValidStringChar+0x5c>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValidStringChar>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    $0x1,%ebp
test   %rax,%rax
jne    1158 <isValidStringChar+0x38>
movsbl %bl,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
jne    1158 <isValidStringChar+0x38>
xor    %eax,%eax
cmp    $0x20,%bl
sete   %al
cmp    $0x5f,%bl
lea    -0x1(%rax,%rax,1),%eax
mov    $0x1,%ebp
cmovne %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @isValidStringChar(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = tail call i64 @isdigit(i8 signext %0)
%6 = freeze i64 %5
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = icmp eq i8 %0, 95
%10 = icmp eq i8 %0, 32
%11 = or i1 %9, %10
%12 = select i1 %11, i32 1, i32 -1
br label %13
13: ; preds = %1, %4, %8
%14 = phi i32 [ %12, %8 ], [ 1, %4 ], [ 1, %1 ]
ret i32 %14
}
/* Type definitions */
struct nvpair {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nvpair_first_item(struct nvpair *);
scalar_t__ nvpair_next_item(struct nvpair *, char **, char **);
int /*<<< orphan*/ setenv(char *, char *, int);
void nvpair_export(struct nvpair *nv) {
  char *name, *value;
  nvpair_first_item(nv);
  while (nvpair_next_item(nv, &name, &value)) {
    setenv(name, value, 1);
  }
}


x86 assembly (clang, -O0):
<nvpair_export>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <nvpair_first_item@plt>
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <nvpair_next_item@plt>
cmp    $0x0,%rax
je     1177 <nvpair_export+0x47>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
jmp    1145 <nvpair_export+0x15>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvpair_export>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1050 <nvpair_first_item@plt>
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
mov    %rbx,%rdi
call   1040 <nvpair_next_item@plt>
test   %rax,%rax
je     1186 <nvpair_export+0x56>
lea    0x8(%rsp),%r14
mov    %rsp,%r15
xchg   %ax,%ax
mov    0x8(%rsp),%rdi
mov    (%rsp),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <nvpair_next_item@plt>
test   %rax,%rax
jne    1160 <nvpair_export+0x30>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.nvpair = type { i32 }
define void @nvpair_export(%struct.nvpair* %0) {
%2 = alloca %struct.nvpair*
%3 = alloca i8*
%4 = alloca i8*
store %struct.nvpair* %0, %struct.nvpair** %2
%5 = load %struct.nvpair*, %struct.nvpair** %2
%6 = call i32 @nvpair_first_item(%struct.nvpair* %5)
br label %7
7: ; preds = %11, %1
%8 = load %struct.nvpair*, %struct.nvpair** %2
%9 = call i64 @nvpair_next_item(%struct.nvpair* %8, i8** %3, i8** %4)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = call i32 @setenv(i8* %12, i8* %13, i32 1)
br label %7
15: ; preds = %7
ret void
}

LLVM IR (-O2):
%struct.nvpair = type { i32 }
define void @nvpair_export(%struct.nvpair* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = bitcast i8** %2 to i8*
%5 = bitcast i8** %3 to i8*
%6 = tail call i32 @nvpair_first_item(%struct.nvpair* %0)
%7 = call i64 @nvpair_next_item(%struct.nvpair* %0, i8** %2, i8** %3)
%8 = icmp eq i64 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %1, %9
%10 = load i8*, i8** %2
%11 = load i8*, i8** %3
%12 = call i32 @setenv(i8* %10, i8* %11, i32 1)
%13 = call i64 @nvpair_next_item(%struct.nvpair* %0, i8** %2, i8** %3)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %9
15: ; preds = %9, %1
ret void
}
void gtk_ui_manager_get_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_ui_manager_get_widget() {
ret void
}
float f7(float x, float y) { return -7.5f * y * __builtin_copysignf(2.0f, x); }


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  0xf0a(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movaps 0xed9(%rip),%xmm2
pand   %xmm2,%xmm1
movaps 0xede(%rip),%xmm2
por    %xmm2,%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f7>:
mulss  0xef8(%rip),%xmm1
andps  0xf01(%rip),%xmm0
orps   0xf0a(%rip),%xmm0
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @f7(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 = fmul float -7.500000e+00, %5
%7 = load float, float* %3
%8 = call float @llvm.copysign.f32(float 2.000000e+00, float %7)
%9 = fmul float %6, %8
ret float %9
}

LLVM IR (-O2):
define float @f7(float %0, float %1) {
%3 = fmul float %1, -7.500000e+00
%4 = tail call float @llvm.copysign.f32(float 2.000000e+00, float %0)
%5 = fmul float %4, %3
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
FILE *load_file(char *file_name) {
  FILE *fd;
  if ((fd = fopen(file_name, "r")) == NULL) {
    printf("Can't open %s\n", file_name);
  }
  return fd;
}


x86 assembly (clang, -O0):
<load_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    115a <load_file+0x3a>
mov    -0x8(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_file>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xed2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <load_file+0x2a>
lea    0xec0(%rip),%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [15 x i8] c"Can't open %s\0A\00"
define i32* @load_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = icmp eq i32* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %1
%11 = load i32*, i32** %3
ret i32* %11
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [15 x i8] c"Can't open %s\0A\00"
define noalias i32* @load_file(i8* %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %1
ret i32* %2
}
char matchCharacter(char *ar, int *ip) {
  char s = ar[*ip];
  (*ip)++;
  return s;
}


x86 assembly (clang, -O0):
<matchCharacter>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
movsbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<matchCharacter>:
movslq (%rsi),%rcx
mov    (%rdi,%rcx,1),%al
add    $0x1,%ecx
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define signext i8 @matchCharacter(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i8
store i8* %0, i8** %3
store i32* %1, i32** %4
%6 = load i8*, i8** %3
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = load i8, i8* %10
store i8 %11, i8* %5
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = add nsw i32 %13, 1
store i32 %14, i32* %12
%15 = load i8, i8* %5
ret i8 %15
}

LLVM IR (-O2):
define signext i8 @matchCharacter(i8* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = add nsw i32 %3, 1
store i32 %7, i32* %1
ret i8 %6
}
/* Variables and functions */
unsigned int __get_cpsr();
int /*<<< orphan*/ __set_cpsr(unsigned int);
__attribute__((always_)) unsigned irq_enable(void) {
  unsigned _cpsr;
  _cpsr = __get_cpsr();
  __set_cpsr(_cpsr & ~0x00000080);
  return _cpsr;
}


x86 assembly (clang, -O0):
<irq_enable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <__get_cpsr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
and    $0xffffff7f,%edi
call   1030 <__set_cpsr@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irq_enable>:
push   %rbx
xor    %eax,%eax
call   1040 <__get_cpsr@plt>
mov    %eax,%ebx
mov    %eax,%edi
and    $0xffffff7f,%edi
call   1030 <__set_cpsr@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @irq_enable() {
%1 = alloca i32
%2 = call i32 (...) @__get_cpsr()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = and i32 %3, -129
%5 = call i32 @__set_cpsr(i32 %4)
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
define i32 @irq_enable() {
%1 = tail call i32 (...) @__get_cpsr()
%2 = and i32 %1, -129
%3 = tail call i32 @__set_cpsr(i32 %2)
ret i32 %1
}