	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max_batches
_max_batches:                           ## @max_batches
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_HAS_EXECLISTS
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_igt_request_alloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.7:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_3:
	movq	8(%rbx), %rax
	movl	(%rax), %r14d
	subl	(%rbx), %r14d
	movq	%rbx, %rdi
	callq	_i915_request_add
	movq	8(%rbx), %rax
	movl	4(%rax), %ecx
	subl	4(%rbx), %ecx
	jns	LBB0_5
## %bb.4:
	addl	(%rax), %ecx
LBB0_5:
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movl	%eax, %ecx
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_max_batches
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max_batches
_max_batches:                           ; @max_batches
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_HAS_EXECLISTS
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	mov	x0, x20
	mov	x1, x19
	bl	_igt_request_alloc
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	ldr	w9, [x19]
	sub	w20, w8, w9
	mov	x0, x19
	bl	_i915_request_add
	ldr	x9, [x19, #8]
	ldr	w8, [x9, #4]
	ldr	w10, [x19, #4]
	subs	w8, w8, w10
	b.pl	LBB0_7
; %bb.6:
	ldr	w9, [x9]
	add	w8, w9, w8
LBB0_7:
	sdiv	w8, w20, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_max_batches
.subsections_via_symbols
