	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function serverworks_create_gatt_pages
_serverworks_create_gatt_pages:         ## @serverworks_create_gatt_pages
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	leal	8(,%r14,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r15
	testl	%r14d, %r14d
	jle	LBB0_6
## %bb.2:
	movl	%r14d, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, (%r15,%r12,8)
	movq	%rax, %rdi
	callq	_serverworks_create_page_map
	testl	%eax, %eax
	jne	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	cmpq	%r12, %r13
	jne	LBB0_3
LBB0_6:
	movq	_serverworks_private@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movq	%r15, 8(%rax)
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_serverworks_private@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movq	%r15, 8(%rax)
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.9:
	negl	%ebx
	jmp	LBB0_11
LBB0_10:
	movl	%eax, %ebx
	movq	_serverworks_private@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movq	%r15, 8(%rax)
LBB0_11:
	xorl	%eax, %eax
	callq	_serverworks_free_gatt_pages
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %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	_serverworks_private,16,3       ## @serverworks_private
	.no_dead_strip	_serverworks_create_gatt_pages
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function serverworks_create_gatt_pages
_serverworks_create_gatt_pages:         ; @serverworks_create_gatt_pages
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	lsl	w8, w0, #3
	add	w0, w8, #8
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	cmp	w19, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x23, #0
	mov	w8, w19
	lsl	x24, x8, #3
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	w0, #4
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	x0, [x20, x23]
	bl	_serverworks_create_page_map
	cbnz	w0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #8
	cmp	x24, x23
	b.ne	LBB0_3
LBB0_6:
	mov	w21, #0
Lloh2:
	adrp	x8, _serverworks_private@GOTPAGE
Lloh3:
	ldr	x8, [x8, _serverworks_private@GOTPAGEOFF]
	str	w19, [x8]
	str	x20, [x8, #8]
	b	LBB0_13
LBB0_7:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_13
LBB0_8:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _serverworks_private@GOTPAGE
Lloh11:
	ldr	x9, [x9, _serverworks_private@GOTPAGEOFF]
	str	w19, [x9]
	str	x20, [x9, #8]
	cbz	w8, LBB0_12
; %bb.9:
	neg	w21, w8
	b	LBB0_11
LBB0_10:
	mov	x21, x0
Lloh12:
	adrp	x8, _serverworks_private@GOTPAGE
Lloh13:
	ldr	x8, [x8, _serverworks_private@GOTPAGEOFF]
	str	w19, [x8]
	str	x20, [x8, #8]
LBB0_11:
	bl	_serverworks_free_gatt_pages
	b	LBB0_13
LBB0_12:
	mov	w21, #0
LBB0_13:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_serverworks_private,16,3       ; @serverworks_private
	.no_dead_strip	_serverworks_create_gatt_pages
.subsections_via_symbols
