xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ST7735_DrawChar(short, short, unsigned char, short, short,
                                   unsigned char);
void ST7735_DrawNum(short x, short y, unsigned char input, short textColor,
                    short bgColor, unsigned char size) {
  ST7735_DrawChar(x, y, (input + 48), textColor, bgColor, size);
}


x86 assembly (clang, -O0):
<ST7735_DrawNum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %r8d,-0x1c(%rbp)
mov    %ecx,%eax
mov    -0x1c(%rbp),%ecx
mov    %eax,-0x18(%rbp)
mov    %edx,%eax
mov    -0x18(%rbp),%edx
mov    %eax,-0x14(%rbp)
mov    %esi,%eax
mov    -0x14(%rbp),%esi
mov    %eax,-0x10(%rbp)
mov    %edi,%r8d
mov    -0x10(%rbp),%edi
mov    %r9b,%al
mov    %r8w,-0x2(%rbp)
mov    %di,-0x4(%rbp)
mov    %sil,-0x5(%rbp)
mov    %dx,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %al,-0xb(%rbp)
mov    -0x2(%rbp),%di
mov    -0x4(%rbp),%si
movzbl -0x5(%rbp),%eax
add    $0x30,%eax
mov    %al,%dl
mov    -0x8(%rbp),%cx
mov    -0xa(%rbp),%ax
movswl %di,%edi
movswl %si,%esi
movzbl %dl,%edx
movswl %cx,%ecx
movswl %ax,%r8d
movzbl -0xb(%rbp),%r9d
call   1030 <ST7735_DrawChar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ST7735_DrawNum>:
add    $0x30,%dl
movzbl %dl,%edx
jmp    1030 <ST7735_DrawChar@plt>

LLVM IR (-O0):
define void @ST7735_DrawNum(i16 signext %0, i16 signext %1, i8 zeroext %2, i16 signext %3, i16 signext %4, i8 zeroext %5) {
%7 = alloca i16
%8 = alloca i16
%9 = alloca i8
%10 = alloca i16
%11 = alloca i16
%12 = alloca i8
store i16 %0, i16* %7
store i16 %1, i16* %8
store i8 %2, i8* %9
store i16 %3, i16* %10
store i16 %4, i16* %11
store i8 %5, i8* %12
%13 = load i16, i16* %7
%14 = load i16, i16* %8
%15 = load i8, i8* %9
%16 = zext i8 %15 to i32
%17 = add nsw i32 %16, 48
%18 = trunc i32 %17 to i8
%19 = load i16, i16* %10
%20 = load i16, i16* %11
%21 = load i8, i8* %12
%22 = call i32 @ST7735_DrawChar(i16 signext %13, i16 signext %14, i8 zeroext %18, i16 signext %19, i16 signext %20, i8 zeroext %21)
ret void
}

LLVM IR (-O2):
define void @ST7735_DrawNum(i16 signext %0, i16 signext %1, i8 zeroext %2, i16 signext %3, i16 signext %4, i8 zeroext %5) {
%7 = add i8 %2, 48
%8 = tail call i32 @ST7735_DrawChar(i16 signext %0, i16 signext %1, i8 zeroext %7, i16 signext %3, i16 signext %4, i8 zeroext %5)
ret void
}
int mhia_handle_probe_request(struct user_t *user, struct mhia_msg *msg) {
  return 0;
}


x86 assembly (clang, -O0):
<mhia_handle_probe_request>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mhia_handle_probe_request>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.user_t = type opaque
%struct.mhia_msg = type opaque
define i32 @mhia_handle_probe_request(%struct.user_t* %0, %struct.mhia_msg* %1) {
%3 = alloca %struct.user_t*
%4 = alloca %struct.mhia_msg*
store %struct.user_t* %0, %struct.user_t** %3
store %struct.mhia_msg* %1, %struct.mhia_msg** %4
ret i32 0
}

