	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %edi
	callq	_to_mdev
	movq	(%rax), %r13
	movl	(%r15), %r8d
	leaq	-80(%rbp), %rdx
	leaq	-92(%rbp), %rcx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_mlx4_ib_resolve_grh
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movl	56(%r14), %edi
	leaq	-80(%rbp), %rsi
	movl	$6, %edx
	callq	_memcpy
	movl	(%rbx), %edi
	movl	(%r15), %esi
	movl	24(%r15), %edx
	leaq	-88(%rbp), %rcx
	callq	_ib_get_cached_gid
	testl	%eax, %eax
	je	LBB0_3
LBB0_1:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %r14
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movq	%r14, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	leaq	-88(%rbp), %rdi
	callq	_rdma_get_vlan_id
	movl	%eax, %r12d
	cmpl	$4095, %eax                     ## imm = 0xFFF
	jg	LBB0_5
## %bb.4:
	movl	4(%r15), %eax
	shll	$13, %eax
	movzwl	%ax, %eax
	orl	%eax, %r12d
LBB0_5:
	movq	%rbx, %rdi
	callq	_to_mpd
	movl	(%r15), %edi
	shll	$24, %edi
	orl	(%rax), %edi
	callq	_cpu_to_be32
	movq	%rax, 48(%r14)
	movl	24(%r15), %eax
	movl	%eax, 40(%r14)
	movl	%r12d, %edi
	callq	_cpu_to_be16
	movq	%rax, 32(%r14)
	movl	8(%r15), %edx
	testl	%edx, %edx
	je	LBB0_12
## %bb.6:
	movq	_MLX4_STAT_RATE_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leal	(%rsi,%rdx), %eax
	movq	_IB_RATE_2_5_GBPS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%ecx, %edx
	jle	LBB0_11
## %bb.7:
	addl	%esi, %ecx
	movl	(%r13), %edx
	leal	-1(%rax), %esi
	cmpl	%ecx, %esi
	cmovgel	%ecx, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	btl	%eax, %edx
	jb	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	decl	%eax
	cmpl	%ecx, %eax
	jg	LBB0_8
## %bb.10:
	movl	%esi, %eax
LBB0_11:
	movl	%eax, 8(%r14)
LBB0_12:
	cmpl	$0, -92(%rbp)
	je	LBB0_14
## %bb.13:
	movl	$49152, %edi                    ## imm = 0xC000
	callq	_cpu_to_be16
	movq	%rax, 64(%r14)
LBB0_14:
	movl	24(%r14), %edi
	movq	16(%r15), %rsi
	movl	$16, %edx
	callq	_memcpy
	movl	4(%r15), %edi
	shll	$29, %edi
	callq	_cpu_to_be32
	movq	%rax, 16(%r14)
	jmp	LBB0_15
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.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, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	w0, [x0]
	bl	_to_mdev
	ldr	x23, [x0]
	ldr	w4, [x20]
	add	x2, sp, #16
	add	x3, sp, #4
	mov	x1, x20
	bl	_mlx4_ib_resolve_grh
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #56]
	add	x1, sp, #16
	mov	w2, #6
	bl	_memcpy
	ldr	w0, [x21]
	ldr	w1, [x20]
	ldr	w2, [x20, #24]
	add	x3, sp, #8
	bl	_ib_get_cached_gid
	cbz	w0, LBB0_5
LBB0_2:
	bl	_ERR_PTR
	mov	x19, x0
LBB0_3:
	ldr	x8, [sp, #40]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	add	x0, sp, #8
	bl	_rdma_get_vlan_id
	mov	x22, x0
	cmp	w0, #4095
	b.gt	LBB0_7
; %bb.6:
	ldr	w8, [x20, #4]
	ubfiz	w8, w8, #13, #3
	orr	w22, w8, w22
LBB0_7:
	mov	x0, x21
	bl	_to_mpd
	ldr	w8, [x0]
	ldr	w9, [x20]
	orr	w0, w8, w9, lsl #24
	bl	_cpu_to_be32
	str	x0, [x19, #48]
	ldr	w8, [x20, #24]
	str	w8, [x19, #40]
	mov	x0, x22
	bl	_cpu_to_be16
	str	x0, [x19, #32]
	ldr	w9, [x20, #8]
	cbz	w9, LBB0_14
; %bb.8:
Lloh6:
	adrp	x8, _MLX4_STAT_RATE_OFFSET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLX4_STAT_RATE_OFFSET@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x8]
	add	w8, w10, w9
Lloh9:
	adrp	x11, _IB_RATE_2_5_GBPS@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IB_RATE_2_5_GBPS@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	cmp	w9, w11
	b.le	LBB0_13
; %bb.9:
	ldr	w9, [x23]
	sub	w12, w8, #1
	add	w10, w11, w10
	cmp	w12, w10
	csel	w11, w12, w10, lt
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	lsr	w12, w9, w8
	tbnz	w12, #0, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	w8, w8, #1
	cmp	w8, w10
	b.gt	LBB0_10
; %bb.12:
	mov	x8, x11
LBB0_13:
	str	w8, [x19, #8]
LBB0_14:
	ldr	w8, [sp, #4]
	cbz	w8, LBB0_16
; %bb.15:
	mov	w0, #49152
	bl	_cpu_to_be16
	str	x0, [x19, #64]
LBB0_16:
	ldr	w0, [x19, #24]
	ldr	x1, [x20, #16]
	mov	w2, #16
	bl	_memcpy
	ldr	w8, [x20, #4]
	lsl	w0, w8, #29
	bl	_cpu_to_be32
	str	x0, [x19, #16]
	b	LBB0_3
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.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
