	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_allocate
_ioctl_allocate:                        ## @ioctl_allocate
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$64, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	8(%r15), %rax
	movq	%rax, -48(%rbp)
	movq	(%r14), %rcx
	movq	_FW_CDEV_VERSION_ALLOCATE_REGION_END@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_4
## %bb.3:
	movq	24(%r15), %rcx
	addq	%rcx, %rax
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_10
LBB0_4:
	movq	24(%r15), %rcx
	movq	32(%r15), %rax
LBB0_5:
	movq	%rax, -56(%rbp)
	movq	%rbx, %rdi
	addq	$16, %rdi
	movq	%rcx, 40(%rbx)
	movq	_handle_request@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	%rbx, 24(%rbx)
	movl	16(%r15), %eax
	movl	%eax, 56(%rbx)
	movq	%r14, 48(%rbx)
	leaq	-56(%rbp), %rsi
	callq	_fw_core_add_address_handler
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	16(%rbx), %rax
	movq	%rax, 8(%r15)
	movq	_release_address_handler@GOTPCREL(%rip), %rax
	movq	%rax, 8(%rbx)
	movl	(%r13), %edx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_add_client_resource
	testl	%eax, %eax
	js	LBB0_8
## %bb.9:
	movl	(%rbx), %eax
	movl	%eax, (%r15)
	xorl	%r12d, %r12d
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %r12d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_release_address_handler
LBB0_10:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_FW_CDEV_VERSION_ALLOCATE_REGION_END,8,3 ## @FW_CDEV_VERSION_ALLOCATE_REGION_END
	.comm	_handle_request,4,2             ## @handle_request
	.no_dead_strip	_ioctl_allocate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_allocate
_ioctl_allocate:                        ; @ioctl_allocate
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #64
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	x9, [x20, #8]
	str	x9, [sp, #8]
	ldr	x8, [x19]
Lloh2:
	adrp	x10, _FW_CDEV_VERSION_ALLOCATE_REGION_END@GOTPAGE
Lloh3:
	ldr	x10, [x10, _FW_CDEV_VERSION_ALLOCATE_REGION_END@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ge	LBB0_4
; %bb.2:
	ldr	x8, [x20, #24]
	add	x9, x8, x9
	b	LBB0_5
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_4:
	ldp	x8, x9, [x20, #24]
LBB0_5:
	str	x9, [sp]
	add	x0, x21, #16
	str	x8, [x21, #40]
Lloh8:
	adrp	x8, _handle_request@GOTPAGE
Lloh9:
	ldr	x8, [x8, _handle_request@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x21, #32]
	str	x21, [x21, #24]
	ldr	w8, [x20, #16]
	str	w8, [x21, #56]
	str	x19, [x21, #48]
	mov	x1, sp
	bl	_fw_core_add_address_handler
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	x8, [x21, #16]
	str	x8, [x20, #8]
Lloh11:
	adrp	x8, _release_address_handler@GOTPAGE
Lloh12:
	ldr	x8, [x8, _release_address_handler@GOTPAGEOFF]
	str	x8, [x21, #8]
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_add_client_resource
	tbnz	w0, #31, LBB0_9
; %bb.7:
	mov	w22, #0
	ldr	w8, [x21]
	str	w8, [x20]
	b	LBB0_10
LBB0_8:
	mov	x22, x0
	mov	x0, x21
	bl	_kfree
	b	LBB0_10
LBB0_9:
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_release_address_handler
LBB0_10:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_FW_CDEV_VERSION_ALLOCATE_REGION_END,8,3 ; @FW_CDEV_VERSION_ALLOCATE_REGION_END
	.comm	_handle_request,4,2             ; @handle_request
	.no_dead_strip	_ioctl_allocate
.subsections_via_symbols
