	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_create_ah               ## -- Begin function ocrdma_create_ah
	.p2align	4, 0x90
_ocrdma_create_ah:                      ## @ocrdma_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_get_ocrdma_pd
	movq	%rax, %r15
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_1
## %bb.4:
	movq	16(%r15), %r12
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movq	16(%r15), %rax
	movq	%rax, 8(%rbx)
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_alloc_av
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movl	8(%r15), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_set_av_attr
	testl	%eax, %eax
	je	LBB0_8
## %bb.12:
	movl	%eax, %r13d
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_free_av
LBB0_13:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r13d, %edi
	jmp	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movslq	4(%r14), %rcx
	movl	4(%rbx), %edx
	movl	%edx, (%rax,%rcx,4)
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_create_ah               ; -- Begin function ocrdma_create_ah
	.p2align	2
_ocrdma_create_ah:                      ; @ocrdma_create_ah
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	bl	_get_ocrdma_pd
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _IB_AH_GRH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_AH_GRH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	mov	x21, x0
	ldr	x22, [x0, #16]
Lloh3:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.2:
	mov	x20, x0
	ldr	x8, [x21, #16]
	str	x8, [x0, #8]
	mov	x0, x22
	mov	x1, x20
	bl	_ocrdma_alloc_av
	mov	x23, x0
	cbnz	w0, LBB0_5
; %bb.3:
	ldr	w2, [x21, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_set_av_attr
	cbz	w0, LBB0_10
; %bb.4:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x20
	bl	_ocrdma_free_av
LBB0_5:
	mov	x0, x20
	bl	_kfree
	mov	x0, x23
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_10:
	ldr	x8, [x21]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	x8, [x8]
	cbz	x8, LBB0_13
; %bb.12:
	ldrsw	x9, [x19, #4]
	ldr	w10, [x20, #4]
	str	w10, [x8, x9, lsl #2]
LBB0_13:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
