	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function carp_prepare_ad
_carp_prepare_ad:                       ## @carp_prepare_ad
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r14
	cmpq	$0, 8(%rsi)
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_arc4random
	xorl	%eax, %eax
	callq	_arc4random
	jmp	LBB0_3
LBB0_1:
	movl	$1, %eax
LBB0_3:
	addl	%eax, (%r15)
	callq	_htonl
	movq	8(%rbx), %rcx
	movq	%rax, (%rcx)
	movl	(%r15), %edi
	callq	_htonl
	movq	8(%rbx), %rcx
	movq	%rax, 8(%rcx)
	movq	8(%rbx), %rsi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_carp_hmac_generate
	movq	_PACKET_TAG_CARP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_M_NOWAIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %esi
	callq	_m_tag_get
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r15, 4(%rax)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_m_tag_prepend
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	%r14, %rdi
	callq	_m_freem
	movq	_carps_onomem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CARPSTATS_INC
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PACKET_TAG_CARP,4,2            ## @PACKET_TAG_CARP
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.comm	_carps_onomem,4,2               ## @carps_onomem
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_carp_prepare_ad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function carp_prepare_ad
_carp_prepare_ad:                       ; @carp_prepare_ad
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_arc4random
	bl	_arc4random
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	ldr	w8, [x20]
	add	w8, w8, w0
	str	w8, [x20]
	bl	_htonl
	ldr	x8, [x21, #8]
	str	x0, [x8]
	ldr	w0, [x20]
	bl	_htonl
	ldr	x8, [x21, #8]
	str	x0, [x8, #8]
	ldr	x1, [x21, #8]
	ldr	w2, [x21]
	mov	x0, x20
	bl	_carp_hmac_generate
Lloh0:
	adrp	x8, _PACKET_TAG_CARP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PACKET_TAG_CARP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _M_NOWAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M_NOWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_m_tag_get
	cbz	x0, LBB0_5
; %bb.4:
	mov	x1, x0
	stur	x20, [x0, #4]
	mov	x0, x19
	bl	_m_tag_prepend
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_m_freem
Lloh6:
	adrp	x8, _carps_onomem@GOTPAGE
Lloh7:
	ldr	x8, [x8, _carps_onomem@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_CARPSTATS_INC
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PACKET_TAG_CARP,4,2            ; @PACKET_TAG_CARP
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.comm	_carps_onomem,4,2               ; @carps_onomem
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_carp_prepare_ad
.subsections_via_symbols
