xunge/DecIR huggingface dataset:
void gtk_widget_ensure_style() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_ensure_style() {
ret void
}
int test3(int x) { return x / -10 != 2; }


x86 assembly (clang, -O0):
<test3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xfffffff6,%ecx
cltd
idiv   %ecx
cmp    $0x2,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test3>:
add    $0x13,%edi
xor    %eax,%eax
cmp    $0xfffffff6,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @test3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sdiv i32 %3, -10
%5 = icmp ne i32 %4, 2
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test3(i32 %0) {
%2 = add i32 %0, 19
%3 = icmp ult i32 %2, -10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
void *memcpy(void *, void const *, size_t);
__attribute__((always_)) void *XXH_memcpy(void *dest, const void *src,
                                          size_t size) {
  return memcpy(dest, src, size);
}


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

x86 assembly (clang, -O2):
<XXH_memcpy>:
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define i8* @XXH_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %0, i8* align 1 %1, i64 %2, i1 false)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ fn_glutSetWindow(int);
void glutSetWindow(int win) { fn_glutSetWindow(win); }


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

x86 assembly (clang, -O2):
<glutSetWindow>:
jmp    1030 <fn_glutSetWindow@plt>

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

LLVM IR (-O2):
define void @glutSetWindow(i32 %0) {
%2 = tail call i32 @fn_glutSetWindow(i32 %0)
ret void
}
int test_imm_5Cuint8_mem(unsigned char *val) {
  return ((*val) & (-0x5C << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_5Cuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -92
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int roadmap_math_area_zoom(int);
int roadmap_math_declutter(int level, int area) {
  int zoom = roadmap_math_area_zoom(area);
  return (zoom < level);
}


x86 assembly (clang, -O0):
<roadmap_math_declutter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <roadmap_math_area_zoom@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<roadmap_math_declutter>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
call   1030 <roadmap_math_area_zoom@plt>
xor    %ecx,%ecx
cmp    %ebx,%eax
setl   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @roadmap_math_declutter(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = call i32 @roadmap_math_area_zoom(i32 %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %3
%10 = icmp slt i32 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @roadmap_math_declutter(i32 %0, i32 %1) {
%3 = tail call i32 @roadmap_math_area_zoom(i32 %1)
%4 = icmp slt i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ GetTime();
int /*<<< orphan*/ MCUSendVehiceTimeToNow(int /*<<< orphan*/);
void MenuMCUSendVehiceTimeToNow() { MCUSendVehiceTimeToNow(GetTime()); }


x86 assembly (clang, -O0):
<MenuMCUSendVehiceTimeToNow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <GetTime@plt>
mov    %eax,%edi
call   1040 <MCUSendVehiceTimeToNow@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<MenuMCUSendVehiceTimeToNow>:
push   %rax
xor    %eax,%eax
call   1030 <GetTime@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <MCUSendVehiceTimeToNow@plt>

LLVM IR (-O0):
define void @MenuMCUSendVehiceTimeToNow() {
%1 = call i32 (...) @GetTime()
%2 = call i32 @MCUSendVehiceTimeToNow(i32 %1)
ret void
}

LLVM IR (-O2):
define void @MenuMCUSendVehiceTimeToNow() {
%1 = tail call i32 (...) @GetTime()
%2 = tail call i32 @MCUSendVehiceTimeToNow(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_ALGORS;
typedef int /*<<< orphan*/ ASN1_VALUE;

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


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

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

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

LLVM IR (-O2):
@X509_ALGORS_it = global i32 0
define i32* @d2i_X509_ALGORS(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @X509_ALGORS_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
unsigned int ntohsk(unsigned int source) {
  unsigned int result;
  unsigned char *bytes_s;
  unsigned char *bytes_r;
  bytes_s = (unsigned char *)(&source);
  bytes_r = (unsigned char *)(&result);
  bytes_r[0] = bytes_s[1];
  bytes_r[1] = bytes_s[0];
  return result;
}


x86 assembly (clang, -O0):
<ntohsk>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ntohsk>:
rol    $0x8,%di
movzwl %di,%eax
ret

LLVM IR (-O0):
define i32 @ntohsk(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %2
%6 = bitcast i32* %2 to i8*
store i8* %6, i8** %4
%7 = bitcast i32* %3 to i8*
store i8* %7, i8** %5
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %15, i8* %17
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @ntohsk(i32 %0) {
%2 = trunc i32 %0 to i16
%3 = tail call i16 @llvm.bswap.i16(i16 %2)
%4 = zext i16 %3 to i32
ret i32 %4
}
void POLICY_MAPPING_new(void) {}


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

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

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

LLVM IR (-O2):
define void @POLICY_MAPPING_new() {
ret void
}
int d_le_rc2(double a1) { return !(((a1) <= (100))); }


x86 assembly (clang, -O0):
<d_le_rc2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_le_rc2>:
movsd  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setb   %al
ret

LLVM IR (-O0):
define i32 @d_le_rc2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ole double %3, 1.000000e+02
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @d_le_rc2(double %0) {
%2 = fcmp ugt double %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) int is_dp_rsr(uint32_t op) {
  return (!((op & 0x02000090) ^ 0x00000010)) &&
         ((op & 0x01900000) ^ 0x01000000);
}


x86 assembly (clang, -O0):
<is_dp_rsr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x2000090,%ecx
xor    $0x10,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x5(%rbp)
jne    1137 <is_dp_rsr+0x37>
mov    -0x4(%rbp),%eax
and    $0x1900000,%eax
xor    $0x1000000,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dp_rsr>:
mov    %edi,%eax
and    $0x2000090,%eax
cmp    $0x10,%eax
sete   %al
and    $0x1900000,%edi
cmp    $0x1000000,%edi
setne  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @is_dp_rsr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 33554576
%5 = xor i32 %4, 16
%6 = icmp ne i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %1
%8 = load i32, i32* %2
%9 = and i32 %8, 26214400
%10 = xor i32 %9, 16777216
%11 = icmp ne i32 %10, 0
br label %12
12: ; preds = %7, %1
%13 = phi i1 [ false, %1 ], [ %11, %7 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_dp_rsr(i32 %0) {
%2 = and i32 %0, 33554576
%3 = icmp eq i32 %2, 16
%4 = and i32 %0, 26214400
%5 = icmp ne i32 %4, 16777216
%6 = and i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
void *thread_func(void *arg) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @thread_func(i8* nocapture readnone %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ SMBWriteWord(int, int, int);
int /*<<< orphan*/ sleep(int);
void eraseProgramFlash() {
  SMBWriteWord(0x16, 0x7, 0x83DE);
  sleep(1);
}


x86 assembly (clang, -O0):
<eraseProgramFlash>:
push   %rbp
mov    %rsp,%rbp
mov    $0x16,%edi
mov    $0x7,%esi
mov    $0x83de,%edx
call   1030 <SMBWriteWord@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<eraseProgramFlash>:
push   %rax
mov    $0x16,%edi
mov    $0x7,%esi
mov    $0x83de,%edx
call   1030 <SMBWriteWord@plt>
mov    $0x1,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
define void @eraseProgramFlash() {
%1 = call i32 @SMBWriteWord(i32 22, i32 7, i32 33758)
%2 = call i32 @sleep(i32 1)
ret void
}

LLVM IR (-O2):
define void @eraseProgramFlash() {
%1 = tail call i32 @SMBWriteWord(i32 22, i32 7, i32 33758)
%2 = tail call i32 @sleep(i32 1)
ret void
}
/* Variables and functions */
scalar_t__ SYS_munmap;
int syscall(long, long, long);
int munmap(void *addr, size_t length) {
  return syscall((long)SYS_munmap, (long)addr, (long)length);
}


x86 assembly (clang, -O0):
<munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<munmap>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    0x2ec3(%rip),%rax
mov    (%rax),%rdi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@SYS_munmap = global i64 0
define i32 @munmap(i8* %0, i64 %1) {
%3 = load i64, i64* @SYS_munmap
%4 = ptrtoint i8* %0 to i64
%5 = tail call i32 @syscall(i64 %3, i64 %4, i64 %1)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void USBHostPwrEnable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned short *)(ui32Base + 0x00000400))) |= 0x00000004;
}


x86 assembly (clang, -O0):
<USBHostPwrEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x400(%rax),%cx
movzwl %cx,%ecx
or     $0x4,%ecx
mov    %cx,0x400(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBHostPwrEnable>:
orw    $0x4,0x400(%rdi)
04
ret

LLVM IR (-O0):
define void @USBHostPwrEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 1024
%5 = inttoptr i64 %4 to i16*
%6 = load volatile i16, i16* %5
%7 = zext i16 %6 to i32
%8 = or i32 %7, 4
%9 = trunc i32 %8 to i16
store volatile i16 %9, i16* %5
ret void
}

LLVM IR (-O2):
define void @USBHostPwrEnable(i64 %0) {
%2 = add nsw i64 %0, 1024
%3 = inttoptr i64 %2 to i16*
%4 = load volatile i16, i16* %3
%5 = or i16 %4, 4
store volatile i16 %5, i16* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void get_current_time(char *buf, int buflen) {
  time_t t = time(0);
  struct tm *time_metric = localtime(&t);
  strftime(buf, buflen, "%Y-%m-%d %H:%M:%S", time_metric);
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rcx
lea    0xe98(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @get_current_time(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca %struct.tm*
store i8* %0, i8** %3
store i32 %1, i32* %4
%7 = call i32 @time(i32 0)
store i32 %7, i32* %5
%8 = call %struct.tm* @localtime(i32* %5)
store %struct.tm* %8, %struct.tm** %6
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = load %struct.tm*, %struct.tm** %6
%12 = call i32 @strftime(i8* %9, i32 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %11)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [18 x i8] c"%Y-%m-%d %H:%M:%S\00"
define void @get_current_time(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32 0)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
%7 = call i32 @strftime(i8* %0, i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret void
}
/* Type definitions */
typedef scalar_t__ int8_t;

/* Variables and functions */
int8_t max(int8_t in1, int8_t in2) {
  if (in1 > in2) {
    return in1;
  } else {
    return in2;
  }
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    1127 <max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ dynmem_append(unsigned char *, int);
int /*<<< orphan*/ dynmem_init(unsigned char *, int);
void test_dynmem_init(void) {
  static unsigned char buf1[256];
  static unsigned char buf2[256];
  static unsigned char buf3[256];
  dynmem_init(buf2, 256);
  dynmem_append(buf3, 256);
  dynmem_append(buf1, 256);
}


x86 assembly (clang, -O0):
<test_dynmem_init>:
push   %rbp
mov    %rsp,%rbp
lea    0x3015(%rip),%rdi
mov    $0x100,%esi
call   1040 <dynmem_init@plt>
lea    0x3104(%rip),%rdi
mov    $0x100,%esi
call   1030 <dynmem_append@plt>
lea    0x2ef3(%rip),%rdi
mov    $0x100,%esi
call   1030 <dynmem_append@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dynmem_init>:
push   %rax
lea    0x3018(%rip),%rdi
mov    $0x100,%esi
call   1040 <dynmem_init@plt>
lea    0x3107(%rip),%rdi
mov    $0x100,%esi
call   1030 <dynmem_append@plt>
lea    0x2ef6(%rip),%rdi
mov    $0x100,%esi
pop    %rax
jmp    1030 <dynmem_append@plt>

LLVM IR (-O0):
@test_dynmem_init.buf1 = internal global [256 x i8] zeroinitializer
@test_dynmem_init.buf2 = internal global [256 x i8] zeroinitializer
@test_dynmem_init.buf3 = internal global [256 x i8] zeroinitializer
define void @test_dynmem_init() {
%1 = call i32 @dynmem_init(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @test_dynmem_init.buf2, i64 0, i64 0), i32 256)
%2 = call i32 @dynmem_append(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @test_dynmem_init.buf3, i64 0, i64 0), i32 256)
%3 = call i32 @dynmem_append(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @test_dynmem_init.buf1, i64 0, i64 0), i32 256)
ret void
}

LLVM IR (-O2):
@test_dynmem_init.buf1 = internal global [256 x i8] zeroinitializer
@test_dynmem_init.buf2 = internal global [256 x i8] zeroinitializer
@test_dynmem_init.buf3 = internal global [256 x i8] zeroinitializer
define void @test_dynmem_init() {
%1 = tail call i32 @dynmem_init(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @test_dynmem_init.buf2, i64 0, i64 0), i32 256)
%2 = tail call i32 @dynmem_append(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @test_dynmem_init.buf3, i64 0, i64 0), i32 256)
%3 = tail call i32 @dynmem_append(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @test_dynmem_init.buf1, i64 0, i64 0), i32 256)
ret void
}
int sync_test_and_set_bit(int nr, volatile unsigned long *addr) {
  int oldbit;
  __asm__ __volatile__("lock; btsl %2,%1\n\tsbbl %0,%0"
                       : "=r"(oldbit), "+m"((*(volatile long *)addr))
                       : "Ir"(nr)
                       : "memory");
  return oldbit;
}


x86 assembly (clang, -O0):
<sync_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
lock bts %ecx,(%rax)
sbb    %eax,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sync_test_and_set_bit(i32 %0, i64* %1) {
%3 = tail call i32 asm sideeffect "lock; btsl $2,$1\0A\09sbbl $0,$0", "=r,=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0, i64* elementtype(i64) %1)
ret i32 %3
}
int main() {
  long a = 4L;
  return (int)a;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Type definitions */
struct minix_fs_dat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dormdir(struct minix_fs_dat *, char *);
void cmd_rmdir(struct minix_fs_dat *fs, int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++) {
    dormdir(fs, argv[i]);
  }
}


x86 assembly (clang, -O0):
<cmd_rmdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <cmd_rmdir+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <dormdir@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <cmd_rmdir+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_rmdir>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%esi
jl     1145 <cmd_rmdir+0x35>
mov    %rdx,%r14
mov    %rdi,%r15
mov    %esi,%r12d
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rsi
mov    %r15,%rdi
call   1030 <dormdir@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <cmd_rmdir+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.minix_fs_dat = type { i32 }
define void @cmd_rmdir(%struct.minix_fs_dat* %0, i32 %1, i8** %2) {
%4 = alloca %struct.minix_fs_dat*
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
store %struct.minix_fs_dat* %0, %struct.minix_fs_dat** %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
store i32 1, i32* %7
br label %8
8: ; preds = %20, %3
%9 = load i32, i32* %7
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load %struct.minix_fs_dat*, %struct.minix_fs_dat** %4
%14 = load i8**, i8*** %6
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 @dormdir(%struct.minix_fs_dat* %13, i8* %18)
br label %20
20: ; preds = %12
%21 = load i32, i32* %7
%22 = add nsw i32 %21, 1
store i32 %22, i32* %7
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
%struct.minix_fs_dat = type { i32 }
define void @cmd_rmdir(%struct.minix_fs_dat* %0, i32 %1, i8** nocapture %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 1, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %2, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @dormdir(%struct.minix_fs_dat* %0, i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
void gui_setyx(int y, int x) { move(y, x); }


x86 assembly (clang, -O0):
<gui_setyx>:
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 <move@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_setyx>:
jmp    1030 <move@plt>

LLVM IR (-O0):
define void @gui_setyx(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 @move(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @gui_setyx(i32 %0, i32 %1) {
%3 = tail call i32 @move(i32 %0, i32 %1)
ret void
}
int symbol_hash(char *name) {
  int hash = 0;
  char c;
  while (c = *name++) {
    hash = (hash * 9 ^ c) % 1000;
  }
  return hash % 1000;
}


x86 assembly (clang, -O0):
<symbol_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0xd(%rbp)
cmp    $0x0,%al
je     1145 <symbol_hash+0x45>
imul   $0x9,-0xc(%rbp),%eax
movsbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
jmp    110f <symbol_hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbol_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1143 <symbol_hash+0x43>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,8),%eax
movsbl %cl,%ecx
xor    %eax,%ecx
movslq %ecx,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <symbol_hash+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @symbol_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i32 [ %12, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul nsw i32 %7, 9
%10 = sext i8 %5 to i32
%11 = xor i32 %9, %10
%12 = srem i32 %11, 1000
%13 = load i8, i8* %8
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char *, char *);
int CalSorce(char a[]) {
  if (!strcmp(a, "right"))
    return 10;
  else if (!strcmp(a, "wrong"))
    return -10;
  else
    return 0;
}


x86 assembly (clang, -O0):
<CalSorce>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1141 <CalSorce+0x31>
movl   $0xa,-0x4(%rbp)
jmp    116d <CalSorce+0x5d>
mov    -0x10(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
jne    1166 <CalSorce+0x56>
movl   $0xfffffff6,-0x4(%rbp)
jmp    116d <CalSorce+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CalSorce>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcmp@plt>
test   %eax,%eax
je     1141 <CalSorce+0x31>
lea    0xedb(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
mov    $0xfffffff6,%eax
cmovne %ecx,%eax
pop    %rbx
ret
mov    $0xa,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"right\00"
@.str.1 = [6 x i8] c"wrong\00"
define i32 @CalSorce(i8* nocapture %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
%7 = select i1 %6, i32 -10, i32 0
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 10, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
double __nv_tan(double);
double tan(double __a) { return __nv_tan(__a); }


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

x86 assembly (clang, -O2):
<tan>:
jmp    1030 <__nv_tan@plt>

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

LLVM IR (-O2):
define double @tan(double %0) {
%2 = tail call double @__nv_tan(double %0)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned int *, int, int, int /*<<< orphan*/ *);
void write_little_endian(unsigned int word, int num_bytes, FILE *wav_file) {
  unsigned buf;
  while (num_bytes > 0) {
    buf = word & 0xff;
    fwrite(&buf, 1, 1, wav_file);
    num_bytes--;
    word >>= 8;
  }
}


x86 assembly (clang, -O0):
<write_little_endian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1162 <write_little_endian+0x52>
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rcx
lea    -0x14(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fwrite@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <write_little_endian+0x12>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_little_endian>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    1146 <write_little_endian+0x36>
mov    %rdx,%r14
mov    %esi,%ebp
mov    %edi,%ebx
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %bl,%edi
mov    %r14,%rsi
call   1030 <fputc@plt>
shr    $0x8,%ebx
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1130 <write_little_endian+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @write_little_endian(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
br label %8
8: ; preds = %11, %3
%9 = load i32, i32* %5
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i32, i32* %4
%13 = and i32 %12, 255
store i32 %13, i32* %7
%14 = load i32*, i32** %6
%15 = call i32 @fwrite(i32* %7, i32 1, i32 1, i32* %14)
%16 = load i32, i32* %5
%17 = add nsw i32 %16, -1
store i32 %17, i32* %5
%18 = load i32, i32* %4
%19 = lshr i32 %18, 8
store i32 %19, i32* %4
br label %8
20: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @write_little_endian(i32 %0, i32 %1, i32* nocapture %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i32 [ %12, %5 ], [ %0, %3 ]
%7 = phi i32 [ %11, %5 ], [ %1, %3 ]
%8 = shl i32 %6, 24
%9 = ashr exact i32 %8, 24
%10 = tail call i32 @fputc(i32 %9, i32* %2)
%11 = add nsw i32 %7, -1
%12 = lshr i32 %6, 8
%13 = icmp ugt i32 %7, 1
br i1 %13, label %5, label %14
14: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wctrans_t;

/* Variables and functions */
int /*<<< orphan*/ __infer_nondet_int();
wctrans_t wctrans(const char *property) {
  return (wctrans_t)__infer_nondet_int();
}


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

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

LLVM IR (-O0):
define i32 @wctrans(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @wctrans(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void halt(void) {
  printf("\nSystem halted!\n");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<halt>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
jmp    1120 <halt+0x10>

x86 assembly (clang, -O2):
<halt>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <halt+0x10>

LLVM IR (-O0):
@.str = [17 x i8] c"\0ASystem halted!\0A\00"
define void @halt() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}

LLVM IR (-O2):
@str = [16 x i8] c"\0ASystem halted!\00"
define void @halt() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
br label %2
}
double mod2pi(double f) {
  while (f < 0.) {
    f += 2 * 3.14159265358979323846;
  }
  while (f > 0.) {
    f -= 2 * 3.14159265358979323846;
  }
  return f;
}


x86 assembly (clang, -O0):
<mod2pi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    112e <mod2pi+0x2e>
movsd  0xee1(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1109 <mod2pi+0x9>
jmp    1133 <mod2pi+0x33>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1160 <mod2pi+0x60>
movsd  -0x8(%rbp),%xmm0
movsd  0xeae(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1133 <mod2pi+0x33>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mod2pi>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    112a <mod2pi+0x2a>
movsd  0xeee(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     1120 <mod2pi+0x20>
ucomisd %xmm1,%xmm0
jbe    114a <mod2pi+0x4a>
movsd  0xed0(%rip),%xmm1
xorpd  %xmm2,%xmm2
nopl   0x0(%rax)
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
ja     1140 <mod2pi+0x40>
ret

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

LLVM IR (-O2):
define double @mod2pi(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %6, %1
%4 = phi double [ %0, %1 ], [ %8, %6 ]
%5 = fcmp ogt double %4, 0.000000e+00
br i1 %5, label %10, label %14
6: ; preds = %1, %6
%7 = phi double [ %8, %6 ], [ %0, %1 ]
%8 = fadd double %7, 0x401921FB54442D18
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %6, label %3
10: ; preds = %3, %10
%11 = phi double [ %12, %10 ], [ %4, %3 ]
%12 = fadd double %11, 0xC01921FB54442D18
%13 = fcmp ogt double %12, 0.000000e+00
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi double [ %4, %3 ], [ %12, %10 ]
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ gprs(int /*<<< orphan*/, char *);
int main() {
  gprs(0, "13591991768");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
lea    0xed8(%rip),%rsi
call   1030 <gprs@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [12 x i8] c"13591991768\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @gprs(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"13591991768\00"
define i32 @main() {
%1 = tail call i32 @gprs(i32 0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void hostappl_Init() {}


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

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

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

LLVM IR (-O2):
define void @hostappl_Init() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long subwindow;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
void set_XLeaveWindowEvent_subwindow(void *_p, unsigned long _v) {
  ((XLeaveWindowEvent *)_p)->subwindow = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XLeaveWindowEvent_subwindow(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
void gtk_button_get_relief() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @init_sub_rel_color_span_funcs_c() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t swap_endian32(uint32_t x) {
  return (x << 24) | ((x << 8) & 0xff0000) | ((x >> 8) & 0xff00) |
         ((x >> 24) & 0xff);
}


x86 assembly (clang, -O0):
<swap_endian32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff00,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @swap_endian32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = and i32 %6, 16711680
%8 = or i32 %4, %7
%9 = load i32, i32* %2
%10 = ashr i32 %9, 8
%11 = and i32 %10, 65280
%12 = or i32 %8, %11
%13 = load i32, i32* %2
%14 = ashr i32 %13, 24
%15 = and i32 %14, 255
%16 = or i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @swap_endian32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
void *getgrnam(const char *name) {
  errno = ENOSYS;
  return 0;
}


x86 assembly (clang, -O0):
<getgrnam>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ed9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec0(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getgrnam>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i8* @getgrnam(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i8* null
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define noalias i8* @getgrnam(i8* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i8* null
}
int nextpow2(int x) {
  int i;
  for (i = 1; i < x; i *= 2)
    ;
  return i;
}


x86 assembly (clang, -O0):
<nextpow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    112d <nextpow2+0x2d>
jmp    111f <nextpow2+0x1f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <nextpow2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextpow2>:
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ecx,%eax
lea    (%rax,%rax,1),%ecx
cmp    %edi,%eax
jl     1110 <nextpow2+0x10>
ret

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

LLVM IR (-O2):
define i32 @nextpow2(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 1, %1 ], [ %5, %2 ]
%4 = icmp slt i32 %3, %0
%5 = shl nsw i32 %3, 1
br i1 %4, label %2, label %6
6: ; preds = %2
ret i32 %3
}
int pathconN_nm5_f0(const double **arg, double **res, int *iw, double *w,
                    int mem) {
  return 0;
}


x86 assembly (clang, -O0):
<pathconN_nm5_f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pathconN_nm5_f0(double** %0, double** %1, i32* %2, double* %3, i32 %4) {
%6 = alloca double**
%7 = alloca double**
%8 = alloca i32*
%9 = alloca double*
%10 = alloca i32
store double** %0, double*** %6
store double** %1, double*** %7
store i32* %2, i32** %8
store double* %3, double** %9
store i32 %4, i32* %10
ret i32 0
}

LLVM IR (-O2):
define i32 @pathconN_nm5_f0(double** nocapture readnone %0, double** nocapture readnone %1, i32* nocapture readnone %2, double* nocapture readnone %3, i32 %4) {
ret i32 0
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ sleep(int);
void *w_malloc(size_t size) {
  void *p;
  do {
    p = malloc(size);
    if (!p)
      sleep(1);
  } while (!p);
  return p;
}


x86 assembly (clang, -O0):
<w_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    114e <w_malloc+0x2e>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1153 <w_malloc+0x33>
cmpq   $0x0,-0x10(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112c <w_malloc+0xc>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_malloc>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
call   1030 <malloc@plt>
test   %rax,%rax
jne    1149 <w_malloc+0x29>
mov    $0x1,%edi
call   1040 <sleep@plt>
mov    %rbx,%rdi
jmp    1130 <w_malloc+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define noalias i8* @w_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1, %4
%5 = tail call i32 @sleep(i32 1)
%6 = tail call i8* @malloc(i64 %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %4, label %8
8: ; preds = %4, %1
%9 = phi i8* [ %2, %1 ], [ %6, %4 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int _usage(void) {
  fputs("Usage: "
        "more"
        " [file...]\n",
        stderr);
  return 1;
}


x86 assembly (clang, -O0):
<_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
lea    0xedf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Usage: more [file...]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [23 x i8] c"Usage: more [file...]\0A\00"
@stderr = global i32 0
define i32 @_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
void OCSP_SERVICELOC_free(void) {}


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

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

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

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