	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_iboe_ah
_create_iboe_ah:                        ## @create_iboe_ah
	.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	%rsi, %r14
	movq	%rdi, %r13
	movl	4(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_to_mah
	movq	%rax, %r12
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$65535, -44(%rbp)               ## imm = 0xFFFF
	movq	%r14, %rdi
	callq	_rdma_ah_read_grh
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	8(%rax), %esi
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_memcpy
	movq	%rbx, %rdi
	callq	_rdma_is_multicast_addr
	movq	%rax, %rbx
	movq	56(%r12), %rdi
	movl	16(%r14), %esi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_memcpy
	movq	48(%r12), %rdi
	callq	_eth_zero_addr
	movq	8(%r14), %r15
	testq	%r15, %r15
	je	LBB0_3
## %bb.1:
	movq	48(%r12), %rdx
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_rdma_read_gid_l2_fields
	testl	%eax, %eax
	jne	LBB0_16
## %bb.2:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	callq	_mlx4_ib_gid_index_to_real_index
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_16
LBB0_3:
	movl	(%r14), %eax
LBB0_4:
	movq	%rbx, %r15
	movl	%eax, (%r12)
	cmpl	$4095, -44(%rbp)                ## imm = 0xFFF
	jg	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_rdma_ah_get_sl
	shll	$13, %eax
	movzwl	%ax, %eax
	orl	%eax, -44(%rbp)
LBB0_6:
	movl	(%r13), %edi
	callq	_to_mpd
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_rdma_ah_get_port_num
	shll	$24, %eax
	orl	%eax, %ebx
	movl	%ebx, %edi
	callq	_cpu_to_be32
	movl	%eax, 40(%r12)
	movl	-44(%rbp), %edi
	callq	_cpu_to_be16
	movq	%rax, 32(%r12)
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	12(%rbx), %eax
	movl	%eax, 24(%r12)
	movq	%r14, %rdi
	callq	_rdma_ah_get_static_rate
	testl	%eax, %eax
	je	LBB0_13
## %bb.7:
	movq	%r14, %rdi
	callq	_rdma_ah_get_static_rate
                                        ## kill: def $eax killed $eax def $rax
	movq	_MLX4_STAT_RATE_OFFSET@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leal	(%rsi,%rax), %ecx
	movq	_IB_RATE_2_5_GBPS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, %eax
	jle	LBB0_12
## %bb.8:
	addl	%esi, %edx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	leal	-1(%rcx), %esi
	cmpl	%edx, %esi
	cmovgel	%edx, %esi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	btl	%ecx, %eax
	jb	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	decl	%ecx
	cmpl	%edx, %ecx
	jg	LBB0_9
## %bb.11:
	movl	%esi, %ecx
LBB0_12:
	movl	%ecx, 4(%r12)
LBB0_13:
	movl	(%rbx), %edi
	shll	$20, %edi
	orl	4(%rbx), %edi
	callq	_cpu_to_be32
	orl	%eax, 8(%r12)
	testq	%r15, %r15
	je	LBB0_15
## %bb.14:
	movl	$49152, %edi                    ## imm = 0xC000
	callq	_cpu_to_be16
	movq	%rax, 64(%r12)
LBB0_15:
	movq	16(%r12), %rdi
	movl	8(%rbx), %esi
	movl	$16, %edx
	callq	_memcpy
	movq	%r14, %rdi
	callq	_rdma_ah_get_sl
	shll	$29, %eax
	movl	%eax, %edi
	callq	_cpu_to_be32
	orl	%eax, 8(%r12)
	xorl	%eax, %eax
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_MLX4_STAT_RATE_OFFSET,4,2      ## @MLX4_STAT_RATE_OFFSET
	.comm	_IB_RATE_2_5_GBPS,4,2           ## @IB_RATE_2_5_GBPS
	.no_dead_strip	_create_iboe_ah
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_iboe_ah
_create_iboe_ah:                        ; @create_iboe_ah
	.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	x20, x1
	mov	x23, x0
	ldr	w0, [x0, #4]
	bl	_to_mdev
	mov	x24, x0
	mov	x0, x23
	bl	_to_mah
	mov	x19, x0
	ldr	x26, [x24]
	mov	w8, #65535
	str	w8, [sp, #4]
	mov	x0, x20
	bl	_rdma_ah_read_grh
	mov	x21, x0
	ldr	w1, [x0, #8]
	add	x0, sp, #8
	mov	w2, #4
	bl	_memcpy
	add	x0, sp, #8
	bl	_rdma_is_multicast_addr
	mov	x22, x0
	ldr	x0, [x19, #56]
	ldr	w1, [x20, #16]
Lloh0:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_memcpy
	ldr	x0, [x19, #48]
	bl	_eth_zero_addr
	ldr	x25, [x20, #8]
	cbz	x25, LBB0_3
; %bb.1:
	ldr	x2, [x19, #48]
	add	x1, sp, #4
	mov	x0, x25
	bl	_rdma_read_gid_l2_fields
	cbnz	w0, LBB0_16
; %bb.2:
	mov	x0, x24
	mov	x1, x25
	bl	_mlx4_ib_gid_index_to_real_index
	tbz	w0, #31, LBB0_4
	b	LBB0_16
LBB0_3:
	ldr	w0, [x20]
LBB0_4:
	str	w0, [x19]
	ldr	w8, [sp, #4]
	cmp	w8, #4095
	b.gt	LBB0_6
; %bb.5:
	mov	x0, x20
	bl	_rdma_ah_get_sl
	ubfiz	w8, w0, #13, #3
	ldr	w9, [sp, #4]
	orr	w8, w8, w9
	str	w8, [sp, #4]
LBB0_6:
	ldr	w0, [x23]
	bl	_to_mpd
	ldr	w23, [x0]
	mov	x0, x20
	bl	_rdma_ah_get_port_num
	orr	w0, w23, w0, lsl #24
	bl	_cpu_to_be32
	str	w0, [x19, #40]
	ldr	w0, [sp, #4]
	bl	_cpu_to_be16
	str	x0, [x19, #32]
	ldr	w8, [x21, #12]
	str	w8, [x19, #24]
	mov	x0, x20
	bl	_rdma_ah_get_static_rate
	cbz	w0, LBB0_13
; %bb.7:
	mov	x0, x20
	bl	_rdma_ah_get_static_rate
Lloh3:
	adrp	x8, _MLX4_STAT_RATE_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX4_STAT_RATE_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x8]
	add	w8, w10, w0
Lloh6:
	adrp	x9, _IB_RATE_2_5_GBPS@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IB_RATE_2_5_GBPS@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x9]
	cmp	w0, w11
	b.le	LBB0_12
; %bb.8:
	ldr	w9, [x26]
	sub	w12, w8, #1
	add	w10, w11, w10
	cmp	w12, w10
	csel	w11, w12, w10, lt
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w12, w9, w8
	tbnz	w12, #0, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	sub	w8, w8, #1
	cmp	w8, w10
	b.gt	LBB0_9
; %bb.11:
	mov	x8, x11
LBB0_12:
	str	w8, [x19, #4]
LBB0_13:
	ldp	w8, w9, [x21]
	orr	w0, w9, w8, lsl #20
	bl	_cpu_to_be32
	ldr	w8, [x19, #8]
	orr	w8, w8, w0
	str	w8, [x19, #8]
	cbz	x22, LBB0_15
; %bb.14:
	mov	w0, #49152
	bl	_cpu_to_be16
	str	x0, [x19, #64]
LBB0_15:
	ldr	x0, [x19, #16]
	ldr	w1, [x21, #8]
	mov	w2, #16
	bl	_memcpy
	mov	x0, x20
	bl	_rdma_ah_get_sl
	lsl	w0, w0, #29
	bl	_cpu_to_be32
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_16:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_MLX4_STAT_RATE_OFFSET,4,2      ; @MLX4_STAT_RATE_OFFSET
	.comm	_IB_RATE_2_5_GBPS,4,2           ; @IB_RATE_2_5_GBPS
	.no_dead_strip	_create_iboe_ah
.subsections_via_symbols
