#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*/ myprint(int *, int);
int /*<<< orphan*/ sort(int *, int);
int main() {
  int DATA[12];
  int *ptr = DATA;
  unsigned int i, m_w, m_z;
  m_w = 17;
  m_z = 31;
  for (i = 0; i < 12; i++, ptr++) {
    m_z = 36969 * (m_z & 65535) + (m_z >> 16);
    m_w = 18000 * (m_w & 65535) + (m_w >> 16);
    *ptr = (m_z << 16) + m_w;
  }
  sort(DATA, 12);
  myprint(DATA, 12);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
movl   $0x11,-0x50(%rbp)
movl   $0x1f,-0x54(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0xc,-0x4c(%rbp)
jae    11b1 <main+0x91>
mov    -0x54(%rbp),%eax
and    $0xffff,%eax
imul   $0x9069,%eax,%eax
mov    -0x54(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x54(%rbp)
mov    -0x50(%rbp),%eax
and    $0xffff,%eax
imul   $0x4650,%eax,%eax
mov    -0x50(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    -0x54(%rbp),%ecx
shl    $0x10,%ecx
add    -0x50(%rbp),%ecx
mov    -0x48(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x48(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x48(%rbp)
jmp    114c <main+0x2c>
lea    -0x40(%rbp),%rdi
mov    $0xc,%esi
call   1040 <sort@plt>
lea    -0x40(%rbp),%rdi
mov    $0xc,%esi
call   1030 <myprint@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xedd(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc,%esi
call   1040 <sort@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <myprint@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [12 x i32]
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
store i32* %7, i32** %3
store i32 17, i32* %5
store i32 31, i32* %6
store i32 0, i32* %4
br label %8
8: ; preds = %29, %0
%9 = load i32, i32* %4
%10 = icmp ult i32 %9, 12
br i1 %10, label %11, label %34
11: ; preds = %8
%12 = load i32, i32* %6
%13 = and i32 %12, 65535
%14 = mul i32 36969, %13
%15 = load i32, i32* %6
%16 = lshr i32 %15, 16
%17 = add i32 %14, %16
store i32 %17, i32* %6
%18 = load i32, i32* %5
%19 = and i32 %18, 65535
%20 = mul i32 18000, %19
%21 = load i32, i32* %5
%22 = lshr i32 %21, 16
%23 = add i32 %20, %22
store i32 %23, i32* %5
%24 = load i32, i32* %6
%25 = shl i32 %24, 16
%26 = load i32, i32* %5
%27 = add i32 %25, %26
%28 = load i32*, i32** %3
store i32 %27, i32* %28
br label %29
29: ; preds = %11
%30 = load i32, i32* %4
%31 = add i32 %30, 1
store i32 %31, i32* %4
%32 = load i32*, i32** %3
%33 = getelementptr inbounds i32, i32* %32, i32 1
store i32* %33, i32** %3
br label %8
34: ; preds = %8
%35 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%36 = call i32 @sort(i32* %35, i32 12)
%37 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%38 = call i32 @myprint(i32* %37, i32 12)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [12 x i32]
%2 = bitcast [12 x i32]* %1 to i8*
%3 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 0
%4 = bitcast [12 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 2092673872, i32 1177381124, i32 -548267955, i32 2009187048>, <4 x i32>* %4
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 4
%6 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> <i32 -723951828, i32 1109850952, i32 -1205972829, i32 39979508>, <4 x i32>* %6
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %1, i64 0, i64 8
%8 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> <i32 -398136730, i32 -86759781, i32 -1254051119, i32 -127921686>, <4 x i32>* %8
%9 = call i32 @sort(i32* %3, i32 12)
%10 = call i32 @myprint(i32* %3, i32 12)
ret i32 0
}