	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_pci_init_two               ## -- Begin function ide_pci_init_two
	.p2align	4, 0x90
_ide_pci_init_two:                      ## @ide_pci_init_two
	.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	$136, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -64(%rbp)
	movq	%rsi, -56(%rbp)
	xorl	%r13d, %r13d
	testq	%rsi, %rsi
	setne	%r15b
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movl	(%rdx), %eax
	movq	_IDE_HFLAG_SINGLE@GOTPCREL(%rip), %rsi
	testl	%eax, (%rsi)
	movl	$15, %esi
	movl	$3, %r12d
	cmovel	%esi, %r12d
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	_IDE_HFLAG_NO_DMA@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.1:
	movq	_IDE_HFLAG_CS5520@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	orl	$4, %r12d
	jmp	LBB0_4
LBB0_3:
	orl	$16, %r12d
LBB0_4:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rdx, -144(%rbp)                ## 8-byte Spill
	movl	$1, %ecx
	callq	_ide_setup_pci_controller
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_5
## %bb.9:
	movq	%rbx, -168(%rbp)                ## 8-byte Spill
	movl	%r12d, -116(%rbp)               ## 4-byte Spill
	movb	%r15b, %r13b
	leal	2(%r13,%r13), %eax
	movl	%eax, -148(%rbp)                ## 4-byte Spill
                                        ## kill: def $eax killed $eax def $rax
	shrl	%eax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	decq	%rax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	leaq	-112(%rbp), %r13
	leaq	-80(%rbp), %r15
	xorl	%r12d, %r12d
	movq	%r14, -136(%rbp)                ## 8-byte Spill
	movq	-144(%rbp), %rbx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	movq	%r13, %rcx
	callq	_ide_pci_setup_ports
	cmpq	%r12, -160(%rbp)                ## 8-byte Folded Reload
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-56(%rbp,%r12,8), %r14
	movq	%r14, %rdi
	movl	-116(%rbp), %esi                ## 4-byte Reload
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_ide_setup_pci_controller
                                        ## kill: def $eax killed $eax def $rax
	addq	$16, %r13
	addq	$8, %r15
	incq	%r12
	testl	%eax, %eax
	jns	LBB0_10
## %bb.6:
	cmpl	$1, %r12d
	sete	%cl
	movl	-116(%rbp), %r12d               ## 4-byte Reload
	movq	-136(%rbp), %r14                ## 8-byte Reload
	testb	%cl, %cl
	jne	LBB0_8
	jmp	LBB0_30
LBB0_5:
	xorl	%ecx, %ecx
	testb	%cl, %cl
	je	LBB0_30
LBB0_8:
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rax, %rbx
	callq	_pci_release_selected_regions
	movq	%rbx, %rax
	jmp	LBB0_30
LBB0_12:
	leaq	-112(%rbp), %rsi
	movq	%rbx, %rdi
	movl	-148(%rbp), %edx                ## 4-byte Reload
	callq	_ide_host_alloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, %r15
	movq	16(%rax), %rax
	movq	-136(%rbp), %r14                ## 8-byte Reload
	movq	%r14, (%rax)
	movq	-168(%rbp), %r13                ## 8-byte Reload
	testq	%r13, %r13
	movl	-116(%rbp), %r12d               ## 4-byte Reload
	je	LBB0_16
## %bb.15:
	movq	16(%r15), %rax
	movq	%r13, 8(%rax)
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	%rax, 8(%r15)
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_pci_set_drvdata
	movq	%r13, %rdi
	jmp	LBB0_17
LBB0_13:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	movl	-116(%rbp), %r12d               ## 4-byte Reload
	jmp	LBB0_27
LBB0_16:
	movq	-128(%rbp), %rax                ## 8-byte Reload
	movq	%rax, 8(%r15)
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movq	%r14, %rdi
LBB0_17:
	movq	%r15, %rsi
	callq	_pci_set_drvdata
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_do_ide_setup_pci_device
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, %r13
	testl	%eax, %eax
	js	LBB0_27
