	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_host1x_job_alloc               ## -- Begin function host1x_job_alloc
	.p2align	4, 0x90
_host1x_job_alloc:                      ## @host1x_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rsi
	movslq	%edx, %rdx
	addl	%r14d, %r15d
	leaq	(,%rdx,4), %r13
	movslq	%r14d, %r12
	shlq	$2, %r12
	movl	%r15d, %eax
	shll	$4, %eax
	leal	(%r12,%r13), %ecx
	leal	(%rax,%rcx), %edi
	addl	$64, %edi
	movq	_ULONG_MAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jl	LBB0_4
## %bb.2:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	leaq	56(%rax), %rdi
	callq	_kref_init
	leaq	64(%rbx), %rax
	xorl	%ecx, %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testl	%edi, %edi
	cmoveq	%rcx, %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 48(%rbx)
	movq	%rax, 40(%rbx)
	leaq	(%rbx,%r13), %rax
	addq	$64, %rax
	movl	%r15d, %edx
	leaq	(%rax,%rdx,4), %rdx
	testl	%r14d, %r14d
	movq	%rdx, %rsi
	cmoveq	%rcx, %rsi
	addq	%rdx, %r12
	testl	%r15d, %r15d
	cmoveq	%rcx, %rax
	movq	%rax, 32(%rbx)
	movq	%rsi, 24(%rbx)
	cmoveq	%rcx, %r12
	movq	%r12, (%rbx)
	movq	%r12, 16(%rbx)
	leaq	(%r12,%rdi,4), %rax
	movq	%rax, 8(%rbx)
	jmp	LBB0_5
LBB0_4:
	xorl	%ebx, %ebx
LBB0_5:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ULONG_MAX,4,2                  ## @ULONG_MAX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_host1x_job_alloc               ; -- Begin function host1x_job_alloc
	.p2align	2
_host1x_job_alloc:                      ; @host1x_job_alloc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x19, x1
	mov	x22, x0
	add	w23, w2, w1
	sbfiz	x25, x20, #2, #32
	sbfiz	x24, x19, #2, #32
	add	w8, w24, w25
	add	w8, w8, w23, lsl #4
	add	w0, w8, #64
Lloh0:
	adrp	x8, _ULONG_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ULONG_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ge	LBB0_2
; %bb.1:
	mov	x21, #0
	b	LBB0_4
LBB0_2:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.3:
	sxtw	x26, w20
	add	x0, x21, #56
	bl	_kref_init
	add	x8, x21, #64
	cmp	w20, #0
	csel	x9, xzr, x8, eq
	add	x8, x8, x25
	add	x10, x8, w23, uxtw #2
	cmp	w19, #0
	csel	x11, xzr, x10, eq
	cmp	w23, #0
	csel	x8, xzr, x8, eq
	stp	x9, x22, [x21, #40]
	stp	x11, x8, [x21, #24]
	add	x8, x10, x24
	csel	x8, xzr, x8, eq
	add	x9, x8, x26, lsl #2
	str	x8, [x21]
	stp	x9, x8, [x21, #8]
LBB0_4:
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ULONG_MAX,4,2                  ; @ULONG_MAX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
.subsections_via_symbols
