xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ OpenSSL_add_ssl_algorithms();
int /*<<< orphan*/ SSL_load_error_strings();
void init_openssl(void) {
  SSL_load_error_strings();
  OpenSSL_add_ssl_algorithms();
}


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

x86 assembly (clang, -O2):
<init_openssl>:
push   %rax
xor    %eax,%eax
call   1030 <SSL_load_error_strings@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <OpenSSL_add_ssl_algorithms@plt>

LLVM IR (-O0):
define void @init_openssl() {
%1 = call i32 (...) @SSL_load_error_strings()
%2 = call i32 (...) @OpenSSL_add_ssl_algorithms()
ret void
}

LLVM IR (-O2):
define void @init_openssl() {
%1 = tail call i32 (...) @SSL_load_error_strings()
%2 = tail call i32 (...) @OpenSSL_add_ssl_algorithms()
ret void
}
int mdp4_dsi_cmd_off(struct platform_device *pdev) { return 0; }


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

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

LLVM IR (-O0):
%struct.platform_device = type opaque
define i32 @mdp4_dsi_cmd_off(%struct.platform_device* %0) {
%2 = alloca %struct.platform_device*
store %struct.platform_device* %0, %struct.platform_device** %2
ret i32 0
}

LLVM IR (-O2):
%struct.platform_device = type opaque
define i32 @mdp4_dsi_cmd_off(%struct.platform_device* nocapture readnone %0) {
ret i32 0
}
void mipi_csi_iomux_config() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ sqrt(double);
int32_t MLDSpatial_distance(int32_t xc1, int32_t yc1, int32_t xc2,
                            int32_t yc2) {
  int32_t xdiff = xc1 - xc2;
  int32_t ydiff = yc1 - yc2;
  return (int32_t)sqrt((double)(xdiff * xdiff + ydiff * ydiff));
}


x86 assembly (clang, -O0):
<MLDSpatial_distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
call   1030 <sqrt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MLDSpatial_distance>:
sub    %edx,%edi
sub    %ecx,%esi
imul   %edi,%edi
imul   %esi,%esi
add    %edi,%esi
cvtsi2sd %esi,%xmm0
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define i32 @MLDSpatial_distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%11 = load i32, i32* %5
%12 = load i32, i32* %7
%13 = sub nsw i32 %11, %12
store i32 %13, i32* %9
%14 = load i32, i32* %6
%15 = load i32, i32* %8
%16 = sub nsw i32 %14, %15
store i32 %16, i32* %10
%17 = load i32, i32* %9
%18 = load i32, i32* %9
%19 = mul nsw i32 %17, %18
%20 = load i32, i32* %10
%21 = load i32, i32* %10
%22 = mul nsw i32 %20, %21
%23 = add nsw i32 %19, %22
%24 = sitofp i32 %23 to double
%25 = call i32 @sqrt(double %24)
ret i32 %25
}

