	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_virtual_engine_attach_bond ## -- Begin function intel_virtual_engine_attach_bond
	.p2align	4, 0x90
_intel_virtual_engine_attach_bond:      ## @intel_virtual_engine_attach_bond
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	callq	_to_virtual_engine
	movq	%rax, %r15
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_1
## %bb.5:
	movq	16(%r15), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rdx,%rcx,8)
	je	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_6
	jmp	LBB0_8
LBB0_1:
	xorl	%ecx, %ecx
LBB0_2:
	cmpl	%eax, %ecx
	jne	LBB0_3
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_9:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_virtual_find_bond
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movl	(%rbx), %ecx
	orl	%ecx, (%rax)
	jmp	LBB0_13
LBB0_10:
	movq	8(%r15), %rdi
	movl	4(%r15), %esi
	shll	$4, %esi
	addl	$16, %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movslq	4(%r15), %rcx
	leal	1(%rcx), %edx
	shlq	$4, %rcx
	movq	%r14, 8(%rax,%rcx)
	movl	(%rbx), %esi
	movl	%esi, (%rax,%rcx)
	movq	%rax, 8(%r15)
	movl	%edx, 4(%r15)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_virtual_engine_attach_bond ; -- Begin function intel_virtual_engine_attach_bond
	.p2align	2
_intel_virtual_engine_attach_bond:      ; @intel_virtual_engine_attach_bond
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x2
	mov	x20, x1
	bl	_to_virtual_engine
	mov	x21, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x9, #0
	ldr	x10, [x21, #16]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10, x9, lsl #3]
	cmp	x11, x19
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_2
	b	LBB0_6
LBB0_4:
	mov	w9, #0
LBB0_5:
	cmp	w9, w8
	b.ne	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_8:
	mov	x0, x21
	mov	x1, x20
	bl	_virtual_find_bond
	cbz	x0, LBB0_10
; %bb.9:
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x19]
	ldr	w10, [x8]
	orr	w9, w10, w9
	str	w9, [x8]
	b	LBB0_12
LBB0_10:
	ldr	x0, [x21, #8]
	ldr	w8, [x21, #4]
	lsl	w8, w8, #4
	add	w1, w8, #16
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	bl	_krealloc
	cbz	x0, LBB0_13
; %bb.11:
	mov	x8, x0
	mov	w0, #0
	ldrsw	x9, [x21, #4]
	add	x10, x8, x9, lsl #4
	str	x20, [x10, #8]
	ldr	w11, [x19]
	str	w11, [x10]
	str	x8, [x21, #8]
	add	w8, w9, #1
	str	w8, [x21, #4]
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
