#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 instantiateClassInSpace(int, int, int, int /*<<< orphan*/);
int primitiveBehavior_BasicNew_Bytes_(int receiver, int *arguments) {
  return (instantiateClassInSpace(
      receiver,
      ((arguments[0] & 0x80000000) ? (((-1 << 31) | arguments[0]) >> 1)
                                   : (arguments[0] >> 1)),
      ((arguments[1] & 0x80000000) ? (((-1 << 31) | arguments[1]) >> 1)
                                   : (arguments[1] >> 1)),
      0));
}


x86 assembly (clang, -O0):
<primitiveBehavior_BasicNew_Bytes_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     114f <primitiveBehavior_BasicNew_Bytes_+0x3f>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
or     $0x80000000,%eax
sar    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    115b <primitiveBehavior_BasicNew_Bytes_+0x4b>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
sar    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
and    $0x80000000,%eax
cmp    $0x0,%eax
je     118d <primitiveBehavior_BasicNew_Bytes_+0x7d>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
or     $0x80000000,%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    119a <primitiveBehavior_BasicNew_Bytes_+0x8a>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x14(%rbp),%edi
mov    -0x20(%rbp),%edx
xor    %ecx,%ecx
call   1030 <instantiateClassInSpace@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitiveBehavior_BasicNew_Bytes_>:
mov    (%rsi),%eax
mov    0x4(%rsi),%edx
sar    %edx
sar    %eax
mov    %eax,%esi
xor    %ecx,%ecx
jmp    1030 <instantiateClassInSpace@plt>

LLVM IR (-O0):
define i32 @primitiveBehavior_BasicNew_Bytes_(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 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = and i32 %8, -2147483648
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 0
%14 = load i32, i32* %13
%15 = or i32 -2147483648, %14
%16 = ashr i32 %15, 1
br label %22
17: ; preds = %2
%18 = load i32*, i32** %4
%19 = getelementptr inbounds i32, i32* %18, i64 0
%20 = load i32, i32* %19
%21 = ashr i32 %20, 1
br label %22
22: ; preds = %17, %11
%23 = phi i32 [ %16, %11 ], [ %21, %17 ]
%24 = load i32*, i32** %4
%25 = getelementptr inbounds i32, i32* %24, i64 1
%26 = load i32, i32* %25
%27 = and i32 %26, -2147483648
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %35
29: ; preds = %22
%30 = load i32*, i32** %4
%31 = getelementptr inbounds i32, i32* %30, i64 1
%32 = load i32, i32* %31
%33 = or i32 -2147483648, %32
%34 = ashr i32 %33, 1
br label %40
35: ; preds = %22
%36 = load i32*, i32** %4
%37 = getelementptr inbounds i32, i32* %36, i64 1
%38 = load i32, i32* %37
%39 = ashr i32 %38, 1
br label %40
40: ; preds = %35, %29
%41 = phi i32 [ %34, %29 ], [ %39, %35 ]
%42 = call i32 @instantiateClassInSpace(i32 %5, i32 %23, i32 %41, i32 0)
ret i32 %42
}

LLVM IR (-O2):
define i32 @primitiveBehavior_BasicNew_Bytes_(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = getelementptr inbounds i32, i32* %1, i64 1
%5 = load i32, i32* %4
%6 = ashr i32 %5, 1
%7 = ashr i32 %3, 1
%8 = tail call i32 @instantiateClassInSpace(i32 %0, i32 %7, i32 %6, i32 0)
ret i32 %8
}