	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_md_setup               ## -- Begin function mbedtls_md_setup
	.p2align	4, 0x90
_mbedtls_md_setup:                      ## @mbedtls_md_setup
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_6
## %bb.2:
	movl	%edx, %r15d
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	*16(%r14)
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	movl	8(%r14), %esi
	movl	$2, %edi
	callq	_mbedtls_calloc
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_7
LBB0_5:
	movq	%r14, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_6:
	movq	_MBEDTLS_ERR_MD_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	8(%rbx), %rdi
	callq	*(%r14)
LBB0_8:
	movq	_MBEDTLS_ERR_MD_ALLOC_FAILED@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_MD_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_MD_BAD_INPUT_DATA
	.comm	_MBEDTLS_ERR_MD_ALLOC_FAILED,4,2 ## @MBEDTLS_ERR_MD_ALLOC_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_md_setup               ; -- Begin function mbedtls_md_setup
	.p2align	2
_mbedtls_md_setup:                      ; @mbedtls_md_setup
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x1
	cbz	x1, LBB0_6
; %bb.2:
	mov	x21, x2
	mov	x19, x0
	ldr	x8, [x20, #16]
	blr	x8
	str	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.3:
	cbz	w21, LBB0_5
; %bb.4:
	ldr	w1, [x20, #8]
	mov	w0, #2
	bl	_mbedtls_calloc
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
LBB0_5:
	mov	w0, #0
	str	x20, [x19]
	b	LBB0_10
LBB0_6:
Lloh0:
	adrp	x8, _MBEDTLS_ERR_MD_BAD_INPUT_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_ERR_MD_BAD_INPUT_DATA@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
	ldr	x8, [x20]
	ldr	x0, [x19, #8]
	blr	x8
LBB0_8:
Lloh2:
	adrp	x8, _MBEDTLS_ERR_MD_ALLOC_FAILED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MBEDTLS_ERR_MD_ALLOC_FAILED@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_MD_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_MD_BAD_INPUT_DATA
	.comm	_MBEDTLS_ERR_MD_ALLOC_FAILED,4,2 ; @MBEDTLS_ERR_MD_ALLOC_FAILED
.subsections_via_symbols
