#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 */
unsigned int atoi(char *);
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int, unsigned int);
int main(int argc, char *argv[]) {
  unsigned int status;
  unsigned int queued;
  unsigned int next;
  unsigned int prior;
  status = atoi(argv[1]);
  queued = ((status >> 31) & 0x00000001);
  next = ((status >> 23) & 0x000000FF);
  prior = ((status >> 16) & 0x0000007F);
  printf("\tSched - (QUE=0x%2.2x) (NXT=0x%2.2x) (PRI=0x%2.2x)\n", queued, next,
         prior);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x1f,%eax
and    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x17,%eax
and    $0xff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
shr    $0x10,%eax
and    $0x7f,%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%esi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%esi
shr    $0x1f,%esi
mov    %eax,%ecx
shr    $0x17,%ecx
movzbl %cl,%edx
shr    $0x10,%eax
and    $0x7f,%eax
lea    0xebc(%rip),%rdi
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"\09Sched - (QUE=0x%2.2x) (NXT=0x%2.2x) (PRI=0x%2.2x)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = load i8**, i8*** %4
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
store i32 %12, i32* %5
%13 = load i32, i32* %5
%14 = lshr i32 %13, 31
%15 = and i32 %14, 1
store i32 %15, i32* %6
%16 = load i32, i32* %5
%17 = lshr i32 %16, 23
%18 = and i32 %17, 255
store i32 %18, i32* %7
%19 = load i32, i32* %5
%20 = lshr i32 %19, 16
%21 = and i32 %20, 127
store i32 %21, i32* %8
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [52 x i8] c"\09Sched - (QUE=0x%2.2x) (NXT=0x%2.2x) (PRI=0x%2.2x)\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = lshr i32 %5, 31
%7 = lshr i32 %5, 23
%8 = and i32 %7, 255
%9 = lshr i32 %5, 16
%10 = and i32 %9, 127
%11 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8, i32 %10)
ret i32 0
}