	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$32, %edi
	movl	$4, %esi
	callq	_max
	movl	%eax, %r12d
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_15
## %bb.1:
	leaq	-56(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	$4, -56(%rbp)
	movq	8(%r15), %rdi
	leaq	-52(%rbp), %rdx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$4, %esi
	callq	_dma_alloc_coherent
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	%r15, %rdi
	callq	_wrb_from_mbox
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	-48(%rbp), %rdi
	addq	$24, %rdi
	movq	_CMD_SUBSYSTEM_COMMON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_OPCODE_COMMON_GET_CNTL_ATTRIBUTES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-56(%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_13
## %bb.4:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	144(%rax), %eax
	movl	%eax, 24(%r15)
	movq	_CNTL_SERIAL_NUM_WORDS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.5:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	136(%rax), %r12
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r13,4), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movl	$16, %edi
	callq	_BIT_MASK
	decl	%eax
	andl	%ebx, %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	movslq	(%r14), %rax
	cmpq	%rax, %r13
	jl	LBB0_6
LBB0_7:
	movq	%r15, %rdi
	callq	_BEx_chip
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	128(%rax), %eax
	movl	%eax, 20(%r15)
LBB0_9:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_10:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	-48(%rbp), %rdx
	testq	%rdx, %rdx
	je	LBB0_15
## %bb.14:
	movq	8(%r15), %rdi
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %ecx
	callq	_dma_free_coherent
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.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
	.comm	_CNTL_SERIAL_NUM_WORDS,4,2      ## @CNTL_SERIAL_NUM_WORDS
.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, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	mov	w22, #4
	mov	w0, #32
	mov	w1, #4
	bl	_max
	mov	x21, x0
	add	x20, x19, #16
	mov	x0, x20
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #-1
	b	LBB0_15
LBB0_2:
	mov	x23, sp
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w22, [sp]
	ldr	x0, [x19, #8]
	orr	x2, x23, #0x4
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	w1, #4
	bl	_dma_alloc_coherent
	str	x0, [sp, #8]
	cbz	x0, LBB0_10
; %bb.3:
	mov	x0, x19
	bl	_wrb_from_mbox
	cbz	x0, LBB0_11
; %bb.4:
	mov	x4, x0
	ldr	x8, [sp, #8]
	add	x0, x8, #24
Lloh3:
	adrp	x8, _CMD_SUBSYSTEM_COMMON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_SUBSYSTEM_COMMON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _OPCODE_COMMON_GET_CNTL_ATTRIBUTES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPCODE_COMMON_GET_CNTL_ATTRIBUTES@GOTPAGEOFF]
Lloh8:
	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_13
; %bb.5:
	ldr	x22, [sp, #8]
	ldr	w8, [x22, #144]
	str	w8, [x19, #24]
Lloh9:
	adrp	x23, _CNTL_SERIAL_NUM_WORDS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _CNTL_SERIAL_NUM_WORDS@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x24, #0
	ldr	x25, [x22, #136]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x26, x24, #2
	ldr	w0, [x25, x26]
	bl	_le32_to_cpu
	mov	x21, x0
	mov	w0, #16
	bl	_BIT_MASK
	sub	w8, w0, #1
	and	w8, w8, w21
	ldr	x9, [x19]
	str	w8, [x9, x26]
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.lt	LBB0_7
LBB0_8:
	mov	x0, x19
	bl	_BEx_chip
	mov	w21, #0
	cbz	x0, LBB0_13
; %bb.9:
	ldr	w8, [x22, #128]
	str	w8, [x19, #20]
	b	LBB0_13
LBB0_10:
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	mov	x0, x20
	bl	_mutex_unlock
	ldr	x2, [sp, #8]
	cbz	x2, LBB0_15
; %bb.14:
	ldr	x0, [x19, #8]
	ldp	w1, w3, [sp]
	bl	_dma_free_coherent
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.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
	.comm	_CNTL_SERIAL_NUM_WORDS,4,2      ; @CNTL_SERIAL_NUM_WORDS
.subsections_via_symbols
