	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_duplicate                      ## -- Begin function duplicate
	.p2align	4, 0x90
_duplicate:                             ## @duplicate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	_IEEE80211_FC0_TYPE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IEEE80211_FC0_SUBTYPE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_frame_type
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	_seqno
	movl	%eax, %r14d
	movl	8(%rbx), %esi
	movq	%r15, %rdi
	callq	_client_find
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_5
## %bb.2:
	movl	$8, %edi
	callq	_malloc
	movq	%rax, %r12
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_err
LBB0_4:
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	4(%r12), %edi
	movl	8(%rbx), %esi
	movl	$6, %edx
	callq	_memcpy
	leal	-1(%r14), %eax
	movl	%eax, (%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_client_insert
LBB0_5:
	movq	(%rbx), %rax
	movq	_IEEE80211_FC1_RETRY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_8
## %bb.6:
	movl	(%r12), %ecx
	subl	%r14d, %ecx
	jl	LBB0_8
## %bb.7:
	movl	$1, %eax
	cmpl	$5, %ecx
	jl	LBB0_9
LBB0_8:
	movl	%r14d, (%r12)
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ## @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC0_SUBTYPE_DATA,4,2 ## @IEEE80211_FC0_SUBTYPE_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc()"

	.comm	_IEEE80211_FC1_RETRY,4,2        ## @IEEE80211_FC1_RETRY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_duplicate                      ; -- Begin function duplicate
	.p2align	2
_duplicate:                             ; @duplicate
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IEEE80211_FC0_TYPE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _IEEE80211_FC0_SUBTYPE_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IEEE80211_FC0_SUBTYPE_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_frame_type
	cbz	w0, LBB0_9
; %bb.1:
	mov	x0, x19
	bl	_seqno
	mov	x20, x0
	ldr	w1, [x19, #8]
	mov	x0, x21
	bl	_client_find
	mov	x22, x0
	cbnz	x0, LBB0_5
; %bb.2:
	mov	w0, #8
	bl	_malloc
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_4:
	mov	x0, x22
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	w0, [x22, #4]
	ldr	w1, [x19, #8]
	mov	w2, #6
	bl	_memcpy
	sub	w8, w20, #1
	str	w8, [x22]
	mov	x0, x21
	mov	x1, x22
	bl	_client_insert
LBB0_5:
	ldr	x8, [x19]
	ldr	w8, [x8, #4]
Lloh8:
	adrp	x9, _IEEE80211_FC1_RETRY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IEEE80211_FC1_RETRY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x22]
	subs	w8, w8, w20
	ccmp	w8, #5, #0, ge
	b.lt	LBB0_8
LBB0_7:
	mov	w0, #0
	str	w20, [x22]
	b	LBB0_9
LBB0_8:
	mov	w0, #1
LBB0_9:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_IEEE80211_FC0_TYPE_DATA,4,2    ; @IEEE80211_FC0_TYPE_DATA
	.comm	_IEEE80211_FC0_SUBTYPE_DATA,4,2 ; @IEEE80211_FC0_SUBTYPE_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc()"

	.comm	_IEEE80211_FC1_RETRY,4,2        ; @IEEE80211_FC1_RETRY
.subsections_via_symbols
