	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ocrdma_mbx_get_ctrl_attribs
_ocrdma_mbx_get_ctrl_attribs:           ## @ocrdma_mbx_get_ctrl_attribs
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r15
	movl	$8, -48(%rbp)
	movq	8(%r14), %rdi
	leaq	-44(%rbp), %rdx
	movl	(%r12), %ecx
	movl	$8, %esi
	callq	_dma_alloc_coherent
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	-48(%rbp), %eax
	movl	%eax, 8(%r15)
	movq	_OCRDMA_MQE_HDR_SGE_CNT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	_OCRDMA_MQE_HDR_SGE_CNT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	orl	%eax, 12(%r15)
	movl	-44(%rbp), %edi
	movq	(%r15), %rax
	movq	%rdi, 16(%rax)
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_upper_32_bits
	movq	(%r15), %rdx
	movq	%rax, 8(%rdx)
	movl	-48(%rbp), %ecx
	movl	%ecx, (%rdx)
	movq	-40(%rbp), %rdi
	movq	_OCRDMA_CMD_GET_CTRL_ATTRIBUTES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OCRDMA_SUBSYS_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ocrdma_init_mch
	movq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_ocrdma_nonemb_mbx_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	-40(%rbp), %rax
	movq	_OCRDMA_HBA_ATTRB_PTNUM_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	(%rax), %edx
	movq	_OCRDMA_HBA_ATTRB_PTNUM_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %edx
	movl	%edx, (%r14)
	movl	16(%r14), %edi
	movl	4(%rax), %esi
	movl	$4, %edx
	callq	_strlcpy
LBB0_4:
	movq	8(%r14), %rdi
	movq	-40(%rbp), %rdx
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %ecx
	callq	_dma_free_coherent
LBB0_5:
	movq	%r15, %rdi
	callq	_kfree
LBB0_6:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_OCRDMA_MQE_HDR_SGE_CNT_SHIFT,4,2 ## @OCRDMA_MQE_HDR_SGE_CNT_SHIFT
	.comm	_OCRDMA_MQE_HDR_SGE_CNT_MASK,4,2 ## @OCRDMA_MQE_HDR_SGE_CNT_MASK
	.comm	_OCRDMA_CMD_GET_CTRL_ATTRIBUTES,4,2 ## @OCRDMA_CMD_GET_CTRL_ATTRIBUTES
	.comm	_OCRDMA_SUBSYS_COMMON,4,2       ## @OCRDMA_SUBSYS_COMMON
	.comm	_OCRDMA_HBA_ATTRB_PTNUM_MASK,4,2 ## @OCRDMA_HBA_ATTRB_PTNUM_MASK
	.comm	_OCRDMA_HBA_ATTRB_PTNUM_SHIFT,4,2 ## @OCRDMA_HBA_ATTRB_PTNUM_SHIFT
	.no_dead_strip	_ocrdma_mbx_get_ctrl_attribs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ocrdma_mbx_get_ctrl_attribs
_ocrdma_mbx_get_ctrl_attribs:           ; @ocrdma_mbx_get_ctrl_attribs
	.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, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
Lloh3:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	w8, #8
	str	w8, [sp]
	ldr	x0, [x20, #8]
	mov	x8, sp
	orr	x2, x8, #0x4
	ldr	w3, [x22]
	mov	w1, #8
	bl	_dma_alloc_coherent
	str	x0, [sp, #8]
	cbz	x0, LBB0_5
; %bb.2:
Lloh5:
	adrp	x8, _OCRDMA_MQE_HDR_SGE_CNT_SHIFT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OCRDMA_MQE_HDR_SGE_CNT_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
Lloh8:
	adrp	x9, _OCRDMA_MQE_HDR_SGE_CNT_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OCRDMA_MQE_HDR_SGE_CNT_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w8, w9
	ldr	w9, [x19, #12]
	orr	w8, w9, w8
	ldp	w9, w0, [sp]
	stp	w9, w8, [x19, #8]
	ldr	x8, [x19]
	str	x0, [x8, #16]
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_upper_32_bits
	ldr	x8, [x19]
	str	x0, [x8, #8]
	ldr	w3, [sp]
	str	w3, [x8]
	ldr	x0, [sp, #8]
Lloh11:
	adrp	x8, _OCRDMA_CMD_GET_CTRL_ATTRIBUTES@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OCRDMA_CMD_GET_CTRL_ATTRIBUTES@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _OCRDMA_SUBSYS_COMMON@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OCRDMA_SUBSYS_COMMON@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_ocrdma_init_mch
	ldr	x2, [sp, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_ocrdma_nonemb_mbx_cmd
	mov	x21, x0
	cbnz	w0, LBB0_4
; %bb.3:
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
Lloh17:
	adrp	x10, _OCRDMA_HBA_ATTRB_PTNUM_MASK@GOTPAGE
Lloh18:
	ldr	x10, [x10, _OCRDMA_HBA_ATTRB_PTNUM_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
Lloh20:
	adrp	x11, _OCRDMA_HBA_ATTRB_PTNUM_SHIFT@GOTPAGE
Lloh21:
	ldr	x11, [x11, _OCRDMA_HBA_ATTRB_PTNUM_SHIFT@GOTPAGEOFF]
	and	w9, w10, w9
Lloh22:
	ldr	w10, [x11]
	asr	w9, w9, w10
	str	w9, [x20]
	ldr	w0, [x20, #16]
	ldr	w1, [x8, #4]
	mov	w2, #4
	bl	_strlcpy
LBB0_4:
	ldr	x0, [x20, #8]
	ldr	x2, [sp, #8]
	ldp	w1, w3, [sp]
	bl	_dma_free_coherent
LBB0_5:
	mov	x0, x19
	bl	_kfree
LBB0_6:
	mov	x0, x21
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_OCRDMA_MQE_HDR_SGE_CNT_SHIFT,4,2 ; @OCRDMA_MQE_HDR_SGE_CNT_SHIFT
	.comm	_OCRDMA_MQE_HDR_SGE_CNT_MASK,4,2 ; @OCRDMA_MQE_HDR_SGE_CNT_MASK
	.comm	_OCRDMA_CMD_GET_CTRL_ATTRIBUTES,4,2 ; @OCRDMA_CMD_GET_CTRL_ATTRIBUTES
	.comm	_OCRDMA_SUBSYS_COMMON,4,2       ; @OCRDMA_SUBSYS_COMMON
	.comm	_OCRDMA_HBA_ATTRB_PTNUM_MASK,4,2 ; @OCRDMA_HBA_ATTRB_PTNUM_MASK
	.comm	_OCRDMA_HBA_ATTRB_PTNUM_SHIFT,4,2 ; @OCRDMA_HBA_ATTRB_PTNUM_SHIFT
	.no_dead_strip	_ocrdma_mbx_get_ctrl_attribs
.subsections_via_symbols
