#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ bss_log(char *, char *, int);
int i0(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void okapi_delete(int set) {
  int return_code;
  char bss_command[1024];
  char bss_result[10 * 1024];
  sprintf(bss_command, "delete %d", set);
  if ((return_code = i0(bss_command, bss_result)) != 0) {
    bss_log("term_input()", bss_command, return_code);
  }
}


x86 assembly (clang, -O0):
<okapi_delete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2c10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
lea    -0x2c10(%rbp),%rsi
call   1050 <i0@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
je     1189 <okapi_delete+0x59>
lea    -0x410(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe86(%rip),%rdi
call   1030 <bss_log@plt>
add    $0x2c10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<okapi_delete>:
push   %rbx
sub    $0x2c00,%rsp
mov    %edi,%edx
lea    0xebf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
lea    0x400(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <i0@plt>
test   %eax,%eax
je     1171 <okapi_delete+0x41>
lea    0xea3(%rip),%rdi
mov    %rsp,%rsi
mov    %eax,%edx
call   1030 <bss_log@plt>
add    $0x2c00,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"delete %d\00"
@.str.1 = [13 x i8] c"term_input()\00"
define void @okapi_delete(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1024 x i8]
%5 = alloca [10240 x i8]
store i32 %0, i32* %2
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%7 = load i32, i32* %2
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [10240 x i8], [10240 x i8]* %5, i64 0, i64 0
%11 = call i32 @i0(i8* %9, i8* %10)
store i32 %11, i32* %3
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %1
%14 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%15 = load i32, i32* %3
%16 = call i32 @bss_log(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %14, i32 %15)
br label %17
17: ; preds = %13, %1
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"delete %d\00"
@.str.1 = [13 x i8] c"term_input()\00"
define void @okapi_delete(i32 %0) {
%2 = alloca [1024 x i8]
%3 = alloca [10240 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [10240 x i8], [10240 x i8]* %3, i64 0, i64 0
%6 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %0)
%7 = call i32 @i0(i8* %4, i8* %5)
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @bss_log(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* %4, i32 %7)
br label %11
11: ; preds = %9, %1
ret void
}