xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int *malloc(int);
int main() {
  int *p, *q, *r;
  int havoc;
  p = malloc(sizeof(int));
  q = malloc(sizeof(int));
  *p = 0;
  *q = 0;
  if (havoc) {
    r = q;
  } else {
    r = p;
  }
  *r = *r + 1;
  assert(*r == 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpl   $0x0,-0x24(%rbp)
je     1176 <main+0x56>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    117e <main+0x5e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
cmpl   $0x1,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    $0x1,%edi
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 4)
%2 = tail call i32* @malloc(i32 4)
%3 = tail call i32 @assert(i32 1)
ret i32 0
}
unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) {
  return ~do_csum(iph, ihl * 4, 0);
}


x86 assembly (clang, -O0):
<ip_fast_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x2,%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <do_csum@plt>
xor    $0xffffffff,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_fast_csum>:
push   %rax
shl    $0x2,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <do_csum@plt>
not    %eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @ip_fast_csum(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul i32 %6, 4
%8 = call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, i32, ...)*)(i8* %5, i32 %7, i32 0)
%9 = xor i32 %8, -1
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define zeroext i16 @ip_fast_csum(i8* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32 (i8*, i32, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, i32, ...)*)(i8* %0, i32 %3, i32 0)
%5 = trunc i32 %4 to i16
%6 = xor i16 %5, -1
ret i16 %6
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ system(char *);
int rp_app_init() {
  fprintf(stderr, "Starting HPSDR receiver server.\n");
  system("/opt/redpitaya/www/apps/sdr_receiver_hpsdr/start.sh");
  return 0;
}


