	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_sim_build_challenge
_eap_sim_build_challenge:               ## @eap_sim_build_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	%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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	movq	_EAP_CODE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_EAP_TYPE_SIM@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_EAP_SIM_SUBTYPE_CHALLENGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %esi
	callq	_eap_sim_msg_init
	movq	%rax, %rbx
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movq	_EAP_SIM_AT_RAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r14), %rcx
	movq	_GSM_RAND_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	imull	(%r14), %r8d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_eap_sim_msg_add
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_eap_sim_build_encr
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rbx, %rdi
	callq	_eap_sim_msg_free
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.2:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	movq	_EAP_SIM_AT_RESULT_IND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_eap_sim_msg_add
LBB0_3:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_printf
	movq	_EAP_SIM_AT_MAC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_eap_sim_msg_add_mac
	movl	(%r12), %esi
	movl	4(%r14), %ecx
	movl	8(%r14), %edx
	movq	_EAP_SIM_NONCE_MT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_eap_sim_msg_finish             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"EAP-SIM: Generating Challenge"

	.comm	_EAP_CODE_REQUEST,4,2           ## @EAP_CODE_REQUEST
	.comm	_EAP_TYPE_SIM,4,2               ## @EAP_TYPE_SIM
	.comm	_EAP_SIM_SUBTYPE_CHALLENGE,4,2  ## @EAP_SIM_SUBTYPE_CHALLENGE
L_.str.1:                               ## @.str.1
	.asciz	"   AT_RAND"

	.comm	_EAP_SIM_AT_RAND,4,2            ## @EAP_SIM_AT_RAND
	.comm	_GSM_RAND_LEN,4,2               ## @GSM_RAND_LEN
L_.str.2:                               ## @.str.2
	.asciz	"   AT_RESULT_IND"

	.comm	_EAP_SIM_AT_RESULT_IND,4,2      ## @EAP_SIM_AT_RESULT_IND
L_.str.3:                               ## @.str.3
	.asciz	"   AT_MAC"

	.comm	_EAP_SIM_AT_MAC,4,2             ## @EAP_SIM_AT_MAC
	.comm	_EAP_SIM_NONCE_MT_LEN,4,2       ## @EAP_SIM_NONCE_MT_LEN
	.no_dead_strip	_eap_sim_build_challenge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_sim_build_challenge
_eap_sim_build_challenge:               ; @eap_sim_build_challenge
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
Lloh4:
	adrp	x8, _EAP_CODE_REQUEST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAP_CODE_REQUEST@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x22, _EAP_TYPE_SIM@GOTPAGE
Lloh8:
	ldr	x22, [x22, _EAP_TYPE_SIM@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh9:
	adrp	x8, _EAP_SIM_SUBTYPE_CHALLENGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EAP_SIM_SUBTYPE_CHALLENGE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x1, x20
	bl	_eap_sim_msg_init
	mov	x20, x0
	ldr	w0, [x23]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
Lloh14:
	adrp	x8, _EAP_SIM_AT_RAND@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EAP_SIM_AT_RAND@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	x3, [x19, #16]
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _GSM_RAND_LEN@GOTPAGE
Lloh18:
	ldr	x9, [x9, _GSM_RAND_LEN@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	mul	w4, w9, w8
	mov	x0, x20
	mov	w2, #0
	bl	_eap_sim_msg_add
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	w3, #0
	mov	x4, #0
	bl	_eap_sim_build_encr
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_eap_sim_msg_free
	mov	x0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	x8, [x21]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x23]
Lloh20:
	adrp	x1, l_.str.2@PAGE
Lloh21:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
Lloh22:
	adrp	x8, _EAP_SIM_AT_RESULT_IND@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EAP_SIM_AT_RESULT_IND@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	x3, #0
	mov	w4, #0
	bl	_eap_sim_msg_add
LBB0_4:
	ldr	w0, [x23]
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
Lloh27:
	adrp	x8, _EAP_SIM_AT_MAC@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EAP_SIM_AT_MAC@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_eap_sim_msg_add_mac
	ldr	w1, [x22]
	ldp	w3, w2, [x19, #4]
Lloh30:
	adrp	x8, _EAP_SIM_NONCE_MT_LEN@GOTPAGE
Lloh31:
	ldr	x8, [x8, _EAP_SIM_NONCE_MT_LEN@GOTPAGEOFF]
Lloh32:
	ldr	w4, [x8]
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_eap_sim_msg_finish
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"EAP-SIM: Generating Challenge"

	.comm	_EAP_CODE_REQUEST,4,2           ; @EAP_CODE_REQUEST
	.comm	_EAP_TYPE_SIM,4,2               ; @EAP_TYPE_SIM
	.comm	_EAP_SIM_SUBTYPE_CHALLENGE,4,2  ; @EAP_SIM_SUBTYPE_CHALLENGE
l_.str.1:                               ; @.str.1
	.asciz	"   AT_RAND"

	.comm	_EAP_SIM_AT_RAND,4,2            ; @EAP_SIM_AT_RAND
	.comm	_GSM_RAND_LEN,4,2               ; @GSM_RAND_LEN
l_.str.2:                               ; @.str.2
	.asciz	"   AT_RESULT_IND"

	.comm	_EAP_SIM_AT_RESULT_IND,4,2      ; @EAP_SIM_AT_RESULT_IND
l_.str.3:                               ; @.str.3
	.asciz	"   AT_MAC"

	.comm	_EAP_SIM_AT_MAC,4,2             ; @EAP_SIM_AT_MAC
	.comm	_EAP_SIM_NONCE_MT_LEN,4,2       ; @EAP_SIM_NONCE_MT_LEN
	.no_dead_strip	_eap_sim_build_challenge
.subsections_via_symbols
