#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ drv_generic_serial_write(char const *, unsigned int const);
int /*<<< orphan*/ message(int, char *, char const);
void drv_D4D_send_nowait(const char *data, const unsigned int len) {
  if (len > 1 && data[0] >= 32 && data[0] < 127)
    message(2,
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Johny-C/smartwatch-repo/refs/heads/"
            "master/drv_D4D.c"
            ": "
            "drv_D4D_send_nowait('%c'",
            data[0]);
  drv_generic_serial_write(data, len);
}


x86 assembly (clang, -O0):
<drv_D4D_send_nowait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jbe    1171 <drv_D4D_send_nowait+0x51>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jl     1171 <drv_D4D_send_nowait+0x51>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7f,%eax
jge    1171 <drv_D4D_send_nowait+0x51>
mov    -0x8(%rbp),%rax
mov    $0x2,%edi
lea    0xe97(%rip),%rsi
movsbl (%rax),%edx
call   1030 <message@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <drv_generic_serial_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drv_D4D_send_nowait>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
cmp    $0x2,%esi
jb     114d <drv_D4D_send_nowait+0x2d>
mov    (%r14),%al
lea    -0x7f(%rax),%ecx
cmp    $0xa1,%cl
jb     114d <drv_D4D_send_nowait+0x2d>
movsbl %al,%edx
lea    0xebd(%rip),%rsi
mov    $0x2,%edi
call   1030 <message@plt>
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <drv_generic_serial_write@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Johny-C/smartwatch-repo/refs/heads/master/drv_D4D.c: drv_D4D_send_nowait('%c'\00"
define void @drv_D4D_send_nowait(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ugt i32 %5, 1
br i1 %6, label %7, label %24
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sge i32 %11, 32
br i1 %12, label %13, label %24
13: ; preds = %7
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp slt i32 %17, 127
br i1 %18, label %19, label %24
19: ; preds = %13
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 0
%22 = load i8, i8* %21
%23 = call i32 @message(i32 2, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i8 signext %22)
br label %24
24: ; preds = %19, %13, %7, %2
%25 = load i8*, i8** %3
%26 = load i32, i32* %4
%27 = call i32 @drv_generic_serial_write(i8* %25, i32 %26)
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Johny-C/smartwatch-repo/refs/heads/master/drv_D4D.c: drv_D4D_send_nowait('%c'\00"
define void @drv_D4D_send_nowait(i8* %0, i32 %1) {
%3 = icmp ugt i32 %1, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = load i8, i8* %0
%6 = add i8 %5, -127
%7 = icmp ult i8 %6, -95
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @message(i32 2, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i8 signext %5)
br label %10
10: ; preds = %8, %4, %2
%11 = tail call i32 @drv_generic_serial_write(i8* %0, i32 %1)
ret void
}