#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 */
typedef int u_char;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dump_other_cond(u_char *p, int len) {
  if (p[0] && len > 0) {
    printf("\t");
    if (p[0] & 1)
      printf("(MWAIT)");
    if (p[0] & 2)
      printf(" (3V card)");
    if (p[0] & 0x80)
      printf(" (Extension bytes follow)");
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<dump_other_cond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
je     11aa <dump_other_cond+0x9a>
cmpl   $0x0,-0xc(%rbp)
jle    11aa <dump_other_cond+0x9a>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1160 <dump_other_cond+0x50>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     117e <dump_other_cond+0x6e>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
and    $0x80,%eax
cmp    $0x0,%eax
je     119e <dump_other_cond+0x8e>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_other_cond>:
push   %rbx
test   %esi,%esi
jle    115c <dump_other_cond+0x3c>
mov    %rdi,%rbx
cmpl   $0x0,(%rdi)
je     115c <dump_other_cond+0x3c>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    (%rbx),%eax
test   $0x1,%al
jne    115e <dump_other_cond+0x3e>
test   $0x2,%al
jne    1170 <dump_other_cond+0x50>
test   $0x80,%al
je     1151 <dump_other_cond+0x31>
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>
pop    %rbx
ret
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
mov    (%rbx),%eax
test   $0x2,%al
je     1141 <dump_other_cond+0x21>
lea    0xe91(%rip),%rdi
call   1040 <printf@plt>
mov    (%rbx),%eax
test   $0x80,%al
jne    1145 <dump_other_cond+0x25>
jmp    1151 <dump_other_cond+0x31>

LLVM IR (-O0):
@.str = [2 x i8] c"\09\00"
@.str.1 = [8 x i8] c"(MWAIT)\00"
@.str.2 = [11 x i8] c" (3V card)\00"
@.str.3 = [26 x i8] c" (Extension bytes follow)\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @dump_other_cond(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %39
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %39
12: ; preds = %9
%13 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = load i32*, i32** %3
%15 = getelementptr inbounds i32, i32* %14, i64 0
%16 = load i32, i32* %15
%17 = and i32 %16, 1
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %12
%20 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %12
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 0
%24 = load i32, i32* %23
%25 = and i32 %24, 2
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %21
%28 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %27, %21
%30 = load i32*, i32** %3
%31 = getelementptr inbounds i32, i32* %30, i64 0
%32 = load i32, i32* %31
%33 = and i32 %32, 128
%34 = icmp ne i32 %33, 0
br i1 %34, label %35, label %37
35: ; preds = %29
%36 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %35, %29
%38 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %39
39: ; preds = %37, %9, %2
ret void
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"(MWAIT)\00"
@.str.2 = [11 x i8] c" (3V card)\00"
@.str.3 = [26 x i8] c" (Extension bytes follow)\00"
define void @dump_other_cond(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp ne i32 %3, 0
%5 = icmp sgt i32 %1, 0
%6 = and i1 %5, %4
br i1 %6, label %7, label %30
7: ; preds = %2
%8 = tail call i32 @putchar(i32 9)
%9 = load i32, i32* %0
%10 = and i32 %9, 1
%11 = icmp eq i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* %0
br label %15
15: ; preds = %12, %7
%16 = phi i32 [ %14, %12 ], [ %9, %7 ]
%17 = and i32 %16, 2
%18 = icmp eq i32 %17, 0
br i1 %18, label %22, label %19
19: ; preds = %15
%20 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%21 = load i32, i32* %0
br label %22
22: ; preds = %19, %15
%23 = phi i32 [ %21, %19 ], [ %16, %15 ]
%24 = and i32 %23, 128
%25 = icmp eq i32 %24, 0
br i1 %25, label %28, label %26
26: ; preds = %22
%27 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %22
%29 = tail call i32 @putchar(i32 10)
br label %30
30: ; preds = %28, %2
ret void
}