	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function transfer_max_buffers
_transfer_max_buffers:                  ## @transfer_max_buffers
	.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	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %ebx
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	andq	%rsi, %r14
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movl	4(%r15), %r8d
	leaq	-48(%rbp), %r9
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %r12
	movl	%r12d, %ecx
	callq	_pin_user_pages
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	4(%r15), %edi
	movl	-48(%rbp), %eax
	subq	$8, %rsp
	movl	%ebx, %esi
	movq	%r13, %rdx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %r8
	movq	-56(%rbp), %r9                  ## 8-byte Reload
	pushq	8(%r15)
	pushq	%r12
	pushq	%rax
	callq	_populate_rw_params
	addq	$32, %rsp
	testl	%r12d, %r12d
	jne	LBB0_5
## %bb.6:
	movq	_PIPE_CMD_READ@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_5:
	movq	_PIPE_CMD_WRITE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_goldfish_pipe_cmd_locked
	movq	24(%rbp), %rcx
	movl	%eax, (%rcx)
	movq	8(%r15), %rax
	movl	(%rax), %ecx
	movq	16(%rbp), %rax
	movl	%ecx, (%rax)
	movl	4(%r15), %edi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_release_user_pages
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_PIPE_CMD_WRITE,4,2             ## @PIPE_CMD_WRITE
	.comm	_PIPE_CMD_READ,4,2              ## @PIPE_CMD_READ
	.no_dead_strip	_transfer_max_buffers
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function transfer_max_buffers
_transfer_max_buffers:                  ; @transfer_max_buffers
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x7
	mov	x21, x6
	mov	x23, x5
	mov	x24, x4
	mov	x20, x3
	mov	x25, x2
	mov	x26, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldr	x27, [x8]
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_5
LBB0_2:
	and	x27, x27, x26
	ldr	w4, [x19, #4]
	add	x5, sp, #12
	mov	x0, x27
	mov	x1, x24
	mov	x2, x23
	mov	x3, x20
	bl	_pin_user_pages
	mov	x23, x0
	tbnz	w0, #31, LBB0_4
; %bb.3:
	ldr	w0, [x19, #4]
	ldr	w6, [sp, #12]
	ldr	x8, [x19, #8]
	str	x8, [sp]
	mov	x1, x23
	mov	x2, x26
	mov	x3, x25
	mov	x4, x27
	mov	x5, x24
	mov	x7, x20
	bl	_populate_rw_params
Lloh6:
	adrp	x8, _PIPE_CMD_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PIPE_CMD_WRITE@GOTPAGEOFF]
Lloh8:
	adrp	x9, _PIPE_CMD_READ@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PIPE_CMD_READ@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w1, [x8]
	mov	x0, x19
	bl	_goldfish_pipe_cmd_locked
	str	w0, [x22]
	ldr	x8, [x19, #8]
	ldr	w3, [x8]
	str	w3, [x21]
	ldr	w0, [x19, #4]
	mov	x1, x23
	mov	x2, x20
	bl	_release_user_pages
	mov	x0, x19
	bl	_mutex_unlock
	mov	w23, #0
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_5:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_PIPE_CMD_WRITE,4,2             ; @PIPE_CMD_WRITE
	.comm	_PIPE_CMD_READ,4,2              ; @PIPE_CMD_READ
	.no_dead_strip	_transfer_max_buffers
.subsections_via_symbols
