	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_core_dma_translation      ## -- Begin function bcma_core_dma_translation
	.p2align	4, 0x90
_bcma_core_dma_translation:             ## @bcma_core_dma_translation
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movl	(%rax), %edx
	cmpl	$128, %edx
	je	LBB0_1
## %bb.2:
	cmpl	$129, %edx
	jne	LBB0_6
## %bb.3:
	movq	_BCMA_IOST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bcma_aread32
	movq	_BCMA_IOST_DMA64@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_BCMA_DMA_TRANSLATION_DMA64_CMT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_bcma_err
	movq	_BCMA_DMA_TRANSLATION_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_5:
	movq	_BCMA_DMA_TRANSLATION_DMA32_CMT@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BCMA_IOST,4,2                  ## @BCMA_IOST
	.comm	_BCMA_IOST_DMA64,4,2            ## @BCMA_IOST_DMA64
	.comm	_BCMA_DMA_TRANSLATION_DMA64_CMT,4,2 ## @BCMA_DMA_TRANSLATION_DMA64_CMT
	.comm	_BCMA_DMA_TRANSLATION_DMA32_CMT,4,2 ## @BCMA_DMA_TRANSLATION_DMA32_CMT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA translation unknown for host %d\n"

	.comm	_BCMA_DMA_TRANSLATION_NONE,4,2  ## @BCMA_DMA_TRANSLATION_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcma_core_dma_translation      ; -- Begin function bcma_core_dma_translation
	.p2align	2
_bcma_core_dma_translation:             ; @bcma_core_dma_translation
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0]
	ldr	w2, [x8]
	cmp	w2, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w2, #129
	b.ne	LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _BCMA_IOST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BCMA_IOST@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_bcma_aread32
Lloh3:
	adrp	x8, _BCMA_IOST_DMA64@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BCMA_IOST_DMA64@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.3:
Lloh6:
	adrp	x8, _BCMA_DMA_TRANSLATION_DMA64_CMT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BCMA_DMA_TRANSLATION_DMA64_CMT@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_bcma_err
Lloh10:
	adrp	x8, _BCMA_DMA_TRANSLATION_NONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BCMA_DMA_TRANSLATION_NONE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _BCMA_DMA_TRANSLATION_DMA32_CMT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BCMA_DMA_TRANSLATION_DMA32_CMT@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_BCMA_IOST,4,2                  ; @BCMA_IOST
	.comm	_BCMA_IOST_DMA64,4,2            ; @BCMA_IOST_DMA64
	.comm	_BCMA_DMA_TRANSLATION_DMA64_CMT,4,2 ; @BCMA_DMA_TRANSLATION_DMA64_CMT
	.comm	_BCMA_DMA_TRANSLATION_DMA32_CMT,4,2 ; @BCMA_DMA_TRANSLATION_DMA32_CMT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA translation unknown for host %d\n"

	.comm	_BCMA_DMA_TRANSLATION_NONE,4,2  ; @BCMA_DMA_TRANSLATION_NONE
.subsections_via_symbols
