	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___wrap_malloc                  ## -- Begin function __wrap_malloc
	.p2align	4, 0x90
___wrap_malloc:                         ## @__wrap_malloc
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_kmalloc_ok@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_7
## %bb.1:
	movq	_UM_KERN_PAGE_SIZE@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jge	LBB0_2
## %bb.3:
	callq	_vmalloc
	testq	%rax, %rax
	jne	LBB0_6
	jmp	LBB0_5
LBB0_7:
	popq	%rbp
	jmp	___real_malloc                  ## TAILCALL
LBB0_2:
	movq	_UM_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_uml_kmalloc
	testq	%rax, %rax
	je	LBB0_5
LBB0_6:
	popq	%rbp
	retq
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_kmalloc_ok,4,2                 ## @kmalloc_ok
	.comm	_UM_KERN_PAGE_SIZE,4,2          ## @UM_KERN_PAGE_SIZE
	.comm	_UM_GFP_KERNEL,4,2              ## @UM_GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___wrap_malloc                  ; -- Begin function __wrap_malloc
	.p2align	2
___wrap_malloc:                         ; @__wrap_malloc
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _kmalloc_ok@GOTPAGE
Lloh1:
	ldr	x8, [x8, _kmalloc_ok@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _UM_KERN_PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _UM_KERN_PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ge	LBB0_4
; %bb.2:
	bl	_vmalloc
	cbnz	x0, LBB0_5
	b	LBB0_6
LBB0_3:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	___real_malloc
LBB0_4:
Lloh6:
	adrp	x8, _UM_GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _UM_GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_uml_kmalloc
	cbz	x0, LBB0_6
LBB0_5:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_kmalloc_ok,4,2                 ; @kmalloc_ok
	.comm	_UM_KERN_PAGE_SIZE,4,2          ; @UM_KERN_PAGE_SIZE
	.comm	_UM_GFP_KERNEL,4,2              ; @UM_GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
