	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_copy_ah_attr_to_user        ## -- Begin function ib_copy_ah_attr_to_user
	.p2align	4, 0x90
_ib_copy_ah_attr_to_user:               ## @ib_copy_ah_attr_to_user
	.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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	40(%rsi), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%r14), %rax
	movq	_RDMA_AH_ATTR_TYPE_OPA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_rdma_ah_get_dlid
	movl	%eax, %r12d
	movq	_IB_LID_PERMISSIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_be16_to_cpu
	cmpl	%eax, %r12d
	jle	LBB0_3
## %bb.2:
	leaq	-40(%rbp), %r12
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_rdma_ah_conv_opa_to_ib
	testl	%eax, %eax
	cmoveq	%r12, %r14
LBB0_3:
	movq	%r14, %rdi
	callq	_rdma_ah_get_dlid
	movl	%eax, 56(%rbx)
	movq	%r14, %rdi
	callq	_rdma_ah_get_sl
	movl	%eax, 52(%rbx)
	movq	%r14, %rdi
	callq	_rdma_ah_get_path_bits
	movl	%eax, 48(%rbx)
	movq	%r14, %rdi
	callq	_rdma_ah_get_static_rate
	movl	%eax, 44(%rbx)
	movq	%r14, %rdi
	callq	_rdma_ah_get_ah_flags
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, (%rbx)
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	callq	_rdma_ah_read_grh
	movq	%rax, %r15
	movl	36(%rbx), %edi
	movl	16(%rax), %esi
	movl	$4, %edx
	callq	_memcpy
	movups	(%r15), %xmm0
	movups	%xmm0, 20(%rbx)
LBB0_5:
	movq	%r14, %rdi
	callq	_rdma_ah_get_port_num
	movl	%eax, 16(%rbx)
	movq	$0, 8(%rbx)
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RDMA_AH_ATTR_TYPE_OPA,8,3      ## @RDMA_AH_ATTR_TYPE_OPA
	.comm	_IB_LID_PERMISSIVE,4,2          ## @IB_LID_PERMISSIVE
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_copy_ah_attr_to_user        ; -- Begin function ib_copy_ah_attr_to_user
	.p2align	2
_ib_copy_ah_attr_to_user:               ; @ib_copy_ah_attr_to_user
	.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, x2
	mov	x19, x1
	mov	x21, x0
	add	x0, x1, #40
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _RDMA_AH_ATTR_TYPE_OPA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RDMA_AH_ATTR_TYPE_OPA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_rdma_ah_get_dlid
	mov	x22, x0
Lloh3:
	adrp	x8, _IB_LID_PERMISSIVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_LID_PERMISSIVE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_be16_to_cpu
	cmp	w22, w0
	b.le	LBB0_3
; %bb.2:
	add	x22, sp, #8
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x20
	bl	_rdma_ah_conv_opa_to_ib
	cmp	w0, #0
	csel	x20, x22, x20, eq
LBB0_3:
	mov	x0, x20
	bl	_rdma_ah_get_dlid
	str	w0, [x19, #56]
	mov	x0, x20
	bl	_rdma_ah_get_sl
	str	w0, [x19, #52]
	mov	x0, x20
	bl	_rdma_ah_get_path_bits
	str	w0, [x19, #48]
	mov	x0, x20
	bl	_rdma_ah_get_static_rate
	str	w0, [x19, #44]
	mov	x0, x20
	bl	_rdma_ah_get_ah_flags
Lloh6:
	adrp	x8, _IB_AH_GRH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IB_AH_GRH@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ands	w8, w8, w0
	cset	w9, ne
	str	w9, [x19]
	cbz	w8, LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_rdma_ah_read_grh
	mov	x21, x0
	ldr	w0, [x19, #36]
	ldr	w1, [x21, #16]
	mov	w2, #4
	bl	_memcpy
	ldr	q0, [x21]
	stur	q0, [x19, #20]
LBB0_5:
	mov	x0, x20
	bl	_rdma_ah_get_port_num
	str	w0, [x19, #16]
	str	xzr, [x19, #8]
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RDMA_AH_ATTR_TYPE_OPA,8,3      ; @RDMA_AH_ATTR_TYPE_OPA
	.comm	_IB_LID_PERMISSIVE,4,2          ; @IB_LID_PERMISSIVE
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
.subsections_via_symbols
