#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 /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
int /*<<< orphan*/ *ptls_encode_quicint(int /*<<< orphan*/ *, int);
uint8_t *quicly_encode_ack_frequency_frame(uint8_t *dst, uint64_t sequence,
                                           uint64_t packet_tolerance,
                                           uint64_t max_ack_delay,
                                           int ignore_order) {
  dst = ptls_encode_quicint(dst, 0xaf);
  dst = ptls_encode_quicint(dst, sequence);
  dst = ptls_encode_quicint(dst, packet_tolerance);
  dst = ptls_encode_quicint(dst, max_ack_delay);
  return dst;
}


x86 assembly (clang, -O0):
<quicly_encode_ack_frequency_frame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%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
mov    $0xaf,%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicly_encode_ack_frequency_frame>:
push   %rbp
push   %r14
push   %rbx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%ebx
mov    $0xaf,%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,%rdi
mov    %ebx,%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,%rdi
mov    %ebp,%esi
call   1030 <ptls_encode_quicint@plt>
mov    %rax,%rdi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <ptls_encode_quicint@plt>

LLVM IR (-O0):
define i32* @quicly_encode_ack_frequency_frame(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32*, i32** %6
%12 = call i32* @ptls_encode_quicint(i32* %11, i32 175)
store i32* %12, i32** %6
%13 = load i32*, i32** %6
%14 = load i32, i32* %7
%15 = call i32* @ptls_encode_quicint(i32* %13, i32 %14)
store i32* %15, i32** %6
%16 = load i32*, i32** %6
%17 = load i32, i32* %8
%18 = call i32* @ptls_encode_quicint(i32* %16, i32 %17)
store i32* %18, i32** %6
%19 = load i32*, i32** %6
%20 = load i32, i32* %9
%21 = call i32* @ptls_encode_quicint(i32* %19, i32 %20)
store i32* %21, i32** %6
%22 = load i32*, i32** %6
ret i32* %22
}

LLVM IR (-O2):
define i32* @quicly_encode_ack_frequency_frame(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32* @ptls_encode_quicint(i32* %0, i32 175)
%7 = tail call i32* @ptls_encode_quicint(i32* %6, i32 %1)
%8 = tail call i32* @ptls_encode_quicint(i32* %7, i32 %2)
%9 = tail call i32* @ptls_encode_quicint(i32* %8, i32 %3)
ret i32* %9
}