	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ath10k_pci_claim
_ath10k_pci_claim:                      ## @ath10k_pci_claim
	.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	%rdi, %r15
	callq	_ath10k_pci_priv
	movq	%rax, %r12
	movq	8(%rax), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pci_set_drvdata
	movq	%r14, %rdi
	callq	_pci_enable_device
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_ath10k_err
	jmp	LBB0_13
LBB0_2:
	movq	_BAR_NUM@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_pci_request_region
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	(%r13), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_ath10k_err
	jmp	LBB0_12
LBB0_4:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pci_set_dma_mask
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_6
LBB0_7:
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
LBB0_6:
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_ath10k_err
LBB0_11:
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_pci_release_region
LBB0_12:
	movq	%r14, %rdi
	callq	_pci_disable_device
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	callq	_pci_set_master
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_pci_resource_len
	movl	%eax, 4(%r12)
	movl	(%r13), %esi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_pci_iomap
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_10
## %bb.14:
	movq	_ATH10K_DBG_BOOT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_ath10k_dbg
	jmp	LBB0_13
LBB0_10:
	movl	(%r13), %edx
	leaq	L_.str.5(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_ath10k_err
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_pci_clear_master
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to enable pci device: %d\n"

	.comm	_BAR_NUM,4,2                    ## @BAR_NUM
L_.str.1:                               ## @.str.1
	.asciz	"ath"

L_.str.2:                               ## @.str.2
	.asciz	"failed to request region BAR%d: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed to set dma mask to 32-bit: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to set consistent dma mask to 32-bit: %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"failed to iomap BAR%d\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_ATH10K_DBG_BOOT,4,2            ## @ATH10K_DBG_BOOT
L_.str.6:                               ## @.str.6
	.asciz	"boot pci_mem 0x%pK\n"

	.no_dead_strip	_ath10k_pci_claim
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ath10k_pci_claim
_ath10k_pci_claim:                      ; @ath10k_pci_claim
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x20, x0
	bl	_ath10k_pci_priv
	mov	x22, x0
	ldr	x19, [x0, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_pci_set_drvdata
	mov	x0, x19
	bl	_pci_enable_device
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_ath10k_err
	b	LBB0_11
LBB0_2:
Lloh2:
	adrp	x23, _BAR_NUM@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BAR_NUM@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_request_region
	cbz	w0, LBB0_4
; %bb.3:
	mov	x21, x0
	ldr	w2, [x23]
	str	x21, [sp]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_ath10k_err
	b	LBB0_10
LBB0_4:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_dma_mask
	cbz	w0, LBB0_6
; %bb.5:
	mov	x21, x0
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_consistent_dma_mask
	cbz	w0, LBB0_12
; %bb.7:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_8:
	mov	x0, x20
	mov	x2, x21
	bl	_ath10k_err
LBB0_9:
	ldr	w1, [x23]
	mov	x0, x19
	bl	_pci_release_region
LBB0_10:
	mov	x0, x19
	bl	_pci_disable_device
LBB0_11:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_12:
	mov	x0, x19
	bl	_pci_set_master
	ldr	w1, [x23]
	mov	x0, x19
	bl	_pci_resource_len
	str	w0, [x22, #4]
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #0
	bl	_pci_iomap
	str	w0, [x22]
	cbz	w0, LBB0_14
; %bb.13:
	mov	x3, x0
Lloh12:
	adrp	x8, _ATH10K_DBG_BOOT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ATH10K_DBG_BOOT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.6@PAGE
Lloh16:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x20
	bl	_ath10k_dbg
	mov	w21, #0
	b	LBB0_11
LBB0_14:
	ldr	w2, [x23]
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_ath10k_err
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w21, w8
	mov	x0, x19
	bl	_pci_clear_master
	b	LBB0_9
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to enable pci device: %d\n"

	.comm	_BAR_NUM,4,2                    ; @BAR_NUM
l_.str.1:                               ; @.str.1
	.asciz	"ath"

l_.str.2:                               ; @.str.2
	.asciz	"failed to request region BAR%d: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed to set dma mask to 32-bit: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to set consistent dma mask to 32-bit: %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"failed to iomap BAR%d\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_ATH10K_DBG_BOOT,4,2            ; @ATH10K_DBG_BOOT
l_.str.6:                               ; @.str.6
	.asciz	"boot pci_mem 0x%pK\n"

	.no_dead_strip	_ath10k_pci_claim
.subsections_via_symbols
