	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function ata_scsi_add_hosts
LCPI0_0:
	.long	16                              ## 0x10
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ata_scsi_add_hosts
	.p2align	4, 0x90
_ata_scsi_add_hosts:                    ## @ata_scsi_add_hosts
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_6
## %bb.1:
	movq	%rsi, %r15
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %r13
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_scsi_host_alloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	32(%rax), %rcx
	movq	%r13, (%rcx)
	movq	%rax, (%r13)
	movq	_ata_scsi_transport_template@GOTPCREL(%rip), %rcx
	movq	%rcx, 24(%rax)
	movl	16(%r13), %ecx
	movl	%ecx, 20(%rax)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [16,1,1,16]
	movups	%xmm0, (%rax)
	movl	$1, 16(%rax)
	movq	8(%r13), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_scsi_add_host
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_6:
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_7:
	negl	%r12d
	testl	%ebx, %ebx
	jne	LBB0_9
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %r12d
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rdi
	callq	_scsi_host_put
	testl	%ebx, %ebx
	je	LBB0_11
LBB0_9:
	incq	%rbx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	-16(%rax,%rbx,8), %rax
	movq	(%rax), %r15
	movq	%r15, %rdi
	callq	_scsi_remove_host
	movq	%r15, %rdi
	callq	_scsi_host_put
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_10
LBB0_11:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ata_scsi_transport_template,4,2 ## @ata_scsi_transport_template
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function ata_scsi_add_hosts
lCPI0_0:
	.long	16                              ; 0x10
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	16                              ; 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ata_scsi_add_hosts
	.p2align	2
_ata_scsi_add_hosts:                    ; @ata_scsi_add_hosts
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x22, #0
Lloh0:
	adrp	x23, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ENOMEM@GOTPAGEOFF]
Lloh2:
	adrp	x24, _ata_scsi_transport_template@GOTPAGE
Lloh3:
	ldr	x24, [x24, _ata_scsi_transport_template@GOTPAGEOFF]
	mov	w25, #1
Lloh4:
	adrp	x8, lCPI0_0@PAGE
Lloh5:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp]                        ; 16-byte Folded Spill
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x21, [x8, x22, lsl #3]
	ldr	w26, [x23]
	mov	x0, x20
	mov	w1, #8
	bl	_scsi_host_alloc
	cbz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x0, #32]
	str	x21, [x8]
	str	x0, [x21]
	str	x24, [x0, #24]
	ldr	w8, [x21, #16]
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	str	q0, [x0]
	stp	w25, w8, [x0, #16]
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
	bl	_scsi_add_host
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_5:
	mov	w21, #0
	b	LBB0_10
LBB0_6:
	neg	w21, w26
	cbnz	w22, LBB0_8
	b	LBB0_10
LBB0_7:
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x0, [x8]
	bl	_scsi_host_put
	cbz	w22, LBB0_10
LBB0_8:
	sub	x22, x22, #1
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x22, lsl #3]
	ldr	x20, [x8]
	mov	x0, x20
	bl	_scsi_remove_host
	mov	x0, x20
	bl	_scsi_host_put
	add	x8, x22, #1
	sub	x22, x22, #1
	cmp	x8, #1
	b.hi	LBB0_9
LBB0_10:
	mov	x0, x21
	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 AdrpLdr	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ata_scsi_transport_template,4,2 ; @ata_scsi_transport_template
.subsections_via_symbols
