xunge/DecIR huggingface dataset:
/* Variables and functions */
void Default_EGU4_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_EGU4_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_EGU4_IRQHandler+0x9>
jmp    1109 <Default_EGU4_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_EGU4_IRQHandler>:
jmp    1100 <Default_EGU4_IRQHandler>

LLVM IR (-O0):
define void @Default_EGU4_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_EGU4_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int x_root;
};
struct TYPE_4__ {
  TYPE_1__ xkey;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xkey_x_root(void *_p, int _v) {
  ((XEvent *)_p)->xkey.x_root = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xkey_x_root>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xkey_x_root(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xkey_x_root(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
unsigned xrop3_111_1_1(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;
  stk2 = D ^ S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_111_1_1>:
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    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_111_1_1(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
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %6
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %7
%28 = load i32, i32* %9
%29 = and i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = xor i32 %30, -1
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = xor i32 %33, -1
%35 = and i32 %32, %34
%36 = load i32, i32* %7
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %6
%41 = and i32 %39, %40
%42 = or i32 %38, %41
%43 = load i32, i32* %5
%44 = load i32, i32* %7
%45 = and i32 %43, %44
%46 = or i32 %42, %45
ret i32 %46
}

LLVM IR (-O2):
define i32 @xrop3_111_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
int do_303() { return 303; }


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

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

LLVM IR (-O0):
define i32 @do_303() {
ret i32 303
}

LLVM IR (-O2):
define i32 @do_303() {
ret i32 303
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ f20_39(int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
uint32_t f60_79(uint32_t x, uint32_t y, uint32_t z) { return f20_39(x, y, z); }


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

x86 assembly (clang, -O2):
<f60_79>:
jmp    1030 <f20_39@plt>

LLVM IR (-O0):
define i32 @f60_79(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 @f20_39(i32 %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @f60_79(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @f20_39(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int peek32(int);
int uart_rxfifo_empty(void) { return peek32((0x20201000 + 0x18)) & (1 << 4); }


x86 assembly (clang, -O0):
<uart_rxfifo_empty>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20201018,%edi
call   1030 <peek32@plt>
and    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_rxfifo_empty>:
push   %rax
mov    $0x20201018,%edi
call   1030 <peek32@plt>
and    $0x10,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @uart_rxfifo_empty() {
%1 = call i32 @peek32(i32 538972184)
%2 = and i32 %1, 16
ret i32 %2
}

LLVM IR (-O2):
define i32 @uart_rxfifo_empty() {
%1 = tail call i32 @peek32(i32 538972184)
%2 = and i32 %1, 16
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
FILE *open_file(const char *filename) {
  FILE *fd;
  fd = fopen("/dev/hello_device", "rw");
  if (fd < 0) {
    fprintf(stderr, "fopen: Cannot open file\n");
    exit(-1);
  }
  return fd;
}


x86 assembly (clang, -O0):
<open_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
lea    0xec8(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jae    117d <open_file+0x4d>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<open_file>:
lea    0xee9(%rip),%rdi
lea    0xef4(%rip),%rsi
jmp    1030 <fopen@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"/dev/hello_device\00"
@.str.1 = [3 x i8] c"rw\00"
@stderr = global i32 0
@.str.2 = [25 x i8] c"fopen: Cannot open file\0A\00"
define i32* @open_file(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %3
%5 = load i32*, i32** %3
%6 = icmp ult i32* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @exit(i32 -1)
unreachable
11: ; preds = %1
%12 = load i32*, i32** %3
ret i32* %12
}

LLVM IR (-O2):
@.str = [18 x i8] c"/dev/hello_device\00"
@.str.1 = [3 x i8] c"rw\00"
@stderr = global i32 0
define noalias i32* @open_file(i8* nocapture readnone %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret i32* %2
}
void yy_1_OptionsAndTitle(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_1_OptionsAndTitle(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_1_OptionsAndTitle(i8* nocapture %0, i32 %1) {
ret void
}
atooi(cp) register char *cp;
{
  register int i, base;
  i = 0;
  base = 8;
  while (*cp >= '0' && *cp <= '9') {
    i *= base;
    i += *cp++ - '0';
  }
  return (i);
}


x86 assembly (clang, -O0):
<atooi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x8,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x11(%rbp)
jl     113b <atooi+0x3b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    114b <atooi+0x4b>
jmp    1175 <atooi+0x75>
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
sub    $0x30,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <atooi+0x16>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atooi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     1138 <atooi+0x38>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rcx,%rax,8),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atooi+0x20>
ret

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

LLVM IR (-O2):
define i32 @atooi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i8* [ %11, %5 ], [ %0, %1 ]
%8 = phi i32 [ %13, %5 ], [ 0, %1 ]
%9 = zext i8 %6 to i32
%10 = shl nsw i32 %8, 3
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = add i32 %10, -48
%13 = add i32 %12, %9
%14 = load i8, i8* %11
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %13, %5 ]
ret i32 %18
}
int test_imm_A0uint8_mem(unsigned char *val) {
  return ((*val) & (-0xA0 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A0uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, -160
%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_A0uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 96
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ charIsNum(char);
int /*<<< orphan*/ error(int);
float charToFloat(char c) {
  if (charIsNum(c))
    return c - '0';
  error(1);
  return -1;
}


x86 assembly (clang, -O0):
<charToFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <charIsNum@plt>
cmp    $0x0,%rax
je     1156 <charToFloat+0x36>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    116d <charToFloat+0x4d>
mov    $0x1,%edi
call   1040 <error@plt>
movss  0xe98(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<charToFloat>:
push   %rbx
mov    %edi,%ebx
call   1030 <charIsNum@plt>
test   %rax,%rax
je     1139 <charToFloat+0x19>
movsbl %bl,%eax
add    $0xffffffd0,%eax
cvtsi2ss %eax,%xmm0
pop    %rbx
ret
mov    $0x1,%edi
call   1040 <error@plt>
movss  0xeb5(%rip),%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define float @charToFloat(i8 signext %0) {
%2 = alloca float
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @charIsNum(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 48
%11 = sitofp i32 %10 to float
store float %11, float* %2
br label %14
12: ; preds = %1
%13 = call i32 @error(i32 1)
store float -1.000000e+00, float* %2
br label %14
14: ; preds = %12, %7
%15 = load float, float* %2
ret float %15
}

LLVM IR (-O2):
define float @charToFloat(i8 signext %0) {
%2 = tail call i64 @charIsNum(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = sext i8 %0 to i32
%6 = add nsw i32 %5, -48
%7 = sitofp i32 %6 to float
br label %10
8: ; preds = %1
%9 = tail call i32 @error(i32 1)
br label %10
10: ; preds = %8, %4
%11 = phi float [ %7, %4 ], [ -1.000000e+00, %8 ]
ret float %11
}
/* Variables and functions */
scalar_t__ test_config();
scalar_t__ test_cp();
int main(void) {
  int _fail_count = 0;
  _fail_count += test_cp();
  _fail_count += test_config();
  return _fail_count;
  ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <test_cp@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test_config@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <test_cp@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <test_config@plt>
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i64 (...) @test_cp()
%4 = load i32, i32* %2
%5 = sext i32 %4 to i64
%6 = add nsw i64 %5, %3
%7 = trunc i64 %6 to i32
store i32 %7, i32* %2
%8 = call i64 (...) @test_config()
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = add nsw i64 %10, %8
%12 = trunc i64 %11 to i32
store i32 %12, i32* %2
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @test_cp()
%2 = tail call i64 (...) @test_config()
%3 = add i64 %2, %1
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void winner() { puts("You won!"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"You won!\00"
define void @winner() {
%1 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"You won!\00"
define void @winner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Gamma_Right(int value) {
  if (value) {
    cpc_key_press(0x73);
  } else {
    cpc_key_unpress(0x73);
  };
}


x86 assembly (clang, -O0):
<Joy_Gamma_Right>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Gamma_Right+0x24>
mov    $0x73,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Gamma_Right+0x2e>
mov    $0x73,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Gamma_Right>:
test   %edi,%edi
je     112e <Joy_Gamma_Right+0xe>
mov    $0x73,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x73,%edi
jmp    1040 <cpc_key_unpress@plt>

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

LLVM IR (-O2):
define void @Joy_Gamma_Right(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 115)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 115)
br label %7
7: ; preds = %5, %3
ret void
}
/* Variables and functions */
int O_APPEND;
int fwOpenFile(char const *, int);
int _open(const char *ptr, int mode) {
  return fwOpenFile(ptr, ((mode & O_APPEND) != 0));
}


x86 assembly (clang, -O0):
<_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
mov    0x2eab(%rip),%rcx
and    (%rcx),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%esi
call   1030 <fwOpenFile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_open>:
mov    0x2ec1(%rip),%rcx
xor    %eax,%eax
and    (%rcx),%esi
setne  %al
mov    %eax,%esi
jmp    1030 <fwOpenFile@plt>

LLVM IR (-O0):
@O_APPEND = global i32 0
define i32 @_open(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i32, i32* @O_APPEND
%8 = and i32 %6, %7
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @fwOpenFile(i8* %5, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@O_APPEND = global i32 0
define i32 @_open(i8* %0, i32 %1) {
%3 = load i32, i32* @O_APPEND
%4 = and i32 %3, %1
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i32
%7 = tail call i32 @fwOpenFile(i8* %0, i32 %6)
ret i32 %7
}
/* Variables and functions */
long fact(long);
long int F(long int x, long int n) {
  if (x > 0)
    return x * (fact(x) + n) + F(x - 1, n);
  else
    return 0;
}


x86 assembly (clang, -O0):
<F>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1183 <F+0x63>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <fact@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
add    -0x18(%rbp),%rcx
imul   %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
mov    -0x18(%rbp),%rsi
call   1030 <F@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    118b <F+0x6b>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
jle    1151 <F+0x41>
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <fact@plt>
add    %r14,%rax
imul   %rbx,%rax
add    %rax,%r15
lea    -0x1(%rbx),%rax
cmp    $0x1,%rbx
mov    %rax,%rbx
ja     1130 <F+0x20>
jmp    1154 <F+0x44>
xor    %r15d,%r15d
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @F(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = icmp sgt i64 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %2
%9 = load i64, i64* %4
%10 = load i64, i64* %4
%11 = call i64 @fact(i64 %10)
%12 = load i64, i64* %5
%13 = add nsw i64 %11, %12
%14 = mul nsw i64 %9, %13
%15 = load i64, i64* %4
%16 = sub nsw i64 %15, 1
%17 = load i64, i64* %5
%18 = call i64 @F(i64 %16, i64 %17)
%19 = add nsw i64 %14, %18
store i64 %19, i64* %3
br label %21
20: ; preds = %2
store i64 0, i64* %3
br label %21
21: ; preds = %20, %8
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
define i64 @F(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i64 [ %10, %4 ], [ %0, %2 ]
%6 = phi i64 [ %11, %4 ], [ 0, %2 ]
%7 = tail call i64 @fact(i64 %5)
%8 = add nsw i64 %7, %1
%9 = mul nsw i64 %8, %5
%10 = add nsw i64 %5, -1
%11 = add nsw i64 %9, %6
%12 = icmp ugt i64 %5, 1
br i1 %12, label %4, label %13
13: ; preds = %4, %2
%14 = phi i64 [ 0, %2 ], [ %11, %4 ]
ret i64 %14
}
int main(void) {
  char s[100];
  while (~scanf("%s", s))
    puts(longestPalindrome(s));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     1176 <main+0x46>
lea    -0x70(%rbp),%rdi
mov    $0x0,%al
call   1050 <longestPalindrome@plt>
mov    %eax,%edi
mov    $0x0,%al
call   1030 <puts@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
lea    0xec2(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xffffffff,%eax
je     1185 <main+0x55>
mov    %rsp,%rbx
lea    0xea9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <longestPalindrome@plt>
mov    %eax,%edi
xor    %eax,%eax
call   1030 <puts@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xffffffff,%eax
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
store i32 0, i32* %1
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = xor i32 %5, -1
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %3
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @longestPalindrome to i32 (i8*, ...)*)(i8* %9)
%11 = call i32 (i32, ...) bitcast (i32 (...)* @puts to i32 (i32, ...)*)(i32 %10)
br label %3
12: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %0, %5
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @longestPalindrome to i32 (i8*, ...)*)(i8* %2)
%7 = call i32 (i32, ...) bitcast (i32 (...)* @puts to i32 (i32, ...)*)(i32 %6)
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %5
10: ; preds = %5, %0
ret i32 0
}
void mpeg2_cpu_state_init(unsigned int accel) {}


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

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

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

LLVM IR (-O2):
define void @mpeg2_cpu_state_init(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x41() {
  Assert_real((isbdigit(65) == 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_isbdigit.c",
              330, ("isbdigit should be 0 for A"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x41>:
push   %rax
mov    $0x41,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x14a,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for A\00"
define void @t_isbdigit_0x41() {
%1 = call i64 @isbdigit(i32 65)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 330, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for A\00"
define void @t_isbdigit_0x41() {
%1 = tail call i64 @isbdigit(i32 65)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 330, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XResizeRequestEvent;

/* Variables and functions */
void set_XResizeRequestEvent_window(void *_p, unsigned long _v) {
  ((XResizeRequestEvent *)_p)->window = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XResizeRequestEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ vecfcn_(int *, double *, double *, int *);
void mgh_vecfcn(int n, const double *x, double *fvec, int nprob) {
  int _n = n, _nprob = nprob;
  assert(sizeof(double) == sizeof(*x));
  vecfcn_(&_n, (double *)x, (double *)fvec, &_nprob);
}


x86 assembly (clang, -O0):
<mgh_vecfcn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x1,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rdi
lea    -0x24(%rbp),%rcx
call   1030 <vecfcn_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mgh_vecfcn>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,0x4(%rsp)
mov    %ecx,(%rsp)
mov    $0x1,%edi
call   1040 <assert@plt>
lea    0x4(%rsp),%rdi
mov    %rsp,%rcx
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <vecfcn_@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @mgh_vecfcn(i32 %0, double* %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %5 to i8*
store i32 %0, i32* %5
%8 = bitcast i32* %6 to i8*
store i32 %3, i32* %6
%9 = tail call i32 @assert(i32 1)
%10 = call i32 @vecfcn_(i32* %5, double* %1, double* %2, i32* %6)
ret void
}
double dint(dnum)
double dnum;
{
  double dn;
  if (dnum < 0.0)
    dn = -floor(-dnum);
  else
    dn = floor(dnum);
  return (dn);
}


x86 assembly (clang, -O0):
<dint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    116d <dint+0x5d>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <floor@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    117c <dint+0x6c>
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dint>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1132 <dint+0x22>
push   %rax
xorpd  0xedd(%rip),%xmm0
call   1030 <floor@plt>
xorpd  0xed0(%rip),%xmm0
pop    %rax
ret
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @dint(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %2
%8 = fneg double %7
%9 = call double @llvm.floor.f64(double %8)
%10 = fneg double %9
store double %10, double* %3
br label %14
11: ; preds = %1
%12 = load double, double* %2
%13 = call double @llvm.floor.f64(double %12)
store double %13, double* %3
br label %14
14: ; preds = %11, %6
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
define double @dint(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fneg double %0
%5 = tail call double @llvm.floor.f64(double %4)
%6 = fneg double %5
br label %9
7: ; preds = %1
%8 = tail call double @llvm.floor.f64(double %0)
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
/* Variables and functions */
int doubleToRawLongBits(double);
int ilogbp1(double d) {
  int m = d < 4.9090934652977266E-91;
  d = m ? 2.037035976334486E90 * d : d;
  int q = (doubleToRawLongBits(d) >> 52) & 0x7ff;
  q = m ? q - (300 + 0x03fe) : q - 0x03fe;
  return q;
}


x86 assembly (clang, -O0):
<ilogbp1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1156 <ilogbp1+0x46>
movsd  0xec1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1160 <ilogbp1+0x50>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <doubleToRawLongBits@plt>
mov    $0x34,%ecx
sar    %cl,%eax
and    $0x7ff,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     119d <ilogbp1+0x8d>
mov    -0x10(%rbp),%eax
sub    $0x52a,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a8 <ilogbp1+0x98>
mov    -0x10(%rbp),%eax
sub    $0x3fe,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilogbp1>:
movsd  0xee8(%rip),%xmm2
movapd %xmm0,%xmm1
cmpltsd 0xee3(%rip),%xmm1
mulsd  %xmm0,%xmm2
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
jmp    1030 <doubleToRawLongBits@plt>

LLVM IR (-O0):
define i32 @ilogbp1(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = load double, double* %2
%6 = fcmp olt double %5, 0x2D30000000000000
%7 = zext i1 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load double, double* %2
%12 = fmul double 0x52B0000000000000, %11
br label %15
13: ; preds = %1
%14 = load double, double* %2
br label %15
15: ; preds = %13, %10
%16 = phi double [ %12, %10 ], [ %14, %13 ]
store double %16, double* %2
%17 = load double, double* %2
%18 = call i32 @doubleToRawLongBits(double %17)
%19 = ashr i32 %18, 52
%20 = and i32 %19, 2047
store i32 %20, i32* %4
%21 = load i32, i32* %3
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %15
%24 = load i32, i32* %4
%25 = sub nsw i32 %24, 1322
br label %29
26: ; preds = %15
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1022
br label %29
29: ; preds = %26, %23
%30 = phi i32 [ %25, %23 ], [ %28, %26 ]
store i32 %30, i32* %4
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @ilogbp1(double %0) {
%2 = fcmp olt double %0, 0x2D30000000000000
%3 = fmul double %0, 0x52B0000000000000
%4 = select i1 %2, double %3, double %0
%5 = tail call i32 @doubleToRawLongBits(double %4)
ret i32 poison
}
/* Variables and functions */
scalar_t__ strtoul(char const *, int /*<<< orphan*/ *, int /*<<< orphan*/);
unsigned int my_atoui(const char *s) {
  return s ? ((unsigned int)strtoul(s, NULL, 0)) : 0;
}


x86 assembly (clang, -O0):
<my_atoui>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113e <my_atoui+0x2e>
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <strtoul@plt>
mov    %eax,-0xc(%rbp)
jmp    1148 <my_atoui+0x38>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1148 <my_atoui+0x38>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_atoui>:
test   %rdi,%rdi
je     1124 <my_atoui+0x14>
push   %rax
xor    %esi,%esi
xor    %edx,%edx
call   1030 <strtoul@plt>
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @my_atoui(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i64 @strtoul(i8* %6, i32* null, i32 0)
%8 = trunc i64 %7 to i32
br label %10
9: ; preds = %1
br label %10
10: ; preds = %9, %5
%11 = phi i32 [ %8, %5 ], [ 0, %9 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @my_atoui(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @strtoul(i8* nocapture %0, i32* null, i32 0)
%5 = trunc i64 %4 to i32
br label %6
6: ; preds = %1, %3
%7 = phi i32 [ %5, %3 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ clear();
void crl_clear_screen(void) { clear(); }


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

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

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

LLVM IR (-O2):
define void @crl_clear_screen() {
%1 = tail call i32 (...) @clear()
ret void
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t bound_int16(int16_t val, int16_t min, int16_t max) {
  return val < min ? min : (val > max ? max : val);
}


x86 assembly (clang, -O0):
<bound_int16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    112b <bound_int16+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
jmp    1156 <bound_int16+0x56>
mov    -0x8(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1146 <bound_int16+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    114e <bound_int16+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bound_int16>:
mov    %rdx,%rax
cmp    %rdx,%rdi
cmovle %rdi,%rax
cmp    %rsi,%rdi
cmovl  %rsi,%rax
ret

LLVM IR (-O0):
define i64 @bound_int16(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = icmp slt i64 %7, %8
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = load i64, i64* %5
br label %22
12: ; preds = %3
%13 = load i64, i64* %4
%14 = load i64, i64* %6
%15 = icmp sgt i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = load i64, i64* %6
br label %20
18: ; preds = %12
%19 = load i64, i64* %4
br label %20
20: ; preds = %18, %16
%21 = phi i64 [ %17, %16 ], [ %19, %18 ]
br label %22
22: ; preds = %20, %10
%23 = phi i64 [ %11, %10 ], [ %21, %20 ]
ret i64 %23
}

LLVM IR (-O2):
define i64 @bound_int16(i64 %0, i64 %1, i64 %2) {
%4 = icmp slt i64 %0, %1
%5 = icmp sgt i64 %0, %2
%6 = select i1 %5, i64 %2, i64 %0
%7 = select i1 %4, i64 %1, i64 %6
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void osm_rd_init(const char *fname) {
  fatal("osm"
        ": This build excluded \" MYNAME \" support because expat was not "
        "installed.\n");
}


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

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

LLVM IR (-O0):
@.str = [78 x i8] c"osm: This build excluded \22 MYNAME \22 support because expat was not installed.\0A\00"
define void @osm_rd_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @fatal(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [78 x i8] c"osm: This build excluded \22 MYNAME \22 support because expat was not installed.\0A\00"
define void @osm_rd_init(i8* nocapture readnone %0) {
%2 = tail call i32 @fatal(i8* getelementptr inbounds ([78 x i8], [78 x i8]* @.str, i64 0, i64 0))
ret void
}
void systickDisable(void) {
  (*((volatile unsigned int *const)(0xe000e010 + 0))) = 0;
}


x86 assembly (clang, -O0):
<systickDisable>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<systickDisable>:
mov    $0xe000e010,%eax
movl   $0x0,(%rax)
ret

LLVM IR (-O0):
define void @systickDisable() {
store volatile i32 0, i32* inttoptr (i64 3758153744 to i32*)
ret void
}

LLVM IR (-O2):
define void @systickDisable() {
store volatile i32 0, i32* inttoptr (i64 3758153744 to i32*)
ret void
}
int change_letter(inserts, deletes)
int inserts, deletes;
{
  if (!inserts)
    return 'd';
  else if (!deletes)
    return 'a';
  else
    return 'c';
}


x86 assembly (clang, -O0):
<change_letter>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1120 <change_letter+0x20>
movl   $0x64,-0x4(%rbp)
jmp    113d <change_letter+0x3d>
cmpl   $0x0,-0xc(%rbp)
jne    1136 <change_letter+0x36>
movl   $0x61,-0x4(%rbp)
jmp    113d <change_letter+0x3d>
movl   $0x63,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<change_letter>:
xor    %eax,%eax
test   %esi,%esi
setne  %al
test   %edi,%edi
lea    0x61(%rax,%rax,1),%ecx
mov    $0x64,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @change_letter(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp eq i32 %1, 0
%5 = select i1 %4, i32 97, i32 99
%6 = select i1 %3, i32 100, i32 %5
ret i32 %6
}
unsigned invert(unsigned x, int p, int n) {
  unsigned mask = ~(~0 << n);
  return x ^ (mask << (p - n + 1));
}


x86 assembly (clang, -O0):
<invert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
add    $0x1,%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<invert>:
mov    %edx,%ecx
mov    $0xffffffff,%eax
shl    %cl,%eax
not    %eax
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shl    %cl,%eax
xor    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @invert(i32 %0, i32 %1, i32 %2) {
%4 = shl nsw i32 -1, %2
%5 = xor i32 %4, -1
%6 = add i32 %1, 1
%7 = sub i32 %6, %2
%8 = shl i32 %5, %7
%9 = xor i32 %8, %0
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int wcscmp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int wcstring_cmp(const void *a, const void *b) {
  const wchar_t **ia = (const wchar_t **)a;
  const wchar_t **ib = (const wchar_t **)b;
  return wcscmp(*ia, *ib);
}


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

x86 assembly (clang, -O2):
<wcstring_cmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <wcscmp@plt>

LLVM IR (-O0):
define i32 @wcstring_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32**
%6 = alloca i32**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32**
store i32** %8, i32*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32**
store i32** %10, i32*** %6
%11 = load i32**, i32*** %5
%12 = load i32*, i32** %11
%13 = load i32**, i32*** %6
%14 = load i32*, i32** %13
%15 = call i32 @wcscmp(i32* %12, i32* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @wcstring_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32**
%4 = bitcast i8* %1 to i32**
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = tail call i32 @wcscmp(i32* %5, i32* %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_15() {
  Assert_real((isqrt(15) == 3),
              "/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/stdlib/isqrt.c",
              80, ("Integer square root of 15 should be 3"));
}


x86 assembly (clang, -O0):
<t_sqrt_15>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
call   1030 <isqrt@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x50,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_15>:
push   %rax
mov    $0xf,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x50,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 15 should be 3\00"
define void @t_sqrt_15() {
%1 = call i32 @isqrt(i32 15)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [38 x i8] c"Integer square root of 15 should be 3\00"
define void @t_sqrt_15() {
%1 = tail call i32 @isqrt(i32 15)
%2 = icmp eq i32 %1, 3
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t rsbi123(uint32_t x) { return 123 - x; }


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

x86 assembly (clang, -O2):
<rsbi123>:
mov    $0x7b,%eax
sub    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @rsbi123(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub nsw i64 123, %3
ret i64 %4
}

LLVM IR (-O2):
define i64 @rsbi123(i64 %0) {
%2 = sub nsw i64 123, %0
ret i64 %2
}
int security_socket_sock_rcv_skb(struct sock *sk, struct sk_buff *skb) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.sock = type opaque
%struct.sk_buff = type opaque
define i32 @security_socket_sock_rcv_skb(%struct.sock* %0, %struct.sk_buff* %1) {
%3 = alloca %struct.sock*
%4 = alloca %struct.sk_buff*
store %struct.sock* %0, %struct.sock** %3
store %struct.sk_buff* %1, %struct.sk_buff** %4
ret i32 0
}

LLVM IR (-O2):
%struct.sock = type opaque
%struct.sk_buff = type opaque
define i32 @security_socket_sock_rcv_skb(%struct.sock* nocapture readnone %0, %struct.sk_buff* nocapture readnone %1) {
ret i32 0
}