LLVM IR (-O2):
define i32 @MLDSpatial_distance(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %0, %2
%6 = sub nsw i32 %1, %3
%7 = mul nsw i32 %5, %5
%8 = mul nsw i32 %6, %6
%9 = add nuw nsw i32 %8, %7
%10 = sitofp i32 %9 to double
%11 = tail call i32 @sqrt(double %10)
ret i32 %11
}
int test_imm_47int64_lowword_reg(long long val) {
  return ((val) & (0x47 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_47int64_lowword_reg>:
test   $0x47,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_47int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 71
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ playsound(int, int, int, int, int /*<<< orphan*/);
void touch(void) { playsound(38, 18050, 6000, 1, 0); }


x86 assembly (clang, -O0):
<touch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x26,%edi
mov    $0x4682,%esi
mov    $0x1770,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
call   1030 <playsound@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<touch>:
mov    $0x26,%edi
mov    $0x4682,%esi
mov    $0x1770,%edx
mov    $0x1,%ecx
xor    %r8d,%r8d
jmp    1030 <playsound@plt>

LLVM IR (-O0):
define void @touch() {
%1 = call i32 @playsound(i32 38, i32 18050, i32 6000, i32 1, i32 0)
ret void
}

LLVM IR (-O2):
define void @touch() {
%1 = tail call i32 @playsound(i32 38, i32 18050, i32 6000, i32 1, i32 0)
ret void
}
const char *__malidrv_build_info(void) {
  return "malidrv:  CONFIG=aml-meson-m400-1 USING_OS_MEMORY=1 API_VERSION=14 "
         "REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri "
         "Sep 13 11:43:37 CST 2013 BUILD=DEBUG CPU= USING_UMP=1 "
         "USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 "
         "KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c "
         "OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 "
         "USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=";
}


x86 assembly (clang, -O0):
<__malidrv_build_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__malidrv_build_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [426 x i8] c"malidrv: CONFIG=aml-meson-m400-1 USING_OS_MEMORY=1 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri Sep 13 11:43:37 CST 2013 BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([426 x i8], [426 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [426 x i8] c"malidrv: CONFIG=aml-meson-m400-1 USING_OS_MEMORY=1 API_VERSION=14 REPO_URL= REVISION= CHANGED_REVISION= CHANGE_DATE= BUILD_DATE=Fri Sep 13 11:43:37 CST 2013 BUILD=DEBUG CPU= USING_UMP=1 USING_MALI200=0 USING_MALI400=3 USING_MALI400_L2_CACHE=1 USING_GP2=0 KDIR= MALI_PLATFORM_FILE=platform/meson_platform/mali_platform.c OS_MEMORY_KERNEL_BUFFER_SIZE_IN_MB=6 USING_PROFILING=0 USING_INTERNAL_PROFILING=0 USING_GPU_UTILIZATION=\00"
define i8* @__malidrv_build_info() {
ret i8* getelementptr inbounds ([426 x i8], [426 x i8]* @.str, i64 0, i64 0)
}
int vow(char p) {
  if (p == 'a' || p == 'e' || p == 'i' || p == 'o' || p == 'u')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<vow>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
je     114b <vow+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x65,%eax
je     114b <vow+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x69,%eax
je     114b <vow+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x6f,%eax
je     114b <vow+0x4b>
movsbl -0x5(%rbp),%eax
cmp    $0x75,%eax
jne    1157 <vow+0x57>
movl   $0x1,-0x4(%rbp)
jmp    115e <vow+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vow>:
add    $0x9f,%dil
ror    %dil
xor    %eax,%eax
cmp    $0xa,%dil
ja     111d <vow+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @vow(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 97
br i1 %6, label %23, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 101
br i1 %10, label %23, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 105
br i1 %14, label %23, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 111
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 117
br i1 %22, label %23, label %24
23: ; preds = %19, %15, %11, %7, %1
store i32 1, i32* %2
br label %25
24: ; preds = %19
store i32 0, i32* %2
br label %25
25: ; preds = %24, %23
%26 = load i32, i32* %2
ret i32 %26
}

LLVM IR (-O2):
@switch.table.vow = [11 x i32] [i32 1, i32 0, i32 1, i32 0, i32 1, i32 0, i32 0, i32 1, i32 0, i32 0, i32 1]
define i32 @vow(i8 signext %0) {
%2 = add i8 %0, -97
%3 = tail call i8 @llvm.fshl.i8(i8 %2, i8 %2, i8 7)
%4 = icmp ult i8 %3, 11
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = sext i8 %3 to i64
%7 = getelementptr inbounds [11 x i32], [11 x i32]* @switch.table.vow, i64 0, i64 %6
%8 = load i32, i32* %7
br label %9
9: ; preds = %1, %5
%10 = phi i32 [ %8, %5 ], [ 0, %1 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void write16(volatile void *addr, uint16_t b) {
  *(volatile uint16_t *)addr = b;
}


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

x86 assembly (clang, -O2):
<write16>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @write16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store volatile i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @write16(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store volatile i32 %1, i32* %3
ret void
}
unsigned hash(const char *name) {
  return (((unsigned long)(name) >> 2) & (16 - 1));
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
and    $0xf,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    %rdi,%rax
shr    $0x2,%eax
and    $0xf,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = lshr i64 %4, 2
%6 = and i64 %5, 15
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = lshr i32 %3, 2
%5 = and i32 %4, 15
ret i32 %5
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int8_t max_8(int8_t a, int8_t b) { return a - ((a - b) & ((a - b) >> 7)); }


x86 assembly (clang, -O0):
<max_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%edx
sub    -0x8(%rbp),%edx
sar    $0x7,%edx
and    %edx,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_8>:
mov    %edi,%eax
mov    %edi,%ecx
sub    %esi,%ecx
mov    %ecx,%edx
sar    $0x7,%edx
and    %ecx,%edx
sub    %edx,%eax
ret

LLVM IR (-O0):
define i32 @max_8(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* %3
%7 = load i32, i32* %4
%8 = sub nsw i32 %6, %7
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = ashr i32 %11, 7
%13 = and i32 %8, %12
%14 = sub nsw i32 %5, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @max_8(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
%4 = ashr i32 %3, 7
%5 = and i32 %4, %3
%6 = sub nsw i32 %0, %5
ret i32 %6
}
int XpmLibraryVersion() { return 30400; }


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

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

LLVM IR (-O0):
define i32 @XpmLibraryVersion() {
ret i32 30400
}

LLVM IR (-O2):
define i32 @XpmLibraryVersion() {
ret i32 30400
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void nrerror(char error_text[]) { printf("%s\n", error_text); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @nrerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int str_truncate_chars() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @str_truncate_chars() {
ret i32 0
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int ObReferenceObjectByHandle(int Handle, int DesiredAccess, int ObjectType,
                              int AccessMode, int Object,
                              int HandleInformation) {
  {
    int tmp_ndt_9;
    tmp_ndt_9 = __VERIFIER_nondet_int();
    if (tmp_ndt_9 == 0) {
      goto switch_10_0;
    } else {
      goto switch_10_default;
      if (0) {
      switch_10_0:
        return (0);
      switch_10_default:;
        return (-1073741823);
      } else {
      }
    }
  }
}


x86 assembly (clang, -O0):
<ObReferenceObjectByHandle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jne    1145 <ObReferenceObjectByHandle+0x35>
jmp    114a <ObReferenceObjectByHandle+0x3a>
jmp    1156 <ObReferenceObjectByHandle+0x46>
movl   $0x0,-0x4(%rbp)
jmp    115d <ObReferenceObjectByHandle+0x4d>
movl   $0xc0000001,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ObReferenceObjectByHandle>:
push   %rax
xor    %eax,%eax
call   1030 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0xc0000001,%ecx
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ObReferenceObjectByHandle(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
%15 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %15, i32* %14
%16 = load i32, i32* %14
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %6
br label %22
19: ; preds = %6
br label %23
20: ; No predecessors!
br i1 false, label %21, label %24
21: ; preds = %20
br label %22
22: ; preds = %21, %18
store i32 0, i32* %7
br label %26
23: ; preds = %19
store i32 -1073741823, i32* %7
br label %26
24: ; preds = %20
br label %25
25: ; preds = %24
br label %26
26: ; preds = %22, %23, %25
%27 = load i32, i32* %7
ret i32 %27
}

LLVM IR (-O2):
define i32 @ObReferenceObjectByHandle(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = tail call i32 (...) @__VERIFIER_nondet_int()
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 0, i32 -1073741823
ret i32 %9
}
unsigned int __attribute__((no)) i386_cpuid(void) {
  int fl1, fl2;
  __asm__("pushq %%rcx; pushq %%rbx; cpuid; popq %%rbx; popq %%rcx"
          : "=a"(fl1)
          : "0"(0)
          : "rdx", "cc");
  if (fl1 == 0)
    return (0);
  __asm__("pushq %%rcx; pushq %%rbx; cpuid; popq %%rbx; popq %%rcx"
          : "=d"(fl2), "=a"(fl1)
          : "1"(1)
          : "cc");
  return fl2;
}


x86 assembly (clang, -O0):
<i386_cpuid>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
push   %rcx
push   %rbx
cpuid
pop    %rbx
pop    %rcx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1125 <i386_cpuid+0x25>
movl   $0x0,-0x4(%rbp)
jmp    113c <i386_cpuid+0x3c>
mov    $0x1,%eax
push   %rcx
push   %rbx
cpuid
pop    %rbx
pop    %rcx
mov    %edx,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i386_cpuid>:
xor    %ecx,%ecx
xor    %eax,%eax
push   %rcx
push   %rbx
cpuid
pop    %rbx
pop    %rcx
test   %eax,%eax
je     111b <i386_cpuid+0x1b>
mov    $0x1,%eax
push   %rcx
push   %rbx
cpuid
pop    %rbx
pop    %rcx
mov    %edx,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @i386_cpuid() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 asm "pushq %rcx; pushq %rbx; cpuid; popq %rbx; popq %rcx", "={ax},0,~{rdx},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 0)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 0, i32* %1
br label %13
8: ; preds = %0
%9 = call { i32, i32 } asm "pushq %rcx; pushq %rbx; cpuid; popq %rbx; popq %rcx", "={dx},={ax},1,~{cc},~{dirflag},~{fpsr},~{flags}"(i32 1)
%10 = extractvalue { i32, i32 } %9, 0
%11 = extractvalue { i32, i32 } %9, 1
store i32 %10, i32* %3
store i32 %11, i32* %2
%12 = load i32, i32* %3
store i32 %12, i32* %1
br label %13
13: ; preds = %8, %7
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @i386_cpuid() {
%1 = tail call i32 asm "pushq %rcx; pushq %rbx; cpuid; popq %rbx; popq %rcx", "={ax},0,~{rdx},~{cc},~{dirflag},~{fpsr},~{flags}"(i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call { i32, i32 } asm "pushq %rcx; pushq %rbx; cpuid; popq %rbx; popq %rcx", "={dx},={ax},1,~{cc},~{dirflag},~{fpsr},~{flags}"(i32 1)
%5 = extractvalue { i32, i32 } %4, 0
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ %5, %3 ], [ 0, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ outside(short);
void test1(short n) {
  short i;
  for (i = 0; i < n; i++)
    outside(i);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movw   $0x0,-0x4(%rbp)
movswl -0x4(%rbp),%eax
movswl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jge    114f <test1+0x3f>
movswl -0x4(%rbp),%edi
call   1030 <outside@plt>
mov    -0x4(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x4(%rbp)
jmp    1125 <test1+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
test   %bx,%bx
jle    1132 <test1+0x22>
xor    %ebp,%ebp
nopl   0x0(%rax)
movswl %bp,%ebp
mov    %ebp,%edi
call   1030 <outside@plt>
add    $0x1,%ebp
cmp    %bp,%bx
jne    1120 <test1+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @test1(i16 signext %0) {
%2 = alloca i16
%3 = alloca i16
store i16 %0, i16* %2
store i16 0, i16* %3
br label %4
4: ; preds = %13, %1
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = load i16, i16* %2
%8 = sext i16 %7 to i32
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %16
10: ; preds = %4
%11 = load i16, i16* %3
%12 = call i32 @outside(i16 signext %11)
br label %13
13: ; preds = %10
%14 = load i16, i16* %3
%15 = add i16 %14, 1
store i16 %15, i16* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @test1(i16 signext %0) {
%2 = icmp sgt i16 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i16 [ %6, %3 ], [ 0, %1 ]
%5 = tail call i32 @outside(i16 signext %4)
%6 = add nuw nsw i16 %4, 1
%7 = icmp eq i16 %6, %0
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
int S_ISDIR(int /*<<< orphan*/);
scalar_t__ stat(char const *, struct stat *);
int is_dir(const char *path) {
  struct stat sb;
  if (stat(path, &sb) < 0)
    return -1;
  return S_ISDIR(sb.st_mode);
}


x86 assembly (clang, -O0):
<is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    114f <is_dir+0x2f>
movl   $0xffffffff,-0x4(%rbp)
jmp    115a <is_dir+0x3a>
mov    -0x18(%rbp),%edi
call   1030 <S_ISDIR@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     1138 <is_dir+0x18>
mov    (%rsp),%edi
call   1030 <S_ISDIR@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca %struct.stat
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @stat(i8* %5, %struct.stat* %4)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %13
9: ; preds = %1
%10 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%11 = load i32, i32* %10
%12 = call i32 @S_ISDIR(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %9, %8
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @is_dir(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @S_ISDIR(i32 %8)
br label %10
10: ; preds = %1, %6
%11 = phi i32 [ %9, %6 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ closefrom(int);
int getdtablesize();
void closeallfds(int start) {
  int stop;
  if (0)
    closefrom(start);
  else {
    stop = getdtablesize();
    for (; start < stop; start++)
      close(start);
  }
}


x86 assembly (clang, -O0):
<closeallfds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getdtablesize@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1157 <closeallfds+0x37>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <closeallfds+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeallfds>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <getdtablesize@plt>
cmp    %ebx,%eax
jle    114e <closeallfds+0x2e>
mov    %eax,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%edi
call   1030 <close@plt>
add    $0x1,%ebx
cmp    %ebx,%ebp
jne    1140 <closeallfds+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @closeallfds(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @getdtablesize()
store i32 %4, i32* %3
br label %5
5: ; preds = %12, %1
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = icmp slt i32 %6, %7
br i1 %8, label %9, label %15
9: ; preds = %5
%10 = load i32, i32* %2
%11 = call i32 @close(i32 %10)
br label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %5
15: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @closeallfds(i32 %0) {
%2 = tail call i32 (...) @getdtablesize()
%3 = icmp sgt i32 %2, %0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @close(i32 %5)
%7 = add i32 %5, 1
%8 = icmp eq i32 %7, %2
br i1 %8, label %9, label %4
9: ; preds = %4, %1
ret void
}
/* Variables and functions */
int zoom_in_out(int /*<<< orphan*/);
int zoom_out(void) { return zoom_in_out(0); }


x86 assembly (clang, -O0):
<zoom_out>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <zoom_in_out@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zoom_out>:
xor    %edi,%edi
jmp    1030 <zoom_in_out@plt>

LLVM IR (-O0):
define i32 @zoom_out() {
%1 = call i32 @zoom_in_out(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @zoom_out() {
%1 = tail call i32 @zoom_in_out(i32 0)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint32_t;
typedef int /*<<< orphan*/ tmp;
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ ivory_serialize_pack_prim_8_le(int /*<<< orphan*/ *,
                                                  int /*<<< orphan*/ *);
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ **, int /*<<< orphan*/ const *,
                          int);
void ivory_serialize_pack_int64_le(uint8_t *dst, uint32_t offs,
                                   const int64_t *src) {
  uint8_t tmp[8] = {0};
  memcpy(&tmp, src, sizeof(tmp));
  ivory_serialize_pack_prim_8_le(dst + offs, tmp);
}


x86 assembly (clang, -O0):
<ivory_serialize_pack_int64_le>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x20,%edx
call   1040 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x20,%edx
call   1050 <memcpy@plt>
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdi
lea    -0x40(%rbp),%rsi
call   1030 <ivory_serialize_pack_prim_8_le@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivory_serialize_pack_int64_le>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rdx,%rsi
mov    $0x20,%edx
call   1040 <memcpy@plt>
movslq %ebx,%rax
lea    (%r14,%rax,4),%rdi
mov    %r15,%rsi
call   1030 <ivory_serialize_pack_prim_8_le@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @ivory_serialize_pack_int64_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [8 x i32]
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = bitcast [8 x i32]* %7 to i8*
%9 = bitcast [8 x i32]* %7 to i32**
%10 = load i32*, i32** %6
%11 = call i32 @memcpy(i32** %9, i32* %10, i32 32)
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%17 = call i32 @ivory_serialize_pack_prim_8_le(i32* %15, i32* %16)
ret void
}

LLVM IR (-O2):
define void @ivory_serialize_pack_int64_le(i32* %0, i32 %1, i32* %2) {
%4 = alloca [8 x i32]
%5 = bitcast [8 x i32]* %4 to i8*
%6 = bitcast [8 x i32]* %4 to i32**
%7 = call i32 @memcpy(i32** %6, i32* %2, i32 32)
%8 = sext i32 %1 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%11 = call i32 @ivory_serialize_pack_prim_8_le(i32* %9, i32* %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long *);
scalar_t__ read_value_at_address(unsigned long, unsigned long *, unsigned int);
unsigned long k_read(unsigned long *addr, unsigned size) {
  unsigned long val;
  if (read_value_at_address((unsigned long)addr, &val, size) < 0) {
    printf("read kernel value @ %p error!\n", addr);
    return 0;
  }
  return val;
}


x86 assembly (clang, -O0):
<k_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    -0x20(%rbp),%rsi
call   1040 <read_value_at_address@plt>
cmp    $0x0,%rax
jge    1166 <k_read+0x46>
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
movq   $0x0,-0x8(%rbp)
jmp    116e <k_read+0x4e>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<k_read>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <read_value_at_address@plt>
test   %rax,%rax
js     1140 <k_read+0x20>
mov    0x8(%rsp),%rax
jmp    1151 <k_read+0x31>
lea    0xeb9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"read kernel value @ %p error!\0A\00"
define i64 @k_read(i64* %0, i32 %1) {
%3 = alloca i64
%4 = alloca i64*
%5 = alloca i32
%6 = alloca i64
store i64* %0, i64** %4
store i32 %1, i32* %5
%7 = load i64*, i64** %4
%8 = ptrtoint i64* %7 to i64
%9 = load i32, i32* %5
%10 = call i64 @read_value_at_address(i64 %8, i64* %6, i32 %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i64*, i64** %4
%14 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64* %13)
store i64 0, i64* %3
br label %17
15: ; preds = %2
%16 = load i64, i64* %6
store i64 %16, i64* %3
br label %17
17: ; preds = %15, %12
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
@.str = [31 x i8] c"read kernel value @ %p error!\0A\00"
define i64 @k_read(i64* %0, i32 %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = ptrtoint i64* %0 to i64
%6 = call i64 @read_value_at_address(i64 %5, i64* %3, i32 %1)
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i64* %0)
br label %12
10: ; preds = %2
%11 = load i64, i64* %3
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ 0, %8 ], [ %11, %10 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ string_combination(char *, int, int /*<<< orphan*/);
int strlen(char *);
void main() {
  char s[] = "abc";
  int len = strlen(s);
  string_combination(s, len, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x8(%rbp)
lea    -0x4(%rbp),%rdi
mov    -0x8(%rbp),%esi
xor    %edx,%edx
call   1030 <string_combination@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x636261,0xc(%rsp)
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
xor    %edx,%edx
call   1030 <string_combination@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.s = [4 x i8] c"abc\00"
define void @main() {
%1 = alloca [4 x i8]
%2 = alloca i32
%3 = bitcast [4 x i8]* %1 to i8*
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
store i32 %5, i32* %2
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @string_combination(i8* %6, i32 %7, i32 0)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 6513249, i32* %1
%3 = call i32 @strlen(i8* %2)
%4 = call i32 @string_combination(i8* %2, i32 %3, i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glTexCoord3fv(int /*<<< orphan*/ *);
void TexCoord3fv(GLfloat v[3]) { glTexCoord3fv(v); }


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

x86 assembly (clang, -O2):
<TexCoord3fv>:
jmp    1030 <glTexCoord3fv@plt>

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

LLVM IR (-O2):
define void @TexCoord3fv(i32* %0) {
%2 = tail call i32 @glTexCoord3fv(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;
typedef int mpfr_rnd_t;

/* Variables and functions */
int /*<<< orphan*/ mpfr_yn(int /*<<< orphan*/, long, int /*<<< orphan*/, int);
void mpfrbesselyn(mpfr_t r2, int *iexp, mpfr_t r1, mpfr_rnd_t *irnd) {
  long int n1;
  int n2;
  n1 = *iexp;
  n2 = *irnd;
  mpfr_yn(r2, n1, r1, n2);
}


x86 assembly (clang, -O0):
<mpfrbesselyn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movslq (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x28(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x2c(%rbp),%ecx
call   1030 <mpfr_yn@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpfrbesselyn>:
movslq (%rsi),%rsi
mov    (%rcx),%ecx
jmp    1030 <mpfr_yn@plt>

LLVM IR (-O0):
define void @mpfrbesselyn(i32 %0, i32* %1, i32 %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i64
%10 = alloca i32
store i32 %0, i32* %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = sext i32 %12 to i64
store i64 %13, i64* %9
%14 = load i32*, i32** %8
%15 = load i32, i32* %14
store i32 %15, i32* %10
%16 = load i32, i32* %5
%17 = load i64, i64* %9
%18 = load i32, i32* %7
%19 = load i32, i32* %10
%20 = call i32 @mpfr_yn(i32 %16, i64 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
define void @mpfrbesselyn(i32 %0, i32* nocapture %1, i32 %2, i32* nocapture %3) {
%5 = load i32, i32* %1
%6 = sext i32 %5 to i64
%7 = load i32, i32* %3
%8 = tail call i32 @mpfr_yn(i32 %0, i64 %6, i32 %2, i32 %7)
ret void
}
/* Variables and functions */
int sscanf(char *, char *, unsigned long long *);
char *strrchr(char *, char);
int contains_address(char *string) {
  unsigned long long result;
  string = strrchr(string, ',');
  if (string != NULL) {
    if (sscanf(string + 1, "%llx", &result) == 1) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<contains_address>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2c,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     117b <contains_address+0x5b>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
lea    0xea8(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <sscanf@plt>
cmp    $0x1,%eax
jne    1176 <contains_address+0x56>
movl   $0x1,-0x4(%rbp)
jmp    1182 <contains_address+0x62>
jmp    117b <contains_address+0x5b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<contains_address>:
push   %rax
mov    $0x2c,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1152 <contains_address+0x32>
add    $0x1,%rax
lea    0xec5(%rip),%rsi
mov    %rsp,%rdx
mov    %rax,%rdi
call   1040 <sscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     1154 <contains_address+0x34>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%llx\00"
define i32 @contains_address(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 44)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = call i32 @sscanf(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %4)
%13 = icmp eq i32 %12, 1
br i1 %13, label %14, label %15
14: ; preds = %9
store i32 1, i32* %2
br label %17
15: ; preds = %9
br label %16
16: ; preds = %15, %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %14
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [5 x i8] c"%llx\00"
define i32 @contains_address(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 44)
%5 = icmp eq i8* %4, null
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %4, i64 1
%8 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %2)
%9 = icmp eq i32 %8, 1
br i1 %9, label %11, label %10
10: ; preds = %6, %1
br label %11
11: ; preds = %6, %10
%12 = phi i32 [ 0, %10 ], [ 1, %6 ]
ret i32 %12
}
struct internal_ibv_ah *ibv_ah_to_internal(struct ibv_ah *ah) {
  return (struct internal_ibv_ah *)ah;
}


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

x86 assembly (clang, -O2):
<ibv_ah_to_internal>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.internal_ibv_ah = type opaque
%struct.ibv_ah = type opaque
define %struct.internal_ibv_ah* @ibv_ah_to_internal(%struct.ibv_ah* %0) {
%2 = alloca %struct.ibv_ah*
store %struct.ibv_ah* %0, %struct.ibv_ah** %2
%3 = load %struct.ibv_ah*, %struct.ibv_ah** %2
%4 = bitcast %struct.ibv_ah* %3 to %struct.internal_ibv_ah*
ret %struct.internal_ibv_ah* %4
}

LLVM IR (-O2):
%struct.internal_ibv_ah = type opaque
%struct.ibv_ah = type opaque
define %struct.internal_ibv_ah* @ibv_ah_to_internal(%struct.ibv_ah* readnone %0) {
%2 = bitcast %struct.ibv_ah* %0 to %struct.internal_ibv_ah*
ret %struct.internal_ibv_ah* %2
}
int ft_basetoi_indexof(const char *s, const char *keys) {
  int pos;
  pos = 0;
  while (keys[pos]) {
    if (keys[pos] == *s)
      return pos;
    pos++;
  }
  return -1;
}


x86 assembly (clang, -O0):
<ft_basetoi_indexof>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1159 <ft_basetoi_indexof+0x59>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    114b <ft_basetoi_indexof+0x4b>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1160 <ft_basetoi_indexof+0x60>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <ft_basetoi_indexof+0x13>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_basetoi_indexof>:
mov    (%rsi),%dl
mov    $0xffffffff,%eax
test   %dl,%dl
je     1122 <ft_basetoi_indexof+0x22>
mov    (%rdi),%dil
xor    %ecx,%ecx
cmp    %dil,%dl
je     1123 <ft_basetoi_indexof+0x23>
movzbl 0x1(%rsi,%rcx,1),%edx
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <ft_basetoi_indexof+0x10>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ft_basetoi_indexof(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %6
br label %7
7: ; preds = %27, %2
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
br i1 %13, label %14, label %30
14: ; preds = %7
%15 = load i8*, i8** %5
%16 = load i32, i32* %6
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = load i8*, i8** %4
%22 = load i8, i8* %21
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %20, %23
br i1 %24, label %25, label %27
25: ; preds = %14
%26 = load i32, i32* %6
store i32 %26, i32* %3
br label %31
27: ; preds = %14
%28 = load i32, i32* %6
%29 = add nsw i32 %28, 1
store i32 %29, i32* %6
br label %7
30: ; preds = %7
store i32 -1, i32* %3
br label %31
31: ; preds = %30, %25
%32 = load i32, i32* %3
ret i32 %32
}

LLVM IR (-O2):
define i32 @ft_basetoi_indexof(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %18, label %5
5: ; preds = %2
%6 = load i8, i8* %0
br label %7
7: ; preds = %5, %11
%8 = phi i64 [ 0, %5 ], [ %12, %11 ]
%9 = phi i8 [ %3, %5 ], [ %14, %11 ]
%10 = icmp eq i8 %9, %6
br i1 %10, label %16, label %11
11: ; preds = %7
%12 = add nuw i64 %8, 1
%13 = getelementptr inbounds i8, i8* %1, i64 %12
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %18, label %7
16: ; preds = %7
%17 = trunc i64 %8 to i32
br label %18
18: ; preds = %11, %16, %2
%19 = phi i32 [ -1, %2 ], [ %17, %16 ], [ -1, %11 ]
ret i32 %19
}
/* Variables and functions */
double td3(int a) { return a; }


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

x86 assembly (clang, -O2):
<td3>:
cvtsi2sd %edi,%xmm0
ret

LLVM IR (-O0):
define double @td3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
ret double %4
}

LLVM IR (-O2):
define double @td3(i32 %0) {
%2 = sitofp i32 %0 to double
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ input();
int /*<<< orphan*/ printf(char *, int (*)());
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep(int);
int main() {
  printf("main() code starts at %p\n", main);
  input();
  while (1) {
    puts("Hello");
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
mov    0x2e8b(%rip),%rsi
call   1050 <printf@plt>
mov    $0x0,%al
call   1030 <input@plt>
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1169 <main+0x29>

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeb8(%rip),%rdi
mov    0x2e99(%rip),%rsi
call   1050 <printf@plt>
xor    %eax,%eax
call   1030 <input@plt>
lea    0xeb8(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    1170 <main+0x30>

LLVM IR (-O0):
@.str = [26 x i8] c"main() code starts at %p\0A\00"
@.str.1 = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 (...)* bitcast (i32 ()* @main to i32 (...)*))
%3 = call i32 (...) @input()
br label %4
4: ; preds = %0, %4
%5 = call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @sleep(i32 1)
br label %4
}

LLVM IR (-O2):
@.str = [26 x i8] c"main() code starts at %p\0A\00"
@.str.1 = [6 x i8] c"Hello\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 (...)* bitcast (i32 ()* @main to i32 (...)*))
%2 = tail call i32 (...) @input()
br label %3
3: ; preds = %0, %3
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @sleep(i32 1)
br label %3
}
double dot_product(double u[], double v[]) {
  double sum = 0;
  for (int i = 0; i < 3; i++)
    sum += u[i] * v[i];
  return sum;
}


x86 assembly (clang, -O0):
<dot_product>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    115f <dot_product+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111b <dot_product+0x1b>
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot_product>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  (%rsi),%xmm0
xorpd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
mulsd  0x8(%rsi),%xmm1
addsd  %xmm2,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot_product(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca i32
store double* %0, double** %3
store double* %1, double** %4
store double 0.000000e+00, double* %5
store i32 0, i32* %6
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load double*, double** %3
%12 = load i32, i32* %6
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double, double* %11, i64 %13
%15 = load double, double* %14
%16 = load double*, double** %4
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds double, double* %16, i64 %18
%20 = load double, double* %19
%21 = load double, double* %5
%22 = call double @llvm.fmuladd.f64(double %15, double %20, double %21)
store double %22, double* %5
br label %23
23: ; preds = %10
%24 = load i32, i32* %6
%25 = add nsw i32 %24, 1
store i32 %25, i32* %6
br label %7
26: ; preds = %7
%27 = load double, double* %5
ret double %27
}

LLVM IR (-O2):
define double @dot_product(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double 0.000000e+00)
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = tail call double @llvm.fmuladd.f64(double %7, double %9, double %5)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ keydown(char *);
int /*<<< orphan*/ keyup(char *);
void keytoggle(char *k) {
  keydown(k);
  keyup(k);
}


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

x86 assembly (clang, -O2):
<keytoggle>:
push   %rbx
mov    %rdi,%rbx
call   1030 <keydown@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <keyup@plt>

LLVM IR (-O0):
define void @keytoggle(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @keydown(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @keyup(i8* %5)
ret void
}

LLVM IR (-O2):
define void @keytoggle(i8* %0) {
%2 = tail call i32 @keydown(i8* %0)
%3 = tail call i32 @keyup(i8* %0)
ret void
}
/* Variables and functions */
char *nvram_get(char const *);
int /*<<< orphan*/ printf(char *, char const *);
int do_get(const char *var) {
  const char *val;
  int stat = 1;
  if ((val = nvram_get(var)) != NULL) {
    printf("%s\n", val);
    stat = 0;
  }
  return stat;
}


x86 assembly (clang, -O0):
<do_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <nvram_get@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1161 <do_get+0x41>
mov    -0x10(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_get>:
push   %rax
call   1040 <nvram_get@plt>
test   %rax,%rax
je     113e <do_get+0x1e>
lea    0xece(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @do_get(i8* %0) {
%2 = tail call i8* @nvram_get(i8* %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %6
6: ; preds = %4, %1
%7 = phi i32 [ 0, %4 ], [ 1, %1 ]
ret i32 %7
}