	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	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	%r12d, %r12d
	testq	%rsi, %rsi
	setne	%r15b
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -96(%rbp)
	movaps	%xmm0, -112(%rbp)
	movq	%rdx, -120(%rbp)                ## 8-byte Spill
	movq	%rdx, %rsi
	movl	$1, %edx
	callq	_ide_setup_pci_controller
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_19
## %bb.1:
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	movq	%rbx, -160(%rbp)                ## 8-byte Spill
	movb	%r15b, %r12b
	leal	(%r12,%r12), %eax
	addl	$2, %eax
	movl	%eax, -132(%rbp)                ## 4-byte Spill
                                        ## kill: def $eax killed $eax def $rax
	shrl	%eax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	$1, %r12d
	leaq	-112(%rbp), %r15
	leaq	-80(%rbp), %r13
	movq	%r14, -152(%rbp)                ## 8-byte Spill
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r13, %rdx
	movq	%r15, %rcx
	callq	_ide_pci_setup_ports
	cmpq	%r12, -128(%rbp)                ## 8-byte Folded Reload
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-64(%rbp,%r12,8), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_ide_setup_pci_controller
                                        ## kill: def $eax killed $eax def $rax
	incq	%r12
	addq	$16, %r15
	addq	$8, %r13
	testl	%eax, %eax
	jns	LBB0_2
	jmp	LBB0_19
LBB0_4:
	leaq	-112(%rbp), %rsi
	movq	%rbx, %rdi
	movl	-132(%rbp), %edx                ## 4-byte Reload
	callq	_ide_host_alloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movq	16(%rax), %rax
	movq	-152(%rbp), %r14                ## 8-byte Reload
	movq	%r14, (%rax)
	movq	-160(%rbp), %r12                ## 8-byte Reload
	testq	%r12, %r12
	je	LBB0_8
## %bb.7:
	movq	16(%r15), %rax
	movq	%r12, 8(%rax)
	movq	-144(%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	%r12, %rdi
	jmp	LBB0_9
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_19
LBB0_8:
	movq	-144(%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_9:
	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
	testl	%eax, %eax
	js	LBB0_19
## %bb.10:
	decq	-128(%rbp)                      ## 8-byte Folded Spill
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	movq	-152(%rbp), %rbx                ## 8-byte Reload
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_ide_pci_is_in_compatibility_mode
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_11 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_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r13, %rcx
	addq	%r13, %rcx
	movq	%r12, %rax
	movl	%eax, -80(%rbp,%r14,4)
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	shlq	$2, %rcx
	orq	$4, %rcx
	movl	%eax, -80(%rbp,%rcx)
	subq	$1, -128(%rbp)                  ## 8-byte Folded Spill
	jb	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	-56(%rbp,%r14,4), %rbx
	movq	%rbx, %rdi
	movq	-120(%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	%r13
	testl	%eax, %eax
	jns	LBB0_11
	jmp	LBB0_19
LBB0_16:
	leaq	-112(%rbp), %rdx
	movq	%r15, %rdi
	movq	-120(%rbp), %rsi                ## 8-byte Reload
	callq	_ide_host_register
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	movq	%r15, %rdi
	movq	%rax, %rbx
	callq	_ide_host_free
	movq	%rbx, %rax
	jmp	LBB0_19
LBB0_17:
	xorl	%eax, %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.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, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x21, x3
	mov	x19, x2
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #88]
	stp	x0, x1, [sp, #72]
	cmp	x1, #0
	mov	w8, #4
	mov	w9, #2
	csel	w24, w9, w8, eq
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #16]
	mov	x1, x2
	mov	w2, #1
	bl	_ide_setup_pci_controller
	tbnz	w0, #31, LBB0_4
; %bb.1:
	str	x21, [sp]                       ; 8-byte Folded Spill
	str	w24, [sp, #12]                  ; 4-byte Folded Spill
	lsr	w8, w24, #1
	add	x9, sp, #72
	add	x24, x9, #8
	sub	x21, x8, #1
	add	x25, sp, #16
	add	x26, sp, #56
	mov	x28, x21
	mov	x27, x20
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x27
	mov	x1, x19
	mov	x2, x26
	mov	x3, x25
	bl	_ide_pci_setup_ports
	cbz	x28, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x27, [x24], #8
	mov	x0, x27
	mov	x1, x19
	mov	w2, #0
	bl	_ide_setup_pci_controller
	sub	x28, x28, #1
	add	x25, x25, #16
	add	x26, x26, #8
	tbz	w0, #31, LBB0_2
LBB0_4:
	mov	x22, x0
LBB0_5:
	ldr	x8, [sp, #88]
Lloh3:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh4:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.6:
	mov	x0, x22
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_7:
	add	x1, sp, #16
	mov	x0, x19
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_ide_host_alloc
	cbz	x0, LBB0_10
; %bb.8:
	mov	x27, x0
	ldr	x8, [x0, #16]
	str	x20, [x8]
	cbz	x23, LBB0_11
; %bb.9:
	ldr	x8, [x27, #16]
	str	x23, [x8, #8]
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x8, [x27, #8]
Lloh6:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x27]
	mov	x0, x20
	mov	x1, x27
	bl	_pci_set_drvdata
	mov	x0, x23
	b	LBB0_12
LBB0_10:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
LBB0_11:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	str	x8, [x27, #8]
Lloh12:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x27]
	mov	x0, x20
LBB0_12:
	mov	x1, x27
	bl	_pci_set_drvdata
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_do_ide_setup_pci_device
	mov	x22, x0
	tbnz	w0, #31, LBB0_5
; %bb.13:
	mov	x23, #0
	mov	x24, #0
	add	x8, sp, #72
	add	x25, x8, #8
	add	x26, sp, #56
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_ide_pci_is_in_compatibility_mode
	cbz	x0, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	mov	x0, x20
	mov	w1, #0
	bl	_pci_get_legacy_ide_irq
	str	w0, [x26, x23, lsl #2]
	mov	x0, x20
	mov	w1, #1
	bl	_pci_get_legacy_ide_irq
	mov	x22, x0
	mov	x8, x23
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_14 Depth=1
	lsl	x8, x24, #1
	str	w22, [x26, x23, lsl #2]
LBB0_17:                                ;   in Loop: Header=BB0_14 Depth=1
	lsl	x8, x8, #2
	orr	x8, x8, #0x4
	str	w22, [x26, x8]
	cbz	x21, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x20, [x25], #8
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_do_ide_setup_pci_device
	mov	x22, x0
	sub	x21, x21, #1
	add	x23, x23, #2
	add	x24, x24, #1
	tbz	w0, #31, LBB0_14
	b	LBB0_5
LBB0_19:
	add	x2, sp, #16
	mov	x0, x27
	mov	x1, x19
	bl	_ide_host_register
	mov	x22, x0
	cbz	w0, LBB0_5
; %bb.20:
	mov	x0, x27
	bl	_ide_host_free
	b	LBB0_5
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
.subsections_via_symbols
