	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_read_config
_pci_read_config:                       ## @pci_read_config
	.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, %r12
	movl	%r8d, %r15d
	movq	%rcx, %r13
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_kobj_to_dev
	movl	%eax, %edi
	callq	_to_pci_dev
	movq	%rax, %rbx
	movq	_CAP_SYS_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_init_user_ns@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_file_ns_capable
	testq	%rax, %rax
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movl	(%rbx), %eax
	jmp	LBB0_3
LBB0_2:
	movq	8(%rbx), %rcx
	movq	_PCI_HEADER_TYPE_CARDBUS@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpq	(%rdx), %rcx
	sete	%al
	shll	$6, %eax
	addl	$64, %eax
LBB0_3:
	movl	%eax, %r14d
	subl	%r15d, %r14d
	jae	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_5:
	movl	%r15d, %ecx
	addq	%r12, %rcx
	movl	%eax, %eax
	cmpq	%rax, %rcx
	movq	%r14, %rbx
	cmovbeq	%r12, %rbx
	cmovbel	%r12d, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_pci_config_pm_runtime_get
	testb	$1, %r15b
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_9
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_9
## %bb.7:
	leaq	-44(%rbp), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_pci_user_read_config_byte
	movl	-44(%rbp), %eax
	movl	%eax, (%r13)
	leal	1(%r15), %ebx
	decl	%r14d
	testb	$3, %bl
	jne	LBB0_10
	jmp	LBB0_12
LBB0_9:
	movl	%r15d, %ebx
	testb	$3, %bl
	je	LBB0_12
LBB0_10:
	cmpl	$3, %r14d
	jb	LBB0_12
## %bb.11:
	leaq	-44(%rbp), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_pci_user_read_config_word
	movl	-44(%rbp), %eax
	movzbl	%al, %ecx
	movl	%ebx, %edx
	subl	%r15d, %edx
	movl	%ecx, (%r13,%rdx,4)
	movzbl	%ah, %eax
	incl	%edx
	movl	%eax, (%r13,%rdx,4)
	addl	$2, %ebx
	addl	$-2, %r14d
LBB0_12:
	cmpl	$4, %r14d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jb	LBB0_17
## %bb.13:
                                        ## kill: def $r15d killed $r15d killed $r15 def $r15
	negl	%r15d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	leaq	-44(%rbp), %rdx
	callq	_pci_user_read_config_dword
	movl	-44(%rbp), %eax
	movzbl	%al, %ecx
	leal	(%r15,%rbx), %edx
	movl	%ecx, (%r13,%rdx,4)
	movzbl	%ah, %ecx
	leal	(%r15,%rbx), %edx
	incl	%edx
	movl	%ecx, (%r13,%rdx,4)
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	leal	(%r15,%rbx), %edx
	addl	$2, %edx
	movl	%ecx, (%r13,%rdx,4)
	shrl	$24, %eax
	leal	(%r15,%rbx), %ecx
	addl	$3, %ecx
	movl	%eax, (%r13,%rcx,4)
	addl	$4, %ebx
	addl	$-4, %r14d
	cmpl	$3, %r14d
	ja	LBB0_14
## %bb.15:
	cmpl	$2, %r14d
	jb	LBB0_18
LBB0_16:
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_pci_user_read_config_word
	movl	-44(%rbp), %eax
	movzbl	%al, %ecx
	movl	%ebx, %edx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	subl	%r15d, %edx
	movl	%ecx, (%r13,%rdx,4)
	movzbl	%ah, %eax
	incl	%edx
	movl	%eax, (%r13,%rdx,4)
	addl	$2, %ebx
	addl	$-2, %r14d
	testl	%r14d, %r14d
	jne	LBB0_19
	jmp	LBB0_20
LBB0_17:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	cmpl	$2, %r14d
	jae	LBB0_16
LBB0_18:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	testl	%r14d, %r14d
	je	LBB0_20
LBB0_19:
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_pci_user_read_config_byte
	movl	-44(%rbp), %eax
	subl	%r15d, %ebx
	movl	%eax, (%r13,%rbx,4)
LBB0_20:
	movq	%r12, %rdi
	callq	_pci_config_pm_runtime_put
	movq	-72(%rbp), %rax                 ## 8-byte Reload
LBB0_21:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_init_user_ns,4,2               ## @init_user_ns
	.comm	_CAP_SYS_ADMIN,4,2              ## @CAP_SYS_ADMIN
	.comm	_PCI_HEADER_TYPE_CARDBUS,8,3    ## @PCI_HEADER_TYPE_CARDBUS
	.no_dead_strip	_pci_read_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_read_config
_pci_read_config:                       ; @pci_read_config
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x23, x5
	mov	x20, x4
	mov	x19, x3
	mov	x22, x0
	mov	x0, x1
	bl	_kobj_to_dev
	bl	_to_pci_dev
	mov	x21, x0
Lloh0:
	adrp	x8, _CAP_SYS_ADMIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CAP_SYS_ADMIN@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x1, _init_user_ns@GOTPAGE
Lloh4:
	ldr	x1, [x1, _init_user_ns@GOTPAGEOFF]
	mov	x0, x22
	bl	_file_ns_capable
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x21]
	subs	w9, w8, w20
	b.hs	LBB0_4
LBB0_2:
	mov	x22, #0
	b	LBB0_18
LBB0_3:
Lloh5:
	adrp	x8, _PCI_HEADER_TYPE_CARDBUS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_HEADER_TYPE_CARDBUS@GOTPAGEOFF]
	ldr	x9, [x21, #8]
Lloh7:
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #64
	mov	w9, #128
	csel	w8, w9, w8, eq
	subs	w9, w8, w20
	b.lo	LBB0_2
LBB0_4:
	add	x10, x23, w20, uxtw
	cmp	x10, w8, uxtw
	csel	x22, x9, x23, hi
	csel	w24, w9, w23, hi
	mov	x0, x21
	bl	_pci_config_pm_runtime_get
	mov	x23, x20
	tbz	w20, #0, LBB0_7
; %bb.5:
	cbz	w24, LBB0_7
; %bb.6:
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x20
	bl	_pci_user_read_config_byte
	ldr	w8, [sp, #12]
	str	w8, [x19]
	add	w23, w20, #1
	sub	w24, w24, #1
LBB0_7:
	tst	w23, #0x3
	b.eq	LBB0_10
; %bb.8:
	cmp	w24, #3
	b.lo	LBB0_10
; %bb.9:
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_read_config_word
	ldr	w8, [sp, #12]
	and	w9, w8, #0xff
	sub	w10, w23, w20
	str	w9, [x19, w10, uxtw #2]
	ubfx	w8, w8, #8, #8
	add	w9, w10, #1
	str	w8, [x19, w9, uxtw #2]
	add	w23, w23, #2
	sub	w24, w24, #2
LBB0_10:
	cmp	w24, #4
	b.lo	LBB0_13
; %bb.11:
	neg	w25, w20
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_read_config_dword
	ldr	w8, [sp, #12]
	and	w9, w8, #0xff
	add	w10, w25, w23
	str	w9, [x19, w10, uxtw #2]
	ubfx	w9, w8, #8, #8
	add	w11, w10, #1
	str	w9, [x19, w11, uxtw #2]
	ubfx	w9, w8, #16, #8
	add	w11, w10, #2
	str	w9, [x19, w11, uxtw #2]
	lsr	w8, w8, #24
	add	w9, w10, #3
	str	w8, [x19, w9, uxtw #2]
	add	w23, w23, #4
	sub	w24, w24, #4
	cmp	w24, #3
	b.hi	LBB0_12
LBB0_13:
	subs	w25, w24, #2
	b.lo	LBB0_15
; %bb.14:
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_read_config_word
	ldr	w8, [sp, #12]
	and	w9, w8, #0xff
	sub	w10, w23, w20
	str	w9, [x19, w10, uxtw #2]
	ubfx	w8, w8, #8, #8
	add	w9, w10, #1
	str	w8, [x19, w9, uxtw #2]
	add	w23, w23, #2
	mov	x24, x25
LBB0_15:
	cbz	w24, LBB0_17
; %bb.16:
	add	x2, sp, #12
	mov	x0, x21
	mov	x1, x23
	bl	_pci_user_read_config_byte
	ldr	w8, [sp, #12]
	sub	w9, w23, w20
	str	w8, [x19, w9, uxtw #2]
LBB0_17:
	mov	x0, x21
	bl	_pci_config_pm_runtime_put
LBB0_18:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_init_user_ns,4,2               ; @init_user_ns
	.comm	_CAP_SYS_ADMIN,4,2              ; @CAP_SYS_ADMIN
	.comm	_PCI_HEADER_TYPE_CARDBUS,8,3    ; @PCI_HEADER_TYPE_CARDBUS
	.no_dead_strip	_pci_read_config
.subsections_via_symbols
