#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*/ WriteDWORD(int);
int /*<<< orphan*/ WriteWORD(short);
int /*<<< orphan*/ wmf_create_pen();
int /*<<< orphan*/ wmf_obj_size(int);
void wmf_line(long x1, long y1, long x2, long y2, int isclipped) {
  isclipped = isclipped;
  wmf_create_pen();
  wmf_obj_size(3 + 2);
  WriteDWORD(3 + 2);
  WriteWORD(0x0214);
  WriteWORD((short)y1);
  WriteWORD((short)x1);
  WriteDWORD(3 + 2);
  WriteWORD(0x0213);
  WriteWORD((short)y2);
  WriteWORD((short)x2);
}


x86 assembly (clang, -O0):
<wmf_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x0,%al
call   1030 <wmf_create_pen@plt>
mov    $0x5,%edi
call   1060 <wmf_obj_size@plt>
mov    $0x5,%edi
call   1050 <WriteDWORD@plt>
mov    $0x214,%edi
call   1040 <WriteWORD@plt>
mov    -0x10(%rbp),%rax
movswl %ax,%edi
call   1040 <WriteWORD@plt>
mov    -0x8(%rbp),%rax
movswl %ax,%edi
call   1040 <WriteWORD@plt>
mov    $0x5,%edi
call   1050 <WriteDWORD@plt>
mov    $0x213,%edi
call   1040 <WriteWORD@plt>
mov    -0x20(%rbp),%rax
movswl %ax,%edi
call   1040 <WriteWORD@plt>
mov    -0x18(%rbp),%rax
movswl %ax,%edi
call   1040 <WriteWORD@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wmf_line>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r15
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r12
xor    %eax,%eax
call   1030 <wmf_create_pen@plt>
mov    $0x5,%edi
call   1060 <wmf_obj_size@plt>
mov    $0x5,%edi
call   1050 <WriteDWORD@plt>
mov    $0x214,%edi
call   1040 <WriteWORD@plt>
movswl %bx,%edi
call   1040 <WriteWORD@plt>
movswl %r12w,%edi
call   1040 <WriteWORD@plt>
mov    $0x5,%edi
call   1050 <WriteDWORD@plt>
mov    $0x213,%edi
call   1040 <WriteWORD@plt>
movswl %r15w,%edi
call   1040 <WriteWORD@plt>
movswl %r14w,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <WriteWORD@plt>

LLVM IR (-O0):
define void @wmf_line(i64 %0, i64 %1, i64 %2, i64 %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i32, i32* %10
store i32 %11, i32* %10
%12 = call i32 (...) @wmf_create_pen()
%13 = call i32 @wmf_obj_size(i32 5)
%14 = call i32 @WriteDWORD(i32 5)
%15 = call i32 @WriteWORD(i16 signext 532)
%16 = load i64, i64* %7
%17 = trunc i64 %16 to i16
%18 = call i32 @WriteWORD(i16 signext %17)
%19 = load i64, i64* %6
%20 = trunc i64 %19 to i16
%21 = call i32 @WriteWORD(i16 signext %20)
%22 = call i32 @WriteDWORD(i32 5)
%23 = call i32 @WriteWORD(i16 signext 531)
%24 = load i64, i64* %9
%25 = trunc i64 %24 to i16
%26 = call i32 @WriteWORD(i16 signext %25)
%27 = load i64, i64* %8
%28 = trunc i64 %27 to i16
%29 = call i32 @WriteWORD(i16 signext %28)
ret void
}

LLVM IR (-O2):
define void @wmf_line(i64 %0, i64 %1, i64 %2, i64 %3, i32 %4) {
%6 = tail call i32 (...) @wmf_create_pen()
%7 = tail call i32 @wmf_obj_size(i32 5)
%8 = tail call i32 @WriteDWORD(i32 5)
%9 = tail call i32 @WriteWORD(i16 signext 532)
%10 = trunc i64 %1 to i16
%11 = tail call i32 @WriteWORD(i16 signext %10)
%12 = trunc i64 %0 to i16
%13 = tail call i32 @WriteWORD(i16 signext %12)
%14 = tail call i32 @WriteDWORD(i32 5)
%15 = tail call i32 @WriteWORD(i16 signext 531)
%16 = trunc i64 %3 to i16
%17 = tail call i32 @WriteWORD(i16 signext %16)
%18 = trunc i64 %2 to i16
%19 = tail call i32 @WriteWORD(i16 signext %18)
ret void
}