xunge/DecIR huggingface dataset:
extern short shmem_short_g(short *addr, int pe) { return *addr; }


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

x86 assembly (clang, -O2):
<shmem_short_g>:
movzwl (%rdi),%eax
ret

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

LLVM IR (-O2):
define signext i16 @shmem_short_g(i16* nocapture %0, i32 %1) {
%3 = load i16, i16* %0
ret i16 %3
}
/* Variables and functions */
int join_bridge(int /*<<< orphan*/ *, int);
int leave_bridge(int port_ifiindex) { return join_bridge(NULL, port_ifiindex); }


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

x86 assembly (clang, -O2):
<leave_bridge>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <join_bridge@plt>

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

LLVM IR (-O2):
define i32 @leave_bridge(i32 %0) {
%2 = tail call i32 @join_bridge(i32* null, i32 %0)
ret i32 %2
}
int fun1336() { return 1336; }


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

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

LLVM IR (-O0):
define i32 @fun1336() {
ret i32 1336
}

LLVM IR (-O2):
define i32 @fun1336() {
ret i32 1336
}
/* Variables and functions */
char *strchr(char *, char);
int /*<<< orphan*/ strcpy(char *, char *);
void namefrompipe(char *r, char *s) {
  strcpy(r, s);
  char *pos = strchr(r, '<');
  if (pos)
    r[pos - r] = '\0';
}


x86 assembly (clang, -O0):
<namefrompipe>:
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 <strcpy@plt>
mov    -0x8(%rbp),%rdi
mov    $0x3c,%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     116d <namefrompipe+0x4d>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<namefrompipe>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     113e <namefrompipe+0x1e>
movb   $0x0,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @namefrompipe(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = load i8*, i8** %3
%10 = call i8* @strchr(i8* %9, i8 signext 60)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %21
13: ; preds = %2
%14 = load i8*, i8** %3
%15 = load i8*, i8** %5
%16 = load i8*, i8** %3
%17 = ptrtoint i8* %15 to i64
%18 = ptrtoint i8* %16 to i64
%19 = sub i64 %17, %18
%20 = getelementptr inbounds i8, i8* %14, i64 %19
store i8 0, i8* %20
br label %21
21: ; preds = %13, %2
ret void
}

