	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_sim_db_aka_resp_auth
_eap_sim_db_aka_resp_auth:              ## @eap_sim_db_aka_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r14
	movl	$1, %edx
	callq	_eap_sim_db_get_pending
	testq	%rax, %rax
	je	LBB0_20
## %bb.1:
	movq	%rax, %r12
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	$7, %edx
	callq	_os_strncmp
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	movq	%rax, %r15
	movb	$0, (%rax)
	movl	28(%r12), %esi
	movq	_EAP_AKA_RAND_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	je	LBB0_6
LBB0_17:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_wpa_printf
	movq	%r14, %rdi
	movq	%r12, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_eap_sim_db_free_pending        ## TAILCALL
LBB0_20:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wpa_printf                     ## TAILCALL
LBB0_2:
	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(%r12)
LBB0_3:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_eap_sim_db_add_pending
	movq	8(%r14), %rax
	movl	(%r14), %edi
	movl	(%r12), %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_6:
	incq	%r15
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.7:
	movq	%rax, %rbx
	movb	$0, (%rax)
	movl	24(%r12), %esi
	movq	_EAP_AKA_AUTN_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_17
## %bb.8:
	incq	%rbx
	movq	%rbx, %rdi
	movl	$32, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.9:
	movq	%rax, %r15
	movb	$0, (%rax)
	movl	20(%r12), %esi
	movq	_EAP_AKA_IK_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_17
## %bb.10:
	incq	%r15
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_17
## %bb.11:
	movq	%rax, %rbx
	movb	$0, (%rax)
	movl	16(%r12), %esi
	movq	_EAP_AKA_CK_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_17
## %bb.12:
	movq	%rbx, %r15
	incq	%r15
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_os_strchr
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movb	$0, (%rax)
	jmp	LBB0_15
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	leaq	1(%rbx), %rax
	cmpb	$0, 1(%rbx)
	movq	%rax, %rbx
	jne	LBB0_14
LBB0_15:
	subq	%r15, %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rax, %rdx
	shrq	%rdx
	movl	%edx, 8(%r12)
	movq	_EAP_AKA_RES_MAX_LEN@GOTPCREL(%rip), %rax
	cmpl	%edx, (%rax)
	jge	LBB0_18
## %bb.16:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_printf
	movl	$0, 8(%r12)
	jmp	LBB0_17
LBB0_18:
	movl	12(%r12), %esi
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_hexstr2bin
	testq	%rax, %rax
	jne	LBB0_17
## %bb.19:
	movq	_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_3
	.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_AKA_RAND_LEN,4,2           ## @EAP_AKA_RAND_LEN
	.comm	_EAP_AKA_AUTN_LEN,4,2           ## @EAP_AKA_AUTN_LEN
	.comm	_EAP_AKA_IK_LEN,4,2             ## @EAP_AKA_IK_LEN
	.comm	_EAP_AKA_CK_LEN,4,2             ## @EAP_AKA_CK_LEN
	.comm	_EAP_AKA_RES_MAX_LEN,4,2        ## @EAP_AKA_RES_MAX_LEN
L_.str.3:                               ## @.str.3
	.asciz	"EAP-SIM DB: Too long RES"

	.comm	_SUCCESS,4,2                    ## @SUCCESS
L_.str.4:                               ## @.str.4
	.asciz	"EAP-SIM DB: Authentication data parsed successfully - callback"

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

	.no_dead_strip	_eap_sim_db_aka_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_aka_resp_auth
_eap_sim_db_aka_resp_auth:              ; @eap_sim_db_aka_resp_auth
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x19, x0
	mov	w2, #1
	bl	_eap_sim_db_get_pending
	cbz	x0, LBB0_5
; %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_6
; %bb.2:
	mov	x0, x21
	mov	w1, #32
	bl	_os_strchr
	cbz	x0, LBB0_4
; %bb.3:
	mov	x22, x0
	strb	wzr, [x0]
	ldr	w1, [x20, #28]
Lloh2:
	adrp	x8, _EAP_AKA_RAND_LEN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAP_AKA_RAND_LEN@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_hexstr2bin
	cbz	x0, LBB0_8
LBB0_4:
Lloh5:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
Lloh8:
	adrp	x1, l_.str.5@PAGE
Lloh9:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_eap_sim_db_free_pending
LBB0_5:
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, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_wpa_printf
LBB0_6:
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]
LBB0_7:
	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, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	br	x2
LBB0_8:
	add	x22, x22, #1
	mov	x0, x22
	mov	w1, #32
	bl	_os_strchr
	cbz	x0, LBB0_4
; %bb.9:
	mov	x21, x0
	strb	wzr, [x0]
	ldr	w1, [x20, #24]
Lloh23:
	adrp	x8, _EAP_AKA_AUTN_LEN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAP_AKA_AUTN_LEN@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_hexstr2bin
	cbnz	x0, LBB0_4
; %bb.10:
	add	x22, x21, #1
	mov	x0, x22
	mov	w1, #32
	bl	_os_strchr
	cbz	x0, LBB0_4
; %bb.11:
	mov	x21, x0
	strb	wzr, [x0]
	ldr	w1, [x20, #20]
Lloh26:
	adrp	x8, _EAP_AKA_IK_LEN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EAP_AKA_IK_LEN@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_hexstr2bin
	cbnz	x0, LBB0_4
; %bb.12:
	add	x22, x21, #1
	mov	x0, x22
	mov	w1, #32
	bl	_os_strchr
	cbz	x0, LBB0_4
; %bb.13:
	mov	x21, x0
	strb	wzr, [x0]
	ldr	w1, [x20, #16]
Lloh29:
	adrp	x8, _EAP_AKA_CK_LEN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EAP_AKA_CK_LEN@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_hexstr2bin
	cbnz	x0, LBB0_4
; %bb.14:
	add	x22, x21, #1
	mov	x0, x22
	mov	w1, #32
	bl	_os_strchr
	cbz	x0, LBB0_16
; %bb.15:
	strb	wzr, [x0]
	mov	x21, x0
	b	LBB0_17
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldrb	w8, [x21, #1]!
	cbnz	w8, LBB0_16
LBB0_17:
	sub	x8, x21, x22
	cmp	x8, #0
	cinc	x8, x8, lt
	lsr	x2, x8, #1
	str	w2, [x20, #8]
Lloh32:
	adrp	x8, _EAP_AKA_RES_MAX_LEN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EAP_AKA_RES_MAX_LEN@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w8, w2
	b.ge	LBB0_19
; %bb.18:
Lloh35:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
Lloh38:
	adrp	x1, l_.str.3@PAGE
Lloh39:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
	str	wzr, [x20, #8]
	b	LBB0_4
LBB0_19:
	ldr	w1, [x20, #12]
	mov	x0, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_hexstr2bin
	cbnz	x0, LBB0_4
; %bb.20:
Lloh40:
	adrp	x8, _SUCCESS@GOTPAGE
Lloh41:
	ldr	x8, [x8, _SUCCESS@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	str	w8, [x20, #4]
Lloh43:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
Lloh46:
	adrp	x1, l_.str.4@PAGE
Lloh47:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.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_AKA_RAND_LEN,4,2           ; @EAP_AKA_RAND_LEN
	.comm	_EAP_AKA_AUTN_LEN,4,2           ; @EAP_AKA_AUTN_LEN
	.comm	_EAP_AKA_IK_LEN,4,2             ; @EAP_AKA_IK_LEN
	.comm	_EAP_AKA_CK_LEN,4,2             ; @EAP_AKA_CK_LEN
	.comm	_EAP_AKA_RES_MAX_LEN,4,2        ; @EAP_AKA_RES_MAX_LEN
l_.str.3:                               ; @.str.3
	.asciz	"EAP-SIM DB: Too long RES"

	.comm	_SUCCESS,4,2                    ; @SUCCESS
l_.str.4:                               ; @.str.4
	.asciz	"EAP-SIM DB: Authentication data parsed successfully - callback"

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

	.no_dead_strip	_eap_sim_db_aka_resp_auth
.subsections_via_symbols
