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

/* Variables and functions */
int /*<<< orphan*/ emit3(int, int, int);
void emit_call(uint32_t addr) {
  emit3((0xb4), ((addr & 0xff000000) >> 24), 0x90);
  emit3((0xb0), ((addr & 0x00ff0000) >> 16), 0x90);
  emit3(0xc1, 0xe0, 0x10);
  emit3((0xb4), ((addr & 0x0000ff00) >> 8), 0x90);
  emit3((0xb0), ((addr & 0x000000ff)), 0x90);
  emit3((0x48), (0x98), 0x90);
  emit3((0xff), (0xd0), 0x90);
}


x86 assembly (clang, -O0):
<emit_call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
and    $0xff000000,%esi
shr    $0x18,%esi
mov    $0xb4,%edi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    -0x4(%rbp),%esi
and    $0xff0000,%esi
sar    $0x10,%esi
mov    $0xb0,%edi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    $0xc1,%edi
mov    $0xe0,%esi
mov    $0x10,%edx
call   1030 <emit3@plt>
mov    -0x4(%rbp),%esi
and    $0xff00,%esi
sar    $0x8,%esi
mov    $0xb4,%edi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    -0x4(%rbp),%esi
and    $0xff,%esi
mov    $0xb0,%edi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    $0x48,%edi
mov    $0x98,%esi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    $0xff,%edi
mov    $0xd0,%esi
mov    $0x90,%edx
call   1030 <emit3@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_call>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x18,%eax
mov    $0xb4,%edi
mov    %eax,%esi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%esi
mov    $0xb0,%edi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    $0xc1,%edi
mov    $0xe0,%esi
mov    $0x10,%edx
call   1030 <emit3@plt>
movzbl %bh,%esi
mov    $0xb4,%edi
mov    $0x90,%edx
call   1030 <emit3@plt>
movzbl %bl,%esi
mov    $0xb0,%edi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    $0x48,%edi
mov    $0x98,%esi
mov    $0x90,%edx
call   1030 <emit3@plt>
mov    $0xff,%edi
mov    $0xd0,%esi
mov    $0x90,%edx
pop    %rbx
jmp    1030 <emit3@plt>

LLVM IR (-O0):
define void @emit_call(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -16777216
%5 = lshr i32 %4, 24
%6 = call i32 @emit3(i32 180, i32 %5, i32 144)
%7 = load i32, i32* %2
%8 = and i32 %7, 16711680
%9 = ashr i32 %8, 16
%10 = call i32 @emit3(i32 176, i32 %9, i32 144)
%11 = call i32 @emit3(i32 193, i32 224, i32 16)
%12 = load i32, i32* %2
%13 = and i32 %12, 65280
%14 = ashr i32 %13, 8
%15 = call i32 @emit3(i32 180, i32 %14, i32 144)
%16 = load i32, i32* %2
%17 = and i32 %16, 255
%18 = call i32 @emit3(i32 176, i32 %17, i32 144)
%19 = call i32 @emit3(i32 72, i32 152, i32 144)
%20 = call i32 @emit3(i32 255, i32 208, i32 144)
ret void
}

LLVM IR (-O2):
define void @emit_call(i32 %0) {
%2 = lshr i32 %0, 24
%3 = tail call i32 @emit3(i32 180, i32 %2, i32 144)
%4 = lshr i32 %0, 16
%5 = and i32 %4, 255
%6 = tail call i32 @emit3(i32 176, i32 %5, i32 144)
%7 = tail call i32 @emit3(i32 193, i32 224, i32 16)
%8 = lshr i32 %0, 8
%9 = and i32 %8, 255
%10 = tail call i32 @emit3(i32 180, i32 %9, i32 144)
%11 = and i32 %0, 255
%12 = tail call i32 @emit3(i32 176, i32 %11, i32 144)
%13 = tail call i32 @emit3(i32 72, i32 152, i32 144)
%14 = tail call i32 @emit3(i32 255, i32 208, i32 144)
ret void
}