	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_card_oam
_open_card_oam:                         ## @open_card_oam
	.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
	xorl	%eax, %eax
	cmpl	$31, (%rdi)
	je	LBB0_7
## %bb.1:
	movq	%rdi, %r12
	leaq	8(%rdi), %r15
	xorl	%esi, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	$3, %edx
	callq	_VPCI2VC
	movl	%eax, %r13d
	movl	(%r14), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movl	%r13d, (%rax)
	movq	16(%r12), %rax
	movslq	%r13d, %rcx
	movq	%rbx, (%rax,%rcx,8)
	movq	%rbx, %rsi
	addq	$4, %rsi
	movq	%r12, %rdi
	callq	_flush_rx_pool
	movq	_SAR_RCTE_RAWCELLINTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SAR_RCTE_CONNECTOPEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_SAR_RCTE_RCQ@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_SAR_RCTE_FBP_1@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movslq	4(%r12), %rax
	movl	(%rbx), %ecx
	shll	$2, %ecx
	movslq	%ecx, %rbx
	addq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_write_sram
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	shlq	$2, %rbx
	movq	_SAR_CMD_OPEN_CONNECTION@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_SAR_REG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_writel
	movq	%r12, %rdi
	callq	_waitfor_idle
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$4, %edx
	callq	_VPCI2VC
	movl	%eax, %r13d
	movl	(%r14), %esi
	movl	$8, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	movl	%r13d, (%rax)
	movq	16(%r12), %rax
	movslq	%r13d, %rcx
	movq	%rbx, (%rax,%rcx,8)
	movq	%rbx, %rsi
	addq	$4, %rsi
	movq	%r12, %rdi
	callq	_flush_rx_pool
	movq	_SAR_RCTE_RAWCELLINTEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SAR_RCTE_CONNECTOPEN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_SAR_RCTE_RCQ@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_SAR_RCTE_FBP_1@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movslq	4(%r12), %rax
	movl	(%rbx), %ecx
	shll	$2, %ecx
	movslq	%ecx, %rbx
	addq	%rax, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_write_sram
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	shlq	$2, %rbx
	movq	_SAR_CMD_OPEN_CONNECTION@GOTPCREL(%rip), %rax
	orq	(%rax), %rbx
	movq	_SAR_REG_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_writel
	movq	%r12, %rdi
	callq	_waitfor_idle
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	movzbl	(%r12), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%eax, %esi
	jl	LBB0_2
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movl	24(%r12), %esi
	leaq	L_.str(%rip), %rdi
	callq	_printk
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: can't alloc vc\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SAR_RCTE_CONNECTOPEN,4,2       ## @SAR_RCTE_CONNECTOPEN
	.comm	_SAR_RCTE_RAWCELLINTEN,4,2      ## @SAR_RCTE_RAWCELLINTEN
	.comm	_SAR_RCTE_RCQ,4,2               ## @SAR_RCTE_RCQ
	.comm	_SAR_RCTE_FBP_1,4,2             ## @SAR_RCTE_FBP_1
	.comm	_SAR_CMD_OPEN_CONNECTION,8,3    ## @SAR_CMD_OPEN_CONNECTION
	.comm	_SAR_REG_CMD,4,2                ## @SAR_REG_CMD
	.no_dead_strip	_open_card_oam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_card_oam
_open_card_oam:                         ; @open_card_oam
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
	cmp	w8, #31
	b.eq	LBB0_5
; %bb.1:
	mov	x19, x0
	mov	w1, #0
Lloh0:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	adrp	x27, _SAR_RCTE_CONNECTOPEN@GOTPAGE
Lloh3:
	ldr	x27, [x27, _SAR_RCTE_CONNECTOPEN@GOTPAGEOFF]
Lloh4:
	adrp	x28, _SAR_RCTE_RAWCELLINTEN@GOTPAGE
