	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_get_cntl_attributes     ## -- Begin function be_cmd_get_cntl_attributes
	.p2align	4, 0x90
_be_cmd_get_cntl_attributes:            ## @be_cmd_get_cntl_attributes
	.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, %r15
	movl	$4, %edi
	movl	$4, %esi
	callq	_max
	movl	%eax, %r12d
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.1:
	leaq	-48(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	$4, -48(%rbp)
	movq	(%r15), %rdi
	leaq	-44(%rbp), %rdx
	movl	$4, %esi
	callq	_pci_alloc_consistent
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%r15, %rdi
	callq	_wrb_from_mbox
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	-40(%rbp), %rdi
	movq	_CMD_SUBSYSTEM_COMMON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_OPCODE_COMMON_GET_CNTL_ATTRIBUTES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-48(%rbp), %r9
	movl	%r12d, %ecx
	movq	%rax, %r8
	callq	_be_wrb_cmd_hdr_prepare
	movq	%r15, %rdi
	callq	_be_mbox_notify_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movq	-40(%rbp), %rax
	movl	16(%rax), %eax
	movl	%eax, 12(%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	-40(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_10
## %bb.9:
	movq	(%r15), %rdi
	movl	-48(%rbp), %esi
	movl	-44(%rbp), %ecx
	callq	_pci_free_consistent
LBB0_10:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Memory allocation failure\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ## @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_GET_CNTL_ATTRIBUTES,4,2 ## @OPCODE_COMMON_GET_CNTL_ATTRIBUTES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_get_cntl_attributes     ; -- Begin function be_cmd_get_cntl_attributes
	.p2align	2
_be_cmd_get_cntl_attributes:            ; @be_cmd_get_cntl_attributes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	mov	w22, #4
	mov	w0, #4
	mov	w1, #4
	bl	_max
	mov	x21, x0
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #-1
	b	LBB0_11
LBB0_2:
	mov	x23, sp
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w22, [sp]
	ldr	x0, [x19]
	orr	x2, x23, #0x4
	mov	w1, #4
	bl	_pci_alloc_consistent
	str	x0, [sp, #8]
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_wrb_from_mbox
	cbz	x0, LBB0_7
; %bb.4:
	mov	x4, x0
	ldr	x0, [sp, #8]
Lloh0:
	adrp	x8, _CMD_SUBSYSTEM_COMMON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMD_SUBSYSTEM_COMMON@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _OPCODE_COMMON_GET_CNTL_ATTRIBUTES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPCODE_COMMON_GET_CNTL_ATTRIBUTES@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x5, sp
	mov	x3, x21
	bl	_be_wrb_cmd_hdr_prepare
	mov	x0, x19
	bl	_be_mbox_notify_wait
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.5:
	ldr	x8, [sp, #8]
	ldr	w8, [x8, #16]
	str	w8, [x19, #12]
	b	LBB0_9
LBB0_6:
	ldr	x0, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x2, [sp, #8]
	cbz	x2, LBB0_11
; %bb.10:
	ldr	x0, [x19]
	ldp	w1, w3, [sp]
	bl	_pci_free_consistent
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Memory allocation failure\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ; @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_GET_CNTL_ATTRIBUTES,4,2 ; @OPCODE_COMMON_GET_CNTL_ATTRIBUTES
.subsections_via_symbols
