xunge/DecIR huggingface dataset:
/* Variables and functions */
char *getPermutation(int, int);
int printf(char *, char *);
int main(int argc, char *argv[]) {
  char *ret = getPermutation(5, 96);
  return printf("%s\n", ret);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x5,%edi
mov    $0x60,%esi
call   1040 <getPermutation@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
mov    $0x60,%esi
call   1040 <getPermutation@plt>
lea    0xec9(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i8* @getPermutation(i32 5, i32 96)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @getPermutation(i32 5, i32 96)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 %4
}
void init_numbers(int *tab, int n) {
  int i;
  i = 0;
  while (i < n) {
    tab[i] = 0;
    i++;
  }
}


x86 assembly (clang, -O0):
<init_numbers>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113b <init_numbers+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <init_numbers+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_numbers>:
test   %esi,%esi
jle    1126 <init_numbers+0x16>
push   %rax
mov    %esi,%edx
shl    $0x2,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @init_numbers(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i32* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret void
}
void single_lt() {
  register int out0 = 0;
  register int in1 = 1;
  asm("foo %1,%0" : "=r"(out0) : "<r"(in1));
  asm("foo %1,%0" : "=r"(out0) : "r<"(in1));
}


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

LLVM IR (-O0):
LLVM IR (-O2):
define void @single_lt() {
%1 = tail call i32 asm "foo $1,$0", "=r,<r,~{dirflag},~{fpsr},~{flags}"(i32 1)
%2 = tail call i32 asm "foo $1,$0", "=r,r<,~{dirflag},~{fpsr},~{flags}"(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
float Saturatef(float, float, float);
scalar_t__ lroundf(float);
uint16_t UnderVoltFloatToRaw(float val) {
  val = Saturatef(val, 0.0016f, 6.5536f);
  return (uint16_t)(lroundf(val * 625.0f) - 1);
}


x86 assembly (clang, -O0):
<UnderVoltFloatToRaw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeca(%rip),%xmm1
movss  0xec6(%rip),%xmm2
call   1030 <Saturatef@plt>
movss  %xmm0,-0x4(%rbp)
movss  0xeac(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1040 <lroundf@plt>
sub    $0x1,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UnderVoltFloatToRaw>:
push   %rax
movss  0xed7(%rip),%xmm1
movss  0xed3(%rip),%xmm2
call   1030 <Saturatef@plt>
mulss  0xeca(%rip),%xmm0
call   1040 <lroundf@plt>
add    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @UnderVoltFloatToRaw(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @Saturatef(float %3, float 0x3F5A36E2E0000000, float 0x401A36E2E0000000)
store float %4, float* %2
%5 = load float, float* %2
%6 = fmul float %5, 6.250000e+02
%7 = call i64 @lroundf(float %6)
%8 = sub nsw i64 %7, 1
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @UnderVoltFloatToRaw(float %0) {
%2 = tail call float @Saturatef(float %0, float 0x3F5A36E2E0000000, float 0x401A36E2E0000000)
%3 = fmul float %2, 6.250000e+02
%4 = tail call i64 @lroundf(float %3)
%5 = trunc i64 %4 to i32
%6 = add i32 %5, -1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void PrintHelpInfo(void) {
  printf("Usage: plotJittervsFill [options] -f [--file] <input log file name> "
         "-t [--jitter_threshold] <jitter threshold in ms>\n");
  printf("[options]:\n-v [--version] Print version and exit\n");
  printf("-d Debug. Prints input file line number for each data point picked "
         "up.\n");
  printf("-h [--help] [-?] Print this help screen and exit.\n");
}


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

x86 assembly (clang, -O2):
<PrintHelpInfo>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf51(%rip),%rdi
call   1030 <puts@plt>
lea    0xf76(%rip),%rdi
call   1030 <puts@plt>
lea    0xfb1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [118 x i8] c"Usage: plotJittervsFill [options] -f [--file] <input log file name> -t [--jitter_threshold] <jitter threshold in ms>\0A\00"
@.str.1 = [50 x i8] c"[options]:\0A-v [--version] Print version and exit\0A\00"
@.str.2 = [72 x i8] c"-d Debug. Prints input file line number for each data point picked up.\0A\00"
@.str.3 = [51 x i8] c"-h [--help] [-?] Print this help screen and exit.\0A\00"
define void @PrintHelpInfo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [117 x i8] c"Usage: plotJittervsFill [options] -f [--file] <input log file name> -t [--jitter_threshold] <jitter threshold in ms>\00"
@str.4 = [49 x i8] c"[options]:\0A-v [--version] Print version and exit\00"
@str.5 = [71 x i8] c"-d Debug. Prints input file line number for each data point picked up.\00"
@str.6 = [50 x i8] c"-h [--help] [-?] Print this help screen and exit.\00"
define void @PrintHelpInfo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([117 x i8], [117 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_RemoteIOClient_RemoteIO_SetPeerInterlock(void *, char *);
int /*<<< orphan*/ printf(char *, char *);
void UpnpRemoteIOClient_RemoteIO_SetPeerInterlock(void *upnptoken,
                                                  char *PeerConnection) {
  printf("Invoke: UpnpRemoteIOClient_RemoteIO_SetPeerInterlock(%s);\r\n",
         PeerConnection);
  UpnpResponse_RemoteIOClient_RemoteIO_SetPeerInterlock(upnptoken,
                                                        "Sample String");
}


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

x86 assembly (clang, -O2):
<UpnpRemoteIOClient_RemoteIO_SetPeerInterlock>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xf05(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <UpnpResponse_RemoteIOClient_RemoteIO_SetPeerInterlock@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"Invoke: UpnpRemoteIOClient_RemoteIO_SetPeerInterlock(%s);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpRemoteIOClient_RemoteIO_SetPeerInterlock(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @UpnpResponse_RemoteIOClient_RemoteIO_SetPeerInterlock(i8* %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"Invoke: UpnpRemoteIOClient_RemoteIO_SetPeerInterlock(%s);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UpnpRemoteIOClient_RemoteIO_SetPeerInterlock(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @UpnpResponse_RemoteIOClient_RemoteIO_SetPeerInterlock(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void testFreeNonMallocPointerWithOffset() {
  char c;
  char *r = &c;
  free(r + 1);
}


x86 assembly (clang, -O0):
<testFreeNonMallocPointerWithOffset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x1(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFreeNonMallocPointerWithOffset>:
push   %rax
lea    0x8(%rsp),%rdi
call   1030 <free@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @testFreeNonMallocPointerWithOffset() {
%1 = alloca i8
%2 = alloca i8*
store i8* %1, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = call i32 @free(i8* %4)
ret void
}

LLVM IR (-O2):
define void @testFreeNonMallocPointerWithOffset() {
%1 = alloca i8
%2 = getelementptr inbounds i8, i8* %1, i64 1
%3 = call i32 @free(i8* %2)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long root;
};
typedef TYPE_1__ Screen;

/* Variables and functions */
void set_Screen_root(void *_p, unsigned long _v) {
  ((Screen *)_p)->root = (unsigned long)_v;
}


x86 assembly (clang, -O0):
<set_Screen_root>:
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_Screen_root>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_Screen_root(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_Screen_root(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
int cpu2agc2(int Input) {
  if (Input < 0)
    return (03777777777 & ~(01777777777 & (-Input)));
  else
    return (01777777777 & Input);
}


x86 assembly (clang, -O0):
<cpu2agc2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    112b <cpu2agc2+0x2b>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
and    $0xfffffff,%eax
xor    $0xffffffff,%eax
and    $0x1fffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1136 <cpu2agc2+0x36>
mov    -0x8(%rbp),%eax
and    $0xfffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu2agc2>:
lea    -0x1(%rdi),%ecx
and    $0xfffffff,%ecx
or     $0x10000000,%ecx
mov    %edi,%eax
and    $0xfffffff,%eax
test   %edi,%edi
cmovs  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @cpu2agc2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = sub nsw i32 0, %7
%9 = and i32 268435455, %8
%10 = xor i32 %9, -1
%11 = and i32 536870911, %10
store i32 %11, i32* %2
br label %15
12: ; preds = %1
%13 = load i32, i32* %3
%14 = and i32 268435455, %13
store i32 %14, i32* %2
br label %15
15: ; preds = %12, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
define i32 @cpu2agc2(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = add i32 %0, 268435455
%4 = and i32 %3, 268435455
%5 = or i32 %4, 268435456
%6 = and i32 %0, 268435455
%7 = select i1 %2, i32 %5, i32 %6
ret i32 %7
}
int test_imm_42int8_reg(signed char val) {
  return ((val) & (-0x42 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_42int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffbe,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_42int8_reg>:
test   $0xbe,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_42int8_reg(i8 signext %0) {
%2 = and i8 %0, -66
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void __limat_vtxops_v2_interpolate(const void *self, const void *other,
                                   float blend, void *result) {}


x86 assembly (clang, -O0):
<__limat_vtxops_v2_interpolate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @__limat_vtxops_v2_interpolate(i8* %0, i8* %1, float %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca float
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store float %2, float* %7
store i8* %3, i8** %8
ret void
}

LLVM IR (-O2):
define void @__limat_vtxops_v2_interpolate(i8* nocapture %0, i8* nocapture %1, float %2, i8* nocapture %3) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("I am test exe2.\n");
  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    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"I am test exe2.\0A\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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [16 x i8] c"I am test exe2.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int BASM_Parse_OpChar(int c) {
  int i;
  switch (c) {
  case '~':
  case '!':
  case '@':
  case '#':
  case '$':
  case '%':
  case '^':
  case '&':
  case '*':
  case '-':
  case '=':
  case '+':
  case '\\':
  case '|':
  case ':':
  case '<':
  case '>':
  case '?':
  case '/':
    i = 1;
    break;
  default:
    i = 0;
    break;
  }
  return (i);
}


x86 assembly (clang, -O0):
<BASM_Parse_OpChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffdf,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5d,%eax
ja     113c <BASM_Parse_OpChar+0x3c>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x8(%rbp)
jmp    1143 <BASM_Parse_OpChar+0x43>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BASM_Parse_OpChar>:
add    $0xffffffdf,%edi
cmp    $0x5d,%edi
ja     111e <BASM_Parse_OpChar+0x1e>
mov    $0x1,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @BASM_Parse_OpChar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
switch i32 %4, label %6 [
i32 126, label %5
i32 33, label %5
i32 64, label %5
i32 35, label %5
i32 36, label %5
i32 37, label %5
i32 94, label %5
i32 38, label %5
i32 42, label %5
i32 45, label %5
i32 61, label %5
i32 43, label %5
i32 92, label %5
i32 124, label %5
i32 58, label %5
i32 60, label %5
i32 62, label %5
i32 63, label %5
i32 47, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %3
br label %7
6: ; preds = %1
store i32 0, i32* %3
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @BASM_Parse_OpChar(i32 %0) {
switch i32 %0, label %2 [
i32 126, label %3
i32 33, label %3
i32 64, label %3
i32 35, label %3
i32 36, label %3
i32 37, label %3
i32 94, label %3
i32 38, label %3
i32 42, label %3
i32 45, label %3
i32 61, label %3
i32 43, label %3
i32 92, label %3
i32 124, label %3
i32 58, label %3
i32 60, label %3
i32 62, label %3
i32 63, label %3
i32 47, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
int is_mod(char c) {
  if (c == 'h' || c == 'l' || c == 'j' || c == 'z' || c == 'L')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<is_mod>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x68,%eax
je     114b <is_mod+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x6c,%eax
je     114b <is_mod+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x6a,%eax
je     114b <is_mod+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
je     114b <is_mod+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x4c,%eax
jne    1157 <is_mod+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <is_mod+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_mod>:
add    $0xb4,%dil
cmp    $0x2e,%dil
ja     1124 <is_mod+0x24>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x400150000001,%rdx
bt     %rcx,%rdx
jae    1124 <is_mod+0x24>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_mod(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 104
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 108
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 106
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 122
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 76
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %25
24: ; preds = %19
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
define i32 @is_mod(i8 signext %0) {
switch i8 %0, label %2 [
i8 122, label %3
i8 108, label %3
i8 106, label %3
i8 104, label %3
i8 76, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
unsigned long BSP_GetPageAttribute(unsigned long addr) {
  return ({
    unsigned long __v =
        (*(volatile unsigned long *)((0x01848000 + 4 * (addr / 16777216))));
    __v;
  });
}


x86 assembly (clang, -O0):
<BSP_GetPageAttribute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x18,%rax
shl    $0x2,%rax
add    $0x1848000,%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_GetPageAttribute>:
shr    $0x18,%rdi
mov    0x1848000(,%rdi,4),%rax
01
ret

LLVM IR (-O0):
define i64 @BSP_GetPageAttribute(i64 %0) {
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %2
%5 = load i64, i64* %2
%6 = udiv i64 %5, 16777216
%7 = mul i64 4, %6
%8 = add i64 25460736, %7
%9 = inttoptr i64 %8 to i64*
%10 = load volatile i64, i64* %9
store i64 %10, i64* %3
%11 = load i64, i64* %3
store i64 %11, i64* %4
%12 = load i64, i64* %4
ret i64 %12
}

LLVM IR (-O2):
define i64 @BSP_GetPageAttribute(i64 %0) {
%2 = lshr i64 %0, 22
%3 = and i64 %2, 4398046511100
%4 = add nuw nsw i64 %3, 25460736
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
int INC_T(int a) { return (++a == 200 ? 0 : a); }


x86 assembly (clang, -O0):
<INC_T>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0xc8,%eax
jne    1125 <INC_T+0x25>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <INC_T+0x2b>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<INC_T>:
lea    0x1(%rdi),%ecx
xor    %eax,%eax
cmp    $0xc8,%ecx
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @INC_T(i32 %0) {
%2 = add nsw i32 %0, 1
%3 = icmp eq i32 %2, 200
%4 = select i1 %3, i32 0, i32 %2
ret i32 %4
}
test_6(int code) {
  _Bool temp = testit();
  _Bool rotate = (code == 22);
  if (!rotate && temp == 0)
    oof();
}


x86 assembly (clang, -O0):
<test_6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <testit@plt>
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
mov    %al,-0x9(%rbp)
cmpl   $0x16,-0x8(%rbp)
sete   %al
and    $0x1,%al
mov    %al,-0xa(%rbp)
testb  $0x1,-0xa(%rbp)
jne    116b <test_6+0x4b>
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x0,%eax
jne    116b <test_6+0x4b>
mov    $0x0,%al
call   1040 <oof@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_6>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <testit@plt>
cmp    $0x16,%ebx
je     113a <test_6+0x1a>
test   %eax,%eax
jne    113a <test_6+0x1a>
xor    %eax,%eax
call   1040 <oof@plt>
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_6(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
store i32 %0, i32* %3
%6 = call i32 (...) @testit()
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i8
store i8 %8, i8* %4
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 22
%11 = zext i1 %10 to i8
store i8 %11, i8* %5
%12 = load i8, i8* %5
%13 = trunc i8 %12 to i1
br i1 %13, label %21, label %14
14: ; preds = %1
%15 = load i8, i8* %4
%16 = trunc i8 %15 to i1
%17 = zext i1 %16 to i32
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %14
%20 = call i32 (...) @oof()
br label %21
21: ; preds = %19, %14, %1
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @test_6(i32 %0) {
%2 = tail call i32 (...) @testit()
%3 = icmp ne i32 %0, 22
%4 = icmp eq i32 %2, 0
%5 = select i1 %3, i1 %4, i1 false
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = tail call i32 (...) @oof()
br label %8
8: ; preds = %6, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _vram_write_run(int /*<<< orphan*/, int);
int /*<<< orphan*/ vdp_waddr(int);
void vdp_clear_line(int line_number) {
  vdp_waddr(0x0000 + 40 * line_number);
  _vram_write_run(0, 40);
}


x86 assembly (clang, -O0):
<vdp_clear_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
imul   $0x28,-0x4(%rbp),%edi
add    $0x0,%edi
call   1040 <vdp_waddr@plt>
xor    %edi,%edi
mov    $0x28,%esi
call   1030 <_vram_write_run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vdp_clear_line>:
push   %rax
shl    $0x3,%edi
lea    (%rdi,%rdi,4),%edi
call   1040 <vdp_waddr@plt>
xor    %edi,%edi
mov    $0x28,%esi
pop    %rax
jmp    1030 <_vram_write_run@plt>

LLVM IR (-O0):
define void @vdp_clear_line(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 40, %3
%5 = add nsw i32 0, %4
%6 = call i32 @vdp_waddr(i32 %5)
%7 = call i32 @_vram_write_run(i32 0, i32 40)
ret void
}

LLVM IR (-O2):
define void @vdp_clear_line(i32 %0) {
%2 = mul nsw i32 %0, 40
%3 = tail call i32 @vdp_waddr(i32 %2)
%4 = tail call i32 @_vram_write_run(i32 0, i32 40)
ret void
}
void f11(void) {}


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

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

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

LLVM IR (-O2):
define void @f11() {
ret void
}
void U_EMRABORTPATH_print(const char *contents) { (void)(contents); }


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

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

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

LLVM IR (-O2):
define void @U_EMRABORTPATH_print(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcpy(char *, char *);
char *strtok(char *, char *);
int main() {
  char s[22];
  strcpy(s, "dsdsdsdso");
  char *str = strtok(s, ".");
  puts(str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rdi
lea    0xebd(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
lea    0xeb7(%rip),%rsi
call   1050 <strtok@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
lea    0xec4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xebc(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strtok@plt>
mov    %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"dsdsdsdso\00"
@.str.1 = [2 x i8] c".\00"
define i32 @main() {
%1 = alloca [22 x i8]
%2 = alloca i8*
%3 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%6 = call i8* @strtok(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 @puts(i8* %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"dsdsdsdso\00"
@.str.1 = [2 x i8] c".\00"
define i32 @main() {
%1 = alloca [22 x i8]
%2 = getelementptr inbounds [22 x i8], [22 x i8]* %1, i64 0, i64 0
%3 = call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%4 = call i8* @strtok(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @puts(i8* dereferenceable(1) %4)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
void rtp2435r_set_first(uint8_t *header) { header[2] |= 0x1; }


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

x86 assembly (clang, -O2):
<rtp2435r_set_first>:
orb    $0x1,0x8(%rdi)
ret

LLVM IR (-O0):
define void @rtp2435r_set_first(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
%6 = or i32 %5, 1
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @rtp2435r_set_first(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 2
%3 = load i32, i32* %2
%4 = or i32 %3, 1
store i32 %4, i32* %2
ret void
}
void _Jv_Throw(void) {}


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

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

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

LLVM IR (-O2):
define void @_Jv_Throw() {
ret void
}
void oqcF(char *x) {
  const char *y;
  y = x;
}


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

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

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

LLVM IR (-O2):
define void @oqcF(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x5d() {
  Assert_real((isupper(93) == 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_isupper.c",
              470, ("isupper should be 0 for ]"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for ]\00"
define void @t_isupper_0x5d() {
%1 = tail call i64 @isupper(i32 93)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 470, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
size_t get_allocation_size(const void *mem) {
  char *buf = (char *)mem - (sizeof(size_t) * 2);
  return ((size_t *)buf)[0];
}


x86 assembly (clang, -O0):
<get_allocation_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff0,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @get_allocation_size(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 -16
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @get_allocation_size(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -16
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}
unsigned int inw(unsigned short _port) {
  unsigned short rv;
  __asm__ __volatile__("inw %1,%0" : "=a"(rv) : "dN"(_port));
  return rv;
}


x86 assembly (clang, -O0):
<inw>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%dx
in     (%dx),%ax
mov    %ax,-0x4(%rbp)
movzwl -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw>:
mov    %edi,%edx
in     (%dx),%ax
movzwl %ax,%eax
ret

LLVM IR (-O0):
define i32 @inw(i16 zeroext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
%4 = load i16, i16* %2
%5 = call i16 asm sideeffect "inw $1,$0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @inw(i16 zeroext %0) {
%2 = tail call i16 asm sideeffect "inw $1,$0", "={ax},{dx}N,~{dirflag},~{fpsr},~{flags}"(i16 %0)
%3 = zext i16 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS8_PRIV_KEY_INFO;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS8_PRIV_KEY_INFO_it;
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a,
                                             const unsigned char **in,
                                             long len) {
  return (PKCS8_PRIV_KEY_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                              &PKCS8_PRIV_KEY_INFO_it);
}


x86 assembly (clang, -O0):
<d2i_PKCS8_PRIV_KEY_INFO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2ea9(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_PKCS8_PRIV_KEY_INFO>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@PKCS8_PRIV_KEY_INFO_it = global i32 0
define i32* @d2i_PKCS8_PRIV_KEY_INFO(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @PKCS8_PRIV_KEY_INFO_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@PKCS8_PRIV_KEY_INFO_it = global i32 0
define i32* @d2i_PKCS8_PRIV_KEY_INFO(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @PKCS8_PRIV_KEY_INFO_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
int wpa_key_mgmt_ft(int akm) {
  return !!(akm & ((1 << (6)) | (1 << (5)) | (1 << (11))));
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_ft>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x860,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_ft>:
xor    %eax,%eax
test   $0x860,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_ft(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 2144
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_ft(i32 %0) {
%2 = and i32 %0, 2144
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const);
void param_test2(const int a) {
  printf("%d\t", a);
  printf("%d\n", a);
}


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

x86 assembly (clang, -O2):
<param_test2>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

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

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverse_string(char *, int);
int main() {
  char str[] = "This is a string!!";
  int string_length = sizeof(str) / sizeof(char);
  printf("Original: %s\n", str);
  reverse_string(str, string_length);
  printf("Reversed: %s\n", str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xebc(%rip),%al
mov    %al,-0xe(%rbp)
movl   $0x13,-0x24(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1030 <reverse_string@plt>
lea    -0x20(%rbp),%rsi
lea    0xe9a(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x212167,0xf(%rsp)
lea    0xed4(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x13,%esi
call   1030 <reverse_string@plt>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [19 x i8] c"This is a string!!\00"
@.str = [14 x i8] c"Original: %s\0A\00"
@.str.1 = [14 x i8] c"Reversed: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [19 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [19 x i8]* %2 to i8*
store i32 19, i32* %3
%5 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @reverse_string(i8* %7, i32 %8)
%10 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%11 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [19 x i8] c"This is a string!!\00"
@.str = [14 x i8] c"Original: %s\0A\00"
@.str.1 = [14 x i8] c"Reversed: %s\0A\00"
define i32 @main() {
%1 = alloca [19 x i8]
%2 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @reverse_string(i8* %2, i32 19)
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
void PEM_get_EVP_CIPHER_INFO(void) {}


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

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

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

LLVM IR (-O2):
define void @PEM_get_EVP_CIPHER_INFO() {
ret void
}
/* Variables and functions */
double M_PI;
double modAngle(double angle) {
  double modAngle = 180.0 - 180.0 * angle / M_PI;
  if (modAngle < 0)
    return modAngle + 360.0;
  else
    return modAngle;
}


x86 assembly (clang, -O0):
<modAngle>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mov    0x2ecb(%rip),%rax
divsd  (%rax),%xmm1
movsd  0xed7(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1157 <modAngle+0x57>
movsd  0xec0(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1161 <modAngle+0x61>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<modAngle>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2ed5(%rip),%rax
divsd  (%rax),%xmm0
subsd  %xmm0,%xmm1
movsd  0xee5(%rip),%xmm2
addsd  %xmm1,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm1,%xmm0
cmpltsd %xmm3,%xmm0
andpd  %xmm0,%xmm2
andnpd %xmm1,%xmm0
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @modAngle(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fmul double 1.800000e+02, %5
%7 = load double, double* @M_PI
%8 = fdiv double %6, %7
%9 = fsub double 1.800000e+02, %8
store double %9, double* %4
%10 = load double, double* %4
%11 = fcmp olt double %10, 0.000000e+00
br i1 %11, label %12, label %15
12: ; preds = %1
%13 = load double, double* %4
%14 = fadd double %13, 3.600000e+02
store double %14, double* %2
br label %17
15: ; preds = %1
%16 = load double, double* %4
store double %16, double* %2
br label %17
17: ; preds = %15, %12
%18 = load double, double* %2
ret double %18
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @modAngle(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = load double, double* @M_PI
%4 = fdiv double %2, %3
%5 = fsub double 1.800000e+02, %4
%6 = fcmp olt double %5, 0.000000e+00
%7 = fadd double %5, 3.600000e+02
%8 = select i1 %6, double %7, double %5
ret double %8
}
int picolcd_fb_reset(struct picolcd_data *data, int clear) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.picolcd_data = type opaque
define i32 @picolcd_fb_reset(%struct.picolcd_data* nocapture readnone %0, i32 %1) {
ret i32 0
}
int test_imm_30uint8_reg(unsigned char val) {
  return ((val) & (-0x30 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_30uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xffffffd0,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_30uint8_reg>:
test   $0xd0,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_30uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -48
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printversion(void) {
  printf(
      "intfsort 1.0.0\n"
      "Copyright (C) 2018 Andries van Bergen <x1@ziggo.nl>\n"
      "License GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
      "This is free software: you are free to change and redistribute it.\n"
      "There is NO WARRANTY, to the extent permitted by law.\n");
}


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

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

LLVM IR (-O0):
@.str = [260 x i8] c"intfsort 1.0.0\0ACopyright (C) 2018 Andries van Bergen <x1@ziggo.nl>\0ALicense GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\0A\00"
define void @printversion() {
%1 = call i32 @printf(i8* getelementptr inbounds ([260 x i8], [260 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [259 x i8] c"intfsort 1.0.0\0ACopyright (C) 2018 Andries van Bergen <x1@ziggo.nl>\0ALicense GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\0AThis is free software: you are free to change and redistribute it.\0AThere is NO WARRANTY, to the extent permitted by law.\00"
define void @printversion() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([259 x i8], [259 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ genrand_int32();
double genrand_real2(void) {
  return ((double)genrand_int32()) * (1.0 / 4294967296.0);
}


x86 assembly (clang, -O0):
<genrand_real2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <genrand_int32@plt>
cvtsi2sd %rax,%xmm0
movsd  0xed8(%rip),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_real2>:
push   %rax
xor    %eax,%eax
call   1030 <genrand_int32@plt>
cvtsi2sd %rax,%xmm0
mulsd  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @genrand_real2() {
%1 = call i64 (...) @genrand_int32()
%2 = sitofp i64 %1 to double
%3 = fmul double %2, 0x3DF0000000000000
ret double %3
}

LLVM IR (-O2):
define double @genrand_real2() {
%1 = tail call i64 (...) @genrand_int32()
%2 = sitofp i64 %1 to double
%3 = fmul double %2, 0x3DF0000000000000
ret double %3
}
int teamd_zmq_init(struct teamd_context *ctx) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.teamd_context = type opaque
define i32 @teamd_zmq_init(%struct.teamd_context* nocapture readnone %0) {
ret i32 0
}