	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_queue_init              ## -- Begin function kernel_queue_init
	.p2align	4, 0x90
_kernel_queue_init:                     ## @kernel_queue_init
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	%rax, %rbx
	movq	_initialize@GOTPCREL(%rip), %rax
	movq	%rax, (%rbx)
	movq	_uninitialize@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_acquire_packet_buffer@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_submit_packet@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_rollback_packet@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	(%r15), %rax
	movl	(%rax), %edx
	leal	-128(%rdx), %eax
	cmpl	$14, %eax
	ja	LBB0_6
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	movq	%rbx, %rdi
	addq	$24, %rdi
	callq	_kernel_queue_init_vi
	jmp	LBB0_8
LBB0_4:
	movq	%rbx, %rdi
	addq	$24, %rdi
	callq	_kernel_queue_init_v9
	jmp	LBB0_8
LBB0_3:
	movq	%rbx, %rdi
	addq	$24, %rdi
	callq	_kernel_queue_init_cik
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_WARN
	jmp	LBB0_10
LBB0_5:
	movq	%rbx, %rdi
	addq	$24, %rdi
	callq	_kernel_queue_init_v10
LBB0_8:
	movq	_KFD_KERNEL_QUEUE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	*(%rbx)
	testq	%rax, %rax
	jne	LBB0_12
## %bb.9:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_10:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_4
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_5
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_uninitialize,4,2               ## @uninitialize
	.comm	_acquire_packet_buffer,4,2      ## @acquire_packet_buffer
	.comm	_submit_packet,4,2              ## @submit_packet
	.comm	_rollback_packet,4,2            ## @rollback_packet
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unexpected ASIC family %u"

	.comm	_KFD_KERNEL_QUEUE_SIZE,4,2      ## @KFD_KERNEL_QUEUE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to init kernel queue\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_kernel_queue_init              ; -- Begin function kernel_queue_init
	.p2align	2
_kernel_queue_init:                     ; @kernel_queue_init
	.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	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_11
; %bb.1:
Lloh3:
	adrp	x8, _initialize@GOTPAGE
Lloh4:
	ldr	x8, [x8, _initialize@GOTPAGEOFF]
	str	x8, [x19]
Lloh5:
	adrp	x8, _uninitialize@GOTPAGE
Lloh6:
	ldr	x8, [x8, _uninitialize@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _acquire_packet_buffer@GOTPAGE
Lloh9:
	ldr	x9, [x9, _acquire_packet_buffer@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
Lloh11:
	adrp	x8, _submit_packet@GOTPAGE
Lloh12:
	ldr	x8, [x8, _submit_packet@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _rollback_packet@GOTPAGE
Lloh15:
	ldr	x9, [x9, _rollback_packet@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #8]
	ldr	x8, [x21]
	ldr	w2, [x8]
	sub	w8, w2, #128
	cmp	w8, #14
	b.hi	LBB0_6
; %bb.2:
Lloh17:
	adrp	x9, lJTI0_0@PAGE
Lloh18:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	add	x0, x19, #24
	bl	_kernel_queue_init_vi
	b	LBB0_8
LBB0_4:
	add	x0, x19, #24
	bl	_kernel_queue_init_v9
	b	LBB0_8
LBB0_5:
	add	x0, x19, #24
	bl	_kernel_queue_init_cik
	b	LBB0_8
LBB0_6:
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_WARN
	b	LBB0_10
LBB0_7:
	add	x0, x19, #24
	bl	_kernel_queue_init_v10
LBB0_8:
	ldr	x8, [x19]
Lloh21:
	adrp	x9, _KFD_KERNEL_QUEUE_SIZE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _KFD_KERNEL_QUEUE_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x9]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	blr	x8
	cbnz	x0, LBB0_11
; %bb.9:
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_10:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_11:
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_5-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_4-LBB0_3)>>2
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_uninitialize,4,2               ; @uninitialize
	.comm	_acquire_packet_buffer,4,2      ; @acquire_packet_buffer
	.comm	_submit_packet,4,2              ; @submit_packet
	.comm	_rollback_packet,4,2            ; @rollback_packet
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unexpected ASIC family %u"

	.comm	_KFD_KERNEL_QUEUE_SIZE,4,2      ; @KFD_KERNEL_QUEUE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to init kernel queue\n"

.subsections_via_symbols
