xunge/DecIR huggingface dataset:
int minus(int x, int y) { return x - y; }


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

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

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

LLVM IR (-O2):
define i32 @minus(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
int execute_munlock() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_munlock() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkdirs(char const *, int /*<<< orphan*/);
int xmkdirs(const char *pathname, mode_t mode) {
  int ret = mkdirs(pathname, mode);
  if (ret == -1) {
    ;
  }
  return ret;
}


x86 assembly (clang, -O0):
<xmkdirs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <mkdirs@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    113d <xmkdirs+0x2d>
jmp    113d <xmkdirs+0x2d>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmkdirs>:
jmp    1030 <mkdirs@plt>

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

LLVM IR (-O2):
define i32 @xmkdirs(i8* %0, i32 %1) {
%3 = tail call i32 @mkdirs(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mempokeb(int, unsigned short, char);
void putPixel(unsigned short x, unsigned short y, char color) {
  if (x < 320u && y < 200)
    mempokeb(0xA000, y * 320 + x, color);
}


x86 assembly (clang, -O0):
<putPixel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x140,%eax
jae    116a <putPixel+0x5a>
movzwl -0x4(%rbp),%eax
cmp    $0xc8,%eax
jge    116a <putPixel+0x5a>
movzwl -0x4(%rbp),%eax
imul   $0x140,%eax,%eax
movzwl -0x2(%rbp),%ecx
add    %ecx,%eax
mov    $0xa000,%edi
movzwl %ax,%esi
movsbl -0x5(%rbp),%edx
call   1030 <mempokeb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putPixel>:
cmp    $0x13f,%edi
ja     113a <putPixel+0x2a>
movzwl %si,%eax
cmp    $0xc7,%eax
ja     113a <putPixel+0x2a>
lea    (%rsi,%rsi,4),%eax
shl    $0x6,%eax
add    %eax,%edi
movzwl %di,%esi
movsbl %dl,%edx
mov    $0xa000,%edi
jmp    1030 <mempokeb@plt>
ret

LLVM IR (-O0):
define void @putPixel(i16 zeroext %0, i16 zeroext %1, i8 signext %2) {
%4 = alloca i16
%5 = alloca i16
%6 = alloca i8
store i16 %0, i16* %4
store i16 %1, i16* %5
store i8 %2, i8* %6
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = icmp ult i32 %8, 320
br i1 %9, label %10, label %24
10: ; preds = %3
%11 = load i16, i16* %5
%12 = zext i16 %11 to i32
%13 = icmp slt i32 %12, 200
br i1 %13, label %14, label %24
14: ; preds = %10
%15 = load i16, i16* %5
%16 = zext i16 %15 to i32
%17 = mul nsw i32 %16, 320
%18 = load i16, i16* %4
%19 = zext i16 %18 to i32
%20 = add nsw i32 %17, %19
%21 = trunc i32 %20 to i16
%22 = load i8, i8* %6
%23 = call i32 @mempokeb(i32 40960, i16 zeroext %21, i8 signext %22)
br label %24
24: ; preds = %14, %10, %3
ret void
}

LLVM IR (-O2):
define void @putPixel(i16 zeroext %0, i16 zeroext %1, i8 signext %2) {
%4 = icmp ult i16 %0, 320
%5 = icmp ult i16 %1, 200
%6 = and i1 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = mul nuw i16 %1, 320
%9 = add nuw i16 %8, %0
%10 = tail call i32 @mempokeb(i32 40960, i16 zeroext %9, i8 signext %2)
br label %11
11: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void put_lstring(const char *str, uint32_t l) {
  while (l--)
    putchar(*str++);
}


x86 assembly (clang, -O0):
<put_lstring>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     114f <put_lstring+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111f <put_lstring+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_lstring>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
je     1143 <put_lstring+0x33>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    %ebx,%r15d
jne    1130 <put_lstring+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @put_lstring(i8* nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i8* [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
%11 = tail call i32 @putchar(i32 %10)
%12 = icmp eq i32 %7, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %2
ret void
}
__attribute__((noipa)) int f4(int a, int b) {
  return __builtin_clz(a - b) == sizeof(int) * 8 - 1;
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
bsr    %eax,%eax
xor    $0x1f,%eax
cltq
cmp    $0x1f,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
sub    %esi,%edi
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @f4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %5, %6
%8 = call i32 @llvm.ctlz.i32(i32 %7, i1 true)
%9 = sext i32 %8 to i64
%10 = icmp eq i64 %9, 31
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct kcn_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct kcn_info *);
int /*<<< orphan*/ kcn_info_db_unset(struct kcn_info *);
int /*<<< orphan*/ kcn_info_loc_free(struct kcn_info *);
void kcn_info_destroy(struct kcn_info *ki) {
  if (ki == NULL)
    return;
  kcn_info_db_unset(ki);
  kcn_info_loc_free(ki);
  free(ki);
}


x86 assembly (clang, -O0):
<kcn_info_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    114c <kcn_info_destroy+0x1c>
jmp    1167 <kcn_info_destroy+0x37>
mov    -0x8(%rbp),%rdi
call   1030 <kcn_info_db_unset@plt>
mov    -0x8(%rbp),%rdi
call   1050 <kcn_info_loc_free@plt>
mov    -0x8(%rbp),%rdi
call   1040 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kcn_info_destroy>:
test   %rdi,%rdi
je     114f <kcn_info_destroy+0x1f>
push   %rbx
mov    %rdi,%rbx
call   1030 <kcn_info_db_unset@plt>
mov    %rbx,%rdi
call   1050 <kcn_info_loc_free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <free@plt>
ret

LLVM IR (-O0):
%struct.kcn_info = type { i32 }
define void @kcn_info_destroy(%struct.kcn_info* %0) {
%2 = alloca %struct.kcn_info*
store %struct.kcn_info* %0, %struct.kcn_info** %2
%3 = load %struct.kcn_info*, %struct.kcn_info** %2
%4 = icmp eq %struct.kcn_info* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %13
6: ; preds = %1
%7 = load %struct.kcn_info*, %struct.kcn_info** %2
%8 = call i32 @kcn_info_db_unset(%struct.kcn_info* %7)
%9 = load %struct.kcn_info*, %struct.kcn_info** %2
%10 = call i32 @kcn_info_loc_free(%struct.kcn_info* %9)
%11 = load %struct.kcn_info*, %struct.kcn_info** %2
%12 = call i32 @free(%struct.kcn_info* %11)
br label %13
13: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.kcn_info = type { i32 }
define void @kcn_info_destroy(%struct.kcn_info* %0) {
%2 = icmp eq %struct.kcn_info* %0, null
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @kcn_info_db_unset(%struct.kcn_info* %0)
%5 = tail call i32 @kcn_info_loc_free(%struct.kcn_info* %0)
%6 = tail call i32 @free(%struct.kcn_info* %0)
br label %7
7: ; preds = %1, %3
ret void
}
void rop3_138_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = S | stk3;
  stk1 = *D & stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_138_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_138_1_0>:
not    %dl
or     %sil,%dl
and    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_138_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = or i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %5
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = load i8*, i8** %4
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = and i32 %35, %37
%39 = or i32 %32, %38
%40 = trunc i32 %39 to i8
%41 = load i8*, i8** %4
store i8 %40, i8* %41
ret void
}

LLVM IR (-O2):
define void @rop3_138_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %2, -1
%6 = or i8 %5, %1
%7 = and i8 %4, %6
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
int get_token();
int /*<<< orphan*/ printf(char *, int);
void cmd_add(void) {
  int num = 0;
  int sum = 0;
  while ((num = get_token()) > 0) {
    sum += num;
  }
  printf("sum = %d\n", sum);
}


x86 assembly (clang, -O0):
<cmd_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <get_token@plt>
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
jle    1157 <cmd_add+0x37>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <cmd_add+0x16>
mov    -0x8(%rbp),%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_add>:
push   %rbx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ecx,%ebx
xor    %eax,%eax
call   1040 <get_token@plt>
lea    (%rax,%rbx,1),%ecx
test   %eax,%eax
jg     1130 <cmd_add+0x10>
lea    0xeb9(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"sum = %d\0A\00"
define void @cmd_add() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = tail call i32 (...) @get_token()
%4 = icmp sgt i32 %3, 0
%5 = add nsw i32 %3, %2
br i1 %4, label %1, label %6
6: ; preds = %1
%7 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ isspace(int);
char *lskip(const char *s) {
  for (; *s && isspace((int)*s); ++s)
    ;
  return (char *)s;
}


x86 assembly (clang, -O0):
<lskip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <lskip+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <lskip+0x47>
jmp    116d <lskip+0x5d>
jmp    115c <lskip+0x4c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <lskip+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lskip>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <lskip+0x29>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <lskip+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <lskip+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @lskip(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %17, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %14
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = call i64 @isspace(i32 %11)
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %8, %3
%15 = phi i1 [ false, %3 ], [ %13, %8 ]
br i1 %15, label %16, label %20
16: ; preds = %14
br label %17
17: ; preds = %16
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
br label %3
20: ; preds = %14
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define i8* @lskip(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %12, %10 ], [ %2, %1 ]
%6 = phi i8* [ %11, %10 ], [ %0, %1 ]
%7 = sext i8 %5 to i32
%8 = tail call i64 @isspace(i32 %7)
%9 = icmp eq i64 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = getelementptr inbounds i8, i8* %6, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %10, %1
%15 = phi i8* [ %0, %1 ], [ %11, %10 ], [ %6, %4 ]
ret i8* %15
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xd3() {
  Assert_real((isodigit(211) == 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",
              1060, ("isodigit should be 0 for 0xd3"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xd3>:
push   %rax
mov    $0xd3,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x424,%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 0xd3\00"
define void @t_isodigit_0xd3() {
%1 = call i64 @isodigit(i32 211)
%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 1060, 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 0xd3\00"
define void @t_isodigit_0xd3() {
%1 = tail call i64 @isodigit(i32 211)
%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 1060, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint8_t;

/* Variables and functions */
uint8_t direct_clear8(volatile uint8_t *addr, uint8_t dat) {
  *addr &= ~dat;
  return dat;
}


x86 assembly (clang, -O0):
<direct_clear8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<direct_clear8>:
mov    %esi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
not    %eax
and    %eax,(%rdi)
mov    -0x4(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @direct_clear8(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store volatile i32 %1, i32* %4
%5 = load volatile i32, i32* %4
%6 = xor i32 %5, -1
%7 = load i32*, i32** %3
%8 = load volatile i32, i32* %7
%9 = and i32 %8, %6
store volatile i32 %9, i32* %7
%10 = load volatile i32, i32* %4
ret i32 %10
}

LLVM IR (-O2):
define i32 @direct_clear8(i32* %0, i32 %1) {
%3 = alloca i32
store volatile i32 %1, i32* %3
%4 = load volatile i32, i32* %3
%5 = xor i32 %4, -1
%6 = load volatile i32, i32* %0
%7 = and i32 %6, %5
store volatile i32 %7, i32* %0
%8 = load volatile i32, i32* %3
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stream_isplayer_active_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stream@%p::isplayer_active "
          "(rtpp_stream_isplayer_active) is invoked after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stream_isplayer_active_fin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<rtpp_stream_isplayer_active_fin>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [99 x i8] c"Method rtpp_stream@%p::isplayer_active (rtpp_stream_isplayer_active) is invoked after destruction\0A\00"
define void @rtpp_stream_isplayer_active_fin(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [99 x i8] c"Method rtpp_stream@%p::isplayer_active (rtpp_stream_isplayer_active) is invoked after destruction\0A\00"
define void @rtpp_stream_isplayer_active_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([99 x i8], [99 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ direction;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
unsigned get_XFontStruct_direction(void *_p) {
  return (unsigned)((XFontStruct *)_p)->direction;
}


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

x86 assembly (clang, -O2):
<get_XFontStruct_direction>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XFontStruct_direction(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
void CancelChanges(void *unused) {
  extern void M_PopMenu(void);
  M_PopMenu();
}


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

x86 assembly (clang, -O2):
<CancelChanges>:
jmp    1030 <M_PopMenu@plt>

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

LLVM IR (-O2):
define void @CancelChanges(i8* nocapture readnone %0) {
tail call void @M_PopMenu()
ret void
}
void hesiod_free_list(void *context, char **list) {
  char **p;
  for (p = list; *p; p++)
    free(*p);
  free(list);
}


x86 assembly (clang, -O0):
<hesiod_free_list>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1153 <hesiod_free_list+0x43>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <hesiod_free_list+0x18>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hesiod_free_list>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    (%rsi),%rdi
test   %rdi,%rdi
je     1141 <hesiod_free_list+0x31>
lea    0x8(%r14),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <free@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1130 <hesiod_free_list+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @hesiod_free_list(i8* nocapture readnone %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = icmp eq i8* %3, null
br i1 %4, label %11, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %9, %5 ], [ %3, %2 ]
%7 = phi i8** [ %8, %5 ], [ %1, %2 ]
tail call void @free(i8* %6)
%8 = getelementptr inbounds i8*, i8** %7, i64 1
%9 = load i8*, i8** %8
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %5
11: ; preds = %5, %2
%12 = bitcast i8** %1 to i8*
tail call void @free(i8* %12)
ret void
}
int decode_hip07_hns_error(struct ras_events *ras,
                           struct ras_ns_dec_tab *dec_tab, struct trace_seq *s,
                           struct ras_non_standard_event *event) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.ras_events = type opaque
%struct.ras_ns_dec_tab = type opaque
%struct.trace_seq = type opaque
%struct.ras_non_standard_event = type opaque
define i32 @decode_hip07_hns_error(%struct.ras_events* %0, %struct.ras_ns_dec_tab* %1, %struct.trace_seq* %2, %struct.ras_non_standard_event* %3) {
%5 = alloca %struct.ras_events*
%6 = alloca %struct.ras_ns_dec_tab*
%7 = alloca %struct.trace_seq*
%8 = alloca %struct.ras_non_standard_event*
store %struct.ras_events* %0, %struct.ras_events** %5
store %struct.ras_ns_dec_tab* %1, %struct.ras_ns_dec_tab** %6
store %struct.trace_seq* %2, %struct.trace_seq** %7
store %struct.ras_non_standard_event* %3, %struct.ras_non_standard_event** %8
ret i32 0
}

LLVM IR (-O2):
%struct.ras_events = type opaque
%struct.ras_ns_dec_tab = type opaque
%struct.trace_seq = type opaque
%struct.ras_non_standard_event = type opaque
define i32 @decode_hip07_hns_error(%struct.ras_events* nocapture readnone %0, %struct.ras_ns_dec_tab* nocapture readnone %1, %struct.trace_seq* nocapture readnone %2, %struct.ras_non_standard_event* nocapture readnone %3) {
ret i32 0
}
int _DummyDelete(void *v) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_DummyDelete(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ my_strlen(char *);
int pipe(int *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void my_pipe(int pipefd[2]) {
  if (pipe(pipefd) == -1) {
    write(1, "Error pipe", my_strlen("Error pipe"));
    exit(0);
  }
}


x86 assembly (clang, -O0):
<my_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <pipe@plt>
cmp    $0xffffffff,%eax
jne    1184 <my_pipe+0x44>
lea    0xe9b(%rip),%rdi
call   1030 <my_strlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xe88(%rip),%rsi
call   1040 <write@plt>
xor    %edi,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_pipe>:
push   %rbx
call   1050 <pipe@plt>
cmp    $0xffffffff,%eax
je     114d <my_pipe+0xd>
pop    %rbx
ret
lea    0xeac(%rip),%rbx
mov    %rbx,%rdi
call   1030 <my_strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
xor    %edi,%edi
call   1060 <exit@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"Error pipe\00"
define void @my_pipe(i32* %0) {
%2 = tail call i32 @pipe(i32* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32 @my_strlen(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %1
ret void
}
void gtk_container_set_focus_chain() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_set_focus_chain() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_assert(int);
int main(void) {
  int a = 1;
  switch (a) {
    if (a > 0) {
    case 1:
      a = 4;
      break;
    case 2:
      a = 2;
      break;
    } else {
    case -3:
      a = 3;
      break;
    case -4:
      a = 8;
      break;
    }
  default:
    a = 3;
  }
  test_assert(a == 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x6,%eax
ja     117f <main+0x6f>
mov    -0x10(%rbp),%rax
lea    0xeba(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x4,-0x8(%rbp)
jmp    1186 <main+0x76>
movl   $0x2,-0x8(%rbp)
jmp    1186 <main+0x76>
movl   $0x3,-0x8(%rbp)
jmp    1186 <main+0x76>
movl   $0x8,-0x8(%rbp)
jmp    1186 <main+0x76>
movl   $0x3,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <test_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %13 [
i32 1, label %8
i32 2, label %9
i32 -3, label %11
i32 -4, label %12
]
4: ; No predecessors!
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
br label %8
8: ; preds = %0, %7
store i32 4, i32* %2
br label %14
9: ; preds = %0
store i32 2, i32* %2
br label %14
10: ; preds = %4
br label %11
11: ; preds = %0, %10
store i32 3, i32* %2
br label %14
12: ; preds = %0
store i32 8, i32* %2
br label %14
13: ; preds = %0
store i32 3, i32* %2
br label %14
14: ; preds = %13, %12, %11, %9, %8
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 4
%17 = zext i1 %16 to i32
%18 = call i32 @test_assert(i32 %17)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @test_assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0x59() {
  Assert_real((isspace(89) == 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",
              450, ("isspace should be 0 for Y"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0x59>:
push   %rax
mov    $0x59,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1c2,%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 Y\00"
define void @t_isspace_0x59() {
%1 = call i64 @isspace(i32 89)
%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 450, 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 Y\00"
define void @t_isspace_0x59() {
%1 = tail call i64 @isspace(i32 89)
%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 450, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct cfg_iterator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cfg_free(struct cfg_iterator *);
void cfg_iterator_delete(struct cfg_iterator *it) { cfg_free(it); }


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

x86 assembly (clang, -O2):
<cfg_iterator_delete>:
jmp    1030 <cfg_free@plt>

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

LLVM IR (-O2):
%struct.cfg_iterator = type { i32 }
define void @cfg_iterator_delete(%struct.cfg_iterator* %0) {
%2 = tail call i32 @cfg_free(%struct.cfg_iterator* %0)
ret void
}
/* Variables and functions */
int sqrt(double);
double drsqrt(double x) { return 1. / sqrt(x); }


x86 assembly (clang, -O0):
<drsqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xecd(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drsqrt>:
push   %rax
call   1030 <sqrt@plt>
cvtsi2sd %eax,%xmm1
movsd  0xede(%rip),%xmm0
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @drsqrt(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @sqrt(double %3)
%5 = sitofp i32 %4 to double
%6 = fdiv double 1.000000e+00, %5
ret double %6
}

LLVM IR (-O2):
define double @drsqrt(double %0) {
%2 = tail call i32 @sqrt(double %0)
%3 = sitofp i32 %2 to double
%4 = fdiv double 1.000000e+00, %3
ret double %4
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int str_equal(void *s1, void *s2) {
  return (strcmp((char *)s1, (char *)s2) == 0);
}


x86 assembly (clang, -O0):
<str_equal>:
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 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_equal>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @str_equal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @str_equal(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_BEint8_reg(signed char val) {
  return ((val) & (0xBE << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_BEint8_reg(i8 signext %0) {
%2 = and i8 %0, -66
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void draw_osd(void) {}


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

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

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

LLVM IR (-O2):
define void @draw_osd() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("fuck world\n");
  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
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 = [12 x i8] c"fuck world\0A\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 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"fuck world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int *AddToList(int *, int);
int *AddListToList(int *dest, int *source) {
  int i;
  for (i = 1; i <= source[0]; i++)
    dest = AddToList(dest, source[i]);
  return dest;
}


x86 assembly (clang, -O0):
<AddListToList>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jg     115c <AddListToList+0x4c>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
call   1030 <AddToList@plt>
mov    %rax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <AddListToList+0x17>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AddListToList>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rax
cmpl   $0x0,(%rsi)
jle    1149 <AddListToList+0x39>
mov    %rsi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x4(%r14,%rbx,4),%esi
mov    %rax,%rdi
call   1030 <AddToList@plt>
movslq (%r14),%rcx
add    $0x1,%rbx
cmp    %rcx,%rbx
jl     1130 <AddListToList+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32* @AddListToList(i32* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 1
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %11, %5 ], [ 1, %2 ]
%7 = phi i32* [ %10, %5 ], [ %0, %2 ]
%8 = getelementptr inbounds i32, i32* %1, i64 %6
%9 = load i32, i32* %8
%10 = tail call i32* @AddToList(i32* %7, i32 %9)
%11 = add nuw nsw i64 %6, 1
%12 = load i32, i32* %1
%13 = sext i32 %12 to i64
%14 = icmp slt i64 %6, %13
br i1 %14, label %5, label %15
15: ; preds = %5, %2
%16 = phi i32* [ %0, %2 ], [ %10, %5 ]
ret i32* %16
}
__attribute__((no)) double internal(double a, double b) { return a * b; }


x86 assembly (clang, -O0):
<internal>:
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):
<internal>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @internal(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 @internal(double %0, double %1) {
%3 = fmul double %0, %1
ret double %3
}
/* Variables and functions */
unsigned int DJBHash(unsigned char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strlen(unsigned char *);
int main(int argc, char *argv[]) {
  unsigned char *str = argv[1];
  unsigned int hash = DJBHash(str, strlen(str));
  if (hash == 0x49a54935)
    printf("You win!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%esi
call   1050 <DJBHash@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x49a54935,-0x1c(%rbp)
jne    118a <main+0x5a>
lea    0xe7b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1050 <DJBHash@plt>
cmp    $0x49a54935,%eax
jne    115a <main+0x2a>
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"You win!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = load i8*, i8** %6
%13 = call i32 @strlen(i8* %12)
%14 = call i32 @DJBHash(i8* %11, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = icmp eq i32 %15, 1235568949
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
ret i32 0
}

LLVM IR (-O2):
@str = [9 x i8] c"You win!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @strlen(i8* %4)
%6 = tail call i32 @DJBHash(i8* %4, i32 %5)
%7 = icmp eq i32 %6, 1235568949
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
ret i32 0
}
/* Variables and functions */
int close(int);
int close_socket(int fd) { return close(fd); }


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

x86 assembly (clang, -O2):
<close_socket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @close_socket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
int a_fun() { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @a_fun() {
ret i32 1
}
/* Variables and functions */
int open_extension_release(char const *, int /*<<< orphan*/ *, char **, int *);
int open_os_release(const char *root, char **ret_path, int *ret_fd) {
  return open_extension_release(root, NULL, ret_path, ret_fd);
}


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

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

LLVM IR (-O0):
define i32 @open_os_release(i8* %0, i8** %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32*
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32*, i32** %6
%10 = call i32 @open_extension_release(i8* %7, i32* null, i8** %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @open_os_release(i8* %0, i8** %1, i32* %2) {
%4 = tail call i32 @open_extension_release(i8* %0, i32* null, i8** %1, i32* %2)
ret i32 %4
}
void iupdrvAddScreenOffset(int *x, int *y, int add) {
  (void)x;
  (void)y;
  (void)add;
}


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

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

LLVM IR (-O0):
define void @iupdrvAddScreenOffset(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 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @iupdrvAddScreenOffset(i32* nocapture %0, i32* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
void test_signed_llong() {
  unsigned long long a;
  long long b;
  signed long long c;
  int *p = 1 ? &b : &c;
}


x86 assembly (clang, -O0):
<test_signed_llong>:
push   %rbp
mov    %rsp,%rbp
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_signed_llong() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32*
%5 = bitcast i64* %2 to i32*
store i32* %5, i32** %4
ret void
}

LLVM IR (-O2):
define void @test_signed_llong() {
ret void
}