xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ log_f(char *);
unsigned inputb_none_get(void) {
  log_f("inputb:none: inputb_none_button_get()\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<inputb_none_get>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <log_f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"inputb:none: inputb_none_button_get()\0A\00"
define i32 @inputb_none_get() {
%1 = call i32 @log_f(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"inputb:none: inputb_none_button_get()\0A\00"
define i32 @inputb_none_get() {
%1 = tail call i32 @log_f(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void check_ji(int *i, int *j) {
  if (*j < *i) {
    *j += *i;
    *i = *j - *i;
    *j = *j - *i;
  }
}


x86 assembly (clang, -O0):
<check_ji>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    1150 <check_ji+0x50>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
sub    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
sub    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ji>:
mov    (%rsi),%ecx
mov    (%rdi),%eax
cmp    %eax,%ecx
jge    1112 <check_ji+0x12>
add    %ecx,%eax
mov    %eax,(%rsi)
sub    (%rdi),%eax
mov    %eax,(%rdi)
sub    %eax,(%rsi)
ret

LLVM IR (-O0):
define void @check_ji(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = icmp slt i32 %6, %8
br i1 %9, label %10, label %28
10: ; preds = %2
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add nsw i32 %14, %12
store i32 %15, i32* %13
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = load i32*, i32** %3
%19 = load i32, i32* %18
%20 = sub nsw i32 %17, %19
%21 = load i32*, i32** %3
store i32 %20, i32* %21
%22 = load i32*, i32** %4
%23 = load i32, i32* %22
%24 = load i32*, i32** %3
%25 = load i32, i32* %24
%26 = sub nsw i32 %23, %25
%27 = load i32*, i32** %4
store i32 %26, i32* %27
br label %28
28: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
define void @check_ji(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
%5 = icmp slt i32 %3, %4
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = add nsw i32 %4, %3
store i32 %7, i32* %1
%8 = load i32, i32* %0
%9 = sub nsw i32 %7, %8
store i32 %9, i32* %0
%10 = load i32, i32* %1
%11 = sub nsw i32 %10, %9
store i32 %11, i32* %1
br label %12
12: ; preds = %6, %2
ret void
}
void gdk_bitmap_create_from_data() {}


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

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

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

LLVM IR (-O2):
define void @gdk_bitmap_create_from_data() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int xfcntl(int, int /*<<< orphan*/, int);
void set_nonblock(int sd) {
  xfcntl(sd, F_SETFL, xfcntl(sd, F_GETFL, 0) | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<set_nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e99(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <xfcntl@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %eax,%edx
mov    0x2e99(%rip),%rax
or     (%rax),%edx
call   1030 <xfcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblock>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ebc(%rip),%rax
mov    (%rax),%ebp
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <xfcntl@plt>
mov    0x2eb3(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <xfcntl@plt>

LLVM IR (-O0):
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @set_nonblock(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* %2
%6 = load i32, i32* @F_GETFL
%7 = call i32 @xfcntl(i32 %5, i32 %6, i32 0)
%8 = load i32, i32* @O_NONBLOCK
%9 = or i32 %7, %8
%10 = call i32 @xfcntl(i32 %3, i32 %4, i32 %9)
ret void
}

LLVM IR (-O2):
@F_SETFL = global i32 0
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @set_nonblock(i32 %0) {
%2 = load i32, i32* @F_SETFL
%3 = load i32, i32* @F_GETFL
%4 = tail call i32 @xfcntl(i32 %0, i32 %3, i32 0)
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %4
%7 = tail call i32 @xfcntl(i32 %0, i32 %2, i32 %6)
ret void
}
void rev(char *b, char *e) {
  char tmp;
  while (b < e) {
    tmp = *b;
    *b++ = *e;
    *e-- = tmp;
  }
}


x86 assembly (clang, -O0):
<rev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1153 <rev+0x53>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    110c <rev+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev>:
cmp    %rsi,%rdi
jae    112c <rev+0x2c>
add    $0xffffffffffffffff,%rsi
nopl   0x0(%rax)
movzbl (%rdi),%eax
movzbl 0x1(%rsi),%ecx
mov    %cl,(%rdi)
add    $0x1,%rdi
mov    %al,0x1(%rsi)
lea    -0x1(%rsi),%rax
cmp    %rsi,%rdi
mov    %rax,%rsi
jb     1110 <rev+0x10>
ret

LLVM IR (-O0):
define void @rev(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
br label %6
6: ; preds = %10, %2
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = icmp ult i8* %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
store i8 %12, i8* %5
%13 = load i8*, i8** %4
%14 = load i8, i8* %13
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %3
store i8 %14, i8* %15
%17 = load i8, i8* %5
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i32 -1
store i8* %19, i8** %4
store i8 %17, i8* %18
br label %6
20: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @rev(i8* %0, i8* %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %12
4: ; preds = %2, %4
%5 = phi i8* [ %9, %4 ], [ %0, %2 ]
%6 = phi i8* [ %10, %4 ], [ %1, %2 ]
%7 = load i8, i8* %5
%8 = load i8, i8* %6
%9 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %8, i8* %5
%10 = getelementptr inbounds i8, i8* %6, i64 -1
store i8 %7, i8* %6
%11 = icmp ult i8* %9, %10
br i1 %11, label %4, label %12
12: ; preds = %4, %2
ret void
}
int spl_debug_get_mb(void) { return (0); }


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

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

LLVM IR (-O0):
define i32 @spl_debug_get_mb() {
ret i32 0
}

LLVM IR (-O2):
define i32 @spl_debug_get_mb() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_log(FILE *chifp, FILE *xcfp, char *logstring) {
  if (chifp)
    fprintf(chifp, logstring);
  if (xcfp)
    fprintf(xcfp, logstring);
}


x86 assembly (clang, -O0):
<print_log>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <print_log+0x2c>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <fprintf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1154 <print_log+0x44>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_log>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
test   %rdi,%rdi
je     1127 <print_log+0x17>
mov    %r14,%rsi
call   1030 <fprintf@plt>
test   %rbx,%rbx
je     113e <print_log+0x2e>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <fprintf@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @print_log(i32* %0, i32* %1, i8* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i8*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i8* %2, i8** %6
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32*, i32** %4
%11 = load i8*, i8** %6
%12 = call i32 @fprintf(i32* %10, i8* %11)
br label %13
13: ; preds = %9, %3
%14 = load i32*, i32** %5
%15 = icmp ne i32* %14, null
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32*, i32** %5
%18 = load i8*, i8** %6
%19 = call i32 @fprintf(i32* %17, i8* %18)
br label %20
20: ; preds = %16, %13
ret void
}

LLVM IR (-O2):
define void @print_log(i32* %0, i32* %1, i8* nocapture %2) {
%4 = icmp eq i32* %0, null
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @fprintf(i32* %0, i8* %2)
br label %7
7: ; preds = %5, %3
%8 = icmp eq i32* %1, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @fprintf(i32* %1, i8* %2)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ commSendResponseMsg(void *, char *);
void ftpNOOP(void *ep_server, void *comm_obj, char *args) {
  commSendResponseMsg(comm_obj, "200 OK.");
}


x86 assembly (clang, -O0):
<ftpNOOP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <commSendResponseMsg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ftpNOOP>:
mov    %rsi,%rdi
lea    0xee6(%rip),%rsi
jmp    1030 <commSendResponseMsg@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"200 OK.\00"
define void @ftpNOOP(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = call i32 @commSendResponseMsg(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"200 OK.\00"
define void @ftpNOOP(i8* nocapture readnone %0, i8* %1, i8* nocapture readnone %2) {
%4 = tail call i32 @commSendResponseMsg(i8* %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cthread_init();
void PyThread__init_thread(void) { cthread_init(); }


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

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

LLVM IR (-O0):
define void @PyThread__init_thread() {
%1 = call i32 (...) @cthread_init()
ret void
}

LLVM IR (-O2):
define void @PyThread__init_thread() {
%1 = tail call i32 (...) @cthread_init()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void ClearCurTab() { WRITETEST("\033[g"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[g\00"
define void @ClearCurTab() {
%1 = call i32 @WRITETEST(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[g\00"
define void @ClearCurTab() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sync();
void test(void) { sync(); }


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

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

LLVM IR (-O0):
define void @test() {
%1 = call i32 (...) @sync()
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 (...) @sync()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, long long);
void f2(int x, int y, long long z) { printf("f2: %d %d %lld\n", x, y, z); }


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"f2: %d %d %lld\0A\00"
define void @f2(i32 %0, i32 %1, i64 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int f_proj4_ij2ll(int mode, unsigned char **sec, float *data,
                  unsigned int ndata, char *inv_out, void **local,
                  const char *arg1, const char *arg2) {
  if (mode == -1) {
    fprintf(stderr, "Proj4 package not installed\n");
    return 1;
  }
  return 1;
}


x86 assembly (clang, -O0):
<f_proj4_ij2ll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1161 <f_proj4_ij2ll+0x51>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1168 <f_proj4_ij2ll+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_proj4_ij2ll>:
cmp    $0xffffffff,%edi
je     111b <f_proj4_ij2ll+0xb>
mov    $0x1,%eax
ret
push   %rax
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x8,%rsp
mov    $0x1,%eax
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"Proj4 package not installed\0A\00"
define i32 @f_proj4_ij2ll(i32 %0, i8** %1, float* %2, i32 %3, i8* %4, i8** %5, i8* %6, i8* %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8**
%12 = alloca float*
%13 = alloca i32
%14 = alloca i8*
%15 = alloca i8**
%16 = alloca i8*
%17 = alloca i8*
store i32 %0, i32* %10
store i8** %1, i8*** %11
store float* %2, float** %12
store i32 %3, i32* %13
store i8* %4, i8** %14
store i8** %5, i8*** %15
store i8* %6, i8** %16
store i8* %7, i8** %17
%18 = load i32, i32* %10
%19 = icmp eq i32 %18, -1
br i1 %19, label %20, label %23
20: ; preds = %8
%21 = load i32, i32* @stderr
%22 = call i32 @fprintf(i32 %21, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %9
br label %24
23: ; preds = %8
store i32 1, i32* %9
br label %24
24: ; preds = %23, %20
%25 = load i32, i32* %9
ret i32 %25
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"Proj4 package not installed\0A\00"
define i32 @f_proj4_ij2ll(i32 %0, i8** nocapture readnone %1, float* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i8** nocapture readnone %5, i8* nocapture readnone %6, i8* nocapture readnone %7) {
%9 = icmp eq i32 %0, -1
br i1 %9, label %10, label %13
10: ; preds = %8
%11 = load i32, i32* @stderr
%12 = tail call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %8, %10
ret i32 1
}
int parport_pc_find_nonpci_ports(int autoirq, int autodma) { return 0; }


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

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

LLVM IR (-O0):
define i32 @parport_pc_find_nonpci_ports(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @parport_pc_find_nonpci_ports(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int backtrack();
int solve();
int number_solutions(void) {
  int count = 0;
  if (-1 != solve()) {
    do
      ++count;
    while (-1 != backtrack() && -1 != solve());
  }
  return count;
}


x86 assembly (clang, -O0):
<number_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <solve@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
je     1194 <number_solutions+0x74>
jmp    114a <number_solutions+0x2a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <backtrack@plt>
mov    %eax,%edx
xor    %eax,%eax
mov    $0xffffffff,%ecx
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
je     1184 <number_solutions+0x64>
mov    $0x0,%al
call   1030 <solve@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    %ecx,%eax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
test   $0x1,%al
jne    114a <number_solutions+0x2a>
jmp    1194 <number_solutions+0x74>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_solutions>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <solve@plt>
cmp    $0xffffffff,%eax
je     115d <number_solutions+0x3d>
mov    $0x1,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %ecx,%ebx
xor    %eax,%eax
call   1040 <backtrack@plt>
cmp    $0xffffffff,%eax
je     115d <number_solutions+0x3d>
xor    %eax,%eax
call   1030 <solve@plt>
lea    0x1(%rbx),%ecx
cmp    $0xffffffff,%eax
jne    1140 <number_solutions+0x20>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @number_solutions() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @solve()
%3 = icmp ne i32 -1, %2
br i1 %3, label %4, label %17
4: ; preds = %0
br label %5
5: ; preds = %14, %4
%6 = load i32, i32* %1
%7 = add nsw i32 %6, 1
store i32 %7, i32* %1
br label %8
8: ; preds = %5
%9 = call i32 (...) @backtrack()
%10 = icmp ne i32 -1, %9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = call i32 (...) @solve()
%13 = icmp ne i32 -1, %12
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
br i1 %15, label %5, label %16
16: ; preds = %14
br label %17
17: ; preds = %16, %0
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @number_solutions() {
%1 = tail call i32 (...) @solve()
%2 = icmp eq i32 %1, -1
br i1 %2, label %11, label %3
3: ; preds = %0, %8
%4 = phi i32 [ %5, %8 ], [ 0, %0 ]
%5 = add nuw nsw i32 %4, 1
%6 = tail call i32 (...) @backtrack()
%7 = icmp eq i32 %6, -1
br i1 %7, label %11, label %8
8: ; preds = %3
%9 = tail call i32 (...) @solve()
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %3
11: ; preds = %3, %8, %0
%12 = phi i32 [ 0, %0 ], [ %5, %8 ], [ %5, %3 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_BLOCK;
int sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int sigblock(int mask) {
  int omask, n;
  n = sigprocmask(SIG_BLOCK, (sigset_t *)&mask, (sigset_t *)&omask);
  if (n)
    return (n);
  return (omask);
}


x86 assembly (clang, -O0):
<sigblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <sigprocmask@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1149 <sigblock+0x39>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114f <sigblock+0x3f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigblock>:
push   %rax
mov    %edi,0x4(%rsp)
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <sigprocmask@plt>
test   %eax,%eax
jne    1132 <sigblock+0x22>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIG_BLOCK = global i32 0
define i32 @sigblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* @SIG_BLOCK
%7 = call i32 @sigprocmask(i32 %6, i32* %3, i32* %4)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load i32, i32* %5
store i32 %11, i32* %2
br label %14
12: ; preds = %1
%13 = load i32, i32* %4
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@SIG_BLOCK = global i32 0
define i32 @sigblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @SIG_BLOCK
%6 = call i32 @sigprocmask(i32 %5, i32* %2, i32* %3)
%7 = icmp eq i32 %6, 0
%8 = load i32, i32* %3
%9 = select i1 %7, i32 %8, i32 %6
ret i32 %9
}
/* Variables and functions */
void __builtin_wasm_rethrow();
void rethrow(void) { return __builtin_wasm_rethrow(); }


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

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

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

LLVM IR (-O2):
define void @rethrow() {
tail call void (...) @__builtin_wasm_rethrow()
ret void
}
void Int24_To_Int16_Dither(
    void *destinationBuffer, signed int destinationStride, void *sourceBuffer,
    signed int sourceStride, unsigned int count,
    struct PaUtilTriangularDitherGenerator *ditherGenerator) {
  (void)destinationBuffer;
  (void)destinationStride;
  (void)sourceBuffer;
  (void)sourceStride;
  (void)count;
  (void)ditherGenerator;
}


x86 assembly (clang, -O0):
<Int24_To_Int16_Dither>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.PaUtilTriangularDitherGenerator = type opaque
define void @Int24_To_Int16_Dither(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, %struct.PaUtilTriangularDitherGenerator* %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca %struct.PaUtilTriangularDitherGenerator*
store i8* %0, i8** %7
store i32 %1, i32* %8
store i8* %2, i8** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store %struct.PaUtilTriangularDitherGenerator* %5, %struct.PaUtilTriangularDitherGenerator** %12
%13 = load i8*, i8** %7
%14 = load i32, i32* %8
%15 = load i8*, i8** %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = load %struct.PaUtilTriangularDitherGenerator*, %struct.PaUtilTriangularDitherGenerator** %12
ret void
}

LLVM IR (-O2):
%struct.PaUtilTriangularDitherGenerator = type opaque
define void @Int24_To_Int16_Dither(i8* nocapture %0, i32 %1, i8* nocapture %2, i32 %3, i32 %4, %struct.PaUtilTriangularDitherGenerator* nocapture %5) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x92() {
  Assert_real((isalnum(146) == 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_isalnum.c",
              735, ("isalnum should be 0 for 0x92"));
}


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

x86 assembly (clang, -O2):
<t_isalnum_0x92>:
push   %rax
mov    $0x92,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2df,%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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x92\00"
define void @t_isalnum_0x92() {
%1 = call i64 @isalnum(i32 146)
%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 735, 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_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x92\00"
define void @t_isalnum_0x92() {
%1 = tail call i64 @isalnum(i32 146)
%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 735, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int fc8300_i2c_deinit(void *handle) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fc8300_i2c_deinit(i8* nocapture readnone %0) {
ret i32 0
}
int foo(void *p) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @foo(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgexit(void) {
  gen("pop\tbp");
  gen("ret");
}


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

x86 assembly (clang, -O2):
<cgexit>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <gen@plt>
lea    0xee3(%rip),%rdi
pop    %rax
jmp    1030 <gen@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"pop\09bp\00"
@.str.1 = [4 x i8] c"ret\00"
define void @cgexit() {
%1 = call i32 @gen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @gen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"pop\09bp\00"
@.str.1 = [4 x i8] c"ret\00"
define void @cgexit() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @gen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void xmlSecError(const char *file, int line, const char *func,
                 const char *errorObject, const char *errorSubject, int reason,
                 const char *msg, ...) {}


x86 assembly (clang, -O0):
<xmlSecError>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @xmlSecError(i8* %0, i32 %1, i8* %2, i8* %3, i8* %4, i32 %5, i8* %6, ...) {
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i8*
store i8* %0, i8** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i8* %4, i8** %12
store i32 %5, i32* %13
store i8* %6, i8** %14
ret void
}

LLVM IR (-O2):
define void @xmlSecError(i8* nocapture %0, i32 %1, i8* nocapture %2, i8* nocapture %3, i8* nocapture %4, i32 %5, i8* nocapture %6, ...) {
ret void
}
int divup(int a, int m) { return a / m + a % m; }


x86 assembly (clang, -O0):
<divup>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0xc(%rbp),%eax
add    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divup>:
mov    %edi,%eax
cltd
idiv   %esi
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @divup(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 = sdiv i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = srem i32 %8, %9
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @divup(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = srem i32 %0, %1
%5 = add nsw i32 %4, %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test_compares();
int main() {
  test_compares();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_compares@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_compares@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_compares()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_compares()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
bool file_exists(const char *filename) {
  FILE *file = fopen(filename, "r");
  if (file) {
    fclose(file);
    return true;
  }
  return false;
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <file_exists+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1167 <file_exists+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <file_exists+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @fclose(i32* %10)
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @file_exists(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ test_read_target_from_file1();
int /*<<< orphan*/ test_read_target_from_file2();
int /*<<< orphan*/ test_read_target_from_file3();
int /*<<< orphan*/ test_read_target_from_file4();
void test_read_target_from_file(void) {
  test_read_target_from_file1();
  test_read_target_from_file2();
  test_read_target_from_file3();
  test_read_target_from_file4();
}


x86 assembly (clang, -O0):
<test_read_target_from_file>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <test_read_target_from_file1@plt>
mov    $0x0,%al
call   1040 <test_read_target_from_file2@plt>
mov    $0x0,%al
call   1050 <test_read_target_from_file3@plt>
mov    $0x0,%al
call   1030 <test_read_target_from_file4@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_read_target_from_file>:
push   %rax
xor    %eax,%eax
call   1060 <test_read_target_from_file1@plt>
xor    %eax,%eax
call   1040 <test_read_target_from_file2@plt>
xor    %eax,%eax
call   1050 <test_read_target_from_file3@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <test_read_target_from_file4@plt>

LLVM IR (-O0):
define void @test_read_target_from_file() {
%1 = call i32 (...) @test_read_target_from_file1()
%2 = call i32 (...) @test_read_target_from_file2()
%3 = call i32 (...) @test_read_target_from_file3()
%4 = call i32 (...) @test_read_target_from_file4()
ret void
}

LLVM IR (-O2):
define void @test_read_target_from_file() {
%1 = tail call i32 (...) @test_read_target_from_file1()
%2 = tail call i32 (...) @test_read_target_from_file2()
%3 = tail call i32 (...) @test_read_target_from_file3()
%4 = tail call i32 (...) @test_read_target_from_file4()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_octave_comment_entities();
int /*<<< orphan*/ test_octave_false_line_comment();
int /*<<< orphan*/ test_octave_line_comment_1();
int /*<<< orphan*/ test_octave_syntax_comment();
void all_octave_tests() {
  test_octave_line_comment_1();
  test_octave_syntax_comment();
  test_octave_false_line_comment();
  test_octave_comment_entities();
}


x86 assembly (clang, -O0):
<all_octave_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <test_octave_line_comment_1@plt>
mov    $0x0,%al
call   1040 <test_octave_syntax_comment@plt>
mov    $0x0,%al
call   1030 <test_octave_false_line_comment@plt>
mov    $0x0,%al
call   1060 <test_octave_comment_entities@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<all_octave_tests>:
push   %rax
xor    %eax,%eax
call   1050 <test_octave_line_comment_1@plt>
xor    %eax,%eax
call   1040 <test_octave_syntax_comment@plt>
xor    %eax,%eax
call   1030 <test_octave_false_line_comment@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <test_octave_comment_entities@plt>

LLVM IR (-O0):
define void @all_octave_tests() {
%1 = call i32 (...) @test_octave_line_comment_1()
%2 = call i32 (...) @test_octave_syntax_comment()
%3 = call i32 (...) @test_octave_false_line_comment()
%4 = call i32 (...) @test_octave_comment_entities()
ret void
}

LLVM IR (-O2):
define void @all_octave_tests() {
%1 = tail call i32 (...) @test_octave_line_comment_1()
%2 = tail call i32 (...) @test_octave_syntax_comment()
%3 = tail call i32 (...) @test_octave_false_line_comment()
%4 = tail call i32 (...) @test_octave_comment_entities()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yyunput(int /*<<< orphan*/, char *);
int gdbmi_wrap(void) {
  if (0)
    yyunput(0, "");
  return 1;
}


x86 assembly (clang, -O0):
<gdbmi_wrap>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdbmi_wrap>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @gdbmi_wrap() {
ret i32 1
}

LLVM IR (-O2):
define i32 @gdbmi_wrap() {
ret i32 1
}
int sl_isupper(int c) { return (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<sl_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <sl_isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sl_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @sl_isupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 65
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 90
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @sl_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
void glClearColor(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glClearColor() {
ret void
}
void check() {}


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

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

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

LLVM IR (-O2):
define void @check() {
ret void
}
void gtk_entry_completion_insert_prefix() {}


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

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

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

LLVM IR (-O2):
define void @gtk_entry_completion_insert_prefix() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void print_usage(const char *prog) {
  printf("Usage: %s [-DsbdlHOLC3]\n", prog);
  puts("  -D --device   device to use (default /dev/spidev0.0)\n"
       "  -s --speed    max speed (Hz)\n"
       "  -d --delay    delay (usec)\n"
       "  -b --bpw      bits per word \n"
       "  -l --loop     loopback\n"
       "  -H --cpha     clock phase\n"
       "  -O --cpol     clock polarity\n"
       "  -L --lsb      least significant bit first\n"
       "  -C --cs-high  chip select active high\n"
       "  -3 --3wire    SI/SO signals shared\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Usage: %s [-DsbdlHOLC3]\0A\00"
@.str.1 = [352 x i8] c" -D --device device to use (default /dev/spidev0.0)\0A -s --speed max speed (Hz)\0A -d --delay delay (usec)\0A -b --bpw bits per word \0A -l --loop loopback\0A -H --cpha clock phase\0A -O --cpol clock polarity\0A -L --lsb least significant bit first\0A -C --cs-high chip select active high\0A -3 --3wire SI/SO signals shared\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([352 x i8], [352 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [25 x i8] c"Usage: %s [-DsbdlHOLC3]\0A\00"
@.str.1 = [352 x i8] c" -D --device device to use (default /dev/spidev0.0)\0A -s --speed max speed (Hz)\0A -d --delay delay (usec)\0A -b --bpw bits per word \0A -l --loop loopback\0A -H --cpha clock phase\0A -O --cpol clock polarity\0A -L --lsb least significant bit first\0A -C --cs-high chip select active high\0A -3 --3wire SI/SO signals shared\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([352 x i8], [352 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(char *, size_t, size_t, int /*<<< orphan*/ *);
void Sys_read(char *s, size_t size, size_t count, FILE *fp) {
  fread(s, size, count, fp);
}


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

x86 assembly (clang, -O2):
<Sys_read>:
jmp    1030 <fread@plt>

LLVM IR (-O0):
define void @Sys_read(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i32*, i32** %8
%13 = call i32 @fread(i8* %9, i64 %10, i64 %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @Sys_read(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i32 @fread(i8* %0, i64 %1, i64 %2, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OS_TaskRegister();
void task_6(void) {
  OS_TaskRegister();
  while (1)
    ;
  return;
}


x86 assembly (clang, -O0):
<task_6>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <OS_TaskRegister@plt>
jmp    111b <task_6+0xb>

x86 assembly (clang, -O2):
<task_6>:
push   %rax
xor    %eax,%eax
call   1030 <OS_TaskRegister@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <task_6+0x10>

LLVM IR (-O0):
define void @task_6() {
%1 = call i32 (...) @OS_TaskRegister()
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @task_6() {
%1 = tail call i32 (...) @OS_TaskRegister()
br label %2
2: ; preds = %0, %2
br label %2
}
void asmdebug_init(void) {}


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

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

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

LLVM IR (-O2):
define void @asmdebug_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fn0000000000401540();
void fn0000000000402DC0() {
  fn0000000000401540();
  return;
}


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

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

LLVM IR (-O0):
define void @fn0000000000402DC0() {
%1 = call i32 (...) @fn0000000000401540()
ret void
}

LLVM IR (-O2):
define void @fn0000000000402DC0() {
%1 = tail call i32 (...) @fn0000000000401540()
ret void
}
/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ sin_port;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ local_address;

/* Variables and functions */
scalar_t__ getpeername(int, struct sockaddr *, unsigned int *);
scalar_t__ ntohs(int /*<<< orphan*/);
int getPortBySock(int sock) {
  struct sockaddr_in local_address;
  int addr_size = sizeof(local_address);
  if (getpeername(sock, (struct sockaddr *)&local_address,
                  (unsigned int *)&addr_size) < 0) {
    return (int)-1;
  } else {
    return ((int)ntohs(local_address.sin_port));
  }
}


x86 assembly (clang, -O0):
<getPortBySock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <getpeername@plt>
cmp    $0x0,%rax
jge    1158 <getPortBySock+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <getPortBySock+0x43>
mov    -0x10(%rbp),%edi
call   1040 <ntohs@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPortBySock>:
push   %rax
movl   $0x4,0x4(%rsp)
mov    %rsp,%rsi
lea    0x4(%rsp),%rdx
call   1030 <getpeername@plt>
test   %rax,%rax
js     1145 <getPortBySock+0x25>
mov    (%rsp),%edi
call   1040 <ntohs@plt>
pop    %rcx
ret
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @getPortBySock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
store i32 %0, i32* %3
store i32 4, i32* %5
%6 = load i32, i32* %3
%7 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%8 = call i64 @getpeername(i32 %6, %struct.sockaddr* %7, i32* %5)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %16
11: ; preds = %1
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %4, i32 0, i32 0
%13 = load i32, i32* %12
%14 = call i64 @ntohs(i32 %13)
%15 = trunc i64 %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @getPortBySock(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = call i64 @getpeername(i32 %0, %struct.sockaddr* %6, i32* %3)
%8 = icmp slt i64 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %1
%10 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %2, i64 0, i32 0
%11 = load i32, i32* %10
%12 = call i64 @ntohs(i32 %11)
%13 = trunc i64 %12 to i32
br label %14
14: ; preds = %1, %9
%15 = phi i32 [ %13, %9 ], [ -1, %1 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ f();
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  f();
  printf("hello world\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"hello world\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @f()
%7 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @f()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}