xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int main(int argc, char *argv[]) {
  printf("%c\n", "Hello"[2]);
  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)
lea    0xed3(%rip),%rdi
movsbl 0xed2(%rip),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 108)
ret i32 0
}
/* Variables and functions */
int ___get_netmask(int);
int ___ip_switch(int);
int zget_broadcast(int ip, int masklen) {
  int nip = ___ip_switch(ip);
  int mask = ___get_netmask(masklen);
  return ___ip_switch(nip | (~mask));
}


x86 assembly (clang, -O0):
<zget_broadcast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <___ip_switch@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <___get_netmask@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
or     %eax,%edi
call   1030 <___ip_switch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zget_broadcast>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
call   1030 <___ip_switch@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1040 <___get_netmask@plt>
not    %eax
or     %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <___ip_switch@plt>

LLVM IR (-O0):
define i32 @zget_broadcast(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
%8 = call i32 @___ip_switch(i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @___get_netmask(i32 %9)
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = xor i32 %12, -1
%14 = or i32 %11, %13
%15 = call i32 @___ip_switch(i32 %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @zget_broadcast(i32 %0, i32 %1) {
%3 = tail call i32 @___ip_switch(i32 %0)
%4 = tail call i32 @___get_netmask(i32 %1)
%5 = xor i32 %4, -1
%6 = or i32 %3, %5
%7 = tail call i32 @___ip_switch(i32 %6)
ret i32 %7
}
/* Type definitions */
struct cec_msg {
  int len;
  int /*<<< orphan*/ *msg;
};

/* Variables and functions */
int /*<<< orphan*/ CEC_MSG_USER_CONTROL_RELEASED;
void cec_msg_user_control_released(struct cec_msg *msg) {
  msg->len = 2;
  msg->msg[1] = CEC_MSG_USER_CONTROL_RELEASED;
}


x86 assembly (clang, -O0):
<cec_msg_user_control_released>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
mov    0x2ebf(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cec_msg_user_control_released>:
movl   $0x2,(%rdi)
mov    0x2ecb(%rip),%rax
mov    (%rax),%eax
mov    0x8(%rdi),%rcx
mov    %eax,0x4(%rcx)
ret

LLVM IR (-O0):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_USER_CONTROL_RELEASED = global i32 0
define void @cec_msg_user_control_released(%struct.cec_msg* %0) {
%2 = alloca %struct.cec_msg*
store %struct.cec_msg* %0, %struct.cec_msg** %2
%3 = load %struct.cec_msg*, %struct.cec_msg** %2
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %3, i32 0, i32 0
store i32 2, i32* %4
%5 = load i32, i32* @CEC_MSG_USER_CONTROL_RELEASED
%6 = load %struct.cec_msg*, %struct.cec_msg** %2
%7 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %6, i32 0, i32 1
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 1
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
%struct.cec_msg = type { i32, i32* }
@CEC_MSG_USER_CONTROL_RELEASED = global i32 0
define void @cec_msg_user_control_released(%struct.cec_msg* nocapture %0) {
%2 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 0
store i32 2, i32* %2
%3 = load i32, i32* @CEC_MSG_USER_CONTROL_RELEASED
%4 = getelementptr inbounds %struct.cec_msg, %struct.cec_msg* %0, i64 0, i32 1
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 %3, i32* %6
ret void
}
void api_stream_on_error(struct api_filter_t *filter, int code) {}


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

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

LLVM IR (-O0):
%struct.api_filter_t = type opaque
define void @api_stream_on_error(%struct.api_filter_t* %0, i32 %1) {
%3 = alloca %struct.api_filter_t*
%4 = alloca i32
store %struct.api_filter_t* %0, %struct.api_filter_t** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.api_filter_t = type opaque
define void @api_stream_on_error(%struct.api_filter_t* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
float NAN;
scalar_t__ isnan(float);
float libglitch_interpolate(float *arr, size_t len, float index) {
  (void)len;
  if (isnan(index)) {
    return NAN;
  }
  return arr[(int)index];
}


x86 assembly (clang, -O0):
<libglitch_interpolate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1030 <isnan@plt>
cmp    $0x0,%rax
je     114e <libglitch_interpolate+0x3e>
mov    0x2eb8(%rip),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1164 <libglitch_interpolate+0x54>
mov    -0x10(%rbp),%rax
cvttss2si -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libglitch_interpolate>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movss  %xmm0,0xc(%rsp)
call   1030 <isnan@plt>
test   %rax,%rax
je     1131 <libglitch_interpolate+0x21>
mov    0x2ec9(%rip),%rax
jmp    113d <libglitch_interpolate+0x2d>
cvttss2si 0xc(%rsp),%eax
cltq
lea    (%rbx,%rax,4),%rax
movss  (%rax),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@NAN = global float 0.000000e+00
define float @libglitch_interpolate(float* %0, i64 %1, float %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca i64
%7 = alloca float
store float* %0, float** %5
store i64 %1, i64* %6
store float %2, float* %7
%8 = load i64, i64* %6
%9 = load float, float* %7
%10 = call i64 @isnan(float %9)
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load float, float* @NAN
store float %13, float* %4
br label %21
14: ; preds = %3
%15 = load float*, float** %5
%16 = load float, float* %7
%17 = fptosi float %16 to i32
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %15, i64 %18
%20 = load float, float* %19
store float %20, float* %4
br label %21
21: ; preds = %14, %12
%22 = load float, float* %4
ret float %22
}

LLVM IR (-O2):
@NAN = global float 0.000000e+00
define float @libglitch_interpolate(float* nocapture %0, i64 %1, float %2) {
%4 = tail call i64 @isnan(float %2)
%5 = icmp eq i64 %4, 0
%6 = fptosi float %2 to i32
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds float, float* %0, i64 %7
%9 = select i1 %5, float* %8, float* @NAN
%10 = load float, float* %9
ret float %10
}
void __rwsem_set_reader_owned(struct rw_semaphore *sem,
                              struct task_struct *owner) {}


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

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

LLVM IR (-O0):
%struct.rw_semaphore = type opaque
%struct.task_struct = type opaque
define void @__rwsem_set_reader_owned(%struct.rw_semaphore* %0, %struct.task_struct* %1) {
%3 = alloca %struct.rw_semaphore*
%4 = alloca %struct.task_struct*
store %struct.rw_semaphore* %0, %struct.rw_semaphore** %3
store %struct.task_struct* %1, %struct.task_struct** %4
ret void
}

LLVM IR (-O2):
%struct.rw_semaphore = type opaque
%struct.task_struct = type opaque
define void @__rwsem_set_reader_owned(%struct.rw_semaphore* nocapture %0, %struct.task_struct* nocapture %1) {
ret void
}
int lex_char_is_id(char c) {
  if ((c <= 'z' && c >= 'a') || (c <= 'Z' && c >= 'A') || c == '_') {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<lex_char_is_id>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jg     1124 <lex_char_is_id+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jge    114b <lex_char_is_id+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     113e <lex_char_is_id+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jge    114b <lex_char_is_id+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    1157 <lex_char_is_id+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <lex_char_is_id+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lex_char_is_id>:
lea    -0x61(%rdi),%ecx
mov    $0x1,%eax
cmp    $0x1a,%cl
jb     1121 <lex_char_is_id+0x21>
lea    -0x41(%rdi),%eax
cmp    $0x1a,%al
setb   %al
cmp    $0x5f,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @lex_char_is_id(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sle i32 %5, 122
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sge i32 %9, 97
br i1 %10, label %23, label %11
11: ; preds = %7, %1
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp sle i32 %13, 90
br i1 %14, label %15, label %19
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 65
br i1 %18, label %23, label %19
19: ; preds = %15, %11
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 95
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %7
store i32 1, i32* %2
br label %25
24: ; preds = %19
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @lex_char_is_id(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = add i8 %0, -65
%6 = icmp ult i8 %5, 26
%7 = icmp eq i8 %0, 95
%8 = or i1 %7, %6
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %4, %1
%11 = phi i32 [ 1, %1 ], [ %9, %4 ]
ret i32 %11
}
/* Variables and functions */
unsigned long s2i8(char const *);
unsigned long s2i(const char *s) { return s2i8(s); }


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

x86 assembly (clang, -O2):
<s2i>:
jmp    1030 <s2i8@plt>

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

LLVM IR (-O2):
define i64 @s2i(i8* %0) {
%2 = tail call i64 @s2i8(i8* %0)
ret i64 %2
}
void winstyle(char *str) {
  while (*str) {
    if (*str == '/')
      *str = '\\';
    str++;
  }
}


x86 assembly (clang, -O0):
<winstyle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113d <winstyle+0x3d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    112c <winstyle+0x2c>
mov    -0x8(%rbp),%rax
movb   $0x5c,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <winstyle+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<winstyle>:
jmp    1117 <winstyle+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x5c,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x2f,%al
je     1110 <winstyle+0x10>
test   %al,%al
jne    1113 <winstyle+0x13>
ret

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

LLVM IR (-O2):
define void @winstyle(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 47, label %5
]
5: ; preds = %2
store i8 92, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
float __nv_log2f(float);
float log2f(float __a) { return __nv_log2f(__a); }


x86 assembly (clang, -O0):
<log2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <__nv_log2f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log2f>:
jmp    1030 <__nv_log2f@plt>

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

LLVM IR (-O2):
define float @log2f(float %0) {
%2 = tail call float @__nv_log2f(float %0)
ret float %2
}
int(ars_d_set_tcpopt_echoreply)(struct ars_packet *pkt, int layer, char *f,
                                char *v) {
  return 0;
}


x86 assembly (clang, -O0):
<ars_d_set_tcpopt_echoreply>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ars_packet = type opaque
define i32 @ars_d_set_tcpopt_echoreply(%struct.ars_packet* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca %struct.ars_packet*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store %struct.ars_packet* %0, %struct.ars_packet** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
ret i32 0
}

LLVM IR (-O2):
%struct.ars_packet = type opaque
define i32 @ars_d_set_tcpopt_echoreply(%struct.ars_packet* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* nocapture readnone %3) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
void reset_buffer_to_zero(uint64_t *buffer) {
  int i;
  for (i = 0; i < 64 - 1; i++)
    buffer[i] = 0;
}


x86 assembly (clang, -O0):
<reset_buffer_to_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3f,-0xc(%rbp)
jge    1137 <reset_buffer_to_zero+0x37>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <reset_buffer_to_zero+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_buffer_to_zero>:
push   %rax
mov    $0x1f8,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @reset_buffer_to_zero(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
store i32 0, i32* %3
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 63
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i64*, i64** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i64, i64* %8, i64 %10
store i64 0, i64* %11
br label %12
12: ; preds = %7
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %4
15: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @reset_buffer_to_zero(i64* nocapture writeonly %0) {
%2 = bitcast i64* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello, World\c"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, Worldc\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"Hello, Worldc\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int bis(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", bis(5, 4));
  printf("%d\n", bis(2, 3));
  printf("%x\n", bis(2, 3));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
mov    $0x4,%esi
call   1040 <bis@plt>
mov    %eax,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <bis@plt>
mov    %eax,%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <bis@plt>
mov    %eax,%esi
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%edi
mov    $0x4,%esi
call   1040 <bis@plt>
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <bis@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
mov    $0x3,%esi
call   1040 <bis@plt>
lea    0xe94(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [4 x i8] c"%x\0A\00"
define i32 @main() {
%1 = tail call i32 @bis(i32 5, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @bis(i32 2, i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @bis(i32 2, i32 3)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret i32 0
}
float lms_log(float r) { return 4.5; }


x86 assembly (clang, -O0):
<lms_log>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<lms_log>:
movss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @lms_log(float %0) {
%2 = alloca float
store float %0, float* %2
ret float 4.500000e+00
}

LLVM IR (-O2):
define float @lms_log(float %0) {
ret float 4.500000e+00
}
double get_epsilon(void) {
  double eps = 1.0;
  while ((1.0 + eps / 2.0) > 1.0)
    eps = eps / 2.0;
  return eps;
}


x86 assembly (clang, -O0):
<get_epsilon>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeea(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xed6(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    115b <get_epsilon+0x5b>
movsd  -0x8(%rbp),%xmm0
movsd  0xebb(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1111 <get_epsilon+0x11>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_epsilon>:
movsd  0xef8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @get_epsilon() {
ret double 0x3CB0000000000000
}
int sys$purgws(struct _va_range *inadr) {
  return ({
    unsigned long resultvar;
    register long int _a1 asm("rdi") = (long)(inadr);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x81\n\t"
                 : "=a"(resultvar)
                 : "i"(62), "r"(_a1)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$purgws>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x3e,%rax
int    $0x81
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$purgws>:
mov    $0x3e,%rax
int    $0x81
ret

LLVM IR (-O0):
%struct._va_range = type opaque
define i32 @"sys$purgws"(%struct._va_range* %0) {
%2 = alloca %struct._va_range*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store %struct._va_range* %0, %struct._va_range** %2
%6 = load %struct._va_range*, %struct._va_range** %2
%7 = ptrtoint %struct._va_range* %6 to i64
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 62, i64 %8)
store i64 %9, i64* %3
%10 = load i64, i64* %3
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
%struct._va_range = type opaque
define i32 @"sys$purgws"(%struct._va_range* %0) {
%2 = ptrtoint %struct._va_range* %0 to i64
%3 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x81\0A\09", "={ax},i,{rdi},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 62, i64 %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ wait(int *);
pid_t outside_wait(int *status) { return wait(status); }


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

x86 assembly (clang, -O2):
<outside_wait>:
jmp    1030 <wait@plt>

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

LLVM IR (-O2):
define i32 @outside_wait(i32* %0) {
%2 = tail call i32 @wait(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf(
      "FFFFFFFFFFFFFFFFFFFFF\nFFFFFFFFFFFFFFFFFFFFF\n      FFFF       FFFF\n   "
      "   FFFF       FFFF\n      FFFF       FFFF\n                 FFFF\n      "
      "               \nAAAAAAAAAAAAAAAAAAA  \nAAAAAAAAAAAAAAAAAAAA \n      "
      "AAAA      AAAAA\n      AAAA      AAAAA\nAAAAAAAAAAAAAAAAAAAA "
      "\nAAAAAAAAAAAAAAAAAAA  \n                     "
      "\nFFFFFFFFFFFFFFFFFFFFF\nFFFFFFFFFFFFFFFFFFFFF\n      FFFF       FFFF\n "
      "     FFFF       FFFF\n      FFFF       FFFF\n                 FFFF\n    "
      "                 \nBBBBBBBBBBBBBBBBBBBBB\nBBBBBBBBBBBBBBBBBBBBB\nBBB    "
      "  BBB     BBBB\nBBB      BBB     BBBB\n BBBBBBBBBBBBBBBBBBB \n   "
      "BBBBBBBBBBBBBBB   \n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [595 x i8] c"FFFFFFFFFFFFFFFFFFFFF\0AFFFFFFFFFFFFFFFFFFFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF\0A \0AAAAAAAAAAAAAAAAAAAA \0AAAAAAAAAAAAAAAAAAAAA \0A AAAA AAAAA\0A AAAA AAAAA\0AAAAAAAAAAAAAAAAAAAAA \0AAAAAAAAAAAAAAAAAAAA \0A \0AFFFFFFFFFFFFFFFFFFFFF\0AFFFFFFFFFFFFFFFFFFFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF\0A \0ABBBBBBBBBBBBBBBBBBBBB\0ABBBBBBBBBBBBBBBBBBBBB\0ABBB BBB BBBB\0ABBB BBB BBBB\0A BBBBBBBBBBBBBBBBBBB \0A BBBBBBBBBBBBBBB \0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([595 x i8], [595 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [594 x i8] c"FFFFFFFFFFFFFFFFFFFFF\0AFFFFFFFFFFFFFFFFFFFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF\0A \0AAAAAAAAAAAAAAAAAAAA \0AAAAAAAAAAAAAAAAAAAAA \0A AAAA AAAAA\0A AAAA AAAAA\0AAAAAAAAAAAAAAAAAAAAA \0AAAAAAAAAAAAAAAAAAAA \0A \0AFFFFFFFFFFFFFFFFFFFFF\0AFFFFFFFFFFFFFFFFFFFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF FFFF\0A FFFF\0A \0ABBBBBBBBBBBBBBBBBBBBB\0ABBBBBBBBBBBBBBBBBBBBB\0ABBB BBB BBBB\0ABBB BBB BBBB\0A BBBBBBBBBBBBBBBBBBB \0A BBBBBBBBBBBBBBB \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([594 x i8], [594 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned xrop3_170_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  return (D & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_170_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xrop3_170_1_0(i8 zeroext %0, i8 zeroext %1) {
ret i32 255
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_REQ_INFO;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_REQ_INFO_it;
X509_REQ_INFO *X509_REQ_INFO_new(void) {
  return (X509_REQ_INFO *)ASN1_item_new(&X509_REQ_INFO_it);
}


x86 assembly (clang, -O0):
<X509_REQ_INFO_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_REQ_INFO_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@X509_REQ_INFO_it = global i32 0
define i32* @X509_REQ_INFO_new() {
%1 = call i64 @ASN1_item_new(i32* @X509_REQ_INFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@X509_REQ_INFO_it = global i32 0
define i32* @X509_REQ_INFO_new() {
%1 = tail call i64 @ASN1_item_new(i32* @X509_REQ_INFO_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ FatalErrnoError(int, int, char *);
int setgid(int /*<<< orphan*/);
void Esetgid(gid_t gid) { FatalErrnoError(setgid(gid) == -1, 1, "setgid()"); }


x86 assembly (clang, -O0):
<Esetgid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <setgid@plt>
cmp    $0xffffffff,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x1,%esi
lea    0xeb6(%rip),%rdx
call   1030 <FatalErrnoError@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Esetgid>:
push   %rax
call   1040 <setgid@plt>
xor    %edi,%edi
cmp    $0xffffffff,%eax
sete   %dil
lea    0xeca(%rip),%rdx
mov    $0x1,%esi
pop    %rax
jmp    1030 <FatalErrnoError@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"setgid()\00"
define void @Esetgid(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @setgid(i32 %3)
%5 = icmp eq i32 %4, -1
%6 = zext i1 %5 to i32
%7 = call i32 @FatalErrnoError(i32 %6, i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"setgid()\00"
define void @Esetgid(i32 %0) {
%2 = tail call i32 @setgid(i32 %0)
%3 = icmp eq i32 %2, -1
%4 = zext i1 %3 to i32
%5 = tail call i32 @FatalErrnoError(i32 %4, i32 1, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char toupper(char);
void toupper_str(char *str) {
  int i;
  for (i = 0; i < 512 && str[i] != '\0'; ++i) {
    str[i] = toupper(str[i]);
  }
}


x86 assembly (clang, -O0):
<toupper_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x200,-0xc(%rbp)
mov    %al,-0xd(%rbp)
jge    114a <toupper_str+0x3a>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    115a <toupper_str+0x4a>
jmp    1186 <toupper_str+0x76>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <toupper_str+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper_str>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
movzbl (%r14,%rbx,1),%eax
test   %al,%al
je     1142 <toupper_str+0x32>
movsbl %al,%edi
call   1030 <toupper@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
cmp    $0x200,%rbx
jne    1120 <toupper_str+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @toupper_str(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %28, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 512
br i1 %6, label %7, label %15
7: ; preds = %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br label %15
15: ; preds = %7, %4
%16 = phi i1 [ false, %4 ], [ %14, %7 ]
br i1 %16, label %17, label %31
17: ; preds = %15
%18 = load i8*, i8** %2
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
%23 = call signext i8 @toupper(i8 signext %22)
%24 = load i8*, i8** %2
%25 = load i32, i32* %3
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i8, i8* %24, i64 %26
store i8 %23, i8* %27
br label %28
28: ; preds = %17
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %4
31: ; preds = %15
ret void
}

LLVM IR (-O2):
define void @toupper_str(i8* nocapture %0) {
br label %2
2: ; preds = %1, %7
%3 = phi i64 [ 0, %1 ], [ %9, %7 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = tail call signext i8 @toupper(i8 signext %5)
store i8 %8, i8* %4
%9 = add nuw nsw i64 %3, 1
%10 = icmp eq i64 %9, 512
br i1 %10, label %11, label %2
11: ; preds = %7, %2
ret void
}
int testCModule(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @testCModule() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x2e() {
  Assert_real((isspace(46) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              235, ("isspace should be 0 for ."));
}


x86 assembly (clang, -O0):
<t_isspace_0x2e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2e,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0xeb,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isspace_0x2e>:
push   %rax
mov    $0x2e,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xeb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for .\00"
define void @t_isspace_0x2e() {
%1 = call i64 @isspace(i32 46)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 235, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [26 x i8] c"isspace should be 0 for .\00"
define void @t_isspace_0x2e() {
%1 = tail call i64 @isspace(i32 46)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 235, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void mark_unused(int *fds, int client_fd, unsigned int size) {
  unsigned int i;
  for (i = 0; i < size; ++i) {
    if (fds[i] == client_fd) {
      fds[i] = -1;
      break;
    }
  }
}


x86 assembly (clang, -O0):
<mark_unused>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jae    115a <mark_unused+0x5a>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jne    1147 <mark_unused+0x47>
mov    -0x8(%rbp),%rax
mov    -0x14(%rbp),%ecx
movl   $0xffffffff,(%rax,%rcx,4)
jmp    115a <mark_unused+0x5a>
jmp    114c <mark_unused+0x4c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1115 <mark_unused+0x15>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mark_unused>:
test   %edx,%edx
je     111e <mark_unused+0x1e>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %esi,(%rdi,%rcx,4)
je     111f <mark_unused+0x1f>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <mark_unused+0x10>
ret
movl   $0xffffffff,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @mark_unused(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
store i32 0, i32* %7
br label %8
8: ; preds = %26, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %6
%11 = icmp ult i32 %9, %10
br i1 %11, label %12, label %29
12: ; preds = %8
%13 = load i32*, i32** %4
%14 = load i32, i32* %7
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32, i32* %5
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %25
20: ; preds = %12
%21 = load i32*, i32** %4
%22 = load i32, i32* %7
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
store i32 -1, i32* %24
br label %29
25: ; preds = %12
br label %26
26: ; preds = %25
%27 = load i32, i32* %7
%28 = add i32 %27, 1
store i32 %28, i32* %7
br label %8
29: ; preds = %20, %8
ret void
}

LLVM IR (-O2):
define void @mark_unused(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %18, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %15
%8 = phi i64 [ 0, %5 ], [ %16, %15 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %1
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = and i64 %8, 4294967295
%14 = getelementptr inbounds i32, i32* %0, i64 %13
store i32 -1, i32* %14
br label %18
15: ; preds = %7
%16 = add nuw nsw i64 %8, 1
%17 = icmp eq i64 %16, %6
br i1 %17, label %18, label %7
18: ; preds = %15, %3, %12
ret void
}
unsigned int hashFunction(unsigned int key) { return key & ((1 << 8) - 1); }


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

x86 assembly (clang, -O2):
<hashFunction>:
movzbl %dil,%eax
ret

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

LLVM IR (-O2):
define i32 @hashFunction(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(int s) { printf("rec sig %d\n", s); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"rec sig %d\0A\00"
define void @handler(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
void write_to_memory(char *array, int position) { array[position] = 'a'; }


x86 assembly (clang, -O0):
<write_to_memory>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x61,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_memory>:
movslq %esi,%rax
movb   $0x61,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @write_to_memory(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 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
store i8 97, i8* %8
ret void
}

LLVM IR (-O2):
define void @write_to_memory(i8* nocapture writeonly %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
store i8 97, i8* %4
ret void
}
int do_629() { return 629; }


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

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

LLVM IR (-O0):
define i32 @do_629() {
ret i32 629
}

LLVM IR (-O2):
define i32 @do_629() {
ret i32 629
}
/* Variables and functions */
int EE_WaitIdle(void *);
int EINVAL;
int /*<<< orphan*/ PEX_8111Write(void *, int, int);
int EE_Off(void *info) {
  int t = 0;
  if (EE_WaitIdle(info) & (1 << 19)) {
    return -EINVAL;
  }
  PEX_8111Write(info, 0x1004, t);
  return 0;
}


x86 assembly (clang, -O0):
<EE_Off>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <EE_WaitIdle@plt>
and    $0x80000,%eax
cmp    $0x0,%eax
je     115d <EE_Off+0x3d>
xor    %eax,%eax
mov    0x2e8d(%rip),%rcx
sub    (%rcx),%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <EE_Off+0x55>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
mov    $0x1004,%esi
call   1030 <PEX_8111Write@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EE_Off>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <EE_WaitIdle@plt>
test   $0x80000,%eax
jne    1146 <EE_Off+0x26>
xor    %ebx,%ebx
mov    %r14,%rdi
mov    $0x1004,%esi
xor    %edx,%edx
call   1030 <PEX_8111Write@plt>
jmp    1151 <EE_Off+0x31>
mov    0x2e93(%rip),%rax
xor    %ebx,%ebx
sub    (%rax),%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @EE_Off(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
%5 = load i8*, i8** %3
%6 = call i32 @EE_WaitIdle(i8* %5)
%7 = and i32 %6, 524288
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* @EINVAL
%11 = sub nsw i32 0, %10
store i32 %11, i32* %2
br label %16
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = call i32 @PEX_8111Write(i8* %13, i32 4100, i32 %14)
store i32 0, i32* %2
br label %16
16: ; preds = %12, %9
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @EE_Off(i8* %0) {
%2 = tail call i32 @EE_WaitIdle(i8* %0)
%3 = and i32 %2, 524288
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* @EINVAL
%7 = sub nsw i32 0, %6
br label %10
8: ; preds = %1
%9 = tail call i32 @PEX_8111Write(i8* %0, i32 4100, i32 0)
br label %10
10: ; preds = %8, %5
%11 = phi i32 [ %7, %5 ], [ 0, %8 ]
ret i32 %11
}
int one() { return 12; }


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

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

LLVM IR (-O0):
define i32 @one() {
ret i32 12
}

LLVM IR (-O2):
define i32 @one() {
ret i32 12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float a = 7 / 2;
  float b = 10 * 1000 * 1000 * 1000;
  printf("%f\n", a);
  printf("%f\n", b);
  a = 7.0 / 2;
  b = (float)10 * 1000 * 1000 * 1000;
  printf("%f\n", a);
  printf("%f\n", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xee5(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xed4(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
movss  0xea1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xe90(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
lea    0xe7e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xef8(%rip),%rbx
movss  0xee0(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xed4(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xec8(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
movss  0xebc(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
store float 3.000000e+00, float* %2
store float 0x41D502F900000000, float* %3
%4 = load float, float* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %4)
%6 = load float, float* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %6)
store float 3.500000e+00, float* %2
store float 1.000000e+10, float* %3
%8 = load float, float* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %8)
%10 = load float, float* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 3.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 0x41D502F900000000)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 3.500000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float 1.000000e+10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ be64enc(unsigned char *, int /*<<< orphan*/ const);
void be64enc_vect(unsigned char *dst, const uint64_t *src, size_t len) {
  size_t i;
  for (i = 0; i < len / 8; i++) {
    be64enc(dst + i * 8, src[i]);
  }
}


x86 assembly (clang, -O0):
<be64enc_vect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
shr    $0x3,%rcx
cmp    %rcx,%rax
jae    1171 <be64enc_vect+0x61>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <be64enc@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <be64enc_vect+0x1c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be64enc_vect>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x8,%rdx
jb     1149 <be64enc_vect+0x39>
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%r12
shr    $0x3,%r15
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r14,%rbx,4),%esi
mov    %r12,%rdi
call   1030 <be64enc@plt>
add    $0x1,%rbx
add    $0x8,%r12
cmp    %rbx,%r15
jne    1130 <be64enc_vect+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @be64enc_vect(i8* %0, i32* nocapture %1, i64 %2) {
%4 = icmp ult i64 %2, 8
br i1 %4, label %16, label %5
5: ; preds = %3
%6 = lshr i64 %2, 3
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %14, %7 ], [ 0, %5 ]
%9 = shl i64 %8, 3
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = getelementptr inbounds i32, i32* %1, i64 %8
%12 = load i32, i32* %11
%13 = tail call i32 @be64enc(i8* %10, i32 %12)
%14 = add nuw nsw i64 %8, 1
%15 = icmp eq i64 %14, %6
br i1 %15, label %16, label %7
16: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t prog0(uint32_t x, uint32_t y) { return x + y; }


x86 assembly (clang, -O0):
<prog0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<prog0>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i64 @prog0(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @prog0(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
ret i64 %3
}