	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smart_ant_init
_smart_ant_init:                        ## @smart_ant_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_DRX_UIO1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_DRX_UIO_MODE_FIRMWARE_SMA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movl	$0, -44(%rbp)
	movq	(%rdi), %r15
	movq	8(%rdi), %r13
	movq	_SIO_TOP_COMM_KEY__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SIO_TOP_COMM_KEY_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_drxj_dap_write_reg16
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movq	_SIO_SA_TX_COMMAND__A@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_drxj_dap_read_reg16
	testl	%eax, %eax
	jne	LBB0_1
## %bb.3:
	cmpq	$0, (%r13)
	movl	(%r12), %esi
	movl	-44(%rbp), %edx
	movq	_SIO_SA_TX_COMMAND_TX_INVERT__M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	je	LBB0_13
## %bb.4:
	orl	%edx, %eax
	movq	_SIO_SA_TX_COMMAND_TX_ENABLE__M@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r15, %rdi
	movl	%eax, %edx
	jmp	LBB0_5
LBB0_13:
	notl	%eax
	andl	%eax, %edx
	movq	_SIO_SA_TX_COMMAND_TX_ENABLE__M@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r15, %rdi
LBB0_5:
	xorl	%ecx, %ecx
	callq	_drxj_dap_write_reg16
	testl	%eax, %eax
	jne	LBB0_1
## %bb.6:
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ctrl_set_uio_cfg
	testl	%eax, %eax
	jne	LBB0_1
## %bb.7:
	movq	(%r14), %rdi
	movq	_SIO_PDR_SMA_TX_CFG__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$19, %edx
	xorl	%ecx, %ecx
	callq	_drxj_dap_write_reg16
	testl	%eax, %eax
	je	LBB0_8
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	(%r14), %rdi
	movq	_SIO_PDR_SMA_TX_GPIO_FNC__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movl	$3, %edx
	xorl	%ecx, %ecx
	callq	_drxj_dap_write_reg16
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movl	%r15d, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	(%r14), %rdi
	movq	_SIO_TOP_COMM_KEY__A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_drxj_dap_write_reg16
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r14d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_err
	movl	%r14d, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_DRX_UIO1,4,2                   ## @DRX_UIO1
	.comm	_DRX_UIO_MODE_FIRMWARE_SMA,4,2  ## @DRX_UIO_MODE_FIRMWARE_SMA
	.comm	_SIO_TOP_COMM_KEY__A,4,2        ## @SIO_TOP_COMM_KEY__A
	.comm	_SIO_TOP_COMM_KEY_KEY,4,2       ## @SIO_TOP_COMM_KEY_KEY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error %d\n"

	.comm	_SIO_SA_TX_COMMAND__A,4,2       ## @SIO_SA_TX_COMMAND__A
	.comm	_SIO_SA_TX_COMMAND_TX_INVERT__M,4,2 ## @SIO_SA_TX_COMMAND_TX_INVERT__M
	.comm	_SIO_SA_TX_COMMAND_TX_ENABLE__M,4,2 ## @SIO_SA_TX_COMMAND_TX_ENABLE__M
	.comm	_SIO_PDR_SMA_TX_CFG__A,4,2      ## @SIO_PDR_SMA_TX_CFG__A
	.comm	_SIO_PDR_SMA_TX_GPIO_FNC__A,4,2 ## @SIO_PDR_SMA_TX_GPIO_FNC__A
	.no_dead_strip	_smart_ant_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smart_ant_init
_smart_ant_init:                        ; @smart_ant_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
Lloh0:
	adrp	x8, _DRX_UIO1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRX_UIO1@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DRX_UIO_MODE_FIRMWARE_SMA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DRX_UIO_MODE_FIRMWARE_SMA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
	str	wzr, [sp, #4]
	ldp	x21, x23, [x0]
Lloh6:
	adrp	x22, _SIO_TOP_COMM_KEY__A@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SIO_TOP_COMM_KEY__A@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh8:
	adrp	x8, _SIO_TOP_COMM_KEY_KEY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SIO_TOP_COMM_KEY_KEY@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w3, #0
	bl	_drxj_dap_write_reg16
	cbnz	w0, LBB0_9
; %bb.1:
Lloh11:
	adrp	x24, _SIO_SA_TX_COMMAND__A@GOTPAGE
Lloh12:
	ldr	x24, [x24, _SIO_SA_TX_COMMAND__A@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #4
	mov	x0, x21
	mov	w3, #0
	bl	_drxj_dap_read_reg16
	cbnz	w0, LBB0_9
; %bb.2:
	ldr	x10, [x23]
	ldr	w1, [x24]
	ldr	w8, [sp, #4]
Lloh13:
	adrp	x9, _SIO_SA_TX_COMMAND_TX_INVERT__M@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SIO_SA_TX_COMMAND_TX_INVERT__M@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cbz	x10, LBB0_4
; %bb.3:
	orr	w8, w9, w8
	b	LBB0_5
LBB0_4:
	bic	w8, w8, w9
LBB0_5:
Lloh16:
	adrp	x9, _SIO_SA_TX_COMMAND_TX_ENABLE__M@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SIO_SA_TX_COMMAND_TX_ENABLE__M@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x21
	mov	w3, #0
	bl	_drxj_dap_write_reg16
	cbnz	w0, LBB0_9
; %bb.6:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ctrl_set_uio_cfg
	cbnz	w0, LBB0_9
; %bb.7:
	ldr	x0, [x19]
Lloh19:
	adrp	x8, _SIO_PDR_SMA_TX_CFG__A@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SIO_PDR_SMA_TX_CFG__A@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	w2, #19
	mov	w3, #0
	bl	_drxj_dap_write_reg16
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	x0, [x19]
Lloh22:
	adrp	x8, _SIO_PDR_SMA_TX_GPIO_FNC__A@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SIO_PDR_SMA_TX_GPIO_FNC__A@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	w2, #3
	mov	w3, #0
	bl	_drxj_dap_write_reg16
	cbz	w0, LBB0_12
LBB0_9:
	mov	x20, x0
LBB0_10:
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_pr_err
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	ldr	x0, [x19]
	ldr	w1, [x22]
	mov	w2, #0
	mov	w3, #0
	bl	_drxj_dap_write_reg16
	mov	x20, x0
	cbnz	w0, LBB0_10
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_DRX_UIO1,4,2                   ; @DRX_UIO1
	.comm	_DRX_UIO_MODE_FIRMWARE_SMA,4,2  ; @DRX_UIO_MODE_FIRMWARE_SMA
	.comm	_SIO_TOP_COMM_KEY__A,4,2        ; @SIO_TOP_COMM_KEY__A
	.comm	_SIO_TOP_COMM_KEY_KEY,4,2       ; @SIO_TOP_COMM_KEY_KEY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error %d\n"

	.comm	_SIO_SA_TX_COMMAND__A,4,2       ; @SIO_SA_TX_COMMAND__A
	.comm	_SIO_SA_TX_COMMAND_TX_INVERT__M,4,2 ; @SIO_SA_TX_COMMAND_TX_INVERT__M
	.comm	_SIO_SA_TX_COMMAND_TX_ENABLE__M,4,2 ; @SIO_SA_TX_COMMAND_TX_ENABLE__M
	.comm	_SIO_PDR_SMA_TX_CFG__A,4,2      ; @SIO_PDR_SMA_TX_CFG__A
	.comm	_SIO_PDR_SMA_TX_GPIO_FNC__A,4,2 ; @SIO_PDR_SMA_TX_GPIO_FNC__A
	.no_dead_strip	_smart_ant_init
.subsections_via_symbols
