	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cap_wrap                       ## -- Begin function cap_wrap
	.p2align	4, 0x90
_cap_wrap:                              ## @cap_wrap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movl	%edi, %ebx
	callq	_fd_is_valid
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	_CASPER_VALID_FLAGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%eax, %r14d
	jne	LBB0_6
## %bb.2:
	movl	$16, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movl	%ebx, (%rax)
	movl	$-1, 4(%rax)
	movl	%r14d, 8(%rax)
	movq	_CAP_CHANNEL_MAGIC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax)
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CASPER_VALID_FLAGS,4,2         ## @CASPER_VALID_FLAGS
	.comm	_CAP_CHANNEL_MAGIC,4,2          ## @CAP_CHANNEL_MAGIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cap_wrap                       ; -- Begin function cap_wrap
	.p2align	2
_cap_wrap:                              ; @cap_wrap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	bl	_fd_is_valid
	cbz	w0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _CASPER_VALID_FLAGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CASPER_VALID_FLAGS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bics	wzr, w19, w8
	b.ne	LBB0_4
; %bb.2:
	mov	w0, #16
	bl	_malloc
	cbz	x0, LBB0_5
; %bb.3:
	mov	w8, #-1
	stp	w20, w8, [x0]
Lloh3:
	adrp	x8, _CAP_CHANNEL_MAGIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CAP_CHANNEL_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w19, w8, [x0, #8]
	b	LBB0_5
LBB0_4:
	mov	x0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CASPER_VALID_FLAGS,4,2         ; @CASPER_VALID_FLAGS
	.comm	_CAP_CHANNEL_MAGIC,4,2          ; @CAP_CHANNEL_MAGIC
.subsections_via_symbols
