	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_bo_list_ioctl           ## -- Begin function amdgpu_bo_list_ioctl
	.p2align	4, 0x90
_amdgpu_bo_list_ioctl:                  ## @amdgpu_bo_list_ioctl
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %r14
	movl	(%rsi), %r15d
	movq	$0, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_amdgpu_bo_create_list_entry_array
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movl	4(%r12), %eax
	cmpl	$128, %eax
	je	LBB0_6
## %bb.2:
	cmpl	$129, %eax
	je	LBB0_12
## %bb.3:
	cmpl	$130, %eax
	jne	LBB0_11
## %bb.4:
	movq	-64(%rbp), %rdx
	movl	8(%r12), %ecx
	leaq	-56(%rbp), %r8
	movq	%r13, %rsi
	callq	_amdgpu_bo_list_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.5:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	4(%rbx), %rdi
	movq	-56(%rbp), %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_idr_alloc
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	jns	LBB0_13
	jmp	LBB0_9
LBB0_6:
	movq	-64(%rbp), %rdx
	movl	8(%r12), %ecx
	leaq	-56(%rbp), %r8
	movq	%r13, %rsi
	callq	_amdgpu_bo_list_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	4(%rbx), %rdi
	movq	-56(%rbp), %rsi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	callq	_idr_replace
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	callq	_IS_ERR
	movq	%r15, %rdi
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:
	callq	_PTR_ERR
	movl	%eax, %r14d
LBB0_9:
	movq	-56(%rbp), %rdi
	callq	_amdgpu_bo_list_put
	movl	%r14d, %ebx
	jmp	LBB0_14
LBB0_12:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_amdgpu_bo_list_destroy
	xorl	%r14d, %r14d
LBB0_13:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$12, %edx
	callq	_memset
	movl	%r14d, (%r12)
	jmp	LBB0_14
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movq	-64(%rbp), %rdi
	callq	_kvfree
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	_amdgpu_bo_list_put
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_bo_list_ioctl           ; -- Begin function amdgpu_bo_list_ioctl
	.p2align	2
_amdgpu_bo_list_ioctl:                  ; @amdgpu_bo_list_ioctl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x2
	mov	x19, x1
	ldr	x23, [x0]
	ldr	x21, [x2]
	ldr	w20, [x1]
	str	xzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_amdgpu_bo_create_list_entry_array
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.2:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.3:
	cmp	w8, #130
	b.ne	LBB0_12
; %bb.4:
	ldr	x2, [sp, #8]
	ldr	w3, [x19, #8]
	mov	x4, sp
	mov	x0, x23
	mov	x1, x22
	bl	_amdgpu_bo_list_create
	mov	x24, x0
	cbnz	w0, LBB0_13
; %bb.5:
	mov	x0, x21
	bl	_mutex_lock
	add	x0, x21, #4
	ldr	x1, [sp]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w4, [x8]
	mov	w2, #1
	mov	w3, #0
	bl	_idr_alloc
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	tbz	w20, #31, LBB0_11
	b	LBB0_9
LBB0_6:
	ldr	x2, [sp, #8]
	ldr	w3, [x19, #8]
	mov	x4, sp
	mov	x0, x23
	mov	x1, x22
	bl	_amdgpu_bo_list_create
	mov	x24, x0
	cbnz	w0, LBB0_13
; %bb.7:
	mov	x0, x21
	bl	_mutex_lock
	add	x0, x21, #4
	ldr	x1, [sp]
	mov	x2, x20
	bl	_idr_replace
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x22
	bl	_IS_ERR
	cbz	w0, LBB0_15
; %bb.8:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x20, x0
LBB0_9:
	ldr	x0, [sp]
	bl	_amdgpu_bo_list_put
	mov	x24, x20
	b	LBB0_13
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	bl	_amdgpu_bo_list_destroy
	mov	w20, #0
LBB0_11:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	mov	w24, #0
	str	w20, [x19]
	b	LBB0_13
LBB0_12:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_13:
	ldr	x0, [sp, #8]
	bl	_kvfree
LBB0_14:
	mov	x0, x24
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
	mov	x0, x22
	bl	_amdgpu_bo_list_put
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
