	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bd_md_first_seg                ## -- Begin function bd_md_first_seg
	.p2align	4, 0x90
_bd_md_first_seg:                       ## @bd_md_first_seg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movq	_OBJ_TYPE_MD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_obj_lookup
	movq	%rax, %rcx
	movl	$-1, %eax
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.1:
	movq	_BUSDMA_MD_BUS@GOTPCREL(%rip), %rdx
	cmpl	%ebx, (%rdx)
	je	LBB0_6
## %bb.2:
	movq	_BUSDMA_MD_PHYS@GOTPCREL(%rip), %rdx
	cmpl	%ebx, (%rdx)
	je	LBB0_6
## %bb.3:
	movq	_BUSDMA_MD_VIRT@GOTPCREL(%rip), %rdx
	cmpl	%ebx, (%rdx)
	je	LBB0_6
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_6:
	movq	8(%rcx), %rcx
	movslq	%ebx, %rdx
	movq	(%rcx,%rdx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.8:
	movl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %ecx
	movq	_errno@GOTPCREL(%rip), %rdx
	movl	%ecx, (%rdx)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OBJ_TYPE_MD,4,2                ## @OBJ_TYPE_MD
	.comm	_BUSDMA_MD_BUS,4,2              ## @BUSDMA_MD_BUS
	.comm	_BUSDMA_MD_PHYS,4,2             ## @BUSDMA_MD_PHYS
	.comm	_BUSDMA_MD_VIRT,4,2             ## @BUSDMA_MD_VIRT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_ENXIO,4,2                      ## @ENXIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bd_md_first_seg                ; -- Begin function bd_md_first_seg
	.p2align	2
_bd_md_first_seg:                       ; @bd_md_first_seg
	.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
Lloh0:
	adrp	x8, _OBJ_TYPE_MD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OBJ_TYPE_MD@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_obj_lookup
	cbz	x0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _BUSDMA_MD_BUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BUSDMA_MD_BUS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _BUSDMA_MD_PHYS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BUSDMA_MD_PHYS@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _BUSDMA_MD_VIRT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _BUSDMA_MD_VIRT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w8, w19
	ccmp	w9, w19, #4, ne
	ccmp	w10, w19, #4, ne
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x0, #8]
	ldr	x8, [x8, w19, sxtw #3]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w0, [x8]
	b	LBB0_8
LBB0_4:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh14:
	adrp	x8, _ENXIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _errno@GOTPAGE
Lloh17:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh18:
	str	w8, [x9]
LBB0_7:
	mov	w0, #-1
LBB0_8:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_OBJ_TYPE_MD,4,2                ; @OBJ_TYPE_MD
	.comm	_BUSDMA_MD_BUS,4,2              ; @BUSDMA_MD_BUS
	.comm	_BUSDMA_MD_PHYS,4,2             ; @BUSDMA_MD_PHYS
	.comm	_BUSDMA_MD_VIRT,4,2             ; @BUSDMA_MD_VIRT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_ENXIO,4,2                      ; @ENXIO
.subsections_via_symbols
