	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_shutdown_client
_tls_shutdown_client:                   ## @tls_shutdown_client
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movq	_SCHANNEL_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_SECBUFFER_TOKEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %r12
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movl	$4, %ecx
	callq	_init_sec_buffer
	leaq	-60(%rbp), %r15
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_init_sec_buffer_desc
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_ApplyControlToken
	movq	_SEC_E_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
LBB0_3:
	movq	_SECBUFFER_EMPTY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %r15
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_init_sec_buffer
	leaq	-56(%rbp), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_init_sec_buffer_desc
	leaq	24(%rbx), %rdi
	movl	20(%rbx), %ecx
	movl	32(%rbx), %edx
	leaq	12(%rbx), %r10
	leaq	8(%rbx), %rax
	movq	%r13, %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%r10
	pushq	%r12
	pushq	%r13
	pushq	$0
	pushq	$0
	callq	_InitializeSecurityContext
	addq	$48, %rsp
	movq	_SEC_E_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_SEC_I_CONTEXT_EXPIRED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_5:
	movl	28(%rbx), %edi
	movl	-48(%rbp), %edx
	movl	-44(%rbp), %esi
	callq	_ffurl_write
	movl	%eax, %r15d
	movl	-44(%rbp), %edi
	callq	_FreeContextBuffer
	testl	%r15d, %r15d
	js	LBB0_7
## %bb.6:
	cmpl	-48(%rbp), %r15d
	je	LBB0_8
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
LBB0_8:
	movq	$0, (%rbx)
LBB0_9:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SCHANNEL_SHUTDOWN,4,2          ## @SCHANNEL_SHUTDOWN
	.comm	_SECBUFFER_TOKEN,4,2            ## @SECBUFFER_TOKEN
	.comm	_SEC_E_OK,8,3                   ## @SEC_E_OK
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ApplyControlToken failed\n"

	.comm	_SECBUFFER_EMPTY,4,2            ## @SECBUFFER_EMPTY
	.comm	_SEC_I_CONTEXT_EXPIRED,8,3      ## @SEC_I_CONTEXT_EXPIRED
L_.str.1:                               ## @.str.1
	.asciz	"Failed to send close message\n"

	.no_dead_strip	_tls_shutdown_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_shutdown_client
_tls_shutdown_client:                   ; @tls_shutdown_client
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x21, [x0]
	ldr	x8, [x21]
	cbz	x8, LBB0_9
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _SCHANNEL_SHUTDOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SCHANNEL_SHUTDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #32]
Lloh3:
	adrp	x8, _SECBUFFER_TOKEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SECBUFFER_TOKEN@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x0, sp, #48
	add	x2, sp, #32
	mov	w3, #4
	bl	_init_sec_buffer
	sub	x0, x29, #52
	add	x1, sp, #48
	mov	w2, #1
	bl	_init_sec_buffer_desc
	add	x20, x21, #16
	sub	x1, x29, #52
	mov	x0, x20
	bl	_ApplyControlToken
Lloh6:
	adrp	x22, _SEC_E_OK@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SEC_E_OK@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_3:
Lloh13:
	adrp	x8, _SECBUFFER_EMPTY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SECBUFFER_EMPTY@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x0, sp, #40
	mov	x2, #0
	mov	w3, #0
	bl	_init_sec_buffer
	add	x23, sp, #36
	add	x0, sp, #36
	add	x1, sp, #40
	mov	w2, #1
	bl	_init_sec_buffer_desc
	add	x0, x21, #24
	ldr	w2, [x21, #32]
	ldr	w3, [x21, #20]
	add	x8, x21, #12
	add	x9, x21, #8
	stp	x8, x9, [sp, #16]
	stp	x20, x23, [sp]
	mov	x1, x20
	mov	w4, #0
	mov	w5, #0
	mov	x6, #0
	mov	w7, #0
	bl	_InitializeSecurityContext
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
Lloh16:
	adrp	x8, _SEC_I_CONTEXT_EXPIRED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SEC_I_CONTEXT_EXPIRED@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_8
LBB0_5:
	ldr	w0, [x21, #28]
	ldp	w2, w1, [sp, #40]
	bl	_ffurl_write
	mov	x20, x0
	ldr	w0, [sp, #44]
	bl	_FreeContextBuffer
	tbnz	w20, #31, LBB0_7
; %bb.6:
	ldr	w8, [sp, #40]
	cmp	w20, w8
	b.eq	LBB0_8
LBB0_7:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_8:
	str	xzr, [x21]
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_SCHANNEL_SHUTDOWN,4,2          ; @SCHANNEL_SHUTDOWN
	.comm	_SECBUFFER_TOKEN,4,2            ; @SECBUFFER_TOKEN
	.comm	_SEC_E_OK,8,3                   ; @SEC_E_OK
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ApplyControlToken failed\n"

	.comm	_SECBUFFER_EMPTY,4,2            ; @SECBUFFER_EMPTY
	.comm	_SEC_I_CONTEXT_EXPIRED,8,3      ; @SEC_I_CONTEXT_EXPIRED
l_.str.1:                               ; @.str.1
	.asciz	"Failed to send close message\n"

	.no_dead_strip	_tls_shutdown_client
.subsections_via_symbols
