	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_job_alloc               ## -- Begin function amdgpu_job_alloc
	.p2align	4, 0x90
_amdgpu_job_alloc:                      ## @amdgpu_job_alloc
	.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
	testl	%esi, %esi
	je	LBB0_1
## %bb.3:
	movq	%rcx, %r12
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	%esi, %eax
	leaq	48(,%rax,4), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	8(%r14), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 40(%rax)
	movq	(%r15), %rax
	movq	%r12, 32(%rax)
	movq	(%r15), %rax
	leaq	48(%rax), %rcx
	movq	%rcx, 24(%rax)
	movq	(%r15), %rdi
	movl	%ebx, (%rdi)
	addq	$16, %rdi
	callq	_amdgpu_sync_create
	movq	(%r15), %rdi
	addq	$12, %rdi
	callq	_amdgpu_sync_create
	movq	%r14, %rdi
	callq	_atomic_read
	movq	(%r15), %rcx
	movl	%eax, 8(%rcx)
	movq	_AMDGPU_BO_INVALID_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rcx)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AMDGPU_BO_INVALID_OFFSET,4,2   ## @AMDGPU_BO_INVALID_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_job_alloc               ; -- Begin function amdgpu_job_alloc
	.p2align	2
_amdgpu_job_alloc:                      ; @amdgpu_job_alloc
	.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
	cbz	w1, LBB0_3
; %bb.1:
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	w8, w1
	lsl	x8, x8, #2
	add	x0, x8, #48
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kzalloc
	str	x0, [x19]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	str	x8, [x0, #40]
	ldr	x8, [x19]
	str	x22, [x8, #32]
	ldr	x8, [x19]
	add	x9, x8, #48
	str	x9, [x8, #24]
	ldr	x0, [x19]
	str	w21, [x0], #16
	bl	_amdgpu_sync_create
	ldr	x8, [x19]
	add	x0, x8, #12
	bl	_amdgpu_sync_create
	mov	x0, x20
	bl	_atomic_read
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
Lloh3:
	adrp	x10, _AMDGPU_BO_INVALID_OFFSET@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AMDGPU_BO_INVALID_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w8, [x9, #4]
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AMDGPU_BO_INVALID_OFFSET,4,2   ; @AMDGPU_BO_INVALID_OFFSET
.subsections_via_symbols