LLVM IR (-O2):
%struct.user_t = type opaque
%struct.mhia_msg = type opaque
define i32 @mhia_handle_probe_request(%struct.user_t* nocapture readnone %0, %struct.mhia_msg* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void xxx(void) { printf("MAIN\n"); }


x86 assembly (clang, -O0):
<xxx>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<xxx>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"MAIN\0A\00"
define void @xxx() {
%1 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [5 x i8] c"MAIN\00"
define void @xxx() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_E9uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0xE9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_E9uint64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xe9,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_E9uint64_lowword_reg>:
test   $0xe9,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_E9uint64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 233
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_E9uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 233
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sleep(unsigned int);
void waitafew(unsigned int del) { sleep(del); }


x86 assembly (clang, -O0):
<waitafew>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <sleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitafew>:
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @waitafew(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sleep(i32 %3)
ret void
}

LLVM IR (-O2):
define void @waitafew(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
ret void
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ helper(struct TreeNode *, int *, int *);
int kthSmallest(struct TreeNode *root, int k) {
  int ret;
  helper(root, &k, &ret);
  return ret;
}


x86 assembly (clang, -O0):
<kthSmallest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <helper@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kthSmallest>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <helper@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32 @kthSmallest(%struct.TreeNode* %0, i32 %1) {
%3 = alloca %struct.TreeNode*
%4 = alloca i32
%5 = alloca i32
store %struct.TreeNode* %0, %struct.TreeNode** %3
store i32 %1, i32* %4
%6 = load %struct.TreeNode*, %struct.TreeNode** %3
%7 = call i32 @helper(%struct.TreeNode* %6, i32* %4, i32* %5)
%8 = load i32, i32* %5
ret i32 %8
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32 @kthSmallest(%struct.TreeNode* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %1, i32* %3
%5 = bitcast i32* %4 to i8*
%6 = call i32 @helper(%struct.TreeNode* %0, i32* %3, i32* %4)
%7 = load i32, i32* %4
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ s;

/* Variables and functions */
unsigned short htons(unsigned short);
int /*<<< orphan*/ memcpy(char *, unsigned short *, int);
void rfc1035SetQueryID(char *buf, unsigned short qid) {
  unsigned short s = htons(qid);
  memcpy(buf, &s, sizeof(s));
}


x86 assembly (clang, -O0):
<rfc1035SetQueryID>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%edi
call   1030 <htons@plt>
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x2,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfc1035SetQueryID>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <htons@plt>
mov    %ax,0xe(%rsp)
lea    0xe(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x2,%edx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @rfc1035SetQueryID(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = load i16, i16* %4
%7 = call zeroext i16 @htons(i16 zeroext %6)
store i16 %7, i16* %5
%8 = load i8*, i8** %3
%9 = call i32 @memcpy(i8* %8, i16* %5, i32 2)
ret void
}

LLVM IR (-O2):
define void @rfc1035SetQueryID(i8* %0, i16 zeroext %1) {
%3 = alloca i16
%4 = bitcast i16* %3 to i8*
%5 = tail call zeroext i16 @htons(i16 zeroext %1)
store i16 %5, i16* %3
%6 = call i32 @memcpy(i8* %0, i16* %3, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
void *thread_function(void *arg) {
  int *clientsock;
  clientsock = (int *)arg;
  printf("thread close socket id: %d\n", *clientsock);
  printf("thread exit\n");
  pthread_exit(NULL);
  return NULL;
}


x86 assembly (clang, -O0):
<thread_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_function>:
push   %rax
mov    (%rdi),%esi
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed4(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <pthread_exit@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"thread close socket id: %d\0A\00"
@.str.1 = [13 x i8] c"thread exit\0A\00"
define i8* @thread_function(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @pthread_exit(i32* null)
ret i8* null
}

LLVM IR (-O2):
@.str = [28 x i8] c"thread close socket id: %d\0A\00"
@str = [12 x i8] c"thread exit\00"
define noalias i8* @thread_function(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @pthread_exit(i32* null)
ret i8* null
}
int length(char string[]) {
  int index;
  for (index = 0; string[index] != '\0'; ++index)
    ;
  return index;
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <length+0x37>
jmp    1129 <length+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <length+0x10>
ret

LLVM IR (-O0):
define i32 @length(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %4
br label %13
13: ; preds = %12
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @length(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ disp_int(int /*<<< orphan*/);
int /*<<< orphan*/ disp_str(char *);
void test_b() {
  int i = 256;
  while (1) {
    disp_str("m");
    disp_int(i++);
    disp_str("  ");
    delay(1);
  }
}


x86 assembly (clang, -O0):
<test_b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x100,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <disp_str@plt>
mov    -0x4(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
call   1050 <disp_int@plt>
lea    0xe9d(%rip),%rdi
call   1030 <disp_str@plt>
mov    $0x1,%edi
call   1040 <delay@plt>
jmp    113f <test_b+0xf>

x86 assembly (clang, -O2):
<test_b>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    $0x100,%ebx
lea    0xebd(%rip),%r14
lea    0xeb8(%rip),%r15
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <disp_str@plt>
lea    0x1(%rbx),%ebp
mov    %ebx,%edi
call   1050 <disp_int@plt>
mov    %r15,%rdi
call   1030 <disp_str@plt>
mov    $0x1,%edi
call   1040 <delay@plt>
mov    %ebp,%ebx
jmp    1150 <test_b+0x20>

LLVM IR (-O0):
@.str = [2 x i8] c"m\00"
@.str.1 = [3 x i8] c" \00"
define void @test_b() {
%1 = alloca i32
store i32 256, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = call i32 @disp_int(i32 %4)
%7 = call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @delay(i32 1)
br label %2
}

LLVM IR (-O2):
@.str = [2 x i8] c"m\00"
@.str.1 = [3 x i8] c" \00"
define void @test_b() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 256, %0 ], [ %4, %1 ]
%3 = tail call i32 @disp_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = add nuw nsw i32 %2, 1
%5 = tail call i32 @disp_int(i32 %2)
%6 = tail call i32 @disp_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @delay(i32 1)
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int main() {
  FILE *pf;
  pf = fopen("archivotexto.txt", "w");
  fprintf(pf, "hola que tal txema");
  fclose(pf);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xec5(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"archivotexto.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [19 x i8] c"hola que tal txema\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fprintf(i32* %4, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32*, i32** %2
%7 = call i32 @fclose(i32* %6)
%8 = load i32, i32* @EXIT_SUCCESS
ret i32 %8
}

LLVM IR (-O2):
@.str = [17 x i8] c"archivotexto.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [19 x i8] c"hola que tal txema\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i64 18, i64 1, i32* %1)
%3 = tail call i32 @fclose(i32* %1)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ RateDesiredHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void RateDesiredRequestUpdate() { UAVObjRequestUpdate(RateDesiredHandle()); }


x86 assembly (clang, -O0):
<RateDesiredRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <RateDesiredHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RateDesiredRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1030 <RateDesiredHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @RateDesiredRequestUpdate() {
%1 = call i32 (...) @RateDesiredHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @RateDesiredRequestUpdate() {
%1 = tail call i32 (...) @RateDesiredHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
__attribute__((always_)) int
register_module_notifier(struct notifier_block *nb) {
  return 0;
}


x86 assembly (clang, -O0):
<register_module_notifier>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<register_module_notifier>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.notifier_block = type opaque
define i32 @register_module_notifier(%struct.notifier_block* %0) {
%2 = alloca %struct.notifier_block*
store %struct.notifier_block* %0, %struct.notifier_block** %2
ret i32 0
}

LLVM IR (-O2):
%struct.notifier_block = type opaque
define i32 @register_module_notifier(%struct.notifier_block* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
float __infer_nondet_float();
float expf(float x) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<expf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expf>:
xor    %eax,%eax
jmp    1030 <__infer_nondet_float@plt>

LLVM IR (-O0):
define float @expf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @expf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
/* Variables and functions */
void *malloc(size_t);
void *alloc_func(size_t size, void *arg) { return malloc(size); }


x86 assembly (clang, -O0):
<alloc_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_func>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @alloc_func(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i64, i64* %3
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @alloc_func(i64 %0, i8* nocapture readnone %1) {
%3 = tail call i8* @malloc(i64 %0)
ret i8* %3
}
void foo174() {}


x86 assembly (clang, -O0):
<foo174>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo174>:
ret

LLVM IR (-O0):
define void @foo174() {
ret void
}

LLVM IR (-O2):
define void @foo174() {
ret void
}
int twl4030charger_usb_en(int enable) { return 0; }


x86 assembly (clang, -O0):
<twl4030charger_usb_en>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<twl4030charger_usb_en>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @twl4030charger_usb_en(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @twl4030charger_usb_en(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ output_with_tab(char *);
void gen_immediate(void) { output_with_tab("ldd #"); }


x86 assembly (clang, -O0):
<gen_immediate>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <output_with_tab@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_immediate>:
lea    0xee9(%rip),%rdi
jmp    1030 <output_with_tab@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"ldd #\00"
define void @gen_immediate() {
%1 = call i32 @output_with_tab(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"ldd #\00"
define void @gen_immediate() {
%1 = tail call i32 @output_with_tab(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ voidpf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
long ftell(int /*<<< orphan*/ *);
long ftell_file_func(voidpf opaque, voidpf stream) {
  long ret;
  ret = ftell((FILE *)stream);
  return ret;
}


x86 assembly (clang, -O0):
<ftell_file_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftell_file_func>:
mov    %rsi,%rdi
jmp    1030 <ftell@plt>

LLVM IR (-O0):
define i64 @ftell_file_func(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i32*
%8 = call i64 @ftell(i32* %7)
store i64 %8, i64* %5
%9 = load i64, i64* %5
ret i64 %9
}

LLVM IR (-O2):
define i64 @ftell_file_func(i64 %0, i64 %1) {
%3 = inttoptr i64 %1 to i32*
%4 = tail call i64 @ftell(i32* %3)
ret i64 %4
}
/* Variables and functions */
char *avro_str_alloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
int strlen(char const *);
char *avro_strdup(const char *str) {
  if (str == NULL) {
    return NULL;
  }
  size_t str_size = strlen(str) + 1;
  char *new_str = avro_str_alloc(str_size);
  memcpy(new_str, str, str_size);
  return new_str;
}


x86 assembly (clang, -O0):
<avro_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <avro_strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    118c <avro_strdup+0x5c>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <avro_str_alloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1050 <memcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avro_strdup>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1163 <avro_strdup+0x33>
mov    %rdi,%rbx
call   1040 <strlen@plt>
add    $0x1,%eax
movslq %eax,%r15
mov    %r15,%rdi
call   1030 <avro_str_alloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
jmp    1166 <avro_strdup+0x36>
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @avro_strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %9
8: ; preds = %1
store i8* null, i8** %2
br label %21
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = call i32 @strlen(i8* %10)
%12 = add nsw i32 %11, 1
%13 = sext i32 %12 to i64
store i64 %13, i64* %4
%14 = load i64, i64* %4
%15 = call i8* @avro_str_alloc(i64 %14)
store i8* %15, i8** %5
%16 = load i8*, i8** %5
%17 = load i8*, i8** %3
%18 = load i64, i64* %4
%19 = call i32 @memcpy(i8* %16, i8* %17, i64 %18)
%20 = load i8*, i8** %5
store i8* %20, i8** %2
br label %21
21: ; preds = %9, %8
%22 = load i8*, i8** %2
ret i8* %22
}

LLVM IR (-O2):
define i8* @avro_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i8* @avro_str_alloc(i64 %6)
%8 = tail call i32 @memcpy(i8* %7, i8* %0, i64 %6)
br label %9
9: ; preds = %1, %3
%10 = phi i8* [ %7, %3 ], [ null, %1 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xca() {
  Assert_real((islower(202) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_islower.c",
              1015, ("islower should be 0 for 0xca"));
}


x86 assembly (clang, -O0):
<t_islower_0xca>:
push   %rbp
mov    %rsp,%rbp
mov    $0xca,%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x3f7,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0xca>:
push   %rax
mov    $0xca,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3f7,%edx
pop    %rax
jmp    1040 <Assert_real@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/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xca\00"
define void @t_islower_0xca() {
%1 = call i64 @islower(i32 202)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
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/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xca\00"
define void @t_islower_0xca() {
%1 = tail call i64 @islower(i32 202)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1015, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *return_string(char *);
int main() {
  char *word = "\" \"";
  printf("%s\n", word);
  printf("String: %s\n", return_string(word));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <return_string@plt>
mov    %rax,%rsi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee4(%rip),%rdi
lea    0xed1(%rip),%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <return_string@plt>
lea    0xebe(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"\22 \22\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [12 x i8] c"String: %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i8* @return_string(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"\22 \22\00"
@.str.1 = [4 x i8] c"%s\0A\00"
@.str.2 = [12 x i8] c"String: %s\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @return_string(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t WatchdogValueGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x00000004))));
}


x86 assembly (clang, -O0):
<WatchdogValueGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogValueGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x4(%rax),%rax
ret

LLVM IR (-O0):
define i64 @WatchdogValueGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 4
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @WatchdogValueGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 4
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ writec(char);
void paderrorline(unsigned nspaces) {
  int nstars = 5;
  while (nstars-- != 0)
    writec('*');
  while (nspaces-- != 0)
    writec(' ');
}


x86 assembly (clang, -O0):
<paderrorline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1145 <paderrorline+0x35>
mov    $0x2a,%edi
call   1030 <writec@plt>
jmp    1122 <paderrorline+0x12>
jmp    114a <paderrorline+0x3a>
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     116d <paderrorline+0x5d>
mov    $0x20,%edi
call   1030 <writec@plt>
jmp    114a <paderrorline+0x3a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paderrorline>:
push   %rbx
mov    %edi,%ebx
mov    $0x2a,%edi
call   1030 <writec@plt>
mov    $0x2a,%edi
call   1030 <writec@plt>
mov    $0x2a,%edi
call   1030 <writec@plt>
mov    $0x2a,%edi
call   1030 <writec@plt>
mov    $0x2a,%edi
call   1030 <writec@plt>
test   %ebx,%ebx
je     115f <paderrorline+0x4f>
nopl   0x0(%rax)
mov    $0x20,%edi
call   1030 <writec@plt>
add    $0xffffffff,%ebx
jne    1150 <paderrorline+0x40>
pop    %rbx
ret

LLVM IR (-O0):
define void @paderrorline(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 5, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i32, i32* %3
%6 = add nsw i32 %5, -1
store i32 %6, i32* %3
%7 = icmp ne i32 %5, 0
br i1 %7, label %8, label %10
8: ; preds = %4
%9 = call i32 @writec(i8 signext 42)
br label %4
10: ; preds = %4
br label %11
11: ; preds = %15, %10
%12 = load i32, i32* %2
%13 = add i32 %12, -1
store i32 %13, i32* %2
%14 = icmp ne i32 %12, 0
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = call i32 @writec(i8 signext 32)
br label %11
17: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @paderrorline(i32 %0) {
%2 = tail call i32 @writec(i8 signext 42)
%3 = tail call i32 @writec(i8 signext 42)
%4 = tail call i32 @writec(i8 signext 42)
%5 = tail call i32 @writec(i8 signext 42)
%6 = tail call i32 @writec(i8 signext 42)
%7 = icmp eq i32 %0, 0
br i1 %7, label %13, label %8
8: ; preds = %1, %8
%9 = phi i32 [ %10, %8 ], [ %0, %1 ]
%10 = add i32 %9, -1
%11 = tail call i32 @writec(i8 signext 32)
%12 = icmp eq i32 %10, 0
br i1 %12, label %13, label %8
13: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
char *strlsave(char const *, int /*<<< orphan*/);
char *strsave(const char *s) { return strlsave(s, strlen(s)); }


x86 assembly (clang, -O0):
<strsave>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1030 <strlsave@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsave>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <strlsave@plt>

LLVM IR (-O0):
define i8* @strsave(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @strlsave(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @strsave(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @strlsave(i8* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ lk_set_aled_state_(int, int /*<<< orphan*/);
void lk_set_ddot(uint8_t state) { lk_set_aled_state_(0x40 | 0x20, state); }


x86 assembly (clang, -O0):
<lk_set_ddot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x60,%edi
call   1030 <lk_set_aled_state_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lk_set_ddot>:
mov    %edi,%esi
mov    $0x60,%edi
jmp    1030 <lk_set_aled_state_@plt>

LLVM IR (-O0):
define void @lk_set_ddot(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lk_set_aled_state_(i32 96, i32 %3)
ret void
}

LLVM IR (-O2):
define void @lk_set_ddot(i32 %0) {
%2 = tail call i32 @lk_set_aled_state_(i32 96, i32 %0)
ret void
}
void RGBAToUVJRow_C() {}


x86 assembly (clang, -O0):
<RGBAToUVJRow_C>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RGBAToUVJRow_C>:
ret

LLVM IR (-O0):
define void @RGBAToUVJRow_C() {
ret void
}

LLVM IR (-O2):
define void @RGBAToUVJRow_C() {
ret void
}
/* Type definitions */
struct buffer {
  int dummy;
};
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int /*<<< orphan*/ buffer_read(struct buffer *, double *, int);
double buffer_read_double(struct buffer *__restrict buf) {
  double data;
  buffer_read(buf, &data, sizeof(data));
  return data;
}


x86 assembly (clang, -O0):
<buffer_read_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <buffer_read@plt>
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_read_double>:
push   %rax
mov    %rsp,%rsi
mov    $0x8,%edx
call   1030 <buffer_read@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
%struct.buffer = type { i32 }
define double @buffer_read_double(%struct.buffer* noalias %0) {
%2 = alloca %struct.buffer*
%3 = alloca double
store %struct.buffer* %0, %struct.buffer** %2
%4 = load %struct.buffer*, %struct.buffer** %2
%5 = call i32 @buffer_read(%struct.buffer* %4, double* %3, i32 8)
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define double @buffer_read_double(%struct.buffer* noalias %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @buffer_read(%struct.buffer* %0, double* %2, i32 8)
%5 = load double, double* %2
ret double %5
}
char *plugin_info(void) { return "YAESU FT736 V0.1"; }


x86 assembly (clang, -O0):
<plugin_info>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<plugin_info>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"YAESU FT736 V0.1\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [17 x i8] c"YAESU FT736 V0.1\00"
define i8* @plugin_info() {
ret i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0)
}
int reverse_order(int a, int b) { return (a < b) - (a > b); }


x86 assembly (clang, -O0):
<reverse_order>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x4(%rbp),%ecx
cmp    -0x8(%rbp),%ecx
setg   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_order>:
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %esi,%edi
setl   %al
setg   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @reverse_order(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = icmp sgt i32 %9, %10
%12 = zext i1 %11 to i32
%13 = sub nsw i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @reverse_order(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = zext i1 %3 to i32
%5 = icmp sgt i32 %0, %1
%6 = sext i1 %5 to i32
%7 = add nsw i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ outval(int, int);
int /*<<< orphan*/ stgwrite(char *);
void setactivefile(int fnumber) {
  stgwrite("curfile ");
  outval(fnumber, 1);
}


x86 assembly (clang, -O0):
<setactivefile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <stgwrite@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <outval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setactivefile>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <stgwrite@plt>
mov    %ebx,%edi
mov    $0x1,%esi
pop    %rbx
jmp    1040 <outval@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"curfile \00"
define void @setactivefile(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @stgwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @outval(i32 %4, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"curfile \00"
define void @setactivefile(i32 %0) {
%2 = tail call i32 @stgwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @outval(i32 %0, i32 1)
ret void
}
int __getpageshift(void) {
  extern unsigned int __page_shift;
  return __page_shift;
}


x86 assembly (clang, -O0):
<__getpageshift>:
push   %rbp
mov    %rsp,%rbp
mov    0x2edd(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getpageshift>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@__page_shift = external global i32
define i32 @__getpageshift() {
%1 = load i32, i32* @__page_shift
ret i32 %1
}

LLVM IR (-O2):
@__page_shift = external global i32
define i32 @__getpageshift() {
%1 = load i32, i32* @__page_shift
ret i32 %1
}
/* Variables and functions */
scalar_t__ sqrt(float);
float sqrtf_signed(float f) {
  return (f >= 0.0f) ? ((float)sqrt(f)) : -((float)sqrt(-f));
}


x86 assembly (clang, -O0):
<sqrtf_signed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1147 <sqrtf_signed+0x37>
movss  -0x4(%rbp),%xmm0
call   1030 <sqrt@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    1175 <sqrtf_signed+0x65>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
call   1030 <sqrt@plt>
cvtsi2ss %rax,%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrtf_signed>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jae    1136 <sqrtf_signed+0x26>
xorps  0xee0(%rip),%xmm0
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
xorps  0xecc(%rip),%xmm0
pop    %rax
ret
call   1030 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @sqrtf_signed(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load float, float* %2
%7 = call i64 @sqrt(float %6)
%8 = sitofp i64 %7 to float
br label %15
9: ; preds = %1
%10 = load float, float* %2
%11 = fneg float %10
%12 = call i64 @sqrt(float %11)
%13 = sitofp i64 %12 to float
%14 = fneg float %13
br label %15
15: ; preds = %9, %5
%16 = phi float [ %8, %5 ], [ %14, %9 ]
ret float %16
}

LLVM IR (-O2):
define float @sqrtf_signed(float %0) {
%2 = fcmp ult float %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i64 @sqrt(float %0)
%5 = sitofp i64 %4 to float
br label %11
6: ; preds = %1
%7 = fneg float %0
%8 = tail call i64 @sqrt(float %7)
%9 = sitofp i64 %8 to float
%10 = fneg float %9
br label %11
11: ; preds = %6, %3
%12 = phi float [ %5, %3 ], [ %10, %6 ]
ret float %12
}
int BLAS_char_uplo_is_up(char uplo) { return uplo == 'U' || uplo == 'u'; }


x86 assembly (clang, -O0):
<BLAS_char_uplo_is_up>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x55,%ecx
mov    %al,-0x2(%rbp)
je     1129 <BLAS_char_uplo_is_up+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x75,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BLAS_char_uplo_is_up>:
and    $0xdf,%dil
xor    %eax,%eax
cmp    $0x55,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @BLAS_char_uplo_is_up(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 85
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 117
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @BLAS_char_uplo_is_up(i8 signext %0) {
%2 = and i8 %0, -33
%3 = icmp eq i8 %2, 85
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void printHex(int len, char *s) {
  int i = 0;
  for (; i < len; i++) {
    printf("%x", s[i]);
  }
}


x86 assembly (clang, -O0):
<printHex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1158 <printHex+0x48>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <printHex+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHex>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1146 <printHex+0x36>
mov    %rsi,%r15
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printHex+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%x\00"
define void @printHex(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
define void @printHex(i32 %0, i8* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8, i8* %1, i64 %7
%9 = load i8, i8* %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430AlarmC__1__Alarm__fired();
int /*<<< orphan*/ Msp430AlarmC__1__Msp430TimerControl__disableEvents();
void Msp430AlarmC__1__Msp430Compare__fired(void) {
  Msp430AlarmC__1__Msp430TimerControl__disableEvents();
  Msp430AlarmC__1__Alarm__fired();
}


x86 assembly (clang, -O0):
<Msp430AlarmC__1__Msp430Compare__fired>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <Msp430AlarmC__1__Msp430TimerControl__disableEvents@plt>
mov    $0x0,%al
call   1030 <Msp430AlarmC__1__Alarm__fired@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430AlarmC__1__Msp430Compare__fired>:
push   %rax
xor    %eax,%eax
call   1040 <Msp430AlarmC__1__Msp430TimerControl__disableEvents@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <Msp430AlarmC__1__Alarm__fired@plt>

LLVM IR (-O0):
define void @Msp430AlarmC__1__Msp430Compare__fired() {
%1 = call i32 (...) @Msp430AlarmC__1__Msp430TimerControl__disableEvents()
%2 = call i32 (...) @Msp430AlarmC__1__Alarm__fired()
ret void
}

LLVM IR (-O2):
define void @Msp430AlarmC__1__Msp430Compare__fired() {
%1 = tail call i32 (...) @Msp430AlarmC__1__Msp430TimerControl__disableEvents()
%2 = tail call i32 (...) @Msp430AlarmC__1__Alarm__fired()
ret void
}
/* Variables and functions */
int fd_sub(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x, y, z;
  x = 6;
  y = 1;
  z = fd_sub(x, y);
  printf("Z = %d\n", z);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <fd_sub@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
mov    $0x1,%esi
call   1040 <fd_sub@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"Z = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 6, i32* %2
store i32 1, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = call i32 @fd_sub(i32 %5, i32 %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"Z = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @fd_sub(i32 6, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
struct cli_def {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cli_print(struct cli_def *, char *, char const *);
int hook_logout(struct cli_def *cli, const char *command, char *argv[],
                int argc) {
  cli_print(cli, "Hook (logout): %s", command);
  return 0;
}


x86 assembly (clang, -O0):
<hook_logout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xeca(%rip),%rsi
call   1030 <cli_print@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hook_logout>:
push   %rax
mov    %rsi,%rdx
lea    0xee5(%rip),%rsi
call   1030 <cli_print@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.cli_def = type { i32 }
@.str = [18 x i8] c"Hook (logout): %s\00"
define i32 @hook_logout(%struct.cli_def* %0, i8* %1, i8** %2, i32 %3) {
%5 = alloca %struct.cli_def*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i32
store %struct.cli_def* %0, %struct.cli_def** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
store i32 %3, i32* %8
%9 = load %struct.cli_def*, %struct.cli_def** %5
%10 = load i8*, i8** %6
%11 = call i32 @cli_print(%struct.cli_def* %9, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %10)
ret i32 0
}

LLVM IR (-O2):
%struct.cli_def = type { i32 }
@.str = [18 x i8] c"Hook (logout): %s\00"
define i32 @hook_logout(%struct.cli_def* %0, i8* %1, i8** nocapture readnone %2, i32 %3) {
%5 = tail call i32 @cli_print(%struct.cli_def* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}