xunge/DecIR huggingface dataset:
/* Variables and functions */
int inlineFunction(int);
void test13(int i) {
  int x = inlineFunction(i);
  x &&x < 10;
}


x86 assembly (clang, -O0):
<test13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <inlineFunction@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113f <test13+0x2f>
cmpl   $0xa,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test13>:
jmp    1030 <inlineFunction@plt>

LLVM IR (-O0):
define void @test13(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @inlineFunction(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 10
br label %11
11: ; preds = %8, %1
%12 = phi i1 [ false, %1 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret void
}

LLVM IR (-O2):
define void @test13(i32 %0) {
%2 = tail call i32 @inlineFunction(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
__attribute__((__noreturn__)) void exitfunc5(void) {
  printf("Executing exitfunc"
         "5"
         ".\n");
  exit(0);
}


x86 assembly (clang, -O0):
<exitfunc5>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<exitfunc5>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Executing exitfunc5.\0A\00"
define void @exitfunc5() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [21 x i8] c"Executing exitfunc5.\00"
define void @exitfunc5() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntEnable(int /*<<< orphan*/);
int /*<<< orphan*/ IntRegister(int /*<<< orphan*/, void (*)());
void uDMAIntRegister(uint32_t ui32IntChannel, void (*pfnHandler)(void)) {
  ;
  IntRegister(ui32IntChannel, pfnHandler);
  IntEnable(ui32IntChannel);
}


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

x86 assembly (clang, -O2):
<uDMAIntRegister>:
push   %rbx
mov    %edi,%ebx
call   1040 <IntRegister@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @uDMAIntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%5 = load i32, i32* %3
%6 = load void ()*, void ()** %4
%7 = bitcast void ()* %6 to void (...)*
%8 = call i32 @IntRegister(i32 %5, void (...)* %7)
%9 = load i32, i32* %3
%10 = call i32 @IntEnable(i32 %9)
ret void
}

LLVM IR (-O2):
define void @uDMAIntRegister(i32 %0, void ()* %1) {
%3 = bitcast void ()* %1 to void (...)*
%4 = tail call i32 @IntRegister(i32 %0, void (...)* %3)
%5 = tail call i32 @IntEnable(i32 %0)
ret void
}
/* Variables and functions */
scalar_t__ powf(int, int);
int qcs_mod(int, int);
int qcs_power_mod(int a, int k, int n) {
  int v;
  v = (int)powf(a, k);
  return qcs_mod(v, n);
}


x86 assembly (clang, -O0):
<qcs_power_mod>:
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
call   1030 <powf@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <qcs_mod@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qcs_power_mod>:
push   %rbx
mov    %edx,%ebx
call   1030 <powf@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1040 <qcs_mod@plt>

LLVM IR (-O0):
define i32 @qcs_power_mod(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* %4
%9 = load i32, i32* %5
%10 = call i64 @powf(i32 %8, i32 %9)
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = call i32 @qcs_mod(i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @qcs_power_mod(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @powf(i32 %0, i32 %1)
%5 = trunc i64 %4 to i32
%6 = tail call i32 @qcs_mod(i32 %5, i32 %2)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Wreg(int);
int /*<<< orphan*/ Ws(char *);
int /*<<< orphan*/ Wx(int, int);
int Winst7(int i, int code) {
  Ws("andi  ");
  Wreg(((code >> 4) & 0xF) + 16);
  Ws(", $");
  Wx(((code >> 4) & 0xF0) | (code & 0x0F), 1);
  return 0;
}


x86 assembly (clang, -O0):
<Winst7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xebb(%rip),%rdi
call   1030 <Ws@plt>
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
and    $0xf,%edi
add    $0x10,%edi
call   1050 <Wreg@plt>
lea    0xea5(%rip),%rdi
call   1030 <Ws@plt>
mov    -0x8(%rbp),%edi
sar    $0x4,%edi
and    $0xf0,%edi
mov    -0x8(%rbp),%eax
and    $0xf,%eax
or     %eax,%edi
mov    $0x1,%esi
call   1040 <Wx@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Winst7>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
lea    0xec4(%rip),%rdi
call   1030 <Ws@plt>
mov    %ebx,%ebp
sar    $0x4,%ebp
mov    %ebp,%edi
and    $0xf,%edi
or     $0x10,%edi
call   1050 <Wreg@plt>
lea    0xead(%rip),%rdi
call   1030 <Ws@plt>
and    $0xf0,%ebp
and    $0xf,%ebx
or     %ebp,%ebx
mov    %ebx,%edi
mov    $0x1,%esi
call   1040 <Wx@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"andi \00"
@.str.1 = [4 x i8] c", $\00"
define i32 @Winst7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %4
%7 = ashr i32 %6, 4
%8 = and i32 %7, 15
%9 = add nsw i32 %8, 16
%10 = call i32 @Wreg(i32 %9)
%11 = call i32 @Ws(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* %4
%13 = ashr i32 %12, 4
%14 = and i32 %13, 240
%15 = load i32, i32* %4
%16 = and i32 %15, 15
%17 = or i32 %14, %16
%18 = call i32 @Wx(i32 %17, i32 1)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"andi \00"
@.str.1 = [4 x i8] c", $\00"
define i32 @Winst7(i32 %0, i32 %1) {
%3 = tail call i32 @Ws(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = ashr i32 %1, 4
%5 = and i32 %4, 15
%6 = or i32 %5, 16
%7 = tail call i32 @Wreg(i32 %6)
%8 = tail call i32 @Ws(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%9 = and i32 %4, 240
%10 = and i32 %1, 15
%11 = or i32 %9, %10
%12 = tail call i32 @Wx(i32 %11, i32 1)
ret i32 0
}
void mp_svg_backend_initialize(void *mp) { return; }


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

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

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

LLVM IR (-O2):
define void @mp_svg_backend_initialize(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void uninitvar_strcpy(char *d, char *s) {
  char *dest;
  char *src;
  (void)strcpy(dest, s);
  (void)strcpy(d, src);
  (void)strcpy(dest, src);
  (void)strcpy(d, s);
}


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

x86 assembly (clang, -O2):
<uninitvar_strcpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1030 <strcpy@plt>
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

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

LLVM IR (-O2):
define void @uninitvar_strcpy(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* undef, i8* %1)
%4 = tail call i32 @strcpy(i8* %0, i8* undef)
%5 = tail call i32 @strcpy(i8* undef, i8* undef)
%6 = tail call i32 @strcpy(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
scalar_t__ GetBackgroundColor();
int /*<<< orphan*/ memcpy(void *, void *, int);
void SetBMGBackgroundColor(unsigned char *color) {
  memcpy((void *)GetBackgroundColor(), (void *)color,
         4 * sizeof(unsigned char));
}


x86 assembly (clang, -O0):
<SetBMGBackgroundColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <GetBackgroundColor@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetBMGBackgroundColor>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <GetBackgroundColor@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
mov    $0x4,%edx
pop    %rbx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @SetBMGBackgroundColor(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @GetBackgroundColor()
%4 = inttoptr i64 %3 to i8*
%5 = load i8*, i8** %2
%6 = call i32 @memcpy(i8* %4, i8* %5, i32 4)
ret void
}

LLVM IR (-O2):
define void @SetBMGBackgroundColor(i8* %0) {
%2 = tail call i64 (...) @GetBackgroundColor()
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @memcpy(i8* %3, i8* %0, i32 4)
ret void
}
/* Variables and functions */
int from_cchar(char *);
int extchar(char *p) {
  int c = from_cchar(p);
  if (c == -1)
    c = '?';
  return c;
}


x86 assembly (clang, -O0):
<extchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <from_cchar@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1139 <extchar+0x29>
movl   $0x3f,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<extchar>:
push   %rax
call   1030 <from_cchar@plt>
cmp    $0xffffffff,%eax
mov    $0x3f,%ecx
cmove  %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @extchar(i8* %0) {
%2 = tail call i32 @from_cchar(i8* %0)
%3 = icmp eq i32 %2, -1
%4 = select i1 %3, i32 63, i32 %2
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sp;

/* Variables and functions */
char *regname(int);
int /*<<< orphan*/ snprintf(char *, int, char *, char *);
const char *segpfx(int arg) {
  static char sp[32];
  if (!arg)
    return "";
  snprintf(sp, sizeof(sp), "!%s:", regname(arg));
  return sp;
}


x86 assembly (clang, -O0):
<segpfx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1145 <segpfx+0x25>
lea    0xec8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1173 <segpfx+0x53>
mov    -0xc(%rbp),%edi
call   1030 <regname@plt>
mov    %rax,%rcx
lea    0x2ee9(%rip),%rdi
mov    $0x20,%esi
lea    0xe9d(%rip),%rdx
call   1040 <snprintf@plt>
lea    0x2ed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<segpfx>:
push   %rbx
test   %edi,%edi
je     114a <segpfx+0x2a>
call   1030 <regname@plt>
lea    0x2f0f(%rip),%rbx
lea    0xec8(%rip),%rdx
mov    %rbx,%rdi
mov    $0x20,%esi
mov    %rax,%rcx
call   1040 <snprintf@plt>
jmp    1151 <segpfx+0x31>
lea    0xeb3(%rip),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@segpfx.sp = internal global [32 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c"!%s:\00"
define i8* @segpfx(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %7, label %6
6: ; preds = %1
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %2
br label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i8* @regname(i32 %8)
%10 = call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @segpfx.sp, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %9)
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @segpfx.sp, i64 0, i64 0), i8** %2
br label %11
11: ; preds = %7, %6
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@segpfx.sp = internal global [32 x i8] zeroinitializer
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c"!%s:\00"
define i8* @segpfx(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i8* @regname(i32 %0)
%5 = tail call i32 @snprintf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @segpfx.sp, i64 0, i64 0), i32 32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %4)
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @segpfx.sp, i64 0, i64 0), %3 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), %1 ]
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
long time(void *unused) {
  printf("hooked\n");
  return 123456;
}


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

x86 assembly (clang, -O2):
<time>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1e240,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"hooked\0A\00"
define i64 @time(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i64 123456
}

LLVM IR (-O2):
@str = [7 x i8] c"hooked\00"
define i64 @time(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i64 123456
}
/* Type definitions */
typedef int int_fast8_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_COPY_int_fast8_t(int_fast8_t *const dest,
                                        int_fast8_t const src) {
  return (((*dest) = src), true);
}


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

x86 assembly (clang, -O2):
<SHAREMIND_MAP_KEY_COPY_int_fast8_t>:
mov    %esi,(%rdi)
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_COPY_int_fast8_t(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret i32 1
}
void rcu_virt_note_context_switch(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @rcu_virt_note_context_switch(i32 %0) {
ret void
}
void NullUpdate(void *id, struct NoteFinder *nf) {}


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

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

LLVM IR (-O0):
%struct.NoteFinder = type opaque
define void @NullUpdate(i8* %0, %struct.NoteFinder* %1) {
%3 = alloca i8*
%4 = alloca %struct.NoteFinder*
store i8* %0, i8** %3
store %struct.NoteFinder* %1, %struct.NoteFinder** %4
ret void
}

LLVM IR (-O2):
%struct.NoteFinder = type opaque
define void @NullUpdate(i8* nocapture %0, %struct.NoteFinder* nocapture %1) {
ret void
}
void rop3_226_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T ^ *D;
  stk2 = S & stk3;
  stk1 = *D ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_226_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_226_0_0>:
mov    (%rdi),%al
xor    %al,%dl
and    %sil,%dl
xor    %al,%dl
mov    %dl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_226_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = and i8 %5, %1
%7 = xor i8 %6, %4
store i8 %7, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_secp256k1_to_montgomery(uintptr_t, uintptr_t);
void fiat_secp256k1_to_montgomery(uint64_t out1[4], const uint64_t arg1[4]) {
  internal_fiat_secp256k1_to_montgomery((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_secp256k1_to_montgomery>:
jmp    1030 <internal_fiat_secp256k1_to_montgomery@plt>

LLVM IR (-O0):
define void @fiat_secp256k1_to_montgomery(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_secp256k1_to_montgomery(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_secp256k1_to_montgomery(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_secp256k1_to_montgomery(i64 %3, i64 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdin;
int vfscanf(int /*<<< orphan*/, char const *, int /*<<< orphan*/);
int __vscanf(const char *format, va_list arg) {
  return vfscanf(stdin, format, arg);
}


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

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

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

LLVM IR (-O2):
@stdin = global i32 0
define i32 @__vscanf(i8* %0, i32 %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @vfscanf(i32 %3, i8* %0, i32 %1)
ret i32 %4
}
/* Variables and functions */
int multiply(void *, int);
int run_vector_c(void *data, int n) { return multiply(data, n); }


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

x86 assembly (clang, -O2):
<run_vector_c>:
jmp    1030 <multiply@plt>

LLVM IR (-O0):
define i32 @run_vector_c(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 = call i32 @multiply(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @run_vector_c(i8* %0, i32 %1) {
%3 = tail call i32 @multiply(i8* %0, i32 %1)
ret i32 %3
}
void rop3_142_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk2 = S ^ *D;
  stk3 = T ^ *D;
  stk2 = stk2 & stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_142_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_142_1_0>:
mov    (%rdi),%al
xor    %al,%dl
or     %sil,%dl
and    %al,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_142_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = xor i32 %11, %14
%16 = trunc i32 %15 to i8
store i8 %16, i8* %8
%17 = load i8, i8* %6
%18 = zext i8 %17 to i32
%19 = load i8*, i8** %4
%20 = load i8, i8* %19
%21 = zext i8 %20 to i32
%22 = xor i32 %18, %21
%23 = trunc i32 %22 to i8
store i8 %23, i8* %9
%24 = load i8, i8* %8
%25 = zext i8 %24 to i32
%26 = load i8, i8* %9
%27 = zext i8 %26 to i32
%28 = and i32 %25, %27
%29 = trunc i32 %28 to i8
store i8 %29, i8* %8
%30 = load i8, i8* %5
%31 = zext i8 %30 to i32
%32 = load i8, i8* %8
%33 = zext i8 %32 to i32
%34 = xor i32 %31, %33
%35 = trunc i32 %34 to i8
store i8 %35, i8* %7
%36 = load i8, i8* %7
%37 = zext i8 %36 to i32
%38 = load i8, i8* %5
%39 = zext i8 %38 to i32
%40 = xor i32 %39, -1
%41 = and i32 %37, %40
%42 = load i8*, i8** %4
%43 = load i8, i8* %42
%44 = zext i8 %43 to i32
%45 = load i8, i8* %5
%46 = zext i8 %45 to i32
%47 = and i32 %44, %46
%48 = or i32 %41, %47
%49 = trunc i32 %48 to i8
%50 = load i8*, i8** %4
store i8 %49, i8* %50
ret void
}

LLVM IR (-O2):
define void @rop3_142_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %2
%6 = or i8 %5, %1
%7 = and i8 %6, %4
store i8 %7, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *RepFwriteTmp(char *, char *, int /*<<< orphan*/ *);
FILE *RepFwrite(char *Type, char *Filename) {
  return (RepFwriteTmp(Type, Filename, NULL));
}


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

x86 assembly (clang, -O2):
<RepFwrite>:
xor    %edx,%edx
jmp    1030 <RepFwriteTmp@plt>

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

LLVM IR (-O2):
define i32* @RepFwrite(i8* %0, i8* %1) {
%3 = tail call i32* @RepFwriteTmp(i8* %0, i8* %1, i32* null)
ret i32* %3
}
void __attribute__((__deprecated__)) ignore_ptr(void *p) { (void)p; }


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

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

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

LLVM IR (-O2):
define void @ignore_ptr(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MD5(char *, int, unsigned char *);
void SANDSHREW_MD5(unsigned char *output, char *input) {
  MD5(input, 32, output);
}


x86 assembly (clang, -O0):
<SANDSHREW_MD5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x20,%esi
call   1030 <MD5@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SANDSHREW_MD5>:
mov    %rdi,%rdx
mov    %rsi,%rdi
mov    $0x20,%esi
jmp    1030 <MD5@plt>

LLVM IR (-O0):
define void @SANDSHREW_MD5(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 = load i8*, i8** %3
%7 = call i32 @MD5(i8* %5, i32 32, i8* %6)
ret void
}

LLVM IR (-O2):
define void @SANDSHREW_MD5(i8* %0, i8* %1) {
%3 = tail call i32 @MD5(i8* %1, i32 32, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ str_toupper(char *);
scalar_t__ strcmp(char *, char *);
bool is_vertex_pass(char vertex_str[]) {
  bool is_pass = false;
  str_toupper(vertex_str);
  if (strcmp(vertex_str, "PASS") == 0) {
    is_pass = true;
  }
  return is_pass;
}


x86 assembly (clang, -O0):
<is_vertex_pass>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <str_toupper@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    115d <is_vertex_pass+0x3d>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_vertex_pass>:
push   %rbx
mov    %rdi,%rbx
call   1040 <str_toupper@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"PASS\00"
define i32 @is_vertex_pass(i8* %0) {
%2 = tail call i32 @str_toupper(i8* %0)
%3 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
void *malloc(size_t);
void *bch_alloc(size_t size, int *err) {
  void *ptr;
  ptr = malloc(size);
  if (ptr == NULL)
    *err = 1;
  return ptr;
}


x86 assembly (clang, -O0):
<bch_alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1142 <bch_alloc+0x32>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bch_alloc>:
push   %rbx
mov    %rsi,%rbx
call   1030 <malloc@plt>
test   %rax,%rax
je     1120 <bch_alloc+0x10>
pop    %rbx
ret
movl   $0x1,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @bch_alloc(i64 %0, i32* nocapture writeonly %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 1, i32* %1
br label %6
6: ; preds = %5, %2
ret i8* %3
}
/* Type definitions */
struct goldilocks_public_key_t {
  int dummy;
};
struct goldilocks_private_key_t {
  int dummy;
};

/* Variables and functions */
int goldilocks_shared_secret(unsigned char *,
                             struct goldilocks_private_key_t const *,
                             struct goldilocks_public_key_t const *);
int crypto_dh(unsigned char s[64], const unsigned char sk[(2 * (448 / 8) + 32)],
              const unsigned char pk[(448 / 8)]) {
  return goldilocks_shared_secret(s,
                                  (const struct goldilocks_private_key_t *)sk,
                                  (const struct goldilocks_public_key_t *)pk);
}


x86 assembly (clang, -O0):
<crypto_dh>:
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
call   1030 <goldilocks_shared_secret@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_dh>:
jmp    1030 <goldilocks_shared_secret@plt>

LLVM IR (-O0):
%struct.goldilocks_private_key_t = type { i32 }
%struct.goldilocks_public_key_t = type { i32 }
define i32 @crypto_dh(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = bitcast i8* %8 to %struct.goldilocks_private_key_t*
%10 = load i8*, i8** %6
%11 = bitcast i8* %10 to %struct.goldilocks_public_key_t*
%12 = call i32 @goldilocks_shared_secret(i8* %7, %struct.goldilocks_private_key_t* %9, %struct.goldilocks_public_key_t* %11)
ret i32 %12
}

LLVM IR (-O2):
%struct.goldilocks_private_key_t = type { i32 }
%struct.goldilocks_public_key_t = type { i32 }
define i32 @crypto_dh(i8* %0, i8* %1, i8* %2) {
%4 = bitcast i8* %1 to %struct.goldilocks_private_key_t*
%5 = bitcast i8* %2 to %struct.goldilocks_public_key_t*
%6 = tail call i32 @goldilocks_shared_secret(i8* %0, %struct.goldilocks_private_key_t* %4, %struct.goldilocks_public_key_t* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ exact_square(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int ch;
  printf("Vasheto chislo : ");
  scanf("%d", &ch);
  exact_square(ch);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <exact_square@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <exact_square@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [18 x i8] c"Vasheto chislo : \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @exact_square(i32 %5)
ret i32 0
}
void test8() {
  static unsigned a = 0;
  if (a)
    a = 123;
  a = 5;
}


x86 assembly (clang, -O0):
<test8>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,0x2f19(%rip)
je     111b <test8+0x1b>
movl   $0x7b,0x2f09(%rip)
movl   $0x5,0x2eff(%rip)
pop    %rbp
ret

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

LLVM IR (-O0):
@test8.a = internal global i32 0
define void @test8() {
%1 = load i32, i32* @test8.a
%2 = icmp ne i32 %1, 0
br i1 %2, label %3, label %4
3: ; preds = %0
store i32 123, i32* @test8.a
br label %4
4: ; preds = %3, %0
store i32 5, i32* @test8.a
ret void
}

LLVM IR (-O2):
define void @test8() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int const);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname, const int retval) {
  fprintf(stderr, "USAGE: %s <path>\n", progname);
  if (retval != 0)
    exit(retval);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x0,-0xc(%rbp)
je     115a <usage+0x3a>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
test   %ebx,%ebx
jne    1141 <usage+0x21>
pop    %rbx
ret
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [18 x i8] c"USAGE: %s <path>\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %4
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [18 x i8] c"USAGE: %s <path>\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = icmp eq i32 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @exit(i32 %1)
unreachable
8: ; preds = %2
ret void
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_lshift_ptr(struct Var *avar, const char *areg, const char *lreg,
                       const char *rreg) {
  pA("%s = %s << %s;", areg, lreg, rreg);
}


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

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [15 x i8] c"%s = %s << %s;\00"
define void @__func_lshift_ptr(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [15 x i8] c"%s = %s << %s;\00"
define void @__func_lshift_ptr(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __poet_fail();
int nondet(int, int);
int main(void) {
  int x = nondet(1, 5);
  if (x == 3)
    __poet_fail();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x5,%esi
call   1040 <nondet@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jne    1152 <main+0x32>
mov    $0x0,%al
call   1030 <__poet_fail@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x5,%esi
call   1040 <nondet@plt>
cmp    $0x3,%eax
jne    113c <main+0x1c>
xor    %eax,%eax
call   1030 <__poet_fail@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @nondet(i32 1, i32 5)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 3
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @__poet_fail()
br label %8
8: ; preds = %6, %0
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @nondet(i32 1, i32 5)
%2 = icmp eq i32 %1, 3
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @__poet_fail()
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ pthread_yield();
void ProcReschedule() { pthread_yield(); }


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

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

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

LLVM IR (-O2):
define void @ProcReschedule() {
%1 = tail call i32 (...) @pthread_yield()
ret void
}
int contains_slash(s)
register char *s;
{
  while (*s)
    if (*s++ == '/')
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<contains_slash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1141 <contains_slash+0x41>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    113c <contains_slash+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1148 <contains_slash+0x48>
jmp    1108 <contains_slash+0x8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains_slash>:
movzbl (%rdi),%eax
test   %al,%al
je     1115 <contains_slash+0x15>
add    $0x1,%rdi
cmp    $0x2f,%al
jne    1100 <contains_slash>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @contains_slash(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %3, i64 1
%8 = icmp eq i8 %4, 47
br i1 %8, label %9, label %2
9: ; preds = %2, %6
%10 = phi i32 [ 1, %6 ], [ 0, %2 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ print_reverse(char *);
int main() {
  char testStr[] = "Apple";
  print_reverse(testStr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x6(%rbp)
lea    -0xa(%rbp),%rdi
call   1030 <print_reverse@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movw   $0x65,0x4(%rsp)
movl   $0x6c707041,(%rsp)
mov    %rsp,%rdi
call   1030 <print_reverse@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.testStr = [6 x i8] c"Apple\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
store i32 0, i32* %1
%3 = bitcast [6 x i8]* %2 to i8*
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%5 = call i32 @print_reverse(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.testStr = [6 x i8] c"Apple\00"
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @print_reverse(i8* %2)
ret i32 0
}
/* Variables and functions */
int exp(double);
double sigmoid(double x) { return 1 / (1 + exp(-x)); }


x86 assembly (clang, -O0):
<sigmoid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <exp@plt>
lea    0x1(%rax),%ecx
add    $0x2,%eax
xor    %edx,%edx
cmp    $0x3,%eax
cmovb  %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sigmoid(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call i32 @exp(double %4)
%6 = add nsw i32 1, %5
%7 = sdiv i32 1, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @sigmoid(double %0) {
%2 = fneg double %0
%3 = tail call i32 @exp(double %2)
%4 = add nsw i32 %3, 1
%5 = add i32 %3, 2
%6 = icmp ult i32 %5, 3
%7 = select i1 %6, i32 %4, i32 0
%8 = sitofp i32 %7 to double
ret double %8
}
char UsartHardware_GetChar(void) { return UsartHardware_GetChar(); }


x86 assembly (clang, -O0):
<UsartHardware_GetChar>:
push   %rbp
mov    %rsp,%rbp
call   1030 <UsartHardware_GetChar@plt>
movsbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @UsartHardware_GetChar() {
%1 = call signext i8 @UsartHardware_GetChar()
ret i8 %1
}

LLVM IR (-O2):
define signext i8 @UsartHardware_GetChar() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ ConvertPathCharacters(char *);
int MakeDirectory(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fprintf(stderr, "Wrong number of arguments\n");
    exit(1);
  }
  ConvertPathCharacters(argv[1]);
  return MakeDirectory(argv[1]);
}


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)
cmpl   $0x2,-0x8(%rbp)
je     117f <main+0x3f>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <ConvertPathCharacters@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <MakeDirectory@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jne    115c <main+0x1c>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <ConvertPathCharacters@plt>
mov    0x8(%rbx),%rdi
pop    %rbx
jmp    1030 <MakeDirectory@plt>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Wrong number of arguments\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 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @ConvertPathCharacters(i8* %15)
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 1
%19 = load i8*, i8** %18
%20 = call i32 @MakeDirectory(i8* %19)
ret i32 %20
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Wrong number of arguments\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = tail call i32 @ConvertPathCharacters(i8* %10)
%12 = load i8*, i8** %9
%13 = tail call i32 @MakeDirectory(i8* %12)
ret i32 %13
}