	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_user_mode_idi_create_adapter ## -- Begin function diva_user_mode_idi_create_adapter
	.p2align	4, 0x90
_diva_user_mode_idi_create_adapter:     ## @diva_user_mode_idi_create_adapter
	.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	%esi, %r15d
	movq	%rdi, %r12
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	movl	$24, %esi
	callq	_diva_os_malloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	leaq	20(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	movq	(%r12), %rax
	movq	%rax, 8(%rbx)
	movl	8(%r12), %ecx
	movl	%ecx, 16(%rbx)
	movl	%r15d, (%rbx)
	movslq	%eax, %rdi
	callq	_DBG_LOG
	movq	_adapter_lock@GOTPCREL(%rip), %r15
	leaq	L_.str.1(%rip), %r12
	leaq	-44(%rbp), %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_diva_os_enter_spin_lock
	addq	$4, %rbx
	movq	_adapter_q@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_diva_os_leave_spin_lock
	jmp	LBB0_3
LBB0_1:
	movl	$-1, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_adapter_lock,4,2               ## @adapter_lock
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"create_adapter"

	.comm	_adapter_q,4,2                  ## @adapter_q
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_user_mode_idi_create_adapter ; -- Begin function diva_user_mode_idi_create_adapter
	.p2align	2
_diva_user_mode_idi_create_adapter:     ; @diva_user_mode_idi_create_adapter
	.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, x1
	mov	x21, x0
	mov	w0, #0
	mov	w1, #24
	bl	_diva_os_malloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x19, x0
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	add	x0, x19, #20
	bl	_INIT_LIST_HEAD
	ldr	w8, [x21, #8]
	ldr	x9, [x21]
	str	x9, [x19, #8]
	str	w8, [x19, #16]
	str	w20, [x19]
	ldrsw	x0, [x19, #8]
	bl	_DBG_LOG
Lloh0:
	adrp	x20, _adapter_lock@GOTPAGE
Lloh1:
	ldr	x20, [x20, _adapter_lock@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str.1@PAGE
Lloh3:
	add	x21, x21, l_.str.1@PAGEOFF
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x21
	bl	_diva_os_enter_spin_lock
	add	x0, x19, #4
Lloh4:
	adrp	x1, _adapter_q@GOTPAGE
Lloh5:
	ldr	x1, [x1, _adapter_q@GOTPAGEOFF]
	bl	_list_add_tail
	add	x1, sp, #12
	mov	x0, x20
	mov	x2, x21
	bl	_diva_os_leave_spin_lock
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
LBB0_3:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_adapter_lock,4,2               ; @adapter_lock
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"create_adapter"

	.comm	_adapter_q,4,2                  ; @adapter_q
.subsections_via_symbols
