#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 scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, scalar_t__);
void print_mk_devseq(uint32_t devseq, uint32_t alternate) {
  if (0 == alternate) {
    printf(" BF1SEQ = 0x%08X\n", devseq);
  } else {
    printf(" BF2SEQ = 0x%08X\n", devseq);
  }
  printf(
      "            %04x         CSEQ: Boot flash complement Sequence number\n",
      (devseq & 0xFFFF0000) >> 16);
  printf("                %04x     TSEQ: Boot flash true Sequence number\n",
         (devseq & 0xFFFF));
}


x86 assembly (clang, -O0):
<print_mk_devseq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    1141 <print_mk_devseq+0x31>
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
jmp    1151 <print_mk_devseq+0x41>
mov    -0x8(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
movabs $0xffff0000,%rsi
and    -0x8(%rbp),%rsi
sar    $0x10,%rsi
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
and    $0xffff,%rsi
lea    0xee9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_mk_devseq>:
push   %rbx
mov    %rdi,%rbx
test   %rsi,%rsi
lea    0xee2(%rip),%rax
lea    0xeed(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %ebx,%esi
shr    $0x10,%esi
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
movzwl %bx,%esi
lea    0xf1e(%rip),%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [18 x i8] c" BF1SEQ = 0x%08X\0A\00"
@.str.1 = [18 x i8] c" BF2SEQ = 0x%08X\0A\00"
@.str.2 = [70 x i8] c" %04x CSEQ: Boot flash complement Sequence number\0A\00"
@.str.3 = [64 x i8] c" %04x TSEQ: Boot flash true Sequence number\0A\00"
define void @print_mk_devseq(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 0, %5
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i64, i64* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i64 %8)
br label %13
10: ; preds = %2
%11 = load i64, i64* %3
%12 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %10, %7
%14 = load i64, i64* %3
%15 = and i64 %14, 4294901760
%16 = ashr i64 %15, 16
%17 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0), i64 %16)
%18 = load i64, i64* %3
%19 = and i64 %18, 65535
%20 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i64 %19)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c" BF1SEQ = 0x%08X\0A\00"
@.str.1 = [18 x i8] c" BF2SEQ = 0x%08X\0A\00"
@.str.2 = [70 x i8] c" %04x CSEQ: Boot flash complement Sequence number\0A\00"
@.str.3 = [64 x i8] c" %04x TSEQ: Boot flash true Sequence number\0A\00"
define void @print_mk_devseq(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @printf(i8* %4, i64 %0)
%6 = lshr i64 %0, 16
%7 = and i64 %6, 65535
%8 = tail call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.2, i64 0, i64 0), i64 %7)
%9 = and i64 %0, 65535
%10 = tail call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i64 %9)
ret void
}