	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_QUERY_DDR                ## -- Begin function mthca_QUERY_DDR
	.p2align	4, 0x90
_mthca_QUERY_DDR:                       ## @mthca_QUERY_DDR
	.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	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mthca_alloc_mailbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%rbx, %rdi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	8(%rbx), %r12
	movl	(%rbx), %edx
	movq	_CMD_QUERY_DDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_CMD_TIME_CLASS_A@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_mthca_cmd_box
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	movl	(%r14), %edi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_MTHCA_GET
	movl	4(%r14), %edi
	movq	%r12, %rsi
	movl	$8, %edx
	callq	_MTHCA_GET
	movq	%r12, %rsi
	movl	$19, %edx
	callq	_MTHCA_GET
	movq	_MTHCA_FLAG_DDR_HIDDEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r14)
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	callq	_mthca_info
LBB0_4:
	movslq	4(%r14), %r8
	movslq	(%r14), %rcx
	movl	%r8d, %edx
	subl	%ecx, %edx
	sarl	$10, %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_mthca_dbg
LBB0_5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mthca_free_mailbox
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_CMD_QUERY_DDR,4,2              ## @CMD_QUERY_DDR
	.comm	_CMD_TIME_CLASS_A,4,2           ## @CMD_TIME_CLASS_A
	.comm	_MTHCA_FLAG_DDR_HIDDEN,4,2      ## @MTHCA_FLAG_DDR_HIDDEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FW reports that HCA-attached memory is %s hidden; does not match PCI config\n"

L_.str.2:                               ## @.str.2
	.asciz	"not"

L_.str.4:                               ## @.str.4
	.asciz	"HCA memory size %d KB (start %llx, end %llx)\n"

	.comm	_QUERY_DDR_END_OFFSET,4,2       ## @QUERY_DDR_END_OFFSET
	.comm	_QUERY_DDR_INFO_HIDDEN_FLAG,4,2 ## @QUERY_DDR_INFO_HIDDEN_FLAG
	.comm	_QUERY_DDR_INFO_OFFSET,4,2      ## @QUERY_DDR_INFO_OFFSET
	.comm	_QUERY_DDR_START_OFFSET,4,2     ## @QUERY_DDR_START_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_QUERY_DDR                ; -- Begin function mthca_QUERY_DDR
	.p2align	2
_mthca_QUERY_DDR:                       ; @mthca_QUERY_DDR
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_mthca_alloc_mailbox
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_2:
	ldr	x22, [x20, #8]
	ldr	w2, [x20]
Lloh3:
	adrp	x8, _CMD_QUERY_DDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_QUERY_DDR@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
Lloh6:
	adrp	x8, _CMD_TIME_CLASS_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CMD_TIME_CLASS_A@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	w3, #0
	mov	w4, #0
	bl	_mthca_cmd_box
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	w0, [x19]
	mov	x1, x22
	mov	w2, #0
	bl	_MTHCA_GET
	ldr	w0, [x19, #4]
	mov	x1, x22
	mov	w2, #8
	bl	_MTHCA_GET
	mov	x1, x22
	mov	w2, #19
	bl	_MTHCA_GET
	ldr	w8, [x19, #8]
Lloh9:
	adrp	x9, _MTHCA_FLAG_DDR_HIDDEN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MTHCA_FLAG_DDR_HIDDEN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
Lloh14:
	adrp	x2, l_.str.2@PAGE
Lloh15:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_mthca_info
LBB0_5:
	ldpsw	x9, x8, [x19]
	sub	w10, w8, w9
	asr	w10, w10, #10
	stp	x9, x8, [sp, #8]
	str	x10, [sp]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_mthca_dbg
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_mthca_free_mailbox
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_CMD_QUERY_DDR,4,2              ; @CMD_QUERY_DDR
	.comm	_CMD_TIME_CLASS_A,4,2           ; @CMD_TIME_CLASS_A
	.comm	_MTHCA_FLAG_DDR_HIDDEN,4,2      ; @MTHCA_FLAG_DDR_HIDDEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FW reports that HCA-attached memory is %s hidden; does not match PCI config\n"

l_.str.2:                               ; @.str.2
	.asciz	"not"

l_.str.4:                               ; @.str.4
	.asciz	"HCA memory size %d KB (start %llx, end %llx)\n"

	.comm	_QUERY_DDR_END_OFFSET,4,2       ; @QUERY_DDR_END_OFFSET
	.comm	_QUERY_DDR_INFO_HIDDEN_FLAG,4,2 ; @QUERY_DDR_INFO_HIDDEN_FLAG
	.comm	_QUERY_DDR_INFO_OFFSET,4,2      ; @QUERY_DDR_INFO_OFFSET
	.comm	_QUERY_DDR_START_OFFSET,4,2     ; @QUERY_DDR_START_OFFSET
.subsections_via_symbols