## %bb.18:
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_ide_pci_is_in_compatibility_mode
	testq	%rax, %rax
	je	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pci_get_legacy_ide_irq
	movl	%eax, -80(%rbp,%r14,4)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pci_get_legacy_ide_irq
	movq	%r14, %rcx
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	leaq	(%r15,%r15), %rcx
	movq	%r13, %rax
	movl	%eax, -80(%rbp,%r14,4)
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	shlq	$2, %rcx
	orq	$4, %rcx
	movl	%eax, -80(%rbp,%rcx)
	subq	$1, -160(%rbp)                  ## 8-byte Folded Spill
	jb	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-56(%rbp,%r14,4), %rbx
	movq	%rbx, %rdi
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	xorl	%edx, %edx
	callq	_do_ide_setup_pci_device
                                        ## kill: def $eax killed $eax def $rax
	addq	$2, %r14
	incq	%r15
	movq	%rax, %r13
	testl	%eax, %eax
	jns	LBB0_19
	jmp	LBB0_27
LBB0_24:
	leaq	-112(%rbp), %rdx
	movq	-128(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	callq	_ide_host_register
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_25
## %bb.26:
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_ide_host_free
LBB0_27:
	movq	-176(%rbp), %rbx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp,%rbx,8), %rdi
	decq	%rbx
	movl	%r12d, %esi
	callq	_pci_release_selected_regions
	testl	%ebx, %ebx
	jne	LBB0_28
## %bb.29:
	movq	%r13, %rax
LBB0_30:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_32
## %bb.31:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$136, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	xorl	%eax, %eax
	jmp	LBB0_30
LBB0_32:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IDE_HFLAG_SINGLE,4,2           ## @IDE_HFLAG_SINGLE
	.comm	_IDE_HFLAG_NO_DMA,4,2           ## @IDE_HFLAG_NO_DMA
	.comm	_IDE_HFLAG_CS5520,4,2           ## @IDE_HFLAG_CS5520
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_pci_init_two               ; -- Begin function ide_pci_init_two
	.p2align	2
