	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scif_create_remote_lookup
_scif_create_remote_lookup:             ## @scif_create_remote_lookup
	.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, %r13
	movq	%rdi, %rbx
	movl	(%rsi), %r14d
	xorl	%eax, %eax
	callq	_might_sleep
	leaq	56(%r13), %rdi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movl	$64, %ecx
	callq	_scif_map_single
	testl	%eax, %eax
	jne	LBB0_16
## %bb.1:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	imull	%r14d, %edi
	movl	$2097152, %esi                  ## imm = 0x200000
	callq	_ALIGN
                                        ## kill: def $eax killed $eax def $rax
	sarl	$21, %eax
	movl	%eax, 4(%r13)
	leaq	48(%r13), %rdi
	leal	(,%rax,4), %edx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movq	___GFP_ZERO@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	orl	(%r14), %ecx
	movq	%rbx, %rsi
	callq	_scif_alloc_coherent
	movq	%rax, 40(%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	leaq	24(%r13), %rdi
	movl	4(%r13), %edx
	shll	$2, %edx
	movl	(%r15), %ecx
	orl	(%r14), %ecx
	movq	%rbx, %rsi
	callq	_scif_alloc_coherent
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	32(%r13), %rdi
	callq	_is_vmalloc_addr
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	8(%r13), %rdi
	callq	_is_vmalloc_addr
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_5
## %bb.6:
	xorl	%r12d, %r12d
	xorl	%r14d, %r14d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %r15
	addq	%r12, %r15
	movslq	%r14d, %rbx
	shlq	$2, %rbx
	movq	32(%r13), %rdi
	addq	%rbx, %rdi
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	callq	_vmalloc_to_page
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	callq	_virt_to_page
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r15, %rdi
	movl	%eax, %esi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_scif_map_page
	testl	%eax, %eax
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r13), %r15
	addq	%r12, %r15
	addq	8(%r13), %rbx
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_vmalloc_to_page
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_virt_to_page
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%eax, %esi
	movq	%r15, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_scif_map_page
	testl	%eax, %eax
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_SCIF_NR_ADDR_IN_PAGE@GOTPCREL(%rip), %rax
	addl	(%rax), %r14d
	addq	$4, %r12
	xorl	%eax, %eax
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	jl	LBB0_7
	jmp	LBB0_16
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_5:
	xorl	%eax, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SCIF_NR_ADDR_IN_PAGE,8,3       ## @SCIF_NR_ADDR_IN_PAGE
	.no_dead_strip	_scif_create_remote_lookup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scif_create_remote_lookup
_scif_create_remote_lookup:             ; @scif_create_remote_lookup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
	mov	x21, x1
	ldr	w23, [x21], #56
	bl	_might_sleep
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	w3, #64
	bl	_scif_map_single
	cbnz	w0, LBB0_16
; %bb.1:
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mul	w0, w8, w23
	mov	w1, #2097152
	bl	_ALIGN
	asr	w8, w0, #21
	str	w8, [x19, #4]
	add	x0, x19, #48
Lloh3:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	lsl	w2, w8, #2
	ldr	w8, [x21]
Lloh5:
	adrp	x22, ___GFP_ZERO@GOTPAGE
Lloh6:
	ldr	x22, [x22, ___GFP_ZERO@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w3, w9, w8
	mov	x1, x20
	bl	_scif_alloc_coherent
	str	x0, [x19, #40]
	cbz	x0, LBB0_14
; %bb.2:
	add	x0, x19, #24
	ldr	w8, [x19, #4]
	lsl	w2, w8, #2
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w3, w9, w8
	mov	x1, x20
	bl	_scif_alloc_coherent
	str	x0, [x19, #16]
	cbz	x0, LBB0_14
; %bb.3:
	ldr	x0, [x19, #32]
	bl	_is_vmalloc_addr
	mov	x21, x0
	ldr	x0, [x19, #8]
	bl	_is_vmalloc_addr
	cmp	w23, #1
	b.lt	LBB0_15
; %bb.4:
	mov	x22, x0
	mov	x24, #0
	mov	w26, #0
Lloh7:
	adrp	x25, _SCIF_NR_ADDR_IN_PAGE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SCIF_NR_ADDR_IN_PAGE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x8, x27, [x19, #32]
	add	x0, x8, w26, sxtw #2
	cbz	w21, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_vmalloc_to_page
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_virt_to_page
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x0
	add	x0, x27, x24
	mov	x2, x20
	bl	_scif_map_page
	cbnz	w0, LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	sxtw	x26, w26
	ldp	x8, x27, [x19, #8]
	add	x0, x8, x26, lsl #2
	cbz	w22, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	bl	_vmalloc_to_page
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_virt_to_page
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x0
	add	x0, x27, x24
	mov	x2, x20
	bl	_scif_map_page
	cbnz	w0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	add	x24, x24, #4
	add	w26, w26, w8
	cmp	w26, w23
	b.lt	LBB0_5
	b	LBB0_16
LBB0_14:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SCIF_NR_ADDR_IN_PAGE,8,3       ; @SCIF_NR_ADDR_IN_PAGE
	.no_dead_strip	_scif_create_remote_lookup
.subsections_via_symbols
