	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_swap_code_seg_alloc
_ath10k_swap_code_seg_alloc:            ## @ath10k_swap_code_seg_alloc
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movl	$2, %esi
	callq	_roundup
	movq	%rax, %r14
	movq	_ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpq	%rcx, %r14
	jbe	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_ath10k_err
	jmp	LBB0_6
LBB0_2:
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r12
	movl	(%rbx), %edi
	movl	(%r15), %ecx
	leaq	-40(%rbp), %rdx
	movq	%r14, %rsi
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	%rax, %r15
	movq	-40(%rbp), %rdi
	callq	___cpu_to_le32
	movq	48(%r12), %rcx
	movq	%rax, (%rcx)
	movq	%r14, %rdi
	callq	___cpu_to_le32
	movq	%rax, 40(%r12)
	movq	%r14, %rdi
	callq	___cpu_to_le32
	movq	%rax, 32(%r12)
	movq	_ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	___cpu_to_le32
	movq	%rax, 24(%r12)
	movq	%r14, %rdi
	callq	_ilog2
	movq	%rax, %rdi
	callq	___cpu_to_le32
	movq	%rax, 16(%r12)
	movq	8(%r12), %rax
	movq	%r15, (%rax)
	movq	-40(%rbp), %rax
	movq	(%r12), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_7
LBB0_6:
	xorl	%r12d, %r12d
LBB0_7:
	movq	%r12, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX,8,3 ## @ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"refusing code swap bin because it is too big %zu > %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED,8,3 ## @ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED
	.no_dead_strip	_ath10k_swap_code_seg_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_swap_code_seg_alloc
_ath10k_swap_code_seg_alloc:            ; @ath10k_swap_code_seg_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x0
	mov	x0, x1
	mov	w1, #2
	bl	_roundup
	mov	x19, x0
Lloh0:
	adrp	x8, _ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x3, [x8]
	cmp	x0, x3
	b.ls	LBB0_3
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x19
	bl	_ath10k_err
LBB0_2:
	mov	x20, #0
	b	LBB0_6
LBB0_3:
	ldr	w0, [x21]
Lloh5:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #56
	bl	_devm_kzalloc
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w0, [x21]
	ldr	w3, [x22]
	add	x2, sp, #8
	mov	x1, x19
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_2
; %bb.5:
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	___cpu_to_le32
	ldr	x8, [x20, #48]
	str	x0, [x8]
	mov	x0, x19
	bl	___cpu_to_le32
	str	x0, [x20, #40]
	mov	x0, x19
	bl	___cpu_to_le32
	str	x0, [x20, #32]
Lloh7:
	adrp	x8, _ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED@GOTPAGEOFF]
Lloh9:
	ldr	x0, [x8]
	bl	___cpu_to_le32
	str	x0, [x20, #24]
	mov	x0, x19
	bl	_ilog2
	bl	___cpu_to_le32
	str	x0, [x20, #16]
	ldr	x8, [x20, #8]
	str	x21, [x8]
	ldr	x8, [sp, #8]
	ldr	x9, [x20]
	str	x8, [x9]
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX,8,3 ; @ATH10K_SWAP_CODE_SEG_BIN_LEN_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"refusing code swap bin because it is too big %zu > %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED,8,3 ; @ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED
	.no_dead_strip	_ath10k_swap_code_seg_alloc
.subsections_via_symbols