_ide_pci_init_two:                      ; @ide_pci_init_two
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x28, x27, [sp, #112]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #128]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x3
	mov	x20, x2
	mov	x23, x1
	mov	x28, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	stp	x0, x1, [sp, #88]
	cmp	x1, #0
	mov	w8, #4
	mov	w9, #2
	csel	w25, w9, w8, eq
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
	ldr	w8, [x2]
Lloh3:
	adrp	x9, _IDE_HFLAG_SINGLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IDE_HFLAG_SINGLE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w9, #3
	mov	w10, #15
	csel	w19, w10, w9, eq
Lloh6:
	adrp	x9, _IDE_HFLAG_NO_DMA@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IDE_HFLAG_NO_DMA@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_2
; %bb.1:
Lloh9:
	adrp	x9, _IDE_HFLAG_CS5520@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IDE_HFLAG_CS5520@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	orr	w8, w19, #0x10
	orr	w9, w19, #0x4
	csel	w19, w8, w9, eq
LBB0_2:
	mov	x0, x28
	mov	x1, x19
	mov	x2, x20
	mov	w3, #1
	bl	_ide_setup_pci_controller
	tbnz	w0, #31, LBB0_7
; %bb.3:
	stp	x24, x23, [sp]                  ; 16-byte Folded Spill
	mov	x24, #0
	str	w25, [sp, #16]                  ; 4-byte Folded Spill
	lsr	w25, w25, #1
	add	x8, sp, #88
	add	x21, x8, #8
	sub	x23, x25, #1
	add	x26, sp, #32
	add	x27, sp, #72
	str	x28, [sp, #24]                  ; 8-byte Folded Spill
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x28
	mov	x1, x20
	mov	x2, x27
	mov	x3, x26
	bl	_ide_pci_setup_ports
	cmp	x23, x24
	b.eq	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x28, [x21, x24, lsl #3]
	mov	x0, x28
	mov	x1, x19
	mov	x2, x20
	mov	w3, #0
	bl	_ide_setup_pci_controller
	add	x26, x26, #16
	add	x27, x27, #8
	add	x24, x24, #1
	tbz	w0, #31, LBB0_4
; %bb.6:
	mov	x22, x0
	cmp	w24, #1
	cset	w8, eq
	ldr	x28, [sp, #24]                  ; 8-byte Folded Reload
	cbnz	w8, LBB0_8
	b	LBB0_25
LBB0_7:
	mov	x22, x0
	mov	w8, #0
	cbz	w8, LBB0_25
LBB0_8:
	mov	x0, x28
	mov	x1, x19
	bl	_pci_release_selected_regions
	b	LBB0_25
LBB0_9:
	add	x1, sp, #32
	mov	x0, x20
	ldr	w2, [sp, #16]                   ; 4-byte Folded Reload
	bl	_ide_host_alloc
	cbz	x0, LBB0_12
; %bb.10:
	mov	x24, x0
	ldr	x8, [x0, #16]
	ldr	x21, [sp, #24]                  ; 8-byte Folded Reload
	str	x21, [x8]
	ldr	x22, [sp, #8]                   ; 8-byte Folded Reload
	cbz	x22, LBB0_13
; %bb.11:
	ldr	x8, [x24, #16]
	str	x22, [x8, #8]
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x8, [x24, #8]
Lloh12:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x24]
	mov	x0, x21
	mov	x1, x24
	bl	_pci_set_drvdata
	mov	x0, x22
	b	LBB0_14
LBB0_12:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_23
LBB0_13:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x8, [x24, #8]
Lloh18:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x24]
	mov	x0, x21
LBB0_14:
	mov	x1, x24
	bl	_pci_set_drvdata
	mov	x0, x21
	mov	x1, x20
	mov	w2, #1
	bl	_do_ide_setup_pci_device
	mov	x22, x0
	tbnz	w0, #31, LBB0_23
; %bb.15:
	str	x24, [sp, #16]                  ; 8-byte Folded Spill
	mov	x24, #0
	mov	x27, #0
	add	x8, sp, #88
	add	x28, x8, #8
	add	x26, sp, #72
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_ide_pci_is_in_compatibility_mode
	cbz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x21
	mov	w1, #0
	bl	_pci_get_legacy_ide_irq
	str	w0, [x26, x24, lsl #2]
	mov	x0, x21
	mov	w1, #1
	bl	_pci_get_legacy_ide_irq
	mov	x22, x0
	mov	x8, x24
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_16 Depth=1
	lsl	x8, x27, #1
	str	w22, [x26, x24, lsl #2]
LBB0_19:                                ;   in Loop: Header=BB0_16 Depth=1
	lsl	x8, x8, #2
	orr	x8, x8, #0x4
	str	w22, [x26, x8]
	cbz	x23, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x21, [x28], #8
	mov	x0, x21
	mov	x1, x20
	mov	w2, #0
	bl	_do_ide_setup_pci_device
	mov	x22, x0
	sub	x23, x23, #1
	add	x24, x24, #2
	add	x27, x27, #1
	tbz	w0, #31, LBB0_16
	b	LBB0_23
LBB0_21:
	add	x2, sp, #32
	ldr	x21, [sp, #16]                  ; 8-byte Folded Reload
	mov	x0, x21
	mov	x1, x20
	bl	_ide_host_register
	mov	x22, x0
	cbz	w0, LBB0_25
; %bb.22:
	mov	x0, x21
	bl	_ide_host_free
LBB0_23:
	add	x8, sp, #88
	sub	x20, x8, #8
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	sub	x21, x25, #1
	ldr	x0, [x20, x25, lsl #3]
	mov	x1, x19
	bl	_pci_release_selected_regions
	mov	x25, x21
	cbnz	w21, LBB0_24
LBB0_25:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_27
; %bb.26:
	mov	x0, x22
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #128]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_27:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IDE_HFLAG_SINGLE,4,2           ; @IDE_HFLAG_SINGLE
	.comm	_IDE_HFLAG_NO_DMA,4,2           ; @IDE_HFLAG_NO_DMA
	.comm	_IDE_HFLAG_CS5520,4,2           ; @IDE_HFLAG_CS5520
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
.subsections_via_symbols
