xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rotateRight(uint32_t x, uint32_t i) {
  return (x >> i) | (x << (32 - i));
}


x86 assembly (clang, -O0):
<rotateRight>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotateRight>:
mov    %esi,%ecx
mov    %edi,%eax
sar    %cl,%eax
neg    %cl
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotateRight(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 = ashr i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = shl i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rotateRight(i32 %0, i32 %1) {
%3 = ashr i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = shl i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
unsigned int ft_hashich(char *line) {
  unsigned int hashich;
  int c;
  hashich = 5381;
  while ((c = *line++))
    hashich = ((hashich << 5) + hashich) ^ c;
  if (hashich > 4194304)
    return (hashich % 4194304);
  return (hashich);
}


x86 assembly (clang, -O0):
<ft_hashich>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1505,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     1141 <ft_hashich+0x41>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
add    -0x14(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    110f <ft_hashich+0xf>
cmpl   $0x400000,-0x14(%rbp)
jbe    115e <ft_hashich+0x5e>
mov    -0x14(%rbp),%eax
and    $0x3fffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1164 <ft_hashich+0x64>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_hashich>:
mov    (%rdi),%al
test   %al,%al
je     1138 <ft_hashich+0x38>
add    $0x1,%rdi
mov    $0x1505,%ecx
nop
movsbl %al,%eax
mov    %ecx,%edx
shl    $0x5,%edx
add    %edx,%ecx
xor    %eax,%ecx
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <ft_hashich+0x10>
mov    %ecx,%eax
and    $0x3fffff,%eax
cmp    $0x400001,%ecx
cmovb  %ecx,%eax
ret
mov    $0x1505,%eax
ret

LLVM IR (-O0):
define i32 @ft_hashich(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 5381, i32* %4
br label %6
6: ; preds = %12, %1
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %3
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
store i32 %10, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %19
12: ; preds = %6
%13 = load i32, i32* %4
%14 = shl i32 %13, 5
%15 = load i32, i32* %4
%16 = add i32 %14, %15
%17 = load i32, i32* %5
%18 = xor i32 %16, %17
store i32 %18, i32* %4
br label %6
19: ; preds = %6
%20 = load i32, i32* %4
%21 = icmp ugt i32 %20, 4194304
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %4
%24 = urem i32 %23, 4194304
store i32 %24, i32* %2
br label %27
25: ; preds = %19
%26 = load i32, i32* %4
store i32 %26, i32* %2
br label %27
27: ; preds = %25, %22
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @ft_hashich(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = mul i32 %6, 33
%11 = xor i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = icmp ugt i32 %11, 4194304
%16 = and i32 %11, 4194303
%17 = select i1 %15, i32 %16, i32 %11
br label %18
18: ; preds = %14, %1
%19 = phi i32 [ 5381, %1 ], [ %17, %14 ]
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char *progname) {
  printf("%s <file>\n", progname);
  exit(-1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"%s <file>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [11 x i8] c"%s <file>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ doTiming();
int main() {
  doTiming();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @doTiming()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
void error(char *str) {
  printf("%s\n", str);
  printf("PROGRAM IS TERMINATED !!!\n\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [28 x i8] c"PROGRAM IS TERMINATED !!!\0A\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [27 x i8] c"PROGRAM IS TERMINATED !!!\0A\00"
define void @error(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 -1)
unreachable
}
void SetChangeParms() {}


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

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

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

LLVM IR (-O2):
define void @SetChangeParms() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ err(char *, char *);
void err_undef(char *sym) { err("undefined reference to `%s'", sym); }


x86 assembly (clang, -O0):
<err_undef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_undef>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <err@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"undefined reference to `%s'\00"
define void @err_undef(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @err(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"undefined reference to `%s'\00"
define void @err_undef(i8* %0) {
%2 = tail call i32 @err(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void jz4740_clock_debugfs_init(void) {}


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

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

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

LLVM IR (-O2):
define void @jz4740_clock_debugfs_init() {
ret void
}
/* Variables and functions */
int func9();
int main(int argc, char *argv[]) { return func9() == 3 ? 0 : 1; }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func9@plt>
xor    %ecx,%ecx
cmp    $0x3,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @func9()
%4 = icmp ne i32 %3, 3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct g722_encode_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct g722_encode_state *);
int g722_encode_release(struct g722_encode_state *s) {
  free(s);
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.g722_encode_state = type { i32 }
define i32 @g722_encode_release(%struct.g722_encode_state* nocapture %0) {
%2 = tail call i32 @free(%struct.g722_encode_state* %0)
ret i32 0
}
/* Variables and functions */
bool triangle(int a, int b, int c) {
  return !(a + b <= c || b + c <= a || a + c <= b);
}


x86 assembly (clang, -O0):
<triangle>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    $0x1,%al
cmp    -0xc(%rbp),%ecx
mov    %al,-0xd(%rbp)
jle    1144 <triangle+0x44>
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
mov    $0x1,%al
cmp    -0x4(%rbp),%ecx
mov    %al,-0xd(%rbp)
jle    1144 <triangle+0x44>
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<triangle>:
lea    (%rsi,%rdi,1),%eax
cmp    %edx,%eax
setg   %al
lea    (%rdx,%rsi,1),%ecx
cmp    %edi,%ecx
setg   %cl
and    %al,%cl
add    %edi,%edx
cmp    %esi,%edx
setg   %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @triangle(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 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = icmp sle i32 %9, %10
br i1 %11, label %24, label %12
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = add nsw i32 %13, %14
%16 = load i32, i32* %4
%17 = icmp sle i32 %15, %16
br i1 %17, label %24, label %18
18: ; preds = %12
%19 = load i32, i32* %4
%20 = load i32, i32* %6
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %5
%23 = icmp sle i32 %21, %22
br label %24
24: ; preds = %18, %12, %3
%25 = phi i1 [ true, %12 ], [ true, %3 ], [ %23, %18 ]
%26 = xor i1 %25, true
%27 = zext i1 %26 to i32
ret i32 %27
}

LLVM IR (-O2):
define i32 @triangle(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = icmp sgt i32 %4, %2
%6 = add nsw i32 %2, %1
%7 = icmp sgt i32 %6, %0
%8 = select i1 %5, i1 %7, i1 false
%9 = add nsw i32 %2, %0
%10 = icmp sgt i32 %9, %1
%11 = select i1 %8, i1 %10, i1 false
%12 = zext i1 %11 to i32
ret i32 %12
}
void pm8921_bms_battery_removed(void) {}


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

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

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

LLVM IR (-O2):
define void @pm8921_bms_battery_removed() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ afficher_menu_principal();
int main(void) {
  afficher_menu_principal();
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <afficher_menu_principal@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @afficher_menu_principal()
%3 = load i32, i32* @EXIT_SUCCESS
ret i32 %3
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @afficher_menu_principal()
%2 = load i32, i32* @EXIT_SUCCESS
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ backing_pixel;
};
typedef TYPE_1__ XSetWindowAttributes;

/* Variables and functions */
unsigned long get_XSetWindowAttributes_backing_pixel(void *_p) {
  return (unsigned long)((XSetWindowAttributes *)_p)->backing_pixel;
}


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

x86 assembly (clang, -O2):
<get_XSetWindowAttributes_backing_pixel>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XSetWindowAttributes_backing_pixel(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 i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XSetWindowAttributes_backing_pixel(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int MyExit() {
  printf("Exiting...\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Exiting...\00"
define i32 @MyExit() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Type definitions */
struct xfs_dir2_data_unused {
  int dummy;
};
struct xfs_dir2_data_hdr {
  int dummy;
};

/* Variables and functions */
int xfs_dir3_data_entry_offset(struct xfs_dir2_data_hdr *);
struct xfs_dir2_data_unused *
xfs_dir3_data_unused_p(struct xfs_dir2_data_hdr *hdr) {
  return (struct xfs_dir2_data_unused *)((char *)hdr +
                                         xfs_dir3_data_entry_offset(hdr));
}


x86 assembly (clang, -O0):
<xfs_dir3_data_unused_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <xfs_dir3_data_entry_offset@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xfs_dir3_data_unused_p>:
push   %rbx
mov    %rdi,%rbx
call   1030 <xfs_dir3_data_entry_offset@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.xfs_dir2_data_unused = type { i32 }
%struct.xfs_dir2_data_hdr = type { i32 }
define %struct.xfs_dir2_data_unused* @xfs_dir3_data_unused_p(%struct.xfs_dir2_data_hdr* %0) {
%2 = alloca %struct.xfs_dir2_data_hdr*
store %struct.xfs_dir2_data_hdr* %0, %struct.xfs_dir2_data_hdr** %2
%3 = load %struct.xfs_dir2_data_hdr*, %struct.xfs_dir2_data_hdr** %2
%4 = bitcast %struct.xfs_dir2_data_hdr* %3 to i8*
%5 = load %struct.xfs_dir2_data_hdr*, %struct.xfs_dir2_data_hdr** %2
%6 = call i32 @xfs_dir3_data_entry_offset(%struct.xfs_dir2_data_hdr* %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %4, i64 %7
%9 = bitcast i8* %8 to %struct.xfs_dir2_data_unused*
ret %struct.xfs_dir2_data_unused* %9
}

LLVM IR (-O2):
%struct.xfs_dir2_data_unused = type { i32 }
%struct.xfs_dir2_data_hdr = type { i32 }
define %struct.xfs_dir2_data_unused* @xfs_dir3_data_unused_p(%struct.xfs_dir2_data_hdr* %0) {
%2 = bitcast %struct.xfs_dir2_data_hdr* %0 to i8*
%3 = tail call i32 @xfs_dir3_data_entry_offset(%struct.xfs_dir2_data_hdr* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
%6 = bitcast i8* %5 to %struct.xfs_dir2_data_unused*
ret %struct.xfs_dir2_data_unused* %6
}
int ungetch(int dev, int abuf) {
  int *buf = (int *)abuf;
  *buf = (-1);
  return (*buf);
}


x86 assembly (clang, -O0):
<ungetch>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movslq -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungetch>:
movslq %esi,%rax
movl   $0xffffffff,(%rax)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ungetch(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
store i32* %8, i32** %5
%9 = load i32*, i32** %5
store i32 -1, i32* %9
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @ungetch(i32 %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = inttoptr i64 %3 to i32*
store i32 -1, i32* %4
ret i32 -1
}
void swap(int v[], int i, int j) {
  int tmp = v[i];
  v[i] = v[j];
  v[j] = tmp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
movslq %esi,%rax
mov    (%rdi,%rax,4),%ecx
movslq %edx,%rdx
mov    (%rdi,%rdx,4),%esi
mov    %esi,(%rdi,%rax,4)
mov    %ecx,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %7
%13 = load i32*, i32** %4
%14 = load i32, i32* %6
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i32, i32* %13, i64 %15
%17 = load i32, i32* %16
%18 = load i32*, i32** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i32, i32* %18, i64 %20
store i32 %17, i32* %21
%22 = load i32, i32* %7
%23 = load i32*, i32** %4
%24 = load i32, i32* %6
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
store i32 %22, i32* %26
ret void
}

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
store i32 %9, i32* %5
store i32 %6, i32* %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ ispunct(int);
void t_ispunct_0x3a() {
  Assert_real((ispunct(58)),
              "/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_ispunct.c",
              295, ("ispunct should be 1 for :"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x3a>:
push   %rax
mov    $0x3a,%edi
call   1030 <ispunct@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x127,%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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for :\00"
define void @t_ispunct_0x3a() {
%1 = call i32 @ispunct(i32 58)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 295, 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_ispunct.c\00"
@.str.1 = [26 x i8] c"ispunct should be 1 for :\00"
define void @t_ispunct_0x3a() {
%1 = tail call i32 @ispunct(i32 58)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 295, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ charrep(char, int);
int /*<<< orphan*/ printf(char *);
void default_cstate_table_footer(__attribute__((unused)) void *report_data) {
  charrep('-', 80);
  printf("\n\n");
}


x86 assembly (clang, -O0):
<default_cstate_table_footer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2d,%edi
mov    $0x50,%esi
call   1040 <charrep@plt>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_cstate_table_footer>:
push   %rax
mov    $0x2d,%edi
mov    $0x50,%esi
call   1040 <charrep@plt>
lea    0xec9(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0A\0A\00"
define void @default_cstate_table_footer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @charrep(i8 signext 45, i32 80)
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [2 x i8] c"\0A\00"
define void @default_cstate_table_footer(i8* nocapture readnone %0) {
%2 = tail call i32 @charrep(i8 signext 45, i32 80)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
int main(void) {
  int x = 0;
  int *p = &x;
  5 / *p;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int ich_list() {
  printf("!!UMIMPL!! Device List:\n");
  printf("\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<ich_list>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"!!UMIMPL!! Device List:\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @ich_list() {
%1 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [24 x i8] c"!!UMIMPL!! Device List:\00"
define i32 @ich_list() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int strlen(char *);
void Saisie_Chaine(char chaine[255]) {
  fgets(chaine, 255, stdin);
  chaine[strlen(chaine) - 1] = '\0';
}


x86 assembly (clang, -O0):
<Saisie_Chaine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Saisie_Chaine>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ebd(%rip),%rax
mov    (%rax),%edx
mov    $0xff,%esi
call   1040 <fgets@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @Saisie_Chaine(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 255, i32 %4)
%6 = load i8*, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @strlen(i8* %7)
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %6, i64 %10
store i8 0, i8* %11
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @Saisie_Chaine(i8* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %0, i32 255, i32 %2)
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, -1
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
ret void
}
void halt(void) {
  __asm__("cli");
  __asm__("hlt");
}


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

x86 assembly (clang, -O2):
<halt>:
cli
hlt
ret

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

LLVM IR (-O2):
define void @halt() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "hlt", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int cmp(void *data1, void *data2) { return (*(int *)data1 - *(int *)data2); }


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

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

LLVM IR (-O0):
define i32 @cmp(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 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
const char *longopts_arg(const char *option) {
  for (; *option && *option != '='; ++option)
    ;
  if (*option == '=')
    return option + 1;
  else
    return NULL;
}


x86 assembly (clang, -O0):
<longopts_arg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     112d <longopts_arg+0x2d>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    113d <longopts_arg+0x3d>
jmp    1153 <longopts_arg+0x53>
jmp    1142 <longopts_arg+0x42>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <longopts_arg+0x8>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3d,%eax
jne    1174 <longopts_arg+0x74>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    117c <longopts_arg+0x7c>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<longopts_arg>:
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl -0x1(%rdi),%ecx
test   %cl,%cl
je     1123 <longopts_arg+0x23>
cmp    $0x3d,%cl
je     1123 <longopts_arg+0x23>
add    $0x1,%rdi
jmp    1110 <longopts_arg+0x10>
xor    %eax,%eax
cmp    $0x3d,%cl
cmove  %rdi,%rax
ret

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

LLVM IR (-O2):
define i8* @longopts_arg(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %7
i8 61, label %7
]
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2, %2
%8 = icmp eq i8 %4, 61
%9 = getelementptr inbounds i8, i8* %3, i64 1
%10 = select i1 %8, i8* %9, i8* null
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void usage(char *basename) {
  printf("%s: send and save audio streams.\n"
         "(c) 2007 Enno Luebbers (luebbers@reconos.de)\n"
         "Computer Engineering Group, University of Paderborn\n\n"
         "USAGE:\n"
         "       %s [-h] [-o <outfile>] [-p <port>] [-i <infile>] <host>\n"
         "\n"
         "       -h                  display this help\n"
         "       -o <outfile>        save audio file to <outfile>\n"
         "       -m <number_of_frames>  number of frames to track\n"
         "\n"
         "DESTINATION OPTIONS:\n"
         "       <host>              host to send to\n"
         "       -p <port>           send to port <port> (default: 6666)\n"
         "\n",
         basename, basename);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
mov    %rdx,%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [489 x i8] c"%s: send and save audio streams.\0A(c) 2007 Enno Luebbers (luebbers@reconos.de)\0AComputer Engineering Group, University of Paderborn\0A\0AUSAGE:\0A %s [-h] [-o <outfile>] [-p <port>] [-i <infile>] <host>\0A\0A -h display this help\0A -o <outfile> save audio file to <outfile>\0A -m <number_of_frames> number of frames to track\0A\0ADESTINATION OPTIONS:\0A <host> host to send to\0A -p <port> send to port <port> (default: 6666)\0A\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([489 x i8], [489 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [489 x i8] c"%s: send and save audio streams.\0A(c) 2007 Enno Luebbers (luebbers@reconos.de)\0AComputer Engineering Group, University of Paderborn\0A\0AUSAGE:\0A %s [-h] [-o <outfile>] [-p <port>] [-i <infile>] <host>\0A\0A -h display this help\0A -o <outfile> save audio file to <outfile>\0A -m <number_of_frames> number of frames to track\0A\0ADESTINATION OPTIONS:\0A <host> host to send to\0A -p <port> send to port <port> (default: 6666)\0A\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([489 x i8], [489 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ assert_or_panic(int);
void c_u8(uint8_t x) { assert_or_panic(x == 0xff); }


x86 assembly (clang, -O0):
<c_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert_or_panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_u8>:
xor    %eax,%eax
cmp    $0xff,%edi
sete   %al
mov    %eax,%edi
jmp    1030 <assert_or_panic@plt>

LLVM IR (-O0):
define void @c_u8(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 255
%5 = zext i1 %4 to i32
%6 = call i32 @assert_or_panic(i32 %5)
ret void
}

LLVM IR (-O2):
define void @c_u8(i32 %0) {
%2 = icmp eq i32 %0, 255
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert_or_panic(i32 %3)
ret void
}
/* Type definitions */
struct Hero {
  int dummy;
};
struct Ability {
  int dummy;
};

/* Variables and functions */
int Hero_checkAbilityRandom(struct Hero *, int);
int QinJunQiangFa_check(struct Ability *self, struct Hero *attacker) {
  return (Hero_checkAbilityRandom(attacker, 30));
}


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

x86 assembly (clang, -O2):
<QinJunQiangFa_check>:
mov    %rsi,%rdi
mov    $0x1e,%esi
jmp    1030 <Hero_checkAbilityRandom@plt>

LLVM IR (-O0):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define i32 @QinJunQiangFa_check(%struct.Ability* %0, %struct.Hero* %1) {
%3 = alloca %struct.Ability*
%4 = alloca %struct.Hero*
store %struct.Ability* %0, %struct.Ability** %3
store %struct.Hero* %1, %struct.Hero** %4
%5 = load %struct.Hero*, %struct.Hero** %4
%6 = call i32 @Hero_checkAbilityRandom(%struct.Hero* %5, i32 30)
ret i32 %6
}

LLVM IR (-O2):
%struct.Ability = type { i32 }
%struct.Hero = type { i32 }
define i32 @QinJunQiangFa_check(%struct.Ability* nocapture readnone %0, %struct.Hero* %1) {
%3 = tail call i32 @Hero_checkAbilityRandom(%struct.Hero* %1, i32 30)
ret i32 %3
}
/* Variables and functions */
long double __infer_nondet_long_double();
long double expl(long double x) { return __infer_nondet_long_double(); }


x86 assembly (clang, -O0):
<expl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
xor    %eax,%eax
call   1030 <__infer_nondet_long_double@plt>
fld    %st(0)
fstp   %st(0)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define x86_fp80 @expl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @expl(x86_fp80 %0) {
%2 = tail call x86_fp80 (...) @__infer_nondet_long_double()
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_format_info_snprint() {
  printf("NOT IMPLEMENTED:"
         "pa_format_info_snprint"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_format_info_snprint\00"
define i32 @pa_format_info_snprint() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int syscall(int, int);
int nice(int inc) { return syscall(34, inc); }


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

x86 assembly (clang, -O2):
<nice>:
mov    %edi,%esi
mov    $0x22,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @nice(i32 %0) {
%2 = tail call i32 @syscall(i32 34, i32 %0)
ret i32 %2
}
/* Type definitions */
struct tgl_state {
  int dummy;
};
struct connection {
  int dummy;
};

/* Variables and functions */
int tc_becomes_ready(struct tgl_state *, struct connection *);
int rpc_becomes_ready(struct tgl_state *TLS, struct connection *c) {
  return tc_becomes_ready(TLS, c);
}


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

x86 assembly (clang, -O2):
<rpc_becomes_ready>:
jmp    1030 <tc_becomes_ready@plt>

LLVM IR (-O0):
%struct.tgl_state = type { i32 }
%struct.connection = type { i32 }
define i32 @rpc_becomes_ready(%struct.tgl_state* %0, %struct.connection* %1) {
%3 = alloca %struct.tgl_state*
%4 = alloca %struct.connection*
store %struct.tgl_state* %0, %struct.tgl_state** %3
store %struct.connection* %1, %struct.connection** %4
%5 = load %struct.tgl_state*, %struct.tgl_state** %3
%6 = load %struct.connection*, %struct.connection** %4
%7 = call i32 @tc_becomes_ready(%struct.tgl_state* %5, %struct.connection* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.tgl_state = type { i32 }
%struct.connection = type { i32 }
define i32 @rpc_becomes_ready(%struct.tgl_state* %0, %struct.connection* %1) {
%3 = tail call i32 @tc_becomes_ready(%struct.tgl_state* %0, %struct.connection* %1)
ret i32 %3
}
void random_stash_free(void) {}


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

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

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

LLVM IR (-O2):
define void @random_stash_free() {
ret void
}
int is_tab_or_space(c)
int c;
{ return c == '\t' || c == ' '; }


x86 assembly (clang, -O0):
<is_tab_or_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <is_tab_or_space+0x20>
cmpl   $0x20,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_tab_or_space>:
cmp    $0x9,%edi
sete   %al
cmp    $0x20,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_tab_or_space(i32 %0) {
%2 = icmp eq i32 %0, 9
%3 = icmp eq i32 %0, 32
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
long int sas_fetch_and_and_long(unsigned long *pointer, long int delta) {
  return __atomic_fetch_and(pointer, delta, 4);
}


x86 assembly (clang, -O0):
<sas_fetch_and_and_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rcx
mov    %rcx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    -0x30(%rbp),%rsi
mov    %rax,%rdx
and    %rsi,%rdx
lock cmpxchg %rdx,(%rcx)
sete   %cl
mov    %rax,-0x40(%rbp)
test   $0x1,%cl
mov    %rax,-0x28(%rbp)
jne    115b <sas_fetch_and_and_long+0x5b>
jmp    112b <sas_fetch_and_and_long+0x2b>
mov    -0x40(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sas_fetch_and_and_long>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rax,%rcx
and    %rsi,%rcx
lock cmpxchg %rcx,(%rdi)
jne    1110 <sas_fetch_and_and_long+0x10>
ret

LLVM IR (-O0):
define i64 @sas_fetch_and_and_long(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%7 = load i64*, i64** %3
%8 = load i64, i64* %4
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = atomicrmw and i64* %7, i64 %9 acq_rel
store i64 %10, i64* %6
%11 = load i64, i64* %6
ret i64 %11
}

LLVM IR (-O2):
define i64 @sas_fetch_and_and_long(i64* nocapture %0, i64 %1) {
%3 = atomicrmw and i64* %0, i64 %1 acq_rel
ret i64 %3
}
unsigned long convert_ms_to_timer(unsigned long ms) {
  return (unsigned long)24 * ms;
  ;
}


x86 assembly (clang, -O0):
<convert_ms_to_timer>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
imul   $0x18,-0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_ms_to_timer>:
shl    $0x3,%rdi
lea    (%rdi,%rdi,2),%rax
ret

LLVM IR (-O0):
define i64 @convert_ms_to_timer(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 24, %3
ret i64 %4
}

LLVM IR (-O2):
define i64 @convert_ms_to_timer(i64 %0) {
%2 = mul i64 %0, 24
ret i64 %2
}
_Noreturn void _Exit(int status) { _exit(status); }


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

x86 assembly (clang, -O2):
<_Exit>:
push   %rax
call   1030 <_exit@plt>

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

LLVM IR (-O2):
define void @_Exit(i32 %0) {
tail call void @_exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
int testsig(int sig, int want) {
  if (sig != want) {
    fprintf(stderr, "  FAIL: expected signal %d, not %d\n", want, sig);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<testsig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1151 <testsig+0x41>
mov    0x2eaf(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1158 <testsig+0x48>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testsig>:
mov    $0x1,%eax
cmp    %esi,%edi
je     1139 <testsig+0x29>
push   %rax
mov    %esi,%edx
mov    %edi,%ecx
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
lea    0xed2(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [36 x i8] c" FAIL: expected signal %d, not %d\0A\00"
define i32 @testsig(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = load i32, i32* %5
%12 = load i32, i32* %4
%13 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12)
store i32 0, i32* %3
br label %15
14: ; preds = %2
store i32 1, i32* %3
br label %15
15: ; preds = %14, %9
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [36 x i8] c" FAIL: expected signal %d, not %d\0A\00"
define i32 @testsig(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %8
}