	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_query_sma_attr            ## -- Begin function ehca_query_sma_attr
	.p2align	4, 0x90
_ehca_query_sma_attr:                   ## @ehca_query_sma_attr
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ehca_alloc_fw_ctrlblock
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movl	4(%rbx), %edi
	movl	%r12d, %esi
	movq	%rax, %rdx
	callq	_hipz_h_query_port
	movq	_H_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movl	20(%r15), %eax
	movl	%eax, 20(%r14)
	movups	4(%r15), %xmm0
	movups	%xmm0, 4(%r14)
	movl	(%r14), %edi
	movl	(%r15), %esi
	movl	$4, %edx
	callq	_memcpy
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ehca_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_ehca_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movq	%r15, %rdi
	callq	_ehca_free_fw_ctrlblock
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	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	"Can't allocate rblock memory."

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_H_SUCCESS,8,3                  ## @H_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"Can't query port properties"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ehca_query_sma_attr            ; -- Begin function ehca_query_sma_attr
	.p2align	2
_ehca_query_sma_attr:                   ; @ehca_query_sma_attr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ehca_alloc_fw_ctrlblock
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	w0, [x21, #4]
	mov	x1, x22
	mov	x2, x19
	bl	_hipz_h_query_port
Lloh3:
	adrp	x8, _H_SUCCESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _H_SUCCESS@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	ldr	w8, [x19, #20]
	str	w8, [x20, #20]
	ldur	q0, [x19, #4]
	stur	q0, [x20, #4]
	ldr	w0, [x20]
	ldr	w1, [x19]
	mov	w2, #4
	bl	_memcpy
	mov	w20, #0
	b	LBB0_5
LBB0_3:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_ehca_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_6
LBB0_4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_ehca_err
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x19
	bl	_ehca_free_fw_ctrlblock
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't allocate rblock memory."

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_H_SUCCESS,8,3                  ; @H_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"Can't query port properties"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
