	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_proc_attach_device         ## -- Begin function pci_proc_attach_device
	.p2align	4, 0x90
_pci_proc_attach_device:                ## @pci_proc_attach_device
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_proc_initialized@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	cmpq	$0, 8(%r14)
	jne	LBB0_9
## %bb.4:
	movq	%r14, %rdi
	callq	_pci_proc_domain
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_pci_domain_nr
	movl	(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	leaq	-64(%rbp), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_sprintf
	jmp	LBB0_7
LBB0_1:
	movq	_EACCES@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movl	(%r14), %edx
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %rdi
	xorl	%eax, %eax
	callq	_sprintf
LBB0_7:
	movq	_proc_bus_pci_dir@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdi
	callq	_proc_mkdir
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_8
LBB0_9:
	movl	12(%r15), %edi
	callq	_PCI_SLOT
	movl	%eax, %ebx
	movl	12(%r15), %edi
	callq	_PCI_FUNC
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	leaq	-64(%rbp), %r13
	movq	%r13, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_sprintf
	movq	_S_IFREG@GOTPCREL(%rip), %rax
	movq	_S_IRUGO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_S_IWUSR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	8(%r14), %rdx
	movq	_proc_bus_pci_operations@GOTPCREL(%rip), %rcx
	movq	%r13, %rdi
	movq	%r15, %r8
	callq	_proc_create_data
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%rax, %rbx
	movl	8(%r15), %esi
	movq	%rax, %rdi
	callq	_proc_set_size
	movq	%rbx, (%r15)
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_11:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.12:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_proc_initialized,4,2           ## @proc_initialized
	.comm	_EACCES,4,2                     ## @EACCES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%04x:%02x"

L_.str.1:                               ## @.str.1
	.asciz	"%02x"

	.comm	_proc_bus_pci_dir,4,2           ## @proc_bus_pci_dir
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"%02x.%x"

	.comm	_S_IFREG,4,2                    ## @S_IFREG
	.comm	_S_IRUGO,4,2                    ## @S_IRUGO
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.comm	_proc_bus_pci_operations,4,2    ## @proc_bus_pci_operations
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pci_proc_attach_device         ; -- Begin function pci_proc_attach_device
	.p2align	2
_pci_proc_attach_device:                ; @pci_proc_attach_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x8, _proc_initialized@GOTPAGE
Lloh4:
	ldr	x8, [x8, _proc_initialized@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0, #16]
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_7
; %bb.2:
	mov	x0, x20
	bl	_pci_proc_domain
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_pci_domain_nr
	mov	x2, x0
	ldr	w8, [x20]
	str	x8, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x8, _EACCES@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_10
LBB0_5:
	ldr	w2, [x20]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	add	x0, sp, #8
	bl	_sprintf
Lloh12:
	adrp	x8, _proc_bus_pci_dir@GOTPAGE
Lloh13:
	ldr	x8, [x8, _proc_bus_pci_dir@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x0, sp, #8
	bl	_proc_mkdir
	str	x0, [x20, #8]
	cbz	x0, LBB0_9
LBB0_7:
	ldr	w0, [x19, #12]
	bl	_PCI_SLOT
	mov	x21, x0
	ldr	w0, [x19, #12]
	bl	_PCI_FUNC
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #8
	mov	x2, x21
	bl	_sprintf
Lloh17:
	adrp	x8, _S_IFREG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _S_IFREG@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _S_IRUGO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _S_IRUGO@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _S_IWUSR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _S_IWUSR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w1, w8, w9
	ldr	x2, [x20, #8]
Lloh26:
	adrp	x3, _proc_bus_pci_operations@GOTPAGE
Lloh27:
	ldr	x3, [x3, _proc_bus_pci_operations@GOTPAGEOFF]
	add	x0, sp, #8
	mov	x4, x19
	bl	_proc_create_data
	cbz	x0, LBB0_9
; %bb.8:
	mov	x20, x0
	ldr	w1, [x19, #8]
	bl	_proc_set_size
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_11
LBB0_9:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldr	x8, [sp, #24]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_proc_initialized,4,2           ; @proc_initialized
	.comm	_EACCES,4,2                     ; @EACCES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%04x:%02x"

l_.str.1:                               ; @.str.1
	.asciz	"%02x"

	.comm	_proc_bus_pci_dir,4,2           ; @proc_bus_pci_dir
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"%02x.%x"

	.comm	_S_IFREG,4,2                    ; @S_IFREG
	.comm	_S_IRUGO,4,2                    ; @S_IRUGO
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.comm	_proc_bus_pci_operations,4,2    ; @proc_bus_pci_operations
.subsections_via_symbols