x86 assembly (clang, -O0):
<rp_app_init>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xee1(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rp_app_init>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xee4(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Starting HPSDR receiver server.\0A\00"
@.str.1 = [52 x i8] c"/opt/redpitaya/www/apps/sdr_receiver_hpsdr/start.sh\00"
define i32 @rp_app_init() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Starting HPSDR receiver server.\0A\00"
@.str.1 = [52 x i8] c"/opt/redpitaya/www/apps/sdr_receiver_hpsdr/start.sh\00"
define i32 @rp_app_init() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @system(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
void sgen_codec_print_encodings(const char *type) {
  fprintf(stdout, " sample_t");
}


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

x86 assembly (clang, -O2):
<sgen_codec_print_encodings>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
@.str = [10 x i8] c" sample_t\00"
define void @sgen_codec_print_encodings(i8* nocapture readnone %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void sig_handler(int signo) { exit(0); }


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

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

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

LLVM IR (-O2):
define void @sig_handler(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int y_root;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
void set_XCrossingEvent_y_root(void *_p, int _v) {
  ((XCrossingEvent *)_p)->y_root = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XCrossingEvent_y_root>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XCrossingEvent_y_root(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XCrossingEvent_y_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
unsigned int altera_a10_cdr_lookup_vco_speed(unsigned int fvco) {
  if (fvco < 7000000)
    return 3;
  else if (fvco < 12500000)
    return 2;
  else
    return 0;
}


x86 assembly (clang, -O0):
<altera_a10_cdr_lookup_vco_speed>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x6acfc0,-0x8(%rbp)
jae    1120 <altera_a10_cdr_lookup_vco_speed+0x20>
movl   $0x3,-0x4(%rbp)
jmp    1140 <altera_a10_cdr_lookup_vco_speed+0x40>
cmpl   $0xbebc20,-0x8(%rbp)
jae    1139 <altera_a10_cdr_lookup_vco_speed+0x39>
movl   $0x2,-0x4(%rbp)
jmp    1140 <altera_a10_cdr_lookup_vco_speed+0x40>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<altera_a10_cdr_lookup_vco_speed>:
xor    %ecx,%ecx
cmp    $0xbebc20,%edi
setb   %cl
add    %ecx,%ecx
cmp    $0x6acfc0,%edi
mov    $0x3,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @altera_a10_cdr_lookup_vco_speed(i32 %0) {
%2 = icmp ult i32 %0, 7000000
%3 = icmp ult i32 %0, 12500000
%4 = select i1 %3, i32 2, i32 0
%5 = select i1 %2, i32 3, i32 %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer1;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, int);
void function(int a, int b, int c, int offset) {
  char buffer1[5];
  memset(buffer1, 0x90, sizeof(buffer1));
  int *ret;
  ret = buffer1 + 21;
  (*ret) += offset;
}


x86 assembly (clang, -O0):
<function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
lea    -0x15(%rbp),%rdi
mov    $0x90,%esi
mov    $0x5,%edx
call   1030 <memset@plt>
lea    -0x15(%rbp),%rax
add    $0x15,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function>:
push   %rax
lea    0x3(%rsp),%rdi
mov    $0x90,%esi
mov    $0x5,%edx
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @function(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [5 x i8]
%10 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%12 = call i32 @memset(i8* %11, i32 144, i32 5)
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %9, i64 0, i64 0
%14 = getelementptr inbounds i8, i8* %13, i64 21
%15 = bitcast i8* %14 to i32*
store i32* %15, i32** %10
%16 = load i32, i32* %8
%17 = load i32*, i32** %10
%18 = load i32, i32* %17
%19 = add nsw i32 %18, %16
store i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @function(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca [5 x i8]
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i32 144, i32 5)
ret void
}
/* Variables and functions */
unsigned long he3_get_bit(unsigned char *, unsigned long *);
unsigned long he3_get_bits(unsigned char *data, unsigned long *cur_pos,
                           int nb_bit) {
  int i;
  unsigned long res = 0;
  for (i = 0; i < nb_bit; i++) {
    res = (res << 1) | he3_get_bit(data, cur_pos);
  }
  return res;
}


x86 assembly (clang, -O0):
<he3_get_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1173 <he3_get_bits+0x63>
mov    -0x20(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <he3_get_bit@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
or     %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1132 <he3_get_bits+0x22>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<he3_get_bits>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %edx,%edx
jle    1148 <he3_get_bits+0x38>
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
add    %rbx,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <he3_get_bit@plt>
or     %rax,%rbx
add    $0xffffffff,%ebp
jne    1130 <he3_get_bits+0x20>
jmp    114a <he3_get_bits+0x3a>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i64 @he3_get_bits(i8* %0, i64* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i64
store i8* %0, i8** %4
store i64* %1, i64** %5
store i32 %2, i32* %6
store i64 0, i64* %8
store i32 0, i32* %7
br label %9
9: ; preds = %20, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %6
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %23
13: ; preds = %9
%14 = load i64, i64* %8
%15 = shl i64 %14, 1
%16 = load i8*, i8** %4
%17 = load i64*, i64** %5
%18 = call i64 @he3_get_bit(i8* %16, i64* %17)
%19 = or i64 %15, %18
store i64 %19, i64* %8
br label %20
20: ; preds = %13
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
br label %9
23: ; preds = %9
%24 = load i64, i64* %8
ret i64 %24
}

LLVM IR (-O2):
define i64 @he3_get_bits(i8* %0, i64* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %13
5: ; preds = %3, %5
%6 = phi i64 [ %10, %5 ], [ 0, %3 ]
%7 = phi i32 [ %11, %5 ], [ 0, %3 ]
%8 = shl i64 %6, 1
%9 = tail call i64 @he3_get_bit(i8* %0, i64* %1)
%10 = or i64 %9, %8
%11 = add nuw nsw i32 %7, 1
%12 = icmp eq i32 %11, %2
br i1 %12, label %13, label %5
13: ; preds = %5, %3
%14 = phi i64 [ 0, %3 ], [ %10, %5 ]
ret i64 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpnge_pd(int /*<<< orphan*/, int /*<<< orphan*/);
__m128d test_mm_cmpnge_pd(__m128d __a, __m128d __b) {
  return _mm_cmpnge_pd(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpnge_pd>:
jmp    1030 <_mm_cmpnge_pd@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpnge_pd(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpnge_pd(i32 %0, i32 %1)
ret i32 %3
}
void e100_remove(struct pci_dev *pdev) { struct e100_priv_data *data; }


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

x86 assembly (clang, -O2):
ret

LLVM IR (-O0):
%struct.pci_dev = type opaque
%struct.e100_priv_data = type opaque
define void @e100_remove(%struct.pci_dev* %0) {
%2 = alloca %struct.pci_dev*
%3 = alloca %struct.e100_priv_data*
store %struct.pci_dev* %0, %struct.pci_dev** %2
ret void
}

LLVM IR (-O2):
%struct.pci_dev = type opaque
%struct.e100_priv_data = type opaque
define void @e100_remove(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hacky_init();
__attribute__((__constructor__)) void actual_init() { hacky_init(); }


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @actual_init, i8* null }]
define void @actual_init() {
%1 = call i32 (...) @hacky_init()
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @actual_init, i8* null }]
define void @actual_init() {
%1 = tail call i32 (...) @hacky_init()
ret void
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double fabs(double);
double pop(struct lifo *);
double opr_abs(struct lifo *stack) {
  double op = pop(stack);
  return fabs(op);
}


x86 assembly (clang, -O0):
<opr_abs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pop@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movaps 0xeca(%rip),%xmm1
pand   %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opr_abs>:
push   %rax
call   1030 <pop@plt>
andps  0xee3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_abs(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%4 = load %struct.lifo*, %struct.lifo** %2
%5 = call double @pop(%struct.lifo* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @llvm.fabs.f64(double %6)
ret double %7
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_abs(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @llvm.fabs.f64(double %2)
ret double %3
}
int ft_isprint(int c) { return (' ' <= c && c <= '~'); }


x86 assembly (clang, -O0):
<ft_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <ft_isprint+0x24>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 32, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ft_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
void pre_ops(void) {}


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

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

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

LLVM IR (-O2):
define void @pre_ops() {
ret void
}
regx0adr1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((p0[x0]) <= (*((double *)(11111111 & ~(__alignof__(double) - 1)))))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<regx0adr1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    $0xa98ac0,%eax
movsd  (%rax),%xmm0
ucomisd %xmm1,%xmm0
jb     1148 <regx0adr1+0x48>
movl   $0x1,-0x4(%rbp)
jmp    114f <regx0adr1+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adr1>:
movslq %edi,%rcx
movsd  0xa98ac0,%xmm0
xor    %eax,%eax
ucomisd (%rdx,%rcx,8),%xmm0
setae  %al
ret

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

LLVM IR (-O2):
define i32 @regx0adr1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds double, double* %4, i64 %7
%9 = load double, double* %8
%10 = load double, double* inttoptr (i64 11111104 to double*)
%11 = fcmp ole double %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
int test_imm_BEuint8_reg(unsigned char val) {
  return ((val) & (-0xBE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_BEuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffff42,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_BEuint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, -190
%6 = icmp ne i32 %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_BEuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 66
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430Usart1P__Usart__disableTxIntr();
void Msp430UartP__0__Usart__disableTxIntr(void) {
  HplMsp430Usart1P__Usart__disableTxIntr();
}


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

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

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

LLVM IR (-O2):
define void @Msp430UartP__0__Usart__disableTxIntr() {
%1 = tail call i32 (...) @HplMsp430Usart1P__Usart__disableTxIntr()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ R_INTC1_Start();
void enable_latch(void) { R_INTC1_Start(); }


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

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

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

LLVM IR (-O2):
define void @enable_latch() {
%1 = tail call i32 (...) @R_INTC1_Start()
ret void
}
/* Variables and functions */
char *find_rvm_home();
char *find_rvm_path();
char *find_rvm_system();
char *find_rvm(void) {
  char *rvm;
  rvm = find_rvm_path();
  if (rvm)
    return (rvm);
  rvm = find_rvm_home();
  if (rvm)
    return (rvm);
  rvm = find_rvm_system();
  if (rvm)
    return (rvm);
  return NULL;
}


x86 assembly (clang, -O0):
<find_rvm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <find_rvm_path@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115b <find_rvm+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11a9 <find_rvm+0x79>
mov    $0x0,%al
call   1050 <find_rvm_home@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     117e <find_rvm+0x4e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11a9 <find_rvm+0x79>
mov    $0x0,%al
call   1040 <find_rvm_system@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     11a1 <find_rvm+0x71>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    11a9 <find_rvm+0x79>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_rvm>:
push   %rax
xor    %eax,%eax
call   1030 <find_rvm_path@plt>
test   %rax,%rax
jne    1149 <find_rvm+0x19>
xor    %eax,%eax
call   1050 <find_rvm_home@plt>
test   %rax,%rax
je     114b <find_rvm+0x1b>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1040 <find_rvm_system@plt>

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

LLVM IR (-O2):
define i8* @find_rvm() {
%1 = tail call i8* (...) @find_rvm_path()
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i8* (...) @find_rvm_home()
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i8* (...) @find_rvm_system()
br label %8
8: ; preds = %6, %3, %0
%9 = phi i8* [ %1, %0 ], [ %4, %3 ], [ %7, %6 ]
ret i8* %9
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long long get_ustime_sec(void) {
  struct timeval tv;
  long long ust;
  gettimeofday(&tv, NULL);
  ust = ((long long)tv.tv_sec) * 1000000;
  ust += tv.tv_usec;
  return ust / 1000000;
}


x86 assembly (clang, -O0):
<get_ustime_sec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0xf4240,%ecx
cqto
idiv   %rcx
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_ustime_sec>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,0x10(%rsp),%rax
add    0x8(%rsp),%rax
movabs $0x431bde82d7b634db,%rcx
de 1b 43
imul   %rcx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x12,%rdx
add    %rdx,%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i64 @get_ustime_sec() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
store i64 %6, i64* %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = load i64, i64* %2
%10 = add nsw i64 %9, %8
store i64 %10, i64* %2
%11 = load i64, i64* %2
%12 = sdiv i64 %11, 1000000
ret i64 %12
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i64 @get_ustime_sec() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%5 = load i64, i64* %4
%6 = mul nsw i64 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
%10 = sdiv i64 %9, 1000000
ret i64 %10
}
/* Variables and functions */
unsigned int recur_mul(unsigned int, unsigned int);
unsigned int recur_exp(unsigned int a, unsigned int n) {
  return n-- ? recur_mul(a, (recur_exp(a, n))) : 1;
}


x86 assembly (clang, -O0):
<recur_exp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1165 <recur_exp+0x45>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <recur_exp@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <recur_mul@plt>
mov    %eax,-0xc(%rbp)
jmp    1172 <recur_exp+0x52>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1172 <recur_exp+0x52>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recur_exp>:
test   %esi,%esi
je     1139 <recur_exp+0x19>
push   %rbx
mov    %edi,%ebx
add    $0xffffffff,%esi
call   1040 <recur_exp@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <recur_mul@plt>
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @recur_exp(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi i32 [ %9, %6 ], [ 1, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add i32 %1, -1
%8 = tail call i32 @recur_exp(i32 %0, i32 %7)
%9 = tail call i32 @recur_mul(i32 %0, i32 %8)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness3(unsigned a) {
  int max = ((~0U) & ((~0U) >> 1));
  clang_analyzer_eval(a < max);
  clang_analyzer_eval((a + 2) < max);
  clang_analyzer_eval((a + 2U) < max);
}


x86 assembly (clang, -O0):
<mixedSignedness3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x7fffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness3>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %edi,%edi
cmp    $0x7fffffff,%ebx
setb   %dil
call   1030 <clang_analyzer_eval@plt>
add    $0x2,%ebx
xor    %ebp,%ebp
cmp    $0x7fffffff,%ebx
setb   %bpl
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness3(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 2147483647, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp ult i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp ult i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ult i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness3(i32 %0) {
%2 = icmp ult i32 %0, 2147483647
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = add i32 %0, 2
%6 = icmp ult i32 %5, 2147483647
%7 = zext i1 %6 to i32
%8 = tail call i32 @clang_analyzer_eval(i32 %7)
%9 = tail call i32 @clang_analyzer_eval(i32 %7)
ret void
}
/* Variables and functions */
char *local();
int /*<<< orphan*/ printf(char *, void *);
int main(void) {
  char *ponteiro = local();
  printf("%s\n", ponteiro);
  printf("%c\n", ponteiro[0]);
  printf("%p\n", (void *)ponteiro);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <local@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsbq (%rax),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <local@plt>
mov    %rax,%rbx
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
movsbq (%rbx),%rsi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [4 x i8] c"%c\0A\00"
@.str.2 = [4 x i8] c"%p\0A\00"
define i32 @main() {
%1 = tail call i8* (...) @local()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ isdigit(char);
unsigned int declen(char *str) {
  unsigned int sum = 0;
  while (1) {
    char chh = *str;
    if (!isdigit(chh))
      break;
    str++;
    sum++;
  }
  return (sum);
}


x86 assembly (clang, -O0):
<declen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0xd(%rbp)
movsbl -0xd(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    1143 <declen+0x33>
jmp    115d <declen+0x4d>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <declen+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<declen>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0xffffffff,%ebp
nopl   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <isdigit@plt>
add    $0x1,%rbx
add    $0x1,%ebp
test   %eax,%eax
jne    1120 <declen+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @declen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %9, %2 ]
%4 = phi i8* [ %0, %1 ], [ %8, %2 ]
%5 = load i8, i8* %4
%6 = tail call i32 @isdigit(i8 signext %5)
%7 = icmp eq i32 %6, 0
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = add i32 %3, 1
br i1 %7, label %10, label %2
10: ; preds = %2
ret i32 %3
}
isdigit(c) char c;
{
  if (c >= '0' && c <= '9')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <isdigit+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <isdigit+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <isdigit+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
shl    $0x18,%edi
add    $0xd0ffffff,%edi
xor    %eax,%eax
cmp    $0xaffffff,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 48
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 57
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8, %1
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = shl i32 %0, 24
%3 = add i32 %2, -788529153
%4 = icmp ult i32 %3, 184549375
%5 = zext i1 %4 to i32
ret i32 %5
}
void I422ToRGBARow_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @I422ToRGBARow_Any_NEON() {
ret void
}
int return_int_1() { return -1073741824; }


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

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

LLVM IR (-O0):
define i32 @return_int_1() {
ret i32 -1073741824
}

LLVM IR (-O2):
define i32 @return_int_1() {
ret i32 -1073741824
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ open_sockets(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 1) {
    printf("Pass filename of socket file as argument.\n");
    exit(EXIT_FAILURE);
  }
  open_sockets(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jge    1163 <main+0x33>
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <open_sockets@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
test   %edi,%edi
jle    1142 <main+0x12>
mov    0x8(%rsi),%rdi
call   1040 <open_sockets@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xeb7(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [43 x i8] c"Pass filename of socket file as argument.\0A\00"
@EXIT_FAILURE = global i32 0
define i32 @main(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 slt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds i8*, i8** %12, i64 1
%14 = load i8*, i8** %13
%15 = call i32 @open_sockets(i8* %14)
ret i32 0
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [42 x i8] c"Pass filename of socket file as argument.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @open_sockets(i8* %10)
ret i32 0
}
int main() { return 1 / 0; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 poison
}
__attribute__((always_)) void *framePointer() {
  return __builtin_frame_address(0);
}


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

x86 assembly (clang, -O2):
<framePointer>:
push   %rbp
mov    %rsp,%rbp
mov    %rbp,%rax
pop    %rbp
ret

LLVM IR (-O0):
define i8* @framePointer() {
%1 = call i8* @llvm.frameaddress.p0i8(i32 0)
ret i8* %1
}

LLVM IR (-O2):
define i8* @framePointer() {
%1 = tail call i8* @llvm.frameaddress.p0i8(i32 0)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ ft_memset(void *, int /*<<< orphan*/, unsigned long);
void ft_bzero(void *s, unsigned long n) {
  (void)ft_memset(s, 0, n);
  return;
}


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

x86 assembly (clang, -O2):
<ft_bzero>:
mov    %rsi,%rdx
xor    %esi,%esi
jmp    1030 <ft_memset@plt>

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

LLVM IR (-O2):
define void @ft_bzero(i8* %0, i64 %1) {
%3 = tail call i32 @ft_memset(i8* %0, i32 0, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cdecl_func__optind(int /*<<< orphan*/);
int /*<<< orphan*/ optind;
void cdecl_expr__optind() { cdecl_func__optind(optind); }


x86 assembly (clang, -O0):
<cdecl_expr__optind>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <cdecl_func__optind@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdecl_expr__optind>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <cdecl_func__optind@plt>

LLVM IR (-O0):
@optind = global i32 0
define void @cdecl_expr__optind() {
%1 = load i32, i32* @optind
%2 = call i32 @cdecl_func__optind(i32 %1)
ret void
}

LLVM IR (-O2):
@optind = global i32 0
define void @cdecl_expr__optind() {
%1 = load i32, i32* @optind
%2 = tail call i32 @cdecl_func__optind(i32 %1)
ret void
}
unsigned int next_pow_2(unsigned int x) {
  --x;
  x |= x >> 1;
  x |= x >> 2;
  x |= x >> 4;
  x |= x >> 8;
  x |= x >> 16;
  return ++x;
}


x86 assembly (clang, -O0):
<next_pow_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_pow_2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @next_pow_2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = lshr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = lshr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = lshr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add i32 %25, 1
store i32 %26, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @next_pow_2(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = lshr i32 %6, 4
%8 = or i32 %7, %6
%9 = lshr i32 %8, 8
%10 = or i32 %9, %8
%11 = lshr i32 %10, 16
%12 = or i32 %11, %10
%13 = add i32 %12, 1
ret i32 %13
}
/* Variables and functions */
int util_shift_right_saturate_n(int, int, int);
unsigned int _rpack2(unsigned int src1, unsigned int src2) {
  int s1 = (int)src1;
  int s2 = (int)src2;
  s1 = util_shift_right_saturate_n(s1, -1, 32);
  s2 = util_shift_right_saturate_n(s2, -1, 32);
  return (unsigned int)(s1 & 0xffff0000) |
         (unsigned int)((s2 & 0xffff0000) >> 16);
}


x86 assembly (clang, -O0):
<_rpack2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    $0xffffffff,%esi
mov    $0x20,%edx
call   1030 <util_shift_right_saturate_n@plt>
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%edi
mov    $0xffffffff,%esi
mov    $0x20,%edx
call   1030 <util_shift_right_saturate_n@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xffff0000,%eax
mov    -0x10(%rbp),%ecx
and    $0xffff0000,%ecx
shr    $0x10,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_rpack2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    $0xffffffff,%esi
mov    $0x20,%edx
call   1030 <util_shift_right_saturate_n@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0xffffffff,%esi
mov    $0x20,%edx
call   1030 <util_shift_right_saturate_n@plt>
and    $0xffff0000,%ebp
shr    $0x10,%eax
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @_rpack2(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
%7 = load i32, i32* %3
store i32 %7, i32* %5
%8 = load i32, i32* %4
store i32 %8, i32* %6
%9 = load i32, i32* %5
%10 = call i32 @util_shift_right_saturate_n(i32 %9, i32 -1, i32 32)
store i32 %10, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @util_shift_right_saturate_n(i32 %11, i32 -1, i32 32)
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = and i32 %13, -65536
%15 = load i32, i32* %6
%16 = and i32 %15, -65536
%17 = lshr i32 %16, 16
%18 = or i32 %14, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @_rpack2(i32 %0, i32 %1) {
%3 = tail call i32 @util_shift_right_saturate_n(i32 %0, i32 -1, i32 32)
%4 = tail call i32 @util_shift_right_saturate_n(i32 %1, i32 -1, i32 32)
%5 = and i32 %3, -65536
%6 = lshr i32 %4, 16
%7 = or i32 %6, %5
ret i32 %7
}