xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ ssize_t;

/* Variables and functions */
scalar_t__ _hurd_set_host_config(char *, char const *, size_t);
int setdomainname(const char *name, size_t len) {
  ssize_t n = _hurd_set_host_config("/etc/nisdomain", name, len);
  return n < 0 ? -1 : 0;
}


x86 assembly (clang, -O0):
<setdomainname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <_hurd_set_host_config@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setdomainname>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee2(%rip),%rdi
call   1030 <_hurd_set_host_config@plt>
sar    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/etc/nisdomain\00"
define i32 @setdomainname(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i64 @_hurd_set_host_config(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %6, i64 %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = icmp slt i64 %9, 0
%11 = zext i1 %10 to i64
%12 = select i1 %10, i32 -1, i32 0
ret i32 %12
}

LLVM IR (-O2):
@.str = [15 x i8] c"/etc/nisdomain\00"
define i32 @setdomainname(i8* %0, i64 %1) {
%3 = tail call i64 @_hurd_set_host_config(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
%4 = ashr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}
int test_imm_E3uint64_highword_reg(unsigned long long val) {
  return ((val >> 32) & (0xE3 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_E3uint64_highword_reg>:
movabs $0xe300000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_E3uint64_highword_reg(i64 %0) {
%2 = and i64 %0, 974957576192
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void g_scanner_set_scope() {}


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

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

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

LLVM IR (-O2):
define void @g_scanner_set_scope() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int set_seed(int seed) {
  int *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(998, &seed, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<set_seed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x3e6,%edi
lea    -0x4(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_seed>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x3e6,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @set_seed(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca double*
store i32 %0, i32* %2
%6 = load i32*, i32** %3
%7 = load double*, double** %5
%8 = call i32 @_ada_use_c2phc4c(i32 998, i32* %2, i32* %6, double* %7, i32 0)
store i32 %8, i32* %4
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
define i32 @set_seed(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @_ada_use_c2phc4c(i32 998, i32* %2, i32* undef, double* undef, i32 0)
ret i32 %3
}
void INT_Excep_CMTW0_CMWI0(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_CMTW0_CMWI0() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void hit(void) { say("I can't read, damnit!", 1); }


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

x86 assembly (clang, -O2):
<hit>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"I can't read, damnit!\00"
define void @hit() {
%1 = call i32 @say(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"I can't read, damnit!\00"
define void @hit() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char *, int);
void uninivar_strchr(void) {
  char *cs;
  int c;
  (void)strchr(cs, c);
}


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

x86 assembly (clang, -O2):
<uninivar_strchr>:
jmp    1030 <strchr@plt>

LLVM IR (-O0):
define void @uninivar_strchr() {
%1 = alloca i8*
%2 = alloca i32
%3 = load i8*, i8** %1
%4 = load i32, i32* %2
%5 = call i32 @strchr(i8* %3, i32 %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_strchr() {
%1 = tail call i32 @strchr(i8* undef, i32 undef)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ readfp(int /*<<< orphan*/ *);
void readin(const char *filename) {
  FILE *fp;
  fp = fopen(filename, "rb");
  if (!fp)
    exit(1);
  readfp(fp);
  fclose(fp);
}


x86 assembly (clang, -O0):
<readin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1175 <readin+0x35>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rdi
call   1060 <readfp@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readin>:
push   %rbx
lea    0xeb8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1166 <readin+0x26>
mov    %rax,%rbx
mov    %rax,%rdi
call   1060 <readfp@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define void @readin(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32* @fopen(i8* %4, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = icmp ne i32* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = load i32*, i32** %3
%12 = call i32 @readfp(i32* %11)
%13 = load i32*, i32** %3
%14 = call i32 @fclose(i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define void @readin(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %1
%7 = tail call i32 @readfp(i32* %2)
%8 = tail call i32 @fclose(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void caml_gr_fill_arc() { exit(1); }


x86 assembly (clang, -O0):
<caml_gr_fill_arc>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<caml_gr_fill_arc>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @caml_gr_fill_arc() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @caml_gr_fill_arc() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ write_com_4bit(int);
void lcd_home_1() {
  write_com_4bit(0x0002);
  while (write_com_4bit(0x0100) != 0)
    ;
}


x86 assembly (clang, -O0):
<lcd_home_1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <write_com_4bit@plt>
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
cmp    $0x0,%rax
je     1137 <lcd_home_1+0x27>
jmp    111e <lcd_home_1+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_home_1>:
push   %rax
mov    $0x2,%edi
call   1030 <write_com_4bit@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x100,%edi
call   1030 <write_com_4bit@plt>
test   %rax,%rax
jne    1120 <lcd_home_1+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @lcd_home_1() {
%1 = call i64 @write_com_4bit(i32 2)
br label %2
2: ; preds = %5, %0
%3 = call i64 @write_com_4bit(i32 256)
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @lcd_home_1() {
%1 = tail call i64 @write_com_4bit(i32 2)
br label %2
2: ; preds = %2, %0
%3 = tail call i64 @write_com_4bit(i32 256)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret void
}
void XrmUniqueQuark() {}


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

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

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

LLVM IR (-O2):
define void @XrmUniqueQuark() {
ret void
}
void fs(int *y) {
  char x;
  asm(""
      : "=@cc"
        "s"(x));
  if (!x)
    *y = 0;
}


x86 assembly (clang, -O0):
<fs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
sets   %al
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
jne    1122 <fs+0x22>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs>:
jns    1103 <fs+0x3>
ret
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @fs(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = call i8 asm "", "={@ccs},~{dirflag},~{fpsr},~{flags}"()
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32*, i32** %2
store i32 0, i32* %8
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @fs(i32* nocapture writeonly %0) {
%2 = tail call i8 asm "", "={@ccs},~{dirflag},~{fpsr},~{flags}"()
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
store i32 0, i32* %0
br label %5
5: ; preds = %4, %1
ret void
}
int *func(int a, int *b) {
  static int result = 0;
  int i;
  for (i = 0; i < a; i++) {
    int temp = (*b)--;
    result += temp;
  }
  return &result;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    114b <func+0x4b>
mov    -0x10(%rbp),%rcx
mov    (%rcx),%eax
mov    %eax,%edx
add    $0xffffffff,%edx
mov    %edx,(%rcx)
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    0x2eed(%rip),%eax
mov    %eax,0x2ee7(%rip)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1112 <func+0x12>
lea    0x2ed2(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
test   %edi,%edi
jle    1142 <func+0x42>
cmp    $0x1,%edi
je     112f <func+0x2f>
mov    %edi,%eax
and    $0xfffffffe,%eax
xchg   %ax,%ax
mov    (%rsi),%ecx
lea    -0x1(%rcx),%edx
mov    %edx,(%rsi)
add    %ecx,0x2f07(%rip)
mov    (%rsi),%ecx
lea    -0x1(%rcx),%edx
mov    %edx,(%rsi)
add    %ecx,0x2efa(%rip)
add    $0xfffffffe,%eax
jne    1110 <func+0x10>
test   $0x1,%dil
je     1142 <func+0x42>
mov    (%rsi),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,(%rsi)
add    %eax,0x2ee2(%rip)
lea    0x2edb(%rip),%rax
ret

LLVM IR (-O0):
@func.result = internal global i32 0
define i32* @func(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %7
7: ; preds = %18, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %21
11: ; preds = %7
%12 = load i32*, i32** %4
%13 = load i32, i32* %12
%14 = add nsw i32 %13, -1
store i32 %14, i32* %12
store i32 %13, i32* %6
%15 = load i32, i32* %6
%16 = load i32, i32* @func.result
%17 = add nsw i32 %16, %15
store i32 %17, i32* @func.result
br label %18
18: ; preds = %11
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %7
21: ; preds = %7
ret i32* @func.result
}

LLVM IR (-O2):
@func.result = internal global i32 0
define i32* @func(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %28
4: ; preds = %2
%5 = and i32 %0, 1
%6 = icmp eq i32 %0, 1
br i1 %6, label %21, label %7
7: ; preds = %4
%8 = and i32 %0, -2
br label %9
9: ; preds = %9, %7
%10 = phi i32 [ 0, %7 ], [ %19, %9 ]
%11 = load i32, i32* %1
%12 = add nsw i32 %11, -1
store i32 %12, i32* %1
%13 = load i32, i32* @func.result
%14 = add nsw i32 %13, %11
store i32 %14, i32* @func.result
%15 = load i32, i32* %1
%16 = add nsw i32 %15, -1
store i32 %16, i32* %1
%17 = load i32, i32* @func.result
%18 = add nsw i32 %17, %15
store i32 %18, i32* @func.result
%19 = add i32 %10, 2
%20 = icmp eq i32 %19, %8
br i1 %20, label %21, label %9
21: ; preds = %9, %4
%22 = icmp eq i32 %5, 0
br i1 %22, label %28, label %23
23: ; preds = %21
%24 = load i32, i32* %1
%25 = add nsw i32 %24, -1
store i32 %25, i32* %1
%26 = load i32, i32* @func.result
%27 = add nsw i32 %26, %24
store i32 %27, i32* @func.result
br label %28
28: ; preds = %23, %21, %2
ret i32* @func.result
}
/* Variables and functions */
int /*<<< orphan*/ writeDebugStreamLine(char *);
void writeOnRunDebugLines() {
  writeDebugStreamLine("Logging code output.");
  writeDebugStreamLine(
      "Don't forget to add your motor config to the beginning of the output.");
  writeDebugStreamLine("");
  writeDebugStreamLine("---");
}


x86 assembly (clang, -O0):
<writeOnRunDebugLines>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
lea    0xeee(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
lea    0xf2b(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
lea    0xf1c(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeOnRunDebugLines>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
lea    0xef1(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
lea    0xf2e(%rip),%rdi
call   1030 <writeDebugStreamLine@plt>
lea    0xf1f(%rip),%rdi
pop    %rax
jmp    1030 <writeDebugStreamLine@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Logging code output.\00"
@.str.1 = [70 x i8] c"Don't forget to add your motor config to the beginning of the output.\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"---\00"
define void @writeOnRunDebugLines() {
%1 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"Logging code output.\00"
@.str.1 = [70 x i8] c"Don't forget to add your motor config to the beginning of the output.\00"
@.str.2 = [1 x i8] zeroinitializer
@.str.3 = [4 x i8] c"---\00"
define void @writeOnRunDebugLines() {
%1 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @writeDebugStreamLine(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void foo423(int p) {}


x86 assembly (clang, -O0):
<foo423>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo423(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ sysctlbyname(char *, long *, size_t *, int /*<<< orphan*/ *,
                        int /*<<< orphan*/);
void get_cp_times(long *pcpu, size_t count) {
  size_t pcpu_size = sizeof(*pcpu) * count;
  if (sysctlbyname("kern.cp_times", pcpu, &pcpu_size, NULL, 0) < 0) {
    return;
  }
}


x86 assembly (clang, -O0):
<get_cp_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
lea    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
xor    %r8d,%r8d
call   1030 <sysctlbyname@plt>
cmp    $0x0,%rax
jge    1156 <get_cp_times+0x46>
jmp    1156 <get_cp_times+0x46>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cp_times>:
push   %rax
mov    %rdi,%rax
shl    $0x3,%rsi
mov    %rsi,(%rsp)
lea    0xedd(%rip),%rdi
mov    %rsp,%rdx
mov    %rax,%rsi
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1030 <sysctlbyname@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"kern.cp_times\00"
define void @get_cp_times(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
%5 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = mul i64 8, %6
store i64 %7, i64* %5
%8 = load i64*, i64** %3
%9 = call i64 @sysctlbyname(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64* %8, i64* %5, i32* null, i32 0)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
br label %12
12: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"kern.cp_times\00"
define void @get_cp_times(i64* %0, i64 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = shl i64 %1, 3
store i64 %5, i64* %3
%6 = call i64 @sysctlbyname(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i64* %0, i64* %3, i32* null, i32 0)
ret void
}
int endwin() { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @endwin() {
ret i32 0
}
unsigned xrop3_180_0_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = S & stk3;
  stk1 = T ^ stk2;
  return stk1;
}


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

x86 assembly (clang, -O2):
<xrop3_180_0_0>:
shl    $0x8,%edi
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_180_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %7
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
ret i32 %31
}

LLVM IR (-O2):
define i32 @xrop3_180_0_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, %4
ret i32 %7
}
double pathconN_nm2_twice(double x) { return x + x; }


x86 assembly (clang, -O0):
<pathconN_nm2_twice>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm2_twice>:
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @pathconN_nm2_twice(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fadd double %3, %4
ret double %5
}

LLVM IR (-O2):
define double @pathconN_nm2_twice(double %0) {
%2 = fadd double %0, %0
ret double %2
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCSANOW;
int /*<<< orphan*/ tcgetattr(int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ tcsetattr(int /*<<< orphan*/, int /*<<< orphan*/,
                             struct termios *);
extern void tty_mode(int how) {
  static struct termios original_mode;
  if (how == 0) {
    tcgetattr(0, &original_mode);
  } else {
    tcsetattr(0, TCSANOW, &original_mode);
  }
}


x86 assembly (clang, -O0):
<tty_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1148 <tty_mode+0x28>
xor    %edi,%edi
lea    0x2ef6(%rip),%rsi
call   1030 <tcgetattr@plt>
jmp    115f <tty_mode+0x3f>
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edi,%edi
lea    0x2eda(%rip),%rdx
call   1040 <tcsetattr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_mode>:
test   %edi,%edi
je     113b <tty_mode+0x1b>
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
lea    0x2f00(%rip),%rdx
xor    %edi,%edi
jmp    1040 <tcsetattr@plt>
lea    0x2ef2(%rip),%rsi
xor    %edi,%edi
jmp    1030 <tcgetattr@plt>

LLVM IR (-O0):
%struct.termios = type { i32 }
@tty_mode.original_mode = internal global %struct.termios zeroinitializer
@TCSANOW = global i32 0
define void @tty_mode(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @tcgetattr(i32 0, %struct.termios* @tty_mode.original_mode)
br label %10
7: ; preds = %1
%8 = load i32, i32* @TCSANOW
%9 = call i32 @tcsetattr(i32 0, i32 %8, %struct.termios* @tty_mode.original_mode)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@tty_mode.original_mode = internal global %struct.termios zeroinitializer
@TCSANOW = global i32 0
define void @tty_mode(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @tcgetattr(i32 0, %struct.termios* @tty_mode.original_mode)
br label %8
5: ; preds = %1
%6 = load i32, i32* @TCSANOW
%7 = tail call i32 @tcsetattr(i32 0, i32 %6, %struct.termios* @tty_mode.original_mode)
br label %8
8: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_minpos_epu16(int /*<<< orphan*/);
__m128i __attribute__((__target__("sse4.1"))) mm_minpos_epu16_wrap(__m128i v) {
  return _mm_minpos_epu16(v);
}


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

x86 assembly (clang, -O2):
<mm_minpos_epu16_wrap>:
jmp    1030 <_mm_minpos_epu16@plt>

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

LLVM IR (-O2):
define i32 @mm_minpos_epu16_wrap(i32 %0) {
%2 = tail call i32 @_mm_minpos_epu16(i32 %0)
ret i32 %2
}
void RTStrSpaceRemove(void) {}


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

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

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

LLVM IR (-O2):
define void @RTStrSpaceRemove() {
ret void
}
/* Variables and functions */
scalar_t__ isnull(int *);
int g1(int *y) {
  if (isnull(y)) {
    return 0;
  }
  return *y;
}


x86 assembly (clang, -O0):
<g1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <isnull@plt>
cmp    $0x0,%rax
je     113b <g1+0x2b>
movl   $0x0,-0x4(%rbp)
jmp    1144 <g1+0x34>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g1>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isnull@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1125 <g1+0x15>
pop    %rbx
ret
mov    (%rbx),%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @g1(i32* %0) {
%2 = tail call i64 @isnull(i32* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = load i32, i32* %0
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
int test() {
  int biv, giv;
  for (biv = 0, giv = 0; giv != 8; biv++)
    giv = biv * 8;
  return giv;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
je     1133 <test+0x33>
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1112 <test+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test() {
ret i32 8
}
/* Variables and functions */
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
int /*<<< orphan*/ set_halt_until_mbus_rx();
int /*<<< orphan*/ set_halt_until_mbus_tx();
void flash_turn_on() {
  set_halt_until_mbus_rx();
  mbus_remote_register_write(0x9, 0x11, 0x00003F);
  set_halt_until_mbus_tx();
}


x86 assembly (clang, -O0):
<flash_turn_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <set_halt_until_mbus_rx@plt>
mov    $0x9,%edi
mov    $0x11,%esi
mov    $0x3f,%edx
call   1050 <mbus_remote_register_write@plt>
mov    $0x0,%al
call   1040 <set_halt_until_mbus_tx@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<flash_turn_on>:
push   %rax
xor    %eax,%eax
call   1030 <set_halt_until_mbus_rx@plt>
mov    $0x9,%edi
mov    $0x11,%esi
mov    $0x3f,%edx
call   1050 <mbus_remote_register_write@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <set_halt_until_mbus_tx@plt>

LLVM IR (-O0):
define void @flash_turn_on() {
%1 = call i32 (...) @set_halt_until_mbus_rx()
%2 = call i32 @mbus_remote_register_write(i32 9, i32 17, i32 63)
%3 = call i32 (...) @set_halt_until_mbus_tx()
ret void
}

LLVM IR (-O2):
define void @flash_turn_on() {
%1 = tail call i32 (...) @set_halt_until_mbus_rx()
%2 = tail call i32 @mbus_remote_register_write(i32 9, i32 17, i32 63)
%3 = tail call i32 (...) @set_halt_until_mbus_tx()
ret void
}
/* Variables and functions */
int llvm_cas(int volatile *, int, int);
int foo10(volatile int *add, int from, int to) {
  return llvm_cas(add, from, to);
}


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

x86 assembly (clang, -O2):
<foo10>:
jmp    1030 <llvm_cas@plt>

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

LLVM IR (-O2):
define i32 @foo10(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @llvm_cas(i32* %0, i32 %1, i32 %2)
ret i32 %4
}
int test_imm_58int8_mem(signed char *val) {
  return ((*val) & (0x58 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_58int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x58,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_58int8_mem>:
testb  $0x58,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_58int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 88
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int QuxSingle(void) {
  return 41;
  return 42;
  return 43;
}


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

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

LLVM IR (-O0):
define i32 @QuxSingle() {
ret i32 41
}

LLVM IR (-O2):
define i32 @QuxSingle() {
ret i32 41
}
/* Variables and functions */
int /*<<< orphan*/ render_pixel_transform(double *, double *, int, int);
int /*<<< orphan*/ world_render_transform(double *, double *, int, int);
void world_pixel_transform(double *cx, double *cy, int sx, int sy) {
  world_render_transform(cx, cy, sx, sy);
  render_pixel_transform(cx, cy, sx, sy);
}


x86 assembly (clang, -O0):
<world_pixel_transform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <world_render_transform@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1040 <render_pixel_transform@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<world_pixel_transform>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %rsi,%rbx
mov    %rdi,%rbp
call   1030 <world_render_transform@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r15d,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <render_pixel_transform@plt>

LLVM IR (-O0):
define void @world_pixel_transform(double* %0, double* %1, i32 %2, i32 %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load double*, double** %5
%10 = load double*, double** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @world_render_transform(double* %9, double* %10, i32 %11, i32 %12)
%14 = load double*, double** %5
%15 = load double*, double** %6
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = call i32 @render_pixel_transform(double* %14, double* %15, i32 %16, i32 %17)
ret void
}

LLVM IR (-O2):
define void @world_pixel_transform(double* %0, double* %1, i32 %2, i32 %3) {
%5 = tail call i32 @world_render_transform(double* %0, double* %1, i32 %2, i32 %3)
%6 = tail call i32 @render_pixel_transform(double* %0, double* %1, i32 %2, i32 %3)
ret void
}
int PoliczSpacje(char *Tekst) {
  int Ilosc = 0;
  for (; *Tekst; ++Tekst)
    if (*Tekst == ' ')
      ++Ilosc;
  return Ilosc;
}


x86 assembly (clang, -O0):
<PoliczSpacje>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     114b <PoliczSpacje+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1135 <PoliczSpacje+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <PoliczSpacje+0x3a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <PoliczSpacje+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PoliczSpacje>:
xor    %eax,%eax
jmp    1117 <PoliczSpacje+0x17>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0x20,%cl
je     1110 <PoliczSpacje+0x10>
test   %cl,%cl
jne    1113 <PoliczSpacje+0x13>
ret

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

LLVM IR (-O2):
define i32 @PoliczSpacje(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i32 [ 0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %8 [
i8 0, label %11
i8 32, label %6
]
6: ; preds = %2
%7 = add nsw i32 %4, 1
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i32 %4
}
void CRYPTO_realloc_clean(void) {}


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

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

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

LLVM IR (-O2):
define void @CRYPTO_realloc_clean() {
ret void
}
int f() { return 123; }


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

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

LLVM IR (-O0):
define i32 @f() {
ret i32 123
}

LLVM IR (-O2):
define i32 @f() {
ret i32 123
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ flush_buffer(int /*<<< orphan*/ *, char *, size_t *);
void handle_buffer(FILE *f, char *buffer, const size_t max_buf,
                   size_t *buf_idx_ptr, size_t l) {
  *buf_idx_ptr += l;
  if (*buf_idx_ptr > max_buf - 64) {
    flush_buffer(f, buffer, buf_idx_ptr);
  }
}


x86 assembly (clang, -O0):
<handle_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
mov    -0x20(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x18(%rbp),%rcx
sub    $0x40,%rcx
cmp    %rcx,%rax
jbe    1163 <handle_buffer+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <flush_buffer@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_buffer>:
add    (%rcx),%r8
mov    %r8,(%rcx)
add    $0xffffffffffffffc0,%rdx
cmp    %rdx,%r8
jbe    1127 <handle_buffer+0x17>
mov    %rcx,%rdx
jmp    1030 <flush_buffer@plt>
ret

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

LLVM IR (-O2):
define void @handle_buffer(i32* %0, i8* %1, i64 %2, i64* %3, i64 %4) {
%6 = load i64, i64* %3
%7 = add i64 %6, %4
store i64 %7, i64* %3
%8 = add i64 %2, -64
%9 = icmp ugt i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %5
%11 = tail call i32 @flush_buffer(i32* %0, i8* %1, i64* %3)
br label %12
12: ; preds = %10, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xb7() {
  Assert_real((isspace(183) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isspace.c",
              920, ("isspace should be 0 for 0xb7"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xb7\00"
define void @t_isspace_0xb7() {
%1 = tail call i64 @isspace(i32 183)
%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 920, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *U_EMR_CORE5_set(int);
char *U_EMRABORTPATH_set(void) { return (U_EMR_CORE5_set(68)); }


x86 assembly (clang, -O0):
<U_EMRABORTPATH_set>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44,%edi
call   1030 <U_EMR_CORE5_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_EMRABORTPATH_set>:
mov    $0x44,%edi
jmp    1030 <U_EMR_CORE5_set@plt>

LLVM IR (-O0):
define i8* @U_EMRABORTPATH_set() {
%1 = call i8* @U_EMR_CORE5_set(i32 68)
ret i8* %1
}

LLVM IR (-O2):
define i8* @U_EMRABORTPATH_set() {
%1 = tail call i8* @U_EMR_CORE5_set(i32 68)
ret i8* %1
}
/* Variables and functions */
unsigned int arikkei_ucs2_strlen(unsigned short const *);
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ memcpy(unsigned short *, unsigned short const *,
                          unsigned int);
unsigned short *arikkei_ucs2_strdup(const unsigned short *s) {
  unsigned int len;
  unsigned short *d;
  len = arikkei_ucs2_strlen(s);
  d = (unsigned short *)malloc((len + 1) * sizeof(unsigned short));
  memcpy(d, s, (len + 1) * sizeof(unsigned short));
  return d;
}


x86 assembly (clang, -O0):
<arikkei_ucs2_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <arikkei_ucs2_strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x1,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x1,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arikkei_ucs2_strdup>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1050 <arikkei_ucs2_strlen@plt>
lea    (%rax,%rax,1),%ebp
add    $0x2,%ebp
mov    %ebp,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i16* @arikkei_ucs2_strdup(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
%4 = alloca i16*
store i16* %0, i16** %2
%5 = load i16*, i16** %2
%6 = call i32 @arikkei_ucs2_strlen(i16* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add i32 %7, 1
%9 = zext i32 %8 to i64
%10 = mul i64 %9, 2
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i16*
store i16* %13, i16** %4
%14 = load i16*, i16** %4
%15 = load i16*, i16** %2
%16 = load i32, i32* %3
%17 = add i32 %16, 1
%18 = zext i32 %17 to i64
%19 = mul i64 %18, 2
%20 = trunc i64 %19 to i32
%21 = call i32 @memcpy(i16* %14, i16* %15, i32 %20)
%22 = load i16*, i16** %4
ret i16* %22
}

LLVM IR (-O2):
define i16* @arikkei_ucs2_strdup(i16* %0) {
%2 = tail call i32 @arikkei_ucs2_strlen(i16* %0)
%3 = shl i32 %2, 1
%4 = add i32 %3, 2
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i16*
%7 = tail call i32 @memcpy(i16* %6, i16* %0, i32 %4)
ret i16* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ disk_identify_get_string(int /*<<< orphan*/ const *,
                                            unsigned int, char *, size_t const);
void disk_identify_fixup_string(uint8_t const identify[512],
                                unsigned int offset_words, const size_t len) {
  disk_identify_get_string(identify, offset_words,
                           (char *)identify + offset_words * 2, len);
}


x86 assembly (clang, -O0):
<disk_identify_fixup_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,%eax
add    %rax,%rdx
mov    -0x18(%rbp),%rcx
call   1030 <disk_identify_get_string@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disk_identify_fixup_string>:
mov    %rdx,%rcx
lea    (%rsi,%rsi,1),%edx
add    %rdi,%rdx
jmp    1030 <disk_identify_get_string@plt>

LLVM IR (-O0):
define void @disk_identify_fixup_string(i32* %0, i32 %1, i64 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i64
store i32* %0, i32** %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = load i32*, i32** %4
%10 = bitcast i32* %9 to i8*
%11 = load i32, i32* %5
%12 = mul i32 %11, 2
%13 = zext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %10, i64 %13
%15 = load i64, i64* %6
%16 = call i32 @disk_identify_get_string(i32* %7, i32 %8, i8* %14, i64 %15)
ret void
}

LLVM IR (-O2):
define void @disk_identify_fixup_string(i32* %0, i32 %1, i64 %2) {
%4 = bitcast i32* %0 to i8*
%5 = shl i32 %1, 1
%6 = zext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
%8 = tail call i32 @disk_identify_get_string(i32* %0, i32 %1, i8* %7, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gettw(double, double *, double *);
double twdens(double twstat) {
  double dens, tail;
  gettw(twstat, &dens, &tail);
  return dens;
}


x86 assembly (clang, -O0):
<twdens>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gettw@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<twdens>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <gettw@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @twdens(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 @gettw(double %5, double* %3, double* %4)
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @twdens(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 @gettw(double %0, double* %2, double* %3)
%7 = load double, double* %2
ret double %7
}
void w8(void *x, double y) { *(double *)(x + 32760) = y; }


x86 assembly (clang, -O0):
<w8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x7ff8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<w8>:
movsd  %xmm0,0x7ff8(%rdi)
ret

LLVM IR (-O0):
define void @w8(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
store i8* %0, i8** %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32760
%8 = bitcast i8* %7 to double*
store double %5, double* %8
ret void
}

LLVM IR (-O2):
define void @w8(i8* nocapture writeonly %0, double %1) {
%3 = getelementptr i8, i8* %0, i64 32760
%4 = bitcast i8* %3 to double*
store double %1, double* %4
ret void
}
void create_ca(char *ca_name) {}


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

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

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

LLVM IR (-O2):
define void @create_ca(i8* nocapture %0) {
ret void
}