xunge/DecIR huggingface dataset:
/* Type definitions */
struct terminal_t {
  int dummy;
};
struct parm_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cr(struct terminal_t *);
int /*<<< orphan*/ move_cursor(struct terminal_t *, int, int /*<<< orphan*/);
int sum(struct parm_t *);
void curs_nl(struct terminal_t *term, struct parm_t *parm) {
  int num = sum(parm);
  if (num <= 0)
    num = 1;
  move_cursor(term, num, 0);
  cr(term);
}


x86 assembly (clang, -O0):
<curs_nl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <sum@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115d <curs_nl+0x2d>
movl   $0x1,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
xor    %edx,%edx
call   1050 <move_cursor@plt>
mov    -0x8(%rbp),%rdi
call   1030 <cr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_nl>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1040 <sum@plt>
test   %eax,%eax
mov    $0x1,%esi
cmovg  %eax,%esi
mov    %rbx,%rdi
xor    %edx,%edx
call   1050 <move_cursor@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <cr@plt>

LLVM IR (-O0):
%struct.terminal_t = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_nl(%struct.terminal_t* %0, %struct.parm_t* %1) {
%3 = alloca %struct.terminal_t*
%4 = alloca %struct.parm_t*
%5 = alloca i32
store %struct.terminal_t* %0, %struct.terminal_t** %3
store %struct.parm_t* %1, %struct.parm_t** %4
%6 = load %struct.parm_t*, %struct.parm_t** %4
%7 = call i32 @sum(%struct.parm_t* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 1, i32* %5
br label %11
11: ; preds = %10, %2
%12 = load %struct.terminal_t*, %struct.terminal_t** %3
%13 = load i32, i32* %5
%14 = call i32 @move_cursor(%struct.terminal_t* %12, i32 %13, i32 0)
%15 = load %struct.terminal_t*, %struct.terminal_t** %3
%16 = call i32 @cr(%struct.terminal_t* %15)
ret void
}

LLVM IR (-O2):
%struct.terminal_t = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_nl(%struct.terminal_t* %0, %struct.parm_t* %1) {
%3 = tail call i32 @sum(%struct.parm_t* %1)
%4 = icmp sgt i32 %3, 1
%5 = select i1 %4, i32 %3, i32 1
%6 = tail call i32 @move_cursor(%struct.terminal_t* %0, i32 %5, i32 0)
%7 = tail call i32 @cr(%struct.terminal_t* %0)
ret void
}
void LPCWordWrite(unsigned long ulBase, unsigned long ulOffset,
                  unsigned long ulData) {
  ;
  ;

  ;
  (*((volatile unsigned long *)(ulBase + 0x00000400 + ulOffset))) = ulData;
}


x86 assembly (clang, -O0):
<LPCWordWrite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
add    $0x400,%rax
add    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LPCWordWrite>:
mov    %rdx,0x400(%rdi,%rsi,1)
ret

LLVM IR (-O0):
define void @LPCWordWrite(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i64, i64* %4
%9 = add i64 %8, 1024
%10 = load i64, i64* %5
%11 = add i64 %9, %10
%12 = inttoptr i64 %11 to i64*
store volatile i64 %7, i64* %12
ret void
}

LLVM IR (-O2):
define void @LPCWordWrite(i64 %0, i64 %1, i64 %2) {
%4 = add i64 %0, 1024
%5 = add i64 %4, %1
%6 = inttoptr i64 %5 to i64*
store volatile i64 %2, i64* %6
ret void
}
void sdr_threads_init() {}


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

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

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

LLVM IR (-O2):
define void @sdr_threads_init() {
ret void
}
char has_nick_mode(const char *nick) {
  if (nick[0] == '@')
    return 1;
  if (nick[0] == '+')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<has_nick_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
jne    1121 <has_nick_mode+0x21>
movb   $0x1,-0x1(%rbp)
jmp    113e <has_nick_mode+0x3e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    113a <has_nick_mode+0x3a>
movb   $0x1,-0x1(%rbp)
jmp    113e <has_nick_mode+0x3e>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_nick_mode>:
mov    (%rdi),%al
cmp    $0x40,%al
sete   %cl
cmp    $0x2b,%al
sete   %al
or     %cl,%al
ret

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

LLVM IR (-O2):
define signext i8 @has_nick_mode(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 64
%4 = icmp eq i8 %2, 43
%5 = or i1 %3, %4
%6 = zext i1 %5 to i8
ret i8 %6
}
int board_set_flash_slot(char *slot_name) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @board_set_flash_slot(i8* nocapture readnone %0) {
ret i32 -1
}
void *__arch_fetch_and_add_ptr(void **pointer, long int delta) {
  return (void *)__sync_fetch_and_add((long int *)*pointer, delta);
}


x86 assembly (clang, -O0):
<__arch_fetch_and_add_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
lock xadd %rax,(%rcx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<__arch_fetch_and_add_ptr>:
mov    %rsi,%rax
mov    (%rdi),%rcx
lock xadd %rax,(%rcx)
ret

LLVM IR (-O0):
define i8* @__arch_fetch_and_add_ptr(i8** %0, i64 %1) {
%3 = alloca i8**
%4 = alloca i64
store i8** %0, i8*** %3
store i64 %1, i64* %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %4
%9 = atomicrmw add i64* %7, i64 %8 seq_cst
%10 = inttoptr i64 %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @__arch_fetch_and_add_ptr(i8** nocapture %0, i64 %1) {
%3 = bitcast i8** %0 to i64**
%4 = load i64*, i64** %3
%5 = atomicrmw add i64* %4, i64 %1 seq_cst
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct device {
  int dummy;
};

/* Variables and functions */
int dev_reset(struct device *);
int dev_write_block(struct device *, char const *, int /*<<< orphan*/);
int dev_write_and_reset(struct device *dev, const char *buf, uint64_t block) {
  int rc = dev_write_block(dev, buf, block);
  return rc ? rc : dev_reset(dev);
}


x86 assembly (clang, -O0):
<dev_write_and_reset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <dev_write_block@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     115b <dev_write_and_reset+0x3b>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1167 <dev_write_and_reset+0x47>
mov    -0x8(%rbp),%rdi
call   1030 <dev_reset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dev_write_and_reset>:
push   %rbx
mov    %rdi,%rbx
call   1040 <dev_write_block@plt>
test   %eax,%eax
je     112f <dev_write_and_reset+0xf>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <dev_reset@plt>

LLVM IR (-O0):
%struct.device = type { i32 }
define i32 @dev_write_and_reset(%struct.device* %0, i8* %1, i32 %2) {
%4 = alloca %struct.device*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store %struct.device* %0, %struct.device** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load %struct.device*, %struct.device** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @dev_write_block(%struct.device* %8, i8* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = load i32, i32* %7
br label %19
16: ; preds = %3
%17 = load %struct.device*, %struct.device** %4
%18 = call i32 @dev_reset(%struct.device* %17)
br label %19
19: ; preds = %16, %14
%20 = phi i32 [ %15, %14 ], [ %18, %16 ]
ret i32 %20
}

LLVM IR (-O2):
%struct.device = type { i32 }
define i32 @dev_write_and_reset(%struct.device* %0, i8* %1, i32 %2) {
%4 = tail call i32 @dev_write_block(%struct.device* %0, i8* %1, i32 %2)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @dev_reset(%struct.device* %0)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ %4, %3 ]
ret i32 %9
}
/* Variables and functions */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print(unsigned int);
int /*<<< orphan*/ putchar(char);
scalar_t__ scanf(char *, unsigned int *);
int main() {
  unsigned int n;
  while (scanf("%u", &n) != EOF) {
    print(n);
    putchar('\n');
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    0x2e82(%rip),%rcx
cmp    (%rcx),%rax
je     1186 <main+0x46>
mov    -0x8(%rbp),%edi
call   1040 <print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    114f <main+0xf>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xeb0(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x2e87(%rip),%r15
cmp    (%r15),%rax
je     11a3 <main+0x63>
lea    0xe93(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0xc(%rsp),%edi
call   1040 <print@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
cmp    (%r15),%rax
jne    1180 <main+0x40>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load i32, i32* %2
%9 = call i32 @print(i32 %8)
%10 = call i32 @putchar(i8 signext 10)
br label %3
11: ; preds = %3
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
@EOF = global i64 0
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
br i1 %5, label %13, label %6
6: ; preds = %0, %6
%7 = load i32, i32* %1
%8 = call i32 @print(i32 %7)
%9 = call i32 @putchar(i8 signext 10)
%10 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%11 = load i64, i64* @EOF
%12 = icmp eq i64 %10, %11
br i1 %12, label %13, label %6
13: ; preds = %6, %0
%14 = call i32 @exit(i32 0)
unreachable
}
call6b(s, i, l, f, d, uc, us, ui, ul) short s;
int i;
long l;
float f;
double d;
unsigned char uc;
unsigned short us;
unsigned int ui;
unsigned long ul;
{
  s = s;
  call6c(i, l, f, d, uc, us, ui, ul);
}


x86 assembly (clang, -O0):
<call6b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
cvtsd2ss %xmm0,%xmm0
mov    %r8w,%ax
mov    %di,-0x6(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movss  %xmm0,-0x1c(%rbp)
movsd  %xmm1,-0x28(%rbp)
mov    %cl,-0x29(%rbp)
mov    %ax,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
mov    -0x6(%rbp),%ax
mov    %ax,-0x6(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  -0x28(%rbp),%xmm1
movzbl -0x29(%rbp),%edx
movzwl -0x2c(%rbp),%ecx
mov    -0x30(%rbp),%r8d
mov    0x10(%rbp),%r9
mov    $0x2,%al
call   1030 <call6c@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call6b>:
mov    %r9d,%r10d
mov    %esi,%edi
mov    0x8(%rsp),%r9
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
movzbl %cl,%eax
movzwl %r8w,%ecx
mov    %rdx,%rsi
mov    %eax,%edx
mov    %r10d,%r8d
mov    $0x2,%al
jmp    1030 <call6c@plt>

LLVM IR (-O0):
define i32 @call6b(i32 %0, i32 %1, i64 %2, double %3, double %4, i32 %5, i32 %6, i32 %7, i64 %8) {
%10 = alloca i32
%11 = alloca i16
%12 = alloca i32
%13 = alloca i64
%14 = alloca float
%15 = alloca double
%16 = alloca i8
%17 = alloca i16
%18 = alloca i32
%19 = alloca i64
%20 = trunc i32 %0 to i16
%21 = fptrunc double %3 to float
%22 = trunc i32 %5 to i8
%23 = trunc i32 %6 to i16
store i16 %20, i16* %11
store i32 %1, i32* %12
store i64 %2, i64* %13
store float %21, float* %14
store double %4, double* %15
store i8 %22, i8* %16
store i16 %23, i16* %17
store i32 %7, i32* %18
store i64 %8, i64* %19
%24 = load i16, i16* %11
store i16 %24, i16* %11
%25 = load i32, i32* %12
%26 = load i64, i64* %13
%27 = load float, float* %14
%28 = fpext float %27 to double
%29 = load double, double* %15
%30 = load i8, i8* %16
%31 = zext i8 %30 to i32
%32 = load i16, i16* %17
%33 = zext i16 %32 to i32
%34 = load i32, i32* %18
%35 = load i64, i64* %19
%36 = call i32 (i32, i64, double, double, i32, i32, i32, i64, ...) bitcast (i32 (...)* @call6c to i32 (i32, i64, double, double, i32, i32, i32, i64, ...)*)(i32 %25, i64 %26, double %28, double %29, i32 %31, i32 %33, i32 %34, i64 %35)
%37 = load i32, i32* %10
ret i32 %37
}

LLVM IR (-O2):
define i32 @call6b(i32 %0, i32 %1, i64 %2, double %3, double %4, i32 %5, i32 %6, i32 %7, i64 %8) {
%10 = fptrunc double %3 to float
%11 = fpext float %10 to double
%12 = and i32 %5, 255
%13 = and i32 %6, 65535
%14 = tail call i32 (i32, i64, double, double, i32, i32, i32, i64, ...) bitcast (i32 (...)* @call6c to i32 (i32, i64, double, double, i32, i32, i32, i64, ...)*)(i32 %1, i64 %2, double %11, double %4, i32 %12, i32 %13, i32 %7, i64 %8)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void pipe_cleanup(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<pipe_cleanup>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @pipe_cleanup(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello nix!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"hello nix!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [11 x i8] c"hello nix!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
int /*<<< orphan*/ IntEnable(int);
int /*<<< orphan*/ IntRegister(int, void (*)());
int _USBIntNumberGet(int);
void USBIntRegister(uint32_t ui32Base, void (*pfnHandler)(void)) {
  uint32_t ui32Int;
  ASSERT(ui32Base == 0x40050000);
  ui32Int = _USBIntNumberGet(ui32Base);
  ASSERT(ui32Int != 0);
  IntRegister(ui32Int, pfnHandler);
  IntEnable(ui32Int);
}


x86 assembly (clang, -O0):
<USBIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x4(%rbp),%edi
call   1060 <_USBIntNumberGet@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <ASSERT@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <IntRegister@plt>
mov    -0x14(%rbp),%edi
call   1030 <IntEnable@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBIntRegister>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40050000,%ebp
sete   %dil
call   1050 <ASSERT@plt>
mov    %ebp,%edi
call   1060 <_USBIntNumberGet@plt>
mov    %eax,%ebp
xor    %edi,%edi
test   %eax,%eax
setne  %dil
call   1050 <ASSERT@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <IntRegister@plt>
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <IntEnable@plt>

LLVM IR (-O0):
define void @USBIntRegister(i32 %0, void ()* %1) {
%3 = alloca i32
%4 = alloca void ()*
%5 = alloca i32
store i32 %0, i32* %3
store void ()* %1, void ()** %4
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 1074069504
%8 = zext i1 %7 to i32
%9 = call i32 @ASSERT(i32 %8)
%10 = load i32, i32* %3
%11 = call i32 @_USBIntNumberGet(i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @ASSERT(i32 %14)
%16 = load i32, i32* %5
%17 = load void ()*, void ()** %4
%18 = bitcast void ()* %17 to void (...)*
%19 = call i32 @IntRegister(i32 %16, void (...)* %18)
%20 = load i32, i32* %5
%21 = call i32 @IntEnable(i32 %20)
ret void
}

LLVM IR (-O2):
define void @USBIntRegister(i32 %0, void ()* %1) {
%3 = icmp eq i32 %0, 1074069504
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = tail call i32 @_USBIntNumberGet(i32 %0)
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @ASSERT(i32 %8)
%10 = bitcast void ()* %1 to void (...)*
%11 = tail call i32 @IntRegister(i32 %6, void (...)* %10)
%12 = tail call i32 @IntEnable(i32 %6)
ret void
}
/* Variables and functions */
char *strdup(char const *);
int conf_parse_string(const char *lvalue, const char *rvalue, void *data) {
  char **result = (char **)data;
  (void)lvalue;
  *result = strdup(rvalue);
  if (!*result)
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<conf_parse_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strdup@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1159 <conf_parse_string+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1160 <conf_parse_string+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_parse_string>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%rdi
call   1030 <strdup@plt>
mov    %rax,(%rbx)
cmp    $0x1,%rax
sbb    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @conf_parse_string(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture writeonly %2) {
%4 = bitcast i8* %2 to i8**
%5 = tail call i8* @strdup(i8* %1)
store i8* %5, i8** %4
%6 = icmp eq i8* %5, null
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
bool test_case_3(void) {
  if (2 + 2 == 5)
    return false;
  else
    return true;
}


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

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

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

LLVM IR (-O2):
define i32 @test_case_3() {
ret i32 1
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
int u8range(uint8_t x, uint8_t lo, uint8_t hi) {
  return (uint8_t)(x - lo) <= (uint8_t)(hi - lo);
}


x86 assembly (clang, -O0):
<u8range>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8range>:
xor    %eax,%eax
cmp    %rdx,%rdi
setle  %al
ret

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

LLVM IR (-O2):
define i32 @u8range(i64 %0, i64 %1, i64 %2) {
%4 = icmp sle i64 %0, %2
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
struct vqe_zone {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ zone_instance_put(struct vqe_zone *);
void zone_destroy(struct vqe_zone *z) {
  fprintf(stderr, "This API is deprecated; replace with "
                  "zone_instance_put()\n");
  zone_instance_put(z);
}


x86 assembly (clang, -O0):
<zone_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xec4(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <zone_instance_put@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zone_destroy>:
push   %rbx
mov    %rdi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <zone_instance_put@plt>

LLVM IR (-O0):
%struct.vqe_zone = type { i32 }
@stderr = global i32 0
@.str = [58 x i8] c"This API is deprecated; replace with zone_instance_put()\0A\00"
define void @zone_destroy(%struct.vqe_zone* %0) {
%2 = alloca %struct.vqe_zone*
store %struct.vqe_zone* %0, %struct.vqe_zone** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%5 = load %struct.vqe_zone*, %struct.vqe_zone** %2
%6 = call i32 @zone_instance_put(%struct.vqe_zone* %5)
ret void
}

LLVM IR (-O2):
%struct.vqe_zone = type { i32 }
@stderr = global i32 0
@.str = [58 x i8] c"This API is deprecated; replace with zone_instance_put()\0A\00"
define void @zone_destroy(%struct.vqe_zone* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @zone_instance_put(%struct.vqe_zone* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ Flash_LED();
int /*<<< orphan*/ InitApp();
int32_t main(void) {
  InitApp();
  Flash_LED();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <InitApp@plt>
mov    $0x0,%al
call   1040 <Flash_LED@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @InitApp()
%2 = call i32 (...) @Flash_LED()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @InitApp()
%2 = tail call i32 (...) @Flash_LED()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((no)) uint32_t xatoi(const char *c) {
  uint32_t r = 0;
  while (*c)
    r = r * 10 + (*c++ - '0');
  return r;
}


x86 assembly (clang, -O0):
<xatoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113f <xatoi+0x3f>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <xatoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatoi>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <xatoi+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    (%rax,%rax,4),%eax
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <xatoi+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @xatoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %12, %4 ], [ 0, %1 ]
%7 = phi i8* [ %9, %4 ], [ %0, %1 ]
%8 = mul nsw i32 %6, 10
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = sext i8 %5 to i32
%11 = add i32 %8, -48
%12 = add i32 %11, %10
%13 = load i8, i8* %9
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %12, %4 ]
ret i32 %16
}
/* Type definitions */
struct timeval {
  unsigned int tv_sec;
  unsigned int tv_usec;
};

/* Variables and functions */
unsigned int getpid();
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(unsigned int);
void prng_init() {
  unsigned int seed;
  struct timeval t;
  gettimeofday(&t, NULL);
  seed = t.tv_sec ^ t.tv_usec ^ getpid();
  srand(seed);
}


x86 assembly (clang, -O0):
<prng_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x10(%rbp),%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1050 <srand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prng_init>:
push   %rbx
sub    $0x10,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    0xc(%rsp),%ebx
xor    0x8(%rsp),%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
xor    %eax,%ebx
mov    %ebx,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1050 <srand@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define void @prng_init() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%7 = load i32, i32* %6
%8 = xor i32 %5, %7
%9 = call i32 (...) @getpid()
%10 = xor i32 %8, %9
store i32 %10, i32* %1
%11 = load i32, i32* %1
%12 = call i32 @srand(i32 %11)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define void @prng_init() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = xor i32 %7, %5
%9 = tail call i32 (...) @getpid()
%10 = xor i32 %8, %9
%11 = tail call i32 @srand(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rcc_printf(char *, char const *);
void emit_while_end(const char *labelback) {
  rcc_printf("  pop "
             "r0"
             "\n"
             "  cmp "
             "r0"
             ", "
             "r0"
             "\n"
             "  beq %s\n",
             labelback);
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c" pop r0\0A cmp r0, r0\0A beq %s\0A\00"
define void @emit_while_end(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @rcc_printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c" pop r0\0A cmp r0, r0\0A beq %s\0A\00"
define void @emit_while_end(i8* %0) {
%2 = tail call i32 @rcc_printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int run(int, char **);
int main(int argc, char *argv[]) { return run(argc, argv); }


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <run@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
jmp    1030 <run@plt>

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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @run(i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @run(i32 %0, i8** %1)
ret i32 %3
}
/* Variables and functions */
void *realloc(void *, size_t);
void *__gnat_realloc(void *ptr, size_t size) { return realloc(ptr, size); }


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

x86 assembly (clang, -O2):
<__gnat_realloc>:
jmp    1030 <realloc@plt>

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

LLVM IR (-O2):
define noalias i8* @__gnat_realloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
ret i8* %3
}
int *gao(void) { return 0; }


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

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

LLVM IR (-O0):
define i32* @gao() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @gao() {
ret i32* null
}
/* Variables and functions */
int /*<<< orphan*/ foo(unsigned short);
__attribute__((no, noclone)) unsigned short f3(unsigned short x,
                                               unsigned short y) {
  unsigned short r = x - y;
  if (x < r)
    foo(r);
  return r;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x4(%rbp),%ecx
sub    %ecx,%eax
mov    %ax,-0x6(%rbp)
movzwl -0x2(%rbp),%eax
movzwl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jge    114d <f3+0x3d>
movzwl -0x6(%rbp),%edi
call   1030 <foo@plt>
movzwl -0x6(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rbx
mov    %edi,%ebx
sub    %si,%bx
jae    1120 <f3+0x10>
movzwl %bx,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i16 @f3(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = load i16, i16* %4
%9 = zext i16 %8 to i32
%10 = sub nsw i32 %7, %9
%11 = trunc i32 %10 to i16
store i16 %11, i16* %5
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i16, i16* %5
%15 = zext i16 %14 to i32
%16 = icmp slt i32 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %2
%18 = load i16, i16* %5
%19 = call i32 @foo(i16 zeroext %18)
br label %20
20: ; preds = %17, %2
%21 = load i16, i16* %5
ret i16 %21
}

LLVM IR (-O2):
define zeroext i16 @f3(i16 zeroext %0, i16 zeroext %1) {
%3 = sub i16 %0, %1
%4 = icmp ult i16 %0, %1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @foo(i16 zeroext %3)
br label %7
7: ; preds = %5, %2
ret i16 %3
}
/* Type definitions */
struct lh_table {
  int dummy;
};
struct lh_entry {
  int dummy;
};

/* Variables and functions */
int lh_table_delete_entry(struct lh_table *, struct lh_entry *);
struct lh_entry *lh_table_lookup_entry(struct lh_table *, void const *);
int lh_table_delete(struct lh_table *t, const void *k) {
  struct lh_entry *e = lh_table_lookup_entry(t, k);
  if (!e)
    return -1;
  return lh_table_delete_entry(t, e);
}


x86 assembly (clang, -O0):
<lh_table_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <lh_table_lookup_entry@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1158 <lh_table_delete+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <lh_table_delete+0x48>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <lh_table_delete_entry@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lh_table_delete>:
push   %rbx
mov    %rdi,%rbx
call   1030 <lh_table_lookup_entry@plt>
test   %rax,%rax
je     113a <lh_table_delete+0x1a>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1040 <lh_table_delete_entry@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.lh_table = type { i32 }
%struct.lh_entry = type { i32 }
define i32 @lh_table_delete(%struct.lh_table* %0, i8* %1) {
%3 = alloca i32
%4 = alloca %struct.lh_table*
%5 = alloca i8*
%6 = alloca %struct.lh_entry*
store %struct.lh_table* %0, %struct.lh_table** %4
store i8* %1, i8** %5
%7 = load %struct.lh_table*, %struct.lh_table** %4
%8 = load i8*, i8** %5
%9 = call %struct.lh_entry* @lh_table_lookup_entry(%struct.lh_table* %7, i8* %8)
store %struct.lh_entry* %9, %struct.lh_entry** %6
%10 = load %struct.lh_entry*, %struct.lh_entry** %6
%11 = icmp ne %struct.lh_entry* %10, null
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 -1, i32* %3
br label %17
13: ; preds = %2
%14 = load %struct.lh_table*, %struct.lh_table** %4
%15 = load %struct.lh_entry*, %struct.lh_entry** %6
%16 = call i32 @lh_table_delete_entry(%struct.lh_table* %14, %struct.lh_entry* %15)
store i32 %16, i32* %3
br label %17
17: ; preds = %13, %12
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
%struct.lh_table = type { i32 }
%struct.lh_entry = type { i32 }
define i32 @lh_table_delete(%struct.lh_table* %0, i8* %1) {
%3 = tail call %struct.lh_entry* @lh_table_lookup_entry(%struct.lh_table* %0, i8* %1)
%4 = icmp eq %struct.lh_entry* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @lh_table_delete_entry(%struct.lh_table* %0, %struct.lh_entry* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i32 [ %6, %5 ], [ -1, %2 ]
ret i32 %8
}
/* Type definitions */
struct ejson_driver_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
void d_close_data(struct ejson_driver_t *d) {
  printf("' %%,");
  fflush(stdout);
}


x86 assembly (clang, -O0):
<d_close_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_close_data>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
%struct.ejson_driver_t = type { i32 }
@.str = [6 x i8] c"' %%,\00"
@stdout = global i32 0
define void @d_close_data(%struct.ejson_driver_t* %0) {
%2 = alloca %struct.ejson_driver_t*
store %struct.ejson_driver_t* %0, %struct.ejson_driver_t** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = call i32 @fflush(i32 %4)
ret void
}

LLVM IR (-O2):
%struct.ejson_driver_t = type { i32 }
@.str = [6 x i8] c"' %%,\00"
@stdout = global i32 0
define void @d_close_data(%struct.ejson_driver_t* nocapture readnone %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_idxset_remove_all() {
  printf("NOT IMPLEMENTED:"
         "pa_idxset_remove_all"
         "\n");
}


x86 assembly (clang, -O0):
<pa_idxset_remove_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [38 x i8] c"NOT IMPLEMENTED:pa_idxset_remove_all\0A\00"
define i32 @pa_idxset_remove_all() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [37 x i8] c"NOT IMPLEMENTED:pa_idxset_remove_all\00"
define i32 @pa_idxset_remove_all() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void heart_host_current_temp() {}


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

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

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

LLVM IR (-O2):
define void @heart_host_current_temp() {
ret void
}
void MacroTune(int devHandle, int channel) {}


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

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

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

LLVM IR (-O2):
define void @MacroTune(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int i2cmaster_ReadLast(int /*<<< orphan*/);
unsigned i2c0master_ReadLast(void) { return i2cmaster_ReadLast(0); }


x86 assembly (clang, -O0):
<i2c0master_ReadLast>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <i2cmaster_ReadLast@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c0master_ReadLast>:
xor    %edi,%edi
jmp    1030 <i2cmaster_ReadLast@plt>

LLVM IR (-O0):
define i32 @i2c0master_ReadLast() {
%1 = call i32 @i2cmaster_ReadLast(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @i2c0master_ReadLast() {
%1 = tail call i32 @i2cmaster_ReadLast(i32 0)
ret i32 %1
}
__attribute__((always_)) void emms_c(void) {
  if (av_get_cpu_flags() & 0x0001)
    __asm__ volatile("emms" ::: "memory");
}


x86 assembly (clang, -O0):
<emms_c>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <av_get_cpu_flags@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1129 <emms_c+0x19>
emms
pop    %rbp
ret

x86 assembly (clang, -O2):
<emms_c>:
push   %rax
xor    %eax,%eax
call   1030 <av_get_cpu_flags@plt>
test   $0x1,%al
je     111e <emms_c+0xe>
emms
pop    %rax
ret

LLVM IR (-O0):
define void @emms_c() {
%1 = call i32 (...) @av_get_cpu_flags()
%2 = and i32 %1, 1
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @emms_c() {
%1 = tail call i32 (...) @av_get_cpu_flags()
%2 = and i32 %1, 1
%3 = icmp eq i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
tail call void asm sideeffect "emms", "~{memory},~{dirflag},~{fpsr},~{flags}"()
br label %5
5: ; preds = %4, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ intmax_t;

/* Variables and functions */
int /*<<< orphan*/ __strtoll_internal(char const *, char **, int,
                                      int /*<<< orphan*/);
intmax_t strtoimax(const char *__restrict nptr, char **__restrict endptr,
                   int base) {
  return __strtoll_internal(nptr, endptr, base, 0);
}


x86 assembly (clang, -O0):
<strtoimax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
call   1030 <__strtoll_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtoimax>:
xor    %ecx,%ecx
jmp    1030 <__strtoll_internal@plt>

LLVM IR (-O0):
define i32 @strtoimax(i8* noalias %0, i8** noalias %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = call i32 @__strtoll_internal(i8* %7, i8** %8, i32 %9, i32 0)
ret i32 %10
}

LLVM IR (-O2):
define i32 @strtoimax(i8* noalias %0, i8** noalias %1, i32 %2) {
%4 = tail call i32 @__strtoll_internal(i8* %0, i8** %1, i32 %2, i32 0)
ret i32 %4
}
void fc41(int n) {
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      goto a;
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
a : {
  typedef int(*f)[n];
  {
    typedef int(*g)[n];
    0;
  };
  {
    typedef int(*h)[n];
    0;
  };
  ;
  typedef int(*i)[n];
  0;
};
  ;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc41(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = load i32, i32* %2
%6 = zext i32 %5 to i64
br label %12
7: ; No predecessors!
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
br label %12
12: ; preds = %7, %1
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc41(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ rtxPrintDecrIndent();
int /*<<< orphan*/ rtxPrintIndent();
void rtxPrintCloseBrace() {
  rtxPrintDecrIndent();
  rtxPrintIndent();
  printf("}\n");
}


x86 assembly (clang, -O0):
<rtxPrintCloseBrace>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <rtxPrintDecrIndent@plt>
mov    $0x0,%al
call   1030 <rtxPrintIndent@plt>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtxPrintCloseBrace>:
push   %rax
xor    %eax,%eax
call   1050 <rtxPrintDecrIndent@plt>
xor    %eax,%eax
call   1030 <rtxPrintIndent@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

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

LLVM IR (-O2):
@str = [2 x i8] c"}\00"
define void @rtxPrintCloseBrace() {
%1 = tail call i32 (...) @rtxPrintDecrIndent()
%2 = tail call i32 (...) @rtxPrintIndent()
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}
int cairo_code_draw_redDial_get_width() { return 50; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_redDial_get_width() {
ret i32 50
}

LLVM IR (-O2):
define i32 @cairo_code_draw_redDial_get_width() {
ret i32 50
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int xbp_lstat(char const *, struct stat *);
int __wrap_lstat(const char *path, struct stat *buf) {
  return xbp_lstat(path, buf);
}


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

x86 assembly (clang, -O2):
<__wrap_lstat>:
jmp    1030 <xbp_lstat@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @__wrap_lstat(i8* %0, %struct.stat* %1) {
%3 = alloca i8*
%4 = alloca %struct.stat*
store i8* %0, i8** %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i8*, i8** %3
%6 = load %struct.stat*, %struct.stat** %4
%7 = call i32 @xbp_lstat(i8* %5, %struct.stat* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @__wrap_lstat(i8* %0, %struct.stat* %1) {
%3 = tail call i32 @xbp_lstat(i8* %0, %struct.stat* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ dir();
int main(void) {
  dir();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @dir()
ret i32 0
}