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

/* Variables and functions */
int /*<<< orphan*/ rdReg(int, int /*<<< orphan*/ *);
uint32_t ons_get_hw_version() {
  uint32_t val;
  rdReg(0x4b000008, &val);
  return val;
}


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

x86 assembly (clang, -O2):
<ons_get_hw_version>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4b000008,%edi
call   1030 <rdReg@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ons_get_hw_version() {
%1 = alloca i32
%2 = call i32 @rdReg(i32 1258291208, i32* %1)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @ons_get_hw_version() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @rdReg(i32 1258291208, i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}
int f(void) {
  extern int t;
  extern float v;
  return (v > 0.0f);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
movss  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    0x2ed9(%rip),%rax
movss  (%rax),%xmm0
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm1,%xmm0
seta   %al
ret

LLVM IR (-O0):
@v = external global float
define i32 @f() {
%1 = load float, float* @v
%2 = fcmp ogt float %1, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
@v = external global float
define i32 @f() {
%1 = load float, float* @v
%2 = fcmp ogt float %1, 0.000000e+00
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
unsigned short ntohs(unsigned short);
unsigned short c_ntohs(unsigned short val) { return ntohs(val); }


x86 assembly (clang, -O0):
<c_ntohs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
call   1030 <ntohs@plt>
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_ntohs>:
jmp    1030 <ntohs@plt>

LLVM IR (-O0):
define zeroext i16 @c_ntohs(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = call zeroext i16 @ntohs(i16 zeroext %3)
ret i16 %4
}

LLVM IR (-O2):
define zeroext i16 @c_ntohs(i16 zeroext %0) {
%2 = tail call zeroext i16 @ntohs(i16 zeroext %0)
ret i16 %2
}
int bang(int x) {
  int minus_one = ~1 + 1;
  int x_minus_one = x + minus_one;
  int sign_bit = (x_minus_one ^ x) >> 31;
  int ret = (sign_bit & 1) & (x_minus_one >> 31);
  return ret;
}


x86 assembly (clang, -O0):
<bang>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x1,%eax
mov    -0xc(%rbp),%ecx
sar    $0x1f,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bang>:
lea    -0x1(%rdi),%ecx
xor    %edi,%ecx
shr    $0x1f,%ecx
xor    %eax,%eax
test   %edi,%edi
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @bang(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
store i32 %9, i32* %4
%10 = load i32, i32* %4
%11 = load i32, i32* %2
%12 = xor i32 %10, %11
%13 = ashr i32 %12, 31
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = and i32 %14, 1
%16 = load i32, i32* %4
%17 = ashr i32 %16, 31
%18 = and i32 %15, %17
store i32 %18, i32* %6
%19 = load i32, i32* %6
ret i32 %19
}

LLVM IR (-O2):
define i32 @bang(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = xor i32 %2, %0
%4 = lshr i32 %3, 31
%5 = icmp sgt i32 %0, 0
%6 = select i1 %5, i32 0, i32 %4
ret i32 %6
}
void nseel_asm_fptobool_rev_end(void) {}


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

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

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

LLVM IR (-O2):
define void @nseel_asm_fptobool_rev_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ other();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("Main.h message: %d", 0);
  printf("other.h message: %d", 1);
  printf("Main message: %d", 2);
  other();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <other@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <other@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Main.h message: %d\00"
@.str.1 = [20 x i8] c"other.h message: %d\00"
@.str.2 = [17 x i8] c"Main message: %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1)
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 2)
%9 = call i32 (...) @other()
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Main.h message: %d\00"
@.str.1 = [20 x i8] c"other.h message: %d\00"
@.str.2 = [17 x i8] c"Main message: %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 2)
%6 = tail call i32 (...) @other()
ret i32 0
}
/* Variables and functions */
int _ctype_lookup(int);
int isupper(int c) { return _ctype_lookup(c) & (0x01); }


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

x86 assembly (clang, -O2):
<isupper>:
push   %rax
call   1030 <_ctype_lookup@plt>
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_ctype_lookup(i32 %3)
%5 = and i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @isupper(i32 %0) {
%2 = tail call i32 @_ctype_lookup(i32 %0)
%3 = and i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int implicitUnsignedTruncation(unsigned int);
int main(int argc, char **argv) { return implicitUnsignedTruncation(~0U); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xffffffff,%edi
call   1030 <implicitUnsignedTruncation@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xffffffff,%edi
jmp    1030 <implicitUnsignedTruncation@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @implicitUnsignedTruncation(i32 -1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int alpha, beta;
  alpha = 5;
  beta = alpha--;
  printf("alpha = %d\n", alpha);
  printf("alpha 2 = %d\n", alpha);
  printf("beta = %d\n", beta);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"alpha = %d\0A\00"
@.str.1 = [14 x i8] c"alpha 2 = %d\0A\00"
@.str.2 = [11 x i8] c"beta = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret i32 0
}
void *test_anti_range_80(long n) {
  extern void *alloc_anti_range_80(long) __attribute__((alloc_size(1)));
  if (1 <= n && n <= 1)
    n = 1 - 1;
  return alloc_anti_range_80(n);
}


x86 assembly (clang, -O0):
<test_anti_range_80>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%eax
cmp    -0x8(%rbp),%rax
jg     113e <test_anti_range_80+0x2e>
cmpq   $0x1,-0x8(%rbp)
jg     113e <test_anti_range_80+0x2e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <alloc_anti_range_80@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_anti_range_80>:
xor    %eax,%eax
cmp    $0x1,%rdi
cmove  %rax,%rdi
jmp    1030 <alloc_anti_range_80@plt>

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

LLVM IR (-O2):
define i8* @test_anti_range_80(i64 %0) {
%2 = icmp eq i64 %0, 1
%3 = select i1 %2, i64 0, i64 %0
%4 = tail call i8* @alloc_anti_range_80(i64 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ init_pair(int, int, int);
int /*<<< orphan*/ start_color();
void init_colors(void) {
  start_color();
  int i;
  for (i = 0; i < 0x100; i++) {
    init_pair(i, i & 0xf, (i >> 4) & 0xf);
  }
}


x86 assembly (clang, -O0):
<init_colors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <start_color@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x100,-0x4(%rbp)
jge    1168 <init_colors+0x48>
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
and    $0xf,%esi
mov    -0x4(%rbp),%edx
sar    $0x4,%edx
and    $0xf,%edx
call   1030 <init_pair@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <init_colors+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_colors>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <start_color@plt>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%esi
and    $0xf,%esi
mov    %ebx,%edx
shr    $0x4,%edx
mov    %ebx,%edi
call   1030 <init_pair@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1130 <init_colors+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @init_colors() {
%1 = alloca i32
%2 = call i32 (...) @start_color()
store i32 0, i32* %1
br label %3
3: ; preds = %14, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 256
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* %1
%8 = load i32, i32* %1
%9 = and i32 %8, 15
%10 = load i32, i32* %1
%11 = ashr i32 %10, 4
%12 = and i32 %11, 15
%13 = call i32 @init_pair(i32 %7, i32 %9, i32 %12)
br label %14
14: ; preds = %6
%15 = load i32, i32* %1
%16 = add nsw i32 %15, 1
store i32 %16, i32* %1
br label %3
17: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @init_colors() {
%1 = tail call i32 (...) @start_color()
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %7, %2 ]
%4 = and i32 %3, 15
%5 = lshr i32 %3, 4
%6 = tail call i32 @init_pair(i32 %3, i32 %4, i32 %5)
%7 = add nuw nsw i32 %3, 1
%8 = icmp eq i32 %7, 256
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void err(char s[]) {
  printf("\n!!! FUNKCJA zesp_get: %s !!!\n\n", s);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@.str = [32 x i8] c"\0A!!! FUNKCJA zesp_get: %s !!!\0A\0A\00"
define void @err(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ kexit(int);
int /*<<< orphan*/ printf(char *);
void do_exit() {
  char exitStr[4];
  int exitCode;
  printf("Exit code? ");
  gets(exitStr);
  exitCode = atoi(exitStr);
  kexit(exitCode);
}


x86 assembly (clang, -O0):
<do_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x4(%rbp),%rdi
call   1050 <gets@plt>
lea    -0x4(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <kexit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_exit>:
push   %rbx
sub    $0x10,%rsp
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1060 <atoi@plt>
mov    %eax,%edi
call   1040 <kexit@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Exit code? \00"
define void @do_exit() {
%1 = alloca [4 x i8]
%2 = alloca i32
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%5 = call i32 @gets(i8* %4)
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%7 = call i32 @atoi(i8* %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @kexit(i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Exit code? \00"
define void @do_exit() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
%5 = call i32 @atoi(i8* %2)
%6 = call i32 @kexit(i32 %5)
ret void
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_innwstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_innwstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_innwstr+0x2a>
jmp    1170 <cmd_innwstr+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_innwstr>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_innwstr+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

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

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_innwstr(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ e_cld();
void e_cld_accu() { e_cld(); }


x86 assembly (clang, -O0):
<e_cld_accu>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <e_cld@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @e_cld_accu() {
%1 = call i32 (...) @e_cld()
ret void
}

LLVM IR (-O2):
define void @e_cld_accu() {
%1 = tail call i32 (...) @e_cld()
ret void
}
int ft_islower(int c) {
  if (c >= 97 && c <= 122)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1127 <ft_islower+0x27>
cmpl   $0x7a,-0x8(%rbp)
jg     1127 <ft_islower+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <ft_islower+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @ft_islower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %10
9: ; preds = %6
store i32 1, i32* %2
br label %11
10: ; preds = %6, %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %9
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @ft_islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ CodeTable();
int /*<<< orphan*/ DecoderTables();
int /*<<< orphan*/ SizeTable();
void MakeDecoderHuffman() {

  SizeTable();
  CodeTable();
  DecoderTables();
}


x86 assembly (clang, -O0):
<MakeDecoderHuffman>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <SizeTable@plt>
mov    $0x0,%al
call   1050 <CodeTable@plt>
mov    $0x0,%al
call   1040 <DecoderTables@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeDecoderHuffman>:
push   %rax
xor    %eax,%eax
call   1030 <SizeTable@plt>
xor    %eax,%eax
call   1050 <CodeTable@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <DecoderTables@plt>

LLVM IR (-O0):
define void @MakeDecoderHuffman() {
%1 = call i32 (...) @SizeTable()
%2 = call i32 (...) @CodeTable()
%3 = call i32 (...) @DecoderTables()
ret void
}

LLVM IR (-O2):
define void @MakeDecoderHuffman() {
%1 = tail call i32 (...) @SizeTable()
%2 = tail call i32 (...) @CodeTable()
%3 = tail call i32 (...) @DecoderTables()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test1() { printf("Test1: intercept called - success\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"Test1: intercept called - success\0A\00"
define void @test1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"Test1: intercept called - success\00"
define void @test1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
void test_29_2(int *mem) { __atomic_fetch_and(mem, 1, 4); }


x86 assembly (clang, -O0):
<test_29_2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%esi
mov    %eax,%edx
and    %esi,%edx
lock cmpxchg %edx,(%rcx)
sete   %cl
mov    %eax,-0x24(%rbp)
test   $0x1,%cl
mov    %eax,-0x14(%rbp)
jne    114b <test_29_2+0x4b>
jmp    1122 <test_29_2+0x22>
mov    -0x24(%rbp),%eax
mov    %eax,-0x10(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_29_2>:
lock andl $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test_29_2(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
store i32 1, i32* %3
%6 = load i32, i32* %3
%7 = atomicrmw and i32* %5, i32 %6 acq_rel
store i32 %7, i32* %4
%8 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test_29_2(i32* nocapture %0) {
%2 = atomicrmw and i32* %0, i32 1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
char getch();
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
char getche() {
  char c;
  c = getch();
  write(STDOUT_FILENO, &c, 1);
  return (c);
}


x86 assembly (clang, -O0):
<getche>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getch@plt>
mov    %al,-0x1(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getche>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1040 <getch@plt>
mov    %eax,%ebx
mov    %al,0xf(%rsp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
lea    0xf(%rsp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define signext i8 @getche() {
%1 = alloca i8
%2 = call signext i8 (...) @getch()
store i8 %2, i8* %1
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* %1, i32 1)
%5 = load i8, i8* %1
ret i8 %5
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define signext i8 @getche() {
%1 = alloca i8
%2 = tail call signext i8 (...) @getch()
store i8 %2, i8* %1
%3 = load i32, i32* @STDOUT_FILENO
%4 = call i32 @write(i32 %3, i8* %1, i32 1)
ret i8 %2
}
/* Variables and functions */
int /*<<< orphan*/ send_packet_noack(unsigned char *, int);
void send_command_noack(unsigned char uc) { send_packet_noack(&uc, 1); }


x86 assembly (clang, -O0):
<send_command_noack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
mov    $0x1,%esi
call   1030 <send_packet_noack@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_command_noack>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <send_packet_noack@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @send_command_noack(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @send_packet_noack(i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @send_command_noack(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @send_packet_noack(i8* %2, i32 1)
ret void
}
/* Variables and functions */
int floor(double);
int /*<<< orphan*/ getNumber(double *);
int piso(double a) {
  getNumber(&a);
  return floor(a);
}


x86 assembly (clang, -O0):
<piso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <getNumber@plt>
movsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piso>:
push   %rax
movsd  %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <getNumber@plt>
movsd  (%rsp),%xmm0
call   1040 <floor@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @piso(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call i32 @floor(double %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @piso(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @getNumber(double* %2)
%4 = load double, double* %2
%5 = call i32 @floor(double %4)
ret i32 %5
}
int cairo_code_draw_ivorySlider_get_height() { return 157; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_ivorySlider_get_height() {
ret i32 157
}

LLVM IR (-O2):
define i32 @cairo_code_draw_ivorySlider_get_height() {
ret i32 157
}
void Blink_Timer_SaveConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @Blink_Timer_SaveConfig() {
ret void
}
void outString(const char *str) {
  __asm__ __volatile__("mov %0  , %%ax\n"
                       "mov %%ax, %%si\n"
                       :
                       : "m"(str));
  put_string();
}


x86 assembly (clang, -O0):
<outString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%ax
mov    %ax,%si
mov    $0x0,%al
call   1030 <put_string@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outString>:
push   %rax
mov    %rdi,(%rsp)
mov    (%rsp),%ax
mov    %ax,%si
xor    %eax,%eax
call   1030 <put_string@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @outString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @put_string()
ret void
}

LLVM IR (-O2):
define void @outString(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @put_string()
ret void
}
list_krules(s) char *s;
{ do_list_rules(s, 1); }


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

x86 assembly (clang, -O2):
<list_krules>:
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <do_list_rules@plt>

LLVM IR (-O0):
define i32 @list_krules(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_list_rules to i32 (i8*, i32, ...)*)(i8* %4, i32 1)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @list_krules(i8* %0) {
%2 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_list_rules to i32 (i8*, i32, ...)*)(i8* %0, i32 1)
ret i32 undef
}
int dob_to_int(double x) {
  int res;
  res = (int)x;
  if (x - res >= 0.5) {
    return res + 1;
  } else {
    return res;
  }
}


x86 assembly (clang, -O0):
<dob_to_int>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
cvttsd2si -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xed9(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     113f <dob_to_int+0x3f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <dob_to_int+0x45>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dob_to_int>:
cvttsd2si %xmm0,%eax
cvttpd2dq %xmm0,%xmm1
cvtdq2pd %xmm1,%xmm1
subsd  %xmm1,%xmm0
ucomisd 0xee8(%rip),%xmm0
sbb    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @dob_to_int(double %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca i32
store double %0, double* %3
%5 = load double, double* %3
%6 = fptosi double %5 to i32
store i32 %6, i32* %4
%7 = load double, double* %3
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
%10 = fsub double %7, %9
%11 = fcmp oge double %10, 5.000000e-01
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %17
15: ; preds = %1
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %17
17: ; preds = %15, %12
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @dob_to_int(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
%4 = fsub double %0, %3
%5 = fcmp oge double %4, 5.000000e-01
%6 = zext i1 %5 to i32
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
mode_t umask(mode_t mask) { return mask; }


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

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

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

LLVM IR (-O2):
define i32 @umask(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
scalar_t__ RAND_MAX;
double rand();
unsigned rand_to_max(unsigned max) {
  double random;
  while ((random = rand()) == (double)RAND_MAX)
    ;
  return random / (double)RAND_MAX * (double)max;
}


x86 assembly (clang, -O0):
<rand_to_max>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movsd  %xmm0,-0x10(%rbp)
mov    0x2eba(%rip),%rax
cvtsi2sdq (%rax),%xmm1
ucomisd %xmm1,%xmm0
jne    1148 <rand_to_max+0x38>
jp     1148 <rand_to_max+0x38>
jmp    111b <rand_to_max+0xb>
movsd  -0x10(%rbp),%xmm0
mov    0x2e94(%rip),%rax
cvtsi2sdq (%rax),%xmm1
divsd  %xmm1,%xmm0
mov    -0x4(%rbp),%eax
cvtsi2sd %rax,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_to_max>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    0x2ecc(%rip),%rbx
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sdq (%rbx),%xmm1
ucomisd %xmm1,%xmm0
jne    1137 <rand_to_max+0x27>
jnp    1120 <rand_to_max+0x10>
mov    %ebp,%eax
cvtsi2sd %rax,%xmm2
divsd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
cvttsd2si %xmm2,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define i32 @rand_to_max(i32 %0) {
%2 = alloca i32
%3 = alloca double
store i32 %0, i32* %2
br label %4
4: ; preds = %9, %1
%5 = call double (...) @rand()
store double %5, double* %3
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to double
%8 = fcmp oeq double %5, %7
br i1 %8, label %9, label %10
9: ; preds = %4
br label %4
10: ; preds = %4
%11 = load double, double* %3
%12 = load i64, i64* @RAND_MAX
%13 = sitofp i64 %12 to double
%14 = fdiv double %11, %13
%15 = load i32, i32* %2
%16 = uitofp i32 %15 to double
%17 = fmul double %14, %16
%18 = fptoui double %17 to i32
ret i32 %18
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define i32 @rand_to_max(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call double (...) @rand()
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to double
%6 = fcmp oeq double %3, %5
br i1 %6, label %2, label %7
7: ; preds = %2
%8 = fdiv double %3, %5
%9 = uitofp i32 %0 to double
%10 = fmul double %8, %9
%11 = fptoui double %10 to i32
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpngt_ss(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmpngt_ss(__m128 __a, __m128 __b) {
  return _mm_cmpngt_ss(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpngt_ss>:
jmp    1030 <_mm_cmpngt_ss@plt>

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

LLVM IR (-O2):
define i32 @test_mm_cmpngt_ss(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpngt_ss(i32 %0, i32 %1)
ret i32 %3
}
void delay(void) {
  volatile int i, j;
  for (i = 0; i < 100; i++)
    for (j = 0; j < 1000; j++)
      ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    $0x64,%eax
jge    1152 <delay+0x52>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    $0x3e8,%eax
jge    113f <delay+0x3f>
jmp    1131 <delay+0x31>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111e <delay+0x1e>
jmp    1144 <delay+0x44>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <delay+0xb>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
movl   $0x0,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x63,%eax
jle    112e <delay+0x2e>
ret
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addl   $0x1,-0x4(%rsp)
mov    -0x4(%rsp),%eax
cmp    $0x64,%eax
jge    1111 <delay+0x11>
movl   $0x0,-0x8(%rsp)
mov    -0x8(%rsp),%eax
cmp    $0x3e7,%eax
jg     1120 <delay+0x20>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
addl   $0x1,-0x8(%rsp)
mov    -0x8(%rsp),%eax
cmp    $0x3e8,%eax
jl     1150 <delay+0x50>
jmp    1120 <delay+0x20>

LLVM IR (-O0):
define void @delay() {
%1 = alloca i32
%2 = alloca i32
store volatile i32 0, i32* %1
br label %3
3: ; preds = %15, %0
%4 = load volatile i32, i32* %1
%5 = icmp slt i32 %4, 100
br i1 %5, label %6, label %18
6: ; preds = %3
store volatile i32 0, i32* %2
br label %7
7: ; preds = %11, %6
%8 = load volatile i32, i32* %2
%9 = icmp slt i32 %8, 1000
br i1 %9, label %10, label %14
10: ; preds = %7
br label %11
11: ; preds = %10
%12 = load volatile i32, i32* %2
%13 = add nsw i32 %12, 1
store volatile i32 %13, i32* %2
br label %7
14: ; preds = %7
br label %15
15: ; preds = %14
%16 = load volatile i32, i32* %1
%17 = add nsw i32 %16, 1
store volatile i32 %17, i32* %1
br label %3
18: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @delay() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store volatile i32 0, i32* %1
%5 = load volatile i32, i32* %1
%6 = icmp slt i32 %5, 100
br i1 %6, label %7, label %20
7: ; preds = %0, %15
store volatile i32 0, i32* %2
%8 = load volatile i32, i32* %2
%9 = icmp slt i32 %8, 1000
br i1 %9, label %10, label %15
10: ; preds = %7, %10
%11 = load volatile i32, i32* %2
%12 = add nsw i32 %11, 1
store volatile i32 %12, i32* %2
%13 = load volatile i32, i32* %2
%14 = icmp slt i32 %13, 1000
br i1 %14, label %10, label %15
15: ; preds = %10, %7
%16 = load volatile i32, i32* %1
%17 = add nsw i32 %16, 1
store volatile i32 %17, i32* %1
%18 = load volatile i32, i32* %1
%19 = icmp slt i32 %18, 100
br i1 %19, label %7, label %20
20: ; preds = %15, %0
ret void
}
int main(void) {
  int a = 1;
  int b = 1;
  int c = a + b;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x09() {
  Assert_real((isascii(9)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              50, ("isascii should be 1 for 0x09"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0x09>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x32,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x09\00"
define void @t_isascii_0x09() {
%1 = call i32 @isascii(i32 9)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x09\00"
define void @t_isascii_0x09() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 50, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
OP(dd, ee) {
  illegal_1();
  op_ee();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_ee@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_ee@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_ee()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_ee()
ret i32 undef
}
/* Variables and functions */
void *realloc(void *, unsigned long);
void *dk(void *q, unsigned long s) {
  void *dh = realloc(q, s);
  return dh;
}


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

x86 assembly (clang, -O2):
<dk>:
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @dk(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
define noalias i8* @dk(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *realloc(void *, size_t);
int /*<<< orphan*/ stderr;
__attribute__((__unused__)) void *xrealloc(void *ptr, size_t size) {
  void *value = realloc(ptr, size);
  if (value)
    return (value);
  fprintf(stderr, "out of memory\n");
  exit(1);
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1166 <xrealloc+0x36>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
lea    0xe8a(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
call   1040 <realloc@plt>
test   %rax,%rax
je     113d <xrealloc+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"out of memory\0A\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %6, label %5
5: ; preds = %2
ret i8* %3
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdin;
int vfwscanf(int /*<<< orphan*/, int /*<<< orphan*/ const *,
             int /*<<< orphan*/);
int vwscanf(const wchar_t *restrict fmt, va_list ap) {
  return vfwscanf(stdin, fmt, ap);
}


x86 assembly (clang, -O0):
<vwscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfwscanf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vwscanf>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfwscanf@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @vwscanf(i32* noalias %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stdin
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @vfwscanf(i32 %5, i32* %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @vwscanf(i32* noalias %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @vfwscanf(i32 %3, i32* %0, i32 %1)
ret i32 %4
}
int checkarg(int argc, char **argv) {
  int rc = 0;
  if (argc == 1 || argc >= 3) {
    rc = 1;
  } else
    rc = 0;
  return rc;
}


x86 assembly (clang, -O0):
<checkarg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     1126 <checkarg+0x26>
cmpl   $0x3,-0x4(%rbp)
jl     1132 <checkarg+0x32>
movl   $0x1,-0x14(%rbp)
jmp    1139 <checkarg+0x39>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkarg>:
cmp    $0x1,%edi
sete   %al
cmp    $0x3,%edi
setge  %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @checkarg(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 1
%4 = icmp sgt i32 %0, 2
%5 = or i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void LedsP$Led0$toggle(void) { ReverseGPIOP$0$Out$toggle(); }


x86 assembly (clang, -O0):
<LedsP$Led0$toggle>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <ReverseGPIOP$0$Out$toggle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<LedsP$Led0$toggle>:
xor    %eax,%eax
jmp    1030 <ReverseGPIOP$0$Out$toggle@plt>

LLVM IR (-O0):
define void @"LedsP$Led0$toggle"() {
%1 = call i32 (...) @"ReverseGPIOP$0$Out$toggle"()
ret void
}

LLVM IR (-O2):
define void @"LedsP$Led0$toggle"() {
%1 = tail call i32 (...) @"ReverseGPIOP$0$Out$toggle"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char **);
int continueOrNot() {
  char c[2];
  printf("\npress ';' to continue or any other key to abort ");
  scanf("%1s", &c);
  if (c[0] == ';') {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<continueOrNot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x6(%rbp),%rsi
lea    0xef3(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x6(%rbp),%eax
cmp    $0x3b,%eax
jne    115d <continueOrNot+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1164 <continueOrNot+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<continueOrNot>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xefe(%rip),%rdi
lea    0x6(%rsp),%rsi
call   1040 <scanf@plt>
xor    %eax,%eax
cmpb   $0x3b,0x6(%rsp)
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [50 x i8] c"\0Apress ';' to continue or any other key to abort \00"
@.str.1 = [4 x i8] c"%1s\00"
define i32 @continueOrNot() {
%1 = alloca i32
%2 = alloca [2 x i8]
%3 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [2 x i8]* %2 to i8**
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 59
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 1, i32* %1
br label %12
11: ; preds = %0
store i32 0, i32* %1
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %1
ret i32 %13
}

LLVM IR (-O2):
@.str = [50 x i8] c"\0Apress ';' to continue or any other key to abort \00"
@.str.1 = [4 x i8] c"%1s\00"
define i32 @continueOrNot() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%4 = bitcast [2 x i8]* %1 to i8**
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %4)
%6 = load i8, i8* %2
%7 = icmp eq i8 %6, 59
%8 = zext i1 %7 to i32
ret i32 %8
}
void Jump() {}


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

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

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

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