#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*/ printf(char *, ...);
void tx_request_command() {
  unsigned char r_val;
  printf("************************************\n");
  printf("*********** tx requestet ***********\n");
  printf("************************************\n");
  printf("Send transmit-request \n");
  r_val = *((unsigned char *)(0xfffc0001)) | 0x01;
  *((unsigned char *)(0xfffc0001)) = r_val;
  printf("command register: 0x%X \n\n", *((unsigned char *)(0xfffc0001)));
}


x86 assembly (clang, -O0):
<tx_request_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0xfffc0001,%eax
movzbl (%rax),%eax
or     $0x1,%eax
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%cl
mov    $0xfffc0001,%eax
mov    %cl,(%rax)
mov    $0xfffc0001,%eax
movzbl (%rax),%esi
lea    0xeed(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx_request_command>:
push   %rbx
lea    0xf17(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
call   1030 <puts@plt>
mov    $0xfffc0001,%eax
movzbl (%rax),%esi
or     $0x1,%esi
mov    %sil,(%rax)
lea    0xe9b(%rip),%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"************************************\0A\00"
@.str.1 = [38 x i8] c"*********** tx requestet ***********\0A\00"
@.str.2 = [24 x i8] c"Send transmit-request \0A\00"
@.str.3 = [26 x i8] c"command register: 0x%X \0A\0A\00"
define void @tx_request_command() {
%1 = alloca i8
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%6 = load i8, i8* inttoptr (i64 4294705153 to i8*)
%7 = zext i8 %6 to i32
%8 = or i32 %7, 1
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
store i8 %10, i8* inttoptr (i64 4294705153 to i8*)
%11 = load i8, i8* inttoptr (i64 4294705153 to i8*)
%12 = zext i8 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str.3 = [26 x i8] c"command register: 0x%X \0A\0A\00"
@str.4 = [37 x i8] c"*********** tx requestet ***********\00"
@str.5 = [37 x i8] c"************************************\00"
@str.6 = [23 x i8] c"Send transmit-request \00"
define void @tx_request_command() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
%5 = load i8, i8* inttoptr (i64 4294705153 to i8*)
%6 = or i8 %5, 1
store i8 %6, i8* inttoptr (i64 4294705153 to i8*)
%7 = zext i8 %6 to i32
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0), i32 %7)
ret void
}