	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_emul_hdrtype_fixup
_pci_emul_hdrtype_fixup:                ## @pci_emul_hdrtype_fixup
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_PCIR_HDRTYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edx, %eax
	jl	LBB0_9
## %bb.1:
	movl	%ecx, %ebx
	addl	%ecx, %edx
	cmpl	%eax, %edx
	jle	LBB0_9
## %bb.2:
	movq	%r8, %r14
	callq	_pci_emul_is_mfdev
	leal	-1(%rbx), %ecx
	cmpl	$2, %ecx
	jae	LBB0_3
## %bb.6:
	movq	_PCIM_MFDEV@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ecx
	notl	%ecx
	andl	(%r14), %ecx
	movl	%ecx, (%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	orl	(%rdx), %ecx
	jmp	LBB0_8
LBB0_3:
	cmpl	$4, %ebx
	jne	LBB0_9
## %bb.4:
	movq	_PCIM_MFDEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$16, %edx
	notl	%edx
	andl	(%r14), %edx
	movl	%edx, (%r14)
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movl	(%rcx), %ecx
	shll	$16, %ecx
	orl	%edx, %ecx
LBB0_8:
	movl	%ecx, (%r14)
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIR_HDRTYPE,4,2               ## @PCIR_HDRTYPE
	.comm	_PCIM_MFDEV,4,2                 ## @PCIM_MFDEV
	.no_dead_strip	_pci_emul_hdrtype_fixup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_emul_hdrtype_fixup
_pci_emul_hdrtype_fixup:                ; @pci_emul_hdrtype_fixup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	add	w8, w3, w2
Lloh0:
	adrp	x9, _PCIR_HDRTYPE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCIR_HDRTYPE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w9, w2
	ccmp	w8, w9, #4, ge
	b.le	LBB0_8
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	bl	_pci_emul_is_mfdev
	sub	w8, w20, #1
	cmp	w8, #2
	b.hs	LBB0_4
; %bb.2:
Lloh3:
	adrp	x8, _PCIM_MFDEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCIM_MFDEV@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x19]
	bic	w9, w10, w9
	str	w9, [x19]
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w8, [x8]
	orr	w8, w8, w9
	b	LBB0_7
LBB0_4:
	cmp	w20, #4
	b.ne	LBB0_8
; %bb.5:
Lloh5:
	adrp	x8, _PCIM_MFDEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCIM_MFDEV@GOTPAGEOFF]
	ldr	w9, [x8]
	ldr	w10, [x19]
	bic	w9, w10, w9, lsl #16
	str	w9, [x19]
	cbz	w0, LBB0_8
; %bb.6:
	ldr	w8, [x8]
	orr	w8, w9, w8, lsl #16
LBB0_7:
	str	w8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIR_HDRTYPE,4,2               ; @PCIR_HDRTYPE
	.comm	_PCIM_MFDEV,4,2                 ; @PCIM_MFDEV
	.no_dead_strip	_pci_emul_hdrtype_fixup
.subsections_via_symbols
