	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_uverbs_create_ah
_ib_uverbs_create_ah:                   ## @ib_uverbs_create_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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	$0, -48(%rbp)
	leaq	-144(%rbp), %rsi
	movl	$72, %edx
	callq	_uverbs_request
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	movq	_UVERBS_OBJECT_AH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-72(%rbp), %rdx
	movq	%r12, %rsi
	callq	_uobj_alloc
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_16
LBB0_3:
	movq	-72(%rbp), %rdi
	movl	-104(%rbp), %esi
	callq	_rdma_is_port_valid
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	_UVERBS_OBJECT_PD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-80(%rbp), %edx
	movq	%r12, %rcx
	callq	_uobj_get_obj_read
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r15
	movq	-72(%rbp), %rdi
	movl	-104(%rbp), %esi
	callq	_rdma_ah_find_type
	movl	%eax, -48(%rbp)
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rdma_ah_set_make_grd
	movl	-88(%rbp), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_dlid
	movl	-92(%rbp), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_sl
	movl	-96(%rbp), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_path_bits
	movl	-100(%rbp), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_static_rate
	movl	-104(%rbp), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_port_num
	cmpq	$0, -112(%rbp)
	je	LBB0_8
## %bb.7:
	movl	-120(%rbp), %edx
	movl	-124(%rbp), %ecx
	movl	-132(%rbp), %r9d
	movl	-128(%rbp), %r8d
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rdma_ah_set_grh
	movl	-136(%rbp), %esi
	movq	%rbx, %rdi
	callq	_rdma_ah_set_dgid_raw
	jmp	LBB0_9
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_8:
	leaq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_rdma_ah_set_ah_flags
LBB0_9:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_rdma_create_user_ah
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r13, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_14
LBB0_11:
	movq	%r14, 24(%r13)
	movl	-144(%rbp), %eax
	movl	%eax, 16(%r14)
	movq	%r13, 8(%r14)
	movl	(%r14), %eax
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	movl	$4, %edx
	callq	_uverbs_response
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %ebx
	movq	_RDMA_DESTROY_AH_SLEEPABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_uverbs_get_cleared_udata
	movq	%r13, %rdi
	movl	-60(%rbp), %esi                 ## 4-byte Reload
	movl	%eax, %edx
	callq	_rdma_destroy_ah_user
LBB0_14:
	movq	%r15, %rdi
	callq	_uobj_put_obj_read
LBB0_15:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_uobj_alloc_abort
LBB0_16:
	movl	%ebx, %eax
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	%r15, %rdi
	callq	_uobj_put_obj_read
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_uobj_alloc_commit
	movl	%eax, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_UVERBS_OBJECT_AH,4,2           ## @UVERBS_OBJECT_AH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UVERBS_OBJECT_PD,4,2           ## @UVERBS_OBJECT_PD
	.comm	_RDMA_DESTROY_AH_SLEEPABLE,4,2  ## @RDMA_DESTROY_AH_SLEEPABLE
	.no_dead_strip	_ib_uverbs_create_ah
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_uverbs_create_ah
_ib_uverbs_create_ah:                   ; @ib_uverbs_create_ah
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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, x0
	str	wzr, [sp, #8]
	add	x1, sp, #24
	mov	w2, #72
	bl	_uverbs_request
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.1:
Lloh0:
	adrp	x8, _UVERBS_OBJECT_AH@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UVERBS_OBJECT_AH@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x2, sp
	mov	x1, x19
	bl	_uobj_alloc
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_15
LBB0_3:
	ldr	x0, [sp]
	ldr	w1, [sp, #64]
	bl	_rdma_is_port_valid
	cbz	w0, LBB0_7
; %bb.4:
Lloh3:
	adrp	x8, _UVERBS_OBJECT_PD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UVERBS_OBJECT_PD@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [sp, #88]
	mov	x3, x19
	bl	_uobj_get_obj_read
	cbz	x0, LBB0_7
; %bb.5:
	mov	x21, x0
	ldr	x0, [sp]
	ldr	w1, [sp, #64]
	bl	_rdma_ah_find_type
	str	w0, [sp, #8]
	add	x0, sp, #8
	mov	w1, #0
	bl	_rdma_ah_set_make_grd
	ldr	w1, [sp, #80]
	add	x0, sp, #8
	bl	_rdma_ah_set_dlid
	ldr	w1, [sp, #76]
	add	x0, sp, #8
	bl	_rdma_ah_set_sl
	ldr	w1, [sp, #72]
	add	x0, sp, #8
	bl	_rdma_ah_set_path_bits
	ldr	w1, [sp, #68]
	add	x0, sp, #8
	bl	_rdma_ah_set_static_rate
	ldr	w1, [sp, #64]
	add	x0, sp, #8
	bl	_rdma_ah_set_port_num
	ldr	x8, [sp, #56]
	cbz	x8, LBB0_8
; %bb.6:
	ldp	w3, w2, [sp, #44]
	ldp	w5, w4, [sp, #36]
	add	x0, sp, #8
	mov	x1, #0
	bl	_rdma_ah_set_grh
	ldr	w1, [sp, #32]
	add	x0, sp, #8
	bl	_rdma_ah_set_dgid_raw
	b	LBB0_9
LBB0_7:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_8:
	add	x0, sp, #8
	mov	w1, #0
	bl	_rdma_ah_set_ah_flags
LBB0_9:
	add	x1, sp, #8
	mov	x0, x21
	mov	x2, x19
	bl	_rdma_create_user_ah
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_13
LBB0_11:
	str	x20, [x23, #24]
	ldr	w8, [sp, #24]
	str	w8, [x20, #16]
	str	x23, [x20, #8]
	ldr	w8, [x20]
	str	w8, [sp, #16]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #4
	bl	_uverbs_response
	cbz	w0, LBB0_16
; %bb.12:
	mov	x22, x0
Lloh9:
	adrp	x8, _RDMA_DESTROY_AH_SLEEPABLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RDMA_DESTROY_AH_SLEEPABLE@GOTPAGEOFF]
Lloh11:
	ldr	w24, [x8]
	mov	x0, x19
	bl	_uverbs_get_cleared_udata
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_rdma_destroy_ah_user
LBB0_13:
	mov	x0, x21
	bl	_uobj_put_obj_read
LBB0_14:
	mov	x0, x20
	mov	x1, x19
	bl	_uobj_alloc_abort
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_16:
	mov	x0, x21
	bl	_uobj_put_obj_read
	mov	x0, x20
	mov	x1, x19
	bl	_uobj_alloc_commit
	mov	x22, x0
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_UVERBS_OBJECT_AH,4,2           ; @UVERBS_OBJECT_AH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UVERBS_OBJECT_PD,4,2           ; @UVERBS_OBJECT_PD
	.comm	_RDMA_DESTROY_AH_SLEEPABLE,4,2  ; @RDMA_DESTROY_AH_SLEEPABLE
	.no_dead_strip	_ib_uverbs_create_ah
.subsections_via_symbols
