	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___efi_capsule_setup_info       ## -- Begin function __efi_capsule_setup_info
	.p2align	4, 0x90
___efi_capsule_setup_info:              ## @__efi_capsule_setup_info
	.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	%rdi, %r15
	movl	32(%rdi), %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	callq	_ALIGN
	movq	%rax, %rcx
	movq	(%rbx), %rsi
	orq	%rsi, %rax
	shrq	$32, %rax
	je	LBB0_1
## %bb.2:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rsi
	movq	%rax, %r14
	cmpq	%rcx, %rsi
	jbe	LBB0_5
LBB0_4:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_9:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_1:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%eax, %r14d
	cmpq	%rcx, %rsi
	ja	LBB0_4
LBB0_5:
	movl	28(%r15), %edi
	movl	20(%r15), %edx
	movl	24(%r15), %esi
	leaq	16(%r15), %rcx
	callq	_efi_capsule_supported
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_12
LBB0_7:
	movq	8(%r15), %rdi
	shlq	$3, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movq	___GFP_ZERO@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	orl	(%r12), %edx
	movq	%r14, %rsi
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%rax, 8(%r15)
	movq	(%r15), %rdi
	movl	(%rbx), %edx
	orl	(%r12), %edx
	movq	%r14, %rsi
	callq	_krealloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.11:
	movq	%rax, (%r15)
	xorl	%ebx, %ebx
LBB0_12:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid capsule size\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"capsule not supported\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___efi_capsule_setup_info       ; -- Begin function __efi_capsule_setup_info
	.p2align	2
___efi_capsule_setup_info:              ; @__efi_capsule_setup_info
	.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	x19, x0
	ldr	w0, [x0, #32]
Lloh0:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x1, [x20]
	bl	_ALIGN
	ldr	x22, [x20]
	cmp	x22, x0
	b.ls	LBB0_3
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_3:
	mov	x21, x0
	ldp	w1, w0, [x19, #24]
	add	x3, x19, #16
	ldr	w2, [x19, #20]
	bl	_efi_capsule_supported
	cbz	w0, LBB0_5
; %bb.4:
	mov	x20, x0
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_8
LBB0_5:
	udiv	x8, x21, x22
	ldr	x0, [x19, #8]
Lloh8:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh9:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	lsl	x20, x8, #3
	ldr	w8, [x21]
Lloh10:
	adrp	x22, ___GFP_ZERO@GOTPAGE
Lloh11:
	ldr	x22, [x22, ___GFP_ZERO@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w2, w9, w8
	mov	x1, x20
	bl	_krealloc
	cbz	x0, LBB0_9
; %bb.6:
	str	x0, [x19, #8]
	ldr	x0, [x19]
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w2, w9, w8
	mov	x1, x20
	bl	_krealloc
	cbz	x0, LBB0_9
; %bb.7:
	mov	w20, #0
	str	x0, [x19]
LBB0_8:
	mov	x0, x20
	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_9:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid capsule size\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"capsule not supported\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
