#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ raid_cpu_info(char *, unsigned int *, unsigned int *);
scalar_t__ raid_cpu_is_atom(unsigned int, unsigned int);
scalar_t__ strcmp(char *, char *);
int raid_cpu_has_slowmult(void) {
  char vendor[13];
  unsigned family;
  unsigned model;
  raid_cpu_info(vendor, &family, &model);
  if (strcmp(vendor, "GenuineIntel") == 0) {
    if (raid_cpu_is_atom(family, model))
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<raid_cpu_has_slowmult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x11(%rbp),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1030 <raid_cpu_info@plt>
lea    -0x11(%rbp),%rdi
lea    0xeac(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    1189 <raid_cpu_has_slowmult+0x59>
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1050 <raid_cpu_is_atom@plt>
cmp    $0x0,%rax
je     1184 <raid_cpu_has_slowmult+0x54>
movl   $0x1,-0x4(%rbp)
jmp    1190 <raid_cpu_has_slowmult+0x60>
jmp    1189 <raid_cpu_has_slowmult+0x59>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<raid_cpu_has_slowmult>:
push   %rbx
sub    $0x20,%rsp
lea    0x13(%rsp),%rbx
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
call   1030 <raid_cpu_info@plt>
lea    0xead(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
jne    117a <raid_cpu_has_slowmult+0x4a>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
call   1050 <raid_cpu_is_atom@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    117c <raid_cpu_has_slowmult+0x4c>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"GenuineIntel\00"
define i32 @raid_cpu_has_slowmult() {
%1 = alloca [13 x i8]
%2 = alloca i32
%3 = alloca i32
%4 = getelementptr inbounds [13 x i8], [13 x i8]* %1, i64 0, i64 0
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @raid_cpu_info(i8* %4, i32* %2, i32* %3)
%8 = call i64 @strcmp(i8* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = call i64 @raid_cpu_is_atom(i32 %11, i32 %12)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10, %0
br label %16
16: ; preds = %10, %15
%17 = phi i32 [ 0, %15 ], [ 1, %10 ]
ret i32 %17
}