	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ibm_slot_from_id
_ibm_slot_from_id:                      ## @ibm_slot_from_id
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r15d
	leaq	-40(%rbp), %rdi
	callq	_ibm_get_table_from_acpi
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	movl	%eax, %r12d
	movq	-40(%rbp), %rbx
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	$4, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:
	movq	(%rbx), %rax
	cmpl	%eax, %r12d
	jle	LBB0_11
## %bb.5:
	movq	-40(%rbp), %rcx
	movslq	%eax, %rdx
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	addl	8(%rbx), %eax
	movslq	%eax, %rdx
	cmpl	%r12d, %edx
	jge	LBB0_12
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rcx,%rdx), %rbx
	cmpl	$130, %r15d
	jne	LBB0_6
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$130, (%rcx,%rdx)
	jne	LBB0_6
## %bb.9:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%rax, %r14
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movl	$16, %edx
	callq	_memcpy
	jmp	LBB0_12
LBB0_11:
	xorl	%r14d, %r14d
LBB0_12:
	movq	-40(%rbp), %rdi
	callq	_kfree
	jmp	LBB0_13
LBB0_3:
	xorl	%r14d, %r14d
LBB0_13:
	movq	%r14, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"aPCI"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_ibm_slot_from_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ibm_slot_from_id
_ibm_slot_from_id:                      ; @ibm_slot_from_id
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	add	x0, sp, #8
	bl	_ibm_get_table_from_acpi
	tbnz	w0, #31, LBB0_11
; %bb.1:
	mov	x20, x0
	ldr	x21, [sp, #8]
	ldr	w0, [x21, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w2, #4
	bl	_memcmp
	cbnz	x0, LBB0_9
; %bb.2:
	ldr	x9, [x21]
	cmp	w20, w9
	b.le	LBB0_9
; %bb.3:
	ldr	x8, [sp, #8]
	sxtw	x10, w9
                                        ; kill: def $w9 killed $w9 killed $x9 def $x9
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x21, #8]
	add	w9, w9, w10
	cmp	w9, w20
	sxtw	x10, w9
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x21, x8, x10
	cmp	w19, #130
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w10, [x21]
	cmp	w10, #130
	b.ne	LBB0_4
; %bb.7:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.8:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #16
	bl	_memcpy
	b	LBB0_10
LBB0_9:
	mov	x19, #0
LBB0_10:
	ldr	x0, [sp, #8]
	bl	_kfree
	b	LBB0_12
LBB0_11:
	mov	x19, #0
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"aPCI"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_ibm_slot_from_id
.subsections_via_symbols
