xunge/DecIR huggingface dataset:
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __list_splice(struct list_head *, struct list_head *);
int /*<<< orphan*/ list_empty(struct list_head *);
int /*<<< orphan*/ list_init(struct list_head *);
void list_splice_init(struct list_head *list, struct list_head *head) {
  if (!list_empty(list)) {
    __list_splice(list, head);
    list_init(list);
  }
}


x86 assembly (clang, -O0):
<list_splice_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <list_empty@plt>
cmp    $0x0,%eax
jne    1168 <list_splice_init+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <__list_splice@plt>
mov    -0x8(%rbp),%rdi
call   1030 <list_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<list_splice_init>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <list_empty@plt>
test   %eax,%eax
je     114b <list_splice_init+0x1b>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <__list_splice@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <list_init@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_splice_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = alloca %struct.list_head*
%4 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %3
store %struct.list_head* %1, %struct.list_head** %4
%5 = load %struct.list_head*, %struct.list_head** %3
%6 = call i32 @list_empty(%struct.list_head* %5)
%7 = icmp ne i32 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load %struct.list_head*, %struct.list_head** %3
%10 = load %struct.list_head*, %struct.list_head** %4
%11 = call i32 @__list_splice(%struct.list_head* %9, %struct.list_head* %10)
%12 = load %struct.list_head*, %struct.list_head** %3
%13 = call i32 @list_init(%struct.list_head* %12)
br label %14
14: ; preds = %8, %2
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_splice_init(%struct.list_head* %0, %struct.list_head* %1) {
%3 = tail call i32 @list_empty(%struct.list_head* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = tail call i32 @__list_splice(%struct.list_head* %0, %struct.list_head* %1)
%7 = tail call i32 @list_init(%struct.list_head* %0)
br label %8
8: ; preds = %5, %2
ret void
}
double f(double x, double y) { return x * y; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mulsd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @f(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
void hb_console_safe_lock(void) {}


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

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

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

LLVM IR (-O2):
define void @hb_console_safe_lock() {
ret void
}
/* Variables and functions */
unsigned char *iconv_convert4(char const *, char const *, size_t, size_t *);
unsigned char *iconv_convert3(const char *str, const char *from, size_t inlen) {
  size_t outlen = 0;
  return iconv_convert4(str, from, inlen, &outlen);
}


x86 assembly (clang, -O0):
<iconv_convert3>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1030 <iconv_convert4@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iconv_convert3>:
push   %rax
movq   $0x0,(%rsp)
mov    %rsp,%rcx
call   1030 <iconv_convert4@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @iconv_convert3(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
store i64 0, i64* %7
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i8* @iconv_convert4(i8* %8, i8* %9, i64 %10, i64* %7)
ret i8* %11
}

LLVM IR (-O2):
define i8* @iconv_convert3(i8* %0, i8* %1, i64 %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%6 = call i8* @iconv_convert4(i8* %0, i8* %1, i64 %2, i64* %4)
ret i8* %6
}
void gtk_tree_model_row_inserted() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_row_inserted() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stdout;
void bit_object_bit_show(int i, int v, void *arg) {
  { arg = arg; }
  fprintf(stdout, "\tbit object bit {bit=>%d,value=>%d}\n", i, v);
}


x86 assembly (clang, -O0):
<bit_object_bit_show>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_object_bit_show>:
mov    %esi,%ecx
mov    %edi,%edx
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [37 x i8] c"\09bit object bit {bit=>%d,value=>%d}\0A\00"
define void @bit_object_bit_show(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
store i8* %7, i8** %6
%8 = load i32, i32* @stdout
%9 = load i32, i32* %4
%10 = load i32, i32* %5
%11 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [37 x i8] c"\09bit object bit {bit=>%d,value=>%d}\0A\00"
define void @bit_object_bit_show(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = load i32, i32* @stdout
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char *, struct stat *);
int is_dir(char *path) {
  struct stat path_stat;
  stat(path, &path_stat);
  return S_ISDIR(path_stat.st_mode);
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
pop    %rax
jmp    1030 <S_ISDIR@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @S_ISDIR(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i32 @S_ISDIR(i32 %6)
ret i32 %7
}
/* Variables and functions */
int atoi(char *);
int validatePort(char *p) {
  int port = atoi(p);
  if (port >= 1 && port <= 65535)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<validatePort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jl     114b <validatePort+0x3b>
cmpl   $0xffff,-0x14(%rbp)
jg     114b <validatePort+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <validatePort+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validatePort>:
push   %rax
call   1030 <atoi@plt>
add    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0xffff,%eax
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @validatePort(i8* nocapture %0) {
%2 = tail call i32 @atoi(i8* %0)
%3 = add i32 %2, -1
%4 = icmp ult i32 %3, 65535
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
scalar_t__ atan(float);
float ATAN(float var) { return (float)atan(var); }


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

x86 assembly (clang, -O2):
<ATAN>:
push   %rax
call   1030 <atan@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @ATAN(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @atan(float %3)
%5 = sitofp i64 %4 to float
ret float %5
}

LLVM IR (-O2):
define float @ATAN(float %0) {
%2 = tail call i64 @atan(float %0)
%3 = sitofp i64 %2 to float
ret float %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int detexGetPixelSize(int);
__attribute__((always_)) uint32_t detexTextureSize(uint32_t width_in_blocks,
                                                   uint32_t height_in_blocks,
                                                   uint32_t pixel_format) {
  return width_in_blocks * height_in_blocks * detexGetPixelSize(pixel_format) *
         16;
}


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

x86 assembly (clang, -O2):
<detexTextureSize>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    %edx,%edi
call   1030 <detexGetPixelSize@plt>
imul   %ebx,%ebp
imul   %ebp,%eax
shl    $0x4,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @detexTextureSize(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = call i32 @detexGetPixelSize(i32 %10)
%12 = mul nsw i32 %9, %11
%13 = mul nsw i32 %12, 16
ret i32 %13
}

LLVM IR (-O2):
define i32 @detexTextureSize(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @detexGetPixelSize(i32 %2)
%5 = shl i32 %0, 4
%6 = mul i32 %5, %1
%7 = mul i32 %6, %4
ret i32 %7
}
char *skip_lws(char *pos, char *end) {
  while (pos < end && (*pos == ' ' || *pos == '\t'))
    pos++;
  return pos;
}


x86 assembly (clang, -O0):
<skip_lws>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x11(%rbp)
jae    114a <skip_lws+0x4a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x12(%rbp)
je     1144 <skip_lws+0x44>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    115a <skip_lws+0x5a>
jmp    116b <skip_lws+0x6b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <skip_lws+0xc>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_lws>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jae    1127 <skip_lws+0x27>
mov    %rsi,%rcx
sub    %rax,%rcx
jmp    111a <skip_lws+0x1a>
add    $0x1,%rax
add    $0xffffffffffffffff,%rcx
je     1128 <skip_lws+0x28>
movzbl (%rax),%edx
cmp    $0x20,%dl
je     1110 <skip_lws+0x10>
cmp    $0x9,%dl
je     1110 <skip_lws+0x10>
ret
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i8* @skip_lws(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %23, %2
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = icmp ult i8* %6, %7
br i1 %8, label %9, label %21
9: ; preds = %5
%10 = load i8*, i8** %3
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 32
br i1 %13, label %19, label %14
14: ; preds = %9
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 9
br label %19
19: ; preds = %14, %9
%20 = phi i1 [ true, %9 ], [ %18, %14 ]
br label %21
21: ; preds = %19, %5
%22 = phi i1 [ false, %5 ], [ %20, %19 ]
br i1 %22, label %23, label %26
23: ; preds = %21
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %3
br label %5
26: ; preds = %21
%27 = load i8*, i8** %3
ret i8* %27
}

LLVM IR (-O2):
define i8* @skip_lws(i8* %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %15
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %4, %12
%10 = phi i8* [ %13, %12 ], [ %0, %4 ]
%11 = load i8, i8* %10
switch i8 %11, label %15 [
i8 32, label %12
i8 9, label %12
]
12: ; preds = %9, %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = icmp eq i8* %13, %8
br i1 %14, label %15, label %9
15: ; preds = %12, %9, %2
%16 = phi i8* [ %0, %2 ], [ %10, %9 ], [ %8, %12 ]
ret i8* %16
}
const char *macroValueToString() { return "4"; }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"4\00"
define i8* @macroValueToString() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
void empty_it() { return; }


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

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

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

LLVM IR (-O2):
define void @empty_it() {
ret void
}
extern unsigned short be16dec(const void *buf) {
  const unsigned char *p = (const unsigned char *)buf;
  return ((p[0] << 8) | p[1]);
}


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

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

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

LLVM IR (-O2):
define zeroext i16 @be16dec(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
void __attribute__((weak)) i2c1_ev_isr() { debug_handler(__FUNCTION__); }


x86 assembly (clang, -O0):
<i2c1_ev_isr>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <debug_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c1_ev_isr>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <debug_handler@plt>

LLVM IR (-O0):
@__FUNCTION__.i2c1_ev_isr = [12 x i8] c"i2c1_ev_isr\00"
define weak void @i2c1_ev_isr() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.i2c1_ev_isr, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__FUNCTION__.i2c1_ev_isr = [12 x i8] c"i2c1_ev_isr\00"
define weak void @i2c1_ev_isr() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @debug_handler to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__FUNCTION__.i2c1_ev_isr, i64 0, i64 0))
ret void
}
int test_imm_01uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0x01 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_01uint64_highword_reg>:
bt     $0x20,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_01uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 4294967296
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ dhcpd_run();
int main(int argc, char **argv, char **envp) {
  dhcpd_run();
  return 0;
}


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)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <dhcpd_run@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 (...) @dhcpd_run()
ret i32 0
}
/* Variables and functions */
int find(int *, int);
int test_many_elements() {
  int array[] = {6, 4, 9, 5, 6, 9, 4};
  return 5 == find(array, 7);
}


x86 assembly (clang, -O0):
<test_many_elements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x7,%esi
call   1030 <find@plt>
mov    %eax,%ecx
mov    $0x5,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_many_elements>:
sub    $0x28,%rsp
movups 0xef1(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x7,%esi
call   1030 <find@plt>
xor    %ecx,%ecx
cmp    $0x5,%eax
sete   %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test_many_elements.array = [7 x i32] [i32 6, i32 4, i32 9, i32 5, i32 6, i32 9, i32 4]
define i32 @test_many_elements() {
%1 = alloca [7 x i32]
%2 = bitcast [7 x i32]* %1 to i8*
%3 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%4 = call i32 @find(i32* %3, i32 7)
%5 = icmp eq i32 5, %4
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
@__const.test_many_elements.array = [7 x i32] [i32 6, i32 4, i32 9, i32 5, i32 6, i32 9, i32 4]
define i32 @test_many_elements() {
%1 = alloca [7 x i32]
%2 = bitcast [7 x i32]* %1 to i8*
%3 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%4 = call i32 @find(i32* %3, i32 7)
%5 = icmp eq i32 %4, 5
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ SHA_DIGEST_LENGTH;
int /*<<< orphan*/ perror(char *);
scalar_t__ write(int, unsigned char *, int /*<<< orphan*/);
int write_file(int fd, unsigned char *text) {
  if (write(fd, text, SHA_DIGEST_LENGTH)) {
    perror("write");
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<write_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
call   1030 <write@plt>
cmp    $0x0,%rax
je     1166 <write_file+0x46>
lea    0xeab(%rip),%rdi
call   1040 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    116d <write_file+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_file>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edx
call   1030 <write@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    113b <write_file+0x1b>
pop    %rcx
ret
lea    0xebe(%rip),%rdi
call   1040 <perror@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SHA_DIGEST_LENGTH = global i32 0
@.str = [6 x i8] c"write\00"
define i32 @write_file(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%6 = load i32, i32* %4
%7 = load i8*, i8** %5
%8 = load i32, i32* @SHA_DIGEST_LENGTH
%9 = call i64 @write(i32 %6, i8* %7, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %11
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@SHA_DIGEST_LENGTH = global i32 0
@.str = [6 x i8] c"write\00"
define i32 @write_file(i32 %0, i8* nocapture %1) {
%3 = load i32, i32* @SHA_DIGEST_LENGTH
%4 = tail call i64 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 1, %6 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x56() {
  Assert_real((isascii(86)),
              "/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_isascii.c",
              435, ("isascii should be 1 for V"));
}


x86 assembly (clang, -O0):
<t_isascii_0x56>:
push   %rbp
mov    %rsp,%rbp
mov    $0x56,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x1b3,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x56>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x1b3,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for V\00"
define void @t_isascii_0x56() {
%1 = call i32 @isascii(i32 86)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 435, 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for V\00"
define void @t_isascii_0x56() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 435, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ scanf(char *, int *);
int *set_b(int m) {
  int i, *b;
  b = (int *)malloc(m * sizeof(int));
  for (i = 0; i < m; i++) {
    scanf("%d", &b[i]);
  }
  return b;
}


x86 assembly (clang, -O0):
<set_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    117a <set_b+0x5a>
mov    -0x10(%rbp),%rsi
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe99(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1145 <set_b+0x25>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_b>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x0(,%rbx,4),%edi
call   1030 <malloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
jle    1165 <set_b+0x45>
mov    %ebx,%r12d
lea    0xeb9(%rip),%r15
mov    %r14,%rbx
nopw   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
add    $0x4,%rbx
add    $0xffffffffffffffff,%r12
jne    1150 <set_b+0x30>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32* @set_b(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = sext i32 %5 to i64
%7 = mul i64 %6, 4
%8 = trunc i64 %7 to i32
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %4
store i32 0, i32* %3
br label %11
11: ; preds = %21, %1
%12 = load i32, i32* %3
%13 = load i32, i32* %2
%14 = icmp slt i32 %12, %13
br i1 %14, label %15, label %24
15: ; preds = %11
%16 = load i32*, i32** %4
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %19)
br label %21
21: ; preds = %15
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %11
24: ; preds = %11
%25 = load i32*, i32** %4
ret i32* %25
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32* @set_b(i32 %0) {
%2 = shl i32 %0, 2
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i32*
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ 0, %6 ], [ %12, %8 ]
%10 = getelementptr inbounds i32, i32* %4, i64 %9
%11 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %10)
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %7
br i1 %13, label %14, label %8
14: ; preds = %8, %1
ret i32* %4
}
int __() {
  int _();
  _();
}


x86 assembly (clang, -O0):
<__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <_@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @__() {
%1 = alloca i32
%2 = call i32 (...) @_()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @__() {
%1 = tail call i32 (...) @_()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void if_not_taken(void) { printf("not taken\n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"not taken\00"
define void @if_not_taken() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double util_get_timestamp() {
  struct timeval now;
  gettimeofday(&now, NULL);
  return now.tv_sec * 1000000.0 + now.tv_usec;
}


x86 assembly (clang, -O0):
<util_get_timestamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_get_timestamp>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @util_get_timestamp() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+06, double %6)
ret double %7
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @util_get_timestamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double 1.000000e+06, double %7)
ret double %8
}
int cairo_code_draw_casParameterLabel_get_width() { return 69; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_casParameterLabel_get_width() {
ret i32 69
}

LLVM IR (-O2):
define i32 @cairo_code_draw_casParameterLabel_get_width() {
ret i32 69
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x95() {
  Assert_real((isspace(149) == 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",
              750, ("isspace should be 0 for 0x95"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x95>:
push   %rax
mov    $0x95,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ee,%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 = [29 x i8] c"isspace should be 0 for 0x95\00"
define void @t_isspace_0x95() {
%1 = call i64 @isspace(i32 149)
%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 750, i8* getelementptr inbounds ([29 x i8], [29 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 = [29 x i8] c"isspace should be 0 for 0x95\00"
define void @t_isspace_0x95() {
%1 = tail call i64 @isspace(i32 149)
%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 750, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int fun() {
  int array[1];
  int *ptr;
  array[0] = 1;
  ptr = &array[0];
  (void)ptr;
  ;
  array[0] = 1;
  return array[0];
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun() {
%1 = alloca [1 x i32]
%2 = alloca i32*
%3 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 1, i32* %3
%4 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 1, i32* %6
%7 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @fun() {
ret i32 1
}
void fbcon_resumed(struct fb_info *info) {}


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

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

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

LLVM IR (-O2):
%struct.fb_info = type opaque
define void @fbcon_resumed(%struct.fb_info* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int width;
};
typedef TYPE_1__ XConfigureEvent;

/* Variables and functions */
void set_XConfigureEvent_width(void *_p, int _v) {
  ((XConfigureEvent *)_p)->width = (int)_v;
}


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

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

LLVM IR (-O2):
define void @set_XConfigureEvent_width(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
struct mat4 {
  int dummy;
};
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat4_assign_mat2(float *, float *);
__attribute__((always_)) struct mat4 *psmat4_assign_mat2(struct mat4 *result,
                                                         struct mat2 *m) {
  mat4_assign_mat2((float *)result, (float *)m);
  return result;
}


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

x86 assembly (clang, -O2):
<psmat4_assign_mat2>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat4_assign_mat2@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat4 = type { i32 }
%struct.mat2 = type { i32 }
define %struct.mat4* @psmat4_assign_mat2(%struct.mat4* %0, %struct.mat2* %1) {
%3 = alloca %struct.mat4*
%4 = alloca %struct.mat2*
store %struct.mat4* %0, %struct.mat4** %3
store %struct.mat2* %1, %struct.mat2** %4
%5 = load %struct.mat4*, %struct.mat4** %3
%6 = bitcast %struct.mat4* %5 to float*
%7 = load %struct.mat2*, %struct.mat2** %4
%8 = bitcast %struct.mat2* %7 to float*
%9 = call i32 @mat4_assign_mat2(float* %6, float* %8)
%10 = load %struct.mat4*, %struct.mat4** %3
ret %struct.mat4* %10
}

LLVM IR (-O2):
%struct.mat4 = type { i32 }
%struct.mat2 = type { i32 }
define %struct.mat4* @psmat4_assign_mat2(%struct.mat4* returned %0, %struct.mat2* %1) {
%3 = bitcast %struct.mat4* %0 to float*
%4 = bitcast %struct.mat2* %1 to float*
%5 = tail call i32 @mat4_assign_mat2(float* %3, float* %4)
ret %struct.mat4* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};
typedef int /*<<< orphan*/ date_str;

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
char *ymd_now() {
  time_t t;
  struct tm *info;
  static char date_str[60];
  time(&t);
  info = localtime(&t);
  strftime(date_str, sizeof(date_str) - 1, "%Y-%m-%d %H:%M:%S", info);
  return date_str;
}


x86 assembly (clang, -O0):
<ymd_now>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
lea    0x2ef7(%rip),%rdi
mov    $0x3b,%esi
lea    0xe9b(%rip),%rdx
call   1050 <strftime@plt>
lea    0x2edf(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ymd_now>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
lea    0x2eff(%rip),%rbx
lea    0xea8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x3b,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
mov    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@ymd_now.date_str = internal global [60 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @ymd_now() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @strftime(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @ymd_now.date_str, i64 0, i64 0), i32 59, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @ymd_now.date_str, i64 0, i64 0)
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@ymd_now.date_str = internal global [60 x i8] zeroinitializer
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define i8* @ymd_now() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
%5 = call i32 @strftime(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @ymd_now.date_str, i64 0, i64 0), i32 59, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %4)
ret i8* getelementptr inbounds ([60 x i8], [60 x i8]* @ymd_now.date_str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0x02() {
  Assert_real((isodigit(2) == 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_isodigit.c",
              15, ("isodigit should be 0 for 0x02"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0x02>:
push   %rax
mov    $0x2,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xf,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x02\00"
define void @t_isodigit_0x02() {
%1 = call i64 @isodigit(i32 2)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 15, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0x02\00"
define void @t_isodigit_0x02() {
%1 = tail call i64 @isodigit(i32 2)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 15, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint_fast32_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_uint_fast32_t(uint_fast32_t const k1,
                                          uint_fast32_t const k2) {
  return k1 < k2;
}


x86 assembly (clang, -O0):
<SHAREMIND_MAP_KEY_LESS_uint_fast32_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_LESS_uint_fast32_t>:
xor    %eax,%eax
cmp    %rsi,%rdi
setl   %al
ret

LLVM IR (-O0):
define i32 @SHAREMIND_MAP_KEY_LESS_uint_fast32_t(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 = icmp slt i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_uint_fast32_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void device_request() {}


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

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

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

LLVM IR (-O2):
define void @device_request() {
ret void
}
/* Variables and functions */
float quadratic_in(float, float, float);
float quadratic_f_in(float step, float max_steps, float max_val) {
  return quadratic_in(step, max_steps, max_val);
}


x86 assembly (clang, -O0):
<quadratic_f_in>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <quadratic_in@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quadratic_f_in>:
jmp    1030 <quadratic_in@plt>

LLVM IR (-O0):
define float @quadratic_f_in(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = load float, float* %6
%10 = call float @quadratic_in(float %7, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @quadratic_f_in(float %0, float %1, float %2) {
%4 = tail call float @quadratic_in(float %0, float %1, float %2)
ret float %4
}
int compareSubstr(char *shortStr, char *longStr) {
  int i = 0;
  while (shortStr[i] != '\0') {
    if (shortStr[i] != longStr[i]) {
      return (0);
    }
    i++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<compareSubstr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1162 <compareSubstr+0x62>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1154 <compareSubstr+0x54>
movl   $0x0,-0x4(%rbp)
jmp    1169 <compareSubstr+0x69>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <compareSubstr+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareSubstr>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1122 <compareSubstr+0x22>
xor    %edx,%edx
nopl   (%rax)
cmp    (%rsi,%rdx,1),%cl
jne    1123 <compareSubstr+0x23>
movzbl 0x1(%rdi,%rdx,1),%ecx
add    $0x1,%rdx
test   %cl,%cl
jne    1110 <compareSubstr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @compareSubstr(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %0, i64 %15
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %16, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %15, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = getelementptr inbounds i8, i8* %1, i64 %10
%13 = load i8, i8* %12
%14 = icmp eq i8 %11, %13
%15 = add nuw i64 %10, 1
br i1 %14, label %5, label %16
16: ; preds = %9, %5, %2
%17 = phi i32 [ 1, %2 ], [ 1, %5 ], [ 0, %9 ]
ret i32 %17
}