	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdio_uart_set_termios
_sdio_uart_set_termios:                 ## @sdio_uart_set_termios
	.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	%rsi, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	4(%rdi), %r13d
	movq	%r14, %rdi
	callq	_sdio_uart_claim_func
	testq	%rax, %rax
	je	LBB0_1
## %bb.18:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	4(%rbx), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_sdio_uart_change_speed
	movl	(%r15), %eax
	movq	_CBAUD@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%edx, %ecx
	andl	%r13d, %ecx
	testl	%eax, %edx
	je	LBB0_4
## %bb.2:
	testl	%ecx, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rax
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sdio_uart_clear_mctrl
	movl	(%r15), %eax
	movl	(%r12), %edx
	movl	%edx, %ecx
	andl	%r13d, %ecx
LBB0_4:
	testl	%eax, %edx
	jne	LBB0_10
## %bb.5:
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.6:
	movq	_TIOCM_DTR@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_CRTSCTS@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_tty_throttled
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	movq	_TIOCM_RTS@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
LBB0_9:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_sdio_uart_set_mctrl
	movl	(%r15), %eax
LBB0_10:
	movq	_CRTSCTS@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%edx, %ecx
	andl	%r13d, %ecx
	testl	%eax, %edx
	je	LBB0_13
## %bb.11:
	testl	%ecx, %ecx
	jne	LBB0_13
## %bb.12:
	movl	$0, (%rbx)
	movq	%r14, %rdi
	callq	_sdio_uart_start_tx
	movl	(%r15), %eax
	movl	(%r12), %edx
	andl	%edx, %r13d
	movl	%r13d, %ecx
LBB0_13:
	testl	%eax, %edx
	jne	LBB0_17
## %bb.14:
	testl	%ecx, %ecx
	je	LBB0_17
## %bb.15:
	movq	%r14, %rdi
	callq	_sdio_uart_get_mctrl
	movq	_TIOCM_CTS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_17
## %bb.16:
	movl	$1, (%rbx)
	movq	%r14, %rdi
	callq	_sdio_uart_stop_tx
LBB0_17:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdio_uart_release_func         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CBAUD,4,2                      ## @CBAUD
	.comm	_TIOCM_RTS,4,2                  ## @TIOCM_RTS
	.comm	_TIOCM_DTR,4,2                  ## @TIOCM_DTR
	.comm	_CRTSCTS,4,2                    ## @CRTSCTS
	.comm	_TIOCM_CTS,4,2                  ## @TIOCM_CTS
	.no_dead_strip	_sdio_uart_set_termios
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdio_uart_set_termios
_sdio_uart_set_termios:                 ; @sdio_uart_set_termios
	.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	x21, x1
	mov	x20, x0
	mov	x22, x0
	ldr	w23, [x22, #4]!
	ldur	x19, [x22, #4]
	mov	x0, x19
	bl	_sdio_uart_claim_func
	cbz	x0, LBB0_2
; %bb.1:
	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:
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_sdio_uart_change_speed
	ldr	w8, [x21]
Lloh0:
	adrp	x24, _CBAUD@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CBAUD@GOTPAGEOFF]
	ldr	w9, [x24]
	and	w11, w9, w8
	and	w10, w9, w23
	cmp	w11, #0
	ccmp	w10, #0, #0, ne
Lloh2:
	adrp	x22, _TIOCM_DTR@GOTPAGE
Lloh3:
	ldr	x22, [x22, _TIOCM_DTR@GOTPAGEOFF]
	b.ne	LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _TIOCM_RTS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TIOCM_RTS@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_sdio_uart_clear_mctrl
	ldr	w8, [x21]
	ldr	w9, [x24]
	and	w10, w9, w23
LBB0_4:
	and	w9, w9, w8
	cmp	w9, #0
	ccmp	w10, #0, #4, eq
Lloh7:
	adrp	x24, _CRTSCTS@GOTPAGE
Lloh8:
	ldr	x24, [x24, _CRTSCTS@GOTPAGEOFF]
	b.eq	LBB0_9
; %bb.5:
	ldr	w22, [x22]
	ldr	w8, [x24]
	tst	w8, w23
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_tty_throttled
	cbnz	w0, LBB0_8
LBB0_7:
Lloh9:
	adrp	x8, _TIOCM_RTS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TIOCM_RTS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_8:
	mov	x0, x19
	mov	x1, x22
	bl	_sdio_uart_set_mctrl
	ldr	w8, [x21]
LBB0_9:
	ldr	w9, [x24]
	and	w11, w9, w8
	and	w10, w9, w23
	cmp	w11, #0
	ccmp	w10, #0, #0, ne
	b.ne	LBB0_11
; %bb.10:
	str	wzr, [x20]
	mov	x0, x19
	bl	_sdio_uart_start_tx
	ldr	w8, [x21]
	ldr	w9, [x24]
	and	w10, w9, w23
LBB0_11:
	and	w8, w9, w8
	cmp	w8, #0
	ccmp	w10, #0, #4, eq
	b.eq	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_sdio_uart_get_mctrl
Lloh12:
	adrp	x8, _TIOCM_CTS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TIOCM_CTS@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_14
; %bb.13:
	mov	w8, #1
	str	w8, [x20]
	mov	x0, x19
	bl	_sdio_uart_stop_tx
LBB0_14:
	mov	x0, x19
	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	_sdio_uart_release_func
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_CBAUD,4,2                      ; @CBAUD
	.comm	_TIOCM_RTS,4,2                  ; @TIOCM_RTS
	.comm	_TIOCM_DTR,4,2                  ; @TIOCM_DTR
	.comm	_CRTSCTS,4,2                    ; @CRTSCTS
	.comm	_TIOCM_CTS,4,2                  ; @TIOCM_CTS
	.no_dead_strip	_sdio_uart_set_termios
.subsections_via_symbols
