#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*/ assem_debug(char *, int, int, int);
int /*<<< orphan*/ output_w32(int);
void emit_fsubs(int s1, int s2, int d) {
  assem_debug("fsubs s%d,s%d,s%d\n", d, s1, s2);
  output_w32(0xee300a40 | ((d & 14) << 11) | ((d & 1) << 22) |
             ((s1 & 14) << 15) | ((s1 & 1) << 7) | ((s2 & 14) >> 1) |
             ((s2 & 1) << 5));
}


x86 assembly (clang, -O0):
<emit_fsubs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xebf(%rip),%rdi
call   1030 <assem_debug@plt>
mov    -0xc(%rbp),%edi
and    $0xe,%edi
shl    $0xb,%edi
or     $0xee300a40,%edi
mov    -0xc(%rbp),%eax
and    $0x1,%eax
shl    $0x16,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
and    $0xe,%eax
shl    $0xf,%eax
or     %eax,%edi
mov    -0x4(%rbp),%eax
and    $0x1,%eax
shl    $0x7,%eax
or     %eax,%edi
mov    -0x8(%rbp),%eax
and    $0xe,%eax
sar    $0x1,%eax
or     %eax,%edi
mov    -0x8(%rbp),%eax
and    $0x1,%eax
shl    $0x5,%eax
or     %eax,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fsubs>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xece(%rip),%rdi
mov    %edx,%esi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1030 <assem_debug@plt>
mov    %r14d,%eax
and    $0xe,%eax
shl    $0xb,%eax
and    $0x1,%r14d
shl    $0x16,%r14d
mov    %ebp,%ecx
and    $0xe,%ecx
shl    $0xf,%ecx
shl    $0x7,%ebp
movzbl %bpl,%edx
or     %ecx,%edx
mov    %ebx,%ecx
shr    %ecx
and    $0x7,%ecx
or     %edx,%ecx
shl    $0x5,%ebx
and    $0x20,%ebx
or     %ecx,%ebx
or     %r14d,%ebx
or     %eax,%ebx
or     $0xee300a40,%ebx
mov    %ebx,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"fsubs s%d,s%d,s%d\0A\00"
define void @emit_fsubs(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = call i32 @assem_debug(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %6
%12 = and i32 %11, 14
%13 = shl i32 %12, 11
%14 = or i32 -298841536, %13
%15 = load i32, i32* %6
%16 = and i32 %15, 1
%17 = shl i32 %16, 22
%18 = or i32 %14, %17
%19 = load i32, i32* %4
%20 = and i32 %19, 14
%21 = shl i32 %20, 15
%22 = or i32 %18, %21
%23 = load i32, i32* %4
%24 = and i32 %23, 1
%25 = shl i32 %24, 7
%26 = or i32 %22, %25
%27 = load i32, i32* %5
%28 = and i32 %27, 14
%29 = ashr i32 %28, 1
%30 = or i32 %26, %29
%31 = load i32, i32* %5
%32 = and i32 %31, 1
%33 = shl i32 %32, 5
%34 = or i32 %30, %33
%35 = call i32 @output_w32(i32 %34)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"fsubs s%d,s%d,s%d\0A\00"
define void @emit_fsubs(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @assem_debug(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %0, i32 %1)
%5 = shl i32 %2, 11
%6 = and i32 %5, 28672
%7 = shl i32 %2, 22
%8 = and i32 %7, 4194304
%9 = shl i32 %0, 15
%10 = and i32 %9, 458752
%11 = shl i32 %0, 7
%12 = and i32 %11, 128
%13 = lshr i32 %1, 1
%14 = and i32 %13, 7
%15 = shl i32 %1, 5
%16 = and i32 %15, 32
%17 = or i32 %10, %12
%18 = or i32 %17, %14
%19 = or i32 %18, %16
%20 = or i32 %19, %8
%21 = or i32 %20, %6
%22 = or i32 %21, -298841536
%23 = tail call i32 @output_w32(i32 %22)
ret void
}