#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 */
struct ADrawTag {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, unsigned int,
                           unsigned int, unsigned int, unsigned int, char *);
int /*<<< orphan*/ getSvgFile(struct ADrawTag *);
char *getSvgPen(struct ADrawTag *);
void SvgDottedLine(struct ADrawTag *ctx, unsigned int x1, unsigned int y1,
                   unsigned int x2, unsigned int y2) {
  fprintf(getSvgFile(ctx),
          "<line x1=\"%u\" y1=\"%u\" x2=\"%u\" y2=\"%u\" stroke=\"%s\" "
          "stroke-dasharray=\"2,2\"/>\n",
          x1, y1, x2, y2, getSvgPen(ctx));
}


x86 assembly (clang, -O0):
<SvgDottedLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getSvgFile@plt>
mov    %eax,-0x2c(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getSvgPen@plt>
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
lea    0xe72(%rip),%rsi
mov    %rax,(%rsp)
call   1050 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SvgDottedLine>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%r13d
mov    %rdi,%rbx
call   1030 <getSvgFile@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <getSvgPen@plt>
mov    %rax,(%rsp)
lea    0xe9c(%rip),%rsi
mov    %ebp,%edi
mov    %r13d,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
call   1050 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ADrawTag = type { i32 }
@.str = [76 x i8] c"<line x1=\22%u\22 y1=\22%u\22 x2=\22%u\22 y2=\22%u\22 stroke=\22%s\22 stroke-dasharray=\222,2\22/>\0A\00"
define void @SvgDottedLine(%struct.ADrawTag* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.ADrawTag*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store %struct.ADrawTag* %0, %struct.ADrawTag** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load %struct.ADrawTag*, %struct.ADrawTag** %6
%12 = call i32 @getSvgFile(%struct.ADrawTag* %11)
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load %struct.ADrawTag*, %struct.ADrawTag** %6
%18 = call i8* @getSvgPen(%struct.ADrawTag* %17)
%19 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15, i32 %16, i8* %18)
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type { i32 }
@.str = [76 x i8] c"<line x1=\22%u\22 y1=\22%u\22 x2=\22%u\22 y2=\22%u\22 stroke=\22%s\22 stroke-dasharray=\222,2\22/>\0A\00"
define void @SvgDottedLine(%struct.ADrawTag* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @getSvgFile(%struct.ADrawTag* %0)
%7 = tail call i8* @getSvgPen(%struct.ADrawTag* %0)
%8 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2, i32 %3, i32 %4, i8* %7)
ret void
}