xunge/DecIR huggingface dataset:
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn17() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn17");
  return result;
}


x86 assembly (clang, -O0):
<fn17>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn17>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn17\00"
define i8* @fn17() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn17\00"
define i8* @fn17() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
int do_159() { return 159; }


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

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

LLVM IR (-O0):
define i32 @do_159() {
ret i32 159
}

LLVM IR (-O2):
define i32 @do_159() {
ret i32 159
}
/* Variables and functions */
char *lua_check_string(int, char *);
int /*<<< orphan*/ pushresult(int);
scalar_t__ rename(char *, char *);
void io_rename(void) {
  char *f1 = lua_check_string(1, "rename");
  char *f2 = lua_check_string(2, "rename");
  pushresult(rename(f1, f2) == 0);
}


x86 assembly (clang, -O0):
<io_rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
call   1030 <lua_check_string@plt>
mov    %rax,-0x8(%rbp)
mov    $0x2,%edi
lea    0xea7(%rip),%rsi
call   1030 <lua_check_string@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <rename@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <pushresult@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_rename>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
mov    $0x1,%edi
mov    %r14,%rsi
call   1030 <lua_check_string@plt>
mov    %rax,%rbx
mov    $0x2,%edi
mov    %r14,%rsi
call   1030 <lua_check_string@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
call   1050 <rename@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <pushresult@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"rename\00"
define void @io_rename() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @lua_check_string(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %1
%4 = call i8* @lua_check_string(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %2
%5 = load i8*, i8** %1
%6 = load i8*, i8** %2
%7 = call i64 @rename(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @pushresult(i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"rename\00"
define void @io_rename() {
%1 = tail call i8* @lua_check_string(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @lua_check_string(i32 2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @rename(i8* %1, i8* %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @pushresult(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ permute(double **, double **, int const *, int, int const);
void permute_double_3(double (*data_out)[3], double (*data_in)[3],
                      const int *perm, const int n) {
  permute(data_out, data_in, perm, sizeof(double[3]), n);
}


x86 assembly (clang, -O0):
<permute_double_3>:
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),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%r8d
mov    $0x18,%ecx
call   1030 <permute@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<permute_double_3>:
mov    %ecx,%r8d
mov    $0x18,%ecx
jmp    1030 <permute@plt>

LLVM IR (-O0):
define void @permute_double_3([3 x double]* %0, [3 x double]* %1, i32* %2, i32 %3) {
%5 = alloca [3 x double]*
%6 = alloca [3 x double]*
%7 = alloca i32*
%8 = alloca i32
store [3 x double]* %0, [3 x double]** %5
store [3 x double]* %1, [3 x double]** %6
store i32* %2, i32** %7
store i32 %3, i32* %8
%9 = load [3 x double]*, [3 x double]** %5
%10 = bitcast [3 x double]* %9 to double**
%11 = load [3 x double]*, [3 x double]** %6
%12 = bitcast [3 x double]* %11 to double**
%13 = load i32*, i32** %7
%14 = load i32, i32* %8
%15 = call i32 @permute(double** %10, double** %12, i32* %13, i32 24, i32 %14)
ret void
}

LLVM IR (-O2):
define void @permute_double_3([3 x double]* %0, [3 x double]* %1, i32* %2, i32 %3) {
%5 = bitcast [3 x double]* %0 to double**
%6 = bitcast [3 x double]* %1 to double**
%7 = tail call i32 @permute(double** %5, double** %6, i32* %2, i32 24, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x74() {
  Assert_real((islower(116)),
              "/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",
              585, ("islower should be 1 for t"));
}


x86 assembly (clang, -O0):
<t_islower_0x74>:
push   %rbp
mov    %rsp,%rbp
mov    $0x74,%edi
call   1030 <islower@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x249,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_islower_0x74>:
push   %rax
mov    $0x74,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x249,%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 = [26 x i8] c"islower should be 1 for t\00"
define void @t_islower_0x74() {
%1 = call i32 @islower(i32 116)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 585, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"islower should be 1 for t\00"
define void @t_islower_0x74() {
%1 = tail call i32 @islower(i32 116)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 585, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t max32u(uint32_t a, uint32_t b) { return a > b ? a : b; }


x86 assembly (clang, -O0):
<max32u>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <max32u+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max32u+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max32u>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max32u(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max32u(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
int test_imm_05uint8_mem(unsigned char *val) {
  return ((*val) & (-0x05 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_05uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xfffffffb,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_05uint8_mem>:
testb  $0xfb,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_05uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -5
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
scalar_t__ get_bit();
unsigned get_bit_string(int n) {
  unsigned x = 0;
  while (n) {
    x <<= 1;
    x += get_bit();
    n--;
  }
  return x;
}


x86 assembly (clang, -O0):
<get_bit_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1156 <get_bit_string+0x46>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <get_bit@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%eax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1122 <get_bit_string+0x12>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_bit_string>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
je     1131 <get_bit_string+0x21>
mov    %edi,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <get_bit@plt>
lea    (%rax,%rbx,2),%ebx
add    $0xffffffff,%ebp
jne    1120 <get_bit_string+0x10>
jmp    1133 <get_bit_string+0x23>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @get_bit_string(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32, i32* %3
%9 = shl i32 %8, 1
store i32 %9, i32* %3
%10 = call i64 (...) @get_bit()
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = add nsw i64 %12, %10
%14 = trunc i64 %13 to i32
store i32 %14, i32* %3
%15 = load i32, i32* %2
%16 = add nsw i32 %15, -1
store i32 %16, i32* %2
br label %4
17: ; preds = %4
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
define i32 @get_bit_string(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi i32 [ %10, %3 ], [ %0, %1 ]
%6 = shl i32 %4, 1
%7 = tail call i64 (...) @get_bit()
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = add nsw i32 %5, -1
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %13
}
/* Variables and functions */
long double M_LN10;
long double logl(long double);
long double log10l(long double x) { return (logl(x) / M_LN10); }


x86 assembly (clang, -O0):
<log10l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <logl@plt>
mov    0x2eae(%rip),%rax
fldt   (%rax)
fdivrp %st,%st(1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10l>:
sub    $0x18,%rsp
fldt   0x20(%rsp)
fstpt  (%rsp)
call   1030 <logl@plt>
mov    0x2eb9(%rip),%rax
fldt   (%rax)
fdivrp %st,%st(1)
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_LN10 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @log10l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call x86_fp80 @logl(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* @M_LN10
%6 = fdiv x86_fp80 %4, %5
ret x86_fp80 %6
}

LLVM IR (-O2):
@M_LN10 = global x86_fp80 0xK00000000000000000000
define x86_fp80 @log10l(x86_fp80 %0) {
%2 = tail call x86_fp80 @logl(x86_fp80 %0)
%3 = load x86_fp80, x86_fp80* @M_LN10
%4 = fdiv x86_fp80 %2, %3
ret x86_fp80 %4
}
void dbSyncDelete(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               60, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<dbSyncDelete>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x3c,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbSyncDelete>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x3c,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.dbSyncDelete = [13 x i8] c"dbSyncDelete\00"
define void @dbSyncDelete() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.dbSyncDelete, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.dbSyncDelete = [13 x i8] c"dbSyncDelete\00"
define void @dbSyncDelete() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 60, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @__func__.dbSyncDelete, i64 0, i64 0))
ret void
}
int main() { return 3 <= 3; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
scalar_t__ islower(int);
extern __attribute__((gnu_)) int toupper(int __c) {
  return islower(__c) ? (__c & ~32) : __c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     113b <toupper+0x2b>
mov    -0x4(%rbp),%eax
and    $0xffffffdf,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <toupper+0x31>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
mov    %ebx,%ecx
and    $0xffffffdf,%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @islower(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = and i32 %7, -33
br label %11
9: ; preds = %1
%10 = load i32, i32* %2
br label %11
11: ; preds = %9, %6
%12 = phi i32 [ %8, %6 ], [ %10, %9 ]
ret i32 %12
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = tail call i64 @islower(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = and i32 %0, -33
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int /*<<< orphan*/ test4();
int main(int argc, char **argv) {
  test1();
  test2();
  test3();
  test4();
  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   1040 <test1@plt>
mov    $0x0,%al
call   1060 <test2@plt>
mov    $0x0,%al
call   1030 <test3@plt>
mov    $0x0,%al
call   1050 <test4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test1@plt>
xor    %eax,%eax
call   1060 <test2@plt>
xor    %eax,%eax
call   1030 <test3@plt>
xor    %eax,%eax
call   1050 <test4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 (...) @test1()
%7 = call i32 (...) @test2()
%8 = call i32 (...) @test3()
%9 = call i32 (...) @test4()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test1()
%4 = tail call i32 (...) @test2()
%5 = tail call i32 (...) @test3()
%6 = tail call i32 (...) @test4()
ret i32 0
}
int bymark_postconf(void *arg) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @bymark_postconf(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
unsigned char *iec16022ecc200f(int *, int *, char **, int,
                               unsigned char const *, int *, int *, int *,
                               int /*<<< orphan*/);
unsigned char *iec16022ecc200(int *Wptr, int *Hptr, char **encodingptr,
                              int barcodelen, const unsigned char *barcode,
                              int *lenp, int *maxp, int *eccp) {
  return iec16022ecc200f(Wptr, Hptr, encodingptr, barcodelen, barcode, lenp,
                         maxp, eccp, 0);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r10
mov    0x18(%rbp),%rax
xor    %r11d,%r11d
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <iec16022ecc200f@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
sub    $0x18,%rsp
movaps 0x20(%rsp),%xmm0
movups %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
call   1030 <iec16022ecc200f@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i8* @iec16022ecc200(i32* %0, i32* %1, i8** %2, i32 %3, i8* %4, i32* %5, i32* %6, i32* %7) {
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i8**
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i32*
%15 = alloca i32*
%16 = alloca i32*
store i32* %0, i32** %9
store i32* %1, i32** %10
store i8** %2, i8*** %11
store i32 %3, i32* %12
store i8* %4, i8** %13
store i32* %5, i32** %14
store i32* %6, i32** %15
store i32* %7, i32** %16
%17 = load i32*, i32** %9
%18 = load i32*, i32** %10
%19 = load i8**, i8*** %11
%20 = load i32, i32* %12
%21 = load i8*, i8** %13
%22 = load i32*, i32** %14
%23 = load i32*, i32** %15
%24 = load i32*, i32** %16
%25 = call i8* @iec16022ecc200f(i32* %17, i32* %18, i8** %19, i32 %20, i8* %21, i32* %22, i32* %23, i32* %24, i32 0)
ret i8* %25
}

LLVM IR (-O2):
define i8* @iec16022ecc200(i32* %0, i32* %1, i8** %2, i32 %3, i8* %4, i32* %5, i32* %6, i32* %7) {
%9 = tail call i8* @iec16022ecc200f(i32* %0, i32* %1, i8** %2, i32 %3, i8* %4, i32* %5, i32* %6, i32* %7, i32 0)
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ errno;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ perror(char const *);
int /*<<< orphan*/ stderr;
void error(const char *msg) {
  if (errno)
    perror(msg);
  else
    fprintf(stderr, "%s\n", msg);
  abort();
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
cmpq   $0x0,(%rax)
je     115b <error+0x2b>
mov    -0x8(%rbp),%rdi
call   1050 <perror@plt>
jmp    1174 <error+0x44>
mov    0x2e7e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<error>:
push   %rax
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rax
cmpq   $0x0,(%rax)
je     1150 <error+0x20>
mov    %rdx,%rdi
call   1050 <perror@plt>
xor    %eax,%eax
call   1030 <abort@plt>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@errno = global i64 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i64, i64* @errno
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
br label %12
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %2
%11 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %8, %5
%13 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@errno = global i64 0
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @error(i8* %0) {
%2 = load i64, i64* @errno
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
br label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %9
9: ; preds = %6, %4
%10 = tail call i32 (...) @abort()
unreachable
}
int f(char *x) { return __builtin_strlen(x); }


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

x86 assembly (clang, -O2):
<f>:
jmp    1030 <strlen@plt>

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

LLVM IR (-O2):
define i32 @f(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
size_t strxfrm(char *dst, const char *src, size_t num) {
  (void)dst;
  (void)src;
  (void)num;
  return 0;
}


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

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

LLVM IR (-O0):
define i64 @strxfrm(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
ret i64 0
}

LLVM IR (-O2):
define i64 @strxfrm(i8* nocapture readnone %0, i8* nocapture readnone %1, i64 %2) {
ret i64 0
}
/* Type definitions */
struct atom {
  int dummy;
};

/* Variables and functions */
scalar_t__ generic_ptr(int, int);
struct atom *atom_ptr(int number) {
  return ((struct atom *)generic_ptr(6, number));
}


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

x86 assembly (clang, -O2):
<atom_ptr>:
mov    %edi,%esi
mov    $0x6,%edi
jmp    1030 <generic_ptr@plt>

LLVM IR (-O0):
%struct.atom = type { i32 }
define %struct.atom* @atom_ptr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @generic_ptr(i32 6, i32 %3)
%5 = inttoptr i64 %4 to %struct.atom*
ret %struct.atom* %5
}

LLVM IR (-O2):
%struct.atom = type { i32 }
define %struct.atom* @atom_ptr(i32 %0) {
%2 = tail call i64 @generic_ptr(i32 6, i32 %0)
%3 = inttoptr i64 %2 to %struct.atom*
ret %struct.atom* %3
}
int test_imm_08int8_mem(signed char *val) {
  return ((*val) & (0x08 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_08int8_mem>:
testb  $0x8,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_08int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 8
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gtk_menu_tool_button_new_from_stock() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_tool_button_new_from_stock() {
ret void
}
/* Variables and functions */
double log(double);
double Dlog(double x) { return log(x); }


x86 assembly (clang, -O0):
<Dlog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dlog>:
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @Dlog(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log(double %3)
ret double %4
}

LLVM IR (-O2):
define double @Dlog(double %0) {
%2 = tail call double @log(double %0)
ret double %2
}
/* Variables and functions */
int yaffs_Dofsync(int, int /*<<< orphan*/);
int yaffs_fsync(int handle) { return yaffs_Dofsync(handle, 0); }


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

x86 assembly (clang, -O2):
<yaffs_fsync>:
xor    %esi,%esi
jmp    1030 <yaffs_Dofsync@plt>

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

LLVM IR (-O2):
define i32 @yaffs_fsync(i32 %0) {
%2 = tail call i32 @yaffs_Dofsync(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *nm) {
  fprintf(stderr, "Usage: %s [-h] [-s salt] cleartext_password\n", nm);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: %s [-h] [-s salt] cleartext_password\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"Usage: %s [-h] [-s salt] cleartext_password\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hash(int);
void test() {
  int c1;
  int i;
  { hash(1); };
  {
    hash(3);
    hash(0);
  };
  { hash(2); };
  {
    hash(3);
    hash(1);
  };
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
call   1030 <hash@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x1,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
xor    %edi,%edi
call   1030 <hash@plt>
mov    $0x2,%edi
call   1030 <hash@plt>
mov    $0x3,%edi
call   1030 <hash@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <hash@plt>

LLVM IR (-O0):
define void @test() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 @hash(i32 1)
%4 = call i32 @hash(i32 3)
%5 = call i32 @hash(i32 0)
%6 = call i32 @hash(i32 2)
%7 = call i32 @hash(i32 3)
%8 = call i32 @hash(i32 1)
ret void
}

LLVM IR (-O2):
define void @test() {
%1 = tail call i32 @hash(i32 1)
%2 = tail call i32 @hash(i32 3)
%3 = tail call i32 @hash(i32 0)
%4 = tail call i32 @hash(i32 2)
%5 = tail call i32 @hash(i32 3)
%6 = tail call i32 @hash(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGUSR1;
int /*<<< orphan*/ SIGUSR2;
int /*<<< orphan*/ getpid();
int /*<<< orphan*/ kill(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sleep(int);
void *emit_signal(void *arg) {
  sleep(1);
  kill(getpid(), SIGUSR1);
  kill(getpid(), SIGUSR2);
  return NULL;
}


x86 assembly (clang, -O0):
<emit_signal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    0x2e6b(%rip),%rax
mov    (%rax),%esi
call   1040 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_signal>:
push   %rax
mov    $0x1,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2e9f(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
mov    0x2e78(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1040 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
define i8* @emit_signal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @sleep(i32 1)
%4 = call i32 (...) @getpid()
%5 = load i32, i32* @SIGUSR1
%6 = call i32 @kill(i32 %4, i32 %5)
%7 = call i32 (...) @getpid()
%8 = load i32, i32* @SIGUSR2
%9 = call i32 @kill(i32 %7, i32 %8)
ret i8* null
}

LLVM IR (-O2):
@SIGUSR1 = global i32 0
@SIGUSR2 = global i32 0
define noalias i8* @emit_signal(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 1)
%3 = tail call i32 (...) @getpid()
%4 = load i32, i32* @SIGUSR1
%5 = tail call i32 @kill(i32 %3, i32 %4)
%6 = tail call i32 (...) @getpid()
%7 = load i32, i32* @SIGUSR2
%8 = tail call i32 @kill(i32 %6, i32 %7)
ret i8* null
}
/* Variables and functions */
scalar_t__ erfl(long double);
int /*<<< orphan*/ link_failure_erfl();
void test_erfl(long double ld) {
  if (erfl(ld) != erfl(ld))
    link_failure_erfl();
}


x86 assembly (clang, -O0):
<test_erfl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <erfl@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <erfl@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_erfl+0x43>
mov    $0x0,%al
call   1040 <link_failure_erfl@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_erfl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1030 <erfl@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1030 <erfl@plt>
cmp    %rax,%rbx
jne    1151 <test_erfl+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1040 <link_failure_erfl@plt>

LLVM IR (-O0):
define void @test_erfl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @erfl(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @erfl(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_erfl()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_erfl(x86_fp80 %0) {
%2 = tail call i64 @erfl(x86_fp80 %0)
%3 = tail call i64 @erfl(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_erfl()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void _Q_flt(void) {
  printf("Unimplemented %s called, exiting\n", "_Q_flt");
  exit(-1);
}


x86 assembly (clang, -O0):
<_Q_flt>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xef0(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_Q_flt>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xef3(%rip),%rsi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [7 x i8] c"_Q_flt\00"
define void @_Q_flt() {
%1 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [34 x i8] c"Unimplemented %s called, exiting\0A\00"
@.str.1 = [7 x i8] c"_Q_flt\00"
define void @_Q_flt() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_help(void) {
  printf("Tool for convert Smaky text file to "
         "Extended ASCII (ISO-8859-1).\n\n"
         "Usage: smascii smaky_file converted_file [--unix]\n\n"
         " smaky_file            the smaky text file\n"
         " converted_file        the file converted\n"
         " --unix                the Carriage Return (Old Mac) will be\n"
         "                       converted to Line Feed (unix)\n"
         "\nPlease, report bugs to <fosfat-devel@gamesover.ch>.\n");
}


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

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

LLVM IR (-O0):
@.str = [370 x i8] c"Tool for convert Smaky text file to Extended ASCII (ISO-8859-1).\0A\0AUsage: smascii smaky_file converted_file [--unix]\0A\0A smaky_file the smaky text file\0A converted_file the file converted\0A --unix the Carriage Return (Old Mac) will be\0A converted to Line Feed (unix)\0A\0APlease, report bugs to <fosfat-devel@gamesover.ch>.\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([370 x i8], [370 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [369 x i8] c"Tool for convert Smaky text file to Extended ASCII (ISO-8859-1).\0A\0AUsage: smascii smaky_file converted_file [--unix]\0A\0A smaky_file the smaky text file\0A converted_file the file converted\0A --unix the Carriage Return (Old Mac) will be\0A converted to Line Feed (unix)\0A\0APlease, report bugs to <fosfat-devel@gamesover.ch>.\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([369 x i8], [369 x i8]* @str, i64 0, i64 0))
ret void
}
void strcopy(char *s, char *t) {
  while (*s++ = *t++)
    ;
}


x86 assembly (clang, -O0):
<strcopy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     113b <strcopy+0x3b>
jmp    110c <strcopy+0xc>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcopy>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcopy+0x10>
ret

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

LLVM IR (-O2):
define void @strcopy(i8* nocapture writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret void
}
void test_multi_return() {
  static int *a, *b;
  int x;
  a = &x;
  b = &x;
}


x86 assembly (clang, -O0):
<test_multi_return>:
push   %rbp
mov    %rsp,%rbp
lea    -0x4(%rbp),%rax
mov    %rax,0x2f19(%rip)
lea    -0x4(%rbp),%rax
mov    %rax,0x2f16(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_multi_return>:
lea    -0x4(%rsp),%rax
mov    %rax,0x2f1c(%rip)
mov    %rax,0x2f1d(%rip)
ret

LLVM IR (-O0):
@test_multi_return.a = internal global i32* null
@test_multi_return.b = internal global i32* null
define void @test_multi_return() {
%1 = alloca i32
store i32* %1, i32** @test_multi_return.a
store i32* %1, i32** @test_multi_return.b
ret void
}

LLVM IR (-O2):
@test_multi_return.a = internal unnamed_addr global i32* null
@test_multi_return.b = internal unnamed_addr global i32* null
define void @test_multi_return() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32* %1, i32** @test_multi_return.a
store i32* %1, i32** @test_multi_return.b
ret void
}
/* Variables and functions */
int lenstr(char *);
scalar_t__ malloc(int);
char *str_dup(char *s) {
  char *ret, *d;
  ret = (char *)malloc(sizeof(char) * (lenstr(s) + 1));
  for (d = ret; (*d = *s); s++, d++)
    ;
  return ret;
}


x86 assembly (clang, -O0):
<str_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <lenstr@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x18(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1187 <str_dup+0x67>
jmp    116a <str_dup+0x4a>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1151 <str_dup+0x31>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_dup>:
push   %rbx
mov    %rdi,%rbx
call   1040 <lenstr@plt>
lea    0x1(%rax),%edi
call   1030 <malloc@plt>
mov    (%rbx),%cl
mov    %cl,(%rax)
test   %cl,%cl
je     114f <str_dup+0x2f>
mov    $0x1,%ecx
xchg   %ax,%ax
movzbl (%rbx,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1140 <str_dup+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define i8* @str_dup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @lenstr(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = mul i64 1, %8
%10 = trunc i64 %9 to i32
%11 = call i64 @malloc(i32 %10)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %3
%13 = load i8*, i8** %3
store i8* %13, i8** %4
br label %14
14: ; preds = %20, %1
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = load i8*, i8** %4
store i8 %16, i8* %17
%18 = icmp ne i8 %16, 0
br i1 %18, label %19, label %25
19: ; preds = %14
br label %20
20: ; preds = %19
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %2
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %4
br label %14
25: ; preds = %14
%26 = load i8*, i8** %3
ret i8* %26
}

LLVM IR (-O2):
define i8* @str_dup(i8* %0) {
%2 = tail call i32 @lenstr(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = load i8, i8* %0
store i8 %6, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %15, label %8
8: ; preds = %1, %8
%9 = phi i8* [ %12, %8 ], [ %5, %1 ]
%10 = phi i8* [ %11, %8 ], [ %0, %1 ]
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = getelementptr inbounds i8, i8* %9, i64 1
%13 = load i8, i8* %11
store i8 %13, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %8
15: ; preds = %8, %1
ret i8* %5
}
void av_get_token() {}


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

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

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

LLVM IR (-O2):
define void @av_get_token() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int xmknod(char *path, int mode, int dev) {
  printf("mknod() not implemented\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<xmknod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<xmknod>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"mknod() not implemented\0A\00"
define i32 @xmknod(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [24 x i8] c"mknod() not implemented\00"
define i32 @xmknod(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
}
__typeof__(iscntrl("")) test_iscntrl_20(void) { return iscntrl(""); }


x86 assembly (clang, -O0):
<test_iscntrl_20>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rax
mov    %eax,%edi
call   1030 <iscntrl@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i32 @test_iscntrl_20() {
%1 = call i32 @iscntrl(i32 ptrtoint ([1 x i8]* @.str to i32))
ret i32 %1
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i32 @test_iscntrl_20() {
%1 = tail call i32 @iscntrl(i32 ptrtoint ([1 x i8]* @.str to i32))
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, short);
f(float f, short p) {
  printf("%f ", f);
  printf("%d", p);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
movss  %xmm0,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movss  -0x8(%rbp),%xmm0
cvttss2si %xmm0,%eax
lea    0xecc(%rip),%rdi
movswl %ax,%esi
call   1030 <printf@plt>
lea    0xec1(%rip),%rdi
movswl -0xa(%rbp),%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %edi,%ebx
cvttss2si %xmm0,%eax
movswl %ax,%esi
lea    0xedf(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%f \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @f(float %0, i16 signext %1) {
%3 = alloca i32
%4 = alloca float
%5 = alloca i16
store float %0, float* %4
store i16 %1, i16* %5
%6 = load float, float* %4
%7 = fptosi float %6 to i16
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 signext %7)
%9 = load i16, i16* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i16 signext %9)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @f(float %0, i16 signext %1) {
%3 = fptosi float %0 to i16
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i16 signext %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i16 signext %1)
ret i32 undef
}
void av_fast_malloc() {}


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

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

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

LLVM IR (-O2):
define void @av_fast_malloc() {
ret void
}
double test_cos(double x) { return __builtin_cos(x); }


x86 assembly (clang, -O0):
<test_cos>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <cos@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_cos>:
jmp    1030 <cos@plt>

LLVM IR (-O0):
define double @test_cos(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @cos(double %3)
ret double %4
}

LLVM IR (-O2):
define double @test_cos(double %0) {
%2 = tail call double @cos(double %0)
ret double %2
}