	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_network_mysqld_proto_get_auth_challenge ## -- Begin function network_mysqld_proto_get_auth_challenge
	.p2align	4, 0x90
_network_mysqld_proto_get_auth_challenge: ## @network_mysqld_proto_get_auth_challenge
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	leaq	-52(%rbp), %rsi
	callq	_network_mysqld_proto_get_int8
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_1
LBB0_33:
	movl	%r15d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-52(%rbp), %edx
	cmpl	$10, %edx
	je	LBB0_4
## %bb.2:
	cmpl	$255, %edx
	je	LBB0_33
## %bb.3:
	movq	_G_STRLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_g_debug
	jmp	LBB0_33
LBB0_4:
	leaq	24(%r14), %r12
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_network_mysqld_proto_get_string
	movl	$-1, %r15d
	testq	%rax, %rax
	je	LBB0_5
LBB0_29:
	movq	-48(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_31
## %bb.30:
	callq	_g_free
LBB0_31:
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_33
## %bb.32:
	callq	_g_free
	jmp	LBB0_33
LBB0_5:
	cmpq	$0, (%r12)
	je	LBB0_29
## %bb.6:
	leaq	32(%r14), %rsi
	movq	%rbx, %rdi
	callq	_network_mysqld_proto_get_int32
	testq	%rax, %rax
	jne	LBB0_29
## %bb.7:
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$8, %edx
	callq	_network_mysqld_proto_get_string_len
	testq	%rax, %rax
	jne	LBB0_29
## %bb.8:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_network_mysqld_proto_skip
	testq	%rax, %rax
	jne	LBB0_29
## %bb.9:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_network_mysqld_proto_get_int16
	testq	%rax, %rax
	jne	LBB0_29
## %bb.10:
	leaq	4(%r14), %rsi
	movq	%rbx, %rdi
	callq	_network_mysqld_proto_get_int8
	testq	%rax, %rax
	jne	LBB0_29
## %bb.11:
	leaq	8(%r14), %rsi
	movq	%rbx, %rdi
	callq	_network_mysqld_proto_get_int16
	testq	%rax, %rax
	jne	LBB0_29
## %bb.12:
	movq	%rbx, %rdi
	movl	$13, %esi
	callq	_network_mysqld_proto_skip
	movq	_CLIENT_SECURE_CONNECTION@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%r14), %ecx
	je	LBB0_16
## %bb.13:
	testq	%rax, %rax
	jne	LBB0_16
## %bb.14:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$12, %edx
	callq	_network_mysqld_proto_get_string_len
	testq	%rax, %rax
	jne	LBB0_29
## %bb.15:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_network_mysqld_proto_skip
	jmp	LBB0_17
LBB0_16:
	testl	%ecx, %ecx
	jne	LBB0_29
LBB0_17:
	testq	%rax, %rax
	jne	LBB0_29
## %bb.18:
	movq	(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	leaq	-64(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	leaq	-56(%rbp), %r8
	callq	_sscanf
	cmpl	$3, %eax
	jne	LBB0_19
## %bb.21:
	movl	-60(%rbp), %eax
	cmpl	$100, %eax
	ja	LBB0_26
## %bb.22:
	movl	-56(%rbp), %ecx
	testl	%ecx, %ecx
	js	LBB0_26
## %bb.23:
	cmpl	$100, %ecx
	jg	LBB0_26
## %bb.24:
	movl	-64(%rbp), %edx
	testl	%edx, %edx
	js	LBB0_26
## %bb.25:
	cmpl	$11, %edx
	jge	LBB0_26
## %bb.27:
	imull	$10000, %edx, %edx              ## imm = 0x2710
	imull	$100, %eax, %eax
	addl	%eax, %ecx
	addl	%edx, %ecx
	movl	%ecx, 12(%r14)
	movl	16(%r14), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_g_string_truncate
	movl	16(%r14), %edi
	movq	-48(%rbp), %rsi
	movl	$8, %edx
	callq	_g_string_append_len
	movq	-40(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_29
## %bb.28:
	movl	16(%r14), %edi
	movl	$12, %edx
	callq	_g_string_append_len
	jmp	LBB0_29
LBB0_19:
	movq	_G_STRLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_20
LBB0_26:
	movq	_G_STRLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdi
LBB0_20:
	callq	_g_critical
	movl	$-1, %r15d
	jmp	LBB0_33
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: unknown protocol %d"

	.comm	_G_STRLOC,4,2                   ## @G_STRLOC
	.comm	_CLIENT_SECURE_CONNECTION,4,2   ## @CLIENT_SECURE_CONNECTION
L_.str.1:                               ## @.str.1
	.asciz	"%d.%d.%d%*s"

L_.str.2:                               ## @.str.2
	.asciz	"%s: protocol 10, but version number not parsable"

L_.str.3:                               ## @.str.3
	.asciz	"%s: protocol 10, but version number out of range"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_network_mysqld_proto_get_auth_challenge ; -- Begin function network_mysqld_proto_get_auth_challenge
	.p2align	2
_network_mysqld_proto_get_auth_challenge: ; @network_mysqld_proto_get_auth_challenge
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x20, x0
	stp	xzr, xzr, [sp, #16]
	add	x1, sp, #12
	bl	_network_mysqld_proto_get_int8
	cbz	x0, LBB0_3
LBB0_1:
	mov	w20, #-1
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_3:
	ldr	w2, [sp, #12]
	cmp	w2, #10
	b.eq	LBB0_6
; %bb.4:
	cmp	w2, #255
	b.eq	LBB0_1
; %bb.5:
Lloh0:
	adrp	x8, _G_STRLOC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _G_STRLOC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_g_debug
	b	LBB0_1
LBB0_6:
	add	x21, x19, #24
	mov	x0, x20
	mov	x1, x21
	bl	_network_mysqld_proto_get_string
	cbz	x0, LBB0_12
LBB0_7:
	mov	w20, #-1
LBB0_8:
	ldr	x0, [sp, #24]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_g_free
LBB0_10:
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_2
; %bb.11:
	bl	_g_free
	b	LBB0_2
LBB0_12:
	ldr	x8, [x21]
	cbz	x8, LBB0_7
; %bb.13:
	add	x1, x19, #32
	mov	x0, x20
	bl	_network_mysqld_proto_get_int32
	cbnz	x0, LBB0_7
; %bb.14:
	add	x1, sp, #24
	mov	x0, x20
	mov	w2, #8
	bl	_network_mysqld_proto_get_string_len
	cbnz	x0, LBB0_7
; %bb.15:
	mov	x0, x20
	mov	w1, #1
	bl	_network_mysqld_proto_skip
	cbnz	x0, LBB0_7
; %bb.16:
	mov	x0, x20
	mov	x1, x19
	bl	_network_mysqld_proto_get_int16
	cbnz	x0, LBB0_7
; %bb.17:
	add	x1, x19, #4
	mov	x0, x20
	bl	_network_mysqld_proto_get_int8
	cbnz	x0, LBB0_7
; %bb.18:
	add	x1, x19, #8
	mov	x0, x20
	bl	_network_mysqld_proto_get_int16
	cbnz	x0, LBB0_7
; %bb.19:
	mov	x0, x20
	mov	w1, #13
	bl	_network_mysqld_proto_skip
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _CLIENT_SECURE_CONNECTION@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CLIENT_SECURE_CONNECTION@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ands	w8, w9, w8
	b.eq	LBB0_23
; %bb.20:
	cbnz	x0, LBB0_23
; %bb.21:
	add	x1, sp, #16
	mov	x0, x20
	mov	w2, #12
	bl	_network_mysqld_proto_get_string_len
	cbnz	x0, LBB0_7
; %bb.22:
	mov	x0, x20
	mov	w1, #1
	bl	_network_mysqld_proto_skip
	cbnz	x0, LBB0_7
	b	LBB0_25
LBB0_23:
	mov	w20, #-1
	cbnz	w8, LBB0_8
; %bb.24:
	cbnz	x0, LBB0_8
LBB0_25:
	ldr	x0, [x21]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	sub	x2, x29, #36
	add	x3, sp, #40
	add	x4, sp, #36
	bl	_sscanf
	cmp	w0, #3
	b.ne	LBB0_34
; %bb.26:
	ldr	w8, [sp, #40]
	cmp	w8, #100
	b.hi	LBB0_35
; %bb.27:
	ldr	w9, [sp, #36]
	tbnz	w9, #31, LBB0_35
; %bb.28:
	cmp	w9, #100
	b.gt	LBB0_35
; %bb.29:
	ldur	w10, [x29, #-36]
	tbnz	w10, #31, LBB0_35
; %bb.30:
	cmp	w10, #11
	b.ge	LBB0_35
; %bb.31:
	mov	w11, #10000
	mov	w12, #100
	madd	w8, w8, w12, w9
	madd	w8, w10, w11, w8
	str	w8, [x19, #12]
	ldr	w0, [x19, #16]
	mov	w1, #0
	bl	_g_string_truncate
	ldr	w0, [x19, #16]
	ldr	x1, [sp, #24]
	mov	w2, #8
	bl	_g_string_append_len
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_33
; %bb.32:
	ldr	w0, [x19, #16]
	mov	w2, #12
	bl	_g_string_append_len
LBB0_33:
	mov	w20, #0
	b	LBB0_8
LBB0_34:
Lloh10:
	adrp	x8, _G_STRLOC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _G_STRLOC@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_36
LBB0_35:
Lloh15:
	adrp	x8, _G_STRLOC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _G_STRLOC@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
Lloh18:
	adrp	x0, l_.str.3@PAGE
Lloh19:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_36:
	bl	_g_critical
	b	LBB0_1
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: unknown protocol %d"

	.comm	_G_STRLOC,4,2                   ; @G_STRLOC
	.comm	_CLIENT_SECURE_CONNECTION,4,2   ; @CLIENT_SECURE_CONNECTION
l_.str.1:                               ; @.str.1
	.asciz	"%d.%d.%d%*s"

l_.str.2:                               ; @.str.2
	.asciz	"%s: protocol 10, but version number not parsable"

l_.str.3:                               ; @.str.3
	.asciz	"%s: protocol 10, but version number out of range"

.subsections_via_symbols
