	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_set_hostname       ## -- Begin function mbedtls_ssl_set_hostname
	.p2align	4, 0x90
_mbedtls_ssl_set_hostname:              ## @mbedtls_ssl_set_hostname
	.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	%rsi, %rsi
	je	LBB0_3
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_strlen
	movq	%rax, %rsi
	incq	%rsi
	je	LBB0_3
## %bb.2:
	movq	%rax, %r15
	movq	_MBEDTLS_SSL_MAX_HOST_NAME_LEN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	jbe	LBB0_6
LBB0_3:
	movq	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	$1, %edi
	callq	_mbedtls_calloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	%rax, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_memcpy
	movq	(%r14), %rax
	movb	$0, (%rax,%r15)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_8:
	movq	_MBEDTLS_ERR_SSL_ALLOC_FAILED@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_SSL_BAD_INPUT_DATA
	.comm	_MBEDTLS_SSL_MAX_HOST_NAME_LEN,8,3 ## @MBEDTLS_SSL_MAX_HOST_NAME_LEN
	.comm	_MBEDTLS_ERR_SSL_ALLOC_FAILED,4,2 ## @MBEDTLS_ERR_SSL_ALLOC_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_set_hostname       ; -- Begin function mbedtls_ssl_set_hostname
	.p2align	2
_mbedtls_ssl_set_hostname:              ; @mbedtls_ssl_set_hostname
	.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	x1, LBB0_3
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	bl	_strlen
	adds	x1, x0, #1
	b.hs	LBB0_3
; %bb.2:
	mov	x21, x0
Lloh0:
	adrp	x8, _MBEDTLS_SSL_MAX_HOST_NAME_LEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MBEDTLS_SSL_MAX_HOST_NAME_LEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ls	LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPAGEOFF]
LBB0_4:
	ldr	w0, [x8]
LBB0_5:
	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_6:
	mov	w0, #1
	bl	_mbedtls_calloc
	str	x0, [x19]
	cbz	x0, LBB0_8
; %bb.7:
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	mov	w0, #0
	ldr	x8, [x19]
	strb	wzr, [x8, x21]
	b	LBB0_5
LBB0_8:
Lloh5:
	adrp	x8, _MBEDTLS_ERR_SSL_ALLOC_FAILED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_ALLOC_FAILED@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_SSL_BAD_INPUT_DATA
	.comm	_MBEDTLS_SSL_MAX_HOST_NAME_LEN,8,3 ; @MBEDTLS_SSL_MAX_HOST_NAME_LEN
	.comm	_MBEDTLS_ERR_SSL_ALLOC_FAILED,4,2 ; @MBEDTLS_ERR_SSL_ALLOC_FAILED
.subsections_via_symbols
