	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hap_write_frame_header
_hap_write_frame_header:                ## @hap_write_frame_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rdi, %r13
	leaq	-44(%rbp), %rdi
	callq	_bytestream2_init_writer
	addl	$-8, %r14d
	cmpl	$1, (%r13)
	movq	_HAP_HDR_LONG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jne	LBB0_2
## %bb.1:
	movq	8(%r13), %rax
	movl	4(%r13), %ecx
	orl	(%rax), %ecx
	leaq	-44(%rbp), %rdi
	movl	%r14d, %edx
	callq	_hap_write_section_header
	jmp	LBB0_8
LBB0_2:
	movq	_HAP_COMP_COMPLEX@GOTPCREL(%rip), %rax
	movl	4(%r13), %ecx
	orl	(%rax), %ecx
	leaq	-44(%rbp), %r15
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_hap_write_section_header
	movq	_HAP_HDR_SHORT@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	movq	%r13, %rdi
	callq	_hap_decode_instructions_length
	movq	_HAP_ST_DECODE_INSTRUCTIONS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_hap_write_section_header
	movl	(%r12), %esi
	movl	(%r13), %edx
	movq	_HAP_ST_COMPRESSOR_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	callq	_hap_write_section_header
	movl	(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	(%rax,%rbx,8), %esi
	sarl	$4, %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_byte
	incq	%rbx
	movslq	(%r13), %rdx
	cmpq	%rdx, %rbx
	jl	LBB0_4
LBB0_5:
	movl	(%r12), %esi
	shll	$2, %edx
	movq	_HAP_ST_SIZE_TABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-44(%rbp), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_hap_write_section_header
	cmpl	$0, (%r13)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movl	4(%rax,%rbx,8), %esi
	movq	%r14, %rdi
	callq	_bytestream2_put_le32
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HAP_HDR_LONG,4,2               ## @HAP_HDR_LONG
	.comm	_HAP_COMP_COMPLEX,4,2           ## @HAP_COMP_COMPLEX
	.comm	_HAP_HDR_SHORT,4,2              ## @HAP_HDR_SHORT
	.comm	_HAP_ST_DECODE_INSTRUCTIONS,4,2 ## @HAP_ST_DECODE_INSTRUCTIONS
	.comm	_HAP_ST_COMPRESSOR_TABLE,4,2    ## @HAP_ST_COMPRESSOR_TABLE
	.comm	_HAP_ST_SIZE_TABLE,4,2          ## @HAP_ST_SIZE_TABLE
	.no_dead_strip	_hap_write_frame_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hap_write_frame_header
_hap_write_frame_header:                ; @hap_write_frame_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x19, x0
	add	x0, sp, #12
	bl	_bytestream2_init_writer
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _HAP_HDR_LONG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HAP_HDR_LONG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	sub	w2, w20, #8
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w3, w9, w8
	add	x0, sp, #12
	bl	_hap_write_section_header
	b	LBB0_8
LBB0_2:
Lloh3:
	adrp	x8, _HAP_COMP_COMPLEX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HAP_COMP_COMPLEX@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w3, w9, w8
	add	x0, sp, #12
	bl	_hap_write_section_header
Lloh6:
	adrp	x21, _HAP_HDR_SHORT@GOTPAGE
Lloh7:
	ldr	x21, [x21, _HAP_HDR_SHORT@GOTPAGEOFF]
	ldr	w20, [x21]
	mov	x0, x19
	bl	_hap_decode_instructions_length
	mov	x2, x0
Lloh8:
	adrp	x8, _HAP_ST_DECODE_INSTRUCTIONS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HAP_ST_DECODE_INSTRUCTIONS@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x0, sp, #12
	mov	x1, x20
	bl	_hap_write_section_header
	ldr	w1, [x21]
	ldr	w2, [x19]
Lloh11:
	adrp	x8, _HAP_ST_COMPRESSOR_TABLE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _HAP_ST_COMPRESSOR_TABLE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	add	x0, sp, #12
	bl	_hap_write_section_header
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x20, #0
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w8, [x8, x20]
	asr	w1, w8, #4
	add	x0, sp, #12
	bl	_bytestream2_put_byte
	add	x22, x22, #1
	ldrsw	x8, [x19]
	add	x20, x20, #8
	cmp	x22, x8
	b.lt	LBB0_4
LBB0_5:
	ldr	w1, [x21]
	lsl	w2, w8, #2
Lloh14:
	adrp	x8, _HAP_ST_SIZE_TABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HAP_ST_SIZE_TABLE@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	add	x0, sp, #12
	bl	_hap_write_section_header
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x20, #0
	mov	w21, #4
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w1, [x8, x21]
	add	x0, sp, #12
	bl	_bytestream2_put_le32
	add	x20, x20, #1
	ldrsw	x8, [x19]
	add	x21, x21, #8
	cmp	x20, x8
	b.lt	LBB0_7
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_HAP_HDR_LONG,4,2               ; @HAP_HDR_LONG
	.comm	_HAP_COMP_COMPLEX,4,2           ; @HAP_COMP_COMPLEX
	.comm	_HAP_HDR_SHORT,4,2              ; @HAP_HDR_SHORT
	.comm	_HAP_ST_DECODE_INSTRUCTIONS,4,2 ; @HAP_ST_DECODE_INSTRUCTIONS
	.comm	_HAP_ST_COMPRESSOR_TABLE,4,2    ; @HAP_ST_COMPRESSOR_TABLE
	.comm	_HAP_ST_SIZE_TABLE,4,2          ; @HAP_ST_SIZE_TABLE
	.no_dead_strip	_hap_write_frame_header
.subsections_via_symbols
