	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_init_ah_attr_from_wc        ## -- Begin function ib_init_ah_attr_from_wc
	.p2align	4, 0x90
_ib_init_ah_attr_from_wc:               ## @ib_init_ah_attr_from_wc
	.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	%r8, %rbx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_RDMA_NETWORK_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_IB_GID_TYPE_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_might_sleep
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_rdma_ah_find_type
	movl	%eax, (%rbx)
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_rdma_cap_eth_ah
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_IB_WC_WITH_NETWORK_HDR_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13)
	je	LBB0_3
## %bb.2:
	movl	4(%r13), %r14d
	jmp	LBB0_4
LBB0_3:
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_ib_get_net_type_by_grh
	movl	%eax, %r14d
LBB0_4:
	movl	%r14d, %edi
	callq	_ib_network_to_gid_type
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_5:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	-80(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %esi
	callq	_ib_get_gids_from_rdma_hdr
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_6
LBB0_25:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	20(%r13), %esi
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_rdma_ah_set_sl
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_rdma_ah_set_port_num
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_rdma_protocol_roce
	testq	%rax, %rax
	je	LBB0_18
## %bb.7:
	movl	(%r13), %eax
	movq	_IB_WC_WITH_VLAN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.9:
	movl	8(%r13), %edx
	jmp	LBB0_10
LBB0_18:
	movl	16(%r13), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_dlid
	movl	12(%r13), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_path_bits
	movq	_IB_WC_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, (%r13)
	je	LBB0_25
## %bb.19:
	movq	-64(%rbp), %rbx
	movq	_IB_SA_WELL_KNOWN_GUID@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_cpu_to_be64
	cmpq	%rax, %rbx
	jne	LBB0_20
## %bb.21:
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_rdma_get_gid_attr
	jmp	LBB0_22
LBB0_8:
	movl	$65535, %edx                    ## imm = 0xFFFF
LBB0_10:
	movq	_IB_WC_GRH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_11
## %bb.12:
	leaq	-64(%rbp), %rcx
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_get_sgid_attr_from_eth
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	%r14, %rdi
	jmp	LBB0_14
LBB0_11:
	movq	_EPROTOTYPE@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_25
LBB0_15:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %edx
	andl	$1048575, %edx                  ## imm = 0xFFFFF
	shrl	$20, %eax
	movzbl	%al, %r8d
	leaq	-80(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$255, %ecx
	movq	%r14, %r9
	callq	_rdma_move_grh_sgid_attr
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ib_resolve_unicast_gid_dmac
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_rdma_destroy_ah_attr
	jmp	LBB0_25
LBB0_20:
	movq	_IB_GID_TYPE_IB@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	movl	%r15d, %ecx
	xorl	%r8d, %r8d
	callq	_rdma_find_gid_by_port
LBB0_22:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	%rbx, %rdi
LBB0_14:
	callq	_PTR_ERR
	movl	%eax, %r14d
	jmp	LBB0_25
LBB0_24:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_be32_to_cpu
	movl	%eax, %edx
	andl	$1048575, %edx                  ## imm = 0xFFFFF
	shrl	$20, %eax
	movzbl	%al, %r8d
	leaq	-80(%rbp), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	$255, %ecx
	movq	%rbx, %r9
	callq	_rdma_move_grh_sgid_attr
	jmp	LBB0_25
LBB0_16:
	xorl	%r14d, %r14d
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_RDMA_NETWORK_IB,4,2            ## @RDMA_NETWORK_IB
	.comm	_IB_GID_TYPE_IB,4,2             ## @IB_GID_TYPE_IB
	.comm	_IB_WC_WITH_NETWORK_HDR_TYPE,4,2 ## @IB_WC_WITH_NETWORK_HDR_TYPE
	.comm	_IB_WC_WITH_VLAN,4,2            ## @IB_WC_WITH_VLAN
	.comm	_IB_WC_GRH,4,2                  ## @IB_WC_GRH
	.comm	_EPROTOTYPE,4,2                 ## @EPROTOTYPE
	.comm	_IB_SA_WELL_KNOWN_GUID,4,2      ## @IB_SA_WELL_KNOWN_GUID
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_init_ah_attr_from_wc        ; -- Begin function ib_init_ah_attr_from_wc
	.p2align	2
_ib_init_ah_attr_from_wc:               ; @ib_init_ah_attr_from_wc
	.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, x4
	mov	x20, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _RDMA_NETWORK_IB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RDMA_NETWORK_IB@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x8]
Lloh3:
	adrp	x26, _IB_GID_TYPE_IB@GOTPAGE
Lloh4:
	ldr	x26, [x26, _IB_GID_TYPE_IB@GOTPAGEOFF]
	ldr	w24, [x26]
	bl	_might_sleep
	mov	x0, x19
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x21
	mov	x1, x22
	bl	_rdma_ah_find_type
	str	w0, [x19]
	mov	x0, x21
	mov	x1, x22
	bl	_rdma_cap_eth_ah
	cbz	x0, LBB0_5
; %bb.1:
	ldr	w8, [x23]
Lloh5:
	adrp	x9, _IB_WC_WITH_NETWORK_HDR_TYPE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IB_WC_WITH_NETWORK_HDR_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	w25, [x23, #4]
	b	LBB0_4
LBB0_3:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_ib_get_net_type_by_grh
	mov	x25, x0
LBB0_4:
	mov	x0, x25
	bl	_ib_network_to_gid_type
	mov	x24, x0
LBB0_5:
	mov	x2, sp
	add	x3, sp, #8
	mov	x0, x20
	mov	x1, x25
	bl	_ib_get_gids_from_rdma_hdr
	mov	x25, x0
	cbz	w0, LBB0_7
LBB0_6:
	mov	x0, x25
	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
LBB0_7:
	ldr	w1, [x23, #20]
	mov	x0, x19
	bl	_rdma_ah_set_sl
	mov	x0, x19
	mov	x1, x22
	bl	_rdma_ah_set_port_num
	mov	x0, x21
	mov	x1, x22
	bl	_rdma_protocol_roce
	cbz	x0, LBB0_10
; %bb.8:
	ldr	w8, [x23]
Lloh8:
	adrp	x9, _IB_WC_WITH_VLAN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _IB_WC_WITH_VLAN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.9:
	ldr	w2, [x23, #8]
	b	LBB0_14
LBB0_10:
	ldr	w1, [x23, #16]
	mov	x0, x19
	bl	_rdma_ah_set_dlid
	ldr	w1, [x23, #12]
	mov	x0, x19
	bl	_rdma_ah_set_path_bits
	ldr	w8, [x23]
Lloh11:
	adrp	x9, _IB_WC_GRH@GOTPAGE
Lloh12:
	ldr	x9, [x9, _IB_WC_GRH@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_25
; %bb.11:
	ldr	x23, [sp, #8]
Lloh14:
	adrp	x8, _IB_SA_WELL_KNOWN_GUID@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IB_SA_WELL_KNOWN_GUID@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_cpu_to_be64
	cmp	x23, x0
	b.ne	LBB0_20
; %bb.12:
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	bl	_rdma_get_gid_attr
	b	LBB0_21
LBB0_13:
	mov	w2, #65535
LBB0_14:
Lloh17:
	adrp	x9, _IB_WC_GRH@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IB_WC_GRH@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_17
; %bb.15:
	add	x3, sp, #8
	mov	x0, x21
	mov	x1, x22
	mov	x4, x24
	bl	_get_sgid_attr_from_eth
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_18
; %bb.16:
	mov	x0, x22
	b	LBB0_23
LBB0_17:
Lloh20:
	adrp	x8, _EPROTOTYPE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EPROTOTYPE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_6
LBB0_18:
	ldr	w0, [x20]
	bl	_be32_to_cpu
	and	w2, w0, #0xfffff
	ubfx	w4, w0, #20, #8
	mov	x1, sp
	mov	x0, x19
	mov	w3, #255
	mov	x5, x22
	bl	_rdma_move_grh_sgid_attr
	mov	x0, x21
	mov	x1, x19
	bl	_ib_resolve_unicast_gid_dmac
	mov	x25, x0
	cbz	w0, LBB0_6
; %bb.19:
	mov	x0, x19
	bl	_rdma_destroy_ah_attr
	b	LBB0_6
LBB0_20:
	ldr	w2, [x26]
	add	x1, sp, #8
	mov	x0, x21
	mov	x3, x22
	mov	x4, #0
	bl	_rdma_find_gid_by_port
LBB0_21:
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_24
; %bb.22:
	mov	x0, x21
LBB0_23:
	bl	_PTR_ERR
	mov	x25, x0
	b	LBB0_6
LBB0_24:
	ldr	w0, [x20]
	bl	_be32_to_cpu
	and	w2, w0, #0xfffff
	ubfx	w4, w0, #20, #8
	mov	x1, sp
	mov	x0, x19
	mov	w3, #255
	mov	x5, x21
	bl	_rdma_move_grh_sgid_attr
LBB0_25:
	mov	w25, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_RDMA_NETWORK_IB,4,2            ; @RDMA_NETWORK_IB
	.comm	_IB_GID_TYPE_IB,4,2             ; @IB_GID_TYPE_IB
	.comm	_IB_WC_WITH_NETWORK_HDR_TYPE,4,2 ; @IB_WC_WITH_NETWORK_HDR_TYPE
	.comm	_IB_WC_WITH_VLAN,4,2            ; @IB_WC_WITH_VLAN
	.comm	_IB_WC_GRH,4,2                  ; @IB_WC_GRH
	.comm	_EPROTOTYPE,4,2                 ; @EPROTOTYPE
	.comm	_IB_SA_WELL_KNOWN_GUID,4,2      ; @IB_SA_WELL_KNOWN_GUID
.subsections_via_symbols
