	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwdp_send_http                 ## -- Begin function iwdp_send_http
	.p2align	4, 0x90
_iwdp_send_http:                        ## @iwdp_send_http
	.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	%r8, %rbx
	movq	%rdx, %r14
	movl	%esi, %r13d
	movq	%rdi, %r15
	xorl	%r12d, %r12d
	leaq	-56(%rbp), %rdx
	movq	%rcx, %rdi
	xorl	%esi, %esi
	callq	_iwdp_get_content_type
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_strlen
	movl	%eax, %r12d
LBB0_2:
	movq	-56(%rbp), %r9
	testq	%r9, %r9
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %r8
	cmoveq	%rax, %r8
	cmoveq	%rax, %r9
	testq	%rbx, %rbx
	cmoveq	%rax, %rbx
	testl	%r13d, %r13d
	cmovneq	%rax, %rbx
	movq	%rbx, (%rsp)
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdi
	movq	%r14, %rdx
	movl	%r12d, %ecx
	callq	_asprintf
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movq	-56(%rbp), %rdi
	callq	_free
	movq	(%r15), %r14
	movq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	*%r14
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_free
	jmp	LBB0_5
LBB0_3:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	*8(%r15)
	movl	%eax, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HTTP/1.1 %s\r\nContent-length: %zd\r\nConnection: close%s%s\r\n\r\n%s"

L_.str.1:                               ## @.str.1
	.asciz	"\r\nContent-Type: "

L_.str.2:                               ## @.str.2
	.space	1

L_.str.3:                               ## @.str.3
	.asciz	"asprintf failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iwdp_send_http                 ; -- Begin function iwdp_send_http
	.p2align	2
_iwdp_send_http:                        ; @iwdp_send_http
	.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	x21, x4
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	add	x2, sp, #8
	mov	x0, x3
	mov	w1, #0
	bl	_iwdp_get_content_type
	cbz	x21, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_strlen
	mov	x3, x0
	b	LBB0_3
LBB0_2:
	mov	w3, #0
LBB0_3:
	ldr	x8, [sp, #8]
Lloh0:
	adrp	x9, l_.str.1@PAGE
Lloh1:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh2:
	adrp	x10, l_.str.2@PAGE
Lloh3:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x4, x10, x9, eq
	csel	x5, x10, x8, eq
	cmp	x21, #0
	ccmp	w22, #0, #0, ne
	csel	x6, x10, x21, ne
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, sp
	mov	x2, x20
	bl	_asprintf
	tbnz	x0, #63, LBB0_5
; %bb.4:
	ldr	x0, [sp, #8]
	bl	_free
	ldr	x21, [x19]
	ldr	x20, [sp]
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	blr	x21
	mov	x19, x0
	ldr	x0, [sp]
	bl	_free
	b	LBB0_6
LBB0_5:
	ldr	x8, [x19, #8]
Lloh6:
	adrp	x1, l_.str.3@PAGE
Lloh7:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	blr	x8
	mov	x19, x0
LBB0_6:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HTTP/1.1 %s\r\nContent-length: %zd\r\nConnection: close%s%s\r\n\r\n%s"

l_.str.1:                               ; @.str.1
	.asciz	"\r\nContent-Type: "

l_.str.2:                               ; @.str.2
	.space	1

l_.str.3:                               ; @.str.3
	.asciz	"asprintf failed"

.subsections_via_symbols
