	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_sim_db_sim_resp_auth
_eap_sim_db_sim_resp_auth:              ## @eap_sim_db_sim_resp_auth
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rdi, %rbx
	xorl	%edx, %edx
	callq	_eap_sim_db_get_pending
	testq	%rax, %rax
	je	LBB0_19
## %bb.1:
	movq	%rax, %r15
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movl	$7, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_EAP_SIM_MAX_CHAL@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.6:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$32, %esi
	callq	_os_strchr
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movb	$0, (%r12)
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%r13, %rdi
	movl	$58, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rbx
	movb	$0, (%rax)
	movq	32(%r15), %rax
	movl	(%rax,%r14,4), %esi
	movq	_EAP_SIM_KC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	%rbx, %rdi
	movl	$58, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_18
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %r13
	movb	$0, (%rax)
	movq	24(%r15), %rax
	movl	(%rax,%r14,4), %esi
	movq	_EAP_SIM_SRES_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	%r13
	movq	16(%r15), %rax
	movl	(%rax,%r14,4), %esi
	movq	_GSM_RAND_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	%r14
	testq	%r12, %r12
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	incq	%r12
	movq	_EAP_SIM_MAX_CHAL@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	%r12, %r13
	cmpq	%rax, %r14
	jl	LBB0_7
LBB0_16:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_19:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wpa_printf                     ## TAILCALL
LBB0_4:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	movq	_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	jmp	LBB0_5
LBB0_18:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_printf
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_eap_sim_db_free_pending        ## TAILCALL
LBB0_3:
	xorl	%r14d, %r14d
LBB0_17:
	movl	%r14d, 8(%r15)
	movq	_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r15)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_printf
LBB0_5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_eap_sim_db_add_pending
	movq	8(%rbx), %rax
	movl	(%rbx), %edi
	movl	(%r15), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-SIM DB: No pending entry for the received message found"

L_.str.1:                               ## @.str.1
	.asciz	"FAILURE"

L_.str.2:                               ## @.str.2
	.asciz	"EAP-SIM DB: External server reported failure"

	.comm	_FAILURE,4,2                    ## @FAILURE
	.comm	_EAP_SIM_MAX_CHAL,4,2           ## @EAP_SIM_MAX_CHAL
	.comm	_EAP_SIM_KC_LEN,4,2             ## @EAP_SIM_KC_LEN
	.comm	_EAP_SIM_SRES_LEN,4,2           ## @EAP_SIM_SRES_LEN
	.comm	_GSM_RAND_LEN,4,2               ## @GSM_RAND_LEN
	.comm	_SUCCESS,4,2                    ## @SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"EAP-SIM DB: Authentication data parsed successfully - callback"

L_.str.4:                               ## @.str.4
	.asciz	"EAP-SIM DB: Failed to parse response string"

	.no_dead_strip	_eap_sim_db_sim_resp_auth
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_sim_db_sim_resp_auth
_eap_sim_db_sim_resp_auth:              ; @eap_sim_db_sim_resp_auth
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x0
	mov	w2, #0
	bl	_eap_sim_db_get_pending
	cbz	x0, LBB0_13
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	mov	w2, #7
	bl	_os_strncmp
	cbz	x0, LBB0_14
; %bb.2:
Lloh2:
	adrp	x25, _EAP_SIM_MAX_CHAL@GOTPAGE
Lloh3:
	ldr	x25, [x25, _EAP_SIM_MAX_CHAL@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.3:
	mov	x24, #0
Lloh4:
	adrp	x26, _EAP_SIM_KC_LEN@GOTPAGE
Lloh5:
	ldr	x26, [x26, _EAP_SIM_KC_LEN@GOTPAGEOFF]
Lloh6:
	adrp	x27, _EAP_SIM_SRES_LEN@GOTPAGE
Lloh7:
	ldr	x27, [x27, _EAP_SIM_SRES_LEN@GOTPAGEOFF]
Lloh8:
	adrp	x28, _GSM_RAND_LEN@GOTPAGE
Lloh9:
	ldr	x28, [x28, _GSM_RAND_LEN@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #32
	bl	_os_strchr
	mov	x22, x0
	cbz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	strb	wzr, [x22]
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	w1, #58
	bl	_os_strchr
	cbz	x0, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
	strb	wzr, [x0]
	ldr	x8, [x20, #32]
	ldr	w1, [x8, x24, lsl #2]
	ldr	w2, [x26]
	mov	x0, x21
	bl	_hexstr2bin
	cbnz	x0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x23, x23, #1
	mov	x0, x23
	mov	w1, #58
	bl	_os_strchr
	cbz	x0, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x21, x0
	strb	wzr, [x0]
	ldr	x8, [x20, #24]
	ldr	w1, [x8, x24, lsl #2]
	ldr	w2, [x27]
	mov	x0, x23
	bl	_hexstr2bin
	cbnz	x0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x21, #1
	ldr	x8, [x20, #16]
	ldr	w1, [x8, x24, lsl #2]
	ldr	w2, [x28]
	bl	_hexstr2bin
	cbnz	x0, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	cbz	x22, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x22, #1
	ldrsw	x8, [x25]
	cmp	x24, x8
	b.lt	LBB0_4
	b	LBB0_17
LBB0_13:
Lloh10:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_wpa_printf
LBB0_14:
Lloh15:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
Lloh20:
	adrp	x8, _FAILURE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FAILURE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	b	LBB0_18
LBB0_15:
Lloh23:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	mov	x1, 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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_eap_sim_db_free_pending
LBB0_16:
	mov	w24, #0
LBB0_17:
Lloh28:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	stp	w8, w24, [x20, #4]
Lloh31:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh32:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
LBB0_18:
	mov	x0, x19
	mov	x1, x20
	bl	_eap_sim_db_add_pending
	ldr	x2, [x19, #8]
	ldr	w0, [x19]
	ldr	w1, [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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	br	x2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-SIM DB: No pending entry for the received message found"

l_.str.1:                               ; @.str.1
	.asciz	"FAILURE"

l_.str.2:                               ; @.str.2
	.asciz	"EAP-SIM DB: External server reported failure"

	.comm	_FAILURE,4,2                    ; @FAILURE
	.comm	_EAP_SIM_MAX_CHAL,4,2           ; @EAP_SIM_MAX_CHAL
	.comm	_EAP_SIM_KC_LEN,4,2             ; @EAP_SIM_KC_LEN
	.comm	_EAP_SIM_SRES_LEN,4,2           ; @EAP_SIM_SRES_LEN
	.comm	_GSM_RAND_LEN,4,2               ; @GSM_RAND_LEN
	.comm	_SUCCESS,4,2                    ; @SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"EAP-SIM DB: Authentication data parsed successfully - callback"

l_.str.4:                               ; @.str.4
	.asciz	"EAP-SIM DB: Failed to parse response string"

	.no_dead_strip	_eap_sim_db_sim_resp_auth
.subsections_via_symbols
