	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function kfd_gtt_sa_init
_kfd_gtt_sa_init:                       ## @kfd_gtt_sa_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %r14
	xorl	%edi, %edi
	cmpl	%edx, %esi
	setb	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_1
## %bb.3:
	xorl	%edi, %edi
	testl	%r12d, %r12d
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_1
## %bb.4:
	xorl	%edi, %edi
	testl	%r15d, %r15d
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	%r15d, (%r14)
	xorl	%ebx, %ebx
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	%r15d
                                        ## kill: def $eax killed $eax def $rax
	movl	%eax, 4(%r14)
	movq	_BITS_PER_LONG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %eax
	decl	%eax
	xorl	%edx, %edx
	divl	%ecx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	movl	%eax, 12(%r14)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movl	4(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_pr_debug
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_init
	jmp	LBB0_8
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BITS_PER_LONG,4,2              ## @BITS_PER_LONG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"gtt_sa_num_of_chunks = %d, gtt_sa_bitmap = %p\n"

	.no_dead_strip	_kfd_gtt_sa_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function kfd_gtt_sa_init
_kfd_gtt_sa_init:                       ; @kfd_gtt_sa_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, x2
	mov	x21, x1
	mov	x19, x0
	cmp	w1, w2
	cset	w0, lo
	bl	_WARN_ON
	cbnz	x0, LBB0_3
; %bb.1:
	cmp	w21, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_3
; %bb.2:
	cmp	w20, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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_6:
	udiv	w8, w21, w20
	stp	w20, w8, [x19]
Lloh2:
	adrp	x9, _BITS_PER_LONG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BITS_PER_LONG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	add	w8, w8, w9
	sub	w8, w8, #1
Lloh5:
	adrp	x10, _GFP_KERNEL@GOTPAGE
Lloh6:
	ldr	x10, [x10, _GFP_KERNEL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x10]
	udiv	w0, w8, w9
	mov	w1, #8
	bl	_kcalloc
	str	w0, [x19, #12]
	cbz	w0, LBB0_8
; %bb.7:
	mov	x2, x0
	ldr	w1, [x19, #4]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	add	x0, x19, #8
	bl	_mutex_init
	mov	w0, #0
	b	LBB0_5
LBB0_8:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BITS_PER_LONG,4,2              ; @BITS_PER_LONG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"gtt_sa_num_of_chunks = %d, gtt_sa_bitmap = %p\n"

	.no_dead_strip	_kfd_gtt_sa_init
.subsections_via_symbols