Lloh5:
	ldr	x28, [x28, _SAR_RCTE_RAWCELLINTEN@GOTPAGEOFF]
Lloh6:
	adrp	x24, _SAR_RCTE_RCQ@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SAR_RCTE_RCQ@GOTPAGEOFF]
Lloh8:
	adrp	x26, _SAR_RCTE_FBP_1@GOTPAGE
Lloh9:
	ldr	x26, [x26, _SAR_RCTE_FBP_1@GOTPAGEOFF]
	add	x20, x0, #8
Lloh10:
	adrp	x21, _SAR_CMD_OPEN_CONNECTION@GOTPAGE
Lloh11:
	ldr	x21, [x21, _SAR_CMD_OPEN_CONNECTION@GOTPAGEOFF]
Lloh12:
	adrp	x22, _SAR_REG_CMD@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SAR_REG_CMD@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	str	w1, [sp, #12]                   ; 4-byte Folded Spill
	mov	w2, #3
	bl	_VPCI2VC
	mov	x23, x0
	ldr	w1, [x25]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x25, x22
	mov	x22, x0
	str	w23, [x0]
	ldr	x8, [x19, #16]
	str	x0, [x8, w23, sxtw #3]
	add	x1, x0, #4
	mov	x0, x19
	bl	_flush_rx_pool
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w8, w9, w8
	ldr	w9, [x24]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w2, w8, w9
	ldrsw	x8, [x19, #4]
	ldr	w9, [x22]
	lsl	w9, w9, #2
	add	x22, x8, w9, sxtw
	mov	x0, x19
	mov	x1, x22
	bl	_write_sram
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x21]
	orr	x0, x8, x22, lsl #2
	ldr	w1, [x25]
	bl	_writel
	mov	x0, x19
	bl	_waitfor_idle
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	w2, #4
	bl	_VPCI2VC
	mov	x23, x0
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, x0
	str	w23, [x0]
	ldr	x8, [x19, #16]
	str	x0, [x8, w23, sxtw #3]
	add	x1, x0, #4
	mov	x0, x19
	bl	_flush_rx_pool
	ldr	w8, [x27]
	ldr	w9, [x28]
	orr	w8, w9, w8
	ldr	w9, [x24]
	orr	w8, w8, w9
	ldr	w9, [x26]
	orr	w2, w8, w9
	ldrsw	x8, [x19, #4]
	ldr	w9, [x22]
	lsl	w9, w9, #2
	add	x22, x8, w9, sxtw
	mov	x0, x19
	mov	x1, x22
	bl	_write_sram
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x21]
	orr	x0, x8, x22, lsl #2
	mov	x22, x25
	ldr	w1, [x25]
	bl	_writel
	mov	x0, x19
	bl	_waitfor_idle
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	add	w1, w1, #1
	ldr	w8, [x19]
	mov	w9, #1
	lsl	w8, w9, w8
	cmp	w1, w8
Lloh17:
	adrp	x25, _GFP_KERNEL@GOTPAGE
Lloh18:
	ldr	x25, [x25, _GFP_KERNEL@GOTPAGEOFF]
	b.lt	LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
	ldr	w1, [x19, #24]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: can't alloc vc\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SAR_RCTE_CONNECTOPEN,4,2       ; @SAR_RCTE_CONNECTOPEN
	.comm	_SAR_RCTE_RAWCELLINTEN,4,2      ; @SAR_RCTE_RAWCELLINTEN
	.comm	_SAR_RCTE_RCQ,4,2               ; @SAR_RCTE_RCQ
	.comm	_SAR_RCTE_FBP_1,4,2             ; @SAR_RCTE_FBP_1
	.comm	_SAR_CMD_OPEN_CONNECTION,8,3    ; @SAR_CMD_OPEN_CONNECTION
	.comm	_SAR_REG_CMD,4,2                ; @SAR_REG_CMD
	.no_dead_strip	_open_card_oam
.subsections_via_symbols
