xunge/DecIR huggingface dataset:
/* Variables and functions */
void *ft_memset(void *b, int c, size_t len) {
  size_t i;
  char *save;
  i = -1;
  save = b;
  while (++i < len)
    save[i] = c;
  return (b);
}


x86 assembly (clang, -O0):
<ft_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0xffffffffffffffff,-0x20(%rbp)
ff
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
cmp    -0x18(%rbp),%rax
jae    114a <ft_memset+0x4a>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
jmp    111f <ft_memset+0x1f>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memset>:
push   %rbx
mov    %rdi,%rbx
test   %rdx,%rdx
je     1121 <ft_memset+0x11>
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ft_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %3
ret i8* %0
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ member_1;
  int /*<<< orphan*/ member_0;
};
typedef int /*<<< orphan*/ result;

/* Variables and functions */
int /*<<< orphan*/ sysctl(int *, int, struct timeval *, size_t *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/);
struct timeval timevalFromSysctl(int mib0, int mib1) {
  struct timeval result = {0, 0};
  int mib[2];
  mib[0] = mib0;
  mib[1] = mib1;
  size_t length = sizeof(result);
  sysctl(mib, 2, &result, &length, NULL, 0);
  return result;
}


x86 assembly (clang, -O0):
<timevalFromSysctl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movq   $0x8,-0x20(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x2,%esi
lea    -0x8(%rbp),%rdx
lea    -0x20(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
xor    %r9d,%r9d
call   1040 <sysctl@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timevalFromSysctl>:
sub    $0x18,%rsp
movq   $0x0,(%rsp)
mov    %edi,0x8(%rsp)
mov    %esi,0xc(%rsp)
movq   $0x8,0x10(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rdx
lea    0x10(%rsp),%rcx
mov    $0x2,%esi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <sysctl@plt>
mov    (%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @timevalFromSysctl(i32 %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = alloca i32
%5 = alloca i32
%6 = alloca [2 x i32]
%7 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
%8 = bitcast %struct.timeval* %3 to i8*
%9 = load i32, i32* %4
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 %11, i32* %12
store i64 8, i64* %7
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%14 = call i32 @sysctl(i32* %13, i32 2, %struct.timeval* %3, i64* %7, i32* null, i32 0)
%15 = bitcast %struct.timeval* %3 to i64*
%16 = load i64, i64* %15
ret i64 %16
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @timevalFromSysctl(i32 %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to %struct.timeval*
%5 = alloca [2 x i32]
%6 = alloca i64
store i64 0, i64* %3
%7 = bitcast [2 x i32]* %5 to i8*
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %0, i32* %8
%9 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %1, i32* %9
%10 = bitcast i64* %6 to i8*
store i64 8, i64* %6
%11 = call i32 @sysctl(i32* %8, i32 2, %struct.timeval* %4, i64* %6, i32* null, i32 0)
%12 = load i64, i64* %3
ret i64 %12
}
/* Variables and functions */
double exp(double);
double fn1(double x) { return exp(x); }


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

x86 assembly (clang, -O2):
<fn1>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define double @fn1(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ _unsupported();
void _Unwind_SetGR() { _unsupported(); }


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

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

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

LLVM IR (-O2):
define void @_Unwind_SetGR() {
%1 = tail call i32 (...) @_unsupported()
ret void
}
int nesf2(float a, float b) { return a != b; }


x86 assembly (clang, -O0):
<nesf2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nesf2>:
cmpneqss %xmm1,%xmm0
movd   %xmm0,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @nesf2(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp une float %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @nesf2(float %0, float %1) {
%3 = fcmp une float %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_sample_clamp() {
  printf("NOT IMPLEMENTED:"
         "pa_sample_clamp"
         "\n");
}


x86 assembly (clang, -O0):
<pa_sample_clamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [33 x i8] c"NOT IMPLEMENTED:pa_sample_clamp\0A\00"
define i32 @pa_sample_clamp() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [32 x i8] c"NOT IMPLEMENTED:pa_sample_clamp\00"
define i32 @pa_sample_clamp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
struct ft_list_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ft_list_node *);
void ft_list_node_del(struct ft_list_node *this) { free(this); }


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

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

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

LLVM IR (-O2):
%struct.ft_list_node = type { i32 }
define void @ft_list_node_del(%struct.ft_list_node* nocapture %0) {
%2 = tail call i32 @free(%struct.ft_list_node* %0)
ret void
}
void ARGB4444ToYRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGB4444ToYRow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void shutdown() { printf("Shutting down factory lines.\n"); }


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

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

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

LLVM IR (-O2):
@str = [29 x i8] c"Shutting down factory lines.\00"
define void @shutdown() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret void
}
void c_irafinit(int argc, char **argv) { ; }


x86 assembly (clang, -O0):
<c_irafinit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @c_irafinit(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void wait_for_child(int sig) {
  while (waitpid(-1, NULL, WNOHANG) > 0)
    ;
}


x86 assembly (clang, -O0):
<wait_for_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    1141 <wait_for_child+0x31>
jmp    111b <wait_for_child+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_child>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <wait_for_child+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @wait_for_child(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @wait_for_child(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chkmemerr(unsigned char *);
unsigned char *strdup(unsigned char *);
unsigned char *memgets(unsigned char *buf) {
  unsigned char *pt;
  pt = strdup(buf);
  chkmemerr(pt);
  return (pt);
}


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

x86 assembly (clang, -O2):
<memgets>:
push   %rbx
call   1040 <strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <chkmemerr@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @memgets(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strdup(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @chkmemerr(i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @memgets(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = tail call i32 @chkmemerr(i8* %2)
ret i8* %2
}
/* Variables and functions */
unsigned int const CHAR_BIT;
void set_bit(unsigned char *const p, const unsigned int i) {
  const unsigned int byte = i / CHAR_BIT;
  const unsigned bit = i % CHAR_BIT;
  p[byte] |= 1u << bit;
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2ecb(%rip),%rcx
xor    %edx,%edx
divl   (%rcx)
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2eba(%rip),%rcx
xor    %edx,%edx
divl   (%rcx)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%esi
shl    %cl,%esi
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movzbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@CHAR_BIT = constant i32 0
define void @set_bit(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* @CHAR_BIT
%9 = udiv i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* @CHAR_BIT
%12 = urem i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = shl i32 1, %13
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = zext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %20, %14
%22 = trunc i32 %21 to i8
store i8 %22, i8* %18
ret void
}

LLVM IR (-O2):
int test_0(int a, int b, int c) { return c + (a != b); }


x86 assembly (clang, -O0):
<test_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
cmp    -0x8(%rbp),%ecx
setne  %cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_0>:
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @test_0(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = icmp ne i32 %8, %9
%11 = zext i1 %10 to i32
%12 = add nsw i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_0(i32 %0, i32 %1, i32 %2) {
%4 = icmp ne i32 %0, %1
%5 = zext i1 %4 to i32
%6 = add nsw i32 %5, %2
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_unpacklo_epi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i test_mm_unpacklo_epi16(__m128i A, __m128i B) {
  return _mm_unpacklo_epi16(A, B);
}


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

x86 assembly (clang, -O2):
<test_mm_unpacklo_epi16>:
jmp    1030 <_mm_unpacklo_epi16@plt>

LLVM IR (-O0):
define i32 @test_mm_unpacklo_epi16(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 @_mm_unpacklo_epi16(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_unpacklo_epi16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_unpacklo_epi16(i32 %0, i32 %1)
ret i32 %3
}
void Timer1A_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<Timer1A_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Timer1A_Handler+0x9>
jmp    1109 <Timer1A_Handler+0x9>

x86 assembly (clang, -O2):
<Timer1A_Handler>:
jmp    1100 <Timer1A_Handler>

LLVM IR (-O0):
define void @Timer1A_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Timer1A_Handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
int fb_SGNi(int x) {
  if (x == 0)
    return 0;
  else if (x > 0)
    return 1;
  else
    return -1;
}


x86 assembly (clang, -O0):
<fb_SGNi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <fb_SGNi+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113a <fb_SGNi+0x3a>
cmpl   $0x0,-0x8(%rbp)
jle    1133 <fb_SGNi+0x33>
movl   $0x1,-0x4(%rbp)
jmp    113a <fb_SGNi+0x3a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_SGNi>:
xor    %eax,%eax
test   %edi,%edi
setg   %al
lea    -0x1(%rax,%rax,1),%eax
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @fb_SGNi(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = icmp slt i32 %0, 1
%4 = select i1 %3, i32 -1, i32 1
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
void INI_Seqstr_ffnc_ctx() {}


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

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

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

LLVM IR (-O2):
define void @INI_Seqstr_ffnc_ctx() {
ret void
}
/* Variables and functions */
unsigned short multosSendAPDU(int, int, int /*<<< orphan*/, int /*<<< orphan*/,
                              int /*<<< orphan*/, int /*<<< orphan*/,
                              unsigned char *, int /*<<< orphan*/,
                              int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int multosReset(void) {
  unsigned char La;
  unsigned short sw;
  sw = multosSendAPDU(0xBE, 0xFF, 0, 0, 0, 0, &La, 0, NULL, 0, 20000);
  if (sw == 0x9000)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<multosReset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    $0xbe,%edi
mov    $0xff,%esi
xor    %r9d,%r9d
lea    -0x5(%rbp),%rax
xor    %ecx,%ecx
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
mov    %rax,(%rsp)
movl   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
movl   $0x0,0x18(%rsp)
movl   $0x4e20,0x20(%rsp)
call   1030 <multosSendAPDU@plt>
mov    %ax,-0x8(%rbp)
movzwl -0x8(%rbp),%eax
cmp    $0x9000,%eax
jne    117d <multosReset+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    1184 <multosReset+0x74>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multosReset>:
push   %rax
sub    $0x8,%rsp
lea    0xf(%rsp),%rax
mov    $0xbe,%edi
mov    $0xff,%esi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x4e20
push   $0x0
push   $0x0
push   $0x0
push   %rax
call   1030 <multosSendAPDU@plt>
add    $0x30,%rsp
movzwl %ax,%ecx
xor    %eax,%eax
cmp    $0x9000,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @multosReset() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i16
%4 = call zeroext i16 @multosSendAPDU(i32 190, i32 255, i32 0, i32 0, i32 0, i32 0, i8* %2, i32 0, i32* null, i32 0, i32 20000)
store i16 %4, i16* %3
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = icmp eq i32 %6, 36864
br i1 %7, label %8, label %9
8: ; preds = %0
store i32 1, i32* %1
br label %10
9: ; preds = %0
store i32 0, i32* %1
br label %10
10: ; preds = %9, %8
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
define i32 @multosReset() {
%1 = alloca i8
%2 = call zeroext i16 @multosSendAPDU(i32 190, i32 255, i32 0, i32 0, i32 0, i32 0, i8* %1, i32 0, i32* null, i32 0, i32 20000)
%3 = icmp eq i16 %2, -28672
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_version() { printf("daust 0.1\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"daust 0.1\00"
define void @print_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
int palindrome(unsigned int added) {
  unsigned int reverse = 0, temp = added;
  while (temp != 0) {
    reverse *= 10;
    reverse += temp % 10;
    temp /= 10;
  }
  return added == reverse ? 1 : 0;
}


x86 assembly (clang, -O0):
<palindrome>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114b <palindrome+0x4b>
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
add    -0x8(%rbp),%edx
mov    %edx,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0xc(%rbp)
jmp    1114 <palindrome+0x14>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<palindrome>:
xor    %edx,%edx
test   %edi,%edi
je     1133 <palindrome+0x33>
mov    $0xcccccccd,%r8d
mov    %edi,%ecx
xchg   %ax,%ax
lea    (%rdx,%rdx,4),%r9d
mov    %ecx,%esi
imul   %r8,%rsi
shr    $0x23,%rsi
lea    (%rsi,%rsi,1),%eax
lea    (%rax,%rax,4),%eax
mov    %ecx,%edx
sub    %eax,%edx
lea    (%rdx,%r9,2),%edx
cmp    $0x9,%ecx
mov    %esi,%ecx
ja     1110 <palindrome+0x10>
xor    %eax,%eax
cmp    %edi,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @palindrome(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%5 = load i32, i32* %2
store i32 %5, i32* %4
br label %6
6: ; preds = %9, %1
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %6
%10 = load i32, i32* %3
%11 = mul i32 %10, 10
store i32 %11, i32* %3
%12 = load i32, i32* %4
%13 = urem i32 %12, 10
%14 = load i32, i32* %3
%15 = add i32 %14, %13
store i32 %15, i32* %3
%16 = load i32, i32* %4
%17 = udiv i32 %16, 10
store i32 %17, i32* %4
br label %6
18: ; preds = %6
%19 = load i32, i32* %2
%20 = load i32, i32* %3
%21 = icmp eq i32 %19, %20
%22 = zext i1 %21 to i64
%23 = select i1 %21, i32 1, i32 0
ret i32 %23
}

LLVM IR (-O2):
define i32 @palindrome(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ %0, %1 ]
%5 = phi i32 [ %8, %3 ], [ 0, %1 ]
%6 = mul i32 %5, 10
%7 = urem i32 %4, 10
%8 = add i32 %7, %6
%9 = udiv i32 %4, 10
%10 = icmp ult i32 %4, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
%13 = icmp eq i32 %12, %0
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ die(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
void *malloc(size_t);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void *xmalloc(size_t size) {
  void *r = malloc(size);
  if (!r)
    die(1, "cannot allocate memory: %s\n", strerror(errno));
  return r;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1175 <xmalloc+0x45>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xe90(%rip),%rsi
call   1040 <die@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115f <xmalloc+0x2f>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xead(%rip),%rsi
mov    $0x1,%edi
mov    %eax,%edx
call   1040 <die@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"cannot allocate memory: %s\0A\00"
@errno = global i32 0
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i32, i32* @errno
%10 = call i32 @strerror(i32 %9)
%11 = call i32 @die(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %8, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [28 x i8] c"cannot allocate memory: %s\0A\00"
@errno = global i32 0
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i32 @strerror(i32 %5)
%7 = tail call i32 @die(i32 1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %6)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void funcao(char cidadeXY[][150], int coordenadasX[], int coordenadasY[]) {
  for (int i = 0; i < 30; i++)
    printf("%s\n", cidadeXY[i]);
}


x86 assembly (clang, -O0):
<funcao>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x1e,-0x1c(%rbp)
jge    1161 <funcao+0x51>
mov    -0x8(%rbp),%rsi
movslq -0x1c(%rbp),%rax
imul   $0x96,%rax,%rax
add    %rax,%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112b <funcao+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcao>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%r15,%rbx,1),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x96,%rbx
cmp    $0x1194,%rbx
jne    1130 <funcao+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define void @funcao([150 x i8]* %0, i32* %1, i32* %2) {
%4 = alloca [150 x i8]*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store [150 x i8]* %0, [150 x i8]** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
store i32 0, i32* %7
br label %8
8: ; preds = %18, %3
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 30
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load [150 x i8]*, [150 x i8]** %4
%13 = load i32, i32* %7
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [150 x i8], [150 x i8]* %12, i64 %14
%16 = getelementptr inbounds [150 x i8], [150 x i8]* %15, i64 0, i64 0
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %11
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
br label %8
21: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @funcao([150 x i8]* %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
br label %5
4: ; preds = %5
ret void
5: ; preds = %3, %5
%6 = phi i64 [ 0, %3 ], [ %9, %5 ]
%7 = getelementptr inbounds [150 x i8], [150 x i8]* %0, i64 %6, i64 0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = add nuw nsw i64 %6, 1
%10 = icmp eq i64 %9, 30
br i1 %10, label %4, label %5
}
/* Variables and functions */
char getchar();
void getcmd(char *cmd) {
  while ((*cmd++ = getchar()) != '\n')
    ;
  cmd--;
  *cmd = '\0';
}


x86 assembly (clang, -O0):
<getcmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0xa,%eax
je     1145 <getcmd+0x35>
jmp    111c <getcmd+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcmd>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1030 <getchar@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1120 <getcmd+0x10>
movb   $0x0,-0x1(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @getcmd(i8* nocapture writeonly %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %5, %2 ]
%4 = tail call signext i8 (...) @getchar()
%5 = getelementptr inbounds i8, i8* %3, i64 1
store i8 %4, i8* %3
%6 = icmp eq i8 %4, 10
br i1 %6, label %7, label %2
7: ; preds = %2
store i8 0, i8* %3
ret void
}
void CRL_DIST_POINTS_free(void) {}


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

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

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

LLVM IR (-O2):
define void @CRL_DIST_POINTS_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ string(char *);
void oid_1016(void) { string("FSN"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"FSN\00"
define void @oid_1016() {
%1 = tail call i32 @string(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int a[5] = {1, 2, 3, 4, 5};
  int *ptr = (int *)(&a + 1);
  printf("%d, %d\n", *(a + 1), *(ptr - 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rax
add    $0x14,%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x28(%rbp),%rax
mov    -0x4(%rax),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"%d, %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 2, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dsfmt_gv_fill_array_close1_open2(double *, int);
void s_fill_array_close1_open2(double array[], int size) {
  dsfmt_gv_fill_array_close1_open2(array, size);
}


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

x86 assembly (clang, -O2):
<s_fill_array_close1_open2>:
jmp    1030 <dsfmt_gv_fill_array_close1_open2@plt>

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

LLVM IR (-O2):
define void @s_fill_array_close1_open2(double* %0, i32 %1) {
%3 = tail call i32 @dsfmt_gv_fill_array_close1_open2(double* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main() {
  int i;
  for (i = 0; i < 10000; i++) {
    write(1, "hello\n", 6);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2710,-0x8(%rbp)
jge    1157 <main+0x47>
mov    $0x1,%edi
lea    0xec1(%rip),%rsi
mov    $0x6,%edx
call   1030 <write@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x2710,%ebp
lea    0xee1(%rip),%rbx
nop
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x6,%edx
call   1030 <write@plt>
add    $0xffffffff,%ebp
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"hello\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 10000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DymosimMessage(char const *);
int /*<<< orphan*/ aprintLine(int, char const *);
void DymosimMessageSeverity(int severity, const char *message) {
  if (severity == 0) {
    DymosimMessage(message);
  } else {
    aprintLine(severity, message);
  }
}


x86 assembly (clang, -O0):
<DymosimMessageSeverity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1147 <DymosimMessageSeverity+0x27>
mov    -0x10(%rbp),%rdi
call   1030 <DymosimMessage@plt>
jmp    1153 <DymosimMessageSeverity+0x33>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <aprintLine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DymosimMessageSeverity>:
test   %edi,%edi
je     1129 <DymosimMessageSeverity+0x9>
jmp    1040 <aprintLine@plt>
mov    %rsi,%rdi
jmp    1030 <DymosimMessage@plt>

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

LLVM IR (-O2):
define void @DymosimMessageSeverity(i32 %0, i8* %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @DymosimMessage(i8* %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @aprintLine(i32 %0, i8* %1)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int n1 = 0;
  scanf("%d", &n1);
  if (n1 % 2 == 0) {
    printf("1");
  } else {
    printf("0");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    116b <main+0x4b>
lea    0xea2(%rip),%rdi
call   1030 <printf@plt>
jmp    1177 <main+0x57>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xed0(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
and    $0x1,%edi
xor    $0x31,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = and i32 %4, 1
%6 = xor i32 %5, 49
%7 = call i32 @putchar(i32 %6)
ret i32 0
}
int pp1(int bar) { return bar; }


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

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

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

LLVM IR (-O2):
define i32 @pp1(i32 returned %0) {
ret i32 %0
}
int iabs(int val) { return val > 0 ? val : -val; }


x86 assembly (clang, -O0):
<iabs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    111c <iabs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <iabs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iabs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

LLVM IR (-O0):
define i32 @iabs(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %10
7: ; preds = %1
%8 = load i32, i32* %2
%9 = sub nsw i32 0, %8
br label %10
10: ; preds = %7, %5
%11 = phi i32 [ %6, %5 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @iabs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ glWindowPos4f(double, double, int /*<<< orphan*/, int);
void glWindowPos2d(double x, double y) { glWindowPos4f(x, y, 0, 1); }


x86 assembly (clang, -O0):
<glWindowPos2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <glWindowPos4f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glWindowPos2d>:
xor    %edi,%edi
mov    $0x1,%esi
jmp    1030 <glWindowPos4f@plt>

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

LLVM IR (-O2):
define void @glWindowPos2d(double %0, double %1) {
%3 = tail call i32 @glWindowPos4f(double %0, double %1, i32 0, i32 1)
ret void
}
int test_imm_80uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x80 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_80uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 128
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ box_boolean(int);
int /*<<< orphan*/ dpop();
double untag_float_fast(int /*<<< orphan*/);
void primitive_float_greatereq(void) {
  double y = untag_float_fast(dpop());
  double x = untag_float_fast(dpop());
  ;
  box_boolean(x >= y);
}


x86 assembly (clang, -O0):
<primitive_float_greatereq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <box_boolean@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_float_greatereq>:
push   %rax
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <dpop@plt>
mov    %eax,%edi
call   1050 <untag_float_fast@plt>
xor    %edi,%edi
ucomisd (%rsp),%xmm0
setae  %dil
pop    %rax
jmp    1040 <box_boolean@plt>

LLVM IR (-O0):
define void @primitive_float_greatereq() {
%1 = alloca double
%2 = alloca double
%3 = call i32 (...) @dpop()
%4 = call double @untag_float_fast(i32 %3)
store double %4, double* %1
%5 = call i32 (...) @dpop()
%6 = call double @untag_float_fast(i32 %5)
store double %6, double* %2
%7 = load double, double* %2
%8 = load double, double* %1
%9 = fcmp oge double %7, %8
%10 = zext i1 %9 to i32
%11 = call i32 @box_boolean(i32 %10)
ret void
}

LLVM IR (-O2):
define void @primitive_float_greatereq() {
%1 = tail call i32 (...) @dpop()
%2 = tail call double @untag_float_fast(i32 %1)
%3 = tail call i32 (...) @dpop()
%4 = tail call double @untag_float_fast(i32 %3)
%5 = fcmp oge double %4, %2
%6 = zext i1 %5 to i32
%7 = tail call i32 @box_boolean(i32 %6)
ret void
}
int priority(char c) {
  int ret;
  if ('+' == c || '-' == c)
    ret = 1;
  else if ('*' == c || '/' == c)
    ret = 2;
  return ret;
}


x86 assembly (clang, -O0):
<priority>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x2b,%eax
cmp    %ecx,%eax
je     112c <priority+0x2c>
movsbl -0x1(%rbp),%ecx
mov    $0x2d,%eax
cmp    %ecx,%eax
jne    1138 <priority+0x38>
movl   $0x1,-0x8(%rbp)
jmp    1166 <priority+0x66>
movsbl -0x1(%rbp),%ecx
mov    $0x2a,%eax
cmp    %ecx,%eax
je     115a <priority+0x5a>
movsbl -0x1(%rbp),%ecx
mov    $0x2f,%eax
cmp    %ecx,%eax
jne    1161 <priority+0x61>
movl   $0x2,-0x8(%rbp)
jmp    1166 <priority+0x66>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<priority>:
add    $0xd5,%dil
and    $0xfd,%dil
cmp    $0x1,%dil
mov    $0x2,%eax
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @priority(i8 signext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp eq i32 43, %5
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i8, i8* %2
%9 = sext i8 %8 to i32
%10 = icmp eq i32 45, %9
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %3
br label %22
12: ; preds = %7
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = icmp eq i32 42, %14
br i1 %15, label %20, label %16
16: ; preds = %12
%17 = load i8, i8* %2
%18 = sext i8 %17 to i32
%19 = icmp eq i32 47, %18
br i1 %19, label %20, label %21
20: ; preds = %16, %12
store i32 2, i32* %3
br label %21
21: ; preds = %20, %16
br label %22
22: ; preds = %21, %11
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @priority(i8 signext %0) {
%2 = icmp eq i8 %0, 45
%3 = icmp eq i8 %0, 43
%4 = or i1 %2, %3
%5 = select i1 %4, i32 1, i32 2
ret i32 %5
}
/* Variables and functions */
int getsubparam_delim(char *, int, char *, int, char);
int getsubparam(char *parameter, int n, char *subparam, int size_subparam) {
  return getsubparam_delim(parameter, n, subparam, size_subparam, ',');
}


x86 assembly (clang, -O0):
<getsubparam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    $0x2c,%r8d
call   1030 <getsubparam_delim@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getsubparam>:
mov    $0x2c,%r8d
jmp    1030 <getsubparam_delim@plt>

LLVM IR (-O0):
define i32 @getsubparam(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @getsubparam_delim(i8* %9, i32 %10, i8* %11, i32 %12, i8 signext 44)
ret i32 %13
}

LLVM IR (-O2):
define i32 @getsubparam(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @getsubparam_delim(i8* %0, i32 %1, i8* %2, i32 %3, i8 signext 44)
ret i32 %5
}