xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ cdecl_func__clock_gettime(int /*<<< orphan*/);
int /*<<< orphan*/ clock_gettime;
void cdecl_expr__clock_gettime() { cdecl_func__clock_gettime(clock_gettime); }


x86 assembly (clang, -O0):
<cdecl_expr__clock_gettime>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
call   1030 <cdecl_func__clock_gettime@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdecl_expr__clock_gettime>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <cdecl_func__clock_gettime@plt>

LLVM IR (-O0):
@clock_gettime = global i32 0
define void @cdecl_expr__clock_gettime() {
%1 = load i32, i32* @clock_gettime
%2 = call i32 @cdecl_func__clock_gettime(i32 %1)
ret void
}

LLVM IR (-O2):
@clock_gettime = global i32 0
define void @cdecl_expr__clock_gettime() {
%1 = load i32, i32* @clock_gettime
%2 = tail call i32 @cdecl_func__clock_gettime(i32 %1)
ret void
}
int test_imm_25uint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x25 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_25uint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x10,%rdx
and    $0x25,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_25uint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 37
%7 = icmp ne i64 %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_25uint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2424832
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int bbm_long_read(void *, unsigned short, unsigned int *);
int bbm_com_long_read(void *handle, unsigned short addr, unsigned int *data) {
  int res;
  res = bbm_long_read(handle, addr, data);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_long_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%ax
mov    -0x18(%rbp),%rdx
movzwl %ax,%esi
call   1030 <bbm_long_read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_long_read>:
jmp    1030 <bbm_long_read@plt>

LLVM IR (-O0):
define i32 @bbm_com_long_read(i8* %0, i16 zeroext %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i16
%6 = alloca i32*
%7 = alloca i32
store i8* %0, i8** %4
store i16 %1, i16* %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i16, i16* %5
%10 = load i32*, i32** %6
%11 = call i32 @bbm_long_read(i8* %8, i16 zeroext %9, i32* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
define i32 @bbm_com_long_read(i8* %0, i16 zeroext %1, i32* %2) {
%4 = tail call i32 @bbm_long_read(i8* %0, i16 zeroext %1, i32* %2)
ret i32 %4
}
/* Variables and functions */
int SerialAPI_request(unsigned char *, int);
int ZW_RFPowerLevelGet() {
  unsigned char buf[255];
  buf[0] = 0x00;
  buf[1] = 0xBA;
  return SerialAPI_request(buf, 2);
}


x86 assembly (clang, -O0):
<ZW_RFPowerLevelGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movb   $0x0,-0x100(%rbp)
movb   $0xba,-0xff(%rbp)
lea    -0x100(%rbp),%rdi
mov    $0x2,%esi
call   1030 <SerialAPI_request@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZW_RFPowerLevelGet>:
sub    $0x108,%rsp
movw   $0xba00,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <SerialAPI_request@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @ZW_RFPowerLevelGet() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 1
store i8 -70, i8* %3
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
%5 = call i32 @SerialAPI_request(i8* %4, i32 2)
ret i32 %5
}

LLVM IR (-O2):
define i32 @ZW_RFPowerLevelGet() {
%1 = alloca [255 x i8]
%2 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 0
store i8 0, i8* %2
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %1, i64 0, i64 1
store i8 -70, i8* %3
%4 = call i32 @SerialAPI_request(i8* %2, i32 2)
ret i32 %4
}
void freefun(void *arg) { return; }


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

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

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

LLVM IR (-O2):
define void @freefun(i8* nocapture %0) {
ret void
}
/* Variables and functions */
size_t strlen(char *);
char *strncat(char *, char const *, size_t);
char *elhash_strncat(char *dest, size_t dest_size, char const *src,
                     size_t count) {
  return strlen(dest) + count + 1 <= dest_size ? strncat(dest, src, count)
                                               : NULL;
}


x86 assembly (clang, -O0):
<elhash_strncat>:
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    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    -0x20(%rbp),%rax
add    $0x1,%rax
cmp    -0x10(%rbp),%rax
ja     116d <elhash_strncat+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <strncat@plt>
mov    %rax,-0x28(%rbp)
jmp    1178 <elhash_strncat+0x58>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1178 <elhash_strncat+0x58>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elhash_strncat>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
call   1030 <strlen@plt>
add    %r14,%rax
add    $0x1,%rax
cmp    %r12,%rax
jbe    1149 <elhash_strncat+0x29>
xor    %ebx,%ebx
jmp    1157 <elhash_strncat+0x37>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <strncat@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @elhash_strncat(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i8*, i8** %5
%10 = call i64 @strlen(i8* %9)
%11 = load i64, i64* %8
%12 = add i64 %10, %11
%13 = add i64 %12, 1
%14 = load i64, i64* %6
%15 = icmp ule i64 %13, %14
br i1 %15, label %16, label %21
16: ; preds = %4
%17 = load i8*, i8** %5
%18 = load i8*, i8** %7
%19 = load i64, i64* %8
%20 = call i8* @strncat(i8* %17, i8* %18, i64 %19)
br label %22
21: ; preds = %4
br label %22
22: ; preds = %21, %16
%23 = phi i8* [ %20, %16 ], [ null, %21 ]
ret i8* %23
}

LLVM IR (-O2):
define i8* @elhash_strncat(i8* %0, i64 %1, i8* nocapture %2, i64 %3) {
%5 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%6 = add i64 %3, 1
%7 = add i64 %6, %5
%8 = icmp ugt i64 %7, %1
br i1 %8, label %11, label %9
9: ; preds = %4
%10 = tail call i8* @strncat(i8* dereferenceable(1) %0, i8* %2, i64 %3)
br label %11
11: ; preds = %4, %9
%12 = phi i8* [ %0, %9 ], [ null, %4 ]
ret i8* %12
}
/* Type definitions */
struct rtavl_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void **rtavl_probe(struct rtavl_table *, void *);
void(rtavl_assert_insert)(struct rtavl_table *table, void *item) {
  void **p = rtavl_probe(table, item);
  assert(p != NULL && *p == item);
}


x86 assembly (clang, -O0):
<rtavl_assert_insert>:
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 <rtavl_probe@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x18(%rbp)
mov    %al,-0x19(%rbp)
je     1162 <rtavl_assert_insert+0x42>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtavl_assert_insert>:
push   %rbx
mov    %rsi,%rbx
call   1030 <rtavl_probe@plt>
xor    %edi,%edi
test   %rax,%rax
je     1137 <rtavl_assert_insert+0x17>
cmp    %rbx,(%rax)
sete   %dil
pop    %rbx
jmp    1040 <assert@plt>

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

LLVM IR (-O2):
%struct.rtavl_table = type { i32 }
define void @rtavl_assert_insert(%struct.rtavl_table* %0, i8* %1) {
%3 = tail call i8** @rtavl_probe(%struct.rtavl_table* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, %1
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %2
%10 = phi i32 [ 0, %2 ], [ %8, %5 ]
%11 = tail call i32 @assert(i32 %10)
ret void
}
float h(float x) { return (x < 0.f ? -1.f : 1.f); }


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm3
movss  0xee6(%rip),%xmm2
xorps  %xmm1,%xmm1
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
lea    0xeee(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @h(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, float -1.000000e+00, float 1.000000e+00
ret float %6
}

LLVM IR (-O2):
define float @h(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = select i1 %2, float -1.000000e+00, float 1.000000e+00
ret float %3
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_CIPHER;

/* Variables and functions */
int /*<<< orphan*/ OBJ_NAME_TYPE_CIPHER_METH;
scalar_t__ OBJ_NAME_get(char const *, int /*<<< orphan*/);
const EVP_CIPHER *EVP_get_cipherbyname(const char *name) {
  const EVP_CIPHER *cp;
  cp = (const EVP_CIPHER *)OBJ_NAME_get(name, OBJ_NAME_TYPE_CIPHER_METH);
  return (cp);
}


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

x86 assembly (clang, -O2):
<EVP_get_cipherbyname>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
jmp    1030 <OBJ_NAME_get@plt>

LLVM IR (-O0):
@OBJ_NAME_TYPE_CIPHER_METH = global i32 0
define i32* @EVP_get_cipherbyname(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @OBJ_NAME_TYPE_CIPHER_METH
%6 = call i64 @OBJ_NAME_get(i8* %4, i32 %5)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %3
%8 = load i32*, i32** %3
ret i32* %8
}

LLVM IR (-O2):
@OBJ_NAME_TYPE_CIPHER_METH = global i32 0
define i32* @EVP_get_cipherbyname(i8* %0) {
%2 = load i32, i32* @OBJ_NAME_TYPE_CIPHER_METH
%3 = tail call i64 @OBJ_NAME_get(i8* %0, i32 %2)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
void post_behaviour() { return; }


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

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

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

LLVM IR (-O2):
define void @post_behaviour() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, int, double);
void sprintf_generic(int d, double x) {
  char buf[64];
  snprintf(buf, 64, "%*g", d, x);
}


x86 assembly (clang, -O0):
<sprintf_generic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x4(%rbp),%ecx
movsd  -0x10(%rbp),%xmm0
mov    $0x40,%esi
lea    0xec8(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sprintf_generic>:
sub    $0x48,%rsp
mov    %edi,%ecx
lea    0xee3(%rip),%rdx
mov    %rsp,%rdi
mov    $0x40,%esi
call   1030 <snprintf@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%*g\00"
define void @sprintf_generic(i32 %0, double %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca [64 x i8]
store i32 %0, i32* %3
store double %1, double* %4
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %3
%8 = load double, double* %4
%9 = call i32 @snprintf(i8* %6, i32 64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %7, double %8)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%*g\00"
define void @sprintf_generic(i32 %0, double %1) {
%3 = alloca [64 x i8]
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @snprintf(i8* %4, i32 64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0, double %1)
ret void
}
/* Variables and functions */
int _toupper(int);
int toupper(int c) { return _toupper(c); }


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

x86 assembly (clang, -O2):
<toupper>:
jmp    1030 <_toupper@plt>

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

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i32 @_toupper(i32 %0)
ret i32 %2
}
void gdk_pixmap_create_from_xpm() {}


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

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

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

LLVM IR (-O2):
define void @gdk_pixmap_create_from_xpm() {
ret void
}
/* Variables and functions */
unsigned int vsub4(int /*<<< orphan*/, unsigned int);
unsigned int vneg4(unsigned int a) { return vsub4(0, a); }


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

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

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

LLVM IR (-O2):
define i32 @vneg4(i32 %0) {
%2 = tail call i32 @vsub4(i32 0, i32 %0)
ret i32 %2
}
void av_thread_message_queue_nb_elems() {}


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

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

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

LLVM IR (-O2):
define void @av_thread_message_queue_nb_elems() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ execl(char const *, char const *, char *, char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
void exec_fd_leak_check(int nr_expected_fds) {
  const char *exe = "./exec-fd-leak-checker";
  char number[16] = {0};
  snprintf(number, sizeof number - 1, "%d", nr_expected_fds);
  execl(exe, exe, number, (char *)NULL);
  assert(0 && "execing fd leak checker failed");
}


x86 assembly (clang, -O0):
<exec_fd_leak_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    0xeae(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1040 <memset@plt>
lea    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0xf,%esi
lea    0xe9e(%rip),%rdx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1060 <execl@plt>
xor    %edi,%edi
call   1050 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_fd_leak_check>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ecx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
lea    0xed2(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <snprintf@plt>
lea    0xea4(%rip),%rdi
mov    %rdi,%rsi
mov    %rbx,%rdx
xor    %ecx,%ecx
call   1050 <execl@plt>
xor    %edi,%edi
call   1040 <assert@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"./exec-fd-leak-checker\00"
@.str.1 = [3 x i8] c"%d\00"
define void @exec_fd_leak_check(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [16 x i8]
store i32 %0, i32* %2
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %3
%5 = bitcast [16 x i8]* %4 to i8*
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @snprintf(i8* %6, i32 15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %3
%11 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%12 = call i32 @execl(i8* %9, i8* %10, i8* %11, i8* null)
%13 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"./exec-fd-leak-checker\00"
@.str.1 = [3 x i8] c"%d\00"
define void @exec_fd_leak_check(i32 %0) {
%2 = alloca [16 x i8]
%3 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 15, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%5 = call i32 @execl(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3, i8* null)
%6 = call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ arm_arith_sub(int /*<<< orphan*/);
int /*<<< orphan*/ t16_data_imm7sp_op();
void t16_sub_sp7() { arm_arith_sub(t16_data_imm7sp_op()); }


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

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

LLVM IR (-O0):
define void @t16_sub_sp7() {
%1 = call i32 (...) @t16_data_imm7sp_op()
%2 = call i32 @arm_arith_sub(i32 %1)
ret void
}

LLVM IR (-O2):
define void @t16_sub_sp7() {
%1 = tail call i32 (...) @t16_data_imm7sp_op()
%2 = tail call i32 @arm_arith_sub(i32 %1)
ret void
}
/* Variables and functions */
bool nrf53_errata_1(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_1() {
ret i32 0
}
/* Variables and functions */
unsigned int demanderConfirmation(char *, int);
int /*<<< orphan*/ sauvegarde();
int /*<<< orphan*/ supprimerNomSauvegarde(char const *);
int /*<<< orphan*/ viderDossierSauvegarde(char const *);
void supprimerSauvegarde(const char *nomPartie) {
  unsigned int confirmation;
  confirmation = demanderConfirmation(
      "Etes vous sur de vouloir supprimer cette partie ? (0/1)", 1);
  if (confirmation == 1) {
    viderDossierSauvegarde(nomPartie);
    supprimerNomSauvegarde(nomPartie);
  }
  sauvegarde();
}


x86 assembly (clang, -O0):
<supprimerSauvegarde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
mov    $0x1,%esi
call   1030 <demanderConfirmation@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    117c <supprimerSauvegarde+0x3c>
mov    -0x8(%rbp),%rdi
call   1060 <viderDossierSauvegarde@plt>
mov    -0x8(%rbp),%rdi
call   1050 <supprimerNomSauvegarde@plt>
mov    $0x0,%al
call   1040 <sauvegarde@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<supprimerSauvegarde>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
mov    $0x1,%esi
call   1030 <demanderConfirmation@plt>
cmp    $0x1,%eax
jne    116a <supprimerSauvegarde+0x2a>
mov    %rbx,%rdi
call   1060 <viderDossierSauvegarde@plt>
mov    %rbx,%rdi
call   1050 <supprimerNomSauvegarde@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <sauvegarde@plt>

LLVM IR (-O0):
@.str = [56 x i8] c"Etes vous sur de vouloir supprimer cette partie ? (0/1)\00"
define void @supprimerSauvegarde(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @demanderConfirmation(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 1)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @viderDossierSauvegarde(i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 @supprimerNomSauvegarde(i8* %10)
br label %12
12: ; preds = %7, %1
%13 = call i32 (...) @sauvegarde()
ret void
}

LLVM IR (-O2):
@.str = [56 x i8] c"Etes vous sur de vouloir supprimer cette partie ? (0/1)\00"
define void @supprimerSauvegarde(i8* %0) {
%2 = tail call i32 @demanderConfirmation(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @viderDossierSauvegarde(i8* %0)
%6 = tail call i32 @supprimerNomSauvegarde(i8* %0)
br label %7
7: ; preds = %4, %1
%8 = tail call i32 (...) @sauvegarde()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ execute_word(char *, void *);
void *init_forth();
int /*<<< orphan*/ init_io();
int /*<<< orphan*/ reset();
main() {
  void *up;
  init_io();
  up = init_forth();
  execute_word("run-tests", up);
  reset();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <init_io@plt>
mov    $0x0,%al
call   1060 <init_forth@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <execute_word@plt>
mov    $0x0,%al
call   1040 <reset@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <init_io@plt>
xor    %eax,%eax
call   1060 <init_forth@plt>
lea    0xeaa(%rip),%rdi
mov    %rax,%rsi
call   1030 <execute_word@plt>
xor    %eax,%eax
call   1040 <reset@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"run-tests\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i32 (...) @init_io()
%3 = call i8* (...) @init_forth()
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @execute_word(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @reset()
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"run-tests\00"
define i32 @main() {
%1 = tail call i32 (...) @init_io()
%2 = tail call i8* (...) @init_forth()
%3 = tail call i32 @execute_word(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 (...) @reset()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int get_be16(uint8_t *buf) {
  uint16_t val = ((uint16_t)(*buf)) << 8;
  val |= (uint16_t)(buf[1]);
  return val;
}


x86 assembly (clang, -O0):
<get_be16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_be16>:
mov    (%rdi),%eax
shl    $0x8,%eax
or     0x8(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_be16(i64* %0) {
%2 = alloca i64*
%3 = alloca i32
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
store i32 %7, i32* %3
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = load i32, i32* %3
%13 = or i32 %12, %11
store i32 %13, i32* %3
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @get_be16(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 8
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = or i32 %4, %7
ret i32 %8
}
int _getpid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @_getpid() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void grpcsharp_shutdown() {
  fprintf(stderr, "Should never reach here");
  abort();
}


x86 assembly (clang, -O0):
<grpcsharp_shutdown>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<grpcsharp_shutdown>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_shutdown() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"Should never reach here\00"
define void @grpcsharp_shutdown() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @abort()
unreachable
}
int test_imm_D8int32_mem(int *val) {
  return ((*val) & (0xD8 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_D8int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 216
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int Write(int, int *, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void wakeup_with(int pype) {
  int retval, buf = 1;
  retval = Write(pype, &buf, sizeof(buf));
  if (retval == 0) {
    fprintf(stderr, "\nwrite returned 0\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<wakeup_with>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <Write@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    117f <wakeup_with+0x4f>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xe90(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wakeup_with>:
push   %rax
movl   $0x1,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <Write@plt>
test   %eax,%eax
je     114e <wakeup_with+0x1e>
pop    %rax
ret
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"\0Awrite returned 0\0A\00"
define void @wakeup_with(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = call i32 @Write(i32 %0, i32* %2, i32 4)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %1
ret void
}
f(double *ty) { *ty = -1.0; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movabs $0xbff0000000000000,%rax
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define i32 @f(double* %0) {
%2 = alloca i32
%3 = alloca double*
store double* %0, double** %3
%4 = load double*, double** %3
store double -1.000000e+00, double* %4
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(double* nocapture writeonly %0) {
store double -1.000000e+00, double* %0
ret i32 undef
}
int fxor(int a, int b) {
  int tmp;
  a = __builtin_bswap32(a);
  b = __builtin_bswap32(b);
  tmp = a ^ b;
  return __builtin_bswap32(tmp);
}


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

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

LLVM IR (-O0):
define i32 @fxor(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* %3
%7 = call i32 @llvm.bswap.i32(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @llvm.bswap.i32(i32 %8)
store i32 %9, i32* %4
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = xor i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = call i32 @llvm.bswap.i32(i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @fxor(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int ext_yahoo_connect(char *, int);
int yahoo_connect(char *host, int port) {
  return ext_yahoo_connect(host, port);
}


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

x86 assembly (clang, -O2):
<yahoo_connect>:
jmp    1030 <ext_yahoo_connect@plt>

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

LLVM IR (-O2):
define i32 @yahoo_connect(i8* %0, i32 %1) {
%3 = tail call i32 @ext_yahoo_connect(i8* %0, i32 %1)
ret i32 %3
}
int tolower(int c) {
  if ((c >= 'A') && (c <= 'Z'))
    return c + 32;
  return c;
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1129 <tolower+0x29>
cmpl   $0x5a,-0x8(%rbp)
jg     1129 <tolower+0x29>
mov    -0x8(%rbp),%eax
add    $0x20,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <tolower+0x2f>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
lea    -0x41(%rdi),%ecx
lea    0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 90
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 32
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ time_usleep(int);
void thread_b(void *arg) {
  printf("starting thread B\n");
  while (1) {
    printf("B, sleep...");
    time_usleep(10000);
    printf("wakeup !\n");
  }
}


x86 assembly (clang, -O0):
<thread_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2710,%edi
call   1040 <time_usleep@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
jmp    1138 <thread_b+0x18>

x86 assembly (clang, -O2):
<thread_b>:
push   %r14
push   %rbx
push   %rax
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb9(%rip),%r14
lea    0xed0(%rip),%rbx
xchg   %ax,%ax
mov    %r14,%rdi
call   1040 <printf@plt>
mov    $0x2710,%edi
call   1050 <time_usleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1150 <thread_b+0x20>

LLVM IR (-O0):
@.str = [19 x i8] c"starting thread B\0A\00"
@.str.1 = [12 x i8] c"B, sleep...\00"
@.str.2 = [10 x i8] c"wakeup !\0A\00"
define void @thread_b(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %1, %4
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @time_usleep(i32 10000)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %4
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"B, sleep...\00"
@str = [18 x i8] c"starting thread B\00"
@str.3 = [9 x i8] c"wakeup !\00"
define void @thread_b(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @time_usleep(i32 10000)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0))
br label %3
}
void NAME_CONSTRAINTS_new(void) {}


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

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

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

LLVM IR (-O2):
define void @NAME_CONSTRAINTS_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_io_bit(int, int);
void TOSH_MAKE_I2C_BUS1_SCL_INPUT() { clear_io_bit(0x36, 4); }


x86 assembly (clang, -O0):
<TOSH_MAKE_I2C_BUS1_SCL_INPUT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x36,%edi
mov    $0x4,%esi
call   1030 <clear_io_bit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_MAKE_I2C_BUS1_SCL_INPUT>:
mov    $0x36,%edi
mov    $0x4,%esi
jmp    1030 <clear_io_bit@plt>

LLVM IR (-O0):
define void @TOSH_MAKE_I2C_BUS1_SCL_INPUT() {
%1 = call i32 @clear_io_bit(i32 54, i32 4)
ret void
}

LLVM IR (-O2):
define void @TOSH_MAKE_I2C_BUS1_SCL_INPUT() {
%1 = tail call i32 @clear_io_bit(i32 54, i32 4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ inet_addr(char const *);
int /*<<< orphan*/ isvalidnetmask(int /*<<< orphan*/);
size_t netmask2cidr(int /*<<< orphan*/);
int /*<<< orphan*/ ntohl(int /*<<< orphan*/);
size_t mkkeylen(const char *subnetmask) {
  in_addr_t netmask = ntohl(inet_addr(subnetmask));
  assert(isvalidnetmask(netmask));
  return netmask2cidr(netmask);
}


x86 assembly (clang, -O0):
<mkkeylen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <inet_addr@plt>
mov    %eax,%edi
call   1070 <ntohl@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1060 <isvalidnetmask@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    -0xc(%rbp),%edi
call   1030 <netmask2cidr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkkeylen>:
push   %rbx
call   1040 <inet_addr@plt>
mov    %eax,%edi
call   1070 <ntohl@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1060 <isvalidnetmask@plt>
mov    %eax,%edi
call   1050 <assert@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <netmask2cidr@plt>

LLVM IR (-O0):
define i64 @mkkeylen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @inet_addr(i8* %4)
%6 = call i32 @ntohl(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @isvalidnetmask(i32 %7)
%9 = call i32 @assert(i32 %8)
%10 = load i32, i32* %3
%11 = call i64 @netmask2cidr(i32 %10)
ret i64 %11
}

LLVM IR (-O2):
define i64 @mkkeylen(i8* %0) {
%2 = tail call i32 @inet_addr(i8* %0)
%3 = tail call i32 @ntohl(i32 %2)
%4 = tail call i32 @isvalidnetmask(i32 %3)
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i64 @netmask2cidr(i32 %3)
ret i64 %6
}
int leap(int a) {
  if (a % 4 != 0)
    return 0;
  else {
    if (a % 100 == 0) {
      if (a % 400 == 0)
        return 1;
      else
        return 0;
    } else
      return 1;
  }
}


x86 assembly (clang, -O0):
<leap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     1127 <leap+0x27>
movl   $0x0,-0x4(%rbp)
jmp    116e <leap+0x6e>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1167 <leap+0x67>
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115b <leap+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    116e <leap+0x6e>
movl   $0x0,-0x4(%rbp)
jmp    116e <leap+0x6e>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leap>:
xor    %eax,%eax
test   $0x3,%dil
je     1109 <leap+0x9>
ret
imul   $0xc28f5c29,%edi,%ecx
add    $0x51eb850,%ecx
mov    %ecx,%edx
ror    $0x2,%edx
mov    $0x1,%eax
cmp    $0x28f5c28,%edx
ja     1108 <leap+0x8>
ror    $0x4,%ecx
xor    %eax,%eax
cmp    $0xa3d70b,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @leap(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %19
8: ; preds = %1
%9 = load i32, i32* %3
%10 = srem i32 %9, 100
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load i32, i32* %3
%14 = srem i32 %13, 400
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %2
br label %19
17: ; preds = %12
store i32 0, i32* %2
br label %19
18: ; preds = %8
store i32 1, i32* %2
br label %19
19: ; preds = %18, %17, %16, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @leap(i32 %0) {
%2 = and i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = srem i32 %0, 100
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = srem i32 %0, 400
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %7, %1
%12 = phi i32 [ 0, %1 ], [ %10, %7 ], [ 1, %4 ]
ret i32 %12
}
/* Variables and functions */
void *Cyc_Absyn_compress(void *);
int Cyc_Tcutil_is_function_type(void *t) {
  int *_T0;
  int _T1;
  void *_T2 = Cyc_Absyn_compress(t);
  _T0 = (int *)_T2;
  _T1 = *_T0;
  if (_T1 != 6)
    goto _TL2A;
  return 1;
_TL2A:
  return 0;
  ;
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_is_function_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Cyc_Absyn_compress@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x6,-0x1c(%rbp)
je     1149 <Cyc_Tcutil_is_function_type+0x39>
jmp    1155 <Cyc_Tcutil_is_function_type+0x45>
movl   $0x1,-0x4(%rbp)
jmp    115c <Cyc_Tcutil_is_function_type+0x4c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_is_function_type>:
push   %rax
call   1030 <Cyc_Absyn_compress@plt>
xor    %ecx,%ecx
cmpl   $0x6,(%rax)
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Cyc_Tcutil_is_function_type(i8* %0) {
%2 = tail call i8* @Cyc_Absyn_compress(i8* %0)
%3 = bitcast i8* %2 to i32*
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 6
%6 = zext i1 %5 to i32
ret i32 %6
}
void yy_3_LinkOptionNameValue(char *yytext, int yyleng) {
  ;
  ;
}


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

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

LLVM IR (-O0):
define void @yy_3_LinkOptionNameValue(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_3_LinkOptionNameValue(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
bool is_one_bit(int v) { return (v & (v - 1)) == 0; }


x86 assembly (clang, -O0):
<is_one_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_one_bit>:
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_one_bit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = sub nsw i32 %4, 1
%6 = and i32 %3, %5
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_one_bit(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = icmp ult i32 %2, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ return_struct_vf81();
int /*<<< orphan*/ take_struct_vf81(int /*<<< orphan*/);
void test_struct_vf81() { take_struct_vf81(return_struct_vf81()); }


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

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

LLVM IR (-O0):
define void @test_struct_vf81() {
%1 = call i32 (...) @return_struct_vf81()
%2 = call i32 @take_struct_vf81(i32 %1)
ret void
}

LLVM IR (-O2):
define void @test_struct_vf81() {
%1 = tail call i32 (...) @return_struct_vf81()
%2 = tail call i32 @take_struct_vf81(i32 %1)
ret void
}
void xmpp_initialize(void) {}


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

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

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

LLVM IR (-O2):
define void @xmpp_initialize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void UI_CinematicsMenu_Cache(void) {
  trap_R_RegisterShaderNoMip("menu/art/back_0");
  trap_R_RegisterShaderNoMip("menu/art/back_1");
  trap_R_RegisterShaderNoMip("menu/art/frame2_l");
  trap_R_RegisterShaderNoMip("menu/art/frame1_r");
}


x86 assembly (clang, -O0):
<UI_CinematicsMenu_Cache>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xee9(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xeed(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xef3(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<UI_CinematicsMenu_Cache>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xeec(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xef0(%rip),%rdi
call   1030 <trap_R_RegisterShaderNoMip@plt>
lea    0xef6(%rip),%rdi
pop    %rax
jmp    1030 <trap_R_RegisterShaderNoMip@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"menu/art/back_0\00"
@.str.1 = [16 x i8] c"menu/art/back_1\00"
@.str.2 = [18 x i8] c"menu/art/frame2_l\00"
@.str.3 = [18 x i8] c"menu/art/frame1_r\00"
define void @UI_CinematicsMenu_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"menu/art/back_0\00"
@.str.1 = [16 x i8] c"menu/art/back_1\00"
@.str.2 = [18 x i8] c"menu/art/frame2_l\00"
@.str.3 = [18 x i8] c"menu/art/frame1_r\00"
define void @UI_CinematicsMenu_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hybla_unregister();
void module_unregister_fake(void) {
  if (0)
    hybla_unregister();
}


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

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

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

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