	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmf_msgbuf_alloc_pktid
_brcmf_msgbuf_alloc_pktid:              ## @brcmf_msgbuf_alloc_pktid
	.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	%r9, %r13
	movq	%r8, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	24(%rsi), %r14
	movq	8(%rdx), %rsi
	addq	%rcx, %rsi
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rdx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	subq	%rcx, %rdx
	movl	16(%r15), %ecx
	callq	_dma_map_single
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, (%rbx)
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_brcmf_err
	jmp	LBB0_10
LBB0_2:
	xorl	%ebx, %ebx
	movq	%r15, %rcx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movq	8(%r15), %rax
	movq	%r13, %rcx
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx), %rax
	incq	%rax
	movq	%rax, (%r13)
	cmpq	8(%r15), %rax
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, (%r13)
	shlq	$5, %rax
	cmpq	$0, 24(%r14,%rax)
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	(%r14,%rax), %rdi
	addq	$24, %rdi
	xorl	%esi, %esi
	movq	%r15, %r13
	movq	%r14, %r15
	movq	%rdx, %r14
	movl	$1, %edx
	callq	_atomic_cmpxchg
	movq	%r14, %rdx
	movq	%r15, %r14
	movq	%r13, %r15
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	8(%r15), %rax
LBB0_9:
	cmpq	%rax, %rbx
	jne	LBB0_11
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	(%r13), %rax
	shlq	$5, %rax
	movq	%rdx, 16(%r14,%rax)
	movl	(%r12), %eax
	movq	(%r13), %rcx
	movq	%rcx, %rdx
	shlq	$5, %rdx
	movl	%eax, 8(%r14,%rdx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%r14,%rdx)
	movq	%rcx, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dma_map_single failed !!\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_brcmf_msgbuf_alloc_pktid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmf_msgbuf_alloc_pktid
_brcmf_msgbuf_alloc_pktid:              ; @brcmf_msgbuf_alloc_pktid
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x20, x2
	mov	x19, x1
	mov	x24, x0
	ldr	x25, [x1, #24]
	ldp	x9, x8, [x2]
	add	x1, x8, x3
	sub	x2, x9, x3
	ldr	w3, [x19, #16]
	bl	_dma_map_single
	mov	x1, x0
	str	w0, [x22]
	mov	x0, x24
	bl	_dma_mapping_error
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_brcmf_err
	b	LBB0_8
LBB0_2:
	mov	x24, #0
	mov	x9, x19
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldr	x8, [x19, #8]
	mov	x9, x21
	cmp	x24, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x9]
	add	x9, x8, #1
	str	x9, [x21]
	ldr	x10, [x19, #8]
	cmp	x9, x10
	csinc	x8, xzr, x8, eq
	str	x8, [x21]
	add	x0, x25, x8, lsl #5
	ldr	x8, [x0, #24]!
	cbnz	x8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w1, #0
	mov	w2, #1
	bl	_atomic_cmpxchg
	cbnz	x0, LBB0_3
; %bb.6:
	ldr	x8, [x19, #8]
LBB0_7:
	cmp	x24, x8
	b.ne	LBB0_10
LBB0_8:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w0, #0
	ldr	x8, [x21]
	add	x8, x25, x8, lsl #5
	str	x23, [x8, #16]
	ldr	w8, [x22]
	ldr	x9, [x21]
	add	x10, x25, x9, lsl #5
	str	w8, [x10, #8]
	str	x20, [x10]
	str	x9, [x19]
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dma_map_single failed !!\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_brcmf_msgbuf_alloc_pktid
.subsections_via_symbols
