	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pn544_hci_i2c_platform_init
_pn544_hci_i2c_platform_init:           ## @pn544_hci_i2c_platform_init
	.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	%rdi, %rbx
	movw	$-6717, -44(%rbp)               ## imm = 0xE5C3
	movl	$325893, -48(%rbp)              ## imm = 0x4F905
	movq	8(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_nfc_info
	movl	16(%rbx), %edi
	xorl	%esi, %esi
	callq	_gpiod_set_value_cansleep
	movb	$1, %r12b
	leaq	L_.str.1(%rip), %r14
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, (%rbx)
	movl	4(%rbx), %edi
	movzbl	%r12b, %esi
	andl	$1, %esi
	callq	_gpiod_set_value_cansleep
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_gpiod_set_value_cansleep
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movq	8(%rbx), %rdi
	movq	%r14, %rsi
	callq	_dev_dbg
	movq	8(%rbx), %rdi
	movq	%r15, %rsi
	movl	$6, %edx
	callq	_i2c_master_send
	cmpl	$6, %eax
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	cmpl	$0, (%rbx)
	sete	%sil
	callq	_gpiod_set_value_cansleep
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_gpiod_set_value_cansleep
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movq	8(%rbx), %rdi
	movq	%r14, %rsi
	callq	_dev_dbg
	movq	8(%rbx), %rdi
	movq	%r15, %rsi
	movl	$6, %edx
	callq	_i2c_master_send
	cmpl	$6, %eax
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	cmpl	$0, (%rbx)
	sete	%sil
	callq	_gpiod_set_value_cansleep
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_gpiod_set_value_cansleep
	movl	$10000, %edi                    ## imm = 0x2710
	movl	$15000, %esi                    ## imm = 0x3A98
	callq	_usleep_range
	movq	8(%rbx), %rdi
	movq	%r14, %rsi
	callq	_dev_dbg
	movq	8(%rbx), %rdi
	movq	%r15, %rsi
	movl	$6, %edx
	callq	_i2c_master_send
	cmpl	$6, %eax
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %r13d
	testb	$1, %r12b
	movl	$0, %r12d
	jne	LBB0_1
## %bb.6:
	movq	8(%rbx), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_nfc_err
	jmp	LBB0_7
LBB0_4:
	movq	8(%rbx), %rdi
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %rdx
	testb	$1, %r12b
	cmovneq	%rax, %rdx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_nfc_info
LBB0_7:
	movl	4(%rbx), %edi
	xorl	%esi, %esi
	cmpl	$0, (%rbx)
	sete	%sil
	callq	_gpiod_set_value_cansleep
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
l___const.pn544_hci_i2c_platform_init.rset_cmd: ## @__const.pn544_hci_i2c_platform_init.rset_cmd
	.ascii	"\005\371\004\000\303\345"

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Detecting nfc_en polarity\n"

L_.str.1:                               ## @.str.1
	.asciz	"Sending reset cmd\n"

L_.str.2:                               ## @.str.2
	.asciz	"nfc_en polarity : active %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"low"

L_.str.4:                               ## @.str.4
	.asciz	"high"

L_.str.5:                               ## @.str.5
	.asciz	"Could not detect nfc_en polarity, fallback to active high\n"

	.no_dead_strip	_pn544_hci_i2c_platform_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pn544_hci_i2c_platform_init
_pn544_hci_i2c_platform_init:           ; @pn544_hci_i2c_platform_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	mov	w8, #58819
	strh	w8, [sp, #12]
	mov	w8, #63749
	movk	w8, #4, lsl #16
	str	w8, [sp, #8]
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_nfc_info
	ldr	w0, [x19, #16]
	mov	w1, #0
	bl	_gpiod_set_value_cansleep
	mov	w8, #0
	mov	w9, #1
Lloh2:
	adrp	x20, l_.str.1@PAGE
Lloh3:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x9
	str	w8, [x19]
	ldr	w0, [x19, #4]
	and	w1, w9, #0x1
	bl	_gpiod_set_value_cansleep
	mov	w0, #10000
	mov	w1, #15000
	bl	_usleep_range
	ldp	w1, w0, [x19]
	bl	_gpiod_set_value_cansleep
	mov	w0, #10000
	mov	w1, #15000
	bl	_usleep_range
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_dev_dbg
	ldr	x0, [x19, #8]
	add	x1, sp, #8
	mov	w2, #6
	bl	_i2c_master_send
	cmp	w0, #6
	b.eq	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w8, w0, [x19]
	cmp	w8, #0
	cset	w1, eq
	bl	_gpiod_set_value_cansleep
	mov	w0, #10000
	mov	w1, #15000
	bl	_usleep_range
	ldp	w1, w0, [x19]
	bl	_gpiod_set_value_cansleep
	mov	w0, #10000
	mov	w1, #15000
	bl	_usleep_range
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_dev_dbg
	ldr	x0, [x19, #8]
	add	x1, sp, #8
	mov	w2, #6
	bl	_i2c_master_send
	cmp	w0, #6
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldp	w8, w0, [x19]
	cmp	w8, #0
	cset	w1, eq
	bl	_gpiod_set_value_cansleep
	mov	w0, #10000
	mov	w1, #15000
	bl	_usleep_range
	ldp	w1, w0, [x19]
	bl	_gpiod_set_value_cansleep
	mov	w0, #10000
	mov	w1, #15000
	bl	_usleep_range
	ldr	x0, [x19, #8]
	mov	x1, x20
	bl	_dev_dbg
	ldr	x0, [x19, #8]
	add	x1, sp, #8
	mov	w2, #6
	bl	_i2c_master_send
	cmp	w0, #6
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w9, #0
	mov	w8, #1
	tbnz	w21, #0, LBB0_1
; %bb.5:
	ldr	x0, [x19, #8]
Lloh4:
	adrp	x1, l_.str.5@PAGE
Lloh5:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_nfc_err
	b	LBB0_7
LBB0_6:
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x8, l_.str.4@PAGE
Lloh7:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh8:
	adrp	x9, l_.str.3@PAGE
Lloh9:
	add	x9, x9, l_.str.3@PAGEOFF
	tst	w21, #0x1
	csel	x8, x9, x8, ne
	str	x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_nfc_info
LBB0_7:
	ldp	w8, w0, [x19]
	cmp	w8, #0
	cset	w1, eq
	bl	_gpiod_set_value_cansleep
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
l___const.pn544_hci_i2c_platform_init.rset_cmd: ; @__const.pn544_hci_i2c_platform_init.rset_cmd
	.ascii	"\005\371\004\000\303\345"

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Detecting nfc_en polarity\n"

l_.str.1:                               ; @.str.1
	.asciz	"Sending reset cmd\n"

l_.str.2:                               ; @.str.2
	.asciz	"nfc_en polarity : active %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"low"

l_.str.4:                               ; @.str.4
	.asciz	"high"

l_.str.5:                               ; @.str.5
	.asciz	"Could not detect nfc_en polarity, fallback to active high\n"

	.no_dead_strip	_pn544_hci_i2c_platform_init
.subsections_via_symbols
