xunge/DecIR huggingface dataset:
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int type;
};
struct TYPE_4__ {
  TYPE_1__ xkeymap;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xkeymap_type(void *_p, int _v) {
  ((XEvent *)_p)->xkeymap.type = (int)_v;
}


x86 assembly (clang, -O0):
<set_XEvent_xkeymap_type>:
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_XEvent_xkeymap_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xkeymap_type(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_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xkeymap_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ slog_csoup_format(char *, int);
int /*<<< orphan*/ slog_csoup_puts(int /*<<< orphan*/, int, int /*<<< orphan*/);
int do_signal_break(int sig) {
  slog_csoup_puts(0, (8 | 0), slog_csoup_format("Signal %d received\n", sig));
  return sig;
}


x86 assembly (clang, -O0):
<do_signal_break>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1040 <slog_csoup_format@plt>
mov    %eax,%edx
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <slog_csoup_puts@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_signal_break>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1040 <slog_csoup_format@plt>
xor    %edi,%edi
mov    $0x8,%esi
mov    %eax,%edx
call   1030 <slog_csoup_puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"Signal %d received\0A\00"
define i32 @do_signal_break(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @slog_csoup_format(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @slog_csoup_puts(i32 0, i32 8, i32 %4)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
@.str = [20 x i8] c"Signal %d received\0A\00"
define i32 @do_signal_break(i32 returned %0) {
%2 = tail call i32 @slog_csoup_format(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @slog_csoup_puts(i32 0, i32 8, i32 %2)
ret i32 %0
}
/* Variables and functions */
int posix_memalign(void **, size_t, size_t);
void *_aligned_malloc(size_t size, size_t alignment) {
  void *p;
  int ret = posix_memalign(&p, alignment, size);
  return (ret == 0) ? p : NULL;
}


x86 assembly (clang, -O0):
<_aligned_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    -0x18(%rbp),%rdi
call   1030 <posix_memalign@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    114b <_aligned_malloc+0x3b>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    1156 <_aligned_malloc+0x46>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1156 <_aligned_malloc+0x46>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_aligned_malloc>:
push   %rax
mov    %rdi,%rdx
mov    %rsp,%rdi
call   1030 <posix_memalign@plt>
test   %eax,%eax
jne    1126 <_aligned_malloc+0x16>
mov    (%rsp),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @_aligned_malloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @posix_memalign(i8** %3, i64 %1, i64 %0)
%6 = icmp eq i32 %5, 0
%7 = load i8*, i8** %3
%8 = select i1 %6, i8* %7, i8* null
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ pthread_exit(void *);
void thrd_exit(int res) { pthread_exit((void *)(intptr_t)res); }


x86 assembly (clang, -O0):
<thrd_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
call   1030 <pthread_exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thrd_exit>:
movslq %edi,%rdi
jmp    1030 <pthread_exit@plt>

LLVM IR (-O0):
define void @thrd_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = call i32 @pthread_exit(i8* %5)
ret void
}

LLVM IR (-O2):
define void @thrd_exit(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @pthread_exit(i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void X3D_error(char *msg) {
  perror(msg);
  exit(0);
}


x86 assembly (clang, -O0):
<X3D_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @X3D_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @X3D_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int handleMQTTYield(unsigned long);
int tpMQTTYield(unsigned long timeout_ms) {
  return handleMQTTYield(timeout_ms);
}


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

x86 assembly (clang, -O2):
<tpMQTTYield>:
jmp    1030 <handleMQTTYield@plt>

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

LLVM IR (-O2):
define i32 @tpMQTTYield(i64 %0) {
%2 = tail call i32 @handleMQTTYield(i64 %0)
ret i32 %2
}
int getpid(void) { return (1); }


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

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

LLVM IR (-O0):
define i32 @getpid() {
ret i32 1
}

LLVM IR (-O2):
define i32 @getpid() {
ret i32 1
}
unsigned short int rev_s_m(const unsigned char *p) {
  unsigned short a, b;
  a = p[0];
  b = p[1];
  return (a << 8) | (b << 0);
}


x86 assembly (clang, -O0):
<rev_s_m>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%eax
mov    %ax,-0xc(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x8,%eax
movzwl -0xc(%rbp),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_s_m>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @rev_s_m(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i16
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i16
store i16 %8, i16* %3
%9 = load i8*, i8** %2
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i16
store i16 %12, i16* %4
%13 = load i16, i16* %3
%14 = zext i16 %13 to i32
%15 = shl i32 %14, 8
%16 = load i16, i16* %4
%17 = zext i16 %16 to i32
%18 = shl i32 %17, 0
%19 = or i32 %15, %18
%20 = trunc i32 %19 to i16
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @rev_s_m(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = zext i8 %2 to i16
%6 = shl nuw i16 %5, 8
%7 = zext i8 %4 to i16
%8 = or i16 %6, %7
ret i16 %8
}
/* Variables and functions */
double sin(double);
double libm_sin(double x) { return sin(x); }


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

x86 assembly (clang, -O2):
<libm_sin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @libm_sin(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, unsigned int, size_t);
void sdu_received(void *arg, unsigned time_in_ms, void *buffer, size_t size) {
  printf("%s[ms=%04d]: %zd byte packet received\n", (char *)arg,
         time_in_ms % 10000, size);
}


x86 assembly (clang, -O0):
<sdu_received>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
mov    $0x2710,%ecx
xor    %edx,%edx
div    %ecx
mov    -0x20(%rbp),%rcx
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdu_received>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    %edx,%eax
mov    $0xd1b71759,%edi
imul   %rax,%rdi
shr    $0x2d,%rdi
imul   $0x2710,%edi,%eax
sub    %eax,%edx
lea    0xecd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"%s[ms=%04d]: %zd byte packet received\0A\00"
define void @sdu_received(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = urem i32 %10, 10000
%12 = load i64, i64* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %11, i64 %12)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"%s[ms=%04d]: %zd byte packet received\0A\00"
define void @sdu_received(i8* %0, i32 %1, i8* nocapture readnone %2, i64 %3) {
%5 = urem i32 %1, 10000
%6 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %5, i64 %3)
ret void
}
int system_get_memory_status(const int process_id) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @system_get_memory_status(i32 %0) {
ret i32 0
}
/* Variables and functions */
scalar_t__ rb_scan_args_lead_p(char const *);
int rb_scan_args_n_lead(const char *fmt) {
  return (rb_scan_args_lead_p(fmt) ? fmt[0] - '0' : 0);
}


x86 assembly (clang, -O0):
<rb_scan_args_n_lead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rb_scan_args_lead_p@plt>
cmp    $0x0,%rax
je     1141 <rb_scan_args_n_lead+0x31>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <rb_scan_args_n_lead+0x3b>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    114b <rb_scan_args_n_lead+0x3b>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rb_scan_args_n_lead>:
push   %rbx
mov    %rdi,%rbx
call   1030 <rb_scan_args_lead_p@plt>
test   %rax,%rax
je     1126 <rb_scan_args_n_lead+0x16>
movsbl (%rbx),%eax
add    $0xffffffd0,%eax
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rb_scan_args_n_lead(i8* %0) {
%2 = tail call i64 @rb_scan_args_lead_p(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = add nsw i32 %6, -48
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int system(char *);
int not_called() { return system("/bin/date"); }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"/bin/date\00"
define i32 @not_called() {
%1 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [10 x i8] c"/bin/date\00"
define i32 @not_called() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Variables and functions */
char *read_proc_line(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *readpidstatus(int pid) {
  char filename[255 + 1];
  sprintf(filename, "/proc/%d/stat", pid);
  return read_proc_line(filename);
}


x86 assembly (clang, -O0):
<readpidstatus>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <read_proc_line@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readpidstatus>:
push   %rbx
sub    $0x100,%rsp
mov    %edi,%edx
lea    0xecf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <read_proc_line@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/%d/stat\00"
define i8* @readpidstatus(i32 %0) {
%2 = alloca i32
%3 = alloca [256 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i8* @read_proc_line(i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/%d/stat\00"
define i8* @readpidstatus(i32 %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i8* @read_proc_line(i8* %3)
ret i8* %5
}
/* Variables and functions */
int sscanf(char *, char *, char *);
void fld2s(char *field, char *str) {
  if (sscanf(field, "%s", str) < 1) {
    str[0] = '\0';
  }
}


x86 assembly (clang, -O0):
<fld2s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rsi
call   1030 <sscanf@plt>
cmp    $0x1,%eax
jge    1144 <fld2s+0x34>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fld2s>:
push   %rbx
mov    %rsi,%rbx
lea    0xee5(%rip),%rsi
mov    %rbx,%rdx
call   1030 <sscanf@plt>
test   %eax,%eax
jle    1129 <fld2s+0x19>
pop    %rbx
ret
movb   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @fld2s(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = icmp slt i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %2
store i8 0, i8* %1
br label %6
6: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endelse(char *, char *, char *);
int /*<<< orphan*/ printf(char *, char *);
void test1(void) {
  char ord1[] = "datalogi";
  char ord2[] = "biologi";
  char out[10];
  endelse(ord1, ord2, out);
  printf("%s\n", out);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x9(%rbp)
mov    0xecf(%rip),%al
mov    %al,-0x1(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x11(%rbp)
lea    -0x9(%rbp),%rdi
lea    -0x11(%rbp),%rsi
lea    -0x1b(%rbp),%rdx
call   1040 <endelse@plt>
lea    -0x1b(%rbp),%rsi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rbx
sub    $0x30,%rsp
movabs $0x69676f6c61746164,%rax
6f 67 69
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
movabs $0x69676f6c6f6962,%rax
mov    %rax,0x18(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x26(%rsp),%rbx
mov    %rbx,%rdx
call   1040 <endelse@plt>
lea    0xea3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.test1.ord1 = [9 x i8] c"datalogi\00"
@__const.test1.ord2 = [8 x i8] c"biologi\00"
@.str = [4 x i8] c"%s\0A\00"
define void @test1() {
%1 = alloca [9 x i8]
%2 = alloca [8 x i8]
%3 = alloca [10 x i8]
%4 = bitcast [9 x i8]* %1 to i8*
%5 = bitcast [8 x i8]* %2 to i8*
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%9 = call i32 @endelse(i8* %6, i8* %7, i8* %8)
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
ret void
}

LLVM IR (-O2):
@__const.test1.ord1 = [9 x i8] c"datalogi\00"
@.str = [4 x i8] c"%s\0A\00"
define void @test1() {
%1 = alloca [9 x i8]
%2 = alloca i64
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%5 = bitcast i64* %2 to i8*
store i64 29668600812890466, i64* %2
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%7 = call i32 @endelse(i8* %4, i8* %5, i8* %6)
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret void
}
void sdb_init_tds(void) { ; }


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

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

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

LLVM IR (-O2):
define void @sdb_init_tds() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ errno;
int pthread_atfork(void (*prepare)(void), void (*parent)(void),
                   void (*child)(void)) {
  errno = ENOMEM;
  return -1;
}


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

x86 assembly (clang, -O2):
<pthread_atfork>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOMEM = global i32 0
@errno = global i32 0
define i32 @pthread_atfork(void ()* %0, void ()* %1, void ()* %2) {
%4 = alloca void ()*
%5 = alloca void ()*
%6 = alloca void ()*
store void ()* %0, void ()** %4
store void ()* %1, void ()** %5
store void ()* %2, void ()** %6
%7 = load i32, i32* @ENOMEM
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOMEM = global i32 0
@errno = global i32 0
define i32 @pthread_atfork(void ()* nocapture readnone %0, void ()* nocapture readnone %1, void ()* nocapture readnone %2) {
%4 = load i32, i32* @ENOMEM
store i32 %4, i32* @errno
ret i32 -1
}
/* Type definitions */
struct timespec {
  int member_0;
  int member_1;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec const *, int /*<<< orphan*/ *);
void msleep(int msecs) {
  const struct timespec ts = {msecs / 1000, (msecs % 1000) * 1000000L};
  nanosleep(&ts, NULL);
}


x86 assembly (clang, -O0):
<msleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
imul   $0xf4240,%rax,%rax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msleep>:
push   %rax
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @msleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
%5 = load i32, i32* %2
%6 = sdiv i32 %5, 1000
store i32 %6, i32* %4
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
%8 = load i32, i32* %2
%9 = srem i32 %8, 1000
%10 = sext i32 %9 to i64
%11 = mul nsw i64 %10, 1000000
%12 = trunc i64 %11 to i32
store i32 %12, i32* %7
%13 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @msleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
%5 = sdiv i32 %0, 1000
store i32 %5, i32* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
%7 = srem i32 %0, 1000
%8 = mul nsw i32 %7, 1000000
store i32 %8, i32* %6
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_proplist_setf() {
  printf("NOT IMPLEMENTED:"
         "pa_proplist_setf"
         "\n");
}


x86 assembly (clang, -O0):
<pa_proplist_setf>:
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_proplist_setf>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_proplist_setf\00"
define i32 @pa_proplist_setf() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
const char *nats_GetVersion(void) { return "1.5.0"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"1.5.0\00"
define i8* @nats_GetVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.5.0\00"
define i8* @nats_GetVersion() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
int strlen(char *);
void strcat_overflow_2(char *y) {
  char x[4] = "12";
  if (strlen(y) == 2)
    strcat(x, y);
}


x86 assembly (clang, -O0):
<strcat_overflow_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x2,%eax
jne    1154 <strcat_overflow_2+0x34>
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat_overflow_2>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movl   $0x3231,0xc(%rsp)
call   1030 <strlen@plt>
cmp    $0x2,%eax
jne    1147 <strcat_overflow_2+0x27>
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   1040 <strcat@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.strcat_overflow_2.x = [4 x i8] c"12\00\00"
define void @strcat_overflow_2(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = bitcast [4 x i8]* %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%10 = load i8*, i8** %2
%11 = call i32 @strcat(i8* %9, i8* %10)
br label %12
12: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @strcat_overflow_2(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 12849, i32* %2
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp eq i32 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @strcat(i8* %3, i8* %0)
br label %8
8: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ disp_int(int /*<<< orphan*/);
int /*<<< orphan*/ disp_str(char *);
void TestA() {
  int i = 0;
  while (1) {
    disp_str("A");
    disp_int(i++);
    disp_str(".");
    delay(1);
  }
}


x86 assembly (clang, -O0):
<TestA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <disp_str@plt>
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
call   1050 <disp_int@plt>
lea    0xe9d(%rip),%rdi
call   1030 <disp_str@plt>
mov    $0x1,%edi
call   1040 <delay@plt>
jmp    113f <TestA+0xf>

x86 assembly (clang, -O2):
<TestA>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xec0(%rip),%r14
lea    0xebb(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <disp_str@plt>
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1050 <disp_int@plt>
mov    %r15,%rdi
call   1030 <disp_str@plt>
mov    $0x1,%edi
call   1040 <delay@plt>
mov    %ebp,%ebx
jmp    1150 <TestA+0x20>

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c".\00"
define void @TestA() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = call i32 @disp_int(i32 %4)
%7 = call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @delay(i32 1)
br label %2
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c".\00"
define void @TestA() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = add nuw nsw i32 %2, 1
%5 = tail call i32 @disp_int(i32 %2)
%6 = tail call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @delay(i32 1)
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void MinhaProcSoma(int a, int b) {
  int c;
  c = a + b;
  printf("\n a + b = %d \n", c);
}


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

x86 assembly (clang, -O2):
<MinhaProcSoma>:
add    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\0A a + b = %d \0A\00"
define void @MinhaProcSoma(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\0A a + b = %d \0A\00"
define void @MinhaProcSoma(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RunTests();
int main(int argc, char **argv) {
  RunTests();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <RunTests@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <RunTests@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @RunTests()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @RunTests()
ret i32 0
}
void __register_frame_info_bases(void) {}


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

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

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

LLVM IR (-O2):
define void @__register_frame_info_bases() {
ret void
}
void DeleteServerBan(struct ServerBan *kptr) {}


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

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

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

LLVM IR (-O2):
%struct.ServerBan = type opaque
define void @DeleteServerBan(%struct.ServerBan* nocapture %0) {
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
scalar_t__ EXIT_SUCCESS;
scalar_t__ ft_putchar(char);
int ft_putnbr(int);
int ft_putnbrl(int n) {
  int ret;
  ret = ft_putnbr(n);
  ret = ft_putchar('\n') == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  return (ret);
}


x86 assembly (clang, -O0):
<ft_putnbrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <ft_putnbr@plt>
mov    %eax,-0x8(%rbp)
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    0x2e91(%rip),%rcx
cmp    (%rcx),%rax
jne    115b <ft_putnbrl+0x3b>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1167 <ft_putnbrl+0x47>
mov    0x2e7e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnbrl>:
push   %rbx
call   1040 <ft_putnbr@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%rax
je     1147 <ft_putnbrl+0x27>
mov    0x2e9b(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putnbrl(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @ft_putnbr(i32 %4)
store i32 %5, i32* %3
%6 = call i64 @ft_putchar(i8 signext 10)
%7 = load i64, i64* @EXIT_SUCCESS
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load i32, i32* %3
br label %13
11: ; preds = %1
%12 = load i32, i32* @EXIT_FAILURE
br label %13
13: ; preds = %11, %9
%14 = phi i32 [ %10, %9 ], [ %12, %11 ]
store i32 %14, i32* %3
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putnbrl(i32 %0) {
%2 = tail call i32 @ft_putnbr(i32 %0)
%3 = tail call i64 @ft_putchar(i8 signext 10)
%4 = load i64, i64* @EXIT_SUCCESS
%5 = icmp eq i64 %3, %4
%6 = load i32, i32* @EXIT_FAILURE
%7 = select i1 %5, i32 %2, i32 %6
ret i32 %7
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
char *greek(char *s) {
  char *res = malloc(sizeof(char) * 64);
  sprintf(res, "{/Symbol %s}", s);
  return res;
}


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

x86 assembly (clang, -O2):
<greek>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x40,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [13 x i8] c"{/Symbol %s}\00"
define i8* @greek(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @malloc(i32 64)
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i8*, i8** %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [13 x i8] c"{/Symbol %s}\00"
define noalias i8* @greek(i8* %0) {
%2 = tail call dereferenceable_or_null(64) i8* @malloc(i32 64)
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %2
}
void gtk_text_view_get_line_yrange() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_get_line_yrange() {
ret void
}
int test_imm_7Bint8_reg(signed char val) {
  return ((val) & (0x7B << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_7Bint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 123
%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_7Bint8_reg(i8 signext %0) {
%2 = and i8 %0, 123
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
size_t modular_product_size_t_unsafe(size_t, size_t, size_t);
size_t modular_product_size_t(size_t x, size_t y, size_t m) {
  return modular_product_size_t_unsafe(x % m, y % m, m);
}


x86 assembly (clang, -O0):
<modular_product_size_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rdx,%rdi
mov    -0x10(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
mov    %rdx,%rsi
mov    -0x18(%rbp),%rdx
call   1030 <modular_product_size_t_unsafe@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modular_product_size_t>:
mov    %rdx,%rcx
mov    %rdi,%rax
mov    %rdi,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
je     112c <modular_product_size_t+0x1c>
xor    %edx,%edx
div    %rcx
mov    %rdx,%rdi
jmp    1132 <modular_product_size_t+0x22>
xor    %edx,%edx
div    %ecx
mov    %edx,%edi
mov    %rsi,%rax
or     %rcx,%rax
shr    $0x20,%rax
je     1148 <modular_product_size_t+0x38>
mov    %rsi,%rax
xor    %edx,%edx
div    %rcx
jmp    114e <modular_product_size_t+0x3e>
mov    %esi,%eax
xor    %edx,%edx
div    %ecx
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1030 <modular_product_size_t_unsafe@plt>

LLVM IR (-O0):
define i64 @modular_product_size_t(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %6
%9 = urem i64 %7, %8
%10 = load i64, i64* %5
%11 = load i64, i64* %6
%12 = urem i64 %10, %11
%13 = load i64, i64* %6
%14 = call i64 @modular_product_size_t_unsafe(i64 %9, i64 %12, i64 %13)
ret i64 %14
}

LLVM IR (-O2):
define i64 @modular_product_size_t(i64 %0, i64 %1, i64 %2) {
%4 = urem i64 %0, %2
%5 = urem i64 %1, %2
%6 = tail call i64 @modular_product_size_t_unsafe(i64 %4, i64 %5, i64 %2)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ memset(float *, int /*<<< orphan*/, int);
void clear_mtx33(float *m) { memset(m, 0, 9 * sizeof(float)); }


x86 assembly (clang, -O0):
<clear_mtx33>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x24,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_mtx33>:
xor    %esi,%esi
mov    $0x24,%edx
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @clear_mtx33(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = call i32 @memset(float* %3, i32 0, i32 36)
ret void
}

LLVM IR (-O2):
define void @clear_mtx33(float* %0) {
%2 = tail call i32 @memset(float* %0, i32 0, i32 36)
ret void
}
void cracking_stats(void) {}


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

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

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

LLVM IR (-O2):
define void @cracking_stats() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ manual_list_();
void manual_list_aux_() {
  manual_list_();
  return;
}


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

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

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

LLVM IR (-O2):
define void @manual_list_aux_() {
%1 = tail call i32 (...) @manual_list_()
ret void
}
void SPI_1_ScbEnableIntr(void) {}


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

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

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

LLVM IR (-O2):
define void @SPI_1_ScbEnableIntr() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abs(int);
scalar_t__ log10(int /*<<< orphan*/);
int intlen(int x) { return x == 0 ? 1 : (int)(log10(abs(x)) + 1); }


x86 assembly (clang, -O0):
<intlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1142 <intlen+0x22>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1158 <intlen+0x38>
mov    -0x4(%rbp),%edi
call   1030 <abs@plt>
mov    %eax,%edi
call   1040 <log10@plt>
add    $0x1,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intlen>:
test   %edi,%edi
je     112b <intlen+0x1b>
push   %rax
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
mov    %eax,%edi
call   1030 <log10@plt>
add    $0x1,%eax
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @intlen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %12
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @abs(i32 %7)
%9 = call i64 @log10(i32 %8)
%10 = add nsw i64 %9, 1
%11 = trunc i64 %10 to i32
br label %12
12: ; preds = %6, %5
%13 = phi i32 [ 1, %5 ], [ %11, %6 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @intlen(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%5 = tail call i64 @log10(i32 %4)
%6 = trunc i64 %5 to i32
%7 = add i32 %6, 1
br label %8
8: ; preds = %1, %3
%9 = phi i32 [ %7, %3 ], [ 1, %1 ]
ret i32 %9
}
int loaderGetByte(char *src) {
  int i;
  i = (src[0] & 255);
  return i;
}


x86 assembly (clang, -O0):
<loaderGetByte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xff,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<loaderGetByte>:
movzbl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @loaderGetByte(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = and i32 %7, 255
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @loaderGetByte(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
int Operand_br16_decode(unsigned int *valp) {
  *valp = *valp << 4;
  return 0;
}


x86 assembly (clang, -O0):
<Operand_br16_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x4,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_br16_decode>:
shll   $0x4,(%rdi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @Operand_br16_decode(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 4
store i32 %3, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; i++)
    printf("%s\n", argv[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1145 <main+0x35>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
int htonl(int);
int ntohs(int);
uint64_t ntohll(uint64_t x) {
  if (ntohs(1) == 1)
    return x;
  uint32_t lo = (x & 0xFFFFFFFF00000000) >> 32;
  uint32_t hi = x & 0x00000000FFFFFFFF;
  uint64_t nlo = htonl(lo);
  uint64_t nhi = htonl(hi);
  return nhi << 32 | nlo;
}


x86 assembly (clang, -O0):
<ntohll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x1,%edi
call   1040 <ntohs@plt>
cmp    $0x1,%eax
jne    1149 <ntohll+0x29>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1190 <ntohll+0x70>
movslq -0x8(%rbp),%rax
movabs $0xffffffff00000000,%rcx
ff ff ff
and    %rcx,%rax
shr    $0x20,%rax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
or     -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohll>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1040 <ntohs@plt>
cmp    $0x1,%eax
je     1143 <ntohll+0x23>
mov    %ebx,%edi
sar    $0x1f,%edi
call   1030 <htonl@plt>
mov    %ebx,%edi
call   1030 <htonl@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ntohll(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
%8 = call i32 @ntohs(i32 1)
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %3
store i32 %11, i32* %2
br label %28
12: ; preds = %1
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = and i64 %14, -4294967296
%16 = lshr i64 %15, 32
%17 = trunc i64 %16 to i32
store i32 %17, i32* %4
%18 = load i32, i32* %3
%19 = and i32 %18, -1
store i32 %19, i32* %5
%20 = load i32, i32* %4
%21 = call i32 @htonl(i32 %20)
store i32 %21, i32* %6
%22 = load i32, i32* %5
%23 = call i32 @htonl(i32 %22)
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = shl i32 %24, 32
%26 = load i32, i32* %6
%27 = or i32 %25, %26
store i32 %27, i32* %2
br label %28
28: ; preds = %12, %10
%29 = load i32, i32* %2
ret i32 %29
}

LLVM IR (-O2):
define i32 @ntohll(i32 returned %0) {
%2 = tail call i32 @ntohs(i32 1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = ashr i32 %0, 31
%6 = tail call i32 @htonl(i32 %5)
%7 = tail call i32 @htonl(i32 %0)
br label %8
8: ; preds = %1, %4
ret i32 %0
}