	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pn533_setup
_pn533_setup:                           ## @pn533_setup
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movl	l___const.pn533_setup.pasori_cfg+8(%rip), %eax
	movl	%eax, -40(%rbp)
	movq	l___const.pn533_setup.pasori_cfg(%rip), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %edx
	movl	%edx, %eax
	andl	$-4, %eax
	cmpl	$128, %eax
	jne	LBB0_12
## %bb.1:
	movabsq	$4294967298, %rax               ## imm = 0x100000002
	movq	%rax, -64(%rbp)
	movq	_PN533_CONFIG_MAX_RETRIES_NO_RETRY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_PN533_CONFIG_TIMING_102@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)
	movq	%rax, -80(%rbp)
	movq	_PN533_CONFIG_TIMING_204@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	_PN533_CFGITEM_MAX_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movl	$12, %ecx
	callq	_pn533_set_configuration
	testl	%eax, %eax
	je	LBB0_4
## %bb.2:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_3
LBB0_12:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_nfc_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movq	_PN533_CFGITEM_TIMING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-88(%rbp), %rdx
	movq	%r14, %rdi
	movl	$24, %ecx
	callq	_pn533_set_configuration
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_3:
	xorl	%eax, %eax
	callq	_nfc_err
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_13
## %bb.11:
	movl	%ebx, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%ebx, %ebx
	cmpl	$130, (%r14)
	jne	LBB0_10
## %bb.7:
	movq	%r14, %rdi
	callq	_pn533_pasori_fw_reset
	movq	_PN533_CFGITEM_PASORI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movl	$3, %ecx
	callq	_pn533_set_configuration
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r15d
	movl	4(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_nfc_err
	movl	%r15d, %ebx
	jmp	LBB0_10
LBB0_9:
	movq	%r14, %rdi
	callq	_pn533_pasori_fw_reset
	jmp	LBB0_10
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.pn533_setup.pasori_cfg
l___const.pn533_setup.pasori_cfg:
	.long	8                               ## 0x8
	.long	1                               ## 0x1
	.long	8                               ## 0x8

	.comm	_PN533_CONFIG_MAX_RETRIES_NO_RETRY,4,2 ## @PN533_CONFIG_MAX_RETRIES_NO_RETRY
	.comm	_PN533_CONFIG_TIMING_102,8,3    ## @PN533_CONFIG_TIMING_102
	.comm	_PN533_CONFIG_TIMING_204,4,2    ## @PN533_CONFIG_TIMING_204
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unknown device type %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PN533_CFGITEM_MAX_RETRIES,4,2  ## @PN533_CFGITEM_MAX_RETRIES
L_.str.1:                               ## @.str.1
	.asciz	"Error on setting MAX_RETRIES config\n"

	.comm	_PN533_CFGITEM_TIMING,4,2       ## @PN533_CFGITEM_TIMING
L_.str.2:                               ## @.str.2
	.asciz	"Error on setting RF timings\n"

	.comm	_PN533_CFGITEM_PASORI,4,2       ## @PN533_CFGITEM_PASORI
L_.str.3:                               ## @.str.3
	.asciz	"Error while settings PASORI config\n"

	.no_dead_strip	_pn533_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function pn533_setup
lCPI0_0:
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_pn533_setup:                           ; @pn533_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, l___const.pn533_setup.pasori_cfg@PAGE
Lloh4:
	add	x8, x8, l___const.pn533_setup.pasori_cfg@PAGEOFF
	ldr	x9, [x8]
	stur	x9, [x29, #-40]
	ldr	w8, [x8, #8]
	stur	w8, [x29, #-32]
	ldr	w8, [x0]
	and	w9, w8, #0xfffffffc
	cmp	w9, #128
	b.ne	LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, lCPI0_0@PAGE
Lloh6:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
Lloh7:
	adrp	x8, _PN533_CONFIG_MAX_RETRIES_NO_RETRY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PN533_CONFIG_MAX_RETRIES_NO_RETRY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _PN533_CONFIG_TIMING_102@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PN533_CONFIG_TIMING_102@GOTPAGEOFF]
	str	w8, [sp, #48]
Lloh12:
	ldr	x8, [x9]
	stp	x8, x8, [sp, #24]
Lloh13:
	adrp	x8, _PN533_CONFIG_TIMING_204@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PN533_CONFIG_TIMING_204@GOTPAGEOFF]
	str	d0, [sp, #40]
Lloh15:
	ldr	w8, [x8]
	str	w8, [sp, #16]
Lloh16:
	adrp	x8, _PN533_CFGITEM_MAX_RETRIES@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PN533_CFGITEM_MAX_RETRIES@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	add	x2, sp, #40
	mov	x0, x19
	mov	w3, #12
	bl	_pn533_set_configuration
	cbz	w0, LBB0_6
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_nfc_err
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #4]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_nfc_err
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	ldur	x8, [x29, #-24]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.5:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
Lloh29:
	adrp	x8, _PN533_CFGITEM_TIMING@GOTPAGE
Lloh30:
	ldr	x8, [x8, _PN533_CFGITEM_TIMING@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	mov	w3, #24
	bl	_pn533_set_configuration
	cbz	w0, LBB0_8
; %bb.7:
	mov	x20, x0
	ldr	w0, [x19, #4]
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_nfc_err
	b	LBB0_4
LBB0_8:
	ldr	w8, [x19]
	cmp	w8, #130
	b.ne	LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_pn533_pasori_fw_reset
Lloh34:
	adrp	x8, _PN533_CFGITEM_PASORI@GOTPAGE
Lloh35:
	ldr	x8, [x8, _PN533_CFGITEM_PASORI@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	sub	x2, x29, #40
	mov	x0, x19
	mov	w3, #3
	bl	_pn533_set_configuration
	mov	x20, x0
	cbz	w0, LBB0_12
; %bb.10:
	ldr	w0, [x19, #4]
Lloh37:
	adrp	x1, l_.str.3@PAGE
Lloh38:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_nfc_err
	b	LBB0_4
LBB0_11:
	mov	w20, #0
	b	LBB0_4
LBB0_12:
	mov	x0, x19
	bl	_pn533_pasori_fw_reset
	b	LBB0_4
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdrp	Lloh5, Lloh7
	.loh AdrpLdr	Lloh5, Lloh6
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.pn533_setup.pasori_cfg
l___const.pn533_setup.pasori_cfg:
	.long	8                               ; 0x8
	.long	1                               ; 0x1
	.long	8                               ; 0x8

	.comm	_PN533_CONFIG_MAX_RETRIES_NO_RETRY,4,2 ; @PN533_CONFIG_MAX_RETRIES_NO_RETRY
	.comm	_PN533_CONFIG_TIMING_102,8,3    ; @PN533_CONFIG_TIMING_102
	.comm	_PN533_CONFIG_TIMING_204,4,2    ; @PN533_CONFIG_TIMING_204
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unknown device type %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PN533_CFGITEM_MAX_RETRIES,4,2  ; @PN533_CFGITEM_MAX_RETRIES
l_.str.1:                               ; @.str.1
	.asciz	"Error on setting MAX_RETRIES config\n"

	.comm	_PN533_CFGITEM_TIMING,4,2       ; @PN533_CFGITEM_TIMING
l_.str.2:                               ; @.str.2
	.asciz	"Error on setting RF timings\n"

	.comm	_PN533_CFGITEM_PASORI,4,2       ; @PN533_CFGITEM_PASORI
l_.str.3:                               ; @.str.3
	.asciz	"Error while settings PASORI config\n"

	.no_dead_strip	_pn533_setup
.subsections_via_symbols
