xunge/DecIR huggingface dataset:
/* Variables and functions */
double ln_get_saturn_earth_dist(double);
double ln_get_saturn_pol_sdiam(double JD) {
  double So = 73.82;
  double dist;
  dist = ln_get_saturn_earth_dist(JD);
  return So / dist;
}


x86 assembly (clang, -O0):
<ln_get_saturn_pol_sdiam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ln_get_saturn_earth_dist@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_saturn_pol_sdiam>:
push   %rax
call   1030 <ln_get_saturn_earth_dist@plt>
movsd  0xee2(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @ln_get_saturn_pol_sdiam(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 0x4052747AE147AE14, double* %3
%5 = load double, double* %2
%6 = call double @ln_get_saturn_earth_dist(double %5)
store double %6, double* %4
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fdiv double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @ln_get_saturn_pol_sdiam(double %0) {
%2 = tail call double @ln_get_saturn_earth_dist(double %0)
%3 = fdiv double 0x4052747AE147AE14, %2
ret double %3
}
/* Variables and functions */
int max_ii(int /*<<< orphan*/, int);
int /*<<< orphan*/ max_iii(int, int, int);
int max_iiii(int a, int b, int c, int d) { return max_ii(max_iii(a, b, c), d); }


x86 assembly (clang, -O0):
<max_iiii>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <max_iii@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%esi
call   1030 <max_ii@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_iiii>:
push   %rbx
mov    %ecx,%ebx
call   1040 <max_iii@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <max_ii@plt>

LLVM IR (-O0):
define i32 @max_iiii(i32 %0, i32 %1, i32 %2, i32 %3) {
%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
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 @max_iii(i32 %9, i32 %10, i32 %11)
%13 = load i32, i32* %8
%14 = call i32 @max_ii(i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @max_iiii(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @max_iii(i32 %0, i32 %1, i32 %2)
%6 = tail call i32 @max_ii(i32 %5, i32 %3)
ret i32 %6
}
int test_imm_BEuint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xBE << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_BEuint64_highword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 32
%5 = and i64 %4, 190
%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_BEuint64_highword_reg(i64 %0) {
%2 = and i64 %0, 816043786240
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void usage() {
  fatal("usage: lsh [-projfile <str> (REQUIRED)]\n\t[-featfile <str> "
        "(REQUIRED)]\n\t[-sigfile <str> (REQUIRED)]\n\t[-D <n> (defaults to "
        "39)]\n\t[-S <n> (defaults to 32)]\n\t[-normthr <n> (defaults to 0 = "
        "no threshold)]\n\t[-sigma <f> (defaults to 0)]");
}


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

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

LLVM IR (-O0):
@.str = [230 x i8] c"usage: lsh [-projfile <str> (REQUIRED)]\0A\09[-featfile <str> (REQUIRED)]\0A\09[-sigfile <str> (REQUIRED)]\0A\09[-D <n> (defaults to 39)]\0A\09[-S <n> (defaults to 32)]\0A\09[-normthr <n> (defaults to 0 = no threshold)]\0A\09[-sigma <f> (defaults to 0)]\00"
define void @usage() {
%1 = call i32 @fatal(i8* getelementptr inbounds ([230 x i8], [230 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [230 x i8] c"usage: lsh [-projfile <str> (REQUIRED)]\0A\09[-featfile <str> (REQUIRED)]\0A\09[-sigfile <str> (REQUIRED)]\0A\09[-D <n> (defaults to 39)]\0A\09[-S <n> (defaults to 32)]\0A\09[-normthr <n> (defaults to 0 = no threshold)]\0A\09[-sigma <f> (defaults to 0)]\00"
define void @usage() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([230 x i8], [230 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, int);
void rw_malloc_overrun() {
  int *i = (int *)malloc(sizeof(int) * 10);
  i[10] = 13;
  printf("i[-1] = %d \r\n", i[-1]);
  free(i);
}


x86 assembly (clang, -O0):
<rw_malloc_overrun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x28,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0xd,0x28(%rax)
mov    -0x8(%rbp),%rax
mov    -0x4(%rax),%esi
lea    0xea1(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rw_malloc_overrun>:
push   %rbx
mov    $0x28,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movl   $0xd,0x28(%rax)
mov    -0x4(%rax),%esi
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"i[-1] = %d \0D\0A\00"
define void @rw_malloc_overrun() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 40)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = getelementptr inbounds i32, i32* %4, i64 10
store i32 13, i32* %5
%6 = load i32*, i32** %1
%7 = getelementptr inbounds i32, i32* %6, i64 -1
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32*, i32** %1
%11 = call i32 @free(i32* %10)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"i[-1] = %d \0D\0A\00"
define void @rw_malloc_overrun() {
%1 = tail call i64 @malloc(i32 40)
%2 = inttoptr i64 %1 to i32*
%3 = getelementptr inbounds i32, i32* %2, i64 10
store i32 13, i32* %3
%4 = getelementptr inbounds i32, i32* %2, i64 -1
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @free(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
int /*<<< orphan*/ socket_handler_die();
void intHandler(int sig) {
  signal(sig, SIG_IGN);
  printf("\x1b[1m"
         "\x1b[31m"
         "\nReceived Ctrl^C!\n"
         "\x1b[0m");
  socket_handler_die();
  exit(0);
}


x86 assembly (clang, -O0):
<intHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e93(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <socket_handler_die@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<intHandler>:
push   %rax
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
call   1050 <signal@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <socket_handler_die@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@SIG_IGN = global i32 0
@.str = [32 x i8] c"\1B[1m\1B[31m\0AReceived Ctrl^C!\0A\1B[0m\00"
define void @intHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIG_IGN
%5 = call i32 @signal(i32 %3, i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @socket_handler_die()
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@SIG_IGN = global i32 0
@.str = [32 x i8] c"\1B[1m\1B[31m\0AReceived Ctrl^C!\0A\1B[0m\00"
define void @intHandler(i32 %0) {
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %0, i32 %2)
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (...) @socket_handler_die()
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int setresuid(int, int, int);
int seteuid(int uid) { return setresuid(-1, uid, -1); }


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

x86 assembly (clang, -O2):
<seteuid>:
mov    %edi,%esi
mov    $0xffffffff,%edi
mov    $0xffffffff,%edx
jmp    1030 <setresuid@plt>

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

LLVM IR (-O2):
define i32 @seteuid(i32 %0) {
%2 = tail call i32 @setresuid(i32 -1, i32 %0, i32 -1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ GL_DEPTH_TEST;
int /*<<< orphan*/ GL_LESS;
int /*<<< orphan*/ GL_LIGHT0;
int /*<<< orphan*/ GL_LIGHTING;
int /*<<< orphan*/ glDepthFunc(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
void init(void) {
  glEnable(GL_LIGHTING);
  glEnable(GL_LIGHT0);
  glDepthFunc(GL_LESS);
  glEnable(GL_DEPTH_TEST);
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1040 <glDepthFunc@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1030 <glEnable@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1040 <glDepthFunc@plt>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glEnable@plt>

LLVM IR (-O0):
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @init() {
%1 = load i32, i32* @GL_LIGHTING
%2 = call i32 @glEnable(i32 %1)
%3 = load i32, i32* @GL_LIGHT0
%4 = call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_LESS
%6 = call i32 @glDepthFunc(i32 %5)
%7 = load i32, i32* @GL_DEPTH_TEST
%8 = call i32 @glEnable(i32 %7)
ret void
}

LLVM IR (-O2):
@GL_LIGHTING = global i32 0
@GL_LIGHT0 = global i32 0
@GL_LESS = global i32 0
@GL_DEPTH_TEST = global i32 0
define void @init() {
%1 = load i32, i32* @GL_LIGHTING
%2 = tail call i32 @glEnable(i32 %1)
%3 = load i32, i32* @GL_LIGHT0
%4 = tail call i32 @glEnable(i32 %3)
%5 = load i32, i32* @GL_LESS
%6 = tail call i32 @glDepthFunc(i32 %5)
%7 = load i32, i32* @GL_DEPTH_TEST
%8 = tail call i32 @glEnable(i32 %7)
ret void
}
int pathconN_nm8_f0(const double **arg, double **res, int *iw, double *w,
                    int mem) {
  return 0;
}


x86 assembly (clang, -O0):
<pathconN_nm8_f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pathconN_nm8_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @pathconN_nm8_f0(double** nocapture readnone %0, double** nocapture readnone %1, i32* nocapture readnone %2, double* nocapture readnone %3, i32 %4) {
ret i32 0
}
/* Type definitions */
struct ring_buf {
  int dummy;
};

/* Variables and functions */
scalar_t__ ring_buf_space(struct ring_buf *);
int ring_buf_is_full(struct ring_buf *rb) { return ring_buf_space(rb) == 0; }


x86 assembly (clang, -O0):
<ring_buf_is_full>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ring_buf_space@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ring_buf_is_full>:
push   %rax
call   1030 <ring_buf_space@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ring_buf = type { i32 }
define i32 @ring_buf_is_full(%struct.ring_buf* %0) {
%2 = alloca %struct.ring_buf*
store %struct.ring_buf* %0, %struct.ring_buf** %2
%3 = load %struct.ring_buf*, %struct.ring_buf** %2
%4 = call i64 @ring_buf_space(%struct.ring_buf* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.ring_buf = type { i32 }
define i32 @ring_buf_is_full(%struct.ring_buf* %0) {
%2 = tail call i64 @ring_buf_space(%struct.ring_buf* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void end_test() { printf("OK\n"); }


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

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

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

LLVM IR (-O2):
@str = [3 x i8] c"OK\00"
define void @end_test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ islessequal(double, double);
scalar_t__ isnan(double);
double __fmin(double x, double y) {
  return (islessequal(x, y) || isnan(y)) ? x : y;
}


x86 assembly (clang, -O0):
<__fmin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <islessequal@plt>
cmp    $0x0,%rax
jne    115f <__fmin+0x3f>
movsd  -0x10(%rbp),%xmm0
call   1040 <isnan@plt>
cmp    $0x0,%rax
je     116e <__fmin+0x4e>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1178 <__fmin+0x58>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fmin>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1030 <islessequal@plt>
test   %rax,%rax
je     1145 <__fmin+0x25>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret
movsd  0x8(%rsp),%xmm0
call   1040 <isnan@plt>
test   %rax,%rax
je     1161 <__fmin+0x41>
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @__fmin(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i64 @islessequal(double %5, double %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load double, double* %4
%11 = call i64 @isnan(double %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9, %2
%14 = load double, double* %3
br label %17
15: ; preds = %9
%16 = load double, double* %4
br label %17
17: ; preds = %15, %13
%18 = phi double [ %14, %13 ], [ %16, %15 ]
ret double %18
}

LLVM IR (-O2):
define double @__fmin(double %0, double %1) {
%3 = tail call i64 @islessequal(double %0, double %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @isnan(double %1)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, double %1, double %0
br label %9
9: ; preds = %5, %2
%10 = phi double [ %0, %2 ], [ %8, %5 ]
ret double %10
}
double binary(double val) {
  if (val < 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<binary>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1124 <binary+0x24>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1131 <binary+0x31>
movsd  0xed4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<binary>:
xorpd  %xmm1,%xmm1
cmpltsd %xmm1,%xmm0
movsd  0xeef(%rip),%xmm1
andnpd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @binary(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %8
7: ; preds = %1
store double 1.000000e+00, double* %2
br label %8
8: ; preds = %7, %6
%9 = load double, double* %2
ret double %9
}

LLVM IR (-O2):
define double @binary(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, double 0.000000e+00, double 1.000000e+00
ret double %3
}
/* Variables and functions */
void sort(void *array, size_t count, size_t size,
          int (*compare)(const void *, const void *)) {}


x86 assembly (clang, -O0):
<sort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @sort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*)* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32 (i8*, i8*)*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32 (i8*, i8*)* %3, i32 (i8*, i8*)** %8
ret void
}

LLVM IR (-O2):
define void @sort(i8* nocapture %0, i64 %1, i64 %2, i32 (i8*, i8*)* nocapture %3) {
ret void
}
int is_simple_char(unsigned c) { return !(c < 0x14 || c == '"' || c == '\\'); }


x86 assembly (clang, -O0):
<is_simple_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x14,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     112f <is_simple_char+0x2f>
mov    $0x1,%al
cmpl   $0x22,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112f <is_simple_char+0x2f>
cmpl   $0x5c,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_simple_char>:
cmp    $0x14,%edi
setae  %al
cmp    $0x22,%edi
setne  %cl
cmp    $0x5c,%edi
setne  %dl
and    %al,%cl
and    %dl,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_simple_char(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 20
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 34
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 92
br label %11
11: ; preds = %8, %5, %1
%12 = phi i1 [ true, %5 ], [ true, %1 ], [ %10, %8 ]
%13 = xor i1 %12, true
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_simple_char(i32 %0) {
%2 = icmp ugt i32 %0, 19
%3 = icmp ne i32 %0, 34
%4 = icmp ne i32 %0, 92
%5 = and i1 %2, %3
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ sectioning_underscore(char *);
void cm_appendixsubsec(void) { sectioning_underscore("appendixsubsec"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"appendixsubsec\00"
define void @cm_appendixsubsec() {
%1 = call i32 @sectioning_underscore(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"appendixsubsec\00"
define void @cm_appendixsubsec() {
%1 = tail call i32 @sectioning_underscore(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int permutation_after_quaddobl_loop(int d, int *permutation) {
  int *a, fail;
  double *c;
  fail = _ada_use_c2phc4c(672, a, permutation, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<permutation_after_quaddobl_loop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x2a0,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<permutation_after_quaddobl_loop>:
mov    %rsi,%rdx
mov    $0x2a0,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @permutation_after_quaddobl_loop(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %4
%10 = load double*, double** %7
%11 = call i32 @_ada_use_c2phc4c(i32 672, i32* %8, i32* %9, double* %10, i32 0)
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @permutation_after_quaddobl_loop(i32 %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc4c(i32 672, i32* undef, i32* %1, double* undef, i32 0)
ret i32 %3
}
void av_format_set_open_cb() {}


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

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

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

LLVM IR (-O2):
define void @av_format_set_open_cb() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int *);
void up_and_down(int n) {
  printf("Level %d: n location %p\n", n, &n);
  if (n < 4)
    up_and_down(n + 1);
  printf("Level %d: n location %p\n", n, &n);
}


x86 assembly (clang, -O0):
<up_and_down>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
lea    -0x4(%rbp),%rdx
call   1030 <printf@plt>
cmpl   $0x4,-0x4(%rbp)
jge    1153 <up_and_down+0x33>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1040 <up_and_down@plt>
mov    -0x4(%rbp),%esi
lea    0xea3(%rip),%rdi
lea    -0x4(%rbp),%rdx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<up_and_down>:
push   %rax
mov    %edi,%esi
mov    %edi,0x4(%rsp)
lea    0xed2(%rip),%rdi
lea    0x4(%rsp),%rdx
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
cmp    $0x3,%esi
jg     114f <up_and_down+0x2f>
add    $0x1,%esi
mov    %esi,%edi
call   1040 <up_and_down@plt>
mov    0x4(%rsp),%esi
lea    0xeaa(%rip),%rdi
lea    0x4(%rsp),%rdx
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Level %d: n location %p\0A\00"
define void @up_and_down(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3, i32* %2)
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 4
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
br label %10
10: ; preds = %7, %1
%11 = load i32, i32* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %11, i32* %2)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Level %d: n location %p\0A\00"
define void @up_and_down(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0, i32* %2)
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 4
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = add nsw i32 %4, 1
%8 = load i32, i32* %2
br label %9
9: ; preds = %6, %1
%10 = phi i32 [ %8, %6 ], [ %4, %1 ]
%11 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %10, i32* %2)
ret void
}
/* Variables and functions */
int do_send(int, char *, char const *, ...);
int irc_part(int fd, const char *channel, const char *msg) {
  if (msg)
    return do_send(fd, "PART %s :%s", channel, msg);
  return do_send(fd, "PART %s", channel);
}


x86 assembly (clang, -O0):
<irc_part>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114f <irc_part+0x3f>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec0(%rip),%rsi
mov    $0x0,%al
call   1030 <do_send@plt>
mov    %eax,-0x4(%rbp)
jmp    1167 <irc_part+0x57>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xeaf(%rip),%rsi
mov    $0x0,%al
call   1030 <do_send@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_part>:
mov    %rdx,%rcx
mov    %rsi,%rdx
test   %rcx,%rcx
je     1129 <irc_part+0x19>
lea    0xede(%rip),%rsi
xor    %eax,%eax
jmp    1030 <do_send@plt>
lea    0xedc(%rip),%rsi
xor    %eax,%eax
jmp    1030 <do_send@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"PART %s :%s\00"
@.str.1 = [8 x i8] c"PART %s\00"
define i32 @irc_part(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = load i8*, i8** %7
%14 = call i32 (i32, i8*, i8*, ...) @do_send(i32 %11, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
store i32 %14, i32* %4
br label %19
15: ; preds = %3
%16 = load i32, i32* %5
%17 = load i8*, i8** %6
%18 = call i32 (i32, i8*, i8*, ...) @do_send(i32 %16, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %15, %10
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@.str = [12 x i8] c"PART %s :%s\00"
@.str.1 = [8 x i8] c"PART %s\00"
define i32 @irc_part(i32 %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %2, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 (i32, i8*, i8*, ...) @do_send(i32 %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2)
br label %9
7: ; preds = %3
%8 = tail call i32 (i32, i8*, i8*, ...) @do_send(i32 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
int __128bit_ctz(unsigned __int128 x) {
  int a = __builtin_ctzll((unsigned long long)x);
  int b = __builtin_ctzll((unsigned long long)(x >> 64));
  return (unsigned long long)x ? a : (b + 64);
}


x86 assembly (clang, -O0):
<__128bit_ctz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
bsf    -0x20(%rbp),%rax
mov    %eax,-0x24(%rbp)
bsf    -0x18(%rbp),%rax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    $0x0,%rax
je     1145 <__128bit_ctz+0x45>
mov    -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    114e <__128bit_ctz+0x4e>
mov    -0x28(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__128bit_ctz>:
bsf    %rdi,%rcx
bsf    %rsi,%rax
or     $0x40,%eax
test   %rdi,%rdi
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @__128bit_ctz(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i128* %3 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %3
store i128 %10, i128* %4
%11 = load i128, i128* %4
%12 = trunc i128 %11 to i64
%13 = call i64 @llvm.cttz.i64(i64 %12, i1 true)
%14 = trunc i64 %13 to i32
store i32 %14, i32* %5
%15 = load i128, i128* %4
%16 = lshr i128 %15, 64
%17 = trunc i128 %16 to i64
%18 = call i64 @llvm.cttz.i64(i64 %17, i1 true)
%19 = trunc i64 %18 to i32
store i32 %19, i32* %6
%20 = load i128, i128* %4
%21 = trunc i128 %20 to i64
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = load i32, i32* %5
br label %28
25: ; preds = %2
%26 = load i32, i32* %6
%27 = add nsw i32 %26, 64
br label %28
28: ; preds = %25, %23
%29 = phi i32 [ %24, %23 ], [ %27, %25 ]
ret i32 %29
}

LLVM IR (-O2):
define i32 @__128bit_ctz(i64 %0, i64 %1) {
%3 = tail call i64 @llvm.cttz.i64(i64 %0, i1 true)
%4 = trunc i64 %3 to i32
%5 = tail call i64 @llvm.cttz.i64(i64 %1, i1 true)
%6 = trunc i64 %5 to i32
%7 = icmp eq i64 %0, 0
%8 = or i32 %6, 64
%9 = select i1 %7, i32 %8, i32 %4
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void PICO_IDLE(void) { usleep(5000); }


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

x86 assembly (clang, -O2):
<PICO_IDLE>:
mov    $0x1388,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @PICO_IDLE() {
%1 = call i32 @usleep(i32 5000)
ret void
}

LLVM IR (-O2):
define void @PICO_IDLE() {
%1 = tail call i32 @usleep(i32 5000)
ret void
}
int sol_message_digest_init(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @sol_message_digest_init() {
ret i32 0
}

LLVM IR (-O2):
define i32 @sol_message_digest_init() {
ret i32 0
}
void porreferencia(float *b) { (*b) = 7; }


x86 assembly (clang, -O0):
<porreferencia>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<porreferencia>:
movl   $0x40e00000,(%rdi)
ret

LLVM IR (-O0):
define void @porreferencia(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
store float 7.000000e+00, float* %3
ret void
}

LLVM IR (-O2):
define void @porreferencia(float* nocapture writeonly %0) {
store float 7.000000e+00, float* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LedsP__Leds__led0On();
void BlinkNoTimerTaskC__Leds__led0On(void) { LedsP__Leds__led0On(); }


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

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

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

LLVM IR (-O2):
define void @BlinkNoTimerTaskC__Leds__led0On() {
%1 = tail call i32 (...) @LedsP__Leds__led0On()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void debugstr(char value[1000], char name[1000]) {
  printf("%s: %s\n", name, value);
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"%s: %s\0A\00"
define void @debugstr(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: mkdir [-pv] [-m mode] directory_name ...\n");
  exit(EX_USAGE);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [49 x i8] c"usage: mkdir [-pv] [-m mode] directory_name ...\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [49 x i8] c"usage: mkdir [-pv] [-m mode] directory_name ...\0A\00"
@EX_USAGE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
int ExampleInterfaceFunction(int param1, int param2) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ExampleInterfaceFunction(i32 %0, i32 %1) {
ret i32 0
}
long double metres_velocityTime(long double V, long double T) { return V * T; }


x86 assembly (clang, -O0):
<metres_velocityTime>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fmulp  %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<metres_velocityTime>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fmulp  %st,%st(1)
ret

LLVM IR (-O0):
define x86_fp80 @metres_velocityTime(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fmul x86_fp80 %5, %6
ret x86_fp80 %7
}

LLVM IR (-O2):
define x86_fp80 @metres_velocityTime(x86_fp80 %0, x86_fp80 %1) {
%3 = fmul x86_fp80 %0, %1
ret x86_fp80 %3
}
void gc314UpdateChannel(int filedes, int channel) {
  int retval;
  int status = 0;
}


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

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

LLVM IR (-O0):
define void @gc314UpdateChannel(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %6
ret void
}

LLVM IR (-O2):
define void @gc314UpdateChannel(i32 %0, i32 %1) {
ret void
}
int bitAnd(int x, int y) {
  return ~(~x | ~y);
  ;
}


x86 assembly (clang, -O0):
<bitAnd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
mov    -0x8(%rbp),%ecx
xor    $0xffffffff,%ecx
or     %ecx,%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @bitAnd(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 = xor i32 %5, -1
%7 = load i32, i32* %4
%8 = xor i32 %7, -1
%9 = or i32 %6, %8
%10 = xor i32 %9, -1
ret i32 %10
}

LLVM IR (-O2):
define i32 @bitAnd(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
int divisao(int *var) {
  int dividendo, divisor;
  printf("\nDigite o dividendo ");
  scanf("%d", &dividendo);
  printf("\nDigite o divisor ");
  scanf("%d", &divisor);
  var = dividendo % divisor;
  return 0;
}


x86 assembly (clang, -O0):
<divisao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
movslq %edx,%rax
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [21 x i8] c"\0ADigite o dividendo \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"\0ADigite o divisor \00"
define i32 @divisao(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = srem i32 %9, %10
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
store i32* %13, i32** %2
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"\0ADigite o dividendo \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [19 x i8] c"\0ADigite o divisor \00"
define i32 @divisao(i32* nocapture readnone %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
ret i32 0
}
/* Variables and functions */
char const *strappend(char const *, char const *);
const char *strprepend(const char *orig, const char *prepended) {
  return strappend(prepended, orig);
}


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

x86 assembly (clang, -O2):
<strprepend>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strappend@plt>

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

LLVM IR (-O2):
define i8* @strprepend(i8* %0, i8* %1) {
%3 = tail call i8* @strappend(i8* %1, i8* %0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ bob(int, double, char);
int /*<<< orphan*/ printf(char *);
float goodbye() {
  printf("Goodbye World!\n");
  bob(42, 3.14159, 'a');
  return 5;
}


x86 assembly (clang, -O0):
<goodbye>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2a,%edi
movsd  0xecb(%rip),%xmm0
mov    $0x61,%esi
call   1040 <bob@plt>
movss  0xeb1(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<goodbye>:
push   %rax
lea    0xee4(%rip),%rdi
call   1030 <puts@plt>
movsd  0xecb(%rip),%xmm0
mov    $0x2a,%edi
mov    $0x61,%esi
call   1040 <bob@plt>
movss  0xebc(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Goodbye World!\0A\00"
define float @goodbye() {
%1 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @bob(i32 42, double 3.141590e+00, i8 signext 97)
ret float 5.000000e+00
}

LLVM IR (-O2):
@str = [15 x i8] c"Goodbye World!\00"
define float @goodbye() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @bob(i32 42, double 3.141590e+00, i8 signext 97)
ret float 5.000000e+00
}
int mf_fstrnlen(char *s, unsigned lm) {
  int i;
  for (i = lm - 1; i >= 0; i--)
    if (s[i] != ' ' && s[i] != '\0')
      return (i + 1);
  return (0);
}


x86 assembly (clang, -O0):
<mf_fstrnlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1169 <mf_fstrnlen+0x69>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
je     1156 <mf_fstrnlen+0x56>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1156 <mf_fstrnlen+0x56>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <mf_fstrnlen+0x70>
jmp    115b <mf_fstrnlen+0x5b>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    1114 <mf_fstrnlen+0x14>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mf_fstrnlen>:
mov    %esi,%ecx
add    $0xffffffff,%ecx
js     1120 <mf_fstrnlen+0x20>
mov    %esi,%eax
nopl   0x0(%rax)
lea    -0x1(%rax),%ecx
testb  $0xdf,(%rdi,%rcx,1)
jne    1122 <mf_fstrnlen+0x22>
add    $0xfffffffe,%eax
mov    %ecx,%eax
jns    1110 <mf_fstrnlen+0x10>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @mf_fstrnlen(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%7 = load i32, i32* %5
%8 = sub i32 %7, 1
store i32 %8, i32* %6
br label %9
9: ; preds = %32, %2
%10 = load i32, i32* %6
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %35
12: ; preds = %9
%13 = load i8*, i8** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 32
br i1 %19, label %20, label %31
20: ; preds = %12
%21 = load i8*, i8** %4
%22 = load i32, i32* %6
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %31
28: ; preds = %20
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %36
31: ; preds = %20, %12
br label %32
32: ; preds = %31
%33 = load i32, i32* %6
%34 = add nsw i32 %33, -1
store i32 %34, i32* %6
br label %9
35: ; preds = %9
store i32 0, i32* %3
br label %36
36: ; preds = %35, %28
%37 = load i32, i32* %3
ret i32 %37
}

LLVM IR (-O2):
define i32 @mf_fstrnlen(i8* nocapture %0, i32 %1) {
%3 = add i32 %1, -1
%4 = icmp sgt i32 %3, -1
br i1 %4, label %5, label %14
5: ; preds = %2, %11
%6 = phi i32 [ %12, %11 ], [ %3, %2 ]
%7 = phi i32 [ %6, %11 ], [ %1, %2 ]
%8 = zext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
switch i8 %10, label %14 [
i8 32, label %11
i8 0, label %11
]
11: ; preds = %5, %5
%12 = add i32 %6, -1
%13 = icmp sgt i32 %12, -1
br i1 %13, label %5, label %14
14: ; preds = %5, %11, %2
%15 = phi i32 [ 0, %2 ], [ 0, %11 ], [ %7, %5 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) {
  puts("Test requires WCHAR support; skipping");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"Test requires WCHAR support; skipping\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [38 x i8] c"Test requires WCHAR support; skipping\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
char *strcpy(char *dest, const char *src) {
  char *d = dest;
  while ((*(d++) = *(src++)) != '\0')
    ;
  return dest;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ mul(size_t, size_t);
void *xmalloc(int /*<<< orphan*/);
void *xmallocn(size_t count, size_t elemsize) {
  return xmalloc(mul(count, elemsize));
}


x86 assembly (clang, -O0):
<xmallocn>:
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   1040 <mul@plt>
mov    %eax,%edi
call   1030 <xmalloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @xmallocn(i64 %0, i64 %1) {
%3 = tail call i32 @mul(i64 %0, i64 %1)
%4 = tail call i8* @xmalloc(i32 %3)
ret i8* %4
}