	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ati_create_gatt_pages
_ati_create_gatt_pages:                 ## @ati_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, %r15d
	leal	8(,%r15,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	%rax, %r13
	xorl	%r14d, %r14d
	movl	$0, %eax
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.2:
	movl	%r15d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movl	$4, %edi
	callq	_kzalloc
	movq	%rax, (%r13,%rbx,8)
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %rdi
	callq	_ati_create_page_map
	testl	%eax, %eax
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_3
## %bb.8:
	movl	%r15d, %eax
	xorl	%r14d, %r14d
LBB0_9:
	movq	_ati_generic_private@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	%r13, 8(%rcx)
	jmp	LBB0_13
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_ati_generic_private@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movq	%r13, 8(%rax)
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.11:
	negl	%r14d
	jmp	LBB0_12
LBB0_5:
	movq	_ati_generic_private@GOTPCREL(%rip), %rcx
	movl	%ebx, (%rcx)
	movq	%r13, 8(%rcx)
	movl	%eax, %r14d
LBB0_12:
	xorl	%eax, %eax
	callq	_ati_free_gatt_pages
	jmp	LBB0_13
LBB0_14:
	xorl	%r14d, %r14d
LBB0_13:
	movl	%r14d, %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	_ati_generic_private,16,3       ## @ati_generic_private
	.no_dead_strip	_ati_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 ati_create_gatt_pages
_ati_create_gatt_pages:                 ; @ati_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	x20, 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_6
; %bb.1:
	mov	x19, x0
	cmp	w20, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x23, #0
	mov	w24, w20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x22]
	mov	w0, #4
	bl	_kzalloc
	str	x0, [x19, x23, lsl #3]
	cbz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_ati_create_page_map
	cbnz	w0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	cmp	x24, x23
	b.ne	LBB0_3
	b	LBB0_8
LBB0_6:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_7:
	mov	w20, #0
LBB0_8:
	mov	w21, #0
Lloh5:
	adrp	x8, _ati_generic_private@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ati_generic_private@GOTPAGEOFF]
	str	w20, [x8]
	str	x19, [x8, #8]
	b	LBB0_14
LBB0_9:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _ati_generic_private@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ati_generic_private@GOTPAGEOFF]
	str	w23, [x9]
	str	x19, [x9, #8]
	cbz	w8, LBB0_13
; %bb.10:
	neg	w21, w8
	b	LBB0_12
LBB0_11:
	mov	x21, x0
Lloh12:
	adrp	x8, _ati_generic_private@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ati_generic_private@GOTPAGEOFF]
	str	w23, [x8]
	str	x19, [x8, #8]
LBB0_12:
	bl	_ati_free_gatt_pages
	b	LBB0_14
LBB0_13:
	mov	w21, #0
LBB0_14:
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	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	_ati_generic_private,16,3       ; @ati_generic_private
	.no_dead_strip	_ati_create_gatt_pages
.subsections_via_symbols
