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

/* Variables and functions */
uint32_t nrf_802154_first_symbol_timestamp_get(uint32_t end_timestamp,
                                               uint8_t psdu_length) {
  uint32_t frame_symbols = 10;
  frame_symbols += (1 + psdu_length) * 2;
  return end_timestamp - (frame_symbols * 16);
}


x86 assembly (clang, -O0):
<nrf_802154_first_symbol_timestamp_get>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
shl    $0x1,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    $0x4,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nrf_802154_first_symbol_timestamp_get>:
shl    $0x5,%esi
sub    %esi,%edi
lea    -0xc0(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @nrf_802154_first_symbol_timestamp_get(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 10, i32* %5
%6 = load i32, i32* %4
%7 = add nsw i32 1, %6
%8 = mul nsw i32 %7, 2
%9 = load i32, i32* %5
%10 = add nsw i32 %9, %8
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %5
%13 = mul nsw i32 %12, 16
%14 = sub nsw i32 %11, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @nrf_802154_first_symbol_timestamp_get(i32 %0, i32 %1) {
%3 = mul i32 %1, -32
%4 = add i32 %0, -192
%5 = add i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ i2c_EnableStandardHSM(int /*<<< orphan*/);
void i2c0_EnableStandardHSM(void) { i2c_EnableStandardHSM(0); }


x86 assembly (clang, -O0):
<i2c0_EnableStandardHSM>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <i2c_EnableStandardHSM@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c0_EnableStandardHSM>:
xor    %edi,%edi
jmp    1030 <i2c_EnableStandardHSM@plt>

LLVM IR (-O0):
define void @i2c0_EnableStandardHSM() {
%1 = call i32 @i2c_EnableStandardHSM(i32 0)
ret void
}

LLVM IR (-O2):
define void @i2c0_EnableStandardHSM() {
%1 = tail call i32 @i2c_EnableStandardHSM(i32 0)
ret void
}
void gtk_accel_map_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_accel_map_get_type() {
ret void
}
int printable(ch)
char ch;
{
  if (ch > 0x7f)
    return 0;
  return (isprint(ch) || (ch == '\n') || (ch == '\t'));
}


x86 assembly (clang, -O0):
<printable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x7f,%eax
jle    1137 <printable+0x27>
movl   $0x0,-0x4(%rbp)
jmp    117a <printable+0x6a>
movsbl -0x5(%rbp),%edi
call   1030 <isprint@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x6(%rbp)
jne    116f <printable+0x5f>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x6(%rbp)
je     116f <printable+0x5f>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printable>:
push   %rbx
movsbl %dil,%eax
mov    %edi,%ebx
shl    $0x18,%ebx
mov    %eax,%edi
call   1030 <isprint@plt>
test   %eax,%eax
setne  %al
cmp    $0xa000000,%ebx
sete   %cl
cmp    $0x9000000,%ebx
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @printable(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
%4 = tail call i32 @isprint(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = icmp eq i32 %2, 167772160
%7 = or i1 %6, %5
%8 = icmp eq i32 %2, 150994944
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
long foo(long a, long b) {
  long ret = 0;
  do {
    (ret) = (a) / (b);
  } while (0);
  return ret + 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %rdi,%rax
mov    %rdi,%rcx
or     %rsi,%rcx
shr    $0x20,%rcx
je     1119 <foo+0x19>
cqto
idiv   %rsi
add    $0x1,%rax
ret
xor    %edx,%edx
div    %esi
add    $0x1,%rax
ret

LLVM IR (-O0):
define i64 @foo(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
store i64 0, i64* %5
br label %6
6: ; preds = %2
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = sdiv i64 %7, %8
store i64 %9, i64* %5
br label %10
10: ; preds = %6
%11 = load i64, i64* %5
%12 = add nsw i64 %11, 1
ret i64 %12
}

LLVM IR (-O2):
define i64 @foo(i64 %0, i64 %1) {
%3 = sdiv i64 %0, %1
%4 = add nsw i64 %3, 1
ret i64 %4
}
void test_no_clause() {
  int i;
#pragma omp parallel master taskloop simd
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel master taskloop simd
  ++i;
}


x86 assembly (clang, -O0):
<test_no_clause>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_no_clause+0x28>
jmp    111a <test_no_clause+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_no_clause+0xb>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_no_clause() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 16
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, 1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
ret void
}

LLVM IR (-O2):
define void @test_no_clause() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
bool is_positive(int nr) {
  if (nr < 0)
    return 0;
  else if (nr > 0)
    return 1;
  else
    puts("Cheeky! :-P");
}


x86 assembly (clang, -O0):
<is_positive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1131 <is_positive+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1158 <is_positive+0x48>
cmpl   $0x0,-0x8(%rbp)
jle    1147 <is_positive+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1158 <is_positive+0x48>
lea    0xeb2(%rip),%rdi
call   1030 <puts@plt>
jmp    1158 <is_positive+0x48>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_positive>:
test   %edi,%edi
js     111c <is_positive+0xc>
mov    $0x1,%eax
je     111f <is_positive+0xf>
ret
xor    %eax,%eax
ret
push   %rax
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Cheeky! :-P\00"
define i32 @is_positive(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %3, %1, %5
%8 = phi i32 [ undef, %5 ], [ 0, %1 ], [ 1, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() { printf("Utilisation:\n./mpr -P imprimante referenceFichier\n"); }


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"Utilisation:\0A./mpr -P imprimante referenceFichier\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [50 x i8] c"Utilisation:\0A./mpr -P imprimante referenceFichier\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closep(int *fd) {
  if (*fd >= 0)
    close(*fd);
}


x86 assembly (clang, -O0):
<closep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jl     1134 <closep+0x24>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closep>:
mov    (%rdi),%edi
test   %edi,%edi
js     111b <closep+0xb>
jmp    1030 <close@plt>
ret

LLVM IR (-O0):
define void @closep(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
%9 = call i32 @close(i32 %8)
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @closep(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @close(i32 %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ displaycon_on();
int /*<<< orphan*/ lcd_on();
int /*<<< orphan*/ pwm_start();
void lcd_enable(void) {
  lcd_on();
  pwm_start();
  displaycon_on();
}


x86 assembly (clang, -O0):
<lcd_enable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <lcd_on@plt>
mov    $0x0,%al
call   1050 <pwm_start@plt>
mov    $0x0,%al
call   1030 <displaycon_on@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_enable>:
push   %rax
xor    %eax,%eax
call   1040 <lcd_on@plt>
xor    %eax,%eax
call   1050 <pwm_start@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <displaycon_on@plt>

LLVM IR (-O0):
define void @lcd_enable() {
%1 = call i32 (...) @lcd_on()
%2 = call i32 (...) @pwm_start()
%3 = call i32 (...) @displaycon_on()
ret void
}

LLVM IR (-O2):
define void @lcd_enable() {
%1 = tail call i32 (...) @lcd_on()
%2 = tail call i32 (...) @pwm_start()
%3 = tail call i32 (...) @displaycon_on()
ret void
}
/* Type definitions */
struct __sk_buff {
  int dummy;
};
typedef int /*<<< orphan*/ ____fmt;

/* Variables and functions */
int TC_H_MAKE(int, int);
int /*<<< orphan*/ trace_printk(char *, int);
__attribute__((section("bbb"), used)) int cls_bbb(struct __sk_buff *skb) {
  ({
    char ____fmt[] = "bbb\n";
    trace_printk(____fmt, sizeof(____fmt));
  });
  return TC_H_MAKE(1, 43);
}


x86 assembly (clang, -O0):
<cls_bbb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0xd(%rbp)
mov    0xec9(%rip),%al
mov    %al,-0x9(%rbp)
lea    -0xd(%rbp),%rdi
mov    $0x5,%esi
call   1030 <trace_printk@plt>
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
mov    $0x2b,%esi
call   1040 <TC_H_MAKE@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cls_bbb>:
push   %rax
movb   $0x0,0x4(%rsp)
movl   $0xa626262,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <trace_printk@plt>
mov    $0x1,%edi
mov    $0x2b,%esi
call   1040 <TC_H_MAKE@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.__sk_buff = type { i32 }
@__const.cls_bbb.____fmt = [5 x i8] c"bbb\0A\00"
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @cls_bbb to i8*)], section "llvm.metadata"
define i32 @cls_bbb(%struct.__sk_buff* %0) section "bbb" {
%2 = alloca %struct.__sk_buff*
%3 = alloca [5 x i8]
%4 = alloca i32
store %struct.__sk_buff* %0, %struct.__sk_buff** %2
%5 = bitcast [5 x i8]* %3 to i8*
%6 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%7 = call i32 @trace_printk(i8* %6, i32 5)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @TC_H_MAKE(i32 1, i32 43)
ret i32 %9
}

LLVM IR (-O2):
%struct.__sk_buff = type { i32 }
@__const.cls_bbb.____fmt = [5 x i8] c"bbb\0A\00"
@llvm.compiler.used = appending global [1 x i8*] [i8* bitcast (i32 (%struct.__sk_buff*)* @cls_bbb to i8*)], section "llvm.metadata"
define i32 @cls_bbb(%struct.__sk_buff* nocapture readnone %0) section "bbb" {
%2 = alloca [5 x i8]
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%4 = call i32 @trace_printk(i8* %3, i32 5)
%5 = call i32 @TC_H_MAKE(i32 1, i32 43)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
struct group {
  int /*<<< orphan*/ gr_gid;
};
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
struct group *getgrnam(char const *);
uid_t get_group_id(const char *group) {
  gid_t gid = 0;
  struct group *g = getgrnam(group);
  if (g)
    gid = g->gr_gid;
  return gid;
}


x86 assembly (clang, -O0):
<get_group_id>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getgrnam@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1144 <get_group_id+0x34>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_group_id>:
push   %rax
call   1030 <getgrnam@plt>
test   %rax,%rax
je     111f <get_group_id+0xf>
mov    (%rax),%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.group = type { i32 }
define i32 @get_group_id(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.group*
store i8* %0, i8** %2
store i32 0, i32* %3
%5 = load i8*, i8** %2
%6 = call %struct.group* @getgrnam(i8* %5)
store %struct.group* %6, %struct.group** %4
%7 = load %struct.group*, %struct.group** %4
%8 = icmp ne %struct.group* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load %struct.group*, %struct.group** %4
%11 = getelementptr inbounds %struct.group, %struct.group* %10, i32 0, i32 0
%12 = load i32, i32* %11
store i32 %12, i32* %3
br label %13
13: ; preds = %9, %1
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
%struct.group = type { i32 }
define i32 @get_group_id(i8* %0) {
%2 = tail call %struct.group* @getgrnam(i8* %0)
%3 = icmp eq %struct.group* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = getelementptr inbounds %struct.group, %struct.group* %2, i64 0, i32 0
%6 = load i32, i32* %5
br label %7
7: ; preds = %4, %1
%8 = phi i32 [ %6, %4 ], [ 0, %1 ]
ret i32 %8
}
/* Variables and functions */
unsigned long ntohl(unsigned long);
int mask_to_bits(unsigned long mask) {
  int n = 32;
  for (mask = ntohl(mask); (mask & 1) == 0 && n > 0; mask >>= 1) {
    n--;
  }
  return n;
}


x86 assembly (clang, -O0):
<mask_to_bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ntohl@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
and    $0x1,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0xd(%rbp)
jne    1151 <mask_to_bits+0x41>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1161 <mask_to_bits+0x51>
jmp    117b <mask_to_bits+0x6b>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1130 <mask_to_bits+0x20>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mask_to_bits>:
push   %rax
call   1030 <ntohl@plt>
mov    $0x20,%ecx
test   $0x1,%al
jne    1141 <mask_to_bits+0x31>
mov    $0x20,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x1(%rdx),%ecx
test   $0x2,%al
jne    1141 <mask_to_bits+0x31>
shr    %rax
cmp    $0x1,%edx
mov    %ecx,%edx
ja     1130 <mask_to_bits+0x20>
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mask_to_bits(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
store i32 32, i32* %3
%4 = load i64, i64* %2
%5 = call i64 @ntohl(i64 %4)
store i64 %5, i64* %2
br label %6
6: ; preds = %18, %1
%7 = load i64, i64* %2
%8 = and i64 %7, 1
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 0
br label %13
13: ; preds = %10, %6
%14 = phi i1 [ false, %6 ], [ %12, %10 ]
br i1 %14, label %15, label %21
15: ; preds = %13
%16 = load i32, i32* %3
%17 = add nsw i32 %16, -1
store i32 %17, i32* %3
br label %18
18: ; preds = %15
%19 = load i64, i64* %2
%20 = lshr i64 %19, 1
store i64 %20, i64* %2
br label %6
21: ; preds = %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @mask_to_bits(i64 %0) {
%2 = tail call i64 @ntohl(i64 %0)
%3 = and i64 %2, 1
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %14
5: ; preds = %1, %5
%6 = phi i32 [ %8, %5 ], [ 32, %1 ]
%7 = phi i64 [ %9, %5 ], [ %2, %1 ]
%8 = add nsw i32 %6, -1
%9 = lshr i64 %7, 1
%10 = and i64 %7, 2
%11 = icmp eq i64 %10, 0
%12 = icmp ugt i32 %6, 1
%13 = select i1 %11, i1 %12, i1 false
br i1 %13, label %5, label %14
14: ; preds = %5, %1
%15 = phi i32 [ 32, %1 ], [ %8, %5 ]
ret i32 %15
}
/* Variables and functions */
int access_ok(const void *p, size_t size) {
  unsigned long addr;
  addr = (unsigned long)p;
  if (addr >= (1L << 32) || addr + size >= (1L << 32) || addr + size < addr)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<access_ok>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movabs $0x100000000,%rax
cmp    %rax,-0x20(%rbp)
jae    1155 <access_ok+0x55>
mov    -0x20(%rbp),%rax
add    -0x18(%rbp),%rax
movabs $0x100000000,%rcx
cmp    %rcx,%rax
jae    1155 <access_ok+0x55>
mov    -0x20(%rbp),%rax
add    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1161 <access_ok+0x61>
movl   $0x0,-0x4(%rbp)
jmp    1168 <access_ok+0x68>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<access_ok>:
xor    %eax,%eax
mov    %rdi,%rcx
shr    $0x20,%rcx
jne    1123 <access_ok+0x23>
add    %rdi,%rsi
mov    %rsi,%rax
shr    $0x20,%rax
sete   %al
cmp    %rdi,%rsi
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @access_ok(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = icmp ugt i8* %0, inttoptr (i64 4294967295 to i8*)
br i1 %4, label %11, label %5
5: ; preds = %2
%6 = add i64 %3, %1
%7 = icmp ult i64 %6, 4294967296
%8 = icmp uge i64 %6, %3
%9 = and i1 %7, %8
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %5, %2
%12 = phi i32 [ 0, %2 ], [ %10, %5 ]
ret i32 %12
}
/* Variables and functions */
unsigned long syscall(int, void *);
int brk(void *end) { return -(syscall(45, end) != (unsigned long)end); }


x86 assembly (clang, -O0):
<brk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x2d,%edi
call   1030 <syscall@plt>
mov    -0x8(%rbp),%rcx
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%ecx
xor    %eax,%eax
sub    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brk>:
push   %rbx
mov    %rdi,%rbx
mov    $0x2d,%edi
mov    %rbx,%rsi
call   1030 <syscall@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @brk(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @syscall(i32 45, i8* %3)
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i64
%7 = icmp ne i64 %4, %6
%8 = zext i1 %7 to i32
%9 = sub nsw i32 0, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @brk(i8* %0) {
%2 = tail call i64 @syscall(i32 45, i8* %0)
%3 = ptrtoint i8* %0 to i64
%4 = icmp ne i64 %2, %3
%5 = sext i1 %4 to i32
ret i32 %5
}
void glProgramUniform1f(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glProgramUniform1f() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int multipliser32(int, int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
void main(void) {
  uint32_t a = 14, b = 15, ab = 0;
  printf("multipliser32 :\n\t %d * %d = %d\n", a, b, multipliser32(a, b, ab));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xe,-0x4(%rbp)
movl   $0xf,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <multipliser32@plt>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    %eax,%ecx
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xe,%edi
mov    $0xf,%esi
xor    %edx,%edx
call   1030 <multipliser32@plt>
lea    0xec7(%rip),%rdi
mov    $0xe,%esi
mov    $0xf,%edx
mov    %eax,%ecx
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [32 x i8] c"multipliser32 :\0A\09 %d * %d = %d\0A\00"
define void @main() {
%1 = tail call i32 @multipliser32(i32 14, i32 15, i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 14, i32 15, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *);
void XMLDB_Generate_End_List_Item(FILE *dest_doc) {
  fprintf(dest_doc, "%s", "</para></listitem>");
}


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

x86 assembly (clang, -O2):
<XMLDB_Generate_End_List_Item>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [19 x i8] c"</para></listitem>\00"
define void @XMLDB_Generate_End_List_Item(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"</para></listitem>\00"
define void @XMLDB_Generate_End_List_Item(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i64 18, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
void _fehler(bool x) {
  if (x) {
    char *clear = malloc(1000 * sizeof(char));
    scanf("%999s", clear);
    free(clear);
  }
  printf("Bitte gültige Eingabe vornehmen\n\n");
}


x86 assembly (clang, -O0):
<_fehler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     117c <_fehler+0x3c>
mov    $0x3e8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe92(%rip),%rdi
call   1060 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fehler>:
test   %edi,%edi
je     116a <_fehler+0x2a>
push   %rbx
mov    $0x3e8,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
lea    0xea7(%rip),%rdi
mov    %rax,%rsi
call   1060 <scanf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
pop    %rbx
lea    0xe95(%rip),%rdi
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%999s\00"
@.str.1 = [35 x i8] c"Bitte g\C3\BCltige Eingabe vornehmen\0A\0A\00"
define void @_fehler(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = call i8* @malloc(i32 1000)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %3
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %6, %1
%13 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%999s\00"
@str = [34 x i8] c"Bitte g\C3\BCltige Eingabe vornehmen\0A\00"
define void @_fehler(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call dereferenceable_or_null(1000) i8* @malloc(i32 1000)
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = tail call i32 @free(i8* %4)
br label %7
7: ; preds = %3, %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
int wpas_binder_unregister_interface(struct wpa_supplicant *wpa_s) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
define i32 @wpas_binder_unregister_interface(%struct.wpa_supplicant* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
float pow2f(float);
float pow4f(float x) { return pow2f(pow2f(x)); }


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

x86 assembly (clang, -O2):
<pow4f>:
push   %rax
call   1030 <pow2f@plt>
pop    %rax
jmp    1030 <pow2f@plt>

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

LLVM IR (-O2):
define float @pow4f(float %0) {
%2 = tail call float @pow2f(float %0)
%3 = tail call float @pow2f(float %2)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ mkstemp_method();
int /*<<< orphan*/ tmpfile_method();
int /*<<< orphan*/ tmpnam_and_open();
int main(void) {
  tmpnam_and_open();
  tmpfile_method();
  mkstemp_method();
  getchar();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <tmpnam_and_open@plt>
xor    %eax,%eax
call   1060 <tmpfile_method@plt>
xor    %eax,%eax
call   1030 <mkstemp_method@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @tmpnam_and_open()
%3 = call i32 (...) @tmpfile_method()
%4 = call i32 (...) @mkstemp_method()
%5 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @tmpnam_and_open()
%2 = tail call i32 (...) @tmpfile_method()
%3 = tail call i32 (...) @mkstemp_method()
%4 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int /*<<< orphan*/ swap(int *, int *);
int main(int argc, const char *argv[]) {
  int a = 10, b = 20;
  int *x = &a;
  swap(&a, &b);
  printf("a = %d, b = %d\n", a, b);
  *x = 30;
  printf("a = %d\n", a);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xa,-0x14(%rbp)
movl   $0x14,-0x18(%rbp)
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <swap@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xe9a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
movl   $0x1e,(%rax)
mov    -0x14(%rbp),%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,(%rsp)
movl   $0x14,0x4(%rsp)
mov    %rsp,%rdi
lea    0x4(%rsp),%rsi
call   1040 <swap@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x1e,(%rsp)
lea    0xeb0(%rip),%rdi
mov    $0x1e,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
@.str.1 = [8 x i8] c"a = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 10, i32* %6
store i32 20, i32* %7
store i32* %6, i32** %8
%9 = call i32 @swap(i32* %6, i32* %7)
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %11)
%13 = load i32*, i32** %8
store i32 30, i32* %13
%14 = load i32, i32* %6
%15 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"a = %d, b = %d\0A\00"
@.str.1 = [8 x i8] c"a = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 10, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 20, i32* %4
%7 = call i32 @swap(i32* %3, i32* %4)
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %9)
store i32 30, i32* %3
%11 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 30)
ret i32 0
}
void ff_yuv2rgb_init_ppc() {}


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

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

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

LLVM IR (-O2):
define void @ff_yuv2rgb_init_ppc() {
ret void
}
int fun1162() { return 1162; }


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

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

LLVM IR (-O0):
define i32 @fun1162() {
ret i32 1162
}

LLVM IR (-O2):
define i32 @fun1162() {
ret i32 1162
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int x, y, z;
  x = __VERIFIER_nondet_int();
  y = __VERIFIER_nondet_int();
  z = __VERIFIER_nondet_int();
  while (y > 0 && x >= z) {
    z = z + y;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x11(%rbp)
jle    1158 <main+0x48>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
setge  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1168 <main+0x58>
jmp    1176 <main+0x66>
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    113d <main+0x2d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %3
%7 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %7, i32* %4
br label %8
8: ; preds = %17, %0
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %2
%13 = load i32, i32* %4
%14 = icmp sge i32 %12, %13
br label %15
15: ; preds = %11, %8
%16 = phi i1 [ false, %8 ], [ %14, %11 ]
br i1 %16, label %17, label %21
17: ; preds = %15
%18 = load i32, i32* %4
%19 = load i32, i32* %3
%20 = add nsw i32 %18, %19
store i32 %20, i32* %4
br label %8
21: ; preds = %15
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
%3 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isgraph(int);
void t_isgraph_0xa3() {
  Assert_real((isgraph(163) == 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_isgraph.c",
              820, ("isgraph should be 0 for 0xa3"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xa3\00"
define void @t_isgraph_0xa3() {
%1 = call i64 @isgraph(i32 163)
%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 820, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isgraph.c\00"
@.str.1 = [29 x i8] c"isgraph should be 0 for 0xa3\00"
define void @t_isgraph_0xa3() {
%1 = tail call i64 @isgraph(i32 163)
%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 820, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void nfsd4_exit_pnfs(void) {}


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

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

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

LLVM IR (-O2):
define void @nfsd4_exit_pnfs() {
ret void
}
f(unsigned i) { return i > 5; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    $0x6,%edi
setae  %al
ret

LLVM IR (-O0):
define i32 @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ugt i32 %3, 5
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp ugt i32 %0, 5
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ strncasecmp(char *, char *, int);
void strncasecmp_null_1() {
  char *x = "123";
  char *y = 0;
  strncasecmp(x, y, 3);
}


x86 assembly (clang, -O0):
<strncasecmp_null_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rax
mov    %rax,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncasecmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"123\00"
define void @strncasecmp_null_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* null, i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncasecmp(i8* %3, i8* %4, i32 3)
ret void
}

LLVM IR (-O2):
define void @strncasecmp_null_1() {
ret void
}
/* Type definitions */
struct stat {
  size_t st_size;
};

/* Variables and functions */
int /*<<< orphan*/ fstat(int, struct stat *);
size_t calculate_size(int fd) {
  struct stat st;
  fstat(fd, &st);
  return st.st_size;
}


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

x86 assembly (clang, -O2):
<calculate_size>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
mov    (%rsp),%rax
pop    %rcx
ret

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

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @calculate_size(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ clean_exit_with_status(int /*<<< orphan*/);
void clean_exit(int sig __attribute__((unused))) {
  clean_exit_with_status(EXIT_SUCCESS);
}


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

x86 assembly (clang, -O2):
<clean_exit>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
jmp    1030 <clean_exit_with_status@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @clean_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @clean_exit_with_status(i32 %3)
ret void
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @clean_exit(i32 %0) {
%2 = load i32, i32* @EXIT_SUCCESS
%3 = tail call i32 @clean_exit_with_status(i32 %2)
ret void
}
void foo_1_1_1_1_2_2_1_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_1_1_1_2_2_1_1_1() {
ret void
}
/* Variables and functions */
int get_any_unsigned_char();
int /*<<< orphan*/ putchar(int);
void main() {
  int i;
  i = get_any_unsigned_char();
  putchar(i);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <get_any_unsigned_char@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = call i32 (...) @get_any_unsigned_char()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @putchar(i32 %3)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @get_any_unsigned_char()
%2 = tail call i32 @putchar(i32 %1)
ret void
}
double argInit_real_T(void) { return 0.0; }


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

x86 assembly (clang, -O2):
<argInit_real_T>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @argInit_real_T() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @argInit_real_T() {
ret double 0.000000e+00
}
void AS1_OnRxChar(void) {}


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

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

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

LLVM IR (-O2):
define void @AS1_OnRxChar() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ getpid();
int main() {
  if (getpid() == 0) {
    abort();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getpid@plt>
cmp    $0x0,%rax
jne    113c <main+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getpid@plt>
test   %rax,%rax
je     1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = call i64 (...) @getpid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @getpid()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
long strtol(char *, int /*<<< orphan*/ *, int);
long string2long(char *string) { return strtol(string, NULL, 10); }


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

x86 assembly (clang, -O2):
<string2long>:
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtol@plt>

LLVM IR (-O0):
define i64 @string2long(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strtol(i8* %3, i32* null, i32 10)
ret i64 %4
}

LLVM IR (-O2):
define i64 @string2long(i8* nocapture %0) {
%2 = tail call i64 @strtol(i8* nocapture %0, i32* null, i32 10)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ runalltests_behaviour_linear_hash();
int main(void) {
  runalltests_behaviour_linear_hash();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @runalltests_behaviour_linear_hash()
ret i32 0
}
void SSMR3DeregisterExternal(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3DeregisterExternal() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void reg_mm(uint32_t *regPtr) { *regPtr -= 4; }


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

x86 assembly (clang, -O2):
<reg_mm>:
addl   $0xfffffffc,(%rdi)
ret

LLVM IR (-O0):
define void @reg_mm(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = sub nsw i32 %4, 4
store i32 %5, i32* %3
ret void
}

LLVM IR (-O2):
define void @reg_mm(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, -4
store i32 %3, i32* %0
ret void
}