xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ initscr();
int main(void) {
  initscr();
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initscr@plt>
xor    %eax,%eax
call   1040 <endwin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initscr()
%3 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @endwin()
ret i32 0
}
int HelpItem122(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem122() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ setpwent();
void sys_setpwent(void) { setpwent(); }


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

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

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

LLVM IR (-O2):
define void @sys_setpwent() {
%1 = tail call i32 (...) @setpwent()
ret void
}
/* Variables and functions */
int rom_present(char *);
int gd5480_available(void) {
  return rom_present(L"roms/video/cirruslogic/clgd5480.rom");
}


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

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

LLVM IR (-O0):
@.str = [36 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 99, i32 105, i32 114, i32 114, i32 117, i32 115, i32 108, i32 111, i32 103, i32 105, i32 99, i32 47, i32 99, i32 108, i32 103, i32 100, i32 53, i32 52, i32 56, i32 48, i32 46, i32 114, i32 111, i32 109, i32 0]
define i32 @gd5480_available() {
%1 = call i32 @rom_present(i8* bitcast ([36 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [36 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 99, i32 105, i32 114, i32 114, i32 117, i32 115, i32 108, i32 111, i32 103, i32 105, i32 99, i32 47, i32 99, i32 108, i32 103, i32 100, i32 53, i32 52, i32 56, i32 48, i32 46, i32 114, i32 111, i32 109, i32 0]
define i32 @gd5480_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([36 x i32]* @.str to i8*))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ r_print(char *, char *, char *, char *);
int main(int argc, char **argv) {
  r_print("%m%g%c", "It ", "Works", "!!!\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
lea    0xed3(%rip),%rsi
lea    0xed0(%rip),%rdx
lea    0xecf(%rip),%rcx
call   1030 <r_print@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee8(%rip),%rsi
lea    0xee5(%rip),%rdx
lea    0xee4(%rip),%rcx
call   1030 <r_print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%m%g%c\00"
@.str.1 = [4 x i8] c"It \00"
@.str.2 = [6 x i8] c"Works\00"
@.str.3 = [5 x i8] c"!!!\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 @r_print(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%m%g%c\00"
@.str.1 = [4 x i8] c"It \00"
@.str.2 = [6 x i8] c"Works\00"
@.str.3 = [5 x i8] c"!!!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @r_print(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
ret i32 0
}
void nseel_asm_xor(void) {
  __asm__("fistpll (%esi)\n"
          "fistpll 8(%esi)\n"
          "movl 8(%esi), %edi\n"
          "movl 12(%esi), %ecx\n"
          "xorl %edi, (%esi)\n"
          "xorl %ecx, 4(%esi)\n"
          "fildll (%esi)\n");
}


x86 assembly (clang, -O0):
<nseel_asm_xor>:
push   %rbp
mov    %rsp,%rbp
fistpll (%esi)
fistpll 0x8(%esi)
mov    0x8(%esi),%edi
mov    0xc(%esi),%ecx
xor    %edi,(%esi)
xor    %ecx,0x4(%esi)
fildll (%esi)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nseel_asm_xor>:
fistpll (%esi)
fistpll 0x8(%esi)
mov    0x8(%esi),%edi
mov    0xc(%esi),%ecx
xor    %edi,(%esi)
xor    %ecx,0x4(%esi)
fildll (%esi)
ret

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

LLVM IR (-O2):
define void @nseel_asm_xor() {
tail call void asm sideeffect "fistpll (%esi)\0Afistpll 8(%esi)\0Amovl 8(%esi), %edi\0Amovl 12(%esi), %ecx\0Axorl %edi, (%esi)\0Axorl %ecx, 4(%esi)\0Afildll (%esi)\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int strlen(char *);
int write(int, char *, int);
int write_cmd(int fd, char *cmd) {
  char c = 0;
  int len = strlen(cmd);
  int n, i;
  if (write(fd, cmd, len) < len)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<write_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movb   $0x0,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1030 <write@plt>
cmp    -0x18(%rbp),%eax
jge    1163 <write_cmd+0x43>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <write_cmd+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_cmd>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%r14d
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    %ebp,%eax
setl   %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @write_cmd(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
%5 = icmp slt i32 %4, %3
%6 = sext i1 %5 to i32
ret i32 %6
}
int pathcon_nm6_n_out(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @pathcon_nm6_n_out() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pathcon_nm6_n_out() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
__attribute__((__noreturn__)) void usage(int status) {
  fprintf(stderr, "usage: pick [-hvKS] [-d [-o]] [-x | -X] [-q query]\n"
                  "    -h          output this help message and exit\n"
                  "    -v          output the version and exit\n"
                  "    -K          disable toggling of keypad transmit mode\n"
                  "    -S          disable sorting\n"
                  "    -d          read and display descriptions\n"
                  "    -o          output description of selected on exit\n"
                  "    -x          enable alternate screen\n"
                  "    -X          disable alternate screen\n"
                  "    -q query    supply an initial search query\n");
  exit(status);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [464 x i8] c"usage: pick [-hvKS] [-d [-o]] [-x | -X] [-q query]\0A -h output this help message and exit\0A -v output the version and exit\0A -K disable toggling of keypad transmit mode\0A -S disable sorting\0A -d read and display descriptions\0A -o output description of selected on exit\0A -x enable alternate screen\0A -X disable alternate screen\0A -q query supply an initial search query\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([464 x i8], [464 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [464 x i8] c"usage: pick [-hvKS] [-d [-o]] [-x | -X] [-q query]\0A -h output this help message and exit\0A -v output the version and exit\0A -K disable toggling of keypad transmit mode\0A -S disable sorting\0A -d read and display descriptions\0A -o output description of selected on exit\0A -x enable alternate screen\0A -X disable alternate screen\0A -q query supply an initial search query\0A\00"
define void @usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([464 x i8], [464 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}
void zomb_onmove(void *arg) {}


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

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

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

LLVM IR (-O2):
define void @zomb_onmove(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int pict2png_opcode(void *ctx, int opcode, const void *data, size_t size) {
  (void)ctx;
  (void)opcode;
  (void)data;
  (void)size;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @pict2png_opcode(i8* %0, i32 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @pict2png_opcode(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i64 %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ prinef(char *);
int /*<<< orphan*/ printf(char *, int);
void main() {
  int x = 6;
  printf("%d", x << 2);
  prinef("\n");
  printf("%d", x >> 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x6,-0x4(%rbp)
mov    -0x4(%rbp),%esi
shl    $0x2,%esi
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
call   1040 <prinef@plt>
mov    -0x4(%rbp),%esi
sar    $0x2,%esi
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x18,%esi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
call   1040 <prinef@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 24)
%2 = tail call i32 @prinef(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
double log10(int);
float psnr(int max_sample_sq, int samples, float sse_distortion) {
  return (
      float)(sse_distortion == 0.0
                 ? 0.0
                 : (10.0 * log10(max_sample_sq *
                                 (double)((double)samples / sse_distortion))));
}


x86 assembly (clang, -O0):
<psnr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    114c <psnr+0x3c>
jp     114c <psnr+0x3c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1184 <psnr+0x74>
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <log10@plt>
movaps %xmm0,%xmm1
movsd  0xe85(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psnr>:
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    111e <psnr+0xe>
jp     111e <psnr+0xe>
movaps %xmm1,%xmm0
ret
push   %rax
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %edi,%xmm1
cvtsi2sd %esi,%xmm2
divsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm2
cvttsd2si %xmm2,%edi
call   1030 <log10@plt>
mulsd  0xeb9(%rip),%xmm0
xorps  %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm1
add    $0x8,%rsp
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @psnr(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = fpext float %7 to double
%9 = fcmp oeq double %8, 0.000000e+00
br i1 %9, label %10, label %11
10: ; preds = %3
br label %23
11: ; preds = %3
%12 = load i32, i32* %4
%13 = sitofp i32 %12 to double
%14 = load i32, i32* %5
%15 = sitofp i32 %14 to double
%16 = load float, float* %6
%17 = fpext float %16 to double
%18 = fdiv double %15, %17
%19 = fmul double %13, %18
%20 = fptosi double %19 to i32
%21 = call double @log10(i32 %20)
%22 = fmul double 1.000000e+01, %21
br label %23
23: ; preds = %11, %10
%24 = phi double [ 0.000000e+00, %10 ], [ %22, %11 ]
%25 = fptrunc double %24 to float
ret float %25
}

LLVM IR (-O2):
define float @psnr(i32 %0, i32 %1, float %2) {
%4 = fcmp oeq float %2, 0.000000e+00
br i1 %4, label %15, label %5
5: ; preds = %3
%6 = fpext float %2 to double
%7 = sitofp i32 %0 to double
%8 = sitofp i32 %1 to double
%9 = fdiv double %8, %6
%10 = fmul double %9, %7
%11 = fptosi double %10 to i32
%12 = tail call double @log10(i32 %11)
%13 = fmul double %12, 1.000000e+01
%14 = fptrunc double %13 to float
br label %15
15: ; preds = %3, %5
%16 = phi float [ %14, %5 ], [ 0.000000e+00, %3 ]
ret float %16
}
int baz() { return 0xB105; }


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

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

LLVM IR (-O0):
define i32 @baz() {
ret i32 45317
}

LLVM IR (-O2):
define i32 @baz() {
ret i32 45317
}
void foo518() {}


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

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

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

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


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void uninit_fclose(void) {
  FILE *fp;
  fclose(fp);
}


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

x86 assembly (clang, -O2):
<uninit_fclose>:
jmp    1030 <fclose@plt>

LLVM IR (-O0):
define void @uninit_fclose() {
%1 = alloca i32*
%2 = load i32*, i32** %1
%3 = call i32 @fclose(i32* %2)
ret void
}

LLVM IR (-O2):
define void @uninit_fclose() {
%1 = tail call i32 @fclose(i32* undef)
ret void
}
void blueUphill() {}


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

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

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

LLVM IR (-O2):
define void @blueUphill() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *realpath(char const *, char *);
int pyi_path_fullpath(char *abs, size_t abs_size, const char *rel) {
  return realpath(rel, abs) != NULL;
}


x86 assembly (clang, -O0):
<pyi_path_fullpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <realpath@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pyi_path_fullpath>:
push   %rax
mov    %rdi,%rsi
mov    %rdx,%rdi
call   1030 <realpath@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @pyi_path_fullpath(i8* %0, i64 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = call i32* @realpath(i8* %7, i8* %8)
%10 = icmp ne i32* %9, null
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @pyi_path_fullpath(i8* %0, i64 %1, i8* nocapture %2) {
%4 = tail call i32* @realpath(i8* %2, i8* %0)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}
void gdb_call() {}


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

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

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

LLVM IR (-O2):
define void @gdb_call() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc < 2) {
    fprintf(stderr, "%s: insufficient arguments\n", argv[0]);
    return 1;
  }
  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)
cmpl   $0x2,-0x8(%rbp)
jge    1158 <main+0x48>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xeb9(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    115f <main+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
cmp    $0x1,%edi
jg     1139 <main+0x29>
push   %rax
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"%s: insufficient 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 slt i32 %6, 2
br i1 %7, label %8, label %14
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 0
%12 = load i8*, i8** %11
%13 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"%s: insufficient arguments\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ 1, %4 ], [ 0, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ changeDirectory(char *);
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ init();
int /*<<< orphan*/ navigate();
int main(void) {
  init();
  navigate();
  changeDirectory("..");
  navigate();
  endwin();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <init@plt>
mov    $0x0,%al
call   1030 <navigate@plt>
lea    0xea7(%rip),%rdi
call   1050 <changeDirectory@plt>
mov    $0x0,%al
call   1030 <navigate@plt>
mov    $0x0,%al
call   1060 <endwin@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init@plt>
xor    %eax,%eax
call   1030 <navigate@plt>
lea    0xeaa(%rip),%rdi
call   1050 <changeDirectory@plt>
xor    %eax,%eax
call   1030 <navigate@plt>
xor    %eax,%eax
call   1060 <endwin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"..\00"
define i32 @main() {
%1 = call i32 (...) @init()
%2 = call i32 (...) @navigate()
%3 = call i32 @changeDirectory(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @navigate()
%5 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"..\00"
define i32 @main() {
%1 = tail call i32 (...) @init()
%2 = tail call i32 (...) @navigate()
%3 = tail call i32 @changeDirectory(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @navigate()
%5 = tail call i32 (...) @endwin()
ret i32 0
}
void INT_Excep_PERIB_INTB164(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB164() {
ret void
}
/* Variables and functions */
scalar_t__ u8islowergreeki(int);
scalar_t__ u8isuppergreeki(int);
int u8isgreeki(int n) { return u8islowergreeki(n) || u8isuppergreeki(n); }


x86 assembly (clang, -O0):
<u8isgreeki>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <u8islowergreeki@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1157 <u8isgreeki+0x37>
mov    -0x4(%rbp),%edi
call   1030 <u8isuppergreeki@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isgreeki>:
push   %rbx
mov    %edi,%ebx
call   1040 <u8islowergreeki@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <u8isgreeki+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <u8isuppergreeki@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @u8isgreeki(i32 %0) {
%2 = tail call i64 @u8islowergreeki(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @u8isuppergreeki(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void testClosureSSrV(void (*closure)(short, short), short a1, short a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureSSrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xa(%rbp),%cx
movswl %cx,%edi
movswl -0xc(%rbp),%esi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureSSrV>:
mov    %rdi,%rax
mov    %esi,%edi
mov    %edx,%esi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureSSrV(void (i16, i16)* %0, i16 signext %1, i16 signext %2) {
%4 = alloca void (i16, i16)*
%5 = alloca i16
%6 = alloca i16
store void (i16, i16)* %0, void (i16, i16)** %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%7 = load void (i16, i16)*, void (i16, i16)** %4
%8 = load i16, i16* %5
%9 = load i16, i16* %6
ret void
}

LLVM IR (-O2):
define void @testClosureSSrV(void (i16, i16)* nocapture %0, i16 signext %1, i16 signext %2) {
tail call void %0(i16 signext %1, i16 signext %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hypotf(unsigned int, unsigned int);
short roundf(int /*<<< orphan*/);
short magnitude_fun_complexOf_short(unsigned a) {
  return roundf(hypotf((a >> 16), (a & 0x0000ffff)));
}


x86 assembly (clang, -O0):
<magnitude_fun_complexOf_short>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
shr    $0x10,%edi
mov    -0x4(%rbp),%esi
and    $0xffff,%esi
call   1030 <hypotf@plt>
mov    %eax,%edi
call   1040 <roundf@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<magnitude_fun_complexOf_short>:
push   %rax
movzwl %di,%esi
shr    $0x10,%edi
call   1030 <hypotf@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <roundf@plt>

LLVM IR (-O0):
define signext i16 @magnitude_fun_complexOf_short(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 16
%5 = load i32, i32* %2
%6 = and i32 %5, 65535
%7 = call i32 @hypotf(i32 %4, i32 %6)
%8 = call signext i16 @roundf(i32 %7)
ret i16 %8
}

LLVM IR (-O2):
define signext i16 @magnitude_fun_complexOf_short(i32 %0) {
%2 = lshr i32 %0, 16
%3 = and i32 %0, 65535
%4 = tail call i32 @hypotf(i32 %2, i32 %3)
%5 = tail call signext i16 @roundf(i32 %4)
ret i16 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ i2c_write_reg(int, int);
void set_prescaler(int pwm_freq) {
  uint8_t presc = (25000000 / (4096 * pwm_freq)) - 1;
  i2c_write_reg(0xFE, presc);
}


x86 assembly (clang, -O0):
<set_prescaler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shl    $0xc,%ecx
mov    $0x17d7840,%eax
cltd
idiv   %ecx
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0xfe,%edi
call   1030 <i2c_write_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_prescaler>:
shl    $0xc,%edi
mov    $0x17d7840,%eax
xor    %edx,%edx
idiv   %edi
lea    -0x1(%rax),%esi
mov    $0xfe,%edi
jmp    1030 <i2c_write_reg@plt>

LLVM IR (-O0):
define void @set_prescaler(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul nsw i32 4096, %4
%6 = sdiv i32 25000000, %5
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = call i32 @i2c_write_reg(i32 254, i32 %8)
ret void
}

LLVM IR (-O2):
define void @set_prescaler(i32 %0) {
%2 = shl nsw i32 %0, 12
%3 = sdiv i32 25000000, %2
%4 = add nsw i32 %3, -1
%5 = tail call i32 @i2c_write_reg(i32 254, i32 %4)
ret void
}
void set_upol_param(double *a0, double *a1, double *a2, double *a3, double *b3,
                    double *b4) {
  *a0 = 1.0;
  *a1 = 1.0;
  *a2 = 1.0;
  *a3 = 1.0;
  *b3 = 1.0;
  *b4 = 1.0;
}


x86 assembly (clang, -O0):
<set_upol_param>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0xec8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0xea8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  0xe88(%rip),%xmm0
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_upol_param>:
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rdi)
mov    %rax,(%rsi)
mov    %rax,(%rdx)
mov    %rax,(%rcx)
mov    %rax,(%r8)
mov    %rax,(%r9)
ret

LLVM IR (-O0):
define void @set_upol_param(double* %0, double* %1, double* %2, double* %3, double* %4, double* %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double*
%11 = alloca double*
%12 = alloca double*
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store double* %3, double** %10
store double* %4, double** %11
store double* %5, double** %12
%13 = load double*, double** %7
store double 1.000000e+00, double* %13
%14 = load double*, double** %8
store double 1.000000e+00, double* %14
%15 = load double*, double** %9
store double 1.000000e+00, double* %15
%16 = load double*, double** %10
store double 1.000000e+00, double* %16
%17 = load double*, double** %11
store double 1.000000e+00, double* %17
%18 = load double*, double** %12
store double 1.000000e+00, double* %18
ret void
}

LLVM IR (-O2):
define void @set_upol_param(double* nocapture writeonly %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
store double 1.000000e+00, double* %0
store double 1.000000e+00, double* %1
store double 1.000000e+00, double* %2
store double 1.000000e+00, double* %3
store double 1.000000e+00, double* %4
store double 1.000000e+00, double* %5
ret void
}
/* Variables and functions */
scalar_t__ __isnan(double);
scalar_t__ isgreaterequal(double, double);
double fmax(double _x, double _y) {
  return (isgreaterequal(_x, _y) || __isnan(_y) ? _x : _y);
}


x86 assembly (clang, -O0):
<fmax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <isgreaterequal@plt>
cmp    $0x0,%rax
jne    115f <fmax+0x3f>
movsd  -0x10(%rbp),%xmm0
call   1030 <__isnan@plt>
cmp    $0x0,%rax
je     116e <fmax+0x4e>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1178 <fmax+0x58>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmax>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1040 <isgreaterequal@plt>
test   %rax,%rax
je     1145 <fmax+0x25>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret
movsd  0x8(%rsp),%xmm0
call   1030 <__isnan@plt>
test   %rax,%rax
je     1161 <fmax+0x41>
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @fmax(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call i64 @isgreaterequal(double %5, double %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = load double, double* %4
%11 = call i64 @__isnan(double %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9, %2
%14 = load double, double* %3
br label %17
15: ; preds = %9
%16 = load double, double* %4
br label %17
17: ; preds = %15, %13
%18 = phi double [ %14, %13 ], [ %16, %15 ]
ret double %18
}

LLVM IR (-O2):
define double @fmax(double %0, double %1) {
%3 = tail call i64 @isgreaterequal(double %0, double %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i64 @__isnan(double %1)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, double %1, double %0
br label %9
9: ; preds = %5, %2
%10 = phi double [ %0, %2 ], [ %8, %5 ]
ret double %10
}
int func_b(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @func_b() {
ret i32 0
}
int fooinvsi(int a) { return a ? 30 : ~30; }


x86 assembly (clang, -O0):
<fooinvsi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
mov    $0xffffffe1,%eax
mov    $0x1e,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fooinvsi>:
test   %edi,%edi
mov    $0xffffffe1,%ecx
mov    $0x1e,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @fooinvsi(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 30, i32 -31
ret i32 %6
}

LLVM IR (-O2):
define i32 @fooinvsi(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 -31, i32 30
ret i32 %3
}
/* Variables and functions */
char *strsep(char **, char const *);
char *strsep_ne(char **ref, const char *delim) {
  char *str;
  do
    str = strsep(ref, delim);
  while (str != NULL && *str == 0);
  return str;
}


x86 assembly (clang, -O0):
<strsep_ne>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strsep@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
je     1151 <strsep_ne+0x41>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1120 <strsep_ne+0x10>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsep_ne>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strsep@plt>
test   %rax,%rax
je     1135 <strsep_ne+0x25>
cmpb   $0x0,(%rax)
je     1120 <strsep_ne+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strsep_ne(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
%5 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %18, %2
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %4
%9 = call i8* @strsep(i8** %7, i8* %8)
store i8* %9, i8** %5
br label %10
10: ; preds = %6
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 0
br label %18
18: ; preds = %13, %10
%19 = phi i1 [ false, %10 ], [ %17, %13 ]
br i1 %19, label %6, label %20
20: ; preds = %18
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @strsep_ne(i8** %0, i8* %1) {
br label %3
3: ; preds = %6, %2
%4 = tail call i8* @strsep(i8** %0, i8* %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i8, i8* %4
%8 = icmp eq i8 %7, 0
br i1 %8, label %3, label %9
9: ; preds = %3, %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, int, int, int, int);
int main(void) { bar(2, 3, 4, 5, 6); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
mov    $0x6,%r8d
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
mov    $0x6,%r8d
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @bar(i32 2, i32 3, i32 4, i32 5, i32 6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bar(i32 2, i32 3, i32 4, i32 5, i32 6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_mulhi_pu16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 test_mm_mulhi_pu16(__m64 a, __m64 b) { return _mm_mulhi_pu16(a, b); }


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

x86 assembly (clang, -O2):
<test_mm_mulhi_pu16>:
jmp    1030 <_mm_mulhi_pu16@plt>

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

LLVM IR (-O2):
define i32 @test_mm_mulhi_pu16(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_mulhi_pu16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void test_reg32_imm32(int reg32, unsigned int imm32) {
  put8(0xF7);
  put8(0xC0 + reg32);
  put32(imm32);
}


x86 assembly (clang, -O0):
<test_reg32_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xf7,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
add    $0xc0,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reg32_imm32>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xf7,%edi
call   1030 <put8@plt>
add    $0xc0,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @test_reg32_imm32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @put8(i32 247)
%6 = load i32, i32* %3
%7 = add nsw i32 192, %6
%8 = call i32 @put8(i32 %7)
%9 = load i32, i32* %4
%10 = call i32 @put32(i32 %9)
ret void
}

LLVM IR (-O2):
define void @test_reg32_imm32(i32 %0, i32 %1) {
%3 = tail call i32 @put8(i32 247)
%4 = add nsw i32 %0, 192
%5 = tail call i32 @put8(i32 %4)
%6 = tail call i32 @put32(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error_internal(int);
void __VERIFIER_error() { __VERIFIER_error_internal(1); }


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

x86 assembly (clang, -O2):
<__VERIFIER_error>:
mov    $0x1,%edi
jmp    1030 <__VERIFIER_error_internal@plt>

LLVM IR (-O0):
define void @__VERIFIER_error() {
%1 = call i32 @__VERIFIER_error_internal(i32 1)
ret void
}

LLVM IR (-O2):
define void @__VERIFIER_error() {
%1 = tail call i32 @__VERIFIER_error_internal(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printTestInfo(char *, char *);
int removeFromListWithOneNode() {
  printTestInfo("removeFromListWithOneNode", "(not implemented)");
  return 0;
}


x86 assembly (clang, -O0):
<removeFromListWithOneNode>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xef8(%rip),%rsi
call   1030 <printTestInfo@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeFromListWithOneNode>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xefb(%rip),%rsi
call   1030 <printTestInfo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"removeFromListWithOneNode\00"
@.str.1 = [18 x i8] c"(not implemented)\00"
define i32 @removeFromListWithOneNode() {
%1 = call i32 @printTestInfo(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"removeFromListWithOneNode\00"
@.str.1 = [18 x i8] c"(not implemented)\00"
define i32 @removeFromListWithOneNode() {
%1 = tail call i32 @printTestInfo(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void ARGBPolynomialRow_C() {}


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

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

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

LLVM IR (-O2):
define void @ARGBPolynomialRow_C() {
ret void
}
/* Variables and functions */
int epoll_create1(int /*<<< orphan*/);
int /*<<< orphan*/ err_sys(char *);
int vn_epoll_create(void) {
  int epfd;
  if ((epfd = epoll_create1(0)) == -1) {
    err_sys("[vn_epoll_create] epoll_create1 error");
  }
  return epfd;
}


x86 assembly (clang, -O0):
<vn_epoll_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <epoll_create1@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
jne    1147 <vn_epoll_create+0x27>
lea    0xebe(%rip),%rdi
call   1030 <err_sys@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vn_epoll_create>:
push   %rbx
xor    %edi,%edi
call   1040 <epoll_create1@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    113b <vn_epoll_create+0x1b>
lea    0xeca(%rip),%rdi
call   1030 <err_sys@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"[vn_epoll_create] epoll_create1 error\00"
define i32 @vn_epoll_create() {
%1 = alloca i32
%2 = call i32 @epoll_create1(i32 0)
store i32 %2, i32* %1
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @err_sys(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@.str = [38 x i8] c"[vn_epoll_create] epoll_create1 error\00"
define i32 @vn_epoll_create() {
%1 = tail call i32 @epoll_create1(i32 0)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @err_sys(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 %1
}
__attribute__((always_)) long IS_ERR_OR_NULL(const void *ptr) {
  return !ptr ||
         __builtin_expect(!!(((unsigned long)ptr) >= (unsigned long)-4095), 0);
}


x86 assembly (clang, -O0):
<IS_ERR_OR_NULL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%al
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113a <IS_ERR_OR_NULL+0x3a>
mov    -0x8(%rbp),%rax
cmp    $0xfffffffffffff001,%rax
setae  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cltq
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<IS_ERR_OR_NULL>:
test   %rdi,%rdi
sete   %al
cmp    $0xfffffffffffff001,%rdi
setae  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i64 @IS_ERR_OR_NULL(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %14
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i64
%8 = icmp uge i64 %7, -4095
%9 = xor i1 %8, true
%10 = xor i1 %9, true
%11 = zext i1 %10 to i32
%12 = sext i32 %11 to i64
%13 = icmp ne i64 %12, 0
br label %14
14: ; preds = %5, %1
%15 = phi i1 [ true, %1 ], [ %13, %5 ]
%16 = zext i1 %15 to i32
%17 = sext i32 %16 to i64
ret i64 %17
}

LLVM IR (-O2):
define i64 @IS_ERR_OR_NULL(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = icmp ugt i8* %0, inttoptr (i64 -4096 to i8*)
%4 = or i1 %2, %3
%5 = zext i1 %4 to i64
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_loadl_epi64(int /*<<< orphan*/ *);
__m128i test_mm_loadl_epi64(__m128i *y) { return _mm_loadl_epi64(y); }


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

x86 assembly (clang, -O2):
<test_mm_loadl_epi64>:
jmp    1030 <_mm_loadl_epi64@plt>

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

LLVM IR (-O2):
define i32 @test_mm_loadl_epi64(i32* %0) {
%2 = tail call i32 @_mm_loadl_epi64(i32* %0)
ret i32 %2
}
void disable_int(void) { asm volatile("cli"); }


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

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

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

LLVM IR (-O2):
define void @disable_int() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void err_syntax12_error(const char *s) { printf("%s\n", s); }


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

x86 assembly (clang, -O2):
<err_syntax12_error>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @err_syntax12_error(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void rop3_72_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ T;
  stk1 = S & stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_72_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)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %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_72_0_0>:
xor    (%rdi),%dl
and    %sil,%dl
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_72_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
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %5
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = and i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
store i8 %22, i8* %23
ret void
}

LLVM IR (-O2):
define void @rop3_72_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
store i8 %6, i8* %0
ret void
}