	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bd_md_create                   ## -- Begin function bd_md_create
	.p2align	4, 0x90
_bd_md_create:                          ## @bd_md_create
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	_OBJ_TYPE_TAG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_obj_lookup
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	movq	_OBJ_TYPE_MD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_obj_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r15
	leaq	-56(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_PROTO_IOC_BUSDMA_MD_CREATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movl	8(%rbx), %eax
	movl	%eax, -48(%rbp)
	movl	%r12d, -52(%rbp)
	movl	24(%rbx), %edi
	movq	_PROTO_IOC_BUSDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_ioctl
	cmpl	$-1, %eax
	je	LBB0_3
## %bb.4:
	movl	$1, (%r15)
	movl	24(%rbx), %eax
	movl	%eax, 24(%r15)
	movq	%rbx, 16(%r15)
	incl	(%rbx)
	movl	-56(%rbp), %eax
	movl	%eax, 8(%r15)
	movl	4(%r15), %r14d
	jmp	LBB0_5
LBB0_3:
	movq	%r15, %rdi
	callq	_obj_free
LBB0_5:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OBJ_TYPE_TAG,4,2               ## @OBJ_TYPE_TAG
	.comm	_OBJ_TYPE_MD,4,2                ## @OBJ_TYPE_MD
	.comm	_PROTO_IOC_BUSDMA_MD_CREATE,4,2 ## @PROTO_IOC_BUSDMA_MD_CREATE
	.comm	_PROTO_IOC_BUSDMA,4,2           ## @PROTO_IOC_BUSDMA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bd_md_create                   ; -- Begin function bd_md_create
	.p2align	2
_bd_md_create:                          ; @bd_md_create
	.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	x21, x1
Lloh0:
	adrp	x8, _OBJ_TYPE_TAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OBJ_TYPE_TAG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_obj_lookup
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _OBJ_TYPE_MD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OBJ_TYPE_MD@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_obj_alloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh6:
	adrp	x8, _PROTO_IOC_BUSDMA_MD_CREATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PROTO_IOC_BUSDMA_MD_CREATE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [sp, #12]
	ldr	w8, [x19, #8]
	stp	w21, w8, [sp, #4]
	ldr	w0, [x19, #24]
Lloh9:
	adrp	x8, _PROTO_IOC_BUSDMA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PROTO_IOC_BUSDMA@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, sp
	bl	_ioctl
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x20]
	ldr	w8, [x19, #24]
	str	w8, [x20, #24]
	str	x19, [x20, #16]
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	ldr	w8, [sp]
	str	w8, [x20, #8]
	ldr	w0, [x20, #4]
	b	LBB0_6
LBB0_4:
	mov	x0, x20
	bl	_obj_free
LBB0_5:
	mov	w0, #-1
LBB0_6:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_OBJ_TYPE_TAG,4,2               ; @OBJ_TYPE_TAG
	.comm	_OBJ_TYPE_MD,4,2                ; @OBJ_TYPE_MD
	.comm	_PROTO_IOC_BUSDMA_MD_CREATE,4,2 ; @PROTO_IOC_BUSDMA_MD_CREATE
	.comm	_PROTO_IOC_BUSDMA,4,2           ; @PROTO_IOC_BUSDMA
.subsections_via_symbols
