	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_write_server_certificate_status
_tls_write_server_certificate_status:   ## @tls_write_server_certificate_status
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	testq	%r8, %r8
	je	LBB0_6
## %bb.1:
	movq	%r9, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r12
	movq	(%rsi), %r13
	movq	_TLS_RECORD_HEADER_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	addq	%r9, %rax
	addq	$8, %rax
	subq	%r13, %rbx
	shrq	$2, %rbx
	movl	%ebx, %edx
	cmpq	%rdx, %rax
	ja	LBB0_2
## %bb.3:
	movq	%r8, %r15
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ecx, %edx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	_tlsv1_server_log
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	_TLS_RECORD_HEADER_LEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	leaq	(,%r12,4), %rax
	addq	%r13, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	4(,%r12,4), %rcx
	addq	%r13, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%eax, (%r13,%r12,4)
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	movl	$2, %eax
	sbbl	$0, %eax
	leaq	20(,%r12,4), %rdi
	addq	%r13, %rdi
	movl	%eax, 16(%r13,%r12,4)
	movl	%r14d, %esi
	callq	_WPA_PUT_BE24
	leaq	32(,%r12,4), %rdi
	addq	%r13, %rdi
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_os_memcpy
	leaq	(%r15,%r14,4), %r14
	addq	$32, %r14
	movq	%r14, %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	subq	%rdi, %rsi
	shrq	$2, %rsi
	addl	$-3, %esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_WPA_PUT_BE24
	leaq	4(%r12), %rdi
	movq	_TLS_CONTENT_TYPE_HANDSHAKE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	subq	%r15, %r14
	shrq	$2, %r14
	leaq	-88(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%r13, %rdx
	movl	%ebx, %ecx
	movq	%r15, %r8
	movl	%r14d, %r9d
	callq	_tlsv1_record_send
	testq	%rax, %rax
	js	LBB0_4
## %bb.5:
	movq	-88(%rbp), %rax
	leaq	(,%rax,4), %rbx
	addq	%r13, %rbx
	movq	%rbx, %rdx
	subq	%r15, %rdx
	shrq	$2, %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_tls_verify_hash_add
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
LBB0_2:
	movq	_TLS_ALERT_LEVEL_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLS_ALERT_INTERNAL_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_tlsv1_server_alert
	movl	$-1, %eax
LBB0_6:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_RECORD_HEADER_LEN,4,2      ## @TLS_RECORD_HEADER_LEN
	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ## @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ## @TLS_ALERT_INTERNAL_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Send CertificateStatus (multi=%d)"

	.comm	_TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS,4,2 ## @TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS
	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,4,2 ## @TLS_CONTENT_TYPE_HANDSHAKE
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"TLSv1: Failed to generate a record"

	.no_dead_strip	_tls_write_server_certificate_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_write_server_certificate_status
_tls_write_server_certificate_status:   ; @tls_write_server_certificate_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x4, LBB0_4
; %bb.1:
	mov	x24, x5
	mov	x20, x1
	mov	x19, x0
	ldr	x21, [x1]
Lloh0:
	adrp	x23, _TLS_RECORD_HEADER_LEN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _TLS_RECORD_HEADER_LEN@GOTPAGEOFF]
	ldrsw	x8, [x23]
	add	x8, x8, x5
	add	x8, x8, #8
	sub	x9, x2, x21
	lsr	x22, x9, #2
	cmp	x8, w22, uxtw
	b.hi	LBB0_6
; %bb.2:
	mov	x25, x4
	mov	x26, x3
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x3
	bl	_tlsv1_server_log
	ldrsw	x8, [x23]
	add	x23, x21, x8, lsl #2
Lloh4:
	adrp	x8, _TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	add	x27, x23, #4
	str	w8, [x23]
	cmp	w26, #0
	mov	w8, #1
	cinc	w8, w8, ne
	add	x0, x23, #20
	str	w8, [x23, #16]
	mov	x1, x24
	bl	_WPA_PUT_BE24
	add	x26, x23, #32
	mov	x0, x26
	mov	x1, x25
	mov	x2, x24
	bl	_os_memcpy
	add	x24, x26, x24, lsl #2
	sub	x8, x24, x27
	lsr	x8, x8, #2
	sub	w1, w8, #3
	mov	x0, x27
	bl	_WPA_PUT_BE24
	add	x0, x19, #4
Lloh7:
	adrp	x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _TLS_CONTENT_TYPE_HANDSHAKE@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	sub	x8, x24, x23
	lsr	x5, x8, #2
	add	x6, sp, #8
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
                                        ; kill: def $w5 killed $w5 killed $x5
	bl	_tlsv1_record_send
	tbnz	x0, #63, LBB0_5
; %bb.3:
	ldr	x8, [sp, #8]
	add	x21, x21, x8, lsl #2
	sub	x8, x21, x23
	lsr	x2, x8, #2
	mov	x0, x19
	mov	x1, x23
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_tls_verify_hash_add
	mov	w0, #0
	str	x21, [x20]
	b	LBB0_7
LBB0_4:
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh10:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
LBB0_6:
Lloh15:
	adrp	x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TLS_ALERT_LEVEL_FATAL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _TLS_ALERT_INTERNAL_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_tlsv1_server_alert
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_RECORD_HEADER_LEN,4,2      ; @TLS_RECORD_HEADER_LEN
	.comm	_TLS_ALERT_LEVEL_FATAL,4,2      ; @TLS_ALERT_LEVEL_FATAL
	.comm	_TLS_ALERT_INTERNAL_ERROR,4,2   ; @TLS_ALERT_INTERNAL_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Send CertificateStatus (multi=%d)"

	.comm	_TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS,4,2 ; @TLS_HANDSHAKE_TYPE_CERTIFICATE_STATUS
	.comm	_TLS_CONTENT_TYPE_HANDSHAKE,4,2 ; @TLS_CONTENT_TYPE_HANDSHAKE
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"TLSv1: Failed to generate a record"

	.no_dead_strip	_tls_write_server_certificate_status
.subsections_via_symbols
