	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svc_prepare_thread             ## -- Begin function svc_prepare_thread
	.p2align	4, 0x90
_svc_prepare_thread:                    ## @svc_prepare_thread
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$40, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	leaq	36(%rax), %rdi
	callq	_init_waitqueue_head
	incl	8(%r14)
	movq	%r15, %rdi
	callq	_spin_lock_bh
	incl	8(%r15)
	movq	%rbx, %rdi
	addq	$32, %rdi
	leaq	4(%r15), %rsi
	callq	_list_add
	movq	%r15, %rdi
	callq	_spin_unlock_bh
	movq	%r14, 24(%rbx)
	movq	%r15, 16(%rbx)
	movl	4(%r14), %edi
	movl	(%r12), %esi
	callq	_kmalloc
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movl	4(%r14), %edi
	movl	(%r12), %esi
	callq	_kmalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_svc_init_buffer
	testl	%eax, %eax
	je	LBB0_4
## %bb.6:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	callq	_svc_exit_thread
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_svc_prepare_thread             ; -- Begin function svc_prepare_thread
	.p2align	2
_svc_prepare_thread:                    ; @svc_prepare_thread
	.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
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #40
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	add	x0, x0, #36
	bl	_init_waitqueue_head
	ldr	w8, [x20, #8]
	add	w8, w8, #1
	str	w8, [x20, #8]
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	w8, [x21, #8]
	add	w8, w8, #1
	str	w8, [x21, #8]
	add	x0, x19, #32
	add	x1, x21, #4
	bl	_list_add
	mov	x0, x21
	bl	_spin_unlock_bh
	stp	x21, x20, [x19, #16]
	ldr	w0, [x20, #4]
	ldr	w1, [x22]
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x20, #4]
	ldr	w1, [x22]
	bl	_kmalloc
	str	x0, [x19]
	cbz	x0, LBB0_5
; %bb.3:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_svc_init_buffer
	cbz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	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
LBB0_5:
	mov	x0, x19
	bl	_svc_exit_thread
LBB0_6:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	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
	b	_ERR_PTR
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