LLVM IR (-O2):
define void @namefrompipe(i8* %0, i8* %1) {
%3 = tail call i32 @strcpy(i8* %0, i8* %1)
%4 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 60)
%5 = icmp eq i8* %4, null
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = ptrtoint i8* %4 to i64
%8 = ptrtoint i8* %0 to i64
%9 = sub i64 %7, %8
%10 = getelementptr inbounds i8, i8* %0, i64 %9
store i8 0, i8* %10
br label %11
11: ; preds = %6, %2
ret void
}
int main() {
  int val = 2;
  int *pp;
  pp = &val;
  return *pp;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
void gaudio_play_pwm_start(void) {}


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

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

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

LLVM IR (-O2):
define void @gaudio_play_pwm_start() {
ret void
}
int TerminalAutoFlush(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @TerminalAutoFlush() {
ret i32 1
}

LLVM IR (-O2):
define i32 @TerminalAutoFlush() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, int);
void poppointer_(char *ppp) { popNarray(ppp, 4); }


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

x86 assembly (clang, -O2):
<poppointer_>:
mov    $0x4,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @poppointer_(i8* %0) {
%2 = tail call i32 @popNarray(i8* %0, i32 4)
ret void
}
float converte(float x, float in_min, float in_max, float out_min,
               float out_max) {
  return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
}


x86 assembly (clang, -O0):
<converte>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
subss  -0x10(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
addss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<converte>:
subss  %xmm1,%xmm0
subss  %xmm3,%xmm4
mulss  %xmm4,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @converte(float %0, float %1, float %2, float %3, float %4) {
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
store float %0, float* %6
store float %1, float* %7
store float %2, float* %8
store float %3, float* %9
store float %4, float* %10
%11 = load float, float* %6
%12 = load float, float* %7
%13 = fsub float %11, %12
%14 = load float, float* %10
%15 = load float, float* %9
%16 = fsub float %14, %15
%17 = fmul float %13, %16
%18 = load float, float* %8
%19 = load float, float* %7
%20 = fsub float %18, %19
%21 = fdiv float %17, %20
%22 = load float, float* %9
%23 = fadd float %21, %22
ret float %23
}

LLVM IR (-O2):
define float @converte(float %0, float %1, float %2, float %3, float %4) {
%6 = fsub float %0, %1
%7 = fsub float %4, %3
%8 = fmul float %6, %7
%9 = fsub float %2, %1
%10 = fdiv float %8, %9
%11 = fadd float %10, %3
ret float %11
}
/* Type definitions */
typedef scalar_t__ voidpf;
typedef scalar_t__ uLong;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fwrite(void const *, int, size_t, int /*<<< orphan*/ *);
uLong fwrite_file_func(voidpf opaque, voidpf stream, const void *buf,
                       uLong size) {
  uLong ret;
  ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream);
  return ret;
}


x86 assembly (clang, -O0):
<fwrite_file_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
call   1030 <fwrite@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwrite_file_func>:
mov    %rdx,%rdi
mov    %rsi,%rax
mov    $0x1,%esi
mov    %rcx,%rdx
mov    %rax,%rcx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
define i64 @fwrite_file_func(i64 %0, i64 %1, i8* nocapture %2, i64 %3) {
%5 = inttoptr i64 %1 to i32*
%6 = tail call i64 @fwrite(i8* %2, i32 1, i64 %3, i32* %5)
ret i64 %6
}
void rop3_115_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = *D | stk3;
  stk1 = S & stk2;
  stk1 = ~stk1;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_115_1_1>:
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
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%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    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%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_115_1_1>:
mov    (%rdi),%al
mov    %edx,%ecx
or     %sil,%cl
not    %cl
and    %al,%sil
or     %cl,%sil
and    %dl,%al
or     %sil,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_115_1_1(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 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8*, i8** %4
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %9
%18 = zext i8 %17 to i32
%19 = or i32 %16, %18
%20 = trunc i32 %19 to i8
store i8 %20, i8* %8
%21 = load i8, i8* %5
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = and i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = xor i32 %28, -1
%30 = trunc i32 %29 to i8
store i8 %30, i8* %7
%31 = load i8, i8* %7
%32 = zext i8 %31 to i32
%33 = load i8, i8* %5
%34 = zext i8 %33 to i32
%35 = xor i32 %34, -1
%36 = and i32 %32, %35
%37 = load i8, i8* %6
%38 = zext i8 %37 to i32
%39 = xor i32 %38, -1
%40 = and i32 %36, %39
%41 = load i8*, i8** %4
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = load i8, i8* %5
%45 = zext i8 %44 to i32
%46 = and i32 %43, %45
%47 = or i32 %40, %46
%48 = load i8*, i8** %4
%49 = load i8, i8* %48
%50 = zext i8 %49 to i32
%51 = load i8, i8* %6
%52 = zext i8 %51 to i32
%53 = and i32 %50, %52
%54 = or i32 %47, %53
%55 = trunc i32 %54 to i8
%56 = load i8*, i8** %4
store i8 %55, i8* %56
ret void
}

LLVM IR (-O2):
define void @rop3_115_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = xor i8 %5, -1
%7 = and i8 %4, %1
%8 = or i8 %7, %6
%9 = and i8 %4, %2
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
/* Type definitions */
struct _class {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ class_getname(struct _class *);
int /*<<< orphan*/ loud_error(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void loud_classarg(struct _class *c) {
  loud_error(0, "missing or bad arguments in \"%s\"", class_getname(c));
}


x86 assembly (clang, -O0):
<loud_classarg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <class_getname@plt>
mov    %eax,%edx
xor    %edi,%edi
lea    0xec0(%rip),%rsi
call   1040 <loud_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loud_classarg>:
push   %rax
call   1030 <class_getname@plt>
lea    0xed3(%rip),%rsi
xor    %edi,%edi
mov    %eax,%edx
pop    %rax
jmp    1040 <loud_error@plt>

LLVM IR (-O0):
%struct._class = type { i32 }
@.str = [33 x i8] c"missing or bad arguments in \22%s\22\00"
define void @loud_classarg(%struct._class* %0) {
%2 = alloca %struct._class*
store %struct._class* %0, %struct._class** %2
%3 = load %struct._class*, %struct._class** %2
%4 = call i32 @class_getname(%struct._class* %3)
%5 = call i32 @loud_error(i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %4)
ret void
}

LLVM IR (-O2):
%struct._class = type { i32 }
@.str = [33 x i8] c"missing or bad arguments in \22%s\22\00"
define void @loud_classarg(%struct._class* %0) {
%2 = tail call i32 @class_getname(%struct._class* %0)
%3 = tail call i32 @loud_error(i32 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpuid(int, unsigned int *, unsigned int *, unsigned int *,
                         unsigned int *);
int chk_proc_sse2(void) {
  unsigned int eax, ebx, ecx, edx;
  cpuid(1, &eax, &ebx, &ecx, &edx);
  return edx & (1 << 26);
}


x86 assembly (clang, -O0):
<chk_proc_sse2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
lea    -0x10(%rbp),%r8
call   1030 <cpuid@plt>
mov    -0x10(%rbp),%eax
and    $0x4000000,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chk_proc_sse2>:
sub    $0x18,%rsp
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
mov    $0x1,%edi
call   1030 <cpuid@plt>
mov    $0x4000000,%eax
and    0x8(%rsp),%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @chk_proc_sse2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%6 = load i32, i32* %4
%7 = and i32 %6, 67108864
ret i32 %7
}

LLVM IR (-O2):
define i32 @chk_proc_sse2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %1 to i8*
%6 = bitcast i32* %2 to i8*
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = call i32 @cpuid(i32 1, i32* %1, i32* %2, i32* %3, i32* %4)
%10 = load i32, i32* %4
%11 = and i32 %10, 67108864
ret i32 %11
}
/* Type definitions */
typedef int socklen_t;
typedef int /*<<< orphan*/ size;

/* Variables and functions */
int /*<<< orphan*/ SOL_SOCKET;
int /*<<< orphan*/ SO_SNDBUF;
int getsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int *);
int hi_get_sndbuf(int sd) {
  int status, size;
  socklen_t len;
  size = 0;
  len = sizeof(size);
  status = getsockopt(sd, SOL_SOCKET, SO_SNDBUF, &size, &len);
  if (status < 0) {
    return status;
  }
  return size;
}


x86 assembly (clang, -O0):
<hi_get_sndbuf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
lea    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%r8
call   1030 <getsockopt@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1163 <hi_get_sndbuf+0x53>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1169 <hi_get_sndbuf+0x59>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hi_get_sndbuf>:
push   %rax
movl   $0x0,(%rsp)
movl   $0x4,0x4(%rsp)
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rcx
lea    0x4(%rsp),%r8
call   1030 <getsockopt@plt>
test   %eax,%eax
js     1146 <hi_get_sndbuf+0x36>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SOL_SOCKET = global i32 0
@SO_SNDBUF = global i32 0
define i32 @hi_get_sndbuf(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 0, i32* %5
store i32 4, i32* %6
%7 = load i32, i32* %3
%8 = load i32, i32* @SOL_SOCKET
%9 = load i32, i32* @SO_SNDBUF
%10 = call i32 @getsockopt(i32 %7, i32 %8, i32 %9, i32* %5, i32* %6)
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %1
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %17
15: ; preds = %1
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %15, %13
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@SOL_SOCKET = global i32 0
@SO_SNDBUF = global i32 0
define i32 @hi_get_sndbuf(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %2
store i32 4, i32* %3
%6 = load i32, i32* @SOL_SOCKET
%7 = load i32, i32* @SO_SNDBUF
%8 = call i32 @getsockopt(i32 %0, i32 %6, i32 %7, i32* %2, i32* %3)
%9 = icmp slt i32 %8, 0
%10 = load i32, i32* %2
%11 = select i1 %9, i32 %8, i32 %10
ret i32 %11
}
/* Variables and functions */
scalar_t__ ceil(float);
scalar_t__ floor(float);
float round_float(float input) {
  if (input < 0) {
    return (float)ceil(input - 0.5);
  } else {
    return (float)floor(input + 0.5);
  }
}


x86 assembly (clang, -O0):
<round_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    1167 <round_float+0x47>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb5(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1030 <ceil@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    118f <round_float+0x6f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe88(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <floor@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_float>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1138 <round_float+0x18>
addss  0xed3(%rip),%xmm0
call   1030 <ceil@plt>
jmp    1145 <round_float+0x25>
addss  0xec0(%rip),%xmm0
call   1040 <floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @round_float(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = fsub double %8, 5.000000e-01
%10 = fptrunc double %9 to float
%11 = call i64 @ceil(float %10)
%12 = sitofp i64 %11 to float
store float %12, float* %2
br label %20
13: ; preds = %1
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = fadd double %15, 5.000000e-01
%17 = fptrunc double %16 to float
%18 = call i64 @floor(float %17)
%19 = sitofp i64 %18 to float
store float %19, float* %2
br label %20
20: ; preds = %13, %6
%21 = load float, float* %2
ret float %21
}

LLVM IR (-O2):
define float @round_float(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = fadd float %0, -5.000000e-01
%5 = tail call i64 @ceil(float %4)
br label %9
6: ; preds = %1
%7 = fadd float %0, 5.000000e-01
%8 = tail call i64 @floor(float %7)
br label %9
9: ; preds = %6, %3
%10 = phi i64 [ %5, %3 ], [ %8, %6 ]
%11 = sitofp i64 %10 to float
ret float %11
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int64_t;

/* Variables and functions */
u_int64_t store_swp_fake64(u_int64_t v) { return v; }


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

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

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

LLVM IR (-O2):
define i32 @store_swp_fake64(i32 returned %0) {
ret i32 %0
}
void scrobsub_relay_start(const char *artist, const char *title, int duration) {
}


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

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

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

LLVM IR (-O2):
define void @scrobsub_relay_start(i8* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
scalar_t__ pthread_self();
void *thread_func2() {
  printf("Task2 running...by Thread  :%u\n", (unsigned int)pthread_self());
}


x86 assembly (clang, -O0):
<thread_func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_func2>:
push   %rax
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Task2 running...by Thread :%u\0A\00"
define i8* @thread_func2() {
%1 = alloca i8*
%2 = call i64 (...) @pthread_self()
%3 = trunc i64 %2 to i32
%4 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i8*, i8** %1
ret i8* %5
}

LLVM IR (-O2):
@.str = [32 x i8] c"Task2 running...by Thread :%u\0A\00"
define noalias i8* @thread_func2() {
%1 = tail call i64 (...) @pthread_self()
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i8* undef
}
void marker6() {}


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

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

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

LLVM IR (-O2):
define void @marker6() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int main() {
  int *x;
  int y;
  x = (int *)malloc(4);
  *x = 5;
  y = *x++;
  return y;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x4,%edi
call   1030 <malloc@plt>
movl   $0x5,(%rax)
mov    $0x5,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %2
%6 = load i32*, i32** %2
store i32 5, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i32 1
store i32* %8, i32** %2
%9 = load i32, i32* %7
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 4)
%2 = inttoptr i64 %1 to i32*
store i32 5, i32* %2
ret i32 5
}
/* Variables and functions */
scalar_t__ COND_CS();
int /*<<< orphan*/ EA_AY_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_scs_8_pd(void) {
  m68ki_write_8(EA_AY_PD_8(), COND_CS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_scs_8_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_CS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_scs_8_pd>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_CS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_scs_8_pd() {
%1 = call i32 (...) @EA_AY_PD_8()
%2 = call i64 (...) @COND_CS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_scs_8_pd() {
%1 = tail call i32 (...) @EA_AY_PD_8()
%2 = tail call i64 (...) @COND_CS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
int xstrtoll_range_sfx(char const *, int, int, int, struct suffix_mult const *);
int xstrtoi_range_sfx(const char *str, int b, int l, int u,
                      const struct suffix_mult *sfx) {
  return xstrtoll_range_sfx(str, b, l, u, sfx);
}


x86 assembly (clang, -O0):
<xstrtoi_range_sfx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r8
call   1030 <xstrtoll_range_sfx@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrtoi_range_sfx>:
jmp    1030 <xstrtoll_range_sfx@plt>

LLVM IR (-O0):
%struct.suffix_mult = type { i32 }
define i32 @xstrtoi_range_sfx(i8* %0, i32 %1, i32 %2, i32 %3, %struct.suffix_mult* %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.suffix_mult*
store i8* %0, i8** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store %struct.suffix_mult* %4, %struct.suffix_mult** %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load %struct.suffix_mult*, %struct.suffix_mult** %10
%16 = call i32 @xstrtoll_range_sfx(i8* %11, i32 %12, i32 %13, i32 %14, %struct.suffix_mult* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i32 @xstrtoi_range_sfx(i8* %0, i32 %1, i32 %2, i32 %3, %struct.suffix_mult* %4) {
%6 = tail call i32 @xstrtoll_range_sfx(i8* %0, i32 %1, i32 %2, i32 %3, %struct.suffix_mult* %4)
ret i32 %6
}
__attribute__((unused)) void ularith_shrd(unsigned long *r,
                                          const unsigned long hi,
                                          const unsigned long lo,
                                          const unsigned char i) {
  ;
  if (i > 0)
    *r = (lo >> i) | (hi << (64 - i));
  else
    *r = lo;
}


x86 assembly (clang, -O0):
<ularith_shrd>:
push   %rbp
mov    %rsp,%rbp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
movzbl -0x19(%rbp),%eax
cmp    $0x0,%eax
jle    115a <ularith_shrd+0x5a>
mov    -0x18(%rbp),%rax
movzbl -0x19(%rbp),%ecx
mov    %ecx,%ecx
shr    %cl,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movzbl -0x19(%rbp),%edx
mov    $0x40,%ecx
sub    %edx,%ecx
mov    %ecx,%ecx
shl    %cl,%rax
mov    -0x28(%rbp),%rcx
or     %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
jmp    1165 <ularith_shrd+0x65>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ularith_shrd>:
test   %ecx,%ecx
je     1108 <ularith_shrd+0x8>
shrd   %cl,%rsi,%rdx
mov    %rdx,(%rdi)
ret

LLVM IR (-O0):
define void @ularith_shrd(i64* %0, i64 %1, i64 %2, i8 zeroext %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i8
store i64* %0, i64** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i8 %3, i8* %8
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %26
12: ; preds = %4
%13 = load i64, i64* %7
%14 = load i8, i8* %8
%15 = zext i8 %14 to i32
%16 = zext i32 %15 to i64
%17 = lshr i64 %13, %16
%18 = load i64, i64* %6
%19 = load i8, i8* %8
%20 = zext i8 %19 to i32
%21 = sub nsw i32 64, %20
%22 = zext i32 %21 to i64
%23 = shl i64 %18, %22
%24 = or i64 %17, %23
%25 = load i64*, i64** %5
store i64 %24, i64* %25
br label %29
26: ; preds = %4
%27 = load i64, i64* %7
%28 = load i64*, i64** %5
store i64 %27, i64* %28
br label %29
29: ; preds = %26, %12
ret void
}

LLVM IR (-O2):
define void @ularith_shrd(i64* nocapture writeonly %0, i64 %1, i64 %2, i8 zeroext %3) {
%5 = icmp eq i8 %3, 0
br i1 %5, label %13, label %6
6: ; preds = %4
%7 = zext i8 %3 to i64
%8 = lshr i64 %2, %7
%9 = sub nsw i64 64, %7
%10 = and i64 %9, 4294967295
%11 = shl i64 %1, %10
%12 = or i64 %11, %8
br label %13
13: ; preds = %4, %6
%14 = phi i64 [ %12, %6 ], [ %2, %4 ]
store i64 %14, i64* %0
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void put_le24_ptr(uint8_t *p, uint32_t v) {
  p[0] = (v & 0xFF);
  p[1] = (v >> 8) & 0xFF;
  p[2] = (v >> 16) & 0xFF;
}


x86 assembly (clang, -O0):
<put_le24_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_le24_ptr>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,(%rdi)
movzbl %ah,%ecx
mov    %ecx,0x4(%rdi)
shr    $0x10,%eax
movzbl %al,%eax
mov    %eax,0x8(%rdi)
ret

LLVM IR (-O0):
define void @put_le24_ptr(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 = and i32 %5, 255
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 8
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
%14 = load i32, i32* %4
%15 = ashr i32 %14, 16
%16 = and i32 %15, 255
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 2
store i32 %16, i32* %18
ret void
}

LLVM IR (-O2):
define void @put_le24_ptr(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 255
store i32 %3, i32* %0
%4 = lshr i32 %1, 8
%5 = and i32 %4, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
%7 = lshr i32 %1, 16
%8 = and i32 %7, 255
%9 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %8, i32* %9
ret void
}
void POLICYQUALINFO_free(void) {}


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

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

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

LLVM IR (-O2):
define void @POLICYQUALINFO_free() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int quaddobl_Newton_step(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(197, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<quaddobl_Newton_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xc5,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_Newton_step>:
mov    $0xc5,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @quaddobl_Newton_step() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 197, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @quaddobl_Newton_step() {
%1 = tail call i32 @_ada_use_c2phc(i32 197, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void error(const char *msg) {
  fputs(msg, stderr);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stderr
%5 = call i32 @fputs(i8* %3, i32 %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@EXIT_FAILURE = global i32 0
define void @error(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* %0, i32 %2)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ my_hooks();
void my_init_hook(void) { my_hooks(); }


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

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

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

LLVM IR (-O2):
define void @my_init_hook() {
%1 = tail call i32 (...) @my_hooks()
ret void
}
void picolcd_init_devfs(struct picolcd_data *data, struct hid_report *eeprom_r,
                        struct hid_report *eeprom_w, struct hid_report *flash_r,
                        struct hid_report *flash_w, struct hid_report *reset) {}


x86 assembly (clang, -O0):
<picolcd_init_devfs>:
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)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.picolcd_data = type opaque
%struct.hid_report = type opaque
define void @picolcd_init_devfs(%struct.picolcd_data* %0, %struct.hid_report* %1, %struct.hid_report* %2, %struct.hid_report* %3, %struct.hid_report* %4, %struct.hid_report* %5) {
%7 = alloca %struct.picolcd_data*
%8 = alloca %struct.hid_report*
%9 = alloca %struct.hid_report*
%10 = alloca %struct.hid_report*
%11 = alloca %struct.hid_report*
%12 = alloca %struct.hid_report*
store %struct.picolcd_data* %0, %struct.picolcd_data** %7
store %struct.hid_report* %1, %struct.hid_report** %8
store %struct.hid_report* %2, %struct.hid_report** %9
store %struct.hid_report* %3, %struct.hid_report** %10
store %struct.hid_report* %4, %struct.hid_report** %11
store %struct.hid_report* %5, %struct.hid_report** %12
ret void
}

LLVM IR (-O2):
%struct.picolcd_data = type opaque
%struct.hid_report = type opaque
define void @picolcd_init_devfs(%struct.picolcd_data* nocapture %0, %struct.hid_report* nocapture %1, %struct.hid_report* nocapture %2, %struct.hid_report* nocapture %3, %struct.hid_report* nocapture %4, %struct.hid_report* nocapture %5) {
ret void
}
unsigned int nchar(int v) {
  int i = 0;
  do {
    i++;
    v /= 10;
  } while (v);
  return i;
}


x86 assembly (clang, -O0):
<nchar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    110e <nchar+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nchar>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%eax
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <nchar+0x10>
ret

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

LLVM IR (-O2):
define i32 @nchar(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = phi i32 [ 0, %1 ], [ %5, %2 ]
%5 = add nuw nsw i32 %4, 1
%6 = sdiv i32 %3, 10
%7 = add i32 %3, 9
%8 = icmp ult i32 %7, 19
br i1 %8, label %9, label %2
9: ; preds = %2
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void set32be(uint8_t *bytes, uint32_t x) {
  bytes[0] = (uint8_t)(x >> 24);
  bytes[1] = (uint8_t)(x >> 16);
  bytes[2] = (uint8_t)(x >> 8);
  bytes[3] = (uint8_t)x;
}


x86 assembly (clang, -O0):
<set32be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
movslq -0xc(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set32be>:
mov    %esi,%eax
sar    $0x18,%eax
cltq
mov    %rax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
cltq
mov    %rax,0x8(%rdi)
movslq %esi,%rax
sar    $0x8,%esi
movslq %esi,%rcx
mov    %rcx,0x10(%rdi)
mov    %rax,0x18(%rdi)
ret

LLVM IR (-O0):
define void @set32be(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = sext i32 %6 to i64
%8 = load i64*, i64** %3
%9 = getelementptr inbounds i64, i64* %8, i64 0
store i64 %7, i64* %9
%10 = load i32, i32* %4
%11 = ashr i32 %10, 16
%12 = sext i32 %11 to i64
%13 = load i64*, i64** %3
%14 = getelementptr inbounds i64, i64* %13, i64 1
store i64 %12, i64* %14
%15 = load i32, i32* %4
%16 = ashr i32 %15, 8
%17 = sext i32 %16 to i64
%18 = load i64*, i64** %3
%19 = getelementptr inbounds i64, i64* %18, i64 2
store i64 %17, i64* %19
%20 = load i32, i32* %4
%21 = sext i32 %20 to i64
%22 = load i64*, i64** %3
%23 = getelementptr inbounds i64, i64* %22, i64 3
store i64 %21, i64* %23
ret void
}

LLVM IR (-O2):
define void @set32be(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = sext i32 %3 to i64
store i64 %4, i64* %0
%5 = ashr i32 %1, 16
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %6, i64* %7
%8 = ashr i32 %1, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %9, i64* %10
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %11, i64* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, char const *);
int user_authorization(const char *url) {
  printf("Grant access to your Last.fm account using the link below,"
         " then press ENTER:\n  %s\n",
         url);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<user_authorization>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<user_authorization>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [83 x i8] c"Grant access to your Last.fm account using the link below, then press ENTER:\0A %s\0A\00"
define i32 @user_authorization(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [83 x i8] c"Grant access to your Last.fm account using the link below, then press ENTER:\0A %s\0A\00"
define i32 @user_authorization(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([83 x i8], [83 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @getchar()
ret i32 0
}
int test_and_set_bit(int nr, volatile void *addr) {
  int oldbit;
  asm volatile("btsl %2,%1\n\tsbbl %0,%0"
               : "=r"(oldbit), "=m"((*(volatile int *)addr))
               : "Ir"(nr), "m"((*(volatile int *)addr))
               : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<test_and_set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rdx
bts    %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_and_set_bit>:
bts    %edi,(%rsi)
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @test_and_set_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %3
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
%11 = call i32 asm sideeffect "btsl $2,$1\0A\09sbbl $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %7, i32 %8, i32* elementtype(i32) %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @test_and_set_bit(i32 %0, i8* %1) {
%3 = bitcast i8* %1 to i32*
%4 = tail call i32 asm sideeffect "btsl $2,$1\0A\09sbbl $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %3, i32 %0, i32* elementtype(i32) %3)
ret i32 %4
}
/* Variables and functions */
int bbiFileCheckSigs(char *, int, char *);
int bigWigFileCheckSigs(char *fileName) {
  return bbiFileCheckSigs(fileName, 0x888FFC26, "big wig");
}


x86 assembly (clang, -O0):
<bigWigFileCheckSigs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x888ffc26,%esi
lea    0xed4(%rip),%rdx
call   1030 <bbiFileCheckSigs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bigWigFileCheckSigs>:
lea    0xee9(%rip),%rdx
mov    $0x888ffc26,%esi
jmp    1030 <bbiFileCheckSigs@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"big wig\00"
define i32 @bigWigFileCheckSigs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @bbiFileCheckSigs(i8* %3, i32 -2003829722, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
@.str = [8 x i8] c"big wig\00"
define i32 @bigWigFileCheckSigs(i8* %0) {
%2 = tail call i32 @bbiFileCheckSigs(i8* %0, i32 -2003829722, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(int argn, char *argv[]) {
  while (1) {
    printf("lophilo\n");
    sleep(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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
@.str = [9 x i8] c"lophilo\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
br label %6
6: ; preds = %2, %6
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @sleep(i32 1)
br label %6
}

LLVM IR (-O2):
@str = [8 x i8] c"lophilo\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
br label %3
}
void dummyinput_RenderCallback(void) {}


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

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

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

LLVM IR (-O2):
define void @dummyinput_RenderCallback() {
ret void
}
/* Variables and functions */
long atol(char const *);
scalar_t__ isdigit(char const);
long xatol(const char *s) { return isdigit(*s) ? atol(s) : -1; }


x86 assembly (clang, -O0):
<xatol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1154 <xatol+0x34>
mov    -0x8(%rbp),%rdi
call   1040 <atol@plt>
mov    %rax,-0x10(%rbp)
jmp    1164 <xatol+0x44>
mov    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    1164 <xatol+0x44>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatol>:
push   %rbx
mov    %rdi,%rbx
movsbl (%rdi),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     113a <xatol+0x1a>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <atol@plt>
mov    $0xffffffffffffffff,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @xatol(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i64 @isdigit(i8 signext %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i64 @atol(i8* %0)
br label %7
7: ; preds = %1, %5
%8 = phi i64 [ %6, %5 ], [ -1, %1 ]
ret i64 %8
}
void yy_1_ValidClosingTag(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_1_ValidClosingTag(i8* nocapture %0, i32 %1) {
ret void
}
void avpriv_strtod() {}


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

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

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

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