	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_ticket_setup       ## -- Begin function mbedtls_ssl_ticket_setup
	.p2align	4, 0x90
_mbedtls_ssl_ticket_setup:              ## @mbedtls_ssl_ticket_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	%rsi, (%rdi)
	movq	%rdx, 24(%rdi)
	movl	%r8d, 16(%rdi)
	movl	%ecx, %edi
	callq	_mbedtls_cipher_info_from_type
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_MBEDTLS_MODE_GCM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.3:
	movq	_MBEDTLS_MODE_CCM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
LBB0_4:
	movq	_MAX_KEY_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shll	$3, %eax
	cmpl	%eax, 8(%rbx)
	jle	LBB0_5
LBB0_1:
	movq	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	8(%r14), %rdi
	movq	%rbx, %rsi
	callq	_mbedtls_cipher_setup
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	8(%r14), %rdi
	addq	$4, %rdi
	movq	%rbx, %rsi
	callq	_mbedtls_cipher_setup
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_ssl_ticket_gen_key
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ssl_ticket_gen_key             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA,4,2 ## @MBEDTLS_ERR_SSL_BAD_INPUT_DATA
	.comm	_MBEDTLS_MODE_GCM,8,3           ## @MBEDTLS_MODE_GCM
	.comm	_MBEDTLS_MODE_CCM,8,3           ## @MBEDTLS_MODE_CCM
	.comm	_MAX_KEY_BYTES,4,2              ## @MAX_KEY_BYTES
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mbedtls_ssl_ticket_setup       ; -- Begin function mbedtls_ssl_ticket_setup
	.p2align	2
_mbedtls_ssl_ticket_setup:              ; @mbedtls_ssl_ticket_setup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	str	x1, [x0]
	str	x2, [x0, #24]
	str	w4, [x0, #16]
	mov	x0, x3
	bl	_mbedtls_cipher_info_from_type
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MBEDTLS_MODE_GCM@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MBEDTLS_MODE_GCM@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _MBEDTLS_MODE_CCM@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MBEDTLS_MODE_CCM@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x20, #8]
Lloh6:
	adrp	x9, _MAX_KEY_BYTES@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MAX_KEY_BYTES@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9, lsl #3
	b.le	LBB0_5
LBB0_3:
Lloh9:
	adrp	x8, _MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MBEDTLS_ERR_SSL_BAD_INPUT_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_mbedtls_cipher_setup
	cbnz	w0, LBB0_4
; %bb.6:
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	mov	x1, x20
	bl	_mbedtls_cipher_setup
	cbnz	w0, LBB0_4
; %bb.7:
	mov	x0, x19
	mov	w1, #0
	bl	_ssl_ticket_gen_key
	cbnz	w0, LBB0_4
; %bb.8:
	mov	x0, x19
	mov	w1, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ssl_ticket_gen_key
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MBEDTLS_ERR_SSL_BAD_INPUT_DATA,4,2 ; @MBEDTLS_ERR_SSL_BAD_INPUT_DATA
	.comm	_MBEDTLS_MODE_GCM,8,3           ; @MBEDTLS_MODE_GCM
	.comm	_MBEDTLS_MODE_CCM,8,3           ; @MBEDTLS_MODE_CCM
	.comm	_MAX_KEY_BYTES,4,2              ; @MAX_KEY_BYTES
.subsections_via_symbols